15 # ifdef EFL_ECORE_INPUT_BUILD
17 # define EAPI __declspec(dllexport)
20 # endif /* ! DLL_EXPORT */
22 # define EAPI __declspec(dllimport)
23 # endif /* ! EFL_ECORE_INPUT_BUILD */
27 # define EAPI __attribute__ ((visibility("default")))
40 EAPI extern int ECORE_EVENT_KEY_DOWN;
41 EAPI extern int ECORE_EVENT_KEY_UP;
42 EAPI extern int ECORE_EVENT_MOUSE_BUTTON_DOWN;
43 EAPI extern int ECORE_EVENT_MOUSE_BUTTON_UP;
44 EAPI extern int ECORE_EVENT_MOUSE_MOVE;
45 EAPI extern int ECORE_EVENT_MOUSE_WHEEL;
46 EAPI extern int ECORE_EVENT_MOUSE_IN;
47 EAPI extern int ECORE_EVENT_MOUSE_OUT;
49 #define ECORE_EVENT_MODIFIER_SHIFT 0x0001
50 #define ECORE_EVENT_MODIFIER_CTRL 0x0002
51 #define ECORE_EVENT_MODIFIER_ALT 0x0004
52 #define ECORE_EVENT_MODIFIER_WIN 0x0008
53 #define ECORE_EVENT_MODIFIER_SCROLL 0x0010
54 #define ECORE_EVENT_MODIFIER_NUM 0x0020
55 #define ECORE_EVENT_MODIFIER_CAPS 0x0040
56 #define ECORE_EVENT_LOCK_SCROLL 0x0080
57 #define ECORE_EVENT_LOCK_NUM 0x0100
58 #define ECORE_EVENT_LOCK_CAPS 0x0200
59 #define ECORE_EVENT_LOCK_SHIFT 0x0300
60 #define ECORE_EVENT_MODIFIER_ALTGR 0x0400 /**< @since 1.3 */
62 typedef uintptr_t Ecore_Window;
63 typedef struct _Ecore_Event_Key Ecore_Event_Key;
64 typedef struct _Ecore_Event_Mouse_Button Ecore_Event_Mouse_Button;
65 typedef struct _Ecore_Event_Mouse_Wheel Ecore_Event_Mouse_Wheel;
66 typedef struct _Ecore_Event_Mouse_Move Ecore_Event_Mouse_Move;
67 typedef struct _Ecore_Event_Mouse_IO Ecore_Event_Mouse_IO;
68 typedef struct _Ecore_Event_Modifiers Ecore_Event_Modifiers;
70 typedef enum _Ecore_Event_Modifier
79 ECORE_MODE, /**< @since 1.3 */
81 } Ecore_Event_Modifier;
83 typedef enum _Ecore_Event_Press
89 typedef enum _Ecore_Event_IO
95 typedef enum _Ecore_Compose_State
100 } Ecore_Compose_State;
102 struct _Ecore_Event_Key
109 Ecore_Window root_window;
110 Ecore_Window event_window;
112 unsigned int timestamp;
113 unsigned int modifiers;
118 struct _Ecore_Event_Mouse_Button
121 Ecore_Window root_window;
122 Ecore_Window event_window;
124 unsigned int timestamp;
125 unsigned int modifiers;
126 unsigned int buttons;
127 unsigned int double_click;
128 unsigned int triple_click;
139 int device; /* 0 if normal mouse, 1+ for other mouse-devices (eg multi-touch - other fingers) */
140 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) */
141 double pressure; /* pressure - 1.0 == normal, > 1.0 == more, 0.0 == none */
142 double angle; /* angle relative to perpendicular (0.0 == perpendicular), in degrees */
143 double x, y; /* same as x, y root.x, root.y, but with sub-pixel precision, if available */
150 struct _Ecore_Event_Mouse_Wheel
153 Ecore_Window root_window;
154 Ecore_Window event_window;
156 unsigned int timestamp;
157 unsigned int modifiers;
171 struct _Ecore_Event_Mouse_Move
174 Ecore_Window root_window;
175 Ecore_Window event_window;
177 unsigned int timestamp;
178 unsigned int modifiers;
190 int device; /* 0 if normal mouse, 1+ for other mouse-devices (eg multi-touch - other fingers) */
191 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) */
192 double pressure; /* pressure - 1.0 == normal, > 1.0 == more, 0.0 == none */
193 double angle; /* angle relative to perpendicular (0.0 == perpendicular), in degrees */
194 double x, y; /* same as x, y root.x, root.y, but with sub-pixel precision, if available */
201 struct _Ecore_Event_Mouse_IO
204 Ecore_Window event_window;
206 unsigned int timestamp;
207 unsigned int modifiers;
213 struct _Ecore_Event_Modifiers
216 unsigned int array[ECORE_LAST];
219 EAPI int ecore_event_init(void);
220 EAPI int ecore_event_shutdown(void);
222 EAPI unsigned int ecore_event_modifier_mask(Ecore_Event_Modifier modifier);
223 EAPI Ecore_Event_Modifier ecore_event_update_modifier(const char *key, Ecore_Event_Modifiers *modifiers, int inc);
228 EAPI Ecore_Compose_State ecore_compose_get(const Eina_List *seq, char **seqstr_ret);