KWayland

plasmashell_interface.h
1 /*
2  SPDX-FileCopyrightText: 2015 Martin Gräßlin <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
5 */
6 #ifndef WAYLAND_SERVER_PLASMA_SHELL_INTERFACE_H
7 #define WAYLAND_SERVER_PLASMA_SHELL_INTERFACE_H
8 
9 #include <QObject>
10 
11 #include <KWayland/Server/kwaylandserver_export.h>
12 
13 #include "global.h"
14 #include "resource.h"
15 
16 class QSize;
17 struct wl_resource;
18 
19 namespace KWayland
20 {
21 namespace Server
22 {
23 
24 class Display;
25 class SurfaceInterface;
26 class PlasmaShellSurfaceInterface;
27 
40 class KWAYLANDSERVER_EXPORT PlasmaShellInterface : public Global
41 {
42  Q_OBJECT
43 public:
44  virtual ~PlasmaShellInterface();
45 
46 Q_SIGNALS:
51 
52 private:
53  friend class Display;
54  explicit PlasmaShellInterface(Display *display, QObject *parent);
55  class Private;
56 };
57 
65 class KWAYLANDSERVER_EXPORT PlasmaShellSurfaceInterface : public Resource
66 {
67  Q_OBJECT
68 public:
69  virtual ~PlasmaShellSurfaceInterface();
70 
74  SurfaceInterface *surface() const;
78  PlasmaShellInterface *shell() const;
79 
83  QPoint position() const;
87  bool isPositionSet() const;
88 
93  enum class Role {
94  Normal,
95  Desktop,
96  Panel,
97  OnScreenDisplay,
98  Notification,
99  ToolTip,
100  CriticalNotification,
101  };
105  Role role() const;
109  enum class PanelBehavior {
110  AlwaysVisible,
111  AutoHide,
112  WindowsCanCover,
113  WindowsGoBelow
114  };
119  PanelBehavior panelBehavior() const;
120 
126  bool skipTaskbar() const;
127 
133  bool skipSwitcher() const;
134 
144  void hideAutoHidingPanel();
145 
154  void showAutoHidingPanel();
155 
164  //TODO KF6 rename to something generic
165  bool panelTakesFocus() const;
166 
171  static PlasmaShellSurfaceInterface *get(wl_resource *native);
172 
173 Q_SIGNALS:
177  void positionChanged();
181  void roleChanged();
185  void panelBehaviorChanged();
189  void skipTaskbarChanged();
193  void skipSwitcherChanged();
194 
209  void panelAutoHideHideRequested();
210 
222  void panelAutoHideShowRequested();
223 
224  /*
225  * Emitted when panelTakesFocus changes
226  * @see panelTakesFocus
227  * @since 5.66
228  */
229  void panelTakesFocusChanged();
230 
231 private:
232  friend class PlasmaShellInterface;
233  explicit PlasmaShellSurfaceInterface(PlasmaShellInterface *shell, SurfaceInterface *parent, wl_resource *parentResource);
234  class Private;
235  Private *d_func() const;
236 };
237 
238 }
239 }
240 
243 
244 #endif
Global for the org_kde_plasma_shell interface.
Resource for the org_kde_plasma_shell_surface interface.
Resource representing a wl_surface.
Class holding the Wayland server display loop.
Definition: display.h:89
Base class for all Globals.
Definition: global.h:46
Represents a bound Resource.
Definition: resource.h:32
PanelBehavior
Describes how a PlasmaShellSurfaceInterface with role Role::Panel should behave.
Role
Describes possible roles this PlasmaShellSurfaceInterface can have.
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Wed Aug 12 2020 22:50:23 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.