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;
56 typedef struct _Ecore_Event_Key Ecore_Event_Key;
57 typedef struct _Ecore_Event_Mouse_Button Ecore_Event_Mouse_Button;
58 typedef struct _Ecore_Event_Mouse_Wheel Ecore_Event_Mouse_Wheel;
59 typedef struct _Ecore_Event_Mouse_Move Ecore_Event_Mouse_Move;
60 typedef struct _Ecore_Event_Mouse_IO Ecore_Event_Mouse_IO;
61 typedef struct _Ecore_Event_Modifiers Ecore_Event_Modifiers;
63 typedef enum _Ecore_Event_Modifier
73 } Ecore_Event_Modifier;
75 typedef enum _Ecore_Event_Press
81 typedef enum _Ecore_Event_IO
87 struct _Ecore_Event_Key
94 Ecore_Window root_window;
95 Ecore_Window event_window;
97 unsigned int timestamp;
98 unsigned int modifiers;
103 struct _Ecore_Event_Mouse_Button
106 Ecore_Window root_window;
107 Ecore_Window event_window;
109 unsigned int timestamp;
110 unsigned int modifiers;
111 unsigned int buttons;
112 unsigned int double_click;
113 unsigned int triple_click;
124 int device; /* 0 if normal mouse, 1+ for other mouse-devices (eg multi-touch - other fingers) */
125 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) */
126 double pressure; /* pressure - 1.0 == normal, > 1.0 == more, 0.0 == none */
127 double angle; /* angle relative to perpendicular (0.0 == perpendicular), in degrees */
128 double x, y; /* same as x, y root.x, root.y, but with sub-pixel precision, if available */
135 struct _Ecore_Event_Mouse_Wheel
138 Ecore_Window root_window;
139 Ecore_Window event_window;
141 unsigned int timestamp;
142 unsigned int modifiers;
156 struct _Ecore_Event_Mouse_Move
159 Ecore_Window root_window;
160 Ecore_Window event_window;
162 unsigned int timestamp;
163 unsigned int modifiers;
175 int device; /* 0 if normal mouse, 1+ for other mouse-devices (eg multi-touch - other fingers) */
176 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) */
177 double pressure; /* pressure - 1.0 == normal, > 1.0 == more, 0.0 == none */
178 double angle; /* angle relative to perpendicular (0.0 == perpendicular), in degrees */
179 double x, y; /* same as x, y root.x, root.y, but with sub-pixel precision, if available */
186 struct _Ecore_Event_Mouse_IO
189 Ecore_Window event_window;
191 unsigned int timestamp;
192 unsigned int modifiers;
198 struct _Ecore_Event_Modifiers
201 unsigned int array[ECORE_LAST];
204 EAPI int ecore_event_init(void);
205 EAPI int ecore_event_shutdown(void);
207 EAPI unsigned int ecore_event_modifier_mask(Ecore_Event_Modifier modifier);
208 EAPI Ecore_Event_Modifier ecore_event_update_modifier(const char *key, Ecore_Event_Modifiers *modifiers, int inc);