KWayland

plasmashell.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_PLASMASHELL_H
7 #define WAYLAND_PLASMASHELL_H
8 
9 #include <QObject>
10 #include <QSize>
11 
12 #include <KWayland/Client/kwaylandclient_export.h>
13 
14 struct wl_surface;
15 struct org_kde_plasma_shell;
16 struct org_kde_plasma_surface;
17 
18 namespace KWayland
19 {
20 namespace Client
21 {
22 class EventQueue;
23 class Surface;
24 class PlasmaShellSurface;
25 
51 class KWAYLANDCLIENT_EXPORT PlasmaShell : public QObject
52 {
53  Q_OBJECT
54 public:
55  explicit PlasmaShell(QObject *parent = nullptr);
56  virtual ~PlasmaShell();
57 
61  bool isValid() const;
70  void release();
88  void destroy();
94  void setup(org_kde_plasma_shell *shell);
95 
99  void setEventQueue(EventQueue *queue);
103  EventQueue *eventQueue();
104 
115  PlasmaShellSurface *createSurface(wl_surface *surface, QObject *parent = nullptr);
126  PlasmaShellSurface *createSurface(Surface *surface, QObject *parent = nullptr);
127 
128  operator org_kde_plasma_shell*();
129  operator org_kde_plasma_shell*() const;
130 
131 Q_SIGNALS:
135  void interfaceAboutToBeReleased();
139  void interfaceAboutToBeDestroyed();
140 
149  void removed();
150 
151 private:
152  class Private;
154 };
155 
173 class KWAYLANDCLIENT_EXPORT PlasmaShellSurface : public QObject
174 {
175  Q_OBJECT
176 public:
177  explicit PlasmaShellSurface(QObject *parent);
178  virtual ~PlasmaShellSurface();
179 
188  void release();
203  void destroy();
209  void setup(org_kde_plasma_surface *surface);
210 
216  static PlasmaShellSurface *get(Surface *surf);
217 
221  bool isValid() const;
222  operator org_kde_plasma_surface*();
223  operator org_kde_plasma_surface*() const;
224 
229  enum class Role {
230  Normal,
231  Desktop,
232  Panel,
233  OnScreenDisplay,
234  Notification,
235  ToolTip,
236  CriticalNotification,
237  };
242  void setRole(Role role);
247  Role role() const;
251  void setPosition(const QPoint &point);
252 
257  enum class PanelBehavior {
258  AlwaysVisible,
259  AutoHide,
260  WindowsCanCover,
261  WindowsGoBelow
262  };
267  void setPanelBehavior(PanelBehavior behavior);
268 
275  void setSkipTaskbar(bool skip);
276 
282  void setSkipSwitcher(bool skip);
283 
297  void requestHideAutoHidingPanel();
298 
310  void requestShowAutoHidingPanel();
311 
321  //KF6 TODO rename to make it generic
322  void setPanelTakesFocus(bool takesFocus);
323 
324 Q_SIGNALS:
332  void autoHidePanelHidden();
333 
341  void autoHidePanelShown();
342 
343 private:
344  friend class PlasmaShell;
345  class Private;
347 };
348 
349 }
350 }
351 
354 
355 #endif
Wrapper for the org_kde_plasma_surface interface.
Definition: plasmashell.h:173
Wrapper class for wl_event_queue interface.
Definition: event_queue.h:55
Wrapper for the wl_surface interface.
Definition: surface.h:44
Wrapper for the org_kde_plasma_shell interface.
Definition: plasmashell.h:51
Role
Describes possible roles this PlasmaShellSurface can have.
Definition: plasmashell.h:229
PanelBehavior
Describes how a PlasmaShellSurface with role Role::Panel should behave.
Definition: plasmashell.h:257
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Nov 30 2020 22:50:52 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.