KWayland

display.cpp
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 #include "display.h"
8 #include "appmenu_interface.h"
9 #include "blur_interface.h"
10 #include "compositor_interface.h"
11 #include "contrast_interface.h"
12 #include "datadevicemanager_interface.h"
13 #include "dpms_interface.h"
14 #include "eglstream_controller_interface.h"
15 #include "fakeinput_interface.h"
16 #include "idle_interface.h"
17 #include "idleinhibit_interface_p.h"
18 #include "keystate_interface.h"
19 #include "linuxdmabuf_v1_interface.h"
20 #include "logging.h"
21 #include "output_interface.h"
22 #include "outputconfiguration_interface.h"
23 #include "outputdevice_interface.h"
24 #include "outputmanagement_interface.h"
25 #include "plasmashell_interface.h"
26 #include "plasmavirtualdesktop_interface.h"
27 #include "plasmawindowmanagement_interface.h"
28 #include "pointerconstraints_interface_p.h"
29 #include "pointergestures_interface_p.h"
30 #include "qtsurfaceextension_interface.h"
31 #include "relativepointer_interface_p.h"
32 #include "remote_access_interface.h"
33 #include "seat_interface.h"
34 #include "server_decoration_interface.h"
35 #include "server_decoration_palette_interface.h"
36 #include "shadow_interface.h"
37 #include "shell_interface.h"
38 #include "slide_interface.h"
39 #include "subcompositor_interface.h"
40 #include "tablet_interface.h"
41 #include "textinput_interface_p.h"
42 #include "xdgdecoration_interface.h"
43 #include "xdgforeign_interface.h"
44 #include "xdgoutput_interface.h"
45 #include "xdgshell_stable_interface_p.h"
46 #include "xdgshell_v5_interface_p.h"
47 #include "xdgshell_v6_interface_p.h"
48 
49 #include <QCoreApplication>
50 #include <QDebug>
51 #include <QAbstractEventDispatcher>
52 #include <QSocketNotifier>
53 #include <QThread>
54 
55 #include <wayland-server.h>
56 
57 #include <EGL/egl.h>
58 
59 namespace KWayland
60 {
61 namespace Server
62 {
63 
64 class Display::Private
65 {
66 public:
67  Private(Display *q);
68  void flush();
69  void dispatch();
70  void setRunning(bool running);
71  void installSocketNotifier();
72 
73  wl_display *display = nullptr;
74  wl_event_loop *loop = nullptr;
75  QString socketName = QStringLiteral("wayland-0");
76  bool running = false;
77  bool automaticSocketNaming = false;
79  QList<OutputDeviceInterface*> outputdevices;
82  EGLDisplay eglDisplay = EGL_NO_DISPLAY;
83 
84 private:
85  Display *q;
86 };
87 
88 Display::Private::Private(Display *q)
89  : q(q)
90 {
91 }
92 
93 void Display::Private::installSocketNotifier()
94 {
95  if (!QThread::currentThread()) {
96  return;
97  }
98  int fd = wl_event_loop_get_fd(loop);
99  if (fd == -1) {
100  qCWarning(KWAYLAND_SERVER) << "Did not get the file descriptor for the event loop";
101  return;
102  }
103  QSocketNotifier *m_notifier = new QSocketNotifier(fd, QSocketNotifier::Read, q);
104  QObject::connect(m_notifier, &QSocketNotifier::activated, q, [this] { dispatch(); } );
106  setRunning(true);
107 }
108 
109 Display::Display(QObject *parent)
110  : QObject(parent)
111  , d(new Private(this))
112 {
113 }
114 
115 Display::~Display()
116 {
117  terminate();
118  if (d->display) {
119  wl_display_destroy(d->display);
120  }
121 }
122 
123 void Display::Private::flush()
124 {
125  if (!display || !loop) {
126  return;
127  }
128  wl_display_flush_clients(display);
129 }
130 
131 void Display::Private::dispatch()
132 {
133  if (!display || !loop) {
134  return;
135  }
136  if (wl_event_loop_dispatch(loop, 0) != 0) {
137  qCWarning(KWAYLAND_SERVER) << "Error on dispatching Wayland event loop";
138  }
139 }
140 
142 {
143  if (d->socketName == name) {
144  return;
145  }
146  d->socketName = name;
147  emit socketNameChanged(d->socketName);
148 }
149 
150 QString Display::socketName() const
151 {
152  return d->socketName;
153 }
154 
155 void Display::setAutomaticSocketNaming(bool automaticSocketNaming)
156 {
157  if (d->automaticSocketNaming == automaticSocketNaming) {
158  return;
159  }
160  d->automaticSocketNaming = automaticSocketNaming;
161  emit automaticSocketNamingChanged(automaticSocketNaming);
162 }
163 
164 bool Display::automaticSocketNaming() const
165 {
166  return d->automaticSocketNaming;
167 }
168 
169 void Display::start(StartMode mode)
170 {
171  Q_ASSERT(!d->running);
172  Q_ASSERT(!d->display);
173  d->display = wl_display_create();
174  if (mode == StartMode::ConnectToSocket) {
175  if (d->automaticSocketNaming) {
176  const char *socket = wl_display_add_socket_auto(d->display);
177  if (socket == nullptr) {
178  qCWarning(KWAYLAND_SERVER) << "Failed to create Wayland socket";
179  return;
180  }
181 
182  const QString newEffectiveSocketName = QString::fromUtf8(socket);
183  if (d->socketName != newEffectiveSocketName) {
184  d->socketName = newEffectiveSocketName;
185  emit socketNameChanged(d->socketName);
186  }
187  } else if (wl_display_add_socket(d->display, qPrintable(d->socketName)) != 0) {
188  qCWarning(KWAYLAND_SERVER) << "Failed to create Wayland socket";
189  return;
190  }
191  }
192 
193  d->loop = wl_display_get_event_loop(d->display);
194  d->installSocketNotifier();
195 }
196 
198 {
199  Q_ASSERT(!d->running);
200  Q_ASSERT(d->display);
201  d->installSocketNotifier();
202 }
203 
204 void Display::dispatchEvents(int msecTimeout)
205 {
206  Q_ASSERT(d->display);
207  if (d->running) {
208  d->dispatch();
209  } else if (d->loop) {
210  wl_event_loop_dispatch(d->loop, msecTimeout);
211  wl_display_flush_clients(d->display);
212  }
213 }
214 
215 void Display::terminate()
216 {
217  if (!d->running) {
218  return;
219  }
220  emit aboutToTerminate();
221  wl_display_terminate(d->display);
222  wl_display_destroy(d->display);
223  d->display = nullptr;
224  d->loop = nullptr;
225  d->setRunning(false);
226 }
227 
228 void Display::Private::setRunning(bool r)
229 {
230  Q_ASSERT(running != r);
231  running = r;
232  emit q->runningChanged(running);
233 }
234 
235 OutputInterface *Display::createOutput(QObject *parent)
236 {
237  OutputInterface *output = new OutputInterface(this, parent);
238  connect(output, &QObject::destroyed, this, [this,output] { d->outputs.removeAll(output); });
239  connect(this, &Display::aboutToTerminate, output, [this,output] { removeOutput(output); });
240  d->outputs << output;
241  return output;
242 }
243 
244 CompositorInterface *Display::createCompositor(QObject *parent)
245 {
246  CompositorInterface *compositor = new CompositorInterface(this, parent);
247  connect(this, &Display::aboutToTerminate, compositor, [compositor] { delete compositor; });
248  return compositor;
249 }
250 
251 ShellInterface *Display::createShell(QObject *parent)
252 {
253  ShellInterface *shell = new ShellInterface(this, parent);
254  connect(this, &Display::aboutToTerminate, shell, [shell] { delete shell; });
255  return shell;
256 }
257 
258 OutputDeviceInterface *Display::createOutputDevice(QObject *parent)
259 {
260  OutputDeviceInterface *output = new OutputDeviceInterface(this, parent);
261  connect(output, &QObject::destroyed, this, [this,output] { d->outputdevices.removeAll(output); });
262  connect(this, &Display::aboutToTerminate, output, [this,output] { removeOutputDevice(output); });
263  d->outputdevices << output;
264  return output;
265 }
266 
267 OutputManagementInterface *Display::createOutputManagement(QObject *parent)
268 {
269  OutputManagementInterface *om = new OutputManagementInterface(this, parent);
270  connect(this, &Display::aboutToTerminate, om, [om] { delete om; });
271  return om;
272 }
273 
274 SeatInterface *Display::createSeat(QObject *parent)
275 {
276  SeatInterface *seat = new SeatInterface(this, parent);
277  connect(seat, &QObject::destroyed, this, [this, seat] { d->seats.removeAll(seat); });
278  connect(this, &Display::aboutToTerminate, seat, [seat] { delete seat; });
279  d->seats << seat;
280  return seat;
281 }
282 
283 SubCompositorInterface *Display::createSubCompositor(QObject *parent)
284 {
285  auto c = new SubCompositorInterface(this, parent);
286  connect(this, &Display::aboutToTerminate, c, [c] { delete c; });
287  return c;
288 }
289 
290 DataDeviceManagerInterface *Display::createDataDeviceManager(QObject *parent)
291 {
292  auto m = new DataDeviceManagerInterface(this, parent);
293  connect(this, &Display::aboutToTerminate, m, [m] { delete m; });
294  return m;
295 }
296 
297 PlasmaShellInterface *Display::createPlasmaShell(QObject* parent)
298 {
299  auto s = new PlasmaShellInterface(this, parent);
300  connect(this, &Display::aboutToTerminate, s, [s] { delete s; });
301  return s;
302 }
303 
304 PlasmaWindowManagementInterface *Display::createPlasmaWindowManagement(QObject *parent)
305 {
306  auto wm = new PlasmaWindowManagementInterface(this, parent);
307  connect(this, &Display::aboutToTerminate, wm, [wm] { delete wm; });
308  return wm;
309 }
310 
311 QtSurfaceExtensionInterface *Display::createQtSurfaceExtension(QObject *parent)
312 {
313  auto s = new QtSurfaceExtensionInterface(this, parent);
314  connect(this, &Display::aboutToTerminate, s, [s] { delete s; });
315  return s;
316 }
317 
318 RemoteAccessManagerInterface *Display::createRemoteAccessManager(QObject *parent)
319 {
320  auto i = new RemoteAccessManagerInterface(this, parent);
321  connect(this, &Display::aboutToTerminate, i, [i] { delete i; });
322  return i;
323 }
324 
325 IdleInterface *Display::createIdle(QObject *parent)
326 {
327  auto i = new IdleInterface(this, parent);
328  connect(this, &Display::aboutToTerminate, i, [i] { delete i; });
329  return i;
330 }
331 
332 FakeInputInterface *Display::createFakeInput(QObject *parent)
333 {
334  auto i = new FakeInputInterface(this, parent);
335  connect(this, &Display::aboutToTerminate, i, [i] { delete i; });
336  return i;
337 }
338 
339 ShadowManagerInterface *Display::createShadowManager(QObject *parent)
340 {
341  auto s = new ShadowManagerInterface(this, parent);
342  connect(this, &Display::aboutToTerminate, s, [s] { delete s; });
343  return s;
344 }
345 
346 BlurManagerInterface *Display::createBlurManager(QObject *parent)
347 {
348  auto b = new BlurManagerInterface(this, parent);
349  connect(this, &Display::aboutToTerminate, b, [b] { delete b; });
350  return b;
351 }
352 
353 ContrastManagerInterface *Display::createContrastManager(QObject *parent)
354 {
355  auto b = new ContrastManagerInterface(this, parent);
356  connect(this, &Display::aboutToTerminate, b, [b] { delete b; });
357  return b;
358 }
359 
360 SlideManagerInterface *Display::createSlideManager(QObject *parent)
361 {
362  auto b = new SlideManagerInterface(this, parent);
363  connect(this, &Display::aboutToTerminate, b, [b] { delete b; });
364  return b;
365 }
366 
367 DpmsManagerInterface *Display::createDpmsManager(QObject *parent)
368 {
369  auto d = new DpmsManagerInterface(this, parent);
370  connect(this, &Display::aboutToTerminate, d, [d] { delete d; });
371  return d;
372 }
373 
375 {
376  auto d = new ServerSideDecorationManagerInterface(this, parent);
377  connect(this, &Display::aboutToTerminate, d, [d] { delete d; });
378  return d;
379 }
380 
382 {
383  TextInputManagerInterface *t = nullptr;
384  switch (version) {
386  t = new TextInputManagerUnstableV0Interface(this, parent);
387  break;
389  // unsupported
390  return nullptr;
392  t = new TextInputManagerUnstableV2Interface(this, parent);
393  }
394  connect(this, &Display::aboutToTerminate, t, [t] { delete t; });
395  return t;
396 }
397 
399 {
400  XdgShellInterface *x = nullptr;
401  switch (version) {
403  x = new XdgShellV5Interface(this, parent);
404  break;
406  x = new XdgShellV6Interface(this, parent);
407  break;
409  x = new XdgShellStableInterface(this, parent);
410  break;
411  }
412  connect(this, &Display::aboutToTerminate, x, [x] { delete x; });
413  return x;
414 }
415 
417 {
418  RelativePointerManagerInterface *r = nullptr;
419  switch (version) {
421  r = new RelativePointerManagerUnstableV1Interface(this, parent);
422  break;
423  }
424  connect(this, &Display::aboutToTerminate, r, [r] { delete r; });
425  return r;
426 }
427 
429 {
430  PointerGesturesInterface *p = nullptr;
431  switch (version) {
433  p = new PointerGesturesUnstableV1Interface(this, parent);
434  break;
435  }
436  connect(this, &Display::aboutToTerminate, p, [p] { delete p; });
437  return p;
438 }
439 
441 {
442  PointerConstraintsInterface *p = nullptr;
443  switch (version) {
445  p = new PointerConstraintsUnstableV1Interface(this, parent);
446  break;
447  }
448  connect(this, &Display::aboutToTerminate, p, [p] { delete p; });
449  return p;
450 }
451 
453 {
454  XdgForeignInterface *foreign = new XdgForeignInterface(this, parent);
455  connect(this, &Display::aboutToTerminate, foreign, [foreign] { delete foreign; });
456  return foreign;
457 }
458 
460 {
461  IdleInhibitManagerInterface *i = nullptr;
462  switch (version) {
464  i = new IdleInhibitManagerUnstableV1Interface(this, parent);
465  break;
466  }
467  connect(this, &Display::aboutToTerminate, i, [i] { delete i; });
468  return i;
469 }
470 
472 {
473  auto b = new AppMenuManagerInterface(this, parent);
474  connect(this, &Display::aboutToTerminate, b, [b] { delete b; });
475  return b;
476 }
477 
479 {
480  auto b = new ServerSideDecorationPaletteManagerInterface(this, parent);
481  connect(this, &Display::aboutToTerminate, b, [b] { delete b; });
482  return b;
483 }
484 
486 {
487  auto b = new LinuxDmabufUnstableV1Interface(this, parent);
488  connect(this, &Display::aboutToTerminate, b, [b] { delete b; });
489  return b;
490 }
491 
493 {
494  auto b = new PlasmaVirtualDesktopManagementInterface(this, parent);
495  connect(this, &Display::aboutToTerminate, b, [b] { delete b; });
496  return b;
497 }
498 
500 {
501  auto b = new XdgOutputManagerInterface(this, parent);
502  connect(this, &Display::aboutToTerminate, b, [b] { delete b; });
503  return b;
504 }
505 
507 {
508  auto d = new XdgDecorationManagerInterface(this, shellInterface, parent);
509  connect(this, &Display::aboutToTerminate, d, [d] { delete d; });
510  return d;
511 }
512 
514 {
516  connect(this, &Display::aboutToTerminate, e, [e] { delete e; });
517  return e;
518 }
519 
520 KeyStateInterface *Display::createKeyStateInterface(QObject *parent)
521 {
522  auto d = new KeyStateInterface(this, parent);
523  connect(this, &Display::aboutToTerminate, d, [d] { delete d; });
524  return d;
525 }
526 
527 TabletManagerInterface *Display::createTabletManagerInterface(QObject *parent)
528 {
529  auto d = new TabletManagerInterface(this, parent);
530  connect(this, &Display::aboutToTerminate, d, [d] { delete d; });
531  return d;
532 }
533 
534 void Display::createShm()
535 {
536  Q_ASSERT(d->display);
537  wl_display_init_shm(d->display);
538 }
539 
540 void Display::removeOutput(OutputInterface *output)
541 {
542  d->outputs.removeAll(output);
543  delete output;
544 }
545 
546 void Display::removeOutputDevice(OutputDeviceInterface *output)
547 {
548  d->outputdevices.removeAll(output);
549  delete output;
550 }
551 
552 quint32 Display::nextSerial()
553 {
554  return wl_display_next_serial(d->display);
555 }
556 
557 quint32 Display::serial()
558 {
559  return wl_display_get_serial(d->display);
560 }
561 
562 bool Display::isRunning() const
563 {
564  return d->running;
565 }
566 
567 Display::operator wl_display*()
568 {
569  return d->display;
570 }
571 
572 Display::operator wl_display*() const
573 {
574  return d->display;
575 }
576 
577 QList< OutputInterface* > Display::outputs() const
578 {
579  return d->outputs;
580 }
581 
582 QList< OutputDeviceInterface* > Display::outputDevices() const
583 {
584  return d->outputdevices;
585 }
586 
588 {
589  return d->seats;
590 }
591 
593 {
594  Q_ASSERT(client);
595  auto it = std::find_if(d->clients.constBegin(), d->clients.constEnd(),
596  [client](ClientConnection *c) {
597  return c->client() == client;
598  }
599  );
600  if (it != d->clients.constEnd()) {
601  return *it;
602  }
603  // no ConnectionData yet, create it
604  auto c = new ClientConnection(client, this);
605  d->clients << c;
607  [this] (ClientConnection *c) {
608  const int index = d->clients.indexOf(c);
609  Q_ASSERT(index != -1);
610  d->clients.remove(index);
611  Q_ASSERT(d->clients.indexOf(c) == -1);
612  emit clientDisconnected(c);
613  }
614  );
615  emit clientConnected(c);
616  return c;
617 }
618 
619 QVector< ClientConnection* > Display::connections() const
620 {
621  return d->clients;
622 }
623 
625 {
626  Q_ASSERT(fd != -1);
627  Q_ASSERT(d->display);
628  wl_client *c = wl_client_create(d->display, fd);
629  if (!c) {
630  return nullptr;
631  }
632  return getConnection(c);
633 }
634 
635 void Display::setEglDisplay(void *display)
636 {
637  if (d->eglDisplay != EGL_NO_DISPLAY) {
638  qCWarning(KWAYLAND_SERVER) << "EGLDisplay cannot be changed";
639  return;
640  }
641  d->eglDisplay = (EGLDisplay)display;
642 }
643 
644 void *Display::eglDisplay() const
645 {
646  return d->eglDisplay;
647 }
648 
649 }
650 }
EglStreamControllerInterface * createEglStreamControllerInterface(QObject *parent=nullptr)
Creates the EglStreamControllerInterface.
Definition: display.cpp:513
void activated(int socket)
StartMode
How to setup the server connection.
Definition: display.h:123
XdgOutputManagerInterface * createXdgOutputManager(QObject *parent=nullptr)
Creates the XdgOutputManagerInterface.
Definition: display.cpp:499
LinuxDmabufUnstableV1Interface * createLinuxDmabufInterface(QObject *parent=nullptr)
Creates the LinuxDmabufUnstableV1Interface in interface version.
Definition: display.cpp:485
Global for the org_kde_plasma_shell interface.
ClientConnection * getConnection(wl_client *client)
Gets the ClientConnection for the given client.
Definition: display.cpp:592
PointerConstraintsInterfaceVersion
Enum describing the interface versions the PointerConstraintsInterface can support.
TabletManagerInterface * createTabletManagerInterface(QObject *parent=nullptr)
Creates the entry point to support wacom-like tablets and pens.
Definition: display.cpp:527
PointerConstraintsInterface * createPointerConstraints(const PointerConstraintsInterfaceVersion &version, QObject *parent=nullptr)
Creates the PointerConstraintsInterface in interface version.
Definition: display.cpp:440
ClientConnection * createClient(int fd)
Create a client for the given file descriptor.
Definition: display.cpp:624
Represents the global zpw_linux_dmabuf_v1 interface.
XdgShellInterface * createXdgShell(const XdgShellInterfaceVersion &version, QObject *parent=nullptr)
Creates the XdgShell in interface version.
Definition: display.cpp:398
Global for server side Display Power Management Signaling interface.
void setSocketName(const QString &name)
Sets the basename of the socket to name.
Definition: display.cpp:141
The IdleInhibitorManagerInterface is used by clients to inhibit idle on a SurfaceInterface.
Manager to create ServerSideDecorationInterface.
Represents the Global for wl_data_device_manager interface.
IdleInhibitManagerInterface * createIdleInhibitManager(const IdleInhibitManagerInterfaceVersion &version, QObject *parent=nullptr)
Creates the IdleInhibitManagerInterface in interface version.
Definition: display.cpp:459
PointerGesturesInterfaceVersion
Enum describing the interface versions the PointerGesturesInterface can support.
void startLoop()
Starts the event loop for the server socket.
Definition: display.cpp:197
RelativePointerManagerInterface * createRelativePointerManager(const RelativePointerInterfaceVersion &version, QObject *parent=nullptr)
Creates the RelativePointerManagerInterface in interface version.
Definition: display.cpp:416
Represents the Global for the wl_eglstream_controller interface.
Global for the wl_output interface.
TextInputInterfaceVersion
Enum describing the different InterfaceVersion encapsulated in this implementation.
PlasmaVirtualDesktopManagementInterface * createPlasmaVirtualDesktopManagement(QObject *parent=nullptr)
Creates the PlasmaVirtualDesktopManagementInterface in interface version.
Definition: display.cpp:492
Represents a Seat on the Wayland Display.
ServerSideDecorationManagerInterface * createServerSideDecorationManager(QObject *parent=nullptr)
Definition: display.cpp:374
QString fromUtf8(const char *str, int size)
AppMenuManagerInterface * createAppMenuManagerInterface(QObject *parent=nullptr)
Creates the AppMenuManagerInterface in interface version.
Definition: display.cpp:471
ServerSideDecorationPaletteManagerInterface * createServerSideDecorationPaletteManager(QObject *parent=nullptr)
Creates the ServerSideDecorationPaletteManagerInterface in interface version.
Definition: display.cpp:478
wl_text_input as the non-standardized version
The XdgDecorationManagerInterface class.
XdgShellInterfaceVersion
Enum describing the different InterfaceVersion encapsulated in this implementation.
Represents the Global for org_kde_kwin_contrast_manager interface.
Represents the Global for org_kde_kwin_blur_manager interface.
KeyStateInterface * createKeyStateInterface(QObject *parent=nullptr)
Definition: display.cpp:520
void disconnected(KWayland::Server::ClientConnection *)
Signal emitted when the ClientConnection got disconnected from the server.
XdgDecorationManagerInterface * createXdgDecorationManager(XdgShellInterface *shellInterface, QObject *parent=nullptr)
Creates the XdgDecorationManagerInterface.
Definition: display.cpp:506
Represents the Global for wl_compositor interface.
Manager object to create relative pointer interfaces.
QVector< SeatInterface * > seats() const
Definition: display.cpp:587
void * eglDisplay() const
Definition: display.cpp:644
Represent the Global for the interface.
void setAutomaticSocketNaming(bool automaticSocketNaming)
If automaticSocketNaming is true, the manually set socketName is ignored and it will use wl_display_a...
Definition: display.cpp:155
Wrapper for the org_kde_plasma_virtual_desktop_management interface.
PointerGesturesInterface * createPointerGestures(const PointerGesturesInterfaceVersion &version, QObject *parent=nullptr)
Creates the PointerGesturesInterface in interface version.
Definition: display.cpp:428
Represents an output device, the difference to Output is that this output can be disabled, so not currently used to display content.
Global representing the org_kde_kwin_idle interface.
QTextStream & flush(QTextStream &stream)
QThread * currentThread()
This class encapsulates the server side logic of the XdgForeign protocol.
void dispatchEvents(int msecTimeout=-1)
Dispatches pending events in a blocking way.
Definition: display.cpp:204
Global for the wl_shell interface.
Convenient Class which represents a wl_client.
Manager object for the PointerGestures.
Provides the DBus service name and object path to a AppMenu DBus interface.
Allows a client to specify a preferred palette to use for server-side window decorations.
ClientConnection * client()
Definition: resource.cpp:78
IdleInhibitManagerInterfaceVersion
Enum describing the interface versions the IdleInhibitManagerInterface can support.
void setEglDisplay(void *display)
Set the EGL display for this Wayland display.
Definition: display.cpp:635
QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
QObject * parent() const const
Manager object to create pointer constraints.
XdgForeignInterface * createXdgForeignInterface(QObject *parent=nullptr)
Creates the XdgForeignInterface in interface version.
Definition: display.cpp:452
Represents the Global for org_kde_kwin_fake_input interface.
void destroyed(QObject *obj)
TextInputManagerInterface * createTextInputManager(const TextInputInterfaceVersion &version, QObject *parent=nullptr)
Create the text input manager in interface version.
Definition: display.cpp:381
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon May 25 2020 23:07:18 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.