wayland: implement wl-fixes
This commit is contained in:
parent
f36993eb6e
commit
b13dd08991
14 changed files with 183 additions and 3 deletions
38
src/it/test_ifs/test_wl_fixes.rs
Normal file
38
src/it/test_ifs/test_wl_fixes.rs
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
use {
|
||||
crate::{
|
||||
it::{
|
||||
test_error::TestResult, test_ifs::test_registry::TestRegistry, test_object::TestObject,
|
||||
test_transport::TestTransport,
|
||||
},
|
||||
wire::{wl_fixes::*, WlFixesId},
|
||||
},
|
||||
std::rc::Rc,
|
||||
};
|
||||
|
||||
pub struct TestWlFixes {
|
||||
pub id: WlFixesId,
|
||||
pub tran: Rc<TestTransport>,
|
||||
}
|
||||
|
||||
impl TestWlFixes {
|
||||
pub fn new(tran: &Rc<TestTransport>) -> Self {
|
||||
Self {
|
||||
id: tran.id(),
|
||||
tran: tran.clone(),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn destroy_registry(&self, registry: &TestRegistry) -> TestResult {
|
||||
self.tran.send(DestroyRegistry {
|
||||
self_id: self.id,
|
||||
registry: registry.id,
|
||||
})?;
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
test_object! {
|
||||
TestWlFixes, WlFixes;
|
||||
}
|
||||
|
||||
impl TestObject for TestWlFixes {}
|
||||
Loading…
Add table
Add a link
Reference in a new issue