summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Gerecke <killertofu@gmail.com>2014-11-25 12:07:50 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2014-11-25 12:43:15 +0900
commit26c943bac0d4b62bce63a6b575c58d15e5e6113f (patch)
tree79fef2ccc792a21408577ae579e287f3442acada
parent86aef83eb2aa89a76135e0cbab6999684f51839a (diff)
Expose device (e.g. pen) axis information to applications
Summary: This patch set adds the necessary code to expose device axis state to applications. This was primarily written with graphics tablets in mind, which -- in addition to acting like a mouse -- also provide information about pen pressure, tilt, etc. Other devices could potentially benefit from this API as well: touchscreens, joysticks, knob controllers, "spaceballs", etc. Whenever an update to the device state is recieved, an "Axis update" event is synthesized. This event contains the updated information, typically scaled and normalized to a particular logical range (e.g. zero to one for pressure, -pi to pi radians for angles, etc.). Information about the tool which generated the event is also stored so that applications can disambiguate events from multiple devices (or in the case of multitouch screens, individual fingers). This API is only wired up for use with X11 at the moment. Support for other backends (e.g. Wayland) should be easy to add for those familiar them. **Note**: The following is a list of changes from the "v2" patches originally sent to the mailinglist //Define and implement new Ecore_Event_Axis_Update events// * Harcode axis labels instead of including xserver-properties.h * Use C89-style comments * Use doxygen comments * Update comment text to note axes with unbounded/undefined ranges/units * Create "Ecore_Axis" and "Ecore_Axis_Label" typedefs * Reference typedef'd instead of raw types * Adjust how we count through valuators to support tilt/az * Add support for tilt and azimuth * Tweak memory management in case number of valuators differ * Expand TWIST axis normalization to declared range * Only normalize TWIST axis if resolution == 1 (wacom bug) * Cache label atoms on first use to minimize round-trips //Implement EVAS_CALLBACK_AXIS_UPDATE event and friends// * Update to doxygen comments * Update comment text to note axes with unbounded/undefined ranges/units * Typedef 'Evas_Axis_Label', 'Evas_Axis' * Move typedef for 'Evas_Event_Axis_Update' * Reference typedef'd instead of raw types //Wire the Ecore and Evas implementations of axis update events together// * Expose ecore_event_evas_axis_update in Ecore_Input_Evas.h * Move ecore_event_evas_axis_update to more logical position //DEBUG: Add axis update logging to evas-multi-touch.c// * Removed from patch set //Make evas-multi-touch demo use new axis functionality// * Have pressure adjust rectangle brightness instead of size * Use more available axis data when rendering rectangle (azimuth, tilt, twist) Test Plan: The evas-multi-touch demo was updated to support axis update events. A graphics tablet was then used to verify that the pressure, azimuth, tilt, and twist data was coming through correctly. Reviewers: cedric, raster Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D1514 Conflicts: src/lib/ecore_input/Ecore_Input.h Carsten Haitzler - ** fixed forward enum typedefs (make things unhappy) ** fixed conflict above ** fixed wrong param type for _evas_canvas_event_feed_axis_update() ** fixed @sinces to be 1.13 ** fixed formatting/indeting ** fixed order of operation reliance in if's with ()'s to be clear ** fixed functions to be static that should have been
-rw-r--r--src/examples/evas/evas-multi-touch.c70
-rw-r--r--src/lib/ecore_input/Ecore_Input.h39
-rw-r--r--src/lib/ecore_input/ecore_input.c3
-rw-r--r--src/lib/ecore_input_evas/Ecore_Input_Evas.h1
-rw-r--r--src/lib/ecore_input_evas/ecore_input_evas.c18
-rw-r--r--src/lib/ecore_x/Ecore_X.h2
-rw-r--r--src/lib/ecore_x/xlib/ecore_x_events.c47
-rw-r--r--src/lib/ecore_x/xlib/ecore_x_private.h10
-rw-r--r--src/lib/ecore_x/xlib/ecore_x_xi2.c375
-rw-r--r--src/lib/evas/Evas_Common.h39
-rw-r--r--src/lib/evas/Evas_Eo.h2
-rw-r--r--src/lib/evas/Evas_Legacy.h4
-rw-r--r--src/lib/evas/canvas/evas_callbacks.c6
-rw-r--r--src/lib/evas/canvas/evas_canvas.eo19
-rw-r--r--src/lib/evas/canvas/evas_events.c55
-rw-r--r--src/lib/evas/include/evas_private.h1
-rw-r--r--src/modules/ecore_evas/engines/x/ecore_evas_x.c14
17 files changed, 592 insertions, 113 deletions
diff --git a/src/examples/evas/evas-multi-touch.c b/src/examples/evas/evas-multi-touch.c
index ac903638c4..6cd5b4dabe 100644
--- a/src/examples/evas/evas-multi-touch.c
+++ b/src/examples/evas/evas-multi-touch.c
@@ -98,6 +98,38 @@ _touch_move(Touch_Point *tp, int x, int y)
98} 98}
99 99
100static void 100static void
101_touch_update(Touch_Point *tp, float azimuth, float tilt, float twist, float pressure)
102{
103 Evas_Map* m = evas_map_new(4);
104 evas_map_util_points_populate_from_object(m, tp->move);
105
106 int r = tp->r * (1+pressure);
107 int g = tp->g * (1+pressure);
108 int b = tp->b * (1+pressure);
109
110 int x, y, w, h;
111 evas_object_geometry_get(tp->move, &x, &y, &w, &h);
112
113 float vheight = cos(tilt);
114 float vbase = sin(tilt);
115 float vx = cos(azimuth) * vbase;
116 float vy = sin(azimuth) * vbase;
117 float rx = (-atan2(vheight,vy) + M_PI/2) * 180.0/M_PI;
118 float ry = (-atan2(vheight,vx) + M_PI/2) * 180.0/M_PI;
119 float rz = (twist) * 180.0/M_PI;
120
121 /* apply */
122 evas_object_color_set(tp->move, r, g, b, ALPHA_MOVE);
123 evas_map_util_3d_rotate(m, rx, ry, rz, x+w/2, y+w/2, 0);
124 evas_map_util_3d_perspective(m, x+w/2, y+w/2, 10, 100);
125 evas_map_util_3d_lighting(m, WIDTH/2,HEIGHT/2, -500, 255, 255, 255, 192, 192, 192 );
126
127 evas_object_map_set(tp->move, m);
128 evas_object_map_enable_set(tp->move, EINA_TRUE);
129 evas_map_free(m);
130}
131
132static void
101_touch_end(Touch_Point *tp, int x, int y) 133_touch_end(Touch_Point *tp, int x, int y)
102{ 134{
103 evas_object_hide(tp->move); 135 evas_object_hide(tp->move);
@@ -140,6 +172,18 @@ _mouse_move_handle(int device, int x, int y)
140} 172}
141 173
142static void 174static void
175_mouse_update_handle(int device, float azimuth, float tilt, float twist, float pressure)
176{
177 Touch_Point *tp;
178
179 tp = eina_hash_find(d.hash, &device);
180 if (!tp)
181 return;
182
183 _touch_update(tp, azimuth, tilt, twist, pressure);
184}
185
186static void
143_mouse_up_handle(int device, int x, int y) 187_mouse_up_handle(int device, int x, int y)
144{ 188{
145 Touch_Point *tp; 189 Touch_Point *tp;
@@ -202,6 +246,30 @@ _multi_up_cb(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj EINA_
202 _mouse_up_handle(ev->device, ev->cur.canvas.x, ev->cur.canvas.y); 246 _mouse_up_handle(ev->device, ev->cur.canvas.x, ev->cur.canvas.y);
203} 247}
204 248
249static void
250_axis_update_cb(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info)
251{
252 Evas_Event_Axis_Update *ev = event_info;
253 float twist = 0, azimuth = 0, tilt = 0;
254 float pressure = 1;
255 int i;
256
257 for (i = 0; i < ev->naxis; i++)
258 {
259 float val = ev->axis[i].value;
260 switch (ev->axis[i].label)
261 {
262 case EVAS_AXIS_LABEL_PRESSURE: pressure = val; break;
263 case EVAS_AXIS_LABEL_TWIST: twist = val; break;
264 case EVAS_AXIS_LABEL_AZIMUTH: azimuth = val; break;
265 case EVAS_AXIS_LABEL_TILT: tilt = val; break;
266 default: break;
267 }
268 }
269
270 _mouse_update_handle(ev->toolid, azimuth, tilt, twist, pressure);
271}
272
205int 273int
206main(void) 274main(void)
207{ 275{
@@ -242,6 +310,8 @@ main(void)
242 evas_object_event_callback_add(d.bg, EVAS_CALLBACK_MULTI_MOVE, _multi_move_cb, &d); 310 evas_object_event_callback_add(d.bg, EVAS_CALLBACK_MULTI_MOVE, _multi_move_cb, &d);
243 evas_object_event_callback_add(d.bg, EVAS_CALLBACK_MOUSE_MOVE, _mouse_move_cb, &d); 311 evas_object_event_callback_add(d.bg, EVAS_CALLBACK_MOUSE_MOVE, _mouse_move_cb, &d);
244 312
313 evas_object_event_callback_add(d.bg, EVAS_CALLBACK_AXIS_UPDATE, _axis_update_cb, &d);
314
245 evas_object_focus_set(d.bg, EINA_TRUE); /* so we get input events */ 315 evas_object_focus_set(d.bg, EINA_TRUE); /* so we get input events */
246 316
247 ecore_main_loop_begin(); 317 ecore_main_loop_begin();
diff --git a/src/lib/ecore_input/Ecore_Input.h b/src/lib/ecore_input/Ecore_Input.h
index e6e1259c08..b9723c8835 100644
--- a/src/lib/ecore_input/Ecore_Input.h
+++ b/src/lib/ecore_input/Ecore_Input.h
@@ -53,6 +53,7 @@ extern "C" {
53 EAPI extern int ECORE_EVENT_MOUSE_WHEEL; 53 EAPI extern int ECORE_EVENT_MOUSE_WHEEL;
54 EAPI extern int ECORE_EVENT_MOUSE_IN; 54 EAPI extern int ECORE_EVENT_MOUSE_IN;
55 EAPI extern int ECORE_EVENT_MOUSE_OUT; 55 EAPI extern int ECORE_EVENT_MOUSE_OUT;
56 EAPI extern int ECORE_EVENT_AXIS_UPDATE; /**< @since 1.13 */
56 57
57#define ECORE_EVENT_MODIFIER_SHIFT 0x0001 58#define ECORE_EVENT_MODIFIER_SHIFT 0x0001
58#define ECORE_EVENT_MODIFIER_CTRL 0x0002 59#define ECORE_EVENT_MODIFIER_CTRL 0x0002
@@ -78,6 +79,8 @@ extern "C" {
78 typedef struct _Ecore_Event_Mouse_Move Ecore_Event_Mouse_Move; 79 typedef struct _Ecore_Event_Mouse_Move Ecore_Event_Mouse_Move;
79 typedef struct _Ecore_Event_Mouse_IO Ecore_Event_Mouse_IO; 80 typedef struct _Ecore_Event_Mouse_IO Ecore_Event_Mouse_IO;
80 typedef struct _Ecore_Event_Modifiers Ecore_Event_Modifiers; 81 typedef struct _Ecore_Event_Modifiers Ecore_Event_Modifiers;
82 typedef struct _Ecore_Event_Axis_Update Ecore_Event_Axis_Update; /**< @since 1.13 */
83 typedef struct _Ecore_Axis Ecore_Axis; /**< @since 1.13 */
81 84
82 /** 85 /**
83 * @typedef Ecore_Event_Modifier 86 * @typedef Ecore_Event_Modifier
@@ -246,6 +249,42 @@ extern "C" {
246 } multi; 249 } multi;
247 }; 250 };
248 251
252 typedef enum _Ecore_Axis_Label
253 {
254 ECORE_AXIS_LABEL_UNKNOWN, /**< Axis type is not known. Range: Unbounded. Unit: Undefined. @since 1.13 */
255 ECORE_AXIS_LABEL_X, /**< Position along physical X axis; not window relative. Range: Unbounded. Unit: Undefined. @since 1.13 */
256 ECORE_AXIS_LABEL_Y, /**< Position along physical Y axis; not window relative. Range: Unbounded. Unit: Undefined. @since 1.13 */
257 ECORE_AXIS_LABEL_PRESSURE, /**< Force applied to tool tip. Range: [0.0, 1.0]. Unit: Unitless. @since 1.13 */
258 ECORE_AXIS_LABEL_DISTANCE, /**< Relative distance along physical Z axis. Range: [0.0, 1.0]. Unit: Unitless. @since 1.13 */
259 ECORE_AXIS_LABEL_AZIMUTH, /**< Angle of tool about the Z axis from positive X axis. Range: [-PI, PI]. Unit: Radians. @since 1.13*/
260 ECORE_AXIS_LABEL_TILT, /**< Angle of tool about plane of sensor from positive Z axis. Range: [0.0, PI]. Unit: Radians. @since 1.13 */
261 ECORE_AXIS_LABEL_TWIST, /**< Rotation of tool about its major axis from its "natural" position. Range: [-PI, PI] Unit: Radians. @since 1.13 */
262 ECORE_AXIS_LABEL_TOUCH_WIDTH_MAJOR, /**< Length of contact ellipse along AZIMUTH. Range: Unbounded: Unit: Same as ECORE_AXIS_LABEL_{X,Y}. @since 1.13 */
263 ECORE_AXIS_LABEL_TOUCH_WIDTH_MINOR, /**< Length of contact ellipse perpendicular to AZIMUTH. Range: Unbounded. Unit: Same as ECORE_AXIS_LABEL_{X,Y}. @since 1.13 */
264 ECORE_AXIS_LABEL_TOOL_WIDTH_MAJOR, /**< Length of tool ellipse along AZIMUTH. Range: Unbounded. Unit: Same as ECORE_AXIS_LABEL_{X,Y}. @since 1.13 */
265 ECORE_AXIS_LABEL_TOOL_WIDTH_MINOR /**< Length of tool ellipse perpendicular to AZIMUTH. Range: Unbounded. Unit: Same as ECORE_AXIS_LABEL_{X,Y}. @since 1.13 */
266 } Ecore_Axis_Label; /**< @since 1.13 */
267
268 struct _Ecore_Axis
269 {
270 Ecore_Axis_Label label;
271 double value;
272 };
273
274 struct _Ecore_Event_Axis_Update
275 {
276 Ecore_Window window;
277 Ecore_Window root_window;
278 Ecore_Window event_window;
279
280 unsigned int timestamp;
281 int device;
282 int toolid;
283
284 int naxis;
285 Ecore_Axis *axis;
286 };
287
249 /** 288 /**
250 * @struct _Ecore_Event_Mouse_IO 289 * @struct _Ecore_Event_Mouse_IO
251 * Contains information about an Ecore mouse input/output event. 290 * Contains information about an Ecore mouse input/output event.
diff --git a/src/lib/ecore_input/ecore_input.c b/src/lib/ecore_input/ecore_input.c
index 8f4b1f9bc0..ac8b60db17 100644
--- a/src/lib/ecore_input/ecore_input.c
+++ b/src/lib/ecore_input/ecore_input.c
@@ -22,6 +22,7 @@ EAPI int ECORE_EVENT_MOUSE_MOVE = 0;
22EAPI int ECORE_EVENT_MOUSE_WHEEL = 0; 22EAPI int ECORE_EVENT_MOUSE_WHEEL = 0;
23EAPI int ECORE_EVENT_MOUSE_IN = 0; 23EAPI int ECORE_EVENT_MOUSE_IN = 0;
24EAPI int ECORE_EVENT_MOUSE_OUT = 0; 24EAPI int ECORE_EVENT_MOUSE_OUT = 0;
25EAPI int ECORE_EVENT_AXIS_UPDATE = 0;
25 26
26static int _ecore_event_init_count = 0; 27static int _ecore_event_init_count = 0;
27 28
@@ -52,6 +53,7 @@ ecore_event_init(void)
52 ECORE_EVENT_MOUSE_WHEEL = ecore_event_type_new(); 53 ECORE_EVENT_MOUSE_WHEEL = ecore_event_type_new();
53 ECORE_EVENT_MOUSE_IN = ecore_event_type_new(); 54 ECORE_EVENT_MOUSE_IN = ecore_event_type_new();
54 ECORE_EVENT_MOUSE_OUT = ecore_event_type_new(); 55 ECORE_EVENT_MOUSE_OUT = ecore_event_type_new();
56 ECORE_EVENT_AXIS_UPDATE = ecore_event_type_new();
55 57
56 return _ecore_event_init_count; 58 return _ecore_event_init_count;
57} 59}
@@ -70,6 +72,7 @@ ecore_event_shutdown(void)
70 ECORE_EVENT_MOUSE_WHEEL = 0; 72 ECORE_EVENT_MOUSE_WHEEL = 0;
71 ECORE_EVENT_MOUSE_IN = 0; 73 ECORE_EVENT_MOUSE_IN = 0;
72 ECORE_EVENT_MOUSE_OUT = 0; 74 ECORE_EVENT_MOUSE_OUT = 0;
75 ECORE_EVENT_AXIS_UPDATE = 0;
73 eina_log_domain_unregister(_ecore_input_log_dom); 76 eina_log_domain_unregister(_ecore_input_log_dom);
74 _ecore_input_log_dom = -1; 77 _ecore_input_log_dom = -1;
75 ecore_shutdown(); 78 ecore_shutdown();
diff --git a/src/lib/ecore_input_evas/Ecore_Input_Evas.h b/src/lib/ecore_input_evas/Ecore_Input_Evas.h
index c97274eb0b..82f81c830d 100644
--- a/src/lib/ecore_input_evas/Ecore_Input_Evas.h
+++ b/src/lib/ecore_input_evas/Ecore_Input_Evas.h
@@ -49,6 +49,7 @@ EAPI Eina_Bool ecore_event_evas_mouse_wheel(void *data, int type, void *event);
49EAPI Eina_Bool ecore_event_evas_mouse_move(void *data, int type, void *event); 49EAPI Eina_Bool ecore_event_evas_mouse_move(void *data, int type, void *event);
50EAPI Eina_Bool ecore_event_evas_mouse_in(void *data, int type, void *event); 50EAPI Eina_Bool ecore_event_evas_mouse_in(void *data, int type, void *event);
51EAPI Eina_Bool ecore_event_evas_mouse_out(void *data, int type, void *event); 51EAPI Eina_Bool ecore_event_evas_mouse_out(void *data, int type, void *event);
52EAPI Eina_Bool ecore_event_evas_axis_update(void *data, int type, void *event);
52 53
53EAPI void ecore_event_window_register(Ecore_Window id, void *window, Evas *evas, Ecore_Event_Mouse_Move_Cb move_mouse, Ecore_Event_Multi_Move_Cb move_multi, Ecore_Event_Multi_Down_Cb down_multi, Ecore_Event_Multi_Up_Cb up_multi); 54EAPI void ecore_event_window_register(Ecore_Window id, void *window, Evas *evas, Ecore_Event_Mouse_Move_Cb move_mouse, Ecore_Event_Multi_Move_Cb move_multi, Ecore_Event_Multi_Down_Cb down_multi, Ecore_Event_Multi_Up_Cb up_multi);
54EAPI void ecore_event_window_unregister(Ecore_Window id); 55EAPI void ecore_event_window_unregister(Ecore_Window id);
diff --git a/src/lib/ecore_input_evas/ecore_input_evas.c b/src/lib/ecore_input_evas/ecore_input_evas.c
index 52058624fa..e9e7fb9040 100644
--- a/src/lib/ecore_input_evas/ecore_input_evas.c
+++ b/src/lib/ecore_input_evas/ecore_input_evas.c
@@ -46,7 +46,7 @@ struct _Ecore_Input_Last
46}; 46};
47 47
48static int _ecore_event_evas_init_count = 0; 48static int _ecore_event_evas_init_count = 0;
49static Ecore_Event_Handler *ecore_event_evas_handlers[8]; 49static Ecore_Event_Handler *ecore_event_evas_handlers[9];
50static Eina_Hash *_window_hash = NULL; 50static Eina_Hash *_window_hash = NULL;
51 51
52static Eina_List *_last_events = NULL; 52static Eina_List *_last_events = NULL;
@@ -541,6 +541,19 @@ ecore_event_evas_mouse_out(void *data EINA_UNUSED, int type EINA_UNUSED, void *e
541 return _ecore_event_evas_mouse_io((Ecore_Event_Mouse_IO *)event, ECORE_OUT); 541 return _ecore_event_evas_mouse_io((Ecore_Event_Mouse_IO *)event, ECORE_OUT);
542} 542}
543 543
544EAPI Eina_Bool
545ecore_event_evas_axis_update(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
546{
547 Ecore_Event_Axis_Update *e;
548 Ecore_Input_Window *lookup;
549
550 e = event;
551 lookup = _ecore_event_window_match(e->event_window);
552 if (!lookup) return ECORE_CALLBACK_PASS_ON;
553 evas_event_feed_axis_update(lookup->evas, e->timestamp, e->device, e->toolid, e->naxis, e->axis, NULL);
554 return ECORE_CALLBACK_PASS_ON;
555}
556
544EAPI int 557EAPI int
545ecore_event_evas_init(void) 558ecore_event_evas_init(void)
546{ 559{
@@ -589,6 +602,9 @@ ecore_event_evas_init(void)
589 ecore_event_evas_handlers[7] = ecore_event_handler_add(ECORE_EVENT_MOUSE_OUT, 602 ecore_event_evas_handlers[7] = ecore_event_handler_add(ECORE_EVENT_MOUSE_OUT,
590 ecore_event_evas_mouse_out, 603 ecore_event_evas_mouse_out,
591 NULL); 604 NULL);
605 ecore_event_evas_handlers[8] = ecore_event_handler_add(ECORE_EVENT_AXIS_UPDATE,
606 ecore_event_evas_axis_update,
607 NULL);
592 608
593 _window_hash = eina_hash_pointer_new(free); 609 _window_hash = eina_hash_pointer_new(free);
594 610
diff --git a/src/lib/ecore_x/Ecore_X.h b/src/lib/ecore_x/Ecore_X.h
index 7272b6a948..d03003bb9a 100644
--- a/src/lib/ecore_x/Ecore_X.h
+++ b/src/lib/ecore_x/Ecore_X.h
@@ -2529,7 +2529,7 @@ EAPI Eina_Bool ecore_x_image_is_argb32_get(Ecore_X_Image *im);
2529 2529
2530EAPI Eina_Bool ecore_x_image_to_argb_convert(void *src, int sbpp, int sbpl, Ecore_X_Colormap c, Ecore_X_Visual v, int x, int y, int w, int h, unsigned int *dst, int dbpl, int dx, int dy); 2530EAPI Eina_Bool ecore_x_image_to_argb_convert(void *src, int sbpp, int sbpl, Ecore_X_Colormap c, Ecore_X_Visual v, int x, int y, int w, int h, unsigned int *dst, int dbpl, int dx, int dy);
2531 2531
2532EAPI Eina_Bool ecore_x_input_multi_select(Ecore_X_Window win); 2532EAPI Eina_Bool ecore_x_input_select(Ecore_X_Window win);
2533EAPI Eina_Bool ecore_x_input_raw_select(Ecore_X_Window win); /**< @since 1.8 */ 2533EAPI Eina_Bool ecore_x_input_raw_select(Ecore_X_Window win); /**< @since 1.8 */
2534 2534
2535EAPI Eina_Bool ecore_x_vsync_animator_tick_source_set(Ecore_X_Window win); 2535EAPI Eina_Bool ecore_x_vsync_animator_tick_source_set(Ecore_X_Window win);
diff --git a/src/lib/ecore_x/xlib/ecore_x_events.c b/src/lib/ecore_x/xlib/ecore_x_events.c
index d4049d27dc..80c289cdc3 100644
--- a/src/lib/ecore_x/xlib/ecore_x_events.c
+++ b/src/lib/ecore_x/xlib/ecore_x_events.c
@@ -270,6 +270,53 @@ _ecore_mouse_move(unsigned int timestamp,
270} 270}
271 271
272static void 272static void
273_ecore_x_event_free_axis_update_event(void *data, void *ev)
274{
275 Ecore_Event_Axis_Update *e = ev;
276 if (e) free(e->axis);
277 free(e);
278}
279
280void
281_ecore_x_axis_update(Ecore_Window window,
282 Ecore_Window event_window,
283 Ecore_Window root_window,
284 unsigned int timestamp,
285 int devid,
286 int toolid,
287 int naxis,
288 Ecore_Axis *axis)
289{
290 Ecore_Event_Axis_Update *e;
291 int i;
292
293 e = malloc(sizeof(Ecore_Event_Axis_Update));
294 if (!e) return;
295
296 e->window = window;
297 e->event_window = event_window;
298 e->root_window = root_window;
299
300 e->timestamp = timestamp;
301
302 e->device = devid;
303 e->toolid = toolid;
304
305 e->naxis = naxis;
306 e->axis = axis;
307
308 INF("Axis update [%d] (%d) with %d events:", ECORE_EVENT_AXIS_UPDATE, e->device, e->naxis);
309 for (i = 0; i < naxis; i++)
310 {
311 INF("AXIS %d = %f", e->axis[i].label, e->axis[i].value);
312 }
313
314 ecore_event_add(ECORE_EVENT_AXIS_UPDATE, e, _ecore_x_event_free_axis_update_event, NULL);
315
316 _ecore_x_event_last_time = timestamp;
317}
318
319static void
273_ecore_key_press(int event, 320_ecore_key_press(int event,
274 XKeyEvent *xevent) 321 XKeyEvent *xevent)
275{ 322{
diff --git a/src/lib/ecore_x/xlib/ecore_x_private.h b/src/lib/ecore_x/xlib/ecore_x_private.h
index cbfa4f7c8c..97b3858f30 100644
--- a/src/lib/ecore_x/xlib/ecore_x_private.h
+++ b/src/lib/ecore_x/xlib/ecore_x_private.h
@@ -344,6 +344,16 @@ void _ecore_x_input_shutdown(void);
344void _ecore_x_input_handler(XEvent *xevent); 344void _ecore_x_input_handler(XEvent *xevent);
345/* from sync */ 345/* from sync */
346 346
347void
348_ecore_x_axis_update(Ecore_Window window,
349 Ecore_Window event_window,
350 Ecore_Window root_window,
351 unsigned int timestamp,
352 int devid,
353 int toolid,
354 int naxis,
355 Ecore_Axis *axis);
356
347void _ecore_mouse_move(unsigned int timestamp, 357void _ecore_mouse_move(unsigned int timestamp,
348 unsigned int xmodifiers, 358 unsigned int xmodifiers,
349 int x, 359 int x,
diff --git a/src/lib/ecore_x/xlib/ecore_x_xi2.c b/src/lib/ecore_x/xlib/ecore_x_xi2.c
index 2a49d0c95e..d5139c7cc0 100644
--- a/src/lib/ecore_x/xlib/ecore_x_xi2.c
+++ b/src/lib/ecore_x/xlib/ecore_x_xi2.c
@@ -3,6 +3,7 @@
3#endif /* ifdef HAVE_CONFIG_H */ 3#endif /* ifdef HAVE_CONFIG_H */
4 4
5#include <string.h> 5#include <string.h>
6#include <math.h>
6 7
7#include "Ecore.h" 8#include "Ecore.h"
8#include "ecore_x_private.h" 9#include "ecore_x_private.h"
@@ -88,6 +89,42 @@ _ecore_x_input_touch_info_clear(void)
88#endif /* ifdef ECORE_XI2_2 */ 89#endif /* ifdef ECORE_XI2_2 */
89#endif /* ifdef ECORE_XI2 */ 90#endif /* ifdef ECORE_XI2 */
90 91
92#ifdef ECORE_XI2
93static Atom
94_ecore_x_input_get_axis_label(char *axis_name)
95{
96 static Atom *atoms = NULL;
97 static char *names[] =
98 {
99 "Abs X", "Abs Y", "Abs Pressure",
100 "Abs Distance", "Abs Rotary Z",
101 "Abs Wheel", "Abs Tilt X", "Abs Tilt Y"
102 };
103 int n = sizeof(names) / sizeof(names[0]);
104 int i;
105
106 if (atoms == NULL)
107 {
108 atoms = calloc(n, sizeof(Atom));
109 if (!atoms) return 0;
110
111 if (!XInternAtoms(_ecore_x_disp, names, n, 1, atoms))
112 {
113 free(atoms);
114 atoms = NULL;
115 return 0;
116 }
117 }
118
119 for (i = 0; i < n; i++)
120 {
121 if (!strcmp(axis_name, names[i])) return atoms[i];
122 }
123
124 return 0;
125}
126#endif /* ifdef ECORE_XI2 */
127
91void 128void
92_ecore_x_input_shutdown(void) 129_ecore_x_input_shutdown(void)
93{ 130{
@@ -208,15 +245,11 @@ _ecore_x_input_touch_info_get(XIDeviceInfo *dev)
208#endif 245#endif
209 246
210void 247void
211_ecore_x_input_handler(XEvent *xevent) 248_ecore_x_input_raw_handler(XEvent *xevent)
212{ 249{
213#ifdef ECORE_XI2 250#ifdef ECORE_XI2
214 XIDeviceEvent *evd = (XIDeviceEvent *)(xevent->xcookie.data); 251 if (xevent->type != GenericEvent) return;
215 /* XIRawEvent *evr = (XIRawEvent *)(xevent->xcookie.data); */
216 int devid = evd->deviceid;
217 int i;
218 252
219 /* No filter for this events */
220 switch (xevent->xcookie.evtype) 253 switch (xevent->xcookie.evtype)
221 { 254 {
222#ifdef XI_RawButtonPress 255#ifdef XI_RawButtonPress
@@ -235,24 +268,22 @@ _ecore_x_input_handler(XEvent *xevent)
235 break; 268 break;
236#endif 269#endif
237 } 270 }
271#endif /* ifdef ECORE_XI2 */
272}
238 273
239 if (_ecore_x_xi2_devs) 274void
240 { 275_ecore_x_input_mouse_handler(XEvent *xevent)
241 for (i = 0; i < _ecore_x_xi2_num; i++) 276{
242 { 277#ifdef ECORE_XI2
243 XIDeviceInfo *dev = &(_ecore_x_xi2_devs[i]); 278 if (xevent->type != GenericEvent) return;
279
280 XIDeviceEvent *evd = (XIDeviceEvent *)(xevent->xcookie.data);
281 int devid = evd->deviceid;
244 282
245 if (devid == dev->deviceid)
246 {
247 if (dev->use == XIMasterPointer) return;
248 if ((dev->use == XISlavePointer) &&
249 (evd->flags & XIPointerEmulated)) return;
250 }
251 }
252 }
253 switch (xevent->xcookie.evtype) 283 switch (xevent->xcookie.evtype)
254 { 284 {
255 case XI_Motion: 285 case XI_Motion:
286 INF("Handling XI_Motion");
256 _ecore_mouse_move 287 _ecore_mouse_move
257 (evd->time, 288 (evd->time,
258 0, // state 289 0, // state
@@ -290,7 +321,7 @@ _ecore_x_input_handler(XEvent *xevent)
290 break; 321 break;
291 322
292 case XI_ButtonRelease: 323 case XI_ButtonRelease:
293 INF("ButtonEvent:multi release time=%u x=%d y=%d devid=%d", (unsigned int)evd->time, (int)evd->event_x, (int)evd->event_y, devid); 324 INF("ButtonEvent:multi release time=%u x=%d y=%d devid=%d", (unsigned int)evd->time, (int)evd->event_x, (int)evd->event_y, devid);
294 _ecore_mouse_button 325 _ecore_mouse_button
295 (ECORE_EVENT_MOUSE_BUTTON_UP, 326 (ECORE_EVENT_MOUSE_BUTTON_UP,
296 evd->time, 327 evd->time,
@@ -308,13 +339,27 @@ _ecore_x_input_handler(XEvent *xevent)
308 evd->event_x, evd->event_y, 339 evd->event_x, evd->event_y,
309 evd->root_x, evd->root_y); 340 evd->root_x, evd->root_y);
310 break; 341 break;
342 }
343#endif /* ifdef ECORE_XI2 */
344}
345
346void
347_ecore_x_input_multi_handler(XEvent *xevent)
348{
349#ifdef ECORE_XI2
350 if (xevent->type != GenericEvent) return;
351 XIDeviceEvent *evd = (XIDeviceEvent *)(xevent->xcookie.data);
352 int devid = evd->deviceid;
311 353
354 switch (xevent->xcookie.evtype)
355 {
312#ifdef XI_TouchUpdate 356#ifdef XI_TouchUpdate
313 case XI_TouchUpdate: 357 case XI_TouchUpdate:
314#ifdef ECORE_XI2_2 358#ifdef ECORE_XI2_2
315 i = _ecore_x_input_touch_index_get(devid, evd->detail, XI_TouchUpdate); 359 i = _ecore_x_input_touch_index_get(devid, evd->detail, XI_TouchUpdate);
316 if ((i == 0) && (evd->flags & XITouchEmulatingPointer)) return; 360 if ((i == 0) && (evd->flags & XITouchEmulatingPointer)) return;
317#endif /* #ifdef ECORE_XI2_2 */ 361#endif /* #ifdef ECORE_XI2_2 */
362 INF("Handling XI_TouchUpdate");
318 _ecore_mouse_move 363 _ecore_mouse_move
319 (evd->time, 364 (evd->time,
320 0, // state 365 0, // state
@@ -342,6 +387,7 @@ _ecore_x_input_handler(XEvent *xevent)
342 i = _ecore_x_input_touch_index_get(devid, evd->detail, XI_TouchBegin); 387 i = _ecore_x_input_touch_index_get(devid, evd->detail, XI_TouchBegin);
343 if ((i == 0) && (evd->flags & XITouchEmulatingPointer)) return; 388 if ((i == 0) && (evd->flags & XITouchEmulatingPointer)) return;
344#endif /* #ifdef ECORE_XI2_2 */ 389#endif /* #ifdef ECORE_XI2_2 */
390 INF("Handling XI_TouchBegin");
345 _ecore_mouse_button 391 _ecore_mouse_button
346 (ECORE_EVENT_MOUSE_BUTTON_DOWN, 392 (ECORE_EVENT_MOUSE_BUTTON_DOWN,
347 evd->time, 393 evd->time,
@@ -375,6 +421,7 @@ _ecore_x_input_handler(XEvent *xevent)
375 return; 421 return;
376 } 422 }
377#endif /* #ifdef ECORE_XI2_2 */ 423#endif /* #ifdef ECORE_XI2_2 */
424 INF("Handling XI_TouchEnd");
378 _ecore_mouse_button 425 _ecore_mouse_button
379 (ECORE_EVENT_MOUSE_BUTTON_UP, 426 (ECORE_EVENT_MOUSE_BUTTON_UP,
380 evd->time, 427 evd->time,
@@ -400,7 +447,181 @@ _ecore_x_input_handler(XEvent *xevent)
400#endif /* #ifdef ECORE_XI2_2 */ 447#endif /* #ifdef ECORE_XI2_2 */
401 break; 448 break;
402#endif 449#endif
450 }
451#endif /* ifdef ECORE_XI2 */
452}
453
454static int
455count_bits(long n)
456{
457 unsigned int c; /* c accumulates the total bits set in v */
458 for (c = 0; n; c++) n &= n - 1; /* clear the least significant bit set */
459 return c;
460}
461
462void
463_ecore_x_input_axis_handler(XEvent *xevent, XIDeviceInfo *dev)
464{
465#ifdef ECORE_XI2
466 if (xevent->type != GenericEvent) return;
467 XIDeviceEvent *evd = (XIDeviceEvent *)(xevent->xcookie.data);
468 int n = count_bits(*evd->valuators.mask);
469 int i;
470 int j = 0;
471 double tiltx = 0, tilty = 0;
472 Eina_Bool compute_tilt = EINA_FALSE;
473 Ecore_Axis *axis = calloc(n, sizeof(Ecore_Axis));
474 if (!axis) return;
475 Ecore_Axis *axis_ptr = axis;
476
477 for (i = 0; i < dev->num_classes; i++)
478 {
479 if (dev->classes[i]->type == XIValuatorClass)
480 {
481 XIValuatorClassInfo *inf = ((XIValuatorClassInfo *)dev->classes[i]);
482
483 if (*evd->valuators.mask & (1 << inf->number))
484 {
485 if (inf->label == _ecore_x_input_get_axis_label("Abs X"))
486 {
487 axis_ptr->label = ECORE_AXIS_LABEL_X;
488 axis_ptr->value = evd->valuators.values[j];
489 axis_ptr++;
490 }
491 else if (inf->label == _ecore_x_input_get_axis_label("Abs Y"))
492 {
493 axis_ptr->label = ECORE_AXIS_LABEL_Y;
494 axis_ptr->value = evd->valuators.values[j];
495 axis_ptr++;
496 }
497 else if (inf->label == _ecore_x_input_get_axis_label("Abs Pressure"))
498 {
499 axis_ptr->label = ECORE_AXIS_LABEL_PRESSURE;
500 axis_ptr->value = (evd->valuators.values[j] - inf->min) / (inf->max - inf->min);
501 axis_ptr++;
502 }
503 else if (inf->label == _ecore_x_input_get_axis_label("Abs Distance"))
504 {
505 axis_ptr->label = ECORE_AXIS_LABEL_DISTANCE;
506 axis_ptr->value = (evd->valuators.values[j] - inf->min) / (inf->max - inf->min);
507 axis_ptr++;
508 }
509 else if ((inf->label == _ecore_x_input_get_axis_label("Abs Rotary Z")) ||
510 (inf->label == _ecore_x_input_get_axis_label("Abs Wheel")))
511 {
512 axis_ptr->label = ECORE_AXIS_LABEL_TWIST;
513 if (inf->resolution == 1)
514 {
515 /* some wacom drivers do not correctly report resolution, so pre-normalize */
516 axis_ptr->value = 2*((evd->valuators.values[j] - inf->min) / (inf->max - inf->min)) - 1;
517 axis_ptr->value *= M_PI;
518 }
519 else
520 {
521 axis_ptr->value = evd->valuators.values[j] / inf->resolution;
522 }
523 axis_ptr++;
524 }
525 else if (inf->label == _ecore_x_input_get_axis_label("Abs Tilt X"))
526 {
527 tiltx = evd->valuators.values[j] / inf->resolution;
528 compute_tilt = EINA_TRUE;
529 /* don't increment axis_ptr */
530 }
531 else if (inf->label == _ecore_x_input_get_axis_label("Abs Tilt Y"))
532 {
533 tilty = -evd->valuators.values[j] / inf->resolution;
534 compute_tilt = EINA_TRUE;
535 /* don't increment axis_ptr */
536 }
537 else
538 {
539 axis_ptr->label = ECORE_AXIS_LABEL_UNKNOWN;
540 axis_ptr->value = evd->valuators.values[j];
541 axis_ptr++;
542 }
543 j++;
544 }
545 }
546 }
547
548 if ((compute_tilt) && ((axis_ptr + 2) <= (axis + n)))
549 {
550 double x = sin(tiltx);
551 double y = sin(tilty);
552 axis_ptr->label = ECORE_AXIS_LABEL_TILT;
553 axis_ptr->value = asin(sqrt((x * x) + (y * y)));
554 axis_ptr++;
555
556 /* note: the value of atan2(0,0) is implementation-defined */
557 axis_ptr->label = ECORE_AXIS_LABEL_AZIMUTH;
558 axis_ptr->value = atan2(y, x);
559 axis_ptr++;
560 }
561
562 /* update n to reflect actual count and realloc array to free excess */
563 n = (axis_ptr - axis);
564 Ecore_Axis *shrunk_axis = realloc(axis, n * sizeof(Ecore_Axis));
565 if (shrunk_axis != NULL) axis = shrunk_axis;
566
567 if (n > 0)
568 _ecore_x_axis_update(evd->child ? evd->child : evd->event,
569 evd->event, evd->root, evd->time, evd->deviceid,
570 evd->detail, n, axis);
571#endif /* ifdef ECORE_XI2 */
572}
573
574static XIDeviceInfo *
575_ecore_x_input_device_lookup(int deviceid)
576{
577 XIDeviceInfo *dev;
578 int i;
579
580 if (_ecore_x_xi2_devs)
581 {
582 for (i = 0; i < _ecore_x_xi2_num; i++)
583 {
584 dev = &(_ecore_x_xi2_devs[i]);
585 if (deviceid == dev->deviceid) return dev;
586 }
587 }
588 return NULL;
589}
590
591void
592_ecore_x_input_handler(XEvent *xevent)
593{
594#ifdef ECORE_XI2
595 if (xevent->type != GenericEvent) return;
596
597 switch (xevent->xcookie.evtype)
598 {
599 case XI_RawMotion:
600 case XI_RawButtonPress:
601 case XI_RawButtonRelease:
602 _ecore_x_input_raw_handler(xevent);
603 break;
604
605 case XI_Motion:
606 case XI_ButtonPress:
607 case XI_ButtonRelease:
608 case XI_TouchUpdate:
609 case XI_TouchBegin:
610 case XI_TouchEnd:
611 {
612 XIDeviceEvent *evd = (XIDeviceEvent *)(xevent->xcookie.data);
613 XIDeviceInfo *dev = _ecore_x_input_device_lookup(evd->deviceid);
403 614
615 if ((dev->use == XISlavePointer) &&
616 !(evd->flags & XIPointerEmulated))
617 _ecore_x_input_multi_handler(xevent);
618 else if (dev->use == XIFloatingSlave)
619 _ecore_x_input_mouse_handler(xevent);
620
621 if (dev->use != XIMasterPointer)
622 _ecore_x_input_axis_handler(xevent, dev);
623 }
624 break;
404 default: 625 default:
405 break; 626 break;
406 } 627 }
@@ -408,116 +629,64 @@ _ecore_x_input_handler(XEvent *xevent)
408} 629}
409 630
410EAPI Eina_Bool 631EAPI Eina_Bool
411ecore_x_input_multi_select(Ecore_X_Window win) 632ecore_x_input_select(Ecore_X_Window win)
412{ 633{
413#ifdef ECORE_XI2 634#ifdef ECORE_XI2
414 int i; 635 int i;
415 Eina_Bool find = EINA_FALSE; 636 Eina_Bool find = EINA_FALSE;
416 637
417 if (!_ecore_x_xi2_devs) 638 if (!_ecore_x_xi2_devs)
418 return 0; 639 return EINA_FALSE;
419 640
420 LOGFN(__FILE__, __LINE__, __FUNCTION__); 641 LOGFN(__FILE__, __LINE__, __FUNCTION__);
421 for (i = 0; i < _ecore_x_xi2_num; i++) 642 for (i = 0; i < _ecore_x_xi2_num; i++)
422 { 643 {
423 XIDeviceInfo *dev = &(_ecore_x_xi2_devs[i]); 644 XIDeviceInfo *dev = &(_ecore_x_xi2_devs[i]);
645 XIEventMask eventmask;
646 unsigned char mask[4] = { 0 };
647 int update = 0;
424 648
425 if (dev->use == XIFloatingSlave) 649 eventmask.deviceid = dev->deviceid;
426 { 650 eventmask.mask_len = sizeof(mask);
427 XIEventMask eventmask; 651 eventmask.mask = mask;
428 unsigned char mask[4] = { 0 };
429 652
430 eventmask.deviceid = dev->deviceid; 653 if ((dev->use == XIFloatingSlave) || (dev->use == XISlavePointer))
431 eventmask.mask_len = sizeof(mask); 654 {
432 eventmask.mask = mask;
433 XISetMask(mask, XI_ButtonPress); 655 XISetMask(mask, XI_ButtonPress);
434 XISetMask(mask, XI_ButtonRelease); 656 XISetMask(mask, XI_ButtonRelease);
435 XISetMask(mask, XI_Motion); 657 XISetMask(mask, XI_Motion);
436 XISelectEvents(_ecore_x_disp, win, &eventmask, 1);
437 if (_ecore_xlib_sync) ecore_x_sync();
438 find = EINA_TRUE;
439 }
440 else if (dev->use == XISlavePointer)
441 {
442 XIDeviceInfo *atdev = NULL;
443 int j;
444 658
445 for (j = 0; j < _ecore_x_xi2_num; j++)
446 {
447 if (_ecore_x_xi2_devs[j].deviceid == dev->attachment)
448 atdev = &(_ecore_x_xi2_devs[j]);
449 }
450 if (((atdev) && (atdev->use != XIMasterPointer)) ||
451 (!atdev))
452 {
453 XIEventMask eventmask;
454 unsigned char mask[4] = { 0 };
455
456 eventmask.deviceid = dev->deviceid;
457 eventmask.mask_len = sizeof(mask);
458 eventmask.mask = mask;
459 XISetMask(mask, XI_ButtonPress);
460 XISetMask(mask, XI_ButtonRelease);
461 XISetMask(mask, XI_Motion);
462#ifdef ECORE_XI2_2 659#ifdef ECORE_XI2_2
463 Eina_Inlist *l = _ecore_x_xi2_touch_info_list; 660 Eina_Inlist *l = _ecore_x_xi2_touch_info_list;
464 Ecore_X_Touch_Device_Info *info; 661 Ecore_X_Touch_Device_Info *info;
465 info = _ecore_x_input_touch_info_get(dev); 662 info = _ecore_x_input_touch_info_get(dev);
466
467 if (info)
468 {
469 XISetMask(mask, XI_TouchUpdate);
470 XISetMask(mask, XI_TouchBegin);
471 XISetMask(mask, XI_TouchEnd);
472 663
473 l = eina_inlist_append(l, (Eina_Inlist *)info); 664 if (info)
474 _ecore_x_xi2_touch_info_list = l; 665 {
475 }
476#else
477# ifdef XI_TouchUpdate
478 XISetMask(mask, XI_TouchUpdate); 666 XISetMask(mask, XI_TouchUpdate);
479# endif
480# ifdef XI_TouchBegin
481 XISetMask(mask, XI_TouchBegin); 667 XISetMask(mask, XI_TouchBegin);
482# endif
483# ifdef XI_TouchEnd
484 XISetMask(mask, XI_TouchEnd); 668 XISetMask(mask, XI_TouchEnd);
485# endif 669 update = 1;
486#endif /* #ifdef ECORE_XI2_2 */
487 670
488 XISelectEvents(_ecore_x_disp, win, &eventmask, 1); 671 l = eina_inlist_append(l, (Eina_Inlist *)info);
489 if (_ecore_xlib_sync) ecore_x_sync(); 672 _ecore_x_xi2_touch_info_list = l;
490 find = EINA_TRUE;
491 } 673 }
492#ifdef ECORE_XI2_2 674#endif /* #ifdef ECORE_XI2_2 */
493 else if ((atdev) && (atdev->use == XIMasterPointer))
494 {
495 Eina_Inlist *l = _ecore_x_xi2_touch_info_list;
496 Ecore_X_Touch_Device_Info *info;
497 info = _ecore_x_input_touch_info_get(dev);
498
499 if (info)
500 {
501 XIEventMask eventmask;
502 unsigned char mask[4] = { 0 };
503
504 eventmask.deviceid = dev->deviceid;
505 eventmask.mask_len = sizeof(mask);
506 eventmask.mask = mask;
507 675
508 XISetMask(mask, XI_TouchUpdate); 676#if !defined (ECORE_XI2_2) && defined (XI_TouchUpdate) && defined (XI_TouchBegin) && defined (XI_TouchEnd)
509 XISetMask(mask, XI_TouchBegin); 677 XISetMask(mask, XI_TouchUpdate);
510 XISetMask(mask, XI_TouchEnd); 678 XISetMask(mask, XI_TouchBegin);
511 XISelectEvents(_ecore_x_disp, win, &eventmask, 1); 679 XISetMask(mask, XI_TouchEnd);
512 if (_ecore_xlib_sync) ecore_x_sync(); 680#endif
513 681
514 l = eina_inlist_append(l, (Eina_Inlist *)info); 682 update = 1;
515 _ecore_x_xi2_touch_info_list = l; 683 }
516 684
517 find = EINA_TRUE; 685 if (update)
518 } 686 {
519 } 687 XISelectEvents(_ecore_x_disp, win, &eventmask, 1);
520#endif /* #ifdef ECORE_XI2_2 */ 688 if (_ecore_xlib_sync) ecore_x_sync();
689 find = EINA_TRUE;
521 } 690 }
522 } 691 }
523 692
diff --git a/src/lib/evas/Evas_Common.h b/src/lib/evas/Evas_Common.h
index e3cdc947a9..94acba2163 100644
--- a/src/lib/evas/Evas_Common.h
+++ b/src/lib/evas/Evas_Common.h
@@ -129,6 +129,8 @@ typedef enum _Evas_Callback_Type
129 129
130 EVAS_CALLBACK_IMAGE_RESIZE, /**< Image size is changed @since 1.8 */ 130 EVAS_CALLBACK_IMAGE_RESIZE, /**< Image size is changed @since 1.8 */
131 EVAS_CALLBACK_DEVICE_CHANGED, /**< Devices added, removed or changed on canvas @since 1.8 */ 131 EVAS_CALLBACK_DEVICE_CHANGED, /**< Devices added, removed or changed on canvas @since 1.8 */
132
133 EVAS_CALLBACK_AXIS_UPDATE, /**< Input device changed value on some axis @since 1.13 */
132 EVAS_CALLBACK_LAST /**< kept as last element/sentinel -- not really an event */ 134 EVAS_CALLBACK_LAST /**< kept as last element/sentinel -- not really an event */
133} Evas_Callback_Type; /**< The types of events triggering a callback */ 135} Evas_Callback_Type; /**< The types of events triggering a callback */
134 136
@@ -420,6 +422,8 @@ typedef struct _Evas_Event_Key_Down Evas_Event_Key_Down; /**< Event structu
420typedef struct _Evas_Event_Key_Up Evas_Event_Key_Up; /**< Event structure for #EVAS_CALLBACK_KEY_UP event callbacks */ 422typedef struct _Evas_Event_Key_Up Evas_Event_Key_Up; /**< Event structure for #EVAS_CALLBACK_KEY_UP event callbacks */
421typedef struct _Evas_Event_Hold Evas_Event_Hold; /**< Event structure for #EVAS_CALLBACK_HOLD event callbacks */ 423typedef struct _Evas_Event_Hold Evas_Event_Hold; /**< Event structure for #EVAS_CALLBACK_HOLD event callbacks */
422typedef struct _Evas_Event_Render_Post Evas_Event_Render_Post; /**< Event structure that may come with #EVAS_CALLBACK_RENDER_POST event callbacks @since 1.8 */ 424typedef struct _Evas_Event_Render_Post Evas_Event_Render_Post; /**< Event structure that may come with #EVAS_CALLBACK_RENDER_POST event callbacks @since 1.8 */
425typedef struct _Evas_Axis Evas_Axis; /**< Details for a single device axis state @since 1.13 */
426typedef struct _Evas_Event_Axis_Update Evas_Event_Axis_Update; /**< Event structure for #EVAS_CALLBACK_AXIS_UPDATE event callbacks @since 1.13 */
423 427
424typedef enum _Evas_Alloc_Error 428typedef enum _Evas_Alloc_Error
425{ 429{
@@ -842,6 +846,41 @@ struct _Evas_Event_Hold /** Hold change event */
842 Evas_Device *dev; 846 Evas_Device *dev;
843}; 847};
844 848
849typedef enum _Evas_Axis_Label
850{
851 EVAS_AXIS_LABEL_UNKNOWN, /**< Axis containing unknown (or not yet representable) data. Range: Unbounded. Unit: Undefined. @since 1.13 */
852 EVAS_AXIS_LABEL_X, /**< Position along physical X axis; not window relative. Range: Unbounded. Unit: Undefined. @since 1.13 */
853 EVAS_AXIS_LABEL_Y, /**< Position along physical Y axis; not window relative. Range: Unbounded. Unit: Undefined. @since 1.13 */
854 EVAS_AXIS_LABEL_PRESSURE, /**< Force applied to tool tip. Range: [0.0, 1.0]. Unit: Unitless. @since 1.13 */
855 EVAS_AXIS_LABEL_DISTANCE, /**< Relative distance along physical Z axis. Range: [0.0, 1.0]. Unit: Unitless @since 1.13 */
856 EVAS_AXIS_LABEL_AZIMUTH, /**< Angle of tool about the Z axis from positive X axis. Range: [-PI, PI]. Unit: Radians. @since 1.13 */
857 EVAS_AXIS_LABEL_TILT, /**< Angle of tool about plane of sensor from positive Z axis. Range: [0.0, PI]. Unit: Radians. @since 1.13 */
858 EVAS_AXIS_LABEL_TWIST, /**< Rotation of tool about its major axis from its "natural" position. Range: [-PI, PI] Unit: Radians. @since 1.13 */
859 EVAS_AXIS_LABEL_TOUCH_WIDTH_MAJOR, /**< Length of contact ellipse along AZIMUTH. Range: Unbounded: Unit: Same as EVAS_AXIS_LABEL_{X,Y}. @since 1.13 */
860 EVAS_AXIS_LABEL_TOUCH_WIDTH_MINOR, /**< Length of contact ellipse perpendicular to AZIMUTH. Range: Unbounded. Unit: Same as EVAS_AXIS_LABEL_{X,Y}. @since 1.13 */
861 EVAS_AXIS_LABEL_TOOL_WIDTH_MAJOR, /**< Length of tool ellipse along AZIMUTH. Range: Unbounded. Unit: Same as EVAS_AXIS_LABEL_{X,Y}. @since 1.13 */
862 EVAS_AXIS_LABEL_TOOL_WIDTH_MINOR /**< Length of tool ellipse perpendicular to AZIMUTH. Range: Unbounded. Unit: Same as EVAS_AXIS_LABEL_{X,Y}. @since 1.13 */
863} Evas_Axis_Label; /**< Types of recognized device axes @since 1.13 */
864
865struct _Evas_Axis
866{
867 Evas_Axis_Label label;
868 double value;
869};
870
871struct _Evas_Event_Axis_Update
872{
873 void *data;
874
875 unsigned int timestamp;
876 int device;
877 int toolid;
878
879 int naxis;
880 Evas_Axis *axis;
881 Evas_Device *dev;
882};
883
845/** 884/**
846 * How the mouse pointer should be handled by Evas. 885 * How the mouse pointer should be handled by Evas.
847 * 886 *
diff --git a/src/lib/evas/Evas_Eo.h b/src/lib/evas/Evas_Eo.h
index 4d4fba1eca..fd48f7468b 100644
--- a/src/lib/evas/Evas_Eo.h
+++ b/src/lib/evas/Evas_Eo.h
@@ -11,6 +11,7 @@ EAPI extern const Eo_Event_Description _EVAS_CANVAS_EVENT_OBJECT_FOCUS_OUT;
11EAPI extern const Eo_Event_Description _EVAS_CANVAS_EVENT_RENDER_PRE; 11EAPI extern const Eo_Event_Description _EVAS_CANVAS_EVENT_RENDER_PRE;
12EAPI extern const Eo_Event_Description _EVAS_CANVAS_EVENT_RENDER_POST; 12EAPI extern const Eo_Event_Description _EVAS_CANVAS_EVENT_RENDER_POST;
13EAPI extern const Eo_Event_Description _EVAS_CANVAS_EVENT_DEVICE_CHANGED; 13EAPI extern const Eo_Event_Description _EVAS_CANVAS_EVENT_DEVICE_CHANGED;
14EAPI extern const Eo_Event_Description _EVAS_CANVAS_EVENT_AXIS_UPDATE;
14 15
15// Callbacks events for use with Evas canvases 16// Callbacks events for use with Evas canvases
16#define EVAS_CANVAS_EVENT_FOCUS_IN (&(_EVAS_CANVAS_EVENT_FOCUS_IN)) 17#define EVAS_CANVAS_EVENT_FOCUS_IN (&(_EVAS_CANVAS_EVENT_FOCUS_IN))
@@ -22,6 +23,7 @@ EAPI extern const Eo_Event_Description _EVAS_CANVAS_EVENT_DEVICE_CHANGED;
22#define EVAS_CANVAS_EVENT_RENDER_PRE (&(_EVAS_CANVAS_EVENT_RENDER_PRE)) 23#define EVAS_CANVAS_EVENT_RENDER_PRE (&(_EVAS_CANVAS_EVENT_RENDER_PRE))
23#define EVAS_CANVAS_EVENT_RENDER_POST (&(_EVAS_CANVAS_EVENT_RENDER_POST)) 24#define EVAS_CANVAS_EVENT_RENDER_POST (&(_EVAS_CANVAS_EVENT_RENDER_POST))
24#define EVAS_CANVAS_EVENT_DEVICE_CHANGED (&(_EVAS_CANVAS_EVENT_DEVICE_CHANGED)) 25#define EVAS_CANVAS_EVENT_DEVICE_CHANGED (&(_EVAS_CANVAS_EVENT_DEVICE_CHANGED))
26#define EVAS_CANVAS_EVENT_AXIS_UPDATE (&(_EVAS_CANVAS_EVENT_AXIS_UPDATE))
25 27
26#include "canvas/evas_signal_interface.eo.h" 28#include "canvas/evas_signal_interface.eo.h"
27#include "canvas/evas_draggable_interface.eo.h" 29#include "canvas/evas_draggable_interface.eo.h"
diff --git a/src/lib/evas/Evas_Legacy.h b/src/lib/evas/Evas_Legacy.h
index bc135c0d16..0a10fce60a 100644
--- a/src/lib/evas/Evas_Legacy.h
+++ b/src/lib/evas/Evas_Legacy.h
@@ -613,6 +613,7 @@ EAPI void evas_object_hide(Evas_Object *obj) EINA_ARG_NONNULL(1);
613 * #EVAS_CALLBACK_MOUSE_DOWN, #EVAS_CALLBACK_MOUSE_UP, 613 * #EVAS_CALLBACK_MOUSE_DOWN, #EVAS_CALLBACK_MOUSE_UP,
614 * #EVAS_CALLBACK_MOUSE_MOVE, #EVAS_CALLBACK_MOUSE_WHEEL, 614 * #EVAS_CALLBACK_MOUSE_MOVE, #EVAS_CALLBACK_MOUSE_WHEEL,
615 * #EVAS_CALLBACK_MULTI_DOWN, #EVAS_CALLBACK_MULTI_UP, 615 * #EVAS_CALLBACK_MULTI_DOWN, #EVAS_CALLBACK_MULTI_UP,
616 * #EVAS_CALLBACK_AXIS_UPDATE,
616 * #EVAS_CALLBACK_MULTI_MOVE, #EVAS_CALLBACK_FREE, 617 * #EVAS_CALLBACK_MULTI_MOVE, #EVAS_CALLBACK_FREE,
617 * #EVAS_CALLBACK_KEY_DOWN, #EVAS_CALLBACK_KEY_UP, 618 * #EVAS_CALLBACK_KEY_DOWN, #EVAS_CALLBACK_KEY_UP,
618 * #EVAS_CALLBACK_FOCUS_IN, #EVAS_CALLBACK_FOCUS_OUT, 619 * #EVAS_CALLBACK_FOCUS_IN, #EVAS_CALLBACK_FOCUS_OUT,
@@ -687,6 +688,9 @@ EAPI void evas_object_hide(Evas_Object *obj) EINA_ARG_NONNULL(1);
687 * - #EVAS_CALLBACK_MULTI_MOVE: @p event_info is a pointer to an 688 * - #EVAS_CALLBACK_MULTI_MOVE: @p event_info is a pointer to an
688 * #Evas_Event_Multi_Move struct 689 * #Evas_Event_Multi_Move struct
689 * 690 *
691 * - #EVAS_CALLBACK_AXIS_UPDATE: @p event_info is a pointer to an
692 * #Evas_Event_Axis_Update struct
693 *
690 * - #EVAS_CALLBACK_FREE: @p event_info is @c NULL \n\n 694 * - #EVAS_CALLBACK_FREE: @p event_info is @c NULL \n\n
691 * This event is triggered just before Evas is about to free all 695 * This event is triggered just before Evas is about to free all
692 * memory used by an object and remove all references to it. This is 696 * memory used by an object and remove all references to it. This is
diff --git a/src/lib/evas/canvas/evas_callbacks.c b/src/lib/evas/canvas/evas_callbacks.c
index a1b82314c3..52bd014895 100644
--- a/src/lib/evas/canvas/evas_callbacks.c
+++ b/src/lib/evas/canvas/evas_callbacks.c
@@ -12,6 +12,9 @@ EAPI const Eo_Event_Description _EVAS_CANVAS_EVENT_RENDER_PRE =
12EAPI const Eo_Event_Description _EVAS_CANVAS_EVENT_RENDER_POST = 12EAPI const Eo_Event_Description _EVAS_CANVAS_EVENT_RENDER_POST =
13 EO_EVENT_DESCRIPTION("Render Post", "Called just after rendering stops on the canvas target @since 1.2"); 13 EO_EVENT_DESCRIPTION("Render Post", "Called just after rendering stops on the canvas target @since 1.2");
14 14
15EAPI const Eo_Event_Description _EVAS_CANVAS_EVENT_AXIS_UPDATE =
16 EO_EVENT_DESCRIPTION("Axis Update", "Device axis value changed");
17
15EAPI const Eo_Event_Description _EVAS_CANVAS_EVENT_FOCUS_IN = 18EAPI const Eo_Event_Description _EVAS_CANVAS_EVENT_FOCUS_IN =
16 EO_HOT_EVENT_DESCRIPTION("Canvas Focus In", "Canvas got focus as a whole"); 19 EO_HOT_EVENT_DESCRIPTION("Canvas Focus In", "Canvas got focus as a whole");
17EAPI const Eo_Event_Description _EVAS_CANVAS_EVENT_FOCUS_OUT = 20EAPI const Eo_Event_Description _EVAS_CANVAS_EVENT_FOCUS_OUT =
@@ -66,7 +69,8 @@ static const Eo_Event_Description *_legacy_evas_callback_table[EVAS_CALLBACK_LAS
66 EVAS_CANVAS_EVENT_RENDER_PRE, 69 EVAS_CANVAS_EVENT_RENDER_PRE,
67 EVAS_CANVAS_EVENT_RENDER_POST, 70 EVAS_CANVAS_EVENT_RENDER_POST,
68 EVAS_OBJECT_EVENT_IMAGE_RESIZE, 71 EVAS_OBJECT_EVENT_IMAGE_RESIZE,
69 EVAS_CANVAS_EVENT_DEVICE_CHANGED 72 EVAS_CANVAS_EVENT_DEVICE_CHANGED,
73 EVAS_CANVAS_EVENT_AXIS_UPDATE
70}; 74};
71 75
72typedef struct 76typedef struct
diff --git a/src/lib/evas/canvas/evas_canvas.eo b/src/lib/evas/canvas/evas_canvas.eo
index 893850dfe7..2ff4c0308a 100644
--- a/src/lib/evas/canvas/evas_canvas.eo
+++ b/src/lib/evas/canvas/evas_canvas.eo
@@ -1758,6 +1758,25 @@ class Evas.Canvas (Eo.Base, Evas.Common_Interface)
1758 @in uint keycode; /*@ Key scan code numeric value for canvas. */ 1758 @in uint keycode; /*@ Key scan code numeric value for canvas. */
1759 } 1759 }
1760 } 1760 }
1761 event_feed_axis_update {
1762 /*@
1763 Input device axis update event feed.
1764
1765 This function will set some evas properties that is necessary when
1766 an e.g. stylus axis is updated. It prepares information to be treated
1767 by the callback function.
1768
1769 @since 1.13 */
1770
1771 params {
1772 @in uint timestamp; /*@ Timestamp of the axis event */
1773 @in int device; /*@ System-provided device identifier */
1774 @in int toolid; /*@ Type of tool currently being used */
1775 @in int naxes; /*@ Number of elements in the \p axis array */
1776 @in const(Evas_Axis)* axis; /*@ Array containing the current value of all updated axes */
1777 @in const(void)* data; /*@ Data for canvas. */
1778 }
1779 }
1761 } 1780 }
1762 implements { 1781 implements {
1763 Eo.Base.constructor; 1782 Eo.Base.constructor;
diff --git a/src/lib/evas/canvas/evas_events.c b/src/lib/evas/canvas/evas_events.c
index f5f7ba78f2..8fdadd0cc5 100644
--- a/src/lib/evas/canvas/evas_events.c
+++ b/src/lib/evas/canvas/evas_events.c
@@ -2717,6 +2717,55 @@ _evas_canvas_event_feed_hold(Eo *eo_e, Evas_Public_Data *e, int hold, unsigned i
2717 _evas_object_event_new(); 2717 _evas_object_event_new();
2718} 2718}
2719 2719
2720void
2721_canvas_event_feed_axis_update_internal(Evas *eo_e, Evas_Public_Data *e, unsigned int timestamp, int device, int toolid, int naxis, const Evas_Axis *axis, const void *data)
2722{
2723 Eina_List *l, *copy;
2724 Evas_Event_Axis_Update ev;
2725 Evas_Object *eo_obj;
2726 int event_id = 0;
2727
2728 if (e->is_frozen) return;
2729 e->last_timestamp = timestamp;
2730
2731 _evas_object_event_new();
2732
2733 event_id = _evas_event_counter;
2734 ev.data = (void *)data;
2735 ev.timestamp = timestamp;
2736 ev.device = device;
2737 ev.toolid = toolid;
2738 ev.naxis = naxis;
2739 ev.axis = (Evas_Axis *)axis;
2740 ev.dev = _evas_device_top_get(eo_e);
2741 if (ev.dev) _evas_device_ref(ev.dev);
2742
2743 _evas_walk(e);
2744 copy = evas_event_list_copy(e->pointer.object.in);
2745
2746 EINA_LIST_FOREACH(copy, l, eo_obj)
2747 {
2748 Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
2749 if (!evas_event_freezes_through(eo_obj, obj))
2750 {
2751 evas_object_event_callback_call(eo_obj, obj,
2752 EVAS_CALLBACK_AXIS_UPDATE, &ev,
2753 event_id);
2754 if (e->delete_me || e->is_frozen) break;
2755 }
2756 }
2757 eina_list_free(copy);
2758 _evas_post_event_callback_call(eo_e, e);
2759
2760 _evas_unwalk(e);
2761}
2762
2763EOLIAN void
2764_evas_canvas_event_feed_axis_update(Evas *eo_e, Evas_Public_Data *pd, unsigned int timestamp, int device, int toolid, int naxis, const Evas_Axis *axis, const void *data)
2765{
2766 _canvas_event_feed_axis_update_internal(eo_e, pd, timestamp, device, toolid, naxis, axis, data);
2767}
2768
2720static void 2769static void
2721_feed_mouse_move_eval_internal(Eo *eo_obj, Evas_Object_Protected_Data *obj) 2770_feed_mouse_move_eval_internal(Eo *eo_obj, Evas_Object_Protected_Data *obj)
2722{ 2771{
@@ -2882,6 +2931,12 @@ _evas_canvas_event_refeed_event(Eo *eo_e, Evas_Public_Data *e EINA_UNUSED, void
2882 evas_event_feed_key_up(eo_e, ev->keyname, ev->key, ev->string, ev->compose, ev->timestamp, ev->data); 2931 evas_event_feed_key_up(eo_e, ev->keyname, ev->key, ev->string, ev->compose, ev->timestamp, ev->data);
2883 break; 2932 break;
2884 } 2933 }
2934 case EVAS_CALLBACK_AXIS_UPDATE:
2935 {
2936 Evas_Event_Axis_Update *ev = event_copy;
2937 evas_event_feed_axis_update(eo_e, ev->timestamp, ev->device, ev->toolid, ev->naxis, ev->axis, ev->data);
2938 break;
2939 }
2885 default: /* All non-input events are not handeled */ 2940 default: /* All non-input events are not handeled */
2886 break; 2941 break;
2887 } 2942 }
diff --git a/src/lib/evas/include/evas_private.h b/src/lib/evas/include/evas_private.h
index 89ff62817f..aa9c85210f 100644
--- a/src/lib/evas/include/evas_private.h
+++ b/src/lib/evas/include/evas_private.h
@@ -1522,6 +1522,7 @@ void _canvas_event_feed_key_up(Eo *e, void *_pd, va_list *list);
1522void _canvas_event_feed_key_down_with_keycode(Eo *e, void *_pd, va_list *list); 1522void _canvas_event_feed_key_down_with_keycode(Eo *e, void *_pd, va_list *list);
1523void _canvas_event_feed_key_up_with_keycode(Eo *e, void *_pd, va_list *list); 1523void _canvas_event_feed_key_up_with_keycode(Eo *e, void *_pd, va_list *list);
1524void _canvas_event_feed_hold(Eo *e, void *_pd, va_list *list); 1524void _canvas_event_feed_hold(Eo *e, void *_pd, va_list *list);
1525void _canvas_event_feed_axis_update(Eo *e, void *_pd, va_list *list);
1525void _canvas_event_refeed_event(Eo *e, void *_pd, va_list *list); 1526void _canvas_event_refeed_event(Eo *e, void *_pd, va_list *list);
1526void _canvas_event_down_count_get(Eo *e, void *_pd, va_list *list); 1527void _canvas_event_down_count_get(Eo *e, void *_pd, va_list *list);
1527void _canvas_tree_objects_at_xy_get(Eo *e, void *_pd, va_list *list); 1528void _canvas_tree_objects_at_xy_get(Eo *e, void *_pd, va_list *list);
diff --git a/src/modules/ecore_evas/engines/x/ecore_evas_x.c b/src/modules/ecore_evas/engines/x/ecore_evas_x.c
index d725663ca5..17dfadba1c 100644
--- a/src/modules/ecore_evas/engines/x/ecore_evas_x.c
+++ b/src/modules/ecore_evas/engines/x/ecore_evas_x.c
@@ -2529,7 +2529,7 @@ _alpha_do(Ecore_Evas *ee, int alpha)
2529 } 2529 }
2530 evas_damage_rectangle_add(ee->evas, 0, 0, ee->req.w, ee->req.h); 2530 evas_damage_rectangle_add(ee->evas, 0, 0, ee->req.w, ee->req.h);
2531 ecore_x_window_shape_mask_set(ee->prop.window, 0); 2531 ecore_x_window_shape_mask_set(ee->prop.window, 0);
2532 ecore_x_input_multi_select(ee->prop.window); 2532 ecore_x_input_select(ee->prop.window);
2533 ecore_event_window_register(ee->prop.window, ee, ee->evas, 2533 ecore_event_window_register(ee->prop.window, ee, ee->evas,
2534 (Ecore_Event_Mouse_Move_Cb)_ecore_evas_mouse_move_process, 2534 (Ecore_Event_Mouse_Move_Cb)_ecore_evas_mouse_move_process,
2535 (Ecore_Event_Multi_Move_Cb)_ecore_evas_mouse_multi_move_process, 2535 (Ecore_Event_Multi_Move_Cb)_ecore_evas_mouse_multi_move_process,
@@ -2683,7 +2683,7 @@ _ecore_evas_x_alpha_set(Ecore_Evas *ee, int alpha)
2683 } 2683 }
2684 evas_damage_rectangle_add(ee->evas, 0, 0, ee->req.w, ee->req.h); 2684 evas_damage_rectangle_add(ee->evas, 0, 0, ee->req.w, ee->req.h);
2685// ecore_x_window_shape_mask_set(ee->prop.window, 0); 2685// ecore_x_window_shape_mask_set(ee->prop.window, 0);
2686 ecore_x_input_multi_select(ee->prop.window); 2686 ecore_x_input_select(ee->prop.window);
2687 ecore_event_window_register(ee->prop.window, ee, ee->evas, 2687 ecore_event_window_register(ee->prop.window, ee, ee->evas,
2688 (Ecore_Event_Mouse_Move_Cb)_ecore_evas_mouse_move_process, 2688 (Ecore_Event_Mouse_Move_Cb)_ecore_evas_mouse_move_process,
2689 (Ecore_Event_Multi_Move_Cb)_ecore_evas_mouse_multi_move_process, 2689 (Ecore_Event_Multi_Move_Cb)_ecore_evas_mouse_multi_move_process,
@@ -3988,7 +3988,7 @@ ecore_evas_software_x11_new_internal(const char *disp_name, Ecore_X_Window paren
3988 3988
3989 ee->engine.func->fn_render = _ecore_evas_x_render; 3989 ee->engine.func->fn_render = _ecore_evas_x_render;
3990 _ecore_evas_register(ee); 3990 _ecore_evas_register(ee);
3991 ecore_x_input_multi_select(ee->prop.window); 3991 ecore_x_input_select(ee->prop.window);
3992 ecore_event_window_register(ee->prop.window, ee, ee->evas, 3992 ecore_event_window_register(ee->prop.window, ee, ee->evas,
3993 (Ecore_Event_Mouse_Move_Cb)_ecore_evas_mouse_move_process, 3993 (Ecore_Event_Mouse_Move_Cb)_ecore_evas_mouse_move_process,
3994 (Ecore_Event_Multi_Move_Cb)_ecore_evas_mouse_multi_move_process, 3994 (Ecore_Event_Multi_Move_Cb)_ecore_evas_mouse_multi_move_process,
@@ -4212,7 +4212,7 @@ ecore_evas_software_x11_pixmap_new_internal(const char *disp_name, Ecore_X_Windo
4212 4212
4213 ee->draw_ok = 1; 4213 ee->draw_ok = 1;
4214 4214
4215 /* ecore_x_input_multi_select(ee->prop.window); */ 4215 /* ecore_x_input_select(ee->prop.window); */
4216 /* ecore_event_window_register(ee->prop.window, ee, ee->evas, */ 4216 /* ecore_event_window_register(ee->prop.window, ee, ee->evas, */
4217 /* (Ecore_Event_Mouse_Move_Cb)_ecore_evas_mouse_move_process, */ 4217 /* (Ecore_Event_Mouse_Move_Cb)_ecore_evas_mouse_move_process, */
4218 /* (Ecore_Event_Multi_Move_Cb)_ecore_evas_mouse_multi_move_process, */ 4218 /* (Ecore_Event_Multi_Move_Cb)_ecore_evas_mouse_multi_move_process, */
@@ -4305,7 +4305,7 @@ _ecore_evas_software_x11_extra_event_window_add(Ecore_Evas *ee, Ecore_X_Window w
4305 { 4305 {
4306 *winp = win; 4306 *winp = win;
4307 edata->win_extra = eina_list_append(edata->win_extra, winp); 4307 edata->win_extra = eina_list_append(edata->win_extra, winp);
4308 ecore_x_input_multi_select(win); 4308 ecore_x_input_select(win);
4309 ecore_event_window_register(win, ee, ee->evas, 4309 ecore_event_window_register(win, ee, ee->evas,
4310 (Ecore_Event_Mouse_Move_Cb)_ecore_evas_mouse_move_process, 4310 (Ecore_Event_Mouse_Move_Cb)_ecore_evas_mouse_move_process,
4311 (Ecore_Event_Multi_Move_Cb)_ecore_evas_mouse_multi_move_process, 4311 (Ecore_Event_Multi_Move_Cb)_ecore_evas_mouse_multi_move_process,
@@ -4439,7 +4439,7 @@ ecore_evas_gl_x11_options_new_internal(const char *disp_name, Ecore_X_Window par
4439 4439
4440 ee->engine.func->fn_render = _ecore_evas_x_render; 4440 ee->engine.func->fn_render = _ecore_evas_x_render;
4441 _ecore_evas_register(ee); 4441 _ecore_evas_register(ee);
4442 ecore_x_input_multi_select(ee->prop.window); 4442 ecore_x_input_select(ee->prop.window);
4443 ecore_event_window_register(ee->prop.window, ee, ee->evas, 4443 ecore_event_window_register(ee->prop.window, ee, ee->evas,
4444 (Ecore_Event_Mouse_Move_Cb)_ecore_evas_mouse_move_process, 4444 (Ecore_Event_Mouse_Move_Cb)_ecore_evas_mouse_move_process,
4445 (Ecore_Event_Multi_Move_Cb)_ecore_evas_mouse_multi_move_process, 4445 (Ecore_Event_Multi_Move_Cb)_ecore_evas_mouse_multi_move_process,
@@ -4637,7 +4637,7 @@ ecore_evas_gl_x11_pixmap_new_internal(const char *disp_name, Ecore_X_Window pare
4637 ee->engine.func->fn_render = _ecore_evas_x_render; 4637 ee->engine.func->fn_render = _ecore_evas_x_render;
4638 _ecore_evas_register(ee); 4638 _ecore_evas_register(ee);
4639 4639
4640 /* ecore_x_input_multi_select(ee->prop.window); */ 4640 /* ecore_x_input_select(ee->prop.window); */
4641 /* ecore_event_window_register(ee->prop.window, ee, ee->evas, */ 4641 /* ecore_event_window_register(ee->prop.window, ee, ee->evas, */
4642 /* (Ecore_Event_Mouse_Move_Cb)_ecore_evas_mouse_move_process, */ 4642 /* (Ecore_Event_Mouse_Move_Cb)_ecore_evas_mouse_move_process, */
4643 /* (Ecore_Event_Multi_Move_Cb)_ecore_evas_mouse_multi_move_process, */ 4643 /* (Ecore_Event_Multi_Move_Cb)_ecore_evas_mouse_multi_move_process, */