wl_usr: add additional interfaces
This commit is contained in:
parent
56290d5547
commit
ce30901093
16 changed files with 1062 additions and 23 deletions
|
|
@ -3,7 +3,11 @@ use {
|
|||
object::Version,
|
||||
utils::clonecell::CloneCell,
|
||||
wire::{WlSeatId, wl_seat::*},
|
||||
wl_usr::{UsrCon, usr_ifs::usr_wl_pointer::UsrWlPointer, usr_object::UsrObject},
|
||||
wl_usr::{
|
||||
UsrCon,
|
||||
usr_ifs::{usr_wl_keyboard::UsrWlKeyboard, usr_wl_pointer::UsrWlPointer},
|
||||
usr_object::UsrObject,
|
||||
},
|
||||
},
|
||||
std::{cell::Cell, convert::Infallible, rc::Rc},
|
||||
};
|
||||
|
|
@ -42,6 +46,23 @@ impl UsrWlSeat {
|
|||
});
|
||||
ptr
|
||||
}
|
||||
|
||||
#[expect(dead_code)]
|
||||
pub fn get_keyboard(&self) -> Rc<UsrWlKeyboard> {
|
||||
let kb = Rc::new(UsrWlKeyboard {
|
||||
id: self.con.id(),
|
||||
con: self.con.clone(),
|
||||
keyboard: Default::default(),
|
||||
owner: Default::default(),
|
||||
version: self.version,
|
||||
});
|
||||
self.con.add_object(kb.clone());
|
||||
self.con.request(GetKeyboard {
|
||||
self_id: self.id,
|
||||
id: kb.id,
|
||||
});
|
||||
kb
|
||||
}
|
||||
}
|
||||
|
||||
impl WlSeatEventHandler for UsrWlSeat {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue