devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=590c278a46bf754e24635f0fac17fd7e89be7469

commit 590c278a46bf754e24635f0fac17fd7e89be7469
Author: Chris Michael <cp.mich...@samsung.com>
Date:   Mon Sep 28 12:15:51 2015 -0400

    ecore-wl2: Add API function to set pointer surface on a window
    
    Signed-off-by: Chris Michael <cp.mich...@samsung.com>
---
 src/lib/ecore_wl2/Ecore_Wl2.h        |  2 ++
 src/lib/ecore_wl2/ecore_wl2_window.c | 12 ++++++++++++
 2 files changed, 14 insertions(+)

diff --git a/src/lib/ecore_wl2/Ecore_Wl2.h b/src/lib/ecore_wl2/Ecore_Wl2.h
index b048535..c779f73 100644
--- a/src/lib/ecore_wl2/Ecore_Wl2.h
+++ b/src/lib/ecore_wl2/Ecore_Wl2.h
@@ -430,6 +430,8 @@ EAPI void ecore_wl2_window_iconified_set(Ecore_Wl2_Window 
*window, Eina_Bool ico
 /* TODO: doxy */
 EAPI void ecore_wl2_window_pointer_xy_get(Ecore_Wl2_Window *window, int *x, 
int *y);
 
+EAPI void ecore_wl2_window_pointer_set(Ecore_Wl2_Window *window, struct 
wl_surface *surface, int hot_x, int hot_y);
+
 /* # ifdef __cplusplus */
 /* } */
 /* # endif */
diff --git a/src/lib/ecore_wl2/ecore_wl2_window.c 
b/src/lib/ecore_wl2/ecore_wl2_window.c
index 6f878f9..169d192e 100644
--- a/src/lib/ecore_wl2/ecore_wl2_window.c
+++ b/src/lib/ecore_wl2/ecore_wl2_window.c
@@ -798,3 +798,15 @@ ecore_wl2_window_pointer_xy_get(Ecore_Wl2_Window *window, 
int *x, int *y)
    if (x) *x = window->input->pointer.sx;
    if (y) *y = window->input->pointer.sy;
 }
+
+EAPI void
+ecore_wl2_window_pointer_set(Ecore_Wl2_Window *window, struct wl_surface 
*surface, int hot_x, int hot_y)
+{
+   EINA_SAFETY_ON_NULL_RETURN(window);
+   EINA_SAFETY_ON_NULL_RETURN(window->input);
+
+   if (window->input->wl.pointer)
+     wl_pointer_set_cursor(window->input->wl.pointer,
+                           window->input->pointer.enter_serial,
+                           surface, hot_x, hot_y);
+}

-- 


Reply via email to