mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-03-11 15:21:01 +03:00
feat, win virtual display
Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
@@ -237,11 +237,19 @@ impl<T: InvokeUiSession> Session<T> {
|
||||
}
|
||||
|
||||
pub fn get_displays_as_individual_windows(&self) -> String {
|
||||
self.lc.read().unwrap().displays_as_individual_windows.clone()
|
||||
self.lc
|
||||
.read()
|
||||
.unwrap()
|
||||
.displays_as_individual_windows
|
||||
.clone()
|
||||
}
|
||||
|
||||
pub fn get_use_all_my_displays_for_the_remote_session(&self) -> String {
|
||||
self.lc.read().unwrap().use_all_my_displays_for_the_remote_session.clone()
|
||||
self.lc
|
||||
.read()
|
||||
.unwrap()
|
||||
.use_all_my_displays_for_the_remote_session
|
||||
.clone()
|
||||
}
|
||||
|
||||
pub fn save_reverse_mouse_wheel(&self, value: String) {
|
||||
@@ -249,11 +257,17 @@ impl<T: InvokeUiSession> Session<T> {
|
||||
}
|
||||
|
||||
pub fn save_displays_as_individual_windows(&self, value: String) {
|
||||
self.lc.write().unwrap().save_displays_as_individual_windows(value);
|
||||
self.lc
|
||||
.write()
|
||||
.unwrap()
|
||||
.save_displays_as_individual_windows(value);
|
||||
}
|
||||
|
||||
pub fn save_use_all_my_displays_for_the_remote_session(&self, value: String) {
|
||||
self.lc.write().unwrap().save_use_all_my_displays_for_the_remote_session(value);
|
||||
self.lc
|
||||
.write()
|
||||
.unwrap()
|
||||
.save_use_all_my_displays_for_the_remote_session(value);
|
||||
}
|
||||
|
||||
pub fn save_view_style(&self, value: String) {
|
||||
@@ -310,6 +324,18 @@ impl<T: InvokeUiSession> Session<T> {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn toggle_virtual_display(&self, index: i32, on: bool) {
|
||||
let mut misc = Misc::new();
|
||||
misc.set_toggle_virtual_display(ToggleVirtualDisplay {
|
||||
display: index,
|
||||
on,
|
||||
..Default::default()
|
||||
});
|
||||
let mut msg_out = Message::new();
|
||||
msg_out.set_misc(misc);
|
||||
self.send(Data::Message(msg_out));
|
||||
}
|
||||
|
||||
#[cfg(not(feature = "flutter"))]
|
||||
pub fn refresh_video(&self, _display: i32) {
|
||||
self.send(Data::Message(LoginConfigHandler::refresh()));
|
||||
@@ -1175,6 +1201,7 @@ pub trait InvokeUiSession: Send + Sync + Clone + 'static + Sized + Default {
|
||||
fn switch_display(&self, display: &SwitchDisplay);
|
||||
fn set_peer_info(&self, peer_info: &PeerInfo); // flutter
|
||||
fn set_displays(&self, displays: &Vec<DisplayInfo>);
|
||||
fn set_platform_additions(&self, data: &str);
|
||||
fn on_connected(&self, conn_type: ConnType);
|
||||
fn update_privacy_mode(&self);
|
||||
fn set_permission(&self, name: &str, value: bool);
|
||||
|
||||
Reference in New Issue
Block a user