}
EAPI void
+elm_widget_focus_highlight_geometry_get(const Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h)
+{
+ ELM_WIDGET_CHECK(obj);
+ eo_do(obj, elm_wdg_focus_highlight_geometry_get(x, y, w, h));
+}
+
+static void
+_elm_widget_focus_highlight_geometry_get(Eo *obj, void *_pd, va_list *list)
+{
+ Evas_Coord *x = va_arg(*list, Evas_Coord *);
+ Evas_Coord *y = va_arg(*list, Evas_Coord *);
+ Evas_Coord *w = va_arg(*list, Evas_Coord *);
+ Evas_Coord *h = va_arg(*list, Evas_Coord *);
+
+ Evas_Coord tx = 0, ty = 0, tw = 0, th = 0;
+ const char *target_hl_part = NULL;
+ Evas_Object *edje_obj = NULL;
+ Elm_Widget_Smart_Data *sd = _pd;
+
+ evas_object_geometry_get(obj, x, y, w, h);
+ if (sd->resize_obj && eo_isa(sd->resize_obj, EDJE_OBJ_CLASS))
+ {
+ edje_obj = sd->resize_obj;
+ if (!(target_hl_part = edje_object_data_get(edje_obj, "focus_part")))
+ return;
+ }
+ else if (sd->resize_obj && eo_isa(sd->resize_obj, ELM_OBJ_LAYOUT_CLASS))
+ {
+ edje_obj = elm_layout_edje_get(sd->resize_obj);
+ if (!(target_hl_part = elm_layout_data_get(sd->resize_obj, "focus_part")))
+ return;
+ }
+ else return;
+
+ edje_object_part_geometry_get(edje_obj, target_hl_part,
+ &tx, &ty, &tw, &th);
+ *x += tx;
+ *y += ty;
+ if (tw != *w) *w = tw;
+ if (th != *h) *h = th;
+}
+
+EAPI void
elm_widget_activate(Evas_Object *obj, Elm_Activate act)
{
Evas_Object *parent;
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_CAN_FOCUS_CHILD_LIST_GET), _elm_widget_can_focus_child_list_get),
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_NEWEST_FOCUS_ORDER_GET), _elm_widget_newest_focus_order_get),
+ EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_FOCUS_HIGHLIGHT_GEOMETRY_GET), _elm_widget_focus_highlight_geometry_get),
EO_OP_FUNC_SENTINEL
};
EO_OP_DESCRIPTION(ELM_WIDGET_SUB_ID_CAN_FOCUS_CHILD_LIST_GET, "Get the list of focusable child objects."),
EO_OP_DESCRIPTION(ELM_WIDGET_SUB_ID_NEWEST_FOCUS_ORDER_GET, "Get the newest focused object and its order."),
+ EO_OP_DESCRIPTION(ELM_WIDGET_SUB_ID_FOCUS_HIGHLIGHT_GEOMETRY_GET, "Get the focus highlight geometry of widget."),
EO_OP_DESCRIPTION_SENTINEL
};
EAPI void elm_widget_orientation_set(Evas_Object *obj, int rotation);
EAPI void elm_widget_orientation_mode_disabled_set(Evas_Object *obj, Eina_Bool disabled);
EAPI Eina_Bool elm_widget_orientation_mode_disabled_get(const Evas_Object *obj);
+EAPI void elm_widget_focus_highlight_geometry_get(const Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h);
EAPI Elm_Widget_Item *_elm_widget_item_new(Evas_Object *parent, size_t alloc_size);
EAPI void _elm_widget_item_free(Elm_Widget_Item *item);
EAPI Evas_Object *_elm_widget_item_widget_get(const Elm_Widget_Item *item);
ELM_WIDGET_SUB_ID_CAN_FOCUS_CHILD_LIST_GET,
ELM_WIDGET_SUB_ID_NEWEST_FOCUS_ORDER_GET,
+ ELM_WIDGET_SUB_ID_FOCUS_HIGHLIGHT_GEOMETRY_GET,
#if 0
ELM_WIDGET_SUB_ID_THEME_APPLY, /* API + virtual*/
ELM_WIDGET_SUB_ID_THEME_SPECIFIC,
*/
#define elm_wdg_orientation_mode_disabled_get(ret) ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_ORIENTATION_MODE_DISABLED_GET), EO_TYPECHECK(Eina_Bool *, ret)
-#endif
+/**
+ * @def elm_wdg_focus_highlight_geometry_get
+ * @since 1.9
+ *
+ * Get the focus highlight geometry of widget.
+ *
+ * @param[in] x
+ * @param[in] y
+ * @param[in] w
+ * @param[in] z
+ *
+ */
+#define elm_wdg_focus_highlight_geometry_get(x, y, w, h) ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_FOCUS_HIGHLIGHT_GEOMETRY_GET), EO_TYPECHECK(Evas_Coord *, x), EO_TYPECHECK(Evas_Coord *, y), EO_TYPECHECK(Evas_Coord *, w), EO_TYPECHECK(Evas_Coord *, h)
+#endif
}
static void
-_elm_win_focus_highlight_geometry_get(Evas_Object *target, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h)
-{
- Evas_Coord tx = 0, ty = 0, tw = 0, th = 0;
- const char *target_hl_part = NULL;
- Evas_Object *edje_obj = NULL;
- ELM_WIDGET_DATA_GET_OR_RETURN(target, wd);
-
- evas_object_geometry_get(target, x, y, w, h);
- if (wd->resize_obj && eo_isa(wd->resize_obj, EDJE_OBJ_CLASS))
- {
- edje_obj = wd->resize_obj;
- if (!(target_hl_part = edje_object_data_get(edje_obj, "focus_part")))
- return;
- }
- else if (wd->resize_obj && eo_isa(wd->resize_obj, ELM_OBJ_LAYOUT_CLASS))
- {
- edje_obj = elm_layout_edje_get(wd->resize_obj);
- if (!(target_hl_part = elm_layout_data_get(wd->resize_obj, "focus_part")))
- return;
- }
- else return;
-
- edje_object_part_geometry_get(edje_obj, target_hl_part,
- &tx, &ty, &tw, &th);
- *x += tx;
- *y += ty;
- if (tw != *w) *w = tw;
- if (th != *h) *h = th;
-}
-
-static void
_elm_win_focus_highlight_anim_setup(Elm_Win_Smart_Data *sd,
Evas_Object *obj)
{
Evas_Object *target = sd->focus_highlight.cur.target;
evas_object_geometry_get(sd->obj, NULL, NULL, &w, &h);
- _elm_win_focus_highlight_geometry_get(target, &tx, &ty, &tw, &th);
- _elm_win_focus_highlight_geometry_get(previous, &px, &py, &pw, &ph);
+ elm_widget_focus_highlight_geometry_get(target, &tx, &ty, &tw, &th);
+ elm_widget_focus_highlight_geometry_get(previous, &px, &py, &pw, &ph);
evas_object_move(obj, tx, ty);
evas_object_resize(obj, tw, th);
evas_object_clip_unset(obj);
Evas_Coord x, y, w, h;
clip = evas_object_clip_get(target);
- _elm_win_focus_highlight_geometry_get(target, &x, &y, &w, &h);
+ elm_widget_focus_highlight_geometry_get(target, &x, &y, &w, &h);
evas_object_move(obj, x, y);
evas_object_resize(obj, w, h);