Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qwaylandxdgdecorationv1_p.h
Go to the documentation of this file.
1// Copyright (C) 2018 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4#ifndef QWAYLANDXDGDECORATIONV1_P_H
5#define QWAYLANDXDGDECORATIONV1_P_H
6
8
9#include <QtWaylandCompositor/private/qwaylandcompositorextension_p.h>
10#include <QtWaylandCompositor/private/qwayland-server-xdg-decoration-unstable-v1.h>
11
12#include <QtWaylandCompositor/QWaylandXdgToplevel>
13
14//
15// W A R N I N G
16// -------------
17//
18// This file is not part of the Qt API. It exists purely as an
19// implementation detail. This header file may change from version to
20// version without notice, or even be removed.
21//
22// We mean it.
23//
24
26
28
29class Q_WAYLANDCOMPOSITOR_EXPORT QWaylandXdgDecorationManagerV1Private
31 , public QtWaylandServer::zxdg_decoration_manager_v1
32{
33 Q_DECLARE_PUBLIC(QWaylandXdgDecorationManagerV1)
34public:
37
38protected:
39 void zxdg_decoration_manager_v1_get_toplevel_decoration(Resource *resource, uint id, ::wl_resource *toplevelResource) override;
40
41private:
42 DecorationMode m_preferredMode = DecorationMode::ClientSideDecoration;
43};
44
45class Q_WAYLANDCOMPOSITOR_EXPORT QWaylandXdgToplevelDecorationV1
46 : public QtWaylandServer::zxdg_toplevel_decoration_v1
47{
48public:
52 wl_client *client, int id);
54
55 DecorationMode configuredMode() const { return DecorationMode(m_configuredMode); }
56 void sendConfigure(DecorationMode mode);
57
58protected:
59 void zxdg_toplevel_decoration_v1_destroy_resource(Resource *resource) override;
60 void zxdg_toplevel_decoration_v1_destroy(Resource *resource) override;
61 void zxdg_toplevel_decoration_v1_set_mode(Resource *resource, uint32_t mode) override;
62 void zxdg_toplevel_decoration_v1_unset_mode(Resource *resource) override;
63
64private:
65 void handleClientPreferredModeChanged();
66
67 QWaylandXdgToplevel *m_toplevel = nullptr;
68 QWaylandXdgDecorationManagerV1 *m_manager = nullptr;
69 uint m_configuredMode = 0;
70 uint m_clientPreferredMode = 0;
71};
72
74
75#endif // QWAYLANDXDGDECORATIONV1_P_H
\inmodule QtWaylandCompositor
\qmltype XdgToplevel \instantiates QWaylandXdgToplevel \inqmlmodule QtWayland.Compositor....
DecorationMode
This enum type is used to specify the window decoration mode for toplevel windows.
Combined button and popup list for selecting options.
GLenum mode
unsigned int uint
Definition qtypes.h:34
QNetworkAccessManager manager