From fc3d1afa60b21367d4bd88c8e535079b1b24098f Mon Sep 17 00:00:00 2001
From: Jason Gerecke <killertofu@gmail.com>
Date: Mon, 23 Dec 2013 18:33:25 -0800
Subject: [PATCH v2 5/7] Wire the Ecore and Evas implementations of axis update
 events together

Adds a handler for axis update events to ecore_input_evas which
simply feeds Evas with the event.
---
 src/lib/ecore_input_evas/ecore_input_evas.c | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/src/lib/ecore_input_evas/ecore_input_evas.c b/src/lib/ecore_input_evas/ecore_input_evas.c
index 5205862..d32b679 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
 };
 
 static int _ecore_event_evas_init_count = 0;
-static Ecore_Event_Handler *ecore_event_evas_handlers[8];
+static Ecore_Event_Handler *ecore_event_evas_handlers[9];
 static Eina_Hash *_window_hash = NULL;
 
 static Eina_List *_last_events = NULL;
@@ -530,6 +530,19 @@ ecore_event_evas_mouse_wheel(void *data EINA_UNUSED, int type EINA_UNUSED, void
 }
 
 EAPI Eina_Bool
+ecore_event_evas_axis_update(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
+{
+   Ecore_Event_Axis_Update *e;
+   Ecore_Input_Window *lookup;
+
+   e = event;
+   lookup = _ecore_event_window_match(e->event_window);
+   if (!lookup) return ECORE_CALLBACK_PASS_ON;
+   evas_event_feed_axis_update(lookup->evas, e->timestamp, e->device, e->toolid, e->naxis, e->axis, NULL);
+   return ECORE_CALLBACK_PASS_ON;
+}
+
+EAPI Eina_Bool
 ecore_event_evas_mouse_in(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
 {
    return _ecore_event_evas_mouse_io((Ecore_Event_Mouse_IO *)event, ECORE_IN);
@@ -589,6 +602,9 @@ ecore_event_evas_init(void)
    ecore_event_evas_handlers[7] = ecore_event_handler_add(ECORE_EVENT_MOUSE_OUT,
                                                           ecore_event_evas_mouse_out,
                                                           NULL);
+   ecore_event_evas_handlers[8] = ecore_event_handler_add(ECORE_EVENT_AXIS_UPDATE,
+                                                          ecore_event_evas_axis_update,
+                                                          NULL);
 
    _window_hash = eina_hash_pointer_new(free);
 
-- 
2.1.0

