devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=7eabcd955e4634667368dfc57e1f1e03881c480d

commit 7eabcd955e4634667368dfc57e1f1e03881c480d
Author: Chris Michael <cp.mich...@samsung.com>
Date:   Sun Sep 20 15:54:39 2015 -0400

    ecore-wl2: Add placeholders for touch listener functions
    
    Signed-off-by: Chris Michael <cp.mich...@samsung.com>
---
 src/lib/ecore_wl2/ecore_wl2_input.c | 64 ++++++++++++++++++++++++++++++++++---
 1 file changed, 59 insertions(+), 5 deletions(-)

diff --git a/src/lib/ecore_wl2/ecore_wl2_input.c 
b/src/lib/ecore_wl2/ecore_wl2_input.c
index 1060819..db89f35 100644
--- a/src/lib/ecore_wl2/ecore_wl2_input.c
+++ b/src/lib/ecore_wl2/ecore_wl2_input.c
@@ -393,13 +393,67 @@ static const struct wl_keyboard_listener 
_keyboard_listener =
    _keyboard_cb_repeat_setup
 };
 
+static void
+_touch_cb_down(void *data, struct wl_touch *touch EINA_UNUSED, unsigned int 
serial, unsigned int timestamp, struct wl_surface *surface, int id, wl_fixed_t 
x, wl_fixed_t y)
+{
+   Ecore_Wl2_Input *input;
+   Ecore_Wl2_Window *window;
+
+   input = data;
+   if (!input) return;
+
+   /* find the window which this surface belongs to */
+   window = _ecore_wl2_display_window_surface_find(input->display, surface);
+   if (!window) return;
+
+   input->focus.touch = window;
+
+   /* TODO: Finish sending ecore events */
+}
+
+static void
+_touch_cb_up(void *data, struct wl_touch *touch EINA_UNUSED, unsigned int 
serial, unsigned int timestamp, int id)
+{
+   Ecore_Wl2_Input *input;
+
+   input = data;
+   if (!input) return;
+   if (!input->focus.touch) return;
+
+   /* TODO: Send ecore mouse up event and do input ungrab */
+}
+
+static void
+_touch_cb_motion(void *data, struct wl_touch *touch EINA_UNUSED, unsigned int 
timestamp, int id, wl_fixed_t x, wl_fixed_t y)
+{
+   Ecore_Wl2_Input *input;
+
+   input = data;
+   if (!input) return;
+   if (!input->focus.touch) return;
+
+   /* TODO: Send ecore mouse move event */
+}
+
+static void
+_touch_cb_frame(void *data EINA_UNUSED, struct wl_touch *touch EINA_UNUSED)
+{
+
+}
+
+static void
+_touch_cb_cancel(void *data EINA_UNUSED, struct wl_touch *tough EINA_UNUSED)
+{
+
+}
+
 static const struct wl_touch_listener _touch_listener =
 {
-   NULL, // touch down
-   NULL, // touch up
-   NULL, // touch motion
-   NULL, // touch frame
-   NULL, // touch cancel
+   _touch_cb_down,
+   _touch_cb_up,
+   _touch_cb_motion,
+   _touch_cb_frame,
+   _touch_cb_cancel
 };
 
 static const struct wl_data_device_listener _data_listener =

-- 


Reply via email to