summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2017-05-17 16:02:53 -0400
committerMike Blumenkrantz <zmike@osg.samsung.com>2017-05-19 12:41:16 -0400
commit23cf5e80f780c55dbaebc819292d0bc60fa86fcf (patch)
tree7737f31db7141291a7295e404b7b043983c5bf34
parent0b10aa7f1988be18d7dfe87f374a171322d90f49 (diff)
downloadefl-23cf5e80f780c55dbaebc819292d0bc60fa86fcf.tar.gz
elm_win: add elm_win_get()
it's frequently useful to be able to return the window object from any object. this simplifies doing so for users @feature
-rw-r--r--src/lib/elementary/efl_ui_win.c7
-rw-r--r--src/lib/elementary/elm_win_legacy.h8
2 files changed, 15 insertions, 0 deletions
diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c
index 37f46ff05c..3f9ca18463 100644
--- a/src/lib/elementary/efl_ui_win.c
+++ b/src/lib/elementary/efl_ui_win.c
@@ -6880,6 +6880,13 @@ _efl_ui_win_move_resize_start(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd, Efl_Ui_W
return _win_move_resize_start(sd, mode);
}
+EAPI Evas_Object *
+elm_win_get(Evas_Object *obj)
+{
+ EINA_SAFETY_ON_NULL_RETURN_VAL(obj, NULL);
+ return ecore_evas_data_get(ecore_evas_ecore_evas_get(evas_object_evas_get(obj)), "elm_win");
+}
+
/* windowing specific calls - shall we do this differently? */
EAPI Ecore_X_Window
diff --git a/src/lib/elementary/elm_win_legacy.h b/src/lib/elementary/elm_win_legacy.h
index a4c45abe47..ebb4ff5cf0 100644
--- a/src/lib/elementary/elm_win_legacy.h
+++ b/src/lib/elementary/elm_win_legacy.h
@@ -1088,3 +1088,11 @@ EAPI void elm_win_aspect_set(Elm_Win *obj, double aspect);
* by height.
*/
EAPI double elm_win_aspect_get(const Elm_Win *obj);
+
+/**
+ * @brief Get the elm_win object from any child object
+ *
+ * @return The elm_win, or @c NULL on failure
+ * @since 1.20
+ */
+EAPI Evas_Object *elm_win_get(Evas_Object *obj);