2 * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
14 # ifdef EFL_ECORE_INPUT_BUILD
16 # define EAPI __declspec(dllexport)
19 # endif /* ! DLL_EXPORT */
21 # define EAPI __declspec(dllimport)
22 # endif /* ! EFL_ECORE_INPUT_BUILD */
26 # define EAPI __attribute__ ((visibility("default")))
39 EAPI extern int ECORE_EVENT_KEY_DOWN;
40 EAPI extern int ECORE_EVENT_KEY_UP;
41 EAPI extern int ECORE_EVENT_MOUSE_BUTTON_DOWN;
42 EAPI extern int ECORE_EVENT_MOUSE_BUTTON_UP;
43 EAPI extern int ECORE_EVENT_MOUSE_MOVE;
44 EAPI extern int ECORE_EVENT_MOUSE_WHEEL;
45 EAPI extern int ECORE_EVENT_MOUSE_IN;
46 EAPI extern int ECORE_EVENT_MOUSE_OUT;
48 #define ECORE_EVENT_MODIFIER_SHIFT 0x0001
49 #define ECORE_EVENT_MODIFIER_CTRL 0x0002
50 #define ECORE_EVENT_MODIFIER_ALT 0x0004
51 #define ECORE_EVENT_MODIFIER_WIN 0x0008
52 #define ECORE_EVENT_MODIFIER_SCROLL 0x0010
53 #define ECORE_EVENT_MODIFIER_NUM 0x0020
54 #define ECORE_EVENT_MODIFIER_CAPS 0x0040
55 #define ECORE_EVENT_LOCK_SCROLL 0x0080
56 #define ECORE_EVENT_LOCK_NUM 0x0100
57 #define ECORE_EVENT_LOCK_CAPS 0x0200
59 typedef uintptr_t Ecore_Window;
61 typedef struct _Ecore_Event_Key Ecore_Event_Key;
62 struct _Ecore_Event_Key
69 Ecore_Window root_window;
70 Ecore_Window event_window;
72 unsigned int timestamp;
73 unsigned int modifiers;
78 typedef struct _Ecore_Event_Mouse_Button Ecore_Event_Mouse_Button;
79 struct _Ecore_Event_Mouse_Button
82 Ecore_Window root_window;
83 Ecore_Window event_window;
85 unsigned int timestamp;
86 unsigned int modifiers;
88 unsigned int double_click;
89 unsigned int triple_click;
102 int device; /* 0 if normal mouse, 1+ for other mouse-devices (eg multi-touch - other fingers) */
103 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) */
104 double pressure; /* pressure - 1.0 == normal, > 1.0 == more, 0.0 == none */
105 double angle; /* angle relative to perpendicular (0.0 == perpendicular), in degrees */
106 double x, y; /* same as x, y root.x, root.y, but with sub-pixel precision, if available */
114 typedef struct _Ecore_Event_Mouse_Wheel Ecore_Event_Mouse_Wheel;
115 struct _Ecore_Event_Mouse_Wheel
118 Ecore_Window root_window;
119 Ecore_Window event_window;
121 unsigned int timestamp;
122 unsigned int modifiers;
137 typedef struct _Ecore_Event_Mouse_Move Ecore_Event_Mouse_Move;
138 struct _Ecore_Event_Mouse_Move
141 Ecore_Window root_window;
142 Ecore_Window event_window;
144 unsigned int timestamp;
145 unsigned int modifiers;
159 int device; /* 0 if normal mouse, 1+ for other mouse-devices (eg multi-touch - other fingers) */
160 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) */
161 double pressure; /* pressure - 1.0 == normal, > 1.0 == more, 0.0 == none */
162 double angle; /* angle relative to perpendicular (0.0 == perpendicular), in degrees */
163 double x, y; /* same as x, y root.x, root.y, but with sub-pixel precision, if available */
171 typedef struct _Ecore_Event_Mouse_IO Ecore_Event_Mouse_IO;
172 struct _Ecore_Event_Mouse_IO
175 Ecore_Window event_window;
177 unsigned int timestamp;
178 unsigned int modifiers;
184 enum _Ecore_Event_Modifier
196 enum _Ecore_Event_Press
208 typedef enum _Ecore_Event_IO Ecore_Event_IO;
209 typedef enum _Ecore_Event_Press Ecore_Event_Press;
210 typedef enum _Ecore_Event_Modifier Ecore_Event_Modifier;
212 typedef struct _Ecore_Event_Modifiers Ecore_Event_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);