KWayland

compositor.h
1 /*
2  SPDX-FileCopyrightText: 2014 Martin Gräßlin <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
5 */
6 #ifndef WAYLAND_COMPOSITOR_H
7 #define WAYLAND_COMPOSITOR_H
8 
9 #include <QObject>
10 
11 #include <memory>
12 
13 #include <KWayland/Client/kwaylandclient_export.h>
14 
15 struct wl_compositor;
16 
17 namespace KWayland
18 {
19 namespace Client
20 {
21 
22 class EventQueue;
23 class Region;
24 class Surface;
25 
50 class KWAYLANDCLIENT_EXPORT Compositor : public QObject
51 {
52  Q_OBJECT
53 public:
60  explicit Compositor(QObject *parent = nullptr);
61  virtual ~Compositor();
62 
73  static Compositor *fromApplication(QObject *parent = nullptr);
74 
78  bool isValid() const;
84  void setup(wl_compositor *compositor);
90  void release();
107  void destroy();
108 
112  void setEventQueue(EventQueue *queue);
116  EventQueue *eventQueue();
117 
123  Surface *createSurface(QObject *parent = nullptr);
124 
130  Region *createRegion(QObject *parent = nullptr);
139  Region *createRegion(const QRegion &region, QObject *parent);
157  std::unique_ptr<Region> createRegion(const QRegion &region);
158 
159  operator wl_compositor*();
160  operator wl_compositor*() const;
161 
162 Q_SIGNALS:
171  void removed();
172 
173 private:
174  class Private;
176 };
177 
178 }
179 }
180 
181 #endif
Wrapper class for wl_event_queue interface.
Definition: event_queue.h:55
Wrapper for the wl_compositor interface.
Definition: compositor.h:50
Wrapper for the wl_surface interface.
Definition: surface.h:44
Wrapper for the wl_region interface.
Definition: region.h:32
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Fri Aug 7 2020 22:48:17 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.