KWayland

shell_interface.h
1 /*
2  SPDX-FileCopyrightText: 2014 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_SHELL_INTERFACE_H
7 #define WAYLAND_SERVER_SHELL_INTERFACE_H
8 
9 #include <QObject>
10 
11 #include <KWayland/Server/kwaylandserver_export.h>
12 #include "seat_interface.h"
13 
14 #include "global.h"
15 #include "resource.h"
16 
17 class QSize;
18 struct wl_resource;
19 
20 namespace KWayland
21 {
22 namespace Server
23 {
24 
25 class Display;
26 class SeatInterface;
27 class SurfaceInterface;
28 class ShellSurfaceInterface;
29 template <typename T>
30 class GenericShellSurface;
31 
38 class KWAYLANDSERVER_EXPORT ShellInterface : public Global
39 {
40  Q_OBJECT
41 public:
42  virtual ~ShellInterface();
43 
44 Q_SIGNALS:
48  void surfaceCreated(KWayland::Server::ShellSurfaceInterface*);
49 
50 private:
51  friend class Display;
52  explicit ShellInterface(Display *display, QObject *parent);
53  class Private;
54 };
55 
67 class KWAYLANDSERVER_EXPORT ShellSurfaceInterface : public Resource
68 {
69  Q_OBJECT
73  Q_PROPERTY(QString title READ title NOTIFY titleChanged)
77  Q_PROPERTY(QByteArray windowClass READ windowClass NOTIFY windowClassChanged)
81  Q_PROPERTY(bool fullscreen READ isFullscreen NOTIFY fullscreenChanged)
85  Q_PROPERTY(bool toplevel READ isToplevel NOTIFY toplevelChanged)
89  Q_PROPERTY(bool maximized READ isMaximized NOTIFY maximizedChanged)
96  Q_PROPERTY(bool popup READ isPopup NOTIFY popupChanged)
103  Q_PROPERTY(bool transient READ isTransient NOTIFY transientChanged)
108  Q_PROPERTY(QPoint transientOffset READ transientOffset NOTIFY transientOffsetChanged)
117  Q_PROPERTY(bool acceptsKeyboardFocus READ acceptsKeyboardFocus NOTIFY acceptsKeyboardFocusChanged)
118 public:
119  virtual ~ShellSurfaceInterface();
120 
132  void ping();
140  void setPingTimeout(uint msec);
145  bool isPinged() const;
149  void requestSize(const QSize &size);
150 
154  SurfaceInterface *surface() const;
158  ShellInterface *shell() const;
159 
160  QString title() const;
161  QByteArray windowClass() const;
162  bool isFullscreen() const;
163  bool isToplevel() const;
164  bool isMaximized() const;
172  bool isPopup() const;
180  bool isTransient() const;
190  QPoint transientOffset() const;
205  QPointer<SurfaceInterface> transientFor() const;
206 
218  bool acceptsKeyboardFocus() const;
219 
230  void popupDone();
231 
232 Q_SIGNALS:
236  void titleChanged(const QString&);
240  void windowClassChanged(const QByteArray&);
247  void pingTimeout();
251  void pongReceived();
252  void fullscreenChanged(bool);
253  void toplevelChanged(bool);
254  void maximizedChanged(bool);
258  void popupChanged(bool);
262  void transientChanged(bool);
266  void transientOffsetChanged(const QPoint&);
270  void transientForChanged();
274  void acceptsKeyboardFocusChanged();
282  void moveRequested(KWayland::Server::SeatInterface *seat, quint32 serial);
291  void resizeRequested(KWayland::Server::SeatInterface *seat, quint32 serial, Qt::Edges edges);
292 
293 private:
294  friend class ShellInterface;
295  explicit ShellSurfaceInterface(ShellInterface *shell, SurfaceInterface *parent, wl_resource *parentResource);
296  friend class GenericShellSurface<ShellSurfaceInterface>;
297  class Private;
298  Private *d_func() const;
299 };
300 
301 }
302 }
303 
304 #endif
Represents a Seat on the Wayland Display.
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
Global for the wl_shell interface.
Resource for a wl_shell_surface.
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Fri Aug 7 2020 22:48:20 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.