feat: whiteboard, macos (#12780)

Signed-off-by: fufesou <linlong1266@gmail.com>
This commit is contained in:
fufesou
2025-08-30 22:16:35 +08:00
committed by GitHub
parent 438cef8cf9
commit e2ec6a5be8
14 changed files with 796 additions and 409 deletions

35
src/whiteboard/mod.rs Normal file
View File

@@ -0,0 +1,35 @@
use serde_derive::{Deserialize, Serialize};
mod client;
mod server;
#[cfg(target_os = "windows")]
mod windows;
#[cfg(target_os = "macos")]
mod macos;
#[cfg(target_os = "windows")]
use windows::create_event_loop;
#[cfg(target_os = "macos")]
use macos::create_event_loop;
pub use client::*;
pub use server::*;
#[derive(Debug, Serialize, Deserialize, Clone)]
#[serde(tag = "t", content = "c")]
pub enum CustomEvent {
Cursor(Cursor),
Clear,
Exit,
}
#[derive(Debug, Serialize, Deserialize, Clone)]
#[serde(tag = "t")]
pub struct Cursor {
pub x: f32,
pub y: f32,
pub argb: u32,
pub btns: i32,
pub text: String,
}