KWaylandServer

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 #pragma once
7 
8 struct wl_resource;
9 
10 #include <KWaylandServer/kwaylandserver_export.h>
11 #include <QObject>
12 
13 namespace KWaylandServer
14 {
15 class Display;
16 class SurfaceInterface;
17 class ServerSideDecorationPaletteInterface;
18 class ServerSideDecorationPaletteManagerInterfacePrivate;
19 class ServerSideDecorationPaletteInterfacePrivate;
20 
21 /**
22  * Allows a client to specify a preferred palette to use for server-side window decorations
23  *
24  * This global can be used for clients to bind ServerSideDecorationPaletteInterface instances
25  * and notifies when a new one is created
26  */
27 class KWAYLANDSERVER_EXPORT ServerSideDecorationPaletteManagerInterface : public QObject
28 {
29  Q_OBJECT
30 
31 public:
32  explicit ServerSideDecorationPaletteManagerInterface(Display *display, QObject *parent = nullptr);
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:
48 };
49 
50 /**
51  * Provides the palette
52  * This interface is attached to a wl_surface and informs the server of a requested palette
53  */
54 class KWAYLANDSERVER_EXPORT ServerSideDecorationPaletteInterface : public QObject
55 {
56  Q_OBJECT
57 public:
59 
60  /**
61  * @returns the palette or an empty string if unset
62  */
63  QString palette() const;
64 
65  /**
66  * @returns The SurfaceInterface this ServerSideDecorationPaletteInterface references.
67  */
68  SurfaceInterface *surface() const;
69 
70 Q_SIGNALS:
71  /**
72  * Emitted when the palette changes or is first received
73  */
74  void paletteChanged(const QString &palette);
75 
76 private:
77  explicit ServerSideDecorationPaletteInterface(SurfaceInterface *surface, wl_resource *resource);
78  friend class ServerSideDecorationPaletteManagerInterfacePrivate;
79 
81 };
82 
83 }
Class holding the Wayland server display loop.
Definition: display.h:47
Provides the palette This interface is attached to a wl_surface and informs the server of a requested...
Allows a client to specify a preferred palette to use for server-side window decorations.
Resource representing a wl_surface.
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Sat Oct 23 2021 23:08:28 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.