1
0
Fork 0
forked from wry/wry

it: test content type protocol

This commit is contained in:
Julian Orth 2024-04-02 21:25:49 +02:00
parent 3b0757ee53
commit fd056c5361
8 changed files with 149 additions and 2 deletions

View file

@ -5,7 +5,8 @@ use {
it::{
test_error::TestError,
test_ifs::{
test_compositor::TestCompositor, test_cursor_shape_manager::TestCursorShapeManager,
test_compositor::TestCompositor, test_content_type_manager::TestContentTypeManager,
test_cursor_shape_manager::TestCursorShapeManager,
test_data_device_manager::TestDataDeviceManager,
test_ext_foreign_toplevel_list::TestExtForeignToplevelList,
test_jay_compositor::TestJayCompositor, test_shm::TestShm,
@ -43,6 +44,7 @@ pub struct TestRegistrySingletons {
pub wl_data_device_manager: u32,
pub wp_cursor_shape_manager_v1: u32,
pub wp_linux_drm_syncobj_manager_v1: u32,
pub wp_content_type_manager_v1: u32,
}
pub struct TestRegistry {
@ -62,6 +64,7 @@ pub struct TestRegistry {
pub data_device_manager: CloneCell<Option<Rc<TestDataDeviceManager>>>,
pub cursor_shape_manager: CloneCell<Option<Rc<TestCursorShapeManager>>>,
pub syncobj_manager: CloneCell<Option<Rc<TestSyncobjManager>>>,
pub content_type_manager: CloneCell<Option<Rc<TestContentTypeManager>>>,
pub seats: CopyHashMap<GlobalName, Rc<WlSeatGlobal>>,
}
@ -125,6 +128,7 @@ impl TestRegistry {
wl_data_device_manager,
wp_cursor_shape_manager_v1,
wp_linux_drm_syncobj_manager_v1,
wp_content_type_manager_v1,
};
self.singletons.set(Some(singletons.clone()));
Ok(singletons)
@ -190,6 +194,13 @@ impl TestRegistry {
1,
TestSyncobjManager
);
create_singleton!(
get_content_type_manager,
content_type_manager,
wp_content_type_manager_v1,
1,
TestContentTypeManager
);
pub fn bind<O: TestObject>(
&self,