mirror of
https://github.com/weyne85/rustdesk.git
synced 2025-10-29 17:00:05 +00:00
linux_wayland_support: init merge, windows build
Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
44
src/ipc.rs
44
src/ipc.rs
@@ -96,6 +96,45 @@ pub enum FS {
|
||||
},
|
||||
}
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize, Clone)]
|
||||
#[serde(tag = "t", content = "c")]
|
||||
pub enum DataKeyboard {
|
||||
Sequence(String),
|
||||
KeyDown(enigo::Key),
|
||||
KeyUp(enigo::Key),
|
||||
KeyClick(enigo::Key),
|
||||
GetKeyState(enigo::Key),
|
||||
}
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize, Clone)]
|
||||
#[serde(tag = "t", content = "c")]
|
||||
pub enum DataKeyboardResponse {
|
||||
GetKeyState(bool),
|
||||
}
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize, Clone)]
|
||||
#[serde(tag = "t", content = "c")]
|
||||
pub enum DataMouse {
|
||||
MoveTo(i32, i32),
|
||||
MoveRelative(i32, i32),
|
||||
Down(enigo::MouseButton),
|
||||
Up(enigo::MouseButton),
|
||||
Click(enigo::MouseButton),
|
||||
ScrollX(i32),
|
||||
ScrollY(i32),
|
||||
}
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize, Clone)]
|
||||
#[serde(tag = "t", content = "c")]
|
||||
pub enum DataControl {
|
||||
Resolution {
|
||||
minx: i32,
|
||||
maxx: i32,
|
||||
miny: i32,
|
||||
maxy: i32,
|
||||
},
|
||||
}
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize, Clone)]
|
||||
#[serde(tag = "t", content = "c")]
|
||||
pub enum Data {
|
||||
@@ -141,6 +180,11 @@ pub enum Data {
|
||||
PrivacyModeState((i32, PrivacyModeState)),
|
||||
TestRendezvousServer,
|
||||
Bool((String, Option<bool>)),
|
||||
Keyboard(DataKeyboard),
|
||||
KeyboardResponse(DataKeyboardResponse),
|
||||
Mouse(DataMouse),
|
||||
Control(DataControl),
|
||||
Empty,
|
||||
}
|
||||
|
||||
#[tokio::main(flavor = "current_thread")]
|
||||
|
||||
Reference in New Issue
Block a user