KWaylandServer

display.h
1 /*
2  SPDX-FileCopyrightText: 2014 Martin Gräßlin <[email protected]>
3  SPDX-FileCopyrightText: 2018 David Edmundson <[email protected]>
4 
5  SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
6 */
7 #ifndef WAYLAND_SERVER_DISPLAY_H
8 #define WAYLAND_SERVER_DISPLAY_H
9 
10 #include <QList>
11 #include <QObject>
12 
13 #include <KWaylandServer/kwaylandserver_export.h>
14 
15 #include "clientconnection.h"
16 
17 struct wl_client;
18 struct wl_display;
19 struct wl_event_loop;
20 
21 namespace KWaylandServer
22 {
37 class CompositorInterface;
38 class DataDeviceManagerInterface;
39 class DpmsManagerInterface;
40 class IdleInterface;
41 class IdleInhibitManagerV1Interface;
42 class FakeInputInterface;
43 class OutputInterface;
44 class OutputDeviceInterface;
45 class OutputConfigurationInterface;
46 class OutputManagementInterface;
47 class PlasmaShellInterface;
48 class PlasmaWindowManagementInterface;
49 class QtSurfaceExtensionInterface;
50 class SeatInterface;
51 class ShadowManagerInterface;
52 class BlurManagerInterface;
53 class ContrastManagerInterface;
54 class ServerSideDecorationManagerInterface;
55 class SlideManagerInterface;
56 class SubCompositorInterface;
57 class TextInputManagerV2Interface;
58 class TextInputManagerV3Interface;
59 class XdgShellInterface;
61 class RelativePointerManagerInterface;
63 class PointerGesturesInterface;
65 class PointerConstraintsInterface;
66 class XdgForeignV2Interface;
67 class AppMenuManagerInterface;
68 class ServerSideDecorationPaletteManagerInterface;
69 class PlasmaVirtualDesktopManagementInterface;
70 class XdgOutputManagerV1Interface;
71 class XdgDecorationManagerV1Interface;
72 class EglStreamControllerInterface;
73 class KeyStateInterface;
74 class LinuxDmabufUnstableV1Interface;
75 class TabletManagerInterface;
76 class DataControlDeviceManagerV1Interface;
77 class PrimarySelectionDeviceManagerV1Interface;
78 class KeyboardShortcutsInhibitManagerV1Interface;
79 class ViewporterInterface;
80 class ScreencastV1Interface;
81 class InputMethodV1Interface;
82 class InputPanelV1Interface;
83 class LayerShellV1Interface;
84 
90 class KWAYLANDSERVER_EXPORT Display : public QObject
91 {
92  Q_OBJECT
93  Q_PROPERTY(QString socketName READ socketName WRITE setSocketName NOTIFY socketNameChanged)
94  Q_PROPERTY(bool automaticSocketNaming READ automaticSocketNaming WRITE setAutomaticSocketNaming NOTIFY automaticSocketNamingChanged)
95  Q_PROPERTY(bool running READ isRunning NOTIFY runningChanged)
96 public:
97  explicit Display(QObject *parent = nullptr);
98  virtual ~Display();
99 
104  void setSocketName(const QString &name);
105  QString socketName() const;
106 
113  void setAutomaticSocketNaming(bool automaticSocketNaming);
114  bool automaticSocketNaming() const;
115 
116  quint32 serial();
117  quint32 nextSerial();
118 
124  enum class StartMode {
125  ConnectToSocket,
126  ConnectClientsOnly
127  };
132  bool start(StartMode mode = StartMode::ConnectToSocket);
140  void dispatchEvents(int msecTimeout = -1);
141 
153  ClientConnection *createClient(int fd);
154 
155  operator wl_display*();
156  operator wl_display*() const;
157  bool isRunning() const;
158 
159  OutputInterface *createOutput(QObject *parent = nullptr);
160  void removeOutput(OutputInterface *output);
161  QList<OutputInterface*> outputs() const;
162 
163  OutputDeviceInterface *createOutputDevice(QObject *parent = nullptr);
164  void removeOutputDevice(OutputDeviceInterface *output);
165  QList<OutputDeviceInterface*> outputDevices() const;
166 
167  CompositorInterface *createCompositor(QObject *parent = nullptr);
168  void createShm();
169  SeatInterface *createSeat(QObject *parent = nullptr);
174  QVector<SeatInterface*> seats() const;
175  SubCompositorInterface *createSubCompositor(QObject *parent = nullptr);
176  DataDeviceManagerInterface *createDataDeviceManager(QObject *parent = nullptr);
177  OutputManagementInterface *createOutputManagement(QObject *parent = nullptr);
178  PlasmaShellInterface *createPlasmaShell(QObject *parent = nullptr);
179  PlasmaWindowManagementInterface *createPlasmaWindowManagement(QObject *parent = nullptr);
180  QtSurfaceExtensionInterface *createQtSurfaceExtension(QObject *parent = nullptr);
181  IdleInterface *createIdle(QObject *parent = nullptr);
182  FakeInputInterface *createFakeInput(QObject *parent = nullptr);
183  ShadowManagerInterface *createShadowManager(QObject *parent = nullptr);
184  BlurManagerInterface *createBlurManager(QObject *parent = nullptr);
185  ContrastManagerInterface *createContrastManager(QObject *parent = nullptr);
186  SlideManagerInterface *createSlideManager(QObject *parent = nullptr);
187  DpmsManagerInterface *createDpmsManager(QObject *parent = nullptr);
188 
190  KeyStateInterface *createKeyStateInterface(QObject *parent = nullptr);
191 
195  ServerSideDecorationManagerInterface *createServerSideDecorationManager(QObject *parent = nullptr);
201  TextInputManagerV2Interface *createTextInputManagerV2(QObject *parent = nullptr);
202 
208  TextInputManagerV3Interface *createTextInputManagerV3(QObject *parent = nullptr);
209 
215  XdgShellInterface *createXdgShell(QObject *parent = nullptr);
216 
223  RelativePointerManagerInterface *createRelativePointerManager(const RelativePointerInterfaceVersion &version, QObject *parent = nullptr);
224 
231  PointerGesturesInterface *createPointerGestures(const PointerGesturesInterfaceVersion &version, QObject *parent = nullptr);
232 
239  PointerConstraintsInterface *createPointerConstraints(const PointerConstraintsInterfaceVersion &version, QObject *parent = nullptr);
240 
247  XdgForeignV2Interface *createXdgForeignV2Interface(QObject *parent = nullptr);
248 
255  IdleInhibitManagerV1Interface *createIdleInhibitManagerV1(QObject *parent = nullptr);
256 
263  AppMenuManagerInterface *createAppMenuManagerInterface(QObject *parent = nullptr);
264 
271  ServerSideDecorationPaletteManagerInterface *createServerSideDecorationPaletteManager(QObject *parent = nullptr);
272 
278  LinuxDmabufUnstableV1Interface *createLinuxDmabufInterface(QObject *parent = nullptr);
279 
286  XdgOutputManagerV1Interface *createXdgOutputManagerV1(QObject *parent = nullptr);
287 
288 
295  PlasmaVirtualDesktopManagementInterface *createPlasmaVirtualDesktopManagement(QObject *parent = nullptr);
296 
304  XdgDecorationManagerV1Interface *createXdgDecorationManagerV1(QObject *parent = nullptr);
305 
312  EglStreamControllerInterface *createEglStreamControllerInterface(QObject *parent = nullptr);
313 
314  InputMethodV1Interface *createInputMethodInterface(QObject *parent = nullptr);
315  InputPanelV1Interface *createInputPanelInterface(QObject *parent = nullptr);
316 
321  DataControlDeviceManagerV1Interface *createDataControlDeviceManagerV1(QObject *parent = nullptr);
322 
328  TabletManagerInterface *createTabletManagerInterface(QObject *parent = nullptr);
329 
333  KeyboardShortcutsInhibitManagerV1Interface *createKeyboardShortcutsInhibitManagerV1(QObject *parent = nullptr);
334 
338  ViewporterInterface *createViewporter(QObject *parent = nullptr);
339 
343  PrimarySelectionDeviceManagerV1Interface *createPrimarySelectionDeviceManagerV1(QObject *parent = nullptr);
344 
348  ScreencastV1Interface *createScreencastV1Interface(QObject *parent = nullptr);
349 
353  LayerShellV1Interface *createLayerShellV1(QObject *parent = nullptr);
354 
361  ClientConnection *getConnection(wl_client *client);
362  QVector<ClientConnection*> connections() const;
363 
373  void setEglDisplay(void *display);
379  void *eglDisplay() const;
380 
381 Q_SIGNALS:
382  void socketNameChanged(const QString&);
383  void automaticSocketNamingChanged(bool);
384  void runningChanged(bool);
385  void aboutToTerminate();
386  void clientConnected(KWaylandServer::ClientConnection*);
387  void clientDisconnected(KWaylandServer::ClientConnection*);
388 
389 private:
390  class Private;
392 };
393 
394 }
395 
396 #endif
Represents a Seat on the Wayland Display.
Manager to create ServerSideDecorationInterface.
Represents the global zpw_linux_dmabuf_v1 interface.
Global for the wl_output interface.
Global for the org_kde_plasma_shell interface.
Global for server side Display Power Management Signaling interface.
StartMode
How to setup the server connection.
Definition: display.h:124
Wrapper for the org_kde_plasma_virtual_desktop_management interface.
Class holding the Wayland server display loop.
Definition: display.h:90
Provides the DBus service name and object path to a AppMenu DBus interface.
Represents the Global for zwp_primary_selection_manager_v1 interface.
Represents an output device, the difference to Output is that this output can be disabled, so not currently used to display content.
Represents the Global for wl_data_device_manager interface.
Manager object for the PointerGestures.
Represents the Global for org_kde_kwin_blur_manager interface.
Represents the Global for org_kde_kwin_fake_input interface.
The XdgShellInterface class represents an extension for destrop-style user interfaces.
Represents the Global for the wl_eglstream_controller interface.
Represents the Global for org_kde_kwin_contrast_manager interface.
The ViewporterInterface is an extension that allows clients to crop and scale surfaces.
The IdleInhibitorManagerInterface is used by clients to inhibit idle on a SurfaceInterface.
Manager object to create relative pointer interfaces.
This class encapsulates the server side logic of the XdgForeign protocol.
Manager object to create pointer constraints.
Convenient Class which represents a wl_client.
The LayerShellV1Interface compositor extension allows to create desktop shell surfaces.
Represent the Global for the interface.
The XdgDecorationManagerV1Interface class provides a way for the compositor and an xdg-shell client t...
Global representing the org_kde_kwin_idle interface.
Represent the Global for the interface.
Allows a client to specify a preferred palette to use for server-side window decorations.
The KeyboardShortcutsInhibitManagerV1Interface allows clients to inhibit global shortcuts.
The DataControlDeviceManagerV1Interface provides a way for privileged clients such as clipboard manag...
Implements zwp_input_panel_v1, tells us about the InputPanelSurfaceV1Interface that we might get...
The CompositorInterface global allows clients to create surfaces and region objects.
Exposes key states to wayland clients.
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Oct 19 2020 23:13:14 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.