KWayland

subsurface.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_SUBSURFACE_H
7 #define WAYLAND_SUBSURFACE_H
8 
9 #include <QObject>
10 #include <QPointer>
11 
12 #include <KWayland/Client/kwaylandclient_export.h>
13 
14 struct wl_subsurface;
15 
16 namespace KWayland
17 {
18 namespace Client
19 {
20 
21 class Surface;
22 
41 class KWAYLANDCLIENT_EXPORT SubSurface : public QObject
42 {
43  Q_OBJECT
44 public:
45  explicit SubSurface(QPointer<Surface> surface, QPointer<Surface> parentSurface, QObject *parent = nullptr);
46  virtual ~SubSurface();
47 
51  bool isValid() const;
57  void setup(wl_subsurface *subsurface);
63  void release();
75  void destroy();
76 
80  enum class Mode {
81  Synchronized,
82  Desynchronized
83  };
84 
89  void setMode(Mode mode);
90  Mode mode() const;
91 
97  void setPosition(const QPoint &pos);
98  QPoint position() const;
99 
108  void raise();
115  void placeAbove(QPointer<SubSurface> sibling);
126  void placeAbove(QPointer<Surface> referenceSurface);
127 
136  void lower();
143  void placeBelow(QPointer<SubSurface> sibling);
154  void placeBelow(QPointer<Surface> referenceSurface);
155 
159  QPointer<Surface> surface() const;
163  QPointer<Surface> parentSurface() const;
164 
165  static QPointer<SubSurface> get(wl_subsurface *native);
166 
167  operator wl_subsurface*();
168  operator wl_subsurface*() const;
169 
170 private:
171  class Private;
173 };
174 
175 }
176 }
177 
178 #endif
Mode
Operation Mode on how the Surface&#39;s commit should behave.
Definition: subsurface.h:80
Wrapper for the wl_subsurface interface.
Definition: subsurface.h:41
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Wed Aug 12 2020 22:50:24 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.