Guiliani  Version 2.6 revision 7293 (documentation build 12)
GUIInputWayland.h
1/*
2* Copyright (C) TES Electronic Solutions GmbH,
3* All Rights Reserved.
4* Contact: info@guiliani.de
5*
6* This file is part of the Guiliani HMI framework
7* for the development of graphical user interfaces on embedded systems.
8*/
9
10#ifndef __GUIINPUT_WAYLAND_H__
11#define __GUIINPUT_WAYLAND_H__
12
13#include "GUIInputMedia.h"
14
16#include "eC_TList_doubleLinked.h"
17
18#include <wayland-client.h>
19#include <wayland-client-protocol.h>
20#include <linux/input-event-codes.h>
21
22#include <xkbcommon/xkbcommon.h>
23
26{
27public:
30 {
31 POINTER_EVENT_ENTER = 1 << 0,
32 POINTER_EVENT_LEAVE = 1 << 1,
33 POINTER_EVENT_MOTION = 1 << 2,
34 POINTER_EVENT_BUTTON = 1 << 3,
35 POINTER_EVENT_AXIS = 1 << 4,
36 POINTER_EVENT_AXIS_SOURCE = 1 << 5,
37 POINTER_EVENT_AXIS_STOP = 1 << 6,
38 POINTER_EVENT_AXIS_DISCRETE = 1 << 7,
39 };
40
42 typedef struct
43 {
44 uint32_t event_mask;
45 wl_fixed_t surface_x;
46 wl_fixed_t surface_y;
47 uint32_t button;
48 uint32_t state;
49 uint32_t time;
50 uint32_t serial;
51 struct
52 {
53 bool valid;
54 wl_fixed_t value;
55 int32_t discrete;
56 } axes[2];
57 uint32_t axis_source;
59
62 {
63 TOUCH_EVENT_DOWN = 1 << 0,
64 TOUCH_EVENT_UP = 1 << 1,
65 TOUCH_EVENT_MOTION = 1 << 2,
66 TOUCH_EVENT_CANCEL = 1 << 3,
67 TOUCH_EVENT_SHAPE = 1 << 4,
68 TOUCH_EVENT_ORIENTATION = 1 << 5,
69 };
70
72 typedef struct
73 {
74 bool valid;
75 int32_t id;
76 uint32_t event_mask;
77 wl_fixed_t surface_x;
78 wl_fixed_t surface_y;
79 wl_fixed_t major;
80 wl_fixed_t minor;
81 wl_fixed_t orientation;
83
85 typedef struct
86 {
87 uint32_t event_mask;
88 uint32_t time;
89 uint32_t serial;
90 TouchPoint_t points[10];
92
95 {
98 struct wl_seat *wl_seat;
102
106
114 };
115
116public:
121 static void CreateInstance(void* handle);
122
123 virtual void PollEvent();
124
125 virtual void StopIdle();
126
127protected:
131 CGUIInputWayland(void* handle);
133
134private:
135 ClientState_t m_kState;
136};
137
138#endif
Definition: GUIInputMedia.h:30
The implementation of the Input Wrapper for Linux using Wayland.
Definition: GUIInputWayland.h:26
virtual void PollEvent()
TouchEventMask_t
mask for touch events
Definition: GUIInputWayland.h:62
virtual void StopIdle()
PointerEventMask_t
mask for pointer events
Definition: GUIInputWayland.h:30
static void CreateInstance(void *handle)
CGUIInputWayland(void *handle)
Definition: GUIInputWayland.h:95
struct wl_touch_listener wl_touch_listener
touch listener
Definition: GUIInputWayland.h:104
struct wl_registry * wl_registry
registry
Definition: GUIInputWayland.h:97
struct wl_keyboard_listener wl_keyboard_listener
keyboard listener
Definition: GUIInputWayland.h:105
struct xkb_context * xkb_context
keyboard context
Definition: GUIInputWayland.h:111
struct wl_seat_listener wl_seat_listener
seat listener
Definition: GUIInputWayland.h:108
struct xkb_state * xkb_state
keyboard state
Definition: GUIInputWayland.h:110
struct xkb_keymap * xkb_keymap
keyboard keymap
Definition: GUIInputWayland.h:112
TouchEvent_t touch_event
touch event
Definition: GUIInputWayland.h:113
PointerEvent_t pointer_event
pointer event
Definition: GUIInputWayland.h:109
struct wl_keyboard * wl_keyboard
keyboard
Definition: GUIInputWayland.h:99
struct wl_seat * wl_seat
seat
Definition: GUIInputWayland.h:98
struct wl_pointer_listener wl_pointer_listener
pointer listener
Definition: GUIInputWayland.h:103
struct wl_touch * wl_touch
touch
Definition: GUIInputWayland.h:101
struct wl_registry_listener wl_registry_listener
registry listener
Definition: GUIInputWayland.h:107
struct wl_display * wl_display
display
Definition: GUIInputWayland.h:96
struct wl_pointer * wl_pointer
pointer
Definition: GUIInputWayland.h:100
pointer event
Definition: GUIInputWayland.h:43
wl_fixed_t value
value
Definition: GUIInputWayland.h:54
uint32_t serial
serial
Definition: GUIInputWayland.h:50
uint32_t event_mask
event mask
Definition: GUIInputWayland.h:44
int32_t discrete
discrete
Definition: GUIInputWayland.h:55
uint32_t time
time
Definition: GUIInputWayland.h:49
uint32_t state
state
Definition: GUIInputWayland.h:48
uint32_t axis_source
axis source
Definition: GUIInputWayland.h:57
uint32_t button
button
Definition: GUIInputWayland.h:47
wl_fixed_t surface_x
x
Definition: GUIInputWayland.h:45
wl_fixed_t surface_y
y
Definition: GUIInputWayland.h:46
bool valid
valid
Definition: GUIInputWayland.h:53
touch event
Definition: GUIInputWayland.h:86
uint32_t time
time
Definition: GUIInputWayland.h:88
uint32_t serial
serial
Definition: GUIInputWayland.h:89
uint32_t event_mask
event mask
Definition: GUIInputWayland.h:87
touch point
Definition: GUIInputWayland.h:73
wl_fixed_t orientation
orientation
Definition: GUIInputWayland.h:81
int32_t id
id
Definition: GUIInputWayland.h:75
wl_fixed_t major
major
Definition: GUIInputWayland.h:79
wl_fixed_t minor
minor
Definition: GUIInputWayland.h:80
wl_fixed_t surface_y
y
Definition: GUIInputWayland.h:78
bool valid
valid
Definition: GUIInputWayland.h:74
wl_fixed_t surface_x
x
Definition: GUIInputWayland.h:77
uint32_t event_mask
event mask
Definition: GUIInputWayland.h:76