• 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
  • client
xdgdecoration.h
1 /****************************************************************************
2 Copyright 2018 David Edmundson <[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 KWAYLAND_CLIENT_XDG_DECORATION_UNSTABLE_V1_H
21 #define KWAYLAND_CLIENT_XDG_DECORATION_UNSTABLE_V1_H
22 
23 #include <QObject>
24 
25 #include <KWayland/Client/kwaylandclient_export.h>
26 
27 struct zxdg_decoration_manager_v1;
28 struct zxdg_toplevel_decoration_v1;
29 
30 namespace KWayland
31 {
32 namespace Client
33 {
34 
35 class EventQueue;
36 class XdgDecoration;
37 class XdgShellSurface;
38 
65 class KWAYLANDCLIENT_EXPORT XdgDecorationManager : public QObject
66 {
67  Q_OBJECT
68 public:
75  explicit XdgDecorationManager(QObject *parent = nullptr);
76  virtual ~XdgDecorationManager();
77 
83  void setup(zxdg_decoration_manager_v1 *xdgdecorationmanager);
87  bool isValid() const;
93  void release();
110  void destroy();
111 
115  void setEventQueue(EventQueue *queue);
119  EventQueue *eventQueue();
120 
121  XdgDecoration *getToplevelDecoration(XdgShellSurface *toplevel, QObject *parent = nullptr);
122 
123  operator zxdg_decoration_manager_v1*();
124  operator zxdg_decoration_manager_v1*() const;
125 
126 Q_SIGNALS:
133  void removed();
134 
135 private:
136  class Private;
137  QScopedPointer<Private> d;
138 };
139 
140 class KWAYLANDCLIENT_EXPORT XdgDecoration : public QObject
141 {
142  Q_OBJECT
143 public:
144  enum class Mode {
145  ClientSide,
146  ServerSide
147  };
148 
149  Q_ENUM(Mode)
150 
151  virtual ~XdgDecoration();
152 
158  void setup(zxdg_toplevel_decoration_v1 *xdgdecoration);
162  bool isValid() const;
168  void release();
185  void destroy();
186 
191  void setMode(Mode mode);
192 
196  void unsetMode();
197 
201  Mode mode() const;
202 
203  operator zxdg_toplevel_decoration_v1*();
204  operator zxdg_toplevel_decoration_v1*() const;
205 
206 Q_SIGNALS:
207  void modeChanged(KWayland::Client::XdgDecoration::Mode mode);
208 
209 private:
210  friend class XdgDecorationManager;
211  explicit XdgDecoration(QObject *parent = nullptr);
212  class Private;
213  QScopedPointer<Private> d;
214 };
215 
216 
217 }
218 }
219 
220 #endif
KWayland::Client::EventQueue
Wrapper class for wl_event_queue interface.
Definition: event_queue.h:69
KWayland::Client::XdgDecorationManager
Wrapper for the zxdg_decoration_manager_v1 interface.
Definition: xdgdecoration.h:65
QObject
QScopedPointer< Private >
KWayland::Client::XdgShellSurface
Definition: xdgshell.h:287
KWayland
Definition: appmenu.cpp:27
This file is part of the KDE documentation.
Documentation copyright © 1996-2019 The KDE developers.
Generated on Tue Dec 10 2019 03:09:31 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