KWin
Loading...
Searching...
No Matches
contenttype_v1.h
Go to the documentation of this file.
1/*
2 SPDX-FileCopyrightText: 2022 Xaver Hugl <xaver.hugl@gmail.com>
3
4 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
5*/
6#pragma once
7
8#include "surface.h"
9
10#include "wayland/qwayland-server-content-type-v1.h"
11
12#include <QPointer>
13
14namespace KWin
15{
16
17class ContentTypeV1Interface;
18class Display;
19
20class ContentTypeManagerV1Interface : public QObject, private QtWaylandServer::wp_content_type_manager_v1
21{
22public:
23 ContentTypeManagerV1Interface(Display *display, QObject *parent = nullptr);
24
25private:
26 void wp_content_type_manager_v1_destroy(QtWaylandServer::wp_content_type_manager_v1::Resource *resource) override;
27 void wp_content_type_manager_v1_get_surface_content_type(Resource *resource, uint32_t id, struct ::wl_resource *surface) override;
28};
29
30class ContentTypeV1Interface : public QObject, private QtWaylandServer::wp_content_type_v1
31{
32 Q_OBJECT
33public:
34 ContentTypeV1Interface(SurfaceInterface *surface, wl_client *client, uint32_t id);
35
36private:
37 void wp_content_type_v1_set_content_type(QtWaylandServer::wp_content_type_v1::Resource *resource, uint32_t content_type) override;
38 void wp_content_type_v1_destroy(QtWaylandServer::wp_content_type_v1::Resource *resource) override;
39 void wp_content_type_v1_destroy_resource(QtWaylandServer::wp_content_type_v1::Resource *resource) override;
40
41 const QPointer<SurfaceInterface> m_surface;
42};
43
44}
ContentTypeManagerV1Interface(Display *display, QObject *parent=nullptr)
ContentTypeV1Interface(SurfaceInterface *surface, wl_client *client, uint32_t id)
Class holding the Wayland server display loop.
Definition display.h:34
Resource representing a wl_surface.
Definition surface.h:80
struct _XDisplay Display