1
0
Fork 0
forked from wry/wry

metal: latch hardware cursors in the backend

This commit is contained in:
Julian Orth 2024-09-09 17:02:09 +02:00
parent 12c9b36ded
commit 93bfb9c0b4
7 changed files with 204 additions and 186 deletions

View file

@ -135,17 +135,19 @@ pub enum ConnectorEvent {
FormatsChanged(Rc<Vec<&'static Format>>, &'static Format),
}
pub trait HardwareCursor: Debug {
fn set_enabled(&self, enabled: bool);
pub trait HardwareCursorUpdate {
fn set_enabled(&mut self, enabled: bool);
fn get_buffer(&self) -> Rc<dyn GfxFramebuffer>;
fn set_position(&self, x: i32, y: i32);
fn swap_buffer(&self);
fn set_sync_file(&self, sync_file: Option<SyncFile>);
fn commit(&self, schedule_present: bool);
fn schedule_present(&self) -> bool;
fn set_position(&mut self, x: i32, y: i32);
fn swap_buffer(&mut self);
fn set_sync_file(&mut self, sync_file: Option<SyncFile>);
fn size(&self) -> (i32, i32);
}
pub trait HardwareCursor: Debug {
fn damage(&self);
}
pub type TransformMatrix = [[f64; 2]; 2];
linear_ids!(InputDeviceGroupIds, InputDeviceGroupId, usize);