Eina_Bool *ret = va_arg(*list, Eina_Bool *);
if (ret) *ret = EINA_FALSE;
- /* NOTE: In the following two lines, 'sobj' is correct. Do not change it.
- * Due to elementary's scale policy, scale and pscale can be different in
- * some cases. This happens when sobj's previous parent and new parent have
- * different scale value.
- * For example, if sobj's previous parent's scale is 5 and new parent's scale
- * is 2 while sobj's scale is 0. Then 'pscale' is 5 and 'scale' is 2. So we
- * need to reset sobj's scale to 5.
- * Note that each widget's scale is 0 by default.
- */
- double scale, pscale = elm_widget_scale_get(sobj);
- Elm_Theme *th, *pth = elm_widget_theme_get(sobj);
Eina_Bool mirrored, pmirrored = elm_widget_mirrored_get(obj);
Elm_Widget_Smart_Data *sd = _pd;
{
ELM_WIDGET_DATA_GET(sobj, sdc);
+ /* NOTE: In the following two lines, 'sobj' is correct. Do not change it.
+ * Due to elementary's scale policy, scale and pscale can be different in
+ * some cases. This happens when sobj's previous parent and new parent have
+ * different scale value.
+ * For example, if sobj's previous parent's scale is 5 and new parent's scale
+ * is 2 while sobj's scale is 0. Then 'pscale' is 5 and 'scale' is 2. So we
+ * need to reset sobj's scale to 5.
+ * Note that each widget's scale is 0 by default.
+ */
+ double scale, pscale = elm_widget_scale_get(sobj);
+ Elm_Theme *th, *pth = elm_widget_theme_get(sobj);
+
evas_object_event_callback_add
(sobj, EVAS_CALLBACK_HIDE, _on_sub_obj_hide, NULL);
}
if (elm_widget_focus_get(sobj)) _parents_focus(obj);
+
+ elm_widget_display_mode_set(sobj,
+ evas_object_size_hint_display_mode_get(obj));
}
- elm_widget_display_mode_set(sobj,
- evas_object_size_hint_display_mode_get(obj));
end:
if (ret) *ret = EINA_TRUE;
}
EAPI Eina_Bool
elm_widget_focus_get(const Evas_Object *obj)
{
- ELM_WIDGET_CHECK(obj) EINA_FALSE;
Eina_Bool ret = EINA_FALSE;
eo_do((Eo *) obj, elm_wdg_focus_get(&ret));
return ret;
Elm_Widget_Smart_Data *sd = _pd;
if (!sd->focused) return;
- if (sd->resize_obj && elm_widget_focus_get(sd->resize_obj))
- eo_do(sd->resize_obj, elm_wdg_focused_object_clear());
+ if (sd->resize_obj && elm_widget_is(sd->resize_obj) &&
+ elm_widget_focus_get(sd->resize_obj))
+ {
+ eo_do(sd->resize_obj, elm_wdg_focused_object_clear());
+ }
else
{
const Eina_List *l;
Evas_Object *child;
EINA_LIST_FOREACH(sd->subobjs, l, child)
{
- if (elm_widget_focus_get(child))
+ if (elm_widget_is(child) && elm_widget_focus_get(child))
{
eo_do(child, elm_wdg_focused_object_clear());
break;
EAPI double
elm_widget_scale_get(const Evas_Object *obj)
{
- ELM_WIDGET_CHECK(obj) 1.0;
double ret = 1.0;
eo_do((Eo *) obj, elm_wdg_scale_get(&ret));
return ret;
// FIXME: save walking up the tree by storing/caching parent scale
if (sd->scale == 0.0)
{
- if (sd->parent_obj)
+ if (sd->parent_obj && elm_widget_is(sd->parent_obj))
{
*ret = elm_widget_scale_get(sd->parent_obj);
return;
EAPI Elm_Theme *
elm_widget_theme_get(const Evas_Object *obj)
{
- ELM_WIDGET_CHECK(obj) NULL;
Elm_Theme *ret = NULL;
eo_do((Eo *) obj, elm_wdg_theme_get(&ret));
return ret;
if (!sd->theme)
{
- if (sd->parent_obj)
+ if (sd->parent_obj && elm_widget_is(sd->parent_obj))
{
*ret = elm_widget_theme_get(sd->parent_obj);
return;
unsigned int *newest_focus_order,
Eina_Bool can_focus_only)
{
- ELM_WIDGET_CHECK(obj) NULL;
Evas_Object *ret = NULL;
eo_do((Eo *) obj, elm_wdg_newest_focus_order_get(newest_focus_order, can_focus_only, &ret));
return ret;
}
EINA_LIST_FOREACH(sd->subobjs, l, child)
{
- cur = elm_widget_newest_focus_order_get
- (child, newest_focus_order, can_focus_only);
- if (!cur) continue;
- best = cur;
+ if (elm_widget_is(child))
+ {
+ cur = elm_widget_newest_focus_order_get
+ (child, newest_focus_order, can_focus_only);
+ if (!cur) continue;
+ best = cur;
+ }
}
*ret = best;
return;
EAPI void
elm_widget_display_mode_set(Evas_Object *obj, Evas_Display_Mode dispmode)
{
- ELM_WIDGET_CHECK(obj);
eo_do((Eo *) obj, elm_wdg_display_mode_set(dispmode));
}
evas_object_size_hint_display_mode_set(obj, dispmode);
EINA_LIST_FOREACH (sd->subobjs, l, child)
- elm_widget_display_mode_set(child, dispmode);
+ {
+ if (elm_widget_is(child))
+ {
+ elm_widget_display_mode_set(child, dispmode);
+ }
+ }
}
EAPI void