seat: implement input methods
This commit is contained in:
parent
5e2cdef388
commit
daf52299db
44 changed files with 2165 additions and 75 deletions
34
src/it/test_ifs/test_input_popup_surface.rs
Normal file
34
src/it/test_ifs/test_input_popup_surface.rs
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
use {
|
||||
crate::{
|
||||
it::{test_error::TestError, test_object::TestObject, test_transport::TestTransport},
|
||||
wire::{zwp_input_popup_surface_v2::*, ZwpInputPopupSurfaceV2Id},
|
||||
},
|
||||
std::{cell::Cell, rc::Rc},
|
||||
};
|
||||
|
||||
pub struct TestInputPopupSurface {
|
||||
pub id: ZwpInputPopupSurfaceV2Id,
|
||||
pub tran: Rc<TestTransport>,
|
||||
pub destroyed: Cell<bool>,
|
||||
}
|
||||
|
||||
impl TestInputPopupSurface {
|
||||
pub fn destroy(&self) -> Result<(), TestError> {
|
||||
if !self.destroyed.replace(true) {
|
||||
self.tran.send(Destroy { self_id: self.id })?;
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
impl Drop for TestInputPopupSurface {
|
||||
fn drop(&mut self) {
|
||||
let _ = self.destroy();
|
||||
}
|
||||
}
|
||||
|
||||
test_object! {
|
||||
TestInputPopupSurface, ZwpInputPopupSurfaceV2;
|
||||
}
|
||||
|
||||
impl TestObject for TestInputPopupSurface {}
|
||||
Loading…
Add table
Add a link
Reference in a new issue