Changeset View
Changeset View
Standalone View
Standalone View
wayland_server.h
Show First 20 Lines • Show All 66 Lines • ▼ Show 20 Line(s) | |||||
67 | class XdgForeignInterface; | 67 | class XdgForeignInterface; | ||
68 | class XdgOutputManagerInterface; | 68 | class XdgOutputManagerInterface; | ||
69 | class KeyStateInterface; | 69 | class KeyStateInterface; | ||
70 | } | 70 | } | ||
71 | } | 71 | } | ||
72 | 72 | | |||
73 | namespace KWin | 73 | namespace KWin | ||
74 | { | 74 | { | ||
75 | class ShellClient; | 75 | class XdgShellClient; | ||
76 | 76 | | |||
77 | class AbstractClient; | 77 | class AbstractClient; | ||
78 | class Toplevel; | 78 | class Toplevel; | ||
79 | 79 | | |||
80 | class KWIN_EXPORT WaylandServer : public QObject | 80 | class KWIN_EXPORT WaylandServer : public QObject | ||
81 | { | 81 | { | ||
82 | Q_OBJECT | 82 | Q_OBJECT | ||
83 | public: | 83 | public: | ||
Show All 30 Lines | |||||
114 | } | 114 | } | ||
115 | KWayland::Server::ServerSideDecorationManagerInterface *decorationManager() const { | 115 | KWayland::Server::ServerSideDecorationManagerInterface *decorationManager() const { | ||
116 | return m_decorationManager; | 116 | return m_decorationManager; | ||
117 | } | 117 | } | ||
118 | KWayland::Server::XdgOutputManagerInterface *xdgOutputManager() const { | 118 | KWayland::Server::XdgOutputManagerInterface *xdgOutputManager() const { | ||
119 | return m_xdgOutputManager; | 119 | return m_xdgOutputManager; | ||
120 | } | 120 | } | ||
121 | 121 | | |||
122 | QList<ShellClient*> clients() const { | 122 | QList<XdgShellClient *> clients() const { | ||
123 | return m_clients; | 123 | return m_clients; | ||
124 | } | 124 | } | ||
125 | void removeClient(ShellClient *c); | 125 | void removeClient(XdgShellClient *c); | ||
126 | ShellClient *findClient(quint32 id) const; | 126 | XdgShellClient *findClient(quint32 id) const; | ||
127 | ShellClient *findClient(KWayland::Server::SurfaceInterface *surface) const; | 127 | XdgShellClient *findClient(KWayland::Server::SurfaceInterface *surface) const; | ||
128 | AbstractClient *findAbstractClient(KWayland::Server::SurfaceInterface *surface) const; | 128 | AbstractClient *findAbstractClient(KWayland::Server::SurfaceInterface *surface) const; | ||
129 | 129 | | |||
130 | /** | 130 | /** | ||
131 | * @returns a transient parent of a surface imported with the foreign protocol, if any | 131 | * @returns a transient parent of a surface imported with the foreign protocol, if any | ||
132 | */ | 132 | */ | ||
133 | KWayland::Server::SurfaceInterface *findForeignTransientForSurface(KWayland::Server::SurfaceInterface *surface); | 133 | KWayland::Server::SurfaceInterface *findForeignTransientForSurface(KWayland::Server::SurfaceInterface *surface); | ||
134 | 134 | | |||
135 | /** | 135 | /** | ||
▲ Show 20 Lines • Show All 76 Lines • ▼ Show 20 Line(s) | |||||
212 | * Creates a Wayland connection using a socket pair. | 212 | * Creates a Wayland connection using a socket pair. | ||
213 | */ | 213 | */ | ||
214 | SocketPairConnection createConnection(); | 214 | SocketPairConnection createConnection(); | ||
215 | 215 | | |||
216 | void simulateUserActivity(); | 216 | void simulateUserActivity(); | ||
217 | void updateKeyState(KWin::Xkb::LEDs leds); | 217 | void updateKeyState(KWin::Xkb::LEDs leds); | ||
218 | 218 | | |||
219 | Q_SIGNALS: | 219 | Q_SIGNALS: | ||
220 | void shellClientAdded(KWin::ShellClient*); | 220 | void shellClientAdded(KWin::XdgShellClient *); | ||
221 | void shellClientRemoved(KWin::ShellClient*); | 221 | void shellClientRemoved(KWin::XdgShellClient *); | ||
222 | void terminatingInternalClientConnection(); | 222 | void terminatingInternalClientConnection(); | ||
223 | void initialized(); | 223 | void initialized(); | ||
224 | void foreignTransientChanged(KWayland::Server::SurfaceInterface *child); | 224 | void foreignTransientChanged(KWayland::Server::SurfaceInterface *child); | ||
225 | 225 | | |||
226 | private: | 226 | private: | ||
227 | void shellClientShown(Toplevel *t); | 227 | void shellClientShown(Toplevel *t); | ||
228 | quint16 createClientId(KWayland::Server::ClientConnection *c); | 228 | quint16 createClientId(KWayland::Server::ClientConnection *c); | ||
229 | void destroyInternalConnection(); | 229 | void destroyInternalConnection(); | ||
Show All 31 Lines | 255 | struct { | |||
261 | KWayland::Client::Seat *seat = nullptr; | 261 | KWayland::Client::Seat *seat = nullptr; | ||
262 | KWayland::Client::DataDeviceManager *ddm = nullptr; | 262 | KWayland::Client::DataDeviceManager *ddm = nullptr; | ||
263 | KWayland::Client::ShmPool *shm = nullptr; | 263 | KWayland::Client::ShmPool *shm = nullptr; | ||
264 | bool interfacesAnnounced = false; | 264 | bool interfacesAnnounced = false; | ||
265 | 265 | | |||
266 | } m_internalConnection; | 266 | } m_internalConnection; | ||
267 | KWayland::Server::XdgForeignInterface *m_XdgForeign = nullptr; | 267 | KWayland::Server::XdgForeignInterface *m_XdgForeign = nullptr; | ||
268 | KWayland::Server::KeyStateInterface *m_keyState = nullptr; | 268 | KWayland::Server::KeyStateInterface *m_keyState = nullptr; | ||
269 | QList<ShellClient*> m_clients; | 269 | QList<XdgShellClient *> m_clients; | ||
270 | QHash<KWayland::Server::ClientConnection*, quint16> m_clientIds; | 270 | QHash<KWayland::Server::ClientConnection*, quint16> m_clientIds; | ||
271 | InitalizationFlags m_initFlags; | 271 | InitalizationFlags m_initFlags; | ||
272 | QVector<KWayland::Server::PlasmaShellSurfaceInterface*> m_plasmaShellSurfaces; | 272 | QVector<KWayland::Server::PlasmaShellSurfaceInterface*> m_plasmaShellSurfaces; | ||
273 | KWIN_SINGLETON(WaylandServer) | 273 | KWIN_SINGLETON(WaylandServer) | ||
274 | }; | 274 | }; | ||
275 | 275 | | |||
276 | inline | 276 | inline | ||
277 | WaylandServer *waylandServer() { | 277 | WaylandServer *waylandServer() { | ||
278 | return WaylandServer::self(); | 278 | return WaylandServer::self(); | ||
279 | } | 279 | } | ||
280 | 280 | | |||
281 | } // namespace KWin | 281 | } // namespace KWin | ||
282 | 282 | | |||
283 | #endif | 283 | #endif | ||
284 | 284 | |