KWayland

remote_access.h
1 /*
2  SPDX-FileCopyrightText: 2016 Oleg Chernovskiy <[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_CLIENT_REMOTE_ACCESS_H
7 #define KWAYLAND_CLIENT_REMOTE_ACCESS_H
8 
9 #include <QObject>
10 
11 #include <KWayland/Client/kwaylandclient_export.h>
12 
13 struct org_kde_kwin_remote_access_manager;
14 struct org_kde_kwin_remote_buffer;
15 struct wl_output;
16 
17 namespace KWayland
18 {
19 namespace Client
20 {
21 
22 class EventQueue;
23 class RemoteBuffer;
24 
48 class KWAYLANDCLIENT_EXPORT RemoteAccessManager : public QObject
49 {
50  Q_OBJECT
51 public:
58  explicit RemoteAccessManager(QObject *parent = nullptr);
59  virtual ~RemoteAccessManager();
60 
66  void setup(org_kde_kwin_remote_access_manager *remoteaccessmanager);
70  bool isValid() const;
76  void release();
93  void destroy();
94 
98  void setEventQueue(EventQueue *queue);
102  EventQueue *eventQueue();
103 
104  operator org_kde_kwin_remote_access_manager*();
105  operator org_kde_kwin_remote_access_manager*() const;
106 
107 Q_SIGNALS:
114  void removed();
115 
120  void bufferReady(const void* output, const RemoteBuffer *rbuf);
121 
122 private:
123  class Private;
125 };
126 
132 class KWAYLANDCLIENT_EXPORT RemoteBuffer : public QObject
133 {
134  Q_OBJECT
135 public:
136  virtual ~RemoteBuffer();
140  void setup(org_kde_kwin_remote_buffer *remotebuffer);
144  bool isValid() const;
150  void release();
167  void destroy();
168 
169  operator org_kde_kwin_remote_buffer*();
170  operator org_kde_kwin_remote_buffer*() const;
171 
172  qint32 fd() const;
173  quint32 width() const;
174  quint32 height() const;
175  quint32 stride() const;
176  quint32 format() const;
177 
178 
179 Q_SIGNALS:
180  void parametersObtained();
181 
182 private:
183 
184  friend class RemoteAccessManager;
185  explicit RemoteBuffer(QObject *parent = nullptr);
186  class Private;
188 };
189 
190 
191 }
192 }
193 
194 #endif
Wrapper class for wl_event_queue interface.
Definition: event_queue.h:55
Wrapper for the org_kde_kwin_remote_access_manager interface.
Definition: remote_access.h:48
Wrapper for org_kde_kwin_remote_buffer interface.
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Fri Aug 14 2020 22:49:58 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.