Debian Codegraph @

wayland/qtwayland-dev/5.15.1/QtWaylandClient/private/qwayland-surface-extension.h

raw symbols SCIP
1 // Copyright (C) 2016 The Qt Company Ltd.
2 //
3 // SPDX-License-Identifier: LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
4
5 #ifndef QT_WAYLAND_SURFACE_EXTENSION
6 #define QT_WAYLAND_SURFACE_EXTENSION
7
8 #include <QtWaylandClient/private/wayland-surface-extension-client-protocol.h>
9 #include <QByteArray>
10 #include <QString>
11
12 QT_BEGIN_NAMESPACE
13 QT_WARNING_PUSH
14 QT_WARNING_DISABLE_GCC("-Wmissing-field-initializers")
15
16 #if !defined(Q_WAYLAND_CLIENT_SURFACE_EXTENSION_EXPORT)
17 # if defined(QT_SHARED)
18 # define Q_WAYLAND_CLIENT_SURFACE_EXTENSION_EXPORT Q_DECL_EXPORT
19 # else
20 # define Q_WAYLAND_CLIENT_SURFACE_EXTENSION_EXPORT
21 # endif
22 #endif
23
24 namespace QtWayland {
25 class Q_WAYLAND_CLIENT_SURFACE_EXTENSION_EXPORT qt_surface_extension
26 {
27 public:
28 qt_surface_extension(struct ::wl_registry *registry, int id, int version);
29 qt_surface_extension(struct ::qt_surface_extension *object);
30 qt_surface_extension();
31
32 virtual ~qt_surface_extension();
33
34 void init(struct ::wl_registry *registry, int id, int version);
35 void init(struct ::qt_surface_extension *object);
36
37 struct ::qt_surface_extension *object() { return m_qt_surface_extension; }
38 const struct ::qt_surface_extension *object() const { return m_qt_surface_extension; }
39
40 bool isInitialized() const;
41
42 static const struct ::wl_interface *interface();
43
44 struct ::qt_extended_surface *get_extended_surface(struct ::wl_surface *surface);
45
46 private:
47 struct ::qt_surface_extension *m_qt_surface_extension;
48 };
49
50 class Q_WAYLAND_CLIENT_SURFACE_EXTENSION_EXPORT qt_extended_surface
51 {
52 public:
53 qt_extended_surface(struct ::wl_registry *registry, int id, int version);
54 qt_extended_surface(struct ::qt_extended_surface *object);
55 qt_extended_surface();
56
57 virtual ~qt_extended_surface();
58
59 void init(struct ::wl_registry *registry, int id, int version);
60 void init(struct ::qt_extended_surface *object);
61
62 struct ::qt_extended_surface *object() { return m_qt_extended_surface; }
63 const struct ::qt_extended_surface *object() const { return m_qt_extended_surface; }
64
65 bool isInitialized() const;
66
67 static const struct ::wl_interface *interface();
68
69 enum orientation {
70 orientation_PrimaryOrientation = 0,
71 orientation_PortraitOrientation = 1,
72 orientation_LandscapeOrientation = 2,
73 orientation_InvertedPortraitOrientation = 4,
74 orientation_InvertedLandscapeOrientation = 8
75 };
76
77 enum windowflag {
78 windowflag_OverridesSystemGestures = 1,
79 windowflag_StaysOnTop = 2,
80 windowflag_BypassWindowManager = 4
81 };
82
83 void update_generic_property(const QString &name, const QByteArray &value);
84 void set_content_orientation_mask(int32_t orientation);
85 void set_window_flags(int32_t flags);
86 void raise();
87 void lower();
88
89 protected:
90 virtual void extended_surface_onscreen_visibility(int32_t visible);
91 virtual void extended_surface_set_generic_property(const QString &name, wl_array *value);
92 virtual void extended_surface_close();
93
94 private:
95 void init_listener();
96 static const struct qt_extended_surface_listener m_qt_extended_surface_listener;
97 static void handle_onscreen_visibility(
98 void *data,
99 struct ::qt_extended_surface *object,
100 int32_t visible);
101 static void handle_set_generic_property(
102 void *data,
103 struct ::qt_extended_surface *object,
104 const char *name,
105 wl_array *value);
106 static void handle_close(
107 void *data,
108 struct ::qt_extended_surface *object);
109 struct ::qt_extended_surface *m_qt_extended_surface;
110 };
111 }
112
113 QT_WARNING_POP
114 QT_END_NAMESPACE
115
116 #endif