| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
#ifndef QT_WAYLAND_TOUCH_EXTENSION |
| 6 |
#define QT_WAYLAND_TOUCH_EXTENSION |
| 7 |
|
| 8 |
#include <QtWaylandClient/private/wayland-touch-extension-client-protocol.h> |
| 9 |
#include <QByteArray> |
| 10 |
#include <QString> |
| 11 |
|
| 12 |
QT_BEGIN_NAMESPACE |
| 13 |
QT_WARNING_PUSH |
| 14 |
QT_WARNING_DISABLE_GCC("-Wmissing-field-initializers") |
| 15 |
|
| 16 |
#if !defined(Q_WAYLAND_CLIENT_TOUCH_EXTENSION_EXPORT) |
| 17 |
# if defined(QT_SHARED) |
| 18 |
# define Q_WAYLAND_CLIENT_TOUCH_EXTENSION_EXPORT Q_DECL_EXPORT |
| 19 |
# else |
| 20 |
# define Q_WAYLAND_CLIENT_TOUCH_EXTENSION_EXPORT |
| 21 |
# endif |
| 22 |
#endif |
| 23 |
|
| 24 |
namespace QtWayland { |
| 25 |
class Q_WAYLAND_CLIENT_TOUCH_EXTENSION_EXPORT qt_touch_extension |
| 26 |
{ |
| 27 |
public: |
| 28 |
qt_touch_extension(struct ::wl_registry *registry, int id, int version); |
| 29 |
qt_touch_extension(struct ::qt_touch_extension *object); |
| 30 |
qt_touch_extension(); |
| 31 |
|
| 32 |
virtual ~qt_touch_extension(); |
| 33 |
|
| 34 |
void init(struct ::wl_registry *registry, int id, int version); |
| 35 |
void init(struct ::qt_touch_extension *object); |
| 36 |
|
| 37 |
struct ::qt_touch_extension *object() { return m_qt_touch_extension; } |
| 38 |
const struct ::qt_touch_extension *object() const { return m_qt_touch_extension; } |
| 39 |
|
| 40 |
bool isInitialized() const; |
| 41 |
|
| 42 |
static const struct ::wl_interface *interface(); |
| 43 |
|
| 44 |
enum flags { |
| 45 |
flags_mouse_from_touch = 0x1 |
| 46 |
}; |
| 47 |
|
| 48 |
void dummy(); |
| 49 |
|
| 50 |
protected: |
| 51 |
virtual void touch_extension_touch(uint32_t time, uint32_t id, uint32_t state, int32_t x, int32_t y, int32_t normalized_x, int32_t normalized_y, int32_t width, int32_t height, uint32_t pressure, int32_t velocity_x, int32_t velocity_y, uint32_t flags, wl_array *rawdata); |
| 52 |
virtual void touch_extension_configure(uint32_t flags); |
| 53 |
|
| 54 |
private: |
| 55 |
void init_listener(); |
| 56 |
static const struct qt_touch_extension_listener m_qt_touch_extension_listener; |
| 57 |
static void handle_touch( |
| 58 |
void *data, |
| 59 |
struct ::qt_touch_extension *object, |
| 60 |
uint32_t time, |
| 61 |
uint32_t id, |
| 62 |
uint32_t state, |
| 63 |
int32_t x, |
| 64 |
int32_t y, |
| 65 |
int32_t normalized_x, |
| 66 |
int32_t normalized_y, |
| 67 |
int32_t width, |
| 68 |
int32_t height, |
| 69 |
uint32_t pressure, |
| 70 |
int32_t velocity_x, |
| 71 |
int32_t velocity_y, |
| 72 |
uint32_t flags, |
| 73 |
wl_array *rawdata); |
| 74 |
static void handle_configure( |
| 75 |
void *data, |
| 76 |
struct ::qt_touch_extension *object, |
| 77 |
uint32_t flags); |
| 78 |
struct ::qt_touch_extension *m_qt_touch_extension; |
| 79 |
}; |
| 80 |
} |
| 81 |
|
| 82 |
QT_WARNING_POP |
| 83 |
QT_END_NAMESPACE |
| 84 |
|
| 85 |
#endif |