return eo_do_ret(obj, int_ret, elm_obj_widget_class_color3_get(color_class, r, g, b, a));
}
+
+EAPI Evas_Object*
+elm_object_top_widget_at_xy_get(Evas_Object *obj, int x, int y, Eina_Bool skip_repeat_events_objects)
+{
+ Evas_Object *stack_item;
+ Eina_List *l, *stack = evas_tree_objects_at_xy_get(evas_object_evas_get(obj), NULL, x, y);
+
+ EINA_LIST_FOREACH(stack, l, stack_item)
+ {
+ if (skip_repeat_events_objects && evas_object_repeat_events_get(stack_item))
+ continue;
+
+ // find smart parent which is elementary widget
+ while (stack_item)
+ {
+ if (elm_object_widget_check(stack_item))
+ {
+ eina_list_free(stack);
+ return stack_item;
+ }
+ stack_item = evas_object_smart_parent_get(stack_item);
+ }
+ }
+ eina_list_free(stack);
+ return NULL;
+}
//
* @ingroup General
*/
EAPI Eina_Bool elm_object_color_class_color3_get(Evas_Object *obj, const char *color_class, int *r, int *g, int *b, int *a);
+
+/**
+ * Get the topmost elementary widget occupying (x,y) coordinates.
+ *
+ * The function traverses all evas objects stacked at given coordinates and
+ * returns elementary widget which is smart parent of highestly-stacked evas object.
+ *
+ * @param obj The Elementary widget.
+ * @param x horizontal coordinate,
+ * @param y vertical coordinate,
+ * @param skip_repeat_events_objects do not traverse canvas objects that repeat
+ * mouse events.
+ *
+ * @return, the top-most elemenatary widget
+ *
+ * @since 1.xx
+ *
+ * @ingroup Elm_General
+ */
+EAPI Evas_Object* elm_object_top_widget_at_xy_get(Evas_Object *obj, int x, int y, Eina_Bool skip_repeat_events_objects);
//
y -= ee_y;
}
+ Evas_Object *widget = elm_object_top_widget_at_xy_get(obj, x, y, EINA_FALSE);
+
eo_do(obj, children = elm_interface_atspi_accessible_children_get());
+ /* widget can be descendent of "obj", however atspi spec requires that only direct
+ * child should be returned. */
+ while (widget && (widget != obj))
+ {
+ EINA_LIST_FOREACH(children, l2, child)
+ {
+ if (child == widget)
+ {
+ eina_list_free(children);
+ return child;
+ }
+ }
+ eo_do(widget, widget = elm_interface_atspi_accessible_parent_get());
+ }
+
+ // check special cases
+ if (widget == obj)
+ {
+ // elm access
+ // atspi proxy
+ // widget_items
+ // proxy
+ }
+
+ return NULL;
+
/* Get evas_object stacked at given x,y coordinates starting from top */
Eina_List *stack = evas_tree_objects_at_xy_get(evas_object_evas_get(obj), NULL, x, y);
/* Foreach stacked object starting from top */