From 4559aa15a48b7c8e5fd348be51a1f30883ad3d57 Mon Sep 17 00:00:00 2001 From: Chris Michael Date: Tue, 29 Sep 2015 11:57:35 -0400 Subject: [PATCH] ecore-wl2: Add API function to determine if an input has a selection owner Signed-off-by: Chris Michael --- src/lib/ecore_wl2/Ecore_Wl2.h | 3 +++ src/lib/ecore_wl2/ecore_wl2_dnd.c | 8 ++++++++ 2 files changed, 11 insertions(+) diff --git a/src/lib/ecore_wl2/Ecore_Wl2.h b/src/lib/ecore_wl2/Ecore_Wl2.h index 11b4b54120..1c21f60b1a 100644 --- a/src/lib/ecore_wl2/Ecore_Wl2.h +++ b/src/lib/ecore_wl2/Ecore_Wl2.h @@ -493,6 +493,9 @@ EAPI Eina_Bool ecore_wl2_dnd_drag_get(Ecore_Wl2_Input *input, const char *type); /* TODO: doxy */ EAPI void ecore_wl2_dnd_drag_end(Ecore_Wl2_Input *input); +/* TODO: doxy */ +EAPI Eina_Bool ecore_wl2_dnd_selection_owner_has(Ecore_Wl2_Input *input); + /* # ifdef __cplusplus */ /* } */ /* # endif */ diff --git a/src/lib/ecore_wl2/ecore_wl2_dnd.c b/src/lib/ecore_wl2/ecore_wl2_dnd.c index 43c8baf3ff..2519e32aeb 100644 --- a/src/lib/ecore_wl2/ecore_wl2_dnd.c +++ b/src/lib/ecore_wl2/ecore_wl2_dnd.c @@ -308,3 +308,11 @@ ecore_wl2_dnd_drag_end(Ecore_Wl2_Input *input) /* TODO: Raise dnd end event */ } + +EAPI Eina_Bool +ecore_wl2_dnd_selection_owner_has(Ecore_Wl2_Input *input) +{ + EINA_SAFETY_ON_NULL_RETURN_VAL(input, EINA_FALSE); + + return (input->selection.source != NULL); +}