wayland: add a generic wayland client
This commit is contained in:
parent
163adbd893
commit
2512470231
34 changed files with 2627 additions and 1 deletions
32
src/wl_usr/usr_ifs/usr_jay_pointer.rs
Normal file
32
src/wl_usr/usr_ifs/usr_jay_pointer.rs
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
use {
|
||||
crate::{
|
||||
cursor::KnownCursor,
|
||||
wire::{jay_pointer::*, JayPointerId},
|
||||
wl_usr::{usr_object::UsrObject, UsrCon},
|
||||
},
|
||||
std::rc::Rc,
|
||||
};
|
||||
|
||||
pub struct UsrJayPointer {
|
||||
pub id: JayPointerId,
|
||||
pub con: Rc<UsrCon>,
|
||||
}
|
||||
|
||||
impl UsrJayPointer {
|
||||
pub fn set_known_cursor(&self, cursor: KnownCursor) {
|
||||
self.con.request(SetKnownCursor {
|
||||
self_id: self.id,
|
||||
idx: cursor as usize as _,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
usr_object_base! {
|
||||
UsrJayPointer, JayPointer;
|
||||
}
|
||||
|
||||
impl UsrObject for UsrJayPointer {
|
||||
fn destroy(&self) {
|
||||
self.con.request(Destroy { self_id: self.id });
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue