Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qwaylandbuffer_p.h
Go to the documentation of this file.
1// Copyright (C) 2018 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QWAYLANDBUFFER_H
5#define QWAYLANDBUFFER_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <QtWaylandClient/qtwaylandclientglobal.h>
19
20#include <QtCore/QSize>
21#include <QtCore/QRect>
22
23#include <QtWaylandClient/private/wayland-wayland-client-protocol.h>
24#include <QtCore/private/qglobal_p.h>
25
26QT_BEGIN_NAMESPACE
27
28namespace QtWaylandClient {
29
30class Q_WAYLANDCLIENT_EXPORT QWaylandBuffer {
31public:
33 virtual ~QWaylandBuffer();
34 void init(wl_buffer *buf);
35
37 virtual QSize size() const = 0;
38 virtual int scale() const { return 1; }
39
40 void setBusy(bool busy) { mBusy = busy; }
41 bool busy() const { return mBusy; }
42
43 void setCommitted() { mCommitted = true; }
44 bool committed() const { return mCommitted; }
45
47
48protected:
49 struct wl_buffer *mBuffer = nullptr;
50
51private:
52 bool mBusy = false;
53 bool mCommitted = false;
54 bool mDeleteOnRelease = false;
55
56 static void release(void *data, wl_buffer *);
57 static const wl_buffer_listener listener;
58};
59
60}
61
62QT_END_NAMESPACE
63
64#endif // QWAYLANDBUFFER_H
Combined button and popup list for selecting options.