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
qwaylandwlshell_p.h
Go to the documentation of this file.
1// Copyright (C) 2017 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4#ifndef QWAYLANDWLSHELL_P_H
5#define QWAYLANDWLSHELL_P_H
6
7#include <QtWaylandCompositor/qtwaylandcompositorglobal.h>
8#include <QtWaylandCompositor/qwaylandsurface.h>
9#include <QtWaylandCompositor/private/qwaylandshellsurface_p.h>
10#include <QtWaylandCompositor/private/qwaylandshell_p.h>
11#include <QtWaylandCompositor/QWaylandWlShellSurface>
12#include <QtWaylandCompositor/QWaylandSeat>
13
14#include <wayland-server-core.h>
15#include <QHash>
16#include <QPoint>
17#include <QSet>
18
19#include <QtWaylandCompositor/private/qwayland-server-wayland.h>
20
21#include <QtCore/qpointer.h>
22
23//
24// W A R N I N G
25// -------------
26//
27// This file is not part of the Qt API. It exists purely as an
28// implementation detail. This header file may change from version to
29// version without notice, or even be removed.
30//
31// We mean it.
32//
33
35
36class Q_WAYLANDCOMPOSITOR_EXPORT QWaylandWlShellPrivate
38 , public QtWaylandServer::wl_shell
39{
40 Q_DECLARE_PUBLIC(QWaylandWlShell)
41public:
43
44 void unregisterShellSurface(QWaylandWlShellSurface *shellSurface);
45
46 static QWaylandWlShellPrivate *get(QWaylandWlShell *shell) { return shell->d_func(); }
47
48protected:
49 void shell_get_shell_surface(Resource *resource, uint32_t id, struct ::wl_resource *surface) override;
50
51 QList<QWaylandWlShellSurface *> m_shellSurfaces;
52};
53
54class Q_WAYLANDCOMPOSITOR_EXPORT QWaylandWlShellSurfacePrivate
56 , public QtWaylandServer::wl_shell_surface
57{
58 Q_DECLARE_PUBLIC(QWaylandWlShellSurface)
59public:
62
63 static QWaylandWlShellSurfacePrivate *get(QWaylandWlShellSurface *surface) { return surface->d_func(); }
64
65 void ping(uint32_t serial);
66
67 void setWindowType(Qt::WindowType windowType);
68
69private:
70 QWaylandWlShell *m_shell = nullptr;
71 QPointer<QWaylandSurface> m_surface;
72
73 QSet<uint32_t> m_pings;
74
75 QString m_title;
76 QString m_className;
78
79 void shell_surface_destroy_resource(Resource *resource) override;
80
81 void shell_surface_move(Resource *resource,
82 struct wl_resource *input_device_super,
83 uint32_t time) override;
84 void shell_surface_resize(Resource *resource,
85 struct wl_resource *input_device,
86 uint32_t time,
87 uint32_t edges) override;
88 void shell_surface_set_toplevel(Resource *resource) override;
89 void shell_surface_set_transient(Resource *resource,
90 struct wl_resource *parent_surface_resource,
91 int x,
92 int y,
93 uint32_t flags) override;
94 void shell_surface_set_fullscreen(Resource *resource,
95 uint32_t method,
96 uint32_t framerate,
97 struct wl_resource *output_resource) override;
98 void shell_surface_set_popup(Resource *resource,
99 struct wl_resource *input_device,
100 uint32_t time,
101 struct wl_resource *parent,
102 int32_t x,
103 int32_t y,
104 uint32_t flags) override;
105 void shell_surface_set_maximized(Resource *resource,
106 struct wl_resource *output_resource) override;
107 void shell_surface_pong(Resource *resource,
108 uint32_t serial) override;
109 void shell_surface_set_title(Resource *resource,
110 const QString &title) override;
111 void shell_surface_set_class(Resource *resource,
112 const QString &class_) override;
113
114 static QWaylandSurfaceRole s_role;
115};
116
118
119#endif // QWAYLANDWLSHELL_P_H
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
\inmodule QtWaylandCompositor
QList< QWaylandWlShellSurface * > m_shellSurfaces
static QWaylandWlShellPrivate * get(QWaylandWlShell *shell)
static QWaylandWlShellSurfacePrivate * get(QWaylandWlShellSurface *surface)
\qmltype WlShellSurface \instantiates QWaylandWlShellSurface \inqmlmodule QtWayland....
\qmltype WlShell \instantiates QWaylandWlShell \inqmlmodule QtWayland.Compositor.WlShell
Combined button and popup list for selecting options.
WindowType
Definition qnamespace.h:205
@ Window
Definition qnamespace.h:207
DBusConnection const char DBusError DBusBusType DBusError return DBusConnection DBusHandleMessageFunction void DBusFreeFunction return DBusConnection return DBusConnection return const char DBusError return DBusConnection DBusMessage dbus_uint32_t return DBusConnection dbus_bool_t DBusConnection DBusAddWatchFunction DBusRemoveWatchFunction DBusWatchToggledFunction void DBusFreeFunction return DBusConnection DBusDispatchStatusFunction void DBusFreeFunction DBusTimeout return DBusTimeout return DBusWatch return DBusWatch unsigned int return DBusError const DBusError return const DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessageIter int const void return DBusMessageIter DBusMessageIter return DBusMessageIter void DBusMessageIter void int return DBusMessage DBusMessageIter return DBusMessageIter return DBusMessageIter DBusMessageIter const char const char const char const char * method
GLint GLint GLint GLint GLint x
[0]
GLbitfield flags
GLint y
QString title
[35]