KWayland

xdgdecoration_interface.h
1 /*
2  SPDX-FileCopyrightText: 2018 David Edmundson <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
5 */
6 #ifndef KWAYLAND_SERVER_XDG_DECORATION_UNSTABLE_V1_H
7 #define KWAYLAND_SERVER_XDG_DECORATION_UNSTABLE_V1_H
8 
9 #include "global.h"
10 #include "resource.h"
11 
12 #include <KWayland/Server/kwaylandserver_export.h>
13 
14 namespace KWayland
15 {
16 namespace Server
17 {
18 class Display;
19 class XdgDecorationInterface;
20 class XdgShellInterface;
21 class XdgShellSurfaceInterface;
22 
23 /**
24  * @brief The XdgDecorationManagerInterface class
25  * @since 5.54
26  */
27 class KWAYLANDSERVER_EXPORT XdgDecorationManagerInterface : public Global
28 {
29  Q_OBJECT
30 public:
32 Q_SIGNALS:
33  void xdgDecorationInterfaceCreated(XdgDecorationInterface *iface);
34 
35 private:
36  explicit XdgDecorationManagerInterface(Display *display, XdgShellInterface *shellInterface, QObject *parent = nullptr);
37  friend class Display;
38  class Private;
39 };
40 
41 /**
42  * @brief The XdgDecorationInterface class
43  * @since 5.54
44  */
45 class KWAYLANDSERVER_EXPORT XdgDecorationInterface : public Resource
46 {
47  Q_OBJECT
48 public:
49  enum class Mode {
50  Undefined,
51  ClientSide,
52  ServerSide,
53  };
54 
55  Q_ENUM(Mode);
56 
57  ~XdgDecorationInterface() override;
58 
59  /**
60  * Sets the mode the client should be using.
61  * It should be followed by a call to XDGShellSurface::configure()
62  * Once acked, it can relied upon to be applied in the next surface
63  */
64  void configure(Mode requestedMode);
65 
66  /**
67  * The last mode requested by the client
68  */
69  Mode requestedMode() const;
70 
71  /**
72  * The surface this decoration is attached to
73  */
74  XdgShellSurfaceInterface *surface() const;
75 
76 Q_SIGNALS:
77  /**
78  * New mode requested by the client
79  */
80  void modeRequested(KWayland::Server::XdgDecorationInterface::Mode requestedMode);
81 
82 private:
83  explicit XdgDecorationInterface(XdgDecorationManagerInterface *parent, XdgShellSurfaceInterface *surface, wl_resource *parentResource);
84  friend class XdgDecorationManagerInterface;
85 
86  class Private;
87  Private *d_func() const;
88 };
89 
90 }
91 }
92 
93 #endif
The XdgDecorationInterface class.
The XdgDecorationManagerInterface class.
Class holding the Wayland server display loop.
Definition: display.h:86
Base class for all Globals.
Definition: global.h:46
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 Sun Aug 1 2021 22:50:29 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.