KWayland

region.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_REGION_H
7 #define WAYLAND_REGION_H
8 
9 #include <QObject>
10 
11 #include <KWayland/Client/kwaylandclient_export.h>
12 
13 struct wl_region;
14 
15 namespace KWayland
16 {
17 namespace Client
18 {
19 
32 class KWAYLANDCLIENT_EXPORT Region : public QObject
33 {
34  Q_OBJECT
35 public:
36  explicit Region(const QRegion &region, QObject *parent = nullptr);
37  virtual ~Region();
38 
44  void setup(wl_region *region);
50  void release();
67  void destroy();
71  bool isValid() const;
72 
76  void add(const QRect &rect);
80  void add(const QRegion &region);
84  void subtract(const QRect &rect);
88  void subtract(const QRegion &region);
89 
93  QRegion region() const;
94 
95  operator wl_region*();
96  operator wl_region*() const;
97 
98 private:
99  class Private;
101 };
102 
103 }
104 }
105 
106 #endif
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:19 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.