• Skip to content
  • Skip to link menu
Brand

API Documentation

  1. KDE API Reference
  2. The KDE Frameworks
  3. KWayland
  • KDE Home
  • Contact Us

Quick Links

Skip menu "KWayland"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • File List
  • Modules
  • Dependencies
  • Related Pages

Class Picker

About

Qt-style API to interact with the wayland-client and wayland-server API

Maintainer
Martin Flöser
Supported platforms
FreeBSD, Linux
Community
IRC: #kde-devel on Freenode
Mailing list: kde-frameworks-devel
Use with CMake
find_package(KF5Wayland)
target_link_libraries(yourapp KF5::WaylandClient KF5::WaylandServer)
Use with QMake
QT += KWaylandClient KWaylandServer 
Clone
git clone git://anongit.kde.org/kwayland.git
Browse source
KWayland on cgit.kde.org

KWayland

  • frameworks
  • frameworks
  • kwayland
  • src
  • server
surface_interface.h
1 /********************************************************************
2 Copyright 2014 Martin Gräßlin <[email protected]>
3 
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) version 3, or any
8 later version accepted by the membership of KDE e.V. (or its
9 successor approved by the membership of KDE e.V.), which shall
10 act as a proxy defined in Section 6 of version 3 of the license.
11 
12 This library is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 Lesser General Public License for more details.
16 
17 You should have received a copy of the GNU Lesser General Public
18 License along with this library. If not, see <http://www.gnu.org/licenses/>.
19 *********************************************************************/
20 #ifndef WAYLAND_SERVER_SURFACE_INTERFACE_H
21 #define WAYLAND_SERVER_SURFACE_INTERFACE_H
22 
23 #include "resource.h"
24 #include "output_interface.h"
25 
26 #include <QObject>
27 #include <QPointer>
28 #include <QRegion>
29 
30 #include <KWayland/Server/kwaylandserver_export.h>
31 
32 namespace KWayland
33 {
34 namespace Server
35 {
36 class BlurManagerInterface;
37 class BlurInterface;
38 class BufferInterface;
39 class ConfinedPointerInterface;
40 class ContrastInterface;
41 class ContrastManagerInterface;
42 class CompositorInterface;
43 class IdleInhibitManagerUnstableV1Interface;
44 class LockedPointerInterface;
45 class PointerConstraintsUnstableV1Interface;
46 class ShadowManagerInterface;
47 class ShadowInterface;
48 class SlideInterface;
49 class SubSurfaceInterface;
50 
76 class KWAYLANDSERVER_EXPORT SurfaceInterface : public Resource
77 {
78  Q_OBJECT
82  Q_PROPERTY(QRegion damage READ damage NOTIFY damaged)
86  Q_PROPERTY(QRegion opaque READ opaque NOTIFY opaqueChanged)
90  Q_PROPERTY(QRegion input READ input NOTIFY inputChanged)
91  Q_PROPERTY(qint32 scale READ scale NOTIFY scaleChanged)
92  Q_PROPERTY(KWayland::Server::OutputInterface::Transform transform READ transform NOTIFY transformChanged)
93  Q_PROPERTY(QSize size READ size NOTIFY sizeChanged)
94 public:
95  virtual ~SurfaceInterface();
96 
97  void frameRendered(quint32 msec);
98 
99  QRegion damage() const;
100  QRegion opaque() const;
101  QRegion input() const;
102 #if KWAYLANDSERVER_ENABLE_DEPRECATED_SINCE(5, 5)
103 
107  KWAYLANDSERVER_DEPRECATED_VERSION(5, 5, "Use SurfaceInterface::inputIsInfinite()")
108  bool inputIsInfitine() const;
109 #endif
110 
114  bool inputIsInfinite() const;
115  qint32 scale() const;
116  OutputInterface::Transform transform() const;
120  BufferInterface *buffer();
121  QPoint offset() const;
128  QSize size() const;
129 
133  QPointer<SubSurfaceInterface> subSurface() const;
137  QList<QPointer<SubSurfaceInterface>> childSubSurfaces() const;
138 
143  QPointer<ShadowInterface> shadow() const;
144 
149  QPointer<BlurInterface> blur() const;
150 
155  QPointer<SlideInterface> slideOnShowHide() const;
156 
161  QPointer<ContrastInterface> contrast() const;
162 
172  bool isMapped() const;
173 
192  QRegion trackedDamage() const;
193 
200  void resetTrackedDamage();
201 
214  SurfaceInterface *surfaceAt(const QPointF &position);
215 
229  SurfaceInterface *inputSurfaceAt(const QPointF &position);
230 
240  void setOutputs(const QVector<OutputInterface *> &outputs);
241 
247  QVector<OutputInterface *> outputs() const;
248 
254  QPointer<ConfinedPointerInterface> confinedPointer() const;
255 
261  QPointer<LockedPointerInterface> lockedPointer() const;
262 
268  bool inhibitsIdle() const;
269 
273  static SurfaceInterface *get(wl_resource *native);
278  static SurfaceInterface *get(quint32 id, const ClientConnection *client);
279 
288  void setDataProxy(SurfaceInterface *surface);
294  SurfaceInterface* dataProxy() const;
295 
296 Q_SIGNALS:
305  void damaged(const QRegion&);
306  void opaqueChanged(const QRegion&);
307  void inputChanged(const QRegion&);
308  void scaleChanged(qint32);
309  void transformChanged(KWayland::Server::OutputInterface::Transform);
313  void unmapped();
317  void sizeChanged();
321  void shadowChanged();
325  void blurChanged();
329  void slideOnShowHideChanged();
333  void contrastChanged();
338  void subSurfaceTreeChanged();
339 
350  void pointerConstraintsChanged();
351 
357  void inhibitsIdleChanged();
358 
366  void committed();
367 
368 private:
369  friend class CompositorInterface;
370  friend class SubSurfaceInterface;
371  friend class ShadowManagerInterface;
372  friend class BlurManagerInterface;
373  friend class SlideManagerInterface;
374  friend class ContrastManagerInterface;
375  friend class IdleInhibitManagerUnstableV1Interface;
376  friend class PointerConstraintsUnstableV1Interface;
377  friend class SurfaceRole;
378  explicit SurfaceInterface(CompositorInterface *parent, wl_resource *parentResource);
379 
380  class Private;
381  Private *d_func() const;
382 };
383 
384 }
385 }
386 
387 Q_DECLARE_METATYPE(KWayland::Server::SurfaceInterface*)
388 
389 #endif
KWayland::Server::SubSurfaceInterface
Definition: subcompositor_interface.h:63
QPointer
QPoint
QPointF
KWayland::Server::OutputInterface
Global for the wl_output interface.
Definition: output_interface.h:46
KWayland::Server::ShadowManagerInterface
TODO.
Definition: shadow_interface.h:42
KWayland::Server::SurfaceInterface
Resource representing a wl_surface.
Definition: surface_interface.h:76
KWayland::Server::SlideManagerInterface
TODO.
Definition: slide_interface.h:38
KWayland::Server::ContrastManagerInterface
Represents the Global for org_kde_kwin_contrast_manager interface.
Definition: contrast_interface.h:47
QList
KWayland::Server::BufferInterface
Reference counted representation of a Wayland buffer on Server side.
Definition: buffer_interface.h:65
KWayland::Server::BlurManagerInterface
Represents the Global for org_kde_kwin_blur_manager interface.
Definition: blur_interface.h:47
KWayland::Server::CompositorInterface
Represents the Global for wl_compositor interface.
Definition: compositor_interface.h:43
QSize
QVector
KWayland::Server::Resource
Represents a bound Resource.
Definition: resource.h:46
KWayland::Server::ClientConnection
Convenient Class which represents a wl_client.
Definition: clientconnection.h:49
KWayland
Definition: appmenu.cpp:27
QRegion
This file is part of the KDE documentation.
Documentation copyright © 1996-2019 The KDE developers.
Generated on Thu Dec 5 2019 03:41:20 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal