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// Qt-Security score:significant reason:default
4
5#ifndef QWAYLANDBUFFER_H
6#define QWAYLANDBUFFER_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. It exists purely as an
13// implementation detail. This header file may change from version to
14// version without notice, or even be removed.
15//
16// We mean it.
17//
18
19#include <QtWaylandClient/qtwaylandclientglobal.h>
20
21#include <QtCore/QSize>
22#include <QtCore/QRect>
23
24#include <QtWaylandClient/private/wayland-wayland-client-protocol.h>
25#include <QtCore/private/qglobal_p.h>
26
27QT_BEGIN_NAMESPACE
28
29namespace QtWaylandClient {
30
31class Q_WAYLANDCLIENT_EXPORT QWaylandBuffer {
32public:
34 virtual ~QWaylandBuffer();
35 void init(wl_buffer *buf);
36
38 virtual QSize size() const = 0;
39 virtual int scale() const { return 1; }
40
41 void setBusy(bool busy) { mBusy = busy; }
42 bool busy() const { return mBusy; }
43
44 void setCommitted() { mCommitted = true; }
45 bool committed() const { return mCommitted; }
46
48
49protected:
50 struct wl_buffer *mBuffer = nullptr;
51
52private:
53 bool mBusy = false;
54 bool mCommitted = false;
55 bool mDeleteOnRelease = false;
56
57 static void release(void *data, wl_buffer *);
58 static const wl_buffer_listener listener;
59};
60
61}
62
63QT_END_NAMESPACE
64
65#endif // QWAYLANDBUFFER_H
Combined button and popup list for selecting options.