Debian Codegraph @

wayland/qtwayland-dev/5.15.1/QtWaylandClient/private/qwayland-xdg-output-unstable-v1.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_XDG_OUTPUT_UNSTABLE_V1
6 #define QT_WAYLAND_XDG_OUTPUT_UNSTABLE_V1
7
8 #include <QtWaylandClient/private/wayland-xdg-output-unstable-v1-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_XDG_OUTPUT_UNSTABLE_V1_EXPORT)
17 # if defined(QT_SHARED)
18 # define Q_WAYLAND_CLIENT_XDG_OUTPUT_UNSTABLE_V1_EXPORT Q_DECL_EXPORT
19 # else
20 # define Q_WAYLAND_CLIENT_XDG_OUTPUT_UNSTABLE_V1_EXPORT
21 # endif
22 #endif
23
24 namespace QtWayland {
25 class Q_WAYLAND_CLIENT_XDG_OUTPUT_UNSTABLE_V1_EXPORT zxdg_output_manager_v1
26 {
27 public:
28 zxdg_output_manager_v1(struct ::wl_registry *registry, int id, int version);
29 zxdg_output_manager_v1(struct ::zxdg_output_manager_v1 *object);
30 zxdg_output_manager_v1();
31
32 virtual ~zxdg_output_manager_v1();
33
34 void init(struct ::wl_registry *registry, int id, int version);
35 void init(struct ::zxdg_output_manager_v1 *object);
36
37 struct ::zxdg_output_manager_v1 *object() { return m_zxdg_output_manager_v1; }
38 const struct ::zxdg_output_manager_v1 *object() const { return m_zxdg_output_manager_v1; }
39
40 bool isInitialized() const;
41
42 static const struct ::wl_interface *interface();
43
44 void destroy();
45 struct ::zxdg_output_v1 *get_xdg_output(struct ::wl_output *output);
46
47 private:
48 struct ::zxdg_output_manager_v1 *m_zxdg_output_manager_v1;
49 };
50
51 class Q_WAYLAND_CLIENT_XDG_OUTPUT_UNSTABLE_V1_EXPORT zxdg_output_v1
52 {
53 public:
54 zxdg_output_v1(struct ::wl_registry *registry, int id, int version);
55 zxdg_output_v1(struct ::zxdg_output_v1 *object);
56 zxdg_output_v1();
57
58 virtual ~zxdg_output_v1();
59
60 void init(struct ::wl_registry *registry, int id, int version);
61 void init(struct ::zxdg_output_v1 *object);
62
63 struct ::zxdg_output_v1 *object() { return m_zxdg_output_v1; }
64 const struct ::zxdg_output_v1 *object() const { return m_zxdg_output_v1; }
65
66 bool isInitialized() const;
67
68 static const struct ::wl_interface *interface();
69
70 void destroy();
71
72 protected:
73 virtual void zxdg_output_v1_logical_position(int32_t x, int32_t y);
74 virtual void zxdg_output_v1_logical_size(int32_t width, int32_t height);
75 virtual void zxdg_output_v1_done();
76 virtual void zxdg_output_v1_name(const QString &name);
77 virtual void zxdg_output_v1_description(const QString &description);
78
79 private:
80 void init_listener();
81 static const struct zxdg_output_v1_listener m_zxdg_output_v1_listener;
82 static void handle_logical_position(
83 void *data,
84 struct ::zxdg_output_v1 *object,
85 int32_t x,
86 int32_t y);
87 static void handle_logical_size(
88 void *data,
89 struct ::zxdg_output_v1 *object,
90 int32_t width,
91 int32_t height);
92 static void handle_done(
93 void *data,
94 struct ::zxdg_output_v1 *object);
95 static void handle_name(
96 void *data,
97 struct ::zxdg_output_v1 *object,
98 const char *name);
99 static void handle_description(
100 void *data,
101 struct ::zxdg_output_v1 *object,
102 const char *description);
103 struct ::zxdg_output_v1 *m_zxdg_output_v1;
104 };
105 }
106
107 QT_WARNING_POP
108 QT_END_NAMESPACE
109
110 #endif