1
0
Fork 0
forked from wry/wry

it: test wlr-data-control

This commit is contained in:
Julian Orth 2024-04-03 13:47:07 +02:00
parent fd056c5361
commit 5c80d940af
11 changed files with 437 additions and 2 deletions

View file

@ -7,6 +7,7 @@ use {
test_ifs::{
test_compositor::TestCompositor, test_content_type_manager::TestContentTypeManager,
test_cursor_shape_manager::TestCursorShapeManager,
test_data_control_manager::TestDataControlManager,
test_data_device_manager::TestDataDeviceManager,
test_ext_foreign_toplevel_list::TestExtForeignToplevelList,
test_jay_compositor::TestJayCompositor, test_shm::TestShm,
@ -45,6 +46,7 @@ pub struct TestRegistrySingletons {
pub wp_cursor_shape_manager_v1: u32,
pub wp_linux_drm_syncobj_manager_v1: u32,
pub wp_content_type_manager_v1: u32,
pub zwlr_data_control_manager_v1: u32,
}
pub struct TestRegistry {
@ -65,6 +67,7 @@ pub struct TestRegistry {
pub cursor_shape_manager: CloneCell<Option<Rc<TestCursorShapeManager>>>,
pub syncobj_manager: CloneCell<Option<Rc<TestSyncobjManager>>>,
pub content_type_manager: CloneCell<Option<Rc<TestContentTypeManager>>>,
pub data_control_manager: CloneCell<Option<Rc<TestDataControlManager>>>,
pub seats: CopyHashMap<GlobalName, Rc<WlSeatGlobal>>,
}
@ -129,6 +132,7 @@ impl TestRegistry {
wp_cursor_shape_manager_v1,
wp_linux_drm_syncobj_manager_v1,
wp_content_type_manager_v1,
zwlr_data_control_manager_v1,
};
self.singletons.set(Some(singletons.clone()));
Ok(singletons)
@ -201,6 +205,13 @@ impl TestRegistry {
1,
TestContentTypeManager
);
create_singleton!(
get_data_control_manager,
data_control_manager,
zwlr_data_control_manager_v1,
2,
TestDataControlManager
);
pub fn bind<O: TestObject>(
&self,