diff --git a/src/flutter_ffi.rs b/src/flutter_ffi.rs index 2455a4673..e698cc9ee 100644 --- a/src/flutter_ffi.rs +++ b/src/flutter_ffi.rs @@ -6,7 +6,7 @@ use crate::{ common::make_fd_to_json, flutter::{self, SESSIONS}, flutter::{session_add, session_start_}, - server::input_service::{ + server::{ MOUSE_BUTTON_BACK, MOUSE_BUTTON_FORWARD, MOUSE_BUTTON_LEFT, MOUSE_BUTTON_RIGHT, MOUSE_BUTTON_WHEEL, MOUSE_TYPE_DOWN, MOUSE_TYPE_TRACKPAD, MOUSE_TYPE_UP, MOUSE_TYPE_WHEEL, }, diff --git a/src/server.rs b/src/server.rs index e9bb890d1..e98f48e2c 100644 --- a/src/server.rs +++ b/src/server.rs @@ -74,6 +74,18 @@ lazy_static::lazy_static! { pub static ref CLIENT_SERVER: ServerPtr = new(); } +pub const MOUSE_TYPE_MOVE: i32 = 0; +pub const MOUSE_TYPE_DOWN: i32 = 1; +pub const MOUSE_TYPE_UP: i32 = 2; +pub const MOUSE_TYPE_WHEEL: i32 = 3; +pub const MOUSE_TYPE_TRACKPAD: i32 = 4; + +pub const MOUSE_BUTTON_LEFT: i32 = 0x01; +pub const MOUSE_BUTTON_RIGHT: i32 = 0x02; +pub const MOUSE_BUTTON_WHEEL: i32 = 0x04; +pub const MOUSE_BUTTON_BACK: i32 = 0x08; +pub const MOUSE_BUTTON_FORWARD: i32 = 0x10; + pub struct Server { connections: ConnMap, services: HashMap<&'static str, Box>, diff --git a/src/server/input_service.rs b/src/server/input_service.rs index 9a8d0bd75..4dd2d9c1f 100644 --- a/src/server/input_service.rs +++ b/src/server/input_service.rs @@ -22,18 +22,6 @@ use winapi::um::winuser::WHEEL_DELTA; const INVALID_CURSOR_POS: i32 = i32::MIN; -pub const MOUSE_TYPE_MOVE: i32 = 0; -pub const MOUSE_TYPE_DOWN: i32 = 1; -pub const MOUSE_TYPE_UP: i32 = 2; -pub const MOUSE_TYPE_WHEEL: i32 = 3; -pub const MOUSE_TYPE_TRACKPAD: i32 = 4; - -pub const MOUSE_BUTTON_LEFT: i32 = 0x01; -pub const MOUSE_BUTTON_RIGHT: i32 = 0x02; -pub const MOUSE_BUTTON_WHEEL: i32 = 0x04; -pub const MOUSE_BUTTON_BACK: i32 = 0x08; -pub const MOUSE_BUTTON_FORWARD: i32 = 0x10; - #[derive(Default)] struct StateCursor { hcursor: u64,