KWayland

server_decoration_palette_interface.h
1 /*
2  SPDX-FileCopyrightText: 2017 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_DECORATION_PALETTE_INTERFACE_H
7 #define KWAYLAND_SERVER_DECORATION_PALETTE_INTERFACE_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 SurfaceInterface;
20 class ServerSideDecorationPaletteInterface;
21 
22 /**
23  * Allows a client to specify a preferred palette to use for server-side window decorations
24  *
25  * This global can be used for clients to bind ServerSideDecorationPaletteInterface instances
26  * and notifies when a new one is created
27  * @since 5.42
28  */
29 class KWAYLANDSERVER_EXPORT ServerSideDecorationPaletteManagerInterface : public Global
30 {
31  Q_OBJECT
32 public:
34  /**
35  * Returns any existing palette for a given surface
36  * This returns a null pointer if no ServerSideDecorationPaletteInterface exists.
37  */
39 
40 Q_SIGNALS:
41  /**
42  * Emitted whenever a new ServerSideDecorationPaletteInterface is created.
43  **/
45 
46 private:
47  explicit ServerSideDecorationPaletteManagerInterface(Display *display, QObject *parent = nullptr);
48  friend class Display;
49  class Private;
50  Private *d_func() const;
51 };
52 
53 /**
54  * Provides the palette
55  * This interface is attached to a wl_surface and informs the server of a requested palette
56  * @since 5.42
57  */
58 class KWAYLANDSERVER_EXPORT ServerSideDecorationPaletteInterface : public Resource
59 {
60  Q_OBJECT
61 public:
63 
64  /**
65  * @returns the palette or an empty string if unset
66  */
67  QString palette() const;
68 
69  /**
70  * @returns The SurfaceInterface this ServerSideDecorationPaletteInterface references.
71  **/
72  SurfaceInterface *surface() const;
73 
74 Q_SIGNALS:
75  /**
76  * Emitted when the palette changes or is first received
77  */
78  void paletteChanged(const QString &palette);
79 
80 private:
83 
84  class Private;
85  Private *d_func() const;
86 };
87 
88 }
89 }
90 
91 #endif
Resource representing a wl_surface.
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
Allows a client to specify a preferred palette to use for server-side window decorations.
Provides the palette This interface is attached to a wl_surface and informs the server of a requested...
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Thu Sep 23 2021 22:51:10 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.