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
qwaylandwlshellsurface_p.h
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QWAYLANDWLSHELLSURFACE_H
5#define QWAYLANDWLSHELLSURFACE_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <QtCore/QSize>
19
20#include <QtWaylandClient/qtwaylandclientglobal.h>
21#include <QtWaylandClient/private/qwayland-wayland.h>
22#include <QtWaylandClient/private/qwaylandshellsurface_p.h>
23
25
26class QWindow;
27
28namespace QtWaylandClient {
29
30class QWaylandWindow;
31class QWaylandInputDevice;
32class QWaylandExtendedSurface;
33
34class Q_WAYLANDCLIENT_EXPORT QWaylandWlShellSurface : public QWaylandShellSurface
35 , public QtWayland::wl_shell_surface
36{
38public:
39 QWaylandWlShellSurface(struct ::wl_shell_surface *shell_surface, QWaylandWindow *window);
40 ~QWaylandWlShellSurface() override;
41
42 using QtWayland::wl_shell_surface::resize;
43 bool resize(QWaylandInputDevice *inputDevice, Qt::Edges edges) override;
44
45 using QtWayland::wl_shell_surface::move;
46 bool move(QWaylandInputDevice *inputDevice) override;
47
48 void setTitle(const QString & title) override;
49 void setAppId(const QString &appId) override;
50
51 void raise() override;
52 void lower() override;
53 void setContentOrientationMask(Qt::ScreenOrientations orientation) override;
54 void setWindowFlags(Qt::WindowFlags flags) override;
55 void sendProperty(const QString &name, const QVariant &value) override;
56
57 void applyConfigure() override;
58 bool wantsDecorations() const override;
59
60 std::any surfaceRole() const override { return object(); };
61
62protected:
63 void requestWindowStates(Qt::WindowStates states) override;
64
65private:
66 static enum resize convertToResizeEdges(Qt::Edges edges);
67 void setTopLevel();
68 void updateTransientParent(QWindow *parent);
69 void setPopup(QWaylandWindow *parent, QWaylandInputDevice *device, uint serial);
70
71 QWaylandWindow *m_window = nullptr;
72 struct {
73 Qt::WindowStates states = Qt::WindowNoState;
75 enum resize edges = resize_none;
76 } m_applied, m_pending;
77 QSize m_normalSize;
78 // There's really no need to have pending and applied state on wl-shell, but we do it just to
79 // keep the different shell implementations more similar.
80 QWaylandExtendedSurface *m_extendedWindow = nullptr;
81
82 void shell_surface_ping(uint32_t serial) override;
83 void shell_surface_configure(uint32_t edges,
84 int32_t width,
85 int32_t height) override;
86 void shell_surface_popup_done() override;
87
88 friend class QWaylandWindow;
89};
90
92
93}
94
95#endif // QWAYLANDSHELLSURFACE_H
IOBluetoothDevice * device
\inmodule QtCore
Definition qsize.h:25
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
\inmodule QtCore
Definition qvariant.h:65
\inmodule QtGui
Definition qwindow.h:63
a resize(100000)
Combined button and popup list for selecting options.
@ WindowNoState
Definition qnamespace.h:252
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
GLint GLsizei GLsizei height
GLuint object
[3]
GLint GLsizei width
GLbitfield flags
GLuint name
GLuint * states
#define Q_OBJECT
unsigned int uint
Definition qtypes.h:34
QString title
[35]
aWidget window() -> setWindowTitle("New Window Title")
[2]
g setTitle("&User information")
[0]