e_devicemgr: make an internal header
[platform/upstream/enlightenment.git] / src / bin / e_devicemgr.h
1 #ifdef E_TYPEDEFS
2
3 typedef struct _E_Devicemgr_Conf_Edd E_Devicemgr_Conf_Edd;
4 typedef struct _E_Devicemgr_Config_Data E_Devicemgr_Config_Data;
5 typedef struct _E_Devicemgr_Wl_Data E_Devicemgr_Wl_Data;
6
7 typedef struct _E_Devicemgr_Input_Device
8 {
9    Eina_List *resources;
10    const char *name;
11    const char *seat_name;
12    const char *identifier;
13    Ecore_Device_Class clas;
14    Ecore_Device_Subclass subclas;
15 } E_Devicemgr_Input_Device;
16
17 typedef struct _E_Devicemgr_Input_Device_Multi
18 {
19    double radius_x;
20    double radius_y;
21    double pressure;
22    double angle;
23 } E_Devicemgr_Input_Device_Multi;
24
25 typedef struct _E_Devicemgr E_Devicemgr;
26
27 typedef void (*E_Devicemgr_Block_Expire_Cb) (void *data);
28
29 #else
30 #ifndef E_DEVICEMGR_H
31 #define E_DEVICEMGR_H
32
33 extern E_API E_Devicemgr *e_devicemgr;
34
35 struct _E_Devicemgr
36 {
37    E_Devicemgr_Config_Data *dconfig;
38    E_Devicemgr_Wl_Data *wl_data;
39
40    Eina_List *handlers;
41
42    Eina_List *device_list;
43    E_Devicemgr_Input_Device *last_device_ptr;
44    E_Devicemgr_Input_Device *last_device_touch;
45    E_Devicemgr_Input_Device *last_device_kbd;
46    E_Devicemgr_Input_Device_Multi *multi;
47
48    struct
49      {
50         unsigned int devtype;
51         struct wl_client *client;
52         Ecore_Timer *duration_timer;
53
54         unsigned int internal_devtype;
55         Ecore_Timer *internal_duration_timer;
56         E_Devicemgr_Block_Expire_Cb internal_cb_func;
57         void *internal_cb_data;
58      } block;
59
60    int virtual_key_device_fd;
61    int virtual_mouse_device_fd;
62
63    struct
64    {
65       Eina_List *kbd_list;
66       Eina_List *ptr_list;
67       Eina_List *touch_list;
68
69       Eina_List *resource_list;
70    } inputgen;
71
72    struct
73    {
74       char *identifier;
75    } detent;
76
77    Eina_List *watched_clients;
78
79    int max_touch_count;
80    GRecMutex device_list_mutex;
81
82    struct
83    {
84       struct wl_client *client;
85       E_Client *ec;
86       unsigned int subtype;
87    } keyboard_grab;
88 };
89
90 E_API Eina_Bool e_devicemgr_is_blocking_event(Ecore_Device_Class clas);
91
92 E_API Eina_Bool e_devicemgr_block_reset(void);
93
94 #endif
95 #endif
96