1 | /* |
2 | SPDX-FileCopyrightText: 2014 Martin Gräßlin <mgraesslin@kde.org> |
3 | |
4 | SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL |
5 | */ |
6 | #ifndef WAYLAND_SURFACE_P_H |
7 | #define WAYLAND_SURFACE_P_H |
8 | |
9 | #include "surface.h" |
10 | #include "wayland_pointer_p.h" |
11 | // Wayland |
12 | #include <wayland-client-protocol.h> |
13 | |
14 | namespace KWayland |
15 | { |
16 | namespace Client |
17 | { |
18 | class Q_DECL_HIDDEN Surface::Private |
19 | { |
20 | public: |
21 | Private(Surface *q); |
22 | void setupFrameCallback(); |
23 | |
24 | WaylandPointer<wl_surface, wl_surface_destroy> surface; |
25 | bool frameCallbackInstalled = false; |
26 | QSize size; |
27 | bool foreign = false; |
28 | qint32 scale = 1; |
29 | QList<Output *> outputs; |
30 | |
31 | void setup(wl_surface *s); |
32 | |
33 | static QList<Surface *> s_surfaces; |
34 | |
35 | private: |
36 | void handleFrameCallback(); |
37 | static void frameCallback(void *data, wl_callback *callback, uint32_t time); |
38 | static void enterCallback(void *data, wl_surface *wl_surface, wl_output *output); |
39 | static void leaveCallback(void *data, wl_surface *wl_surface, wl_output *output); |
40 | void removeOutput(Output *o); |
41 | |
42 | Surface *q; |
43 | static const wl_callback_listener s_listener; |
44 | static const wl_surface_listener s_surfaceListener; |
45 | }; |
46 | |
47 | } |
48 | } |
49 | |
50 | #endif |
51 | |