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
qwaylandqtshell_p.h
Go to the documentation of this file.
1// Copyright (C) 2021 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4#ifndef QWAYLANDQTSHELL_P_H
5#define QWAYLANDQTSHELL_P_H
6
7#include <QtWaylandCompositor/private/qwaylandshellsurface_p.h>
8#include <QtWaylandCompositor/QWaylandSurfaceRole>
9
10#include <QHash>
11
12#include "qwayland-server-qt-shell-unstable-v1.h"
13#include "qwaylandqtshell.h"
14
15//
16// W A R N I N G
17// -------------
18//
19// This file is not part of the Qt API. It exists purely as an
20// implementation detail. This header file may change from version to
21// version without notice, or even be removed.
22//
23// We mean it.
24//
25
27
28class Q_WAYLANDCOMPOSITOR_EXPORT QWaylandQtShellPrivate
30 , public QtWaylandServer::zqt_shell_v1
31{
32 Q_DECLARE_PUBLIC(QWaylandQtShell)
33
34public:
36 static QWaylandQtShellPrivate *get(QWaylandQtShell *qtShell) { return qtShell->d_func(); }
37 void unregisterQtShellSurface(QWaylandQtShellSurface *qtShellSurface);
38
39 QList<QWaylandQtShellChrome *> m_chromes;
40
41protected:
42 void zqt_shell_v1_surface_create(Resource *resource, wl_resource *surface, uint32_t id) override;
43};
44
45class Q_WAYLANDCOMPOSITOR_EXPORT QWaylandQtShellSurfacePrivate
47 , public QtWaylandServer::zqt_shell_surface_v1
48{
49 Q_DECLARE_PUBLIC(QWaylandQtShellSurface)
50
51public:
54 {
55 return qtShellSurface->d_func();
56 }
57
58 void updateFrameMargins();
59 void configure(uint windowState, const QRect &newGeometry);
60
61protected:
62 void zqt_shell_surface_v1_destroy_resource(Resource *resource) override;
63 void zqt_shell_surface_v1_destroy(Resource *resource) override;
64 void zqt_shell_surface_v1_reposition(Resource *resource, int32_t x, int32_t y) override;
65 void zqt_shell_surface_v1_set_size(Resource *resource, int32_t width, int32_t height) override;
66 void zqt_shell_surface_v1_set_minimum_size(Resource *resource, int32_t width, int32_t height) override;
67 void zqt_shell_surface_v1_set_maximum_size(Resource *resource, int32_t width, int32_t height) override;
68 void zqt_shell_surface_v1_set_window_title(Resource *resource, const QString &title) override;
69 void zqt_shell_surface_v1_set_window_flags(Resource *resource, uint32_t flags) override;
70 void zqt_shell_surface_v1_change_window_state(Resource *resource, uint32_t state) override;
71 void zqt_shell_surface_v1_ack_configure(Resource *resource, uint32_t serial) override;
72
73 void zqt_shell_surface_v1_start_system_resize(Resource *resource, uint32_t serial, uint32_t edge) override;
74 void zqt_shell_surface_v1_start_system_move(Resource *resource, uint32_t serial) override;
75
76 void zqt_shell_surface_v1_raise(Resource *resource) override;
77 void zqt_shell_surface_v1_lower(Resource *resource) override;
78
79 void zqt_shell_surface_v1_request_activate(Resource *resource) override;
80
81private:
82 QWaylandQtShell *m_qtShell = nullptr;
83 QWaylandSurface *m_surface = nullptr;
84 QRect m_windowGeometry;
85 QSize m_minimumSize;
86 QSize m_maximumSize;
87 uint m_windowFlags = 0;
88 uint m_windowState = 0;
89 QString m_windowTitle;
90 QMargins m_frameMargins;
91 bool m_positionSet = false;
92 bool m_active = false;
93
94 QPoint m_pendingPosition;
95 bool m_pendingPositionValid = false;
96 QSize m_pendingSize;
97
98 uint32_t m_lastAckedConfigure = UINT32_MAX;
99 QMap<uint32_t, QPair<uint, QRect> > m_pendingConfigures;
100
101 QWaylandQtShellSurface::CapabilityFlags m_capabilities;
102
103 static QWaylandSurfaceRole s_role;
104};
105
107
108#endif // QWAYLANDQTSHELL_P_H
bool m_active
\inmodule QtCore
Definition qmargins.h:24
\inmodule QtCore\reentrant
Definition qpoint.h:25
\inmodule QtCore\reentrant
Definition qrect.h:30
\inmodule QtCore
Definition qsize.h:25
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
static QWaylandQtShellPrivate * get(QWaylandQtShell *qtShell)
QList< QWaylandQtShellChrome * > m_chromes
static QWaylandQtShellSurfacePrivate * get(QWaylandQtShellSurface *qtShellSurface)
\inmodule QtWaylandCompositor
\qmltype WaylandSurface \instantiates QWaylandSurface \inqmlmodule QtWayland.Compositor
else opt state
[0]
Combined button and popup list for selecting options.
GLint GLint GLint GLint GLint x
[0]
GLint GLsizei GLsizei height
GLint GLsizei width
GLbitfield flags
GLint y
unsigned int uint
Definition qtypes.h:34
QString title
[35]