change message.proto
Signed-off-by: dignow <linlong1265@gmail.com>
This commit is contained in:
parent
b17c6983ce
commit
31fc018526
@ -122,13 +122,13 @@ message TouchEvent {
|
|||||||
oneof union {
|
oneof union {
|
||||||
TouchScaleUpdate scale_update = 1;
|
TouchScaleUpdate scale_update = 1;
|
||||||
}
|
}
|
||||||
repeated ControlKey modifiers = 2;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
message PointerDeviceEvent {
|
message PointerDeviceEvent {
|
||||||
oneof union {
|
oneof union {
|
||||||
TouchEvent touch_event = 1;
|
TouchEvent touch_event = 1;
|
||||||
}
|
}
|
||||||
|
repeated ControlKey modifiers = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
message MouseEvent {
|
message MouseEvent {
|
||||||
|
@ -1967,8 +1967,8 @@ pub fn send_mouse(
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn send_touch(
|
pub fn send_pointer_device_event(
|
||||||
mut evt: TouchEvent,
|
mut evt: PointerDeviceEvent,
|
||||||
alt: bool,
|
alt: bool,
|
||||||
ctrl: bool,
|
ctrl: bool,
|
||||||
shift: bool,
|
shift: bool,
|
||||||
@ -1995,10 +1995,7 @@ pub fn send_touch(
|
|||||||
mouse_event.x *= factor;
|
mouse_event.x *= factor;
|
||||||
mouse_event.y *= factor;
|
mouse_event.y *= factor;
|
||||||
}
|
}
|
||||||
msg_out.set_pointer_device_event(PointerDeviceEvent {
|
msg_out.set_pointer_device_event(evt);
|
||||||
union: Some(pointer_device_event::Union::TouchEvent(evt)),
|
|
||||||
..Default::default()
|
|
||||||
});
|
|
||||||
interface.send(Data::Message(msg_out));
|
interface.send(Data::Message(msg_out));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -35,8 +35,8 @@ use hbb_common::{
|
|||||||
use crate::client::io_loop::Remote;
|
use crate::client::io_loop::Remote;
|
||||||
use crate::client::{
|
use crate::client::{
|
||||||
check_if_retry, handle_hash, handle_login_error, handle_login_from_ui, handle_test_delay,
|
check_if_retry, handle_hash, handle_login_error, handle_login_from_ui, handle_test_delay,
|
||||||
input_os_password, load_config, send_mouse, send_touch, start_video_audio_threads, FileManager,
|
input_os_password, load_config, send_mouse, send_pointer_device_event,
|
||||||
Key, LoginConfigHandler, QualityStatus, KEY_MAP,
|
start_video_audio_threads, FileManager, Key, LoginConfigHandler, QualityStatus, KEY_MAP,
|
||||||
};
|
};
|
||||||
#[cfg(not(any(target_os = "android", target_os = "ios")))]
|
#[cfg(not(any(target_os = "android", target_os = "ios")))]
|
||||||
use crate::common::GrabState;
|
use crate::common::GrabState;
|
||||||
@ -695,11 +695,11 @@ impl<T: InvokeUiSession> Session<T> {
|
|||||||
scale,
|
scale,
|
||||||
..Default::default()
|
..Default::default()
|
||||||
};
|
};
|
||||||
let evt = TouchEvent {
|
let mut touch_evt = TouchEvent::new();
|
||||||
union: Some(touch_event::Union::ScaleUpdate(scale_evt)),
|
touch_evt.set_scale_update(scale_evt);
|
||||||
..Default::default()
|
let mut evt = PointerDeviceEvent::new();
|
||||||
};
|
evt.set_touch_event(touch_evt);
|
||||||
send_touch(evt, alt, ctrl, shift, command, self);
|
send_pointer_device_event(evt, alt, ctrl, shift, command, self);
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn send_mouse(
|
pub fn send_mouse(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user