| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
#ifndef QWAYLANDSHM_H |
| 6 |
#define QWAYLANDSHM_H |
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 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 |
|