17 # ifdef EFL_ECORE_INPUT_BUILD
19 # define EAPI __declspec(dllexport)
22 # endif /* ! DLL_EXPORT */
24 # define EAPI __declspec(dllimport)
25 # endif /* ! EFL_ECORE_INPUT_BUILD */
29 # define EAPI __attribute__ ((visibility("default")))
42 EAPI extern int ECORE_EVENT_KEY_DOWN;
43 EAPI extern int ECORE_EVENT_KEY_UP;
44 EAPI extern int ECORE_EVENT_MOUSE_BUTTON_DOWN;
45 EAPI extern int ECORE_EVENT_MOUSE_BUTTON_UP;
46 EAPI extern int ECORE_EVENT_MOUSE_MOVE;
47 EAPI extern int ECORE_EVENT_MOUSE_WHEEL;
48 EAPI extern int ECORE_EVENT_MOUSE_IN;
49 EAPI extern int ECORE_EVENT_MOUSE_OUT;
51 #define ECORE_EVENT_MODIFIER_SHIFT 0x0001
52 #define ECORE_EVENT_MODIFIER_CTRL 0x0002
53 #define ECORE_EVENT_MODIFIER_ALT 0x0004
54 #define ECORE_EVENT_MODIFIER_WIN 0x0008
55 #define ECORE_EVENT_MODIFIER_SCROLL 0x0010
56 #define ECORE_EVENT_MODIFIER_NUM 0x0020
57 #define ECORE_EVENT_MODIFIER_CAPS 0x0040
58 #define ECORE_EVENT_LOCK_SCROLL 0x0080
59 #define ECORE_EVENT_LOCK_NUM 0x0100
60 #define ECORE_EVENT_LOCK_CAPS 0x0200
61 #define ECORE_EVENT_LOCK_SHIFT 0x0300
62 #define ECORE_EVENT_MODIFIER_ALTGR 0x0400 /**< @since 1.7 */
64 typedef uintptr_t Ecore_Window;
65 typedef struct _Ecore_Event_Key Ecore_Event_Key;
66 typedef struct _Ecore_Event_Mouse_Button Ecore_Event_Mouse_Button;
67 typedef struct _Ecore_Event_Mouse_Wheel Ecore_Event_Mouse_Wheel;
68 typedef struct _Ecore_Event_Mouse_Move Ecore_Event_Mouse_Move;
69 typedef struct _Ecore_Event_Mouse_IO Ecore_Event_Mouse_IO;
70 typedef struct _Ecore_Event_Modifiers Ecore_Event_Modifiers;
72 typedef enum _Ecore_Event_Modifier
81 ECORE_MODE, /**< @since 1.7 */
83 } Ecore_Event_Modifier;
85 typedef enum _Ecore_Event_Press
91 typedef enum _Ecore_Event_IO
97 typedef enum _Ecore_Compose_State
100 ECORE_COMPOSE_MIDDLE,
102 } Ecore_Compose_State;
104 struct _Ecore_Event_Key
111 Ecore_Window root_window;
112 Ecore_Window event_window;
114 unsigned int timestamp;
115 unsigned int modifiers;
120 struct _Ecore_Event_Mouse_Button
123 Ecore_Window root_window;
124 Ecore_Window event_window;
126 unsigned int timestamp;
127 unsigned int modifiers;
128 unsigned int buttons;
129 unsigned int double_click;
130 unsigned int triple_click;
141 int device; /* 0 if normal mouse, 1+ for other mouse-devices (eg multi-touch - other fingers) */
142 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) */
143 double pressure; /* pressure - 1.0 == normal, > 1.0 == more, 0.0 == none */
144 double angle; /* angle relative to perpendicular (0.0 == perpendicular), in degrees */
145 double x, y; /* same as x, y root.x, root.y, but with sub-pixel precision, if available */
152 struct _Ecore_Event_Mouse_Wheel
155 Ecore_Window root_window;
156 Ecore_Window event_window;
158 unsigned int timestamp;
159 unsigned int modifiers;
173 struct _Ecore_Event_Mouse_Move
176 Ecore_Window root_window;
177 Ecore_Window event_window;
179 unsigned int timestamp;
180 unsigned int modifiers;
192 int device; /* 0 if normal mouse, 1+ for other mouse-devices (eg multi-touch - other fingers) */
193 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) */
194 double pressure; /* pressure - 1.0 == normal, > 1.0 == more, 0.0 == none */
195 double angle; /* angle relative to perpendicular (0.0 == perpendicular), in degrees */
196 double x, y; /* same as x, y root.x, root.y, but with sub-pixel precision, if available */
203 struct _Ecore_Event_Mouse_IO
206 Ecore_Window event_window;
208 unsigned int timestamp;
209 unsigned int modifiers;
215 struct _Ecore_Event_Modifiers
218 unsigned int array[ECORE_LAST];
221 EAPI int ecore_event_init(void);
222 EAPI int ecore_event_shutdown(void);
224 EAPI unsigned int ecore_event_modifier_mask(Ecore_Event_Modifier modifier);
225 EAPI Ecore_Event_Modifier ecore_event_update_modifier(const char *key, Ecore_Event_Modifiers *modifiers, int inc);
230 EAPI Ecore_Compose_State ecore_compose_get(const Eina_List *seq, char **seqstr_ret);