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
qwaylandqtsurface_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 LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QWAYLANDQTSURFACE_H
5#define QWAYLANDQTSURFACE_H
6
7#include <QtCore/qpoint.h>
8#include <QtWaylandClient/private/qwaylandshellsurface_p.h>
9#include "qwayland-qt-shell-unstable-v1.h"
10
12
13namespace QtWaylandClient {
14
15class QWaylandWindow;
16class QWaylandInputDevice;
17
18class Q_WAYLANDCLIENT_EXPORT QWaylandQtSurface : public QWaylandShellSurface
19 , public QtWayland::zqt_shell_surface_v1
20{
21public:
22 QWaylandQtSurface(struct ::zqt_shell_surface_v1 *shell_surface, QWaylandWindow *window);
23 ~QWaylandQtSurface() override;
24
25 void applyConfigure() override;
26 void setWindowGeometry(const QRect &rect) override;
27 void setWindowPosition(const QPoint &position) override;
28
29 void setWindowFlags(Qt::WindowFlags flags) override;
30 void requestWindowStates(Qt::WindowStates states) override;
31 void setTitle(const QString &title) override;
32
33 bool resize(QWaylandInputDevice *, Qt::Edges) override;
34 bool move(QWaylandInputDevice *) override;
35 bool requestActivate() override;
36
37 void propagateSizeHints() override;
38
39 QMargins serverSideFrameMargins() const override;
40
41 void raise() override;
42 void lower() override;
43
44 std::any surfaceRole() const override { return object(); };
45
46private:
47 void resetConfiguration();
48 void sendSizeHints();
49 void zqt_shell_surface_v1_close() override;
50 void zqt_shell_surface_v1_resize(uint32_t serial, int32_t width, int32_t height) override;
51 void zqt_shell_surface_v1_set_position(uint32_t serial, int32_t x, int32_t y) override;
52 void zqt_shell_surface_v1_configure(uint32_t serial) override;
53 void zqt_shell_surface_v1_set_window_state(uint32_t serial, uint32_t state) override;
54 void zqt_shell_surface_v1_set_frame_margins(uint32_t left, uint32_t right,
55 uint32_t top, uint32_t bottom) override;
56 void zqt_shell_surface_v1_set_capabilities(uint32_t capabilities) override;
57
58 QSize m_pendingSize;
59 QPoint m_pendingPosition = { -1, -1 };
60 bool m_pendingPositionValid = false;
61 Qt::WindowStates m_pendingStates = Qt::WindowNoState;
62 Qt::WindowStates m_currentStates = Qt::WindowNoState;
63 QMargins m_frameMargins;
64 uint32_t m_currentConfigureSerial = UINT32_MAX;
65 uint32_t m_capabilities = 0;
66};
67
68}
69
71
72#endif // QWAYLANDQTSURFACE_H
\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
std::any surfaceRole() const override
a resize(100000)
rect
[4]
else opt state
[0]
Combined button and popup list for selecting options.
@ WindowNoState
Definition qnamespace.h:252
GLint GLint GLint GLint GLint x
[0]
GLint GLsizei GLsizei height
GLdouble GLdouble GLdouble GLdouble top
GLuint object
[3]
GLdouble GLdouble right
GLint GLsizei width
GLint left
GLint GLint bottom
GLbitfield flags
GLint y
GLuint * states
static qreal position(const QQuickItem *item, QQuickAnchors::Anchor anchorLine)
QString title
[35]
aWidget window() -> setWindowTitle("New Window Title")
[2]
g setTitle("&User information")
[0]