summaryrefslogtreecommitdiff
path: root/src/lib/ecore_input
diff options
context:
space:
mode:
authorPierre Le Magourou <pierre.lemagourou@openwide.fr>2014-10-16 13:20:43 +0200
committerCedric BAIL <cedric@osg.samsung.com>2014-10-20 18:17:27 +0200
commit4c0b383dc4385a0acd1c8bcb4665a861990c926c (patch)
tree76c8d70ed507acef8320774052e326c6c9ede712 /src/lib/ecore_input
parentab9691be44064cb6b6e5fcb8cc82d0aa99a6885d (diff)
ecore_input: update missing Ecore_Input.h API documentation.
Diffstat (limited to 'src/lib/ecore_input')
-rw-r--r--src/lib/ecore_input/Ecore_Input.h213
1 files changed, 146 insertions, 67 deletions
diff --git a/src/lib/ecore_input/Ecore_Input.h b/src/lib/ecore_input/Ecore_Input.h
index 46e3e6ea87..f9f781a7fc 100644
--- a/src/lib/ecore_input/Ecore_Input.h
+++ b/src/lib/ecore_input/Ecore_Input.h
@@ -39,6 +39,12 @@
39extern "C" { 39extern "C" {
40#endif 40#endif
41 41
42/**
43 * @defgroup Ecore_Input_Group Ecore Input
44 * @ingroup Ecore_Group
45 *
46 *@{
47 */
42 EAPI extern int ECORE_EVENT_KEY_DOWN; 48 EAPI extern int ECORE_EVENT_KEY_DOWN;
43 EAPI extern int ECORE_EVENT_KEY_UP; 49 EAPI extern int ECORE_EVENT_KEY_UP;
44 EAPI extern int ECORE_EVENT_MOUSE_BUTTON_DOWN; 50 EAPI extern int ECORE_EVENT_MOUSE_BUTTON_DOWN;
@@ -72,7 +78,11 @@ extern "C" {
72 typedef struct _Ecore_Event_Mouse_Move Ecore_Event_Mouse_Move; 78 typedef struct _Ecore_Event_Mouse_Move Ecore_Event_Mouse_Move;
73 typedef struct _Ecore_Event_Mouse_IO Ecore_Event_Mouse_IO; 79 typedef struct _Ecore_Event_Mouse_IO Ecore_Event_Mouse_IO;
74 typedef struct _Ecore_Event_Modifiers Ecore_Event_Modifiers; 80 typedef struct _Ecore_Event_Modifiers Ecore_Event_Modifiers;
75 81
82 /**
83 * @typedef Ecore_Event_Modifier
84 * An enum of modifier events.
85 */
76 typedef enum _Ecore_Event_Modifier 86 typedef enum _Ecore_Event_Modifier
77 { 87 {
78 ECORE_NONE, 88 ECORE_NONE,
@@ -86,18 +96,30 @@ extern "C" {
86 ECORE_LAST 96 ECORE_LAST
87 } Ecore_Event_Modifier; 97 } Ecore_Event_Modifier;
88 98
99 /**
100 * @typedef Ecore_Event_Press
101 * An enum of press events.
102 */
89 typedef enum _Ecore_Event_Press 103 typedef enum _Ecore_Event_Press
90 { 104 {
91 ECORE_DOWN, 105 ECORE_DOWN,
92 ECORE_UP 106 ECORE_UP
93 } Ecore_Event_Press; 107 } Ecore_Event_Press;
94 108
109 /**
110 * @typedef Ecore_Event_IO
111 * An enum of Input/Output events.
112 */
95 typedef enum _Ecore_Event_IO 113 typedef enum _Ecore_Event_IO
96 { 114 {
97 ECORE_IN, 115 ECORE_IN,
98 ECORE_OUT 116 ECORE_OUT
99 } Ecore_Event_IO; 117 } Ecore_Event_IO;
100 118
119 /**
120 * @typedef Ecore_Compose_State
121 * An enum of Compose states.
122 */
101 typedef enum _Ecore_Compose_State 123 typedef enum _Ecore_Compose_State
102 { 124 {
103 ECORE_COMPOSE_NONE, 125 ECORE_COMPOSE_NONE,
@@ -105,140 +127,197 @@ extern "C" {
105 ECORE_COMPOSE_DONE 127 ECORE_COMPOSE_DONE
106 } Ecore_Compose_State; 128 } Ecore_Compose_State;
107 129
130 /**
131 * @struct _Ecore_Event_Key
132 * Contains information about an Ecore keyboard event.
133 */
108 struct _Ecore_Event_Key 134 struct _Ecore_Event_Key
109 { 135 {
110 const char *keyname; 136 const char *keyname; /**< The key name */
111 const char *key; 137 const char *key; /**< The key symbol */
112 const char *string; 138 const char *string;
113 const char *compose; 139 const char *compose; /**< final string corresponding to the key symbol composed */
114 Ecore_Window window; 140 Ecore_Window window; /**< The main window where event happened */
115 Ecore_Window root_window; 141 Ecore_Window root_window; /**< The root window where event happened */
116 Ecore_Window event_window; 142 Ecore_Window event_window; /**< The child window where event happened */
117 143
118 unsigned int timestamp; 144 unsigned int timestamp; /**< Time when the event occurred */
119 unsigned int modifiers; 145 unsigned int modifiers; /**< The combination of modifiers key (SHIT,CTRL,ALT,..)*/
120 146
121 int same_screen; 147 int same_screen; /**< same screen flag */
122 148
123 unsigned int keycode; /**< Key scan code numeric value @since 1.10 */ 149 unsigned int keycode; /**< Key scan code numeric value @since 1.10 */
124 150
125 void *data; /**< User data associated with an Ecore_Event_Key @since 1.10 */ 151 void *data; /**< User data associated with an Ecore_Event_Key @since 1.10 */
126 }; 152 };
127 153
154 /**
155 * @struct _Ecore_Event_Mouse_Button
156 * Contains information about an Ecore mouse button event.
157 */
128 struct _Ecore_Event_Mouse_Button 158 struct _Ecore_Event_Mouse_Button
129 { 159 {
130 Ecore_Window window; 160 Ecore_Window window; /**< The main window where event happened */
131 Ecore_Window root_window; 161 Ecore_Window root_window; /**< The root window where event happened */
132 Ecore_Window event_window; 162 Ecore_Window event_window; /**< The child window where event happened */
133 163
134 unsigned int timestamp; 164 unsigned int timestamp; /**< Time when the event occurred */
135 unsigned int modifiers; 165 unsigned int modifiers; /**< The combination of modifiers key (SHIT,CTRL,ALT,..)*/
136 unsigned int buttons; 166 unsigned int buttons; /**< The button that was used */
137 unsigned int double_click; 167 unsigned int double_click; /**< Double click event */
138 unsigned int triple_click; 168 unsigned int triple_click; /**< Triple click event */
139 int same_screen; 169 int same_screen; /**< Same screen flag */
140 170
141 int x; 171 int x; /**< x coordinate relative to window where event happened */
142 int y; 172 int y; /**< y coordinate relative to window where event happened */
143 struct { 173 struct {
144 int x; 174 int x;
145 int y; 175 int y;
146 } root; 176 } root; /**< Coordinates relative to root window */
147 177
148 struct { 178 struct {
149 int device; /* 0 if normal mouse, 1+ for other mouse-devices (eg multi-touch - other fingers) */ 179 int device; /**< 0 if normal mouse, 1+ for other mouse-devices (eg multi-touch - other fingers) */
150 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) */ 180 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) */
151 double pressure; /* pressure - 1.0 == normal, > 1.0 == more, 0.0 == none */ 181 double pressure; /**< pressure - 1.0 == normal, > 1.0 == more, 0.0 == none */
152 double angle; /* angle relative to perpendicular (0.0 == perpendicular), in degrees */ 182 double angle; /**< angle relative to perpendicular (0.0 == perpendicular), in degrees */
153 double x, y; /* same as x, y root.x, root.y, but with sub-pixel precision, if available */ 183 double x, y; /**< same as x, y, but with sub-pixel precision, if available */
154 struct { 184 struct {
155 double x, y; 185 double x, y;
156 } root; 186 } root; /**< same as root.x, root.y, but with sub-pixel precision, if available */
157 } multi; 187 } multi;
158 }; 188 };
159 189
190 /**
191 * @struct _Ecore_Event_Mouse_Wheel
192 * Contains information about an Ecore mouse wheel event.
193 */
160 struct _Ecore_Event_Mouse_Wheel 194 struct _Ecore_Event_Mouse_Wheel
161 { 195 {
162 Ecore_Window window; 196 Ecore_Window window; /**< The main window where event happened */
163 Ecore_Window root_window; 197 Ecore_Window root_window; /**< The root window where event happened */
164 Ecore_Window event_window; 198 Ecore_Window event_window; /**< The child window where event happened */
165 199
166 unsigned int timestamp; 200 unsigned int timestamp; /**< Time when the event occurred */
167 unsigned int modifiers; 201 unsigned int modifiers; /**< The combination of modifiers key (SHIT,CTRL,ALT,..)*/
168 202
169 int same_screen; 203 int same_screen; /**< Same screen flag */
170 int direction; 204 int direction; /**< Orientation of the wheel (horizontal/vertical) */
171 int z; 205 int z; /**< Value of the wheel event (+1/-1) */
172 206
173 int x; 207 int x; /**< x coordinate relative to window where event happened */
174 int y; 208 int y; /**< y coordinate relative to window where event happened */
175 struct { 209 struct {
176 int x; 210 int x;
177 int y; 211 int y;
178 } root; 212 } root; /**< Coordinates relative to root window */
179 }; 213 };
180 214
215 /**
216 * @struct _Ecore_Event_Mouse_Move
217 * Contains information about an Ecore mouse move event.
218 */
181 struct _Ecore_Event_Mouse_Move 219 struct _Ecore_Event_Mouse_Move
182 { 220 {
183 Ecore_Window window; 221 Ecore_Window window; /**< The main window where event happened */
184 Ecore_Window root_window; 222 Ecore_Window root_window; /**< The root window where event happened */
185 Ecore_Window event_window; 223 Ecore_Window event_window; /**< The child window where event happened */
186 224
187 unsigned int timestamp; 225 unsigned int timestamp; /**< Time when the event occurred */
188 unsigned int modifiers; 226 unsigned int modifiers; /**< The combination of modifiers key (SHIT,CTRL,ALT,..)*/
189 227
190 int same_screen; 228 int same_screen; /**< Same screen flag */
191 229
192 int x; 230 int x; /**< x coordinate relative to window where event happened */
193 int y; 231 int y; /**< y coordinate relative to window where event happened */
194 struct { 232 struct {
195 int x; 233 int x;
196 int y; 234 int y;
197 } root; 235 } root; /**< Coordinates relative to root window */
198 236
199 struct { 237 struct {
200 int device; /* 0 if normal mouse, 1+ for other mouse-devices (eg multi-touch - other fingers) */ 238 int device; /**< 0 if normal mouse, 1+ for other mouse-devices (eg multi-touch - other fingers) */
201 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) */ 239 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) */
202 double pressure; /* pressure - 1.0 == normal, > 1.0 == more, 0.0 == none */ 240 double pressure; /**< pressure - 1.0 == normal, > 1.0 == more, 0.0 == none */
203 double angle; /* angle relative to perpendicular (0.0 == perpendicular), in degrees */ 241 double angle; /**< angle relative to perpendicular (0.0 == perpendicular), in degrees */
204 double x, y; /* same as x, y root.x, root.y, but with sub-pixel precision, if available */ 242 double x, y; /**< same as x, y root.x, root.y, but with sub-pixel precision, if available */
205 struct { 243 struct {
206 double x, y; 244 double x, y;
207 } root; 245 } root;
208 } multi; 246 } multi;
209 }; 247 };
210 248
249 /**
250 * @struct _Ecore_Event_Mouse_IO
251 * Contains information about an Ecore mouse input/output event.
252 */
211 struct _Ecore_Event_Mouse_IO 253 struct _Ecore_Event_Mouse_IO
212 { 254 {
213 Ecore_Window window; 255 Ecore_Window window; /**< The main window where event happened */
214 Ecore_Window event_window; 256 Ecore_Window event_window; /**< The child window where event happened */
215 257
216 unsigned int timestamp; 258 unsigned int timestamp; /**< Time when the event occurred */
217 unsigned int modifiers; 259 unsigned int modifiers; /**< The combination of modifiers key (SHIT,CTRL,ALT,..)*/
218 260
219 int x; 261 int x /**< x coordinate relative to window where event happened */
220 int y; 262 int y /**< y coordinate relative to window where event happened */
221 }; 263 };
222 264
265 /**
266 * @struct _Ecore_Event_Modifiers
267 * Contains information about an Ecore event modifier.
268 */
223 struct _Ecore_Event_Modifiers 269 struct _Ecore_Event_Modifiers
224 { 270 {
225 unsigned int size; 271 unsigned int size;
226 unsigned int array[ECORE_LAST]; 272 unsigned int array[ECORE_LAST];
227 }; 273 };
228 274
275 /**
276 * Initialises the Ecore Event system.
277 */
229 EAPI int ecore_event_init(void); 278 EAPI int ecore_event_init(void);
279 /**
280 * Shutdowns the Ecore Event system.
281 */
230 EAPI int ecore_event_shutdown(void); 282 EAPI int ecore_event_shutdown(void);
231 283
284 /**
285 * Return the Ecore modifier event integer associated to a
286 * Ecore_Event_Modifier modifier event.
287 *
288 * @param modifier A Ecore_Event_Modifier event.
289 * @return A event_modifier integer that matches with the provided modifier
290 * event.
291 */
232 EAPI unsigned int ecore_event_modifier_mask(Ecore_Event_Modifier modifier); 292 EAPI unsigned int ecore_event_modifier_mask(Ecore_Event_Modifier modifier);
293
294 /**
295 * Update a Ecore_Event_Modifiers array with "key" modifier.
296 *
297 * @param key A string describing a modifier key.
298 * @param modifiers A Ecore_Event_Modifiers structure.
299 * @param inc The value to increment in the modifiers array.
300 *
301 * @return ECORE_NONE if the key does not match with an existing one, else
302 * the corresponding Ecore_Event_Modifier.
303 */
233 EAPI Ecore_Event_Modifier ecore_event_update_modifier(const char *key, Ecore_Event_Modifiers *modifiers, int inc); 304 EAPI Ecore_Event_Modifier ecore_event_update_modifier(const char *key, Ecore_Event_Modifiers *modifiers, int inc);
234 305
235 /** 306 /**
236 * @since 1.7 307 * Handle a sequence of key symbols to make a final compose string.
308 *
309 * The final compose string seqstr_ret is allocated in this function and
310 * thus shall be freed when not needed anymore.
311 *
312 * @param seq The sequence of key symbols in a Eina_List.
313 * @param seqstr_ret The final compose string.
314 * @return The status of the composition.
237 */ 315 */
238 EAPI Ecore_Compose_State ecore_compose_get(const Eina_List *seq, char **seqstr_ret); 316 EAPI Ecore_Compose_State ecore_compose_get(const Eina_List *seq, char **seqstr_ret);
239 317
240#ifdef __cplusplus 318#ifdef __cplusplus
241} 319}
242#endif 320#endif
243 321
322/** @} */
244#endif 323#endif