Changeset View
Changeset View
Standalone View
Standalone View
src/waylandintegration_p.h
Show All 20 Lines | |||||
21 | #ifndef XDG_DESKTOP_PORTAL_KDE_WAYLAND_INTEGRATION_P_H | 21 | #ifndef XDG_DESKTOP_PORTAL_KDE_WAYLAND_INTEGRATION_P_H | ||
22 | #define XDG_DESKTOP_PORTAL_KDE_WAYLAND_INTEGRATION_P_H | 22 | #define XDG_DESKTOP_PORTAL_KDE_WAYLAND_INTEGRATION_P_H | ||
23 | 23 | | |||
24 | #include "waylandintegration.h" | 24 | #include "waylandintegration.h" | ||
25 | 25 | | |||
26 | #include <QDateTime> | 26 | #include <QDateTime> | ||
27 | #include <QMap> | 27 | #include <QMap> | ||
28 | 28 | | |||
29 | #include <gbm.h> | | |||
30 | | ||||
31 | #include <epoxy/egl.h> | | |||
32 | #include <epoxy/gl.h> | | |||
33 | | ||||
34 | class ScreenCastStream; | 29 | class ScreenCastStream; | ||
35 | 30 | | |||
36 | namespace KWayland { | 31 | namespace KWayland { | ||
37 | namespace Client { | 32 | namespace Client { | ||
38 | class ConnectionThread; | 33 | class ConnectionThread; | ||
39 | class EventQueue; | 34 | class EventQueue; | ||
40 | class FakeInput; | 35 | class FakeInput; | ||
41 | class Registry; | 36 | class Registry; | ||
Show All 34 Lines | 49 | public: | |||
76 | 71 | | |||
77 | void requestPointerButtonPress(quint32 linuxButton); | 72 | void requestPointerButtonPress(quint32 linuxButton); | ||
78 | void requestPointerButtonRelease(quint32 linuxButton); | 73 | void requestPointerButtonRelease(quint32 linuxButton); | ||
79 | void requestPointerMotion(const QSizeF &delta); | 74 | void requestPointerMotion(const QSizeF &delta); | ||
80 | void requestPointerMotionAbsolute(const QPointF &pos); | 75 | void requestPointerMotionAbsolute(const QPointF &pos); | ||
81 | void requestPointerAxisDiscrete(Qt::Orientation axis, qreal delta); | 76 | void requestPointerAxisDiscrete(Qt::Orientation axis, qreal delta); | ||
82 | void requestKeyboardKeycode(int keycode, bool state); | 77 | void requestKeyboardKeycode(int keycode, bool state); | ||
83 | 78 | | |||
79 | EGLStruct egl(); | ||||
84 | QMap<quint32, WaylandOutput> screens(); | 80 | QMap<quint32, WaylandOutput> screens(); | ||
85 | QVariant streams(); | 81 | QVariant streams(); | ||
86 | 82 | | |||
87 | protected Q_SLOTS: | 83 | protected Q_SLOTS: | ||
88 | void addOutput(quint32 name, quint32 version); | 84 | void addOutput(quint32 name, quint32 version); | ||
89 | void removeOutput(quint32 name); | 85 | void removeOutput(quint32 name); | ||
90 | void processBuffer(const KWayland::Client::RemoteBuffer *rbuf); | 86 | void processBuffer(const KWayland::Client::RemoteBuffer *rbuf); | ||
91 | void setupRegistry(); | 87 | void setupRegistry(); | ||
Show All 19 Lines | 89 | private: | |||
111 | KWayland::Client::ConnectionThread *m_connection; | 107 | KWayland::Client::ConnectionThread *m_connection; | ||
112 | KWayland::Client::EventQueue *m_queue; | 108 | KWayland::Client::EventQueue *m_queue; | ||
113 | KWayland::Client::FakeInput *m_fakeInput; | 109 | KWayland::Client::FakeInput *m_fakeInput; | ||
114 | KWayland::Client::Registry *m_registry; | 110 | KWayland::Client::Registry *m_registry; | ||
115 | KWayland::Client::RemoteAccessManager *m_remoteAccessManager; | 111 | KWayland::Client::RemoteAccessManager *m_remoteAccessManager; | ||
116 | 112 | | |||
117 | qint32 m_drmFd = 0; // for GBM buffer mmap | 113 | qint32 m_drmFd = 0; // for GBM buffer mmap | ||
118 | gbm_device *m_gbmDevice = nullptr; // for passed GBM buffer retrieval | 114 | gbm_device *m_gbmDevice = nullptr; // for passed GBM buffer retrieval | ||
119 | struct { | 115 | | ||
120 | QList<QByteArray> extensions; | 116 | EGLStruct m_egl; | ||
121 | EGLDisplay display = EGL_NO_DISPLAY; | | |||
122 | EGLContext context = EGL_NO_CONTEXT; | | |||
123 | } m_egl; | | |||
124 | }; | 117 | }; | ||
125 | 118 | | |||
126 | } | 119 | } | ||
127 | 120 | | |||
128 | #endif // XDG_DESKTOP_PORTAL_KDE_WAYLAND_INTEGRATION_P_H | 121 | #endif // XDG_DESKTOP_PORTAL_KDE_WAYLAND_INTEGRATION_P_H | ||
129 | 122 | | |||
130 | 123 | |