devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=9fdd4758fbbddee8f78d9bd348af07fce63b1fb8

commit 9fdd4758fbbddee8f78d9bd348af07fce63b1fb8
Author: Chris Michael <cp.mich...@samsung.com>
Date:   Tue Sep 29 11:52:56 2015 -0400

    ecore-wl2: Add API function to get a dnd drag
    
    Signed-off-by: Chris Michael <cp.mich...@samsung.com>
---
 src/lib/ecore_wl2/Ecore_Wl2.h     |  3 +++
 src/lib/ecore_wl2/ecore_wl2_dnd.c | 18 ++++++++++++++++++
 2 files changed, 21 insertions(+)

diff --git a/src/lib/ecore_wl2/Ecore_Wl2.h b/src/lib/ecore_wl2/Ecore_Wl2.h
index aa03d55..7e6bb9b 100644
--- a/src/lib/ecore_wl2/Ecore_Wl2.h
+++ b/src/lib/ecore_wl2/Ecore_Wl2.h
@@ -487,6 +487,9 @@ EAPI void ecore_wl2_dnd_drag_types_set(Ecore_Wl2_Input 
*input, const char **type
 /* TODO: doxy */
 EAPI void ecore_wl2_dnd_drag_start(Ecore_Wl2_Input *input, Ecore_Wl2_Window 
*window, Ecore_Wl2_Window *drag_window);
 
+/* TODO: doxy */
+EAPI Eina_Bool ecore_wl2_dnd_drag_get(Ecore_Wl2_Input *input, const char 
*type);
+
 /* # ifdef __cplusplus */
 /* } */
 /* # endif */
diff --git a/src/lib/ecore_wl2/ecore_wl2_dnd.c 
b/src/lib/ecore_wl2/ecore_wl2_dnd.c
index 98fcdad..087fe51 100644
--- a/src/lib/ecore_wl2/ecore_wl2_dnd.c
+++ b/src/lib/ecore_wl2/ecore_wl2_dnd.c
@@ -269,3 +269,21 @@ ecore_wl2_dnd_drag_start(Ecore_Wl2_Input *input, 
Ecore_Wl2_Window *window, Ecore
         ecore_wl2_window_cursor_from_name_set(window, "move");
      }
 }
+
+EAPI Eina_Bool
+ecore_wl2_dnd_drag_get(Ecore_Wl2_Input *input, const char *type)
+{
+   char **t;
+
+   EINA_SAFETY_ON_NULL_RETURN_VAL(input, EINA_FALSE);
+   EINA_SAFETY_ON_NULL_RETURN_VAL(input->drag.source, EINA_FALSE);
+
+   wl_array_for_each(t, &input->drag.source->types)
+     if (!strcmp(type, *t)) break;
+
+   if (!*t) return EINA_FALSE;
+
+   /* TODO: selection_data_receive */
+
+   return EINA_TRUE;
+}

-- 


Reply via email to