KWayland

xdgoutput.h
1 /*
2  SPDX-FileCopyrightText: 2018 David Edmundson <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
5 */
6 #ifndef KWAYLAND_CLIENT_XDGOUTPUT_H
7 #define KWAYLAND_CLIENT_XDGOUTPUT_H
8 
9 #include <QObject>
10 #include <QSize>
11 #include <QPoint>
12 
13 #include <KWayland/Client/kwaylandclient_export.h>
14 
15 struct zxdg_output_manager_v1;
16 struct zxdg_output_v1;
17 
18 namespace KWayland
19 {
20 namespace Client
21 {
22 
23 class EventQueue;
24 class XdgOutput;
25 class Output;
26 
55 class KWAYLANDCLIENT_EXPORT XdgOutputManager : public QObject
56 {
57  Q_OBJECT
58 public:
65  explicit XdgOutputManager(QObject *parent = nullptr);
66  virtual ~XdgOutputManager();
67 
73  void setup(zxdg_output_manager_v1 *xdgoutputmanager);
77  bool isValid() const;
83  void release();
100  void destroy();
101 
105  void setEventQueue(EventQueue *queue);
109  EventQueue *eventQueue();
110 
111  XdgOutput *getXdgOutput(Output *output, QObject *parent = nullptr);
112 
113  operator zxdg_output_manager_v1*();
114  operator zxdg_output_manager_v1*() const;
115 
116 Q_SIGNALS:
123  void removed();
124 
125 private:
126  class Private;
128 };
129 
144 class KWAYLANDCLIENT_EXPORT XdgOutput : public QObject
145 {
146  Q_OBJECT
147 public:
148  virtual ~XdgOutput();
149 
155  void setup(zxdg_output_v1 *xdgoutput);
159  bool isValid() const;
165  void release();
182  void destroy();
183 
184  operator zxdg_output_v1*();
185  operator zxdg_output_v1*() const;
186 
190  QPoint logicalPosition() const;
191 
196  QSize logicalSize() const;
197 
202  QString name() const;
203 
208  QString description() const;
209 
210 Q_SIGNALS:
214  void changed();
215 
216 private:
217  friend class XdgOutputManager;
218  explicit XdgOutput(QObject *parent = nullptr);
219  class Private;
221 };
222 
223 
224 }
225 }
226 
227 #endif
Wrapper class for wl_event_queue interface.
Definition: event_queue.h:55
Wrapper for the wl_output interface.
Definition: output.h:55
Wrapper for the zxdg_output_v1 interface.
Definition: xdgoutput.h:144
Wrapper for the zxdg_output_manager_v1 interface.
Definition: xdgoutput.h:55
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sun Jul 5 2020 22:50:14 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.