devicemgr: implement pointer_warp
[platform/core/uifw/libds-tizen.git] / src / input_devicemgr / input_devicemgr.h
1 #ifndef DS_TIZEN_DEVICEMGR_H
2 #define DS_TIZEN_DEVICEMGR_H
3
4 #include <stdbool.h>
5 #include <linux/uinput.h>
6 #include <wayland-server.h>
7 #include <tizen-extension-server-protocol.h>
8 #include <libds/interfaces/input_device.h>
9 #include <libds/seat.h>
10
11 struct ds_tizen_input_devicemgr_device {
12     char *name;
13     struct ds_input_device *input_device;
14     int ref;
15
16     bool created;
17
18     struct {
19         struct wl_list pressed;
20     } key;
21
22     struct {
23         unsigned int pressed;
24     } touch;
25
26     struct {
27         unsigned int pressed;
28     } mouse;
29 };
30
31 struct ds_tizen_input_devicemgr {
32     struct wl_global *global;
33     struct wl_display *display;
34     struct ds_backend *backend;
35     struct ds_seat *seat;
36
37     struct {
38         struct wl_signal destroy;
39         struct wl_signal pointer_warp; //ds_tizen_input_devicemgr_event_pointer_warp
40     } events;
41
42     struct wl_listener new_input;
43     struct wl_listener backend_destroy;
44     struct wl_listener seat_destroy;
45     struct {
46         struct ds_tizen_input_devicemgr_device *kbd;
47         struct ds_tizen_input_devicemgr_device *ptr;
48         struct ds_tizen_input_devicemgr_device *touch;
49     } devices;
50
51     struct wl_list clients;
52
53     struct wl_list keymap_list;
54
55     struct wl_list blocked_keys;
56     struct wl_resource *block_resource;
57     struct wl_event_source *timer;
58     struct ds_seat_keyboard_grab *grab;
59     int touch_max_count;
60
61     struct {
62         uint32_t width;
63         uint32_t height;
64     } output;
65 };
66
67 struct ds_tizen_input_devicemgr_client {
68     struct wl_resource *resource;
69     bool init;
70     uint32_t clas;
71     struct wl_list link; // ds_tizen_input_devicemgr::clients
72 };
73
74 struct ds_tizen_input_devicemgr_key_info {
75     int keycode;
76     struct wl_list link; // ds_tizen_input_devicemgr::pressed_keys;
77 };
78
79 #endif