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_BUFFER_P_H |
7 | #define WAYLAND_BUFFER_P_H |
8 | #include "buffer.h" |
9 | #include "wayland_pointer_p.h" |
10 | // wayland |
11 | #include <wayland-client-protocol.h> |
12 | |
13 | namespace KWayland |
14 | { |
15 | namespace Client |
16 | { |
17 | class Q_DECL_HIDDEN Buffer::Private |
18 | { |
19 | public: |
20 | Private(Buffer *q, ShmPool *parent, wl_buffer *nativeBuffer, const QSize &size, int32_t stride, size_t offset, Format format); |
21 | ~Private(); |
22 | void destroy(); |
23 | |
24 | ShmPool *shm; |
25 | WaylandPointer<wl_buffer, wl_buffer_destroy> nativeBuffer; |
26 | bool released; |
27 | QSize size; |
28 | int32_t stride; |
29 | size_t offset; |
30 | bool used; |
31 | Format format; |
32 | |
33 | private: |
34 | Buffer *q; |
35 | static const struct wl_buffer_listener s_listener; |
36 | static void releasedCallback(void *data, wl_buffer *wl_buffer); |
37 | }; |
38 | |
39 | } |
40 | } |
41 | |
42 | #endif |
43 | |