DashInterface, DashInterfaceEmulated

This commit is contained in:
Aleksander
2025-12-10 22:11:57 +01:00
parent 171021d6c5
commit 7118cea810
11 changed files with 392 additions and 3 deletions

View File

@@ -0,0 +1,25 @@
use wayvr_ipc::{
packet_client::{WvrDisplayCreateParams, WvrProcessLaunchParams},
packet_server::{
WvrDisplay, WvrDisplayHandle, WvrDisplayWindowLayout, WvrProcess, WvrProcessHandle, WvrWindow, WvrWindowHandle,
},
};
pub trait DashInterface {
fn display_create(&mut self, params: WvrDisplayCreateParams) -> anyhow::Result<WvrDisplayHandle>;
fn display_get(&mut self, handle: WvrDisplayHandle) -> Option<WvrDisplay>;
fn display_list(&mut self) -> anyhow::Result<Vec<WvrDisplay>>;
fn display_remove(&mut self, handle: WvrDisplayHandle) -> anyhow::Result<()>;
fn display_set_visible(&mut self, handle: WvrDisplayHandle, visible: bool) -> anyhow::Result<()>;
fn display_set_window_layout(
&mut self,
handle: WvrDisplayHandle,
layout: WvrDisplayWindowLayout,
) -> anyhow::Result<()>;
fn display_window_list(&mut self, handle: WvrDisplayHandle) -> anyhow::Result<Vec<WvrWindow>>;
fn process_get(&mut self, handle: WvrProcessHandle) -> Option<WvrProcess>;
fn process_launch(&mut self, params: WvrProcessLaunchParams) -> anyhow::Result<WvrProcessHandle>;
fn process_list(&mut self) -> anyhow::Result<Vec<WvrProcess>>;
fn process_terminate(&mut self, handle: WvrProcessHandle) -> anyhow::Result<()>;
fn window_set_visible(&mut self, handle: WvrWindowHandle, visible: bool) -> anyhow::Result<()>;
}