Debian Codegraph @

wayland/qtwayland-dev/5.15.1/QtWaylandClient/private/qwaylandshm_p.h

raw symbols SCIP
1 // Copyright (C) 2016 LG Electronics Inc, author: <[email protected]>
2 //
3 // SPDX-License-Identifier: LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
4
5 #ifndef QWAYLANDSHM_H
6 #define QWAYLANDSHM_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 <QVector>
20 #include <QImage>
21
22 #include <QtWaylandClient/qtwaylandclientglobal.h>
23 #include <QtWaylandClient/private/qwayland-wayland.h>
24
25 QT_BEGIN_NAMESPACE
26
27 namespace QtWaylandClient {
28
29 class QWaylandDisplay;
30
31 class Q_WAYLAND_CLIENT_EXPORT QWaylandShm : public QtWayland::wl_shm
32 {
33
34 public:
35
36 QWaylandShm(QWaylandDisplay *display, int version, uint32_t id);
37 ~QWaylandShm() override;
38
39 bool formatSupported(wl_shm_format format) const;
40 bool formatSupported(QImage::Format format) const;
41
42 static wl_shm_format formatFrom(QImage::Format format);
43 static QImage::Format formatFrom(wl_shm_format format);
44
45 protected:
46 void shm_format(uint32_t format) override;
47
48 private:
49 QVector<uint32_t> m_formats;
50
51 };
52
53 }
54
55 QT_END_NAMESPACE
56
57 #endif
58