KWayland

region_interface.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_SERVER_REGION_INTERFACE_H
7 #define WAYLAND_SERVER_REGION_INTERFACE_H
8 
9 #include <QObject>
10 #include <QRegion>
11 
12 #include <KWayland/Server/kwaylandserver_export.h>
13 
14 #include "resource.h"
15 
16 namespace KWayland
17 {
18 namespace Server
19 {
20 class CompositorInterface;
21 
22 /**
23  * @brief Resource for the wl_region.
24  *
25  * A RegionInterface gets created by the CompositorInterface and represents
26  * a QRegion.
27  *
28  * @see CompositorInterface
29  **/
30 class KWAYLANDSERVER_EXPORT RegionInterface : public Resource
31 {
32  Q_OBJECT
33 public:
34  virtual ~RegionInterface();
35 
36  /**
37  * @returns the data of the region as a QRegion.
38  **/
39  QRegion region() const;
40 
41  /**
42  * @returns The RegionInterface for the @p native resource.
43  **/
44  static RegionInterface *get(wl_resource *native);
45 
46 Q_SIGNALS:
47  /**
48  * Emitted whenever the region changes.
49  **/
50  void regionChanged(const QRegion &);
51 
52 private:
53  friend class CompositorInterface;
54  explicit RegionInterface(CompositorInterface *parent, wl_resource *parentResource);
55 
56  class Private;
57  Private *d_func() const;
58 };
59 
60 }
61 }
62 Q_DECLARE_METATYPE(KWayland::Server::RegionInterface *)
63 
64 #endif
Resource for the wl_region.
Represents the Global for wl_compositor interface.
Represents a bound Resource.
Definition: resource.h:31
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Thu Sep 23 2021 22:51:09 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.