14static constexpr uint32_t s_version = 1;
18 using Type = QtWaylandServer::wp_content_type_v1::type;
20 case Type::type_photo:
22 case Type::type_video:
33 , QtWaylandServer::wp_content_type_manager_v1(*display, s_version)
37void ContentTypeManagerV1Interface::wp_content_type_manager_v1_destroy(Resource *resource)
39 wl_resource_destroy(resource->handle);
42void ContentTypeManagerV1Interface::wp_content_type_manager_v1_get_surface_content_type(Resource *resource, uint32_t
id, struct ::wl_resource *wlSurface)
46 if (surfacePrivate->contentTypeInterface) {
47 wl_resource_post_error(resource->handle, error_already_constructed,
"Surface already has a wp_content_type_v1");
50 surfacePrivate->contentTypeInterface =
new ContentTypeV1Interface(surface, resource->client(),
id);
54 : QtWaylandServer::wp_content_type_v1(client, id, s_version)
59void ContentTypeV1Interface::wp_content_type_v1_set_content_type(Resource *, uint32_t content_type)
65 surfacePrivate->pending->contentType = waylandToKwinContentType(content_type);
66 surfacePrivate->pending->contentTypeIsSet =
true;
69void ContentTypeV1Interface::wp_content_type_v1_destroy(Resource *resource)
74 surfacePrivate->pending->contentTypeIsSet =
true;
76 wl_resource_destroy(resource->handle);
79void ContentTypeV1Interface::wp_content_type_v1_destroy_resource(Resource *)
86#include "moc_contenttype_v1.cpp"
ContentTypeManagerV1Interface(Display *display, QObject *parent=nullptr)
ContentTypeV1Interface(SurfaceInterface *surface, wl_client *client, uint32_t id)
Class holding the Wayland server display loop.
Resource representing a wl_surface.
static SurfaceInterface * get(wl_resource *native)
static SurfaceInterfacePrivate * get(SurfaceInterface *surface)