From f2899679273576ef69cc58a889cd8928cb6ebe80 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Wed, 17 May 2017 16:02:53 -0400 Subject: [PATCH] elm_cnp: add elm_cnp_clipboard_selection_has_owner() this already existed as an internal function which was improperly namespaced @feature --- src/lib/elementary/elm_cnp.c | 7 +++++++ src/lib/elementary/elm_cnp.h | 10 ++++++++++ 2 files changed, 17 insertions(+) diff --git a/src/lib/elementary/elm_cnp.c b/src/lib/elementary/elm_cnp.c index 23b29702ed..3ac197052b 100644 --- a/src/lib/elementary/elm_cnp.c +++ b/src/lib/elementary/elm_cnp.c @@ -5260,6 +5260,13 @@ elm_selection_selection_has_owner(Evas_Object *obj) return _local_elm_selection_selection_has_owner(obj); } +EAPI Eina_Bool +elm_cnp_clipboard_selection_has_owner(Evas_Object *win) +{ + EINA_SAFETY_ON_NULL_RETURN_VAL(win, EINA_FALSE); + return elm_selection_selection_has_owner(win); +} + /* START - Support elm containers for Drag and Drop */ /* START - Support elm containers for Drop */ static int diff --git a/src/lib/elementary/elm_cnp.h b/src/lib/elementary/elm_cnp.h index 4e8ac1f4c5..1c92f1195f 100644 --- a/src/lib/elementary/elm_cnp.h +++ b/src/lib/elementary/elm_cnp.h @@ -310,6 +310,16 @@ EAPI Eina_Bool elm_object_cnp_selection_clear(Evas_Object *obj, */ EAPI void elm_cnp_selection_loss_callback_set(Evas_Object *obj, Elm_Sel_Type selection, Elm_Selection_Loss_Cb func, const void *data); +/** + * @brief Determine whether the clipboard selection has an owner + * + * @param win The window object to check for + * @return @c EINA_TRUE if the clipboard has a selection + * @ingroup CopyPaste + * @since 1.20 + */ +EAPI Eina_Bool elm_cnp_clipboard_selection_has_owner(Evas_Object *win); + /** * @brief Set the given object as a target for drops for drag-and-drop *