summaryrefslogtreecommitdiff
path: root/src/lib/elementary/elm_widget.h
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2017-08-31 11:27:49 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-08-31 13:48:05 +0900
commit94d671c9715fef600c515bb1ae38bfb884d0bb82 (patch)
treeb08fee70cc47a702a478223503f9d2a74caa1b4f /src/lib/elementary/elm_widget.h
parentb6bab481aa8c4297f7692422b61dacf08f9e1d10 (diff)
widget: Fix legacy for focus_mouse_up_handle (EO)
This removes the special code in the legacy API for elm_widget_focus_mouse_up_handle. Add an internal helper to find the first widget parent. And mark as protected. Apparently this functions is still required for the new focus manager. Ref T5363
Diffstat (limited to 'src/lib/elementary/elm_widget.h')
-rw-r--r--src/lib/elementary/elm_widget.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/lib/elementary/elm_widget.h b/src/lib/elementary/elm_widget.h
index 453672b924..fe8f6c329f 100644
--- a/src/lib/elementary/elm_widget.h
+++ b/src/lib/elementary/elm_widget.h
@@ -826,6 +826,15 @@ elm_widget_is_legacy(const Eo *obj)
826 return sd ? sd->legacy : EINA_FALSE; 826 return sd ? sd->legacy : EINA_FALSE;
827} 827}
828 828
829/** Takes in any canvas object and returns the first smart parent that is a widget */
830static inline Elm_Widget *
831evas_object_widget_parent_find(Evas_Object *o)
832{
833 while (o && !efl_isa(o, ELM_WIDGET_CLASS))
834 evas_object_smart_parent_get(o);
835 return o;
836}
837
829/* to be used by INTERNAL classes on Elementary, so that the widgets 838/* to be used by INTERNAL classes on Elementary, so that the widgets
830 * parsing script skips it */ 839 * parsing script skips it */
831#define ELM_INTERNAL_SMART_SUBCLASS_NEW EVAS_SMART_SUBCLASS_NEW 840#define ELM_INTERNAL_SMART_SUBCLASS_NEW EVAS_SMART_SUBCLASS_NEW