Changeset View
Changeset View
Standalone View
Standalone View
src/waylandintegration.h
Show All 25 Lines | |||||
26 | #include <QSize> | 26 | #include <QSize> | ||
27 | #include <QVariant> | 27 | #include <QVariant> | ||
28 | 28 | | |||
29 | #include <gbm.h> | 29 | #include <gbm.h> | ||
30 | 30 | | |||
31 | #include <epoxy/egl.h> | 31 | #include <epoxy/egl.h> | ||
32 | #include <epoxy/gl.h> | 32 | #include <epoxy/gl.h> | ||
33 | 33 | | |||
34 | namespace KWayland { | ||||
35 | namespace Client { | ||||
36 | class PlasmaWindowManagement; | ||||
37 | } | ||||
38 | } | ||||
39 | | ||||
34 | namespace WaylandIntegration | 40 | namespace WaylandIntegration | ||
35 | { | 41 | { | ||
36 | 42 | | |||
37 | struct EGLStruct { | 43 | struct EGLStruct { | ||
38 | QList<QByteArray> extensions; | 44 | QList<QByteArray> extensions; | ||
39 | EGLDisplay display = EGL_NO_DISPLAY; | 45 | EGLDisplay display = EGL_NO_DISPLAY; | ||
40 | EGLContext context = EGL_NO_CONTEXT; | 46 | EGLContext context = EGL_NO_CONTEXT; | ||
41 | }; | 47 | }; | ||
Show All 39 Lines | 78 | private: | |||
81 | int m_waylandOutputVersion; | 87 | int m_waylandOutputVersion; | ||
82 | }; | 88 | }; | ||
83 | 89 | | |||
84 | class WaylandIntegration : public QObject | 90 | class WaylandIntegration : public QObject | ||
85 | { | 91 | { | ||
86 | Q_OBJECT | 92 | Q_OBJECT | ||
87 | Q_SIGNALS: | 93 | Q_SIGNALS: | ||
88 | void newBuffer(uint8_t *screenData); | 94 | void newBuffer(uint8_t *screenData); | ||
95 | void plasmaWindowManagementInitialized(); | ||||
89 | }; | 96 | }; | ||
90 | const char * formatGLError(GLenum err); | 97 | const char * formatGLError(GLenum err); | ||
91 | 98 | | |||
92 | void authenticate(); | 99 | void authenticate(); | ||
93 | void init(); | 100 | void init(); | ||
94 | 101 | | |||
95 | bool isEGLInitialized(); | 102 | bool isEGLInitialized(); | ||
96 | bool isStreamingEnabled(); | 103 | bool isStreamingEnabled(); | ||
97 | 104 | | |||
98 | void startStreamingInput(); | 105 | void startStreamingInput(); | ||
99 | bool startStreaming(quint32 outputName); | 106 | bool startStreaming(quint32 outputName); | ||
100 | void stopStreaming(); | 107 | void stopStreaming(); | ||
101 | 108 | | |||
102 | void requestPointerButtonPress(quint32 linuxButton); | 109 | void requestPointerButtonPress(quint32 linuxButton); | ||
103 | void requestPointerButtonRelease(quint32 linuxButton); | 110 | void requestPointerButtonRelease(quint32 linuxButton); | ||
104 | void requestPointerMotion(const QSizeF &delta); | 111 | void requestPointerMotion(const QSizeF &delta); | ||
105 | void requestPointerMotionAbsolute(const QPointF &pos); | 112 | void requestPointerMotionAbsolute(const QPointF &pos); | ||
106 | void requestPointerAxisDiscrete(Qt::Orientation axis, qreal delta); | 113 | void requestPointerAxisDiscrete(Qt::Orientation axis, qreal delta); | ||
107 | 114 | | |||
108 | void requestKeyboardKeycode(int keycode, bool state); | 115 | void requestKeyboardKeycode(int keycode, bool state); | ||
109 | 116 | | |||
110 | EGLStruct egl(); | 117 | EGLStruct egl(); | ||
111 | 118 | | |||
119 | KWayland::Client::PlasmaWindowManagement *plasmaWindowManagement(); | ||||
112 | QMap<quint32, WaylandOutput> screens(); | 120 | QMap<quint32, WaylandOutput> screens(); | ||
113 | QVariant streams(); | 121 | QVariant streams(); | ||
114 | 122 | | |||
115 | WaylandIntegration *waylandIntegration(); | 123 | WaylandIntegration *waylandIntegration(); | ||
116 | } | 124 | } | ||
117 | 125 | | |||
118 | #endif // XDG_DESKTOP_PORTAL_KDE_WAYLAND_INTEGRATION_H | 126 | #endif // XDG_DESKTOP_PORTAL_KDE_WAYLAND_INTEGRATION_H | ||
119 | 127 | | |||
120 | 128 | |