| 1 | // Copyright (C) 2024 The Qt Company Ltd. |
| 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only |
| 3 | |
| 4 | #ifndef QWAYLANDXDGDIALOGV1_P_H |
| 5 | #define QWAYLANDXDGDIALOGV1_P_H |
| 6 | #include "qwaylandxdgshell.h" |
| 7 | #include <QtWaylandCompositor/QWaylandCompositorExtensionTemplate> |
| 8 | #include <QtWaylandCompositor/private/qwaylandcompositorextension_p.h> |
| 9 | #include <QtWaylandCompositor/private/qwayland-server-xdg-dialog-v1.h> |
| 10 | |
| 11 | // |
| 12 | // W A R N I N G |
| 13 | // ------------- |
| 14 | // |
| 15 | // This file is not part of the Qt API. It exists purely as an |
| 16 | // implementation detail. This header file may change from version to |
| 17 | // version without notice, or even be removed. |
| 18 | // |
| 19 | // We mean it. |
| 20 | // |
| 21 | |
| 22 | QT_BEGIN_NAMESPACE |
| 23 | |
| 24 | class Q_WAYLANDCOMPOSITOR_EXPORT QWaylandXdgDialogV1Global |
| 25 | : public QWaylandCompositorExtensionTemplate<QWaylandXdgDialogV1Global> |
| 26 | , public QtWaylandServer::xdg_wm_dialog_v1 |
| 27 | { |
| 28 | Q_OBJECT |
| 29 | public: |
| 30 | QWaylandXdgDialogV1Global(QWaylandCompositor *parent = nullptr); |
| 31 | |
| 32 | void initialize() override; |
| 33 | |
| 34 | protected: |
| 35 | void xdg_wm_dialog_v1_get_xdg_dialog(Resource *resource, uint32_t id, wl_resource *toplevelResource) override; |
| 36 | }; |
| 37 | |
| 38 | class Q_WAYLANDCOMPOSITOR_EXPORT QWaylandXdgDialogV1 |
| 39 | : public QtWaylandServer::xdg_dialog_v1 |
| 40 | { |
| 41 | public: |
| 42 | QWaylandXdgDialogV1(QWaylandXdgToplevel *toplevel, wl_client *client, int id); |
| 43 | |
| 44 | protected: |
| 45 | void xdg_dialog_v1_destroy_resource(Resource *resource) override; |
| 46 | void xdg_dialog_v1_destroy(Resource *resource) override; |
| 47 | |
| 48 | void xdg_dialog_v1_set_modal(Resource *resource) override; |
| 49 | void xdg_dialog_v1_unset_modal(Resource *resource) override; |
| 50 | |
| 51 | private: |
| 52 | QPointer<QWaylandXdgToplevel> m_topLevel; |
| 53 | }; |
| 54 | |
| 55 | QT_END_NAMESPACE |
| 56 | |
| 57 | #endif |
| 58 | |