KWayland

xdgoutput_interface.h
1 /*
2  SPDX-FileCopyrightText: 2018 David Edmundson <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
5 */
6 #ifndef KWAYLAND_SERVER_XDGOUTPUT_INTERFACE_H
7 #define KWAYLAND_SERVER_XDGOUTPUT_INTERFACE_H
8 
9 #include "global.h"
10 #include "resource.h"
11 
12 
13 #include <KWayland/Server/kwaylandserver_export.h>
14 
15 
16 /*
17  * In terms of protocol XdgOutputInterface are a resource
18  * but for the sake of sanity, we should treat XdgOutputs as globals like Output is
19  * Hence this doesn't match most of kwayland API paradigms.
20  */
21 
22 namespace KWayland
23 {
24 namespace Server
25 {
26 
27 class Display;
28 class OutputInterface;
29 class XdgOutputInterface;
30 
35 class KWAYLANDSERVER_EXPORT XdgOutputManagerInterface : public Global
36 {
37  Q_OBJECT
38 public:
39  virtual ~XdgOutputManagerInterface();
47  XdgOutputInterface* createXdgOutput(OutputInterface *output, QObject *parent);
48 private:
49  explicit XdgOutputManagerInterface(Display *display, QObject *parent = nullptr);
50  friend class Display;
51  class Private;
52  Private *d_func() const;
53 };
54 
61 class KWAYLANDSERVER_EXPORT XdgOutputInterface : public QObject
62 {
63  Q_OBJECT
64 public:
65  virtual ~XdgOutputInterface();
66 
71  void setLogicalSize(const QSize &size);
72 
76  QSize logicalSize() const;
77 
83  void setLogicalPosition(const QPoint &pos);
84 
88  QPoint logicalPosition() const;
89 
96  void setName(const QString &name);
101  void name() const;
102 
109  void setDescription(const QString &description);
114  void description() const;
115 
119  void done();
120 
121 private:
122  explicit XdgOutputInterface(QObject *parent);
123  friend class XdgOutputManagerInterface;
124 
125  class Private;
127 };
128 
129 
130 }
131 }
132 
133 #endif
Global for the wl_output interface.
Class holding the Wayland server display loop.
Definition: display.h:89
Base class for all Globals.
Definition: global.h:46
Extension to Output Users should set all relevant values on creation and on future changes...
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Fri Aug 7 2020 22:48:21 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.