10 # ifdef EFL_ECORE_INPUT_BUILD
12 # define EAPI __declspec(dllexport)
15 # endif /* ! DLL_EXPORT */
17 # define EAPI __declspec(dllimport)
18 # endif /* ! EFL_ECORE_INPUT_BUILD */
22 # define EAPI __attribute__ ((visibility("default")))
35 EAPI extern int ECORE_EVENT_KEY_DOWN;
36 EAPI extern int ECORE_EVENT_KEY_UP;
37 EAPI extern int ECORE_EVENT_MOUSE_BUTTON_DOWN;
38 EAPI extern int ECORE_EVENT_MOUSE_BUTTON_UP;
39 EAPI extern int ECORE_EVENT_MOUSE_MOVE;
40 EAPI extern int ECORE_EVENT_MOUSE_WHEEL;
41 EAPI extern int ECORE_EVENT_MOUSE_IN;
42 EAPI extern int ECORE_EVENT_MOUSE_OUT;
44 #define ECORE_EVENT_MODIFIER_SHIFT 0x0001
45 #define ECORE_EVENT_MODIFIER_CTRL 0x0002
46 #define ECORE_EVENT_MODIFIER_ALT 0x0004
47 #define ECORE_EVENT_MODIFIER_WIN 0x0008
48 #define ECORE_EVENT_MODIFIER_SCROLL 0x0010
49 #define ECORE_EVENT_MODIFIER_NUM 0x0020
50 #define ECORE_EVENT_MODIFIER_CAPS 0x0040
51 #define ECORE_EVENT_LOCK_SCROLL 0x0080
52 #define ECORE_EVENT_LOCK_NUM 0x0100
53 #define ECORE_EVENT_LOCK_CAPS 0x0200
55 typedef uintptr_t Ecore_Window;
57 typedef struct _Ecore_Event_Key Ecore_Event_Key;
58 struct _Ecore_Event_Key
65 Ecore_Window root_window;
66 Ecore_Window event_window;
68 unsigned int timestamp;
69 unsigned int modifiers;
74 typedef struct _Ecore_Event_Mouse_Button Ecore_Event_Mouse_Button;
75 struct _Ecore_Event_Mouse_Button
78 Ecore_Window root_window;
79 Ecore_Window event_window;
81 unsigned int timestamp;
82 unsigned int modifiers;
84 unsigned int double_click;
85 unsigned int triple_click;
98 int device; /* 0 if normal mouse, 1+ for other mouse-devices (eg multi-touch - other fingers) */
99 double radius, radius_x, radius_y; /* radius of press point - radius_x and y if its an ellipse (radius is the average of the 2) */
100 double pressure; /* pressure - 1.0 == normal, > 1.0 == more, 0.0 == none */
101 double angle; /* angle relative to perpendicular (0.0 == perpendicular), in degrees */
102 double x, y; /* same as x, y root.x, root.y, but with sub-pixel precision, if available */
110 typedef struct _Ecore_Event_Mouse_Wheel Ecore_Event_Mouse_Wheel;
111 struct _Ecore_Event_Mouse_Wheel
114 Ecore_Window root_window;
115 Ecore_Window event_window;
117 unsigned int timestamp;
118 unsigned int modifiers;
133 typedef struct _Ecore_Event_Mouse_Move Ecore_Event_Mouse_Move;
134 struct _Ecore_Event_Mouse_Move
137 Ecore_Window root_window;
138 Ecore_Window event_window;
140 unsigned int timestamp;
141 unsigned int modifiers;
155 int device; /* 0 if normal mouse, 1+ for other mouse-devices (eg multi-touch - other fingers) */
156 double radius, radius_x, radius_y; /* radius of press point - radius_x and y if its an ellipse (radius is the average of the 2) */
157 double pressure; /* pressure - 1.0 == normal, > 1.0 == more, 0.0 == none */
158 double angle; /* angle relative to perpendicular (0.0 == perpendicular), in degrees */
159 double x, y; /* same as x, y root.x, root.y, but with sub-pixel precision, if available */
167 typedef struct _Ecore_Event_Mouse_IO Ecore_Event_Mouse_IO;
168 struct _Ecore_Event_Mouse_IO
171 Ecore_Window event_window;
173 unsigned int timestamp;
174 unsigned int modifiers;
180 enum _Ecore_Event_Modifier
192 enum _Ecore_Event_Press
204 typedef enum _Ecore_Event_IO Ecore_Event_IO;
205 typedef enum _Ecore_Event_Press Ecore_Event_Press;
206 typedef enum _Ecore_Event_Modifier Ecore_Event_Modifier;
208 typedef struct _Ecore_Event_Modifiers Ecore_Event_Modifiers;
209 struct _Ecore_Event_Modifiers
212 unsigned int array[ECORE_LAST];
215 EAPI int ecore_event_init(void);
216 EAPI int ecore_event_shutdown(void);
218 EAPI unsigned int ecore_event_modifier_mask(Ecore_Event_Modifier modifier);
219 EAPI Ecore_Event_Modifier ecore_event_update_modifier(const char *key, Ecore_Event_Modifiers *modifiers, int inc);