File indexing completed on 2024-05-19 16:35:16
0001 /* 0002 SPDX-FileCopyrightText: 2022 Xaver Hugl <xaver.hugl@gmail.com> 0003 0004 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0005 */ 0006 #pragma once 0007 0008 #include "surface_interface.h" 0009 0010 #include "qwayland-server-content-type-v1.h" 0011 0012 namespace KWaylandServer 0013 { 0014 0015 class ContentTypeV1Interface; 0016 class Display; 0017 0018 class ContentTypeManagerV1Interface : public QObject, private QtWaylandServer::wp_content_type_manager_v1 0019 { 0020 public: 0021 ContentTypeManagerV1Interface(Display *display, QObject *parent = nullptr); 0022 0023 private: 0024 void wp_content_type_manager_v1_destroy(QtWaylandServer::wp_content_type_manager_v1::Resource *resource) override; 0025 void wp_content_type_manager_v1_get_surface_content_type(Resource *resource, uint32_t id, struct ::wl_resource *surface) override; 0026 }; 0027 0028 class ContentTypeV1Interface : public QObject, private QtWaylandServer::wp_content_type_v1 0029 { 0030 Q_OBJECT 0031 public: 0032 ContentTypeV1Interface(SurfaceInterface *surface, wl_client *client, uint32_t id); 0033 0034 private: 0035 void wp_content_type_v1_set_content_type(QtWaylandServer::wp_content_type_v1::Resource *resource, uint32_t content_type) override; 0036 void wp_content_type_v1_destroy(QtWaylandServer::wp_content_type_v1::Resource *resource) override; 0037 void wp_content_type_v1_destroy_resource(QtWaylandServer::wp_content_type_v1::Resource *resource) override; 0038 0039 const QPointer<SurfaceInterface> m_surface; 0040 }; 0041 0042 }