static void _theme_hook(Evas_Object *obj) { Widget_Data *wd = elm_widget_data_get(obj); if (!wd) return; _sizing_eval(obj); }
EAPI Evas_Object * elm_separator_add(Evas_Object *parent) { Evas_Object *obj; Evas *e; Widget_Data *wd; ELM_WIDGET_STANDARD_SETUP(wd, Widget_Data, parent, e, obj, NULL); ELM_SET_WIDTYPE(widtype, "separator"); wd->horizontal = EINA_FALSE; elm_widget_type_set(obj, "separator"); elm_widget_sub_object_add(parent, obj); elm_widget_data_set(obj, wd); elm_widget_del_hook_set(obj, _del_hook); elm_widget_theme_hook_set(obj, _theme_hook); elm_widget_can_focus_set(obj, EINA_FALSE); wd->sep = edje_object_add(e); _elm_theme_object_set(obj, wd->sep, "separator", "vertical", "default"); elm_widget_resize_object_set(obj, wd->sep); _mirrored_set(obj, elm_widget_mirrored_get(obj)); _sizing_eval(obj); return obj; }
static void _theme_hook(Evas_Object *obj) { Widget_Data *wd = elm_widget_data_get(obj); if (!wd) return; _elm_widget_mirrored_reload(obj); _mirrored_set(obj, elm_widget_mirrored_get(obj)); _elm_theme_object_set(obj, wd->bbl, "bubble", wd->corner, elm_widget_style_get(obj)); edje_object_part_text_set(wd->bbl, "elm.text", wd->label); if (wd->label) edje_object_signal_emit(wd->bbl, "elm,state,text,visible", "elm"); else edje_object_signal_emit(wd->bbl, "elm,state,text,hidden", "elm"); edje_object_part_text_set(wd->bbl, "elm.info", wd->info); if (wd->info) edje_object_signal_emit(wd->bbl, "elm,state,info,visible", "elm"); else edje_object_signal_emit(wd->bbl, "elm,state,info,hidden", "elm"); if (wd->content) { edje_object_part_swallow(wd->bbl, "elm.swallow.content", wd->content); edje_object_message_signal_process(wd->bbl); } if (wd->icon) edje_object_signal_emit(wd->bbl, "elm,state,icon,visible", "elm"); else edje_object_signal_emit(wd->bbl, "elm,state,icon,hidden", "elm"); edje_object_scale_set(wd->bbl, elm_widget_scale_get(obj) * _elm_config->scale); _sizing_eval(obj); }
static void _theme_hook(Evas_Object *obj) { Widget_Data *wd = elm_widget_data_get(obj); if (!wd) return; _elm_widget_mirrored_reload(obj); if (wd->scr) { Evas_Object *edj; const char *str; _mirrored_set(obj, elm_widget_mirrored_get(obj)); elm_smart_scroller_object_theme_set(obj, wd->scr, "panel", "base", elm_widget_style_get(obj)); // scale = (elm_widget_scale_get(obj) * _elm_config->scale); // edje_object_scale_set(wd->scr, scale); edj = elm_smart_scroller_edje_object_get(wd->scr); str = edje_object_data_get(edj, "focus_highlight"); if ((str) && (!strcmp(str, "on"))) elm_widget_highlight_in_theme_set(obj, EINA_TRUE); else elm_widget_highlight_in_theme_set(obj, EINA_FALSE); } _sizing_eval(obj); }
void elexika_result_list_append(Evas_Object *obj, Eina_List *list) { Evas_Object *o; Smart_Data *sd; Evas_Coord minw, minh; Eina_List *l; Match *match; sd = evas_object_smart_data_get(obj); if (!sd) return; for (l = list; l; l = l->next) { match = l->data; o = edje_object_add(evas_object_evas_get(sd->obj)); edje_object_file_set(o, "../../data/themes/elexika.edj", "result"); edje_object_part_text_set(o, "result.text", match->str); evas_object_clip_set(o, sd->clip); evas_object_smart_member_add(o, obj); sd->children = eina_list_append(sd->children, o); if (eina_list_count(sd->children) % 2 == 0) edje_object_signal_emit(o, "result,state,even", "result_list"); evas_object_stack_below(o, sd->overlay); evas_object_show(o); } _sizing_eval(obj); }
static Eina_Bool _elm_plug_smart_theme(Evas_Object *obj) { if (!_elm_plug_parent_sc->theme(obj)) return EINA_FALSE; _sizing_eval(obj); return EINA_TRUE; }
static Eina_Bool _elm_mapbuf_smart_theme(Evas_Object *obj) { if (!ELM_WIDGET_CLASS(_elm_mapbuf_parent_sc)->theme(obj)) return EINA_FALSE; _sizing_eval(obj); return EINA_TRUE; }
void elexika_result_list_message_clear(Evas_Object *obj) { Smart_Data *sd; sd = evas_object_smart_data_get(obj); if (!sd) return; sd->overlay_visible = 0; edje_object_signal_emit(sd->overlay, "overlay,hide", "result_list"); _sizing_eval(obj); }
void elexika_result_list_message_show(Evas_Object *obj, const char *str) { Smart_Data *sd; sd = evas_object_smart_data_get(obj); if (!sd) return; printf("Show message: %s\n", str); sd->overlay_visible = 1; edje_object_signal_emit(sd->overlay, "overlay,show", "result_list"); edje_object_part_text_set(sd->overlay, "overlay.message", str); _sizing_eval(obj); }
static void _theme_hook(Evas_Object *obj) { Widget_Data *wd = elm_widget_data_get(obj); if (!wd) return; _elm_widget_mirrored_reload(obj); _mirrored_set(obj, elm_widget_mirrored_get(obj)); _notify_theme_apply(obj); if (wd->block_events) _block_events_theme_apply(obj); edje_object_scale_set(wd->notify, elm_widget_scale_get(obj) * _elm_config->scale); _sizing_eval(obj); }
static void _theme_hook(Evas_Object *obj) { Widget_Data *wd = elm_widget_data_get(obj); if (!wd) return; _elm_widget_mirrored_reload(obj); _mirrored_set(obj, elm_widget_mirrored_get(obj)); if (wd->horizontal) _elm_theme_object_set(obj, wd->sep, "separator", "horizontal", elm_widget_style_get(obj)); else _elm_theme_object_set(obj, wd->sep, "separator", "vertical", elm_widget_style_get(obj)); edje_object_scale_set(wd->sep, elm_widget_scale_get(obj) * _elm_config->scale); _sizing_eval(obj); }
static void _theme_hook(Evas_Object *obj) { Widget_Data *wd = elm_widget_data_get(obj); if (!wd) return; _elm_widget_mirrored_reload(obj); _mirrored_set(obj, elm_widget_mirrored_get(obj)); _elm_theme_object_set(obj, wd->frm, "frame", "base", elm_widget_style_get(obj)); edje_object_part_text_set(wd->frm, "elm.text", wd->label); if (wd->content) edje_object_part_swallow(wd->frm, "elm.swallow.content", wd->content); edje_object_scale_set(wd->frm, elm_widget_scale_get(obj) * _elm_config->scale); _sizing_eval(obj); }
static void _changed(Evas_Object *obj) { Widget_Data *wd = elm_widget_data_get(obj); if (!wd) return; if (wd->eval) { _eval(obj); wd->eval = EINA_FALSE; } if (wd->szeval) { _sizing_eval(obj); wd->szeval = EINA_FALSE; } }
static void _smart_resize(Evas_Object *obj, Evas_Coord w, Evas_Coord h) { Smart_Data *sd; Eina_List *l; Evas_Object *child; Evas_Coord minw, minh, resh; sd = evas_object_smart_data_get(obj); if (!sd) return; if (sd->w != w || sd->h != h) { sd->w_view = w; sd->h_view = h; } printf("Resize: %d %d\n", w, h); _sizing_eval(obj); }
static void _content_set(Evas_Object *obj, Evas_Object *content) { Widget_Data *wd = elm_widget_data_get(obj); if (!wd) return; if (wd->content == content) return; if (wd->content) evas_object_del(wd->content); wd->content = content; if (content) { elm_widget_sub_object_add(obj, content); evas_object_event_callback_add(content, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _changed_size_hints, obj); edje_object_part_swallow(wd->bbl, "elm.swallow.content", content); } _sizing_eval(obj); }
static void _icon_set(Evas_Object *obj, Evas_Object* icon) { Widget_Data *wd = elm_widget_data_get(obj); if (!wd) return; if (wd->icon == icon) return; if (wd->icon) evas_object_del(wd->icon); wd->icon = icon; if (icon) { elm_widget_sub_object_add(obj, icon); edje_object_part_swallow(wd->bbl, "elm.swallow.icon", icon); evas_object_event_callback_add(icon, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _changed_size_hints, obj); edje_object_signal_emit(wd->bbl, "elm,state,icon,visible", "elm"); edje_object_message_signal_process(wd->bbl); } _sizing_eval(obj); }
EOLIAN static Eina_Bool _elm_notify_elm_widget_theme_apply(Eo *obj, Elm_Notify_Data *sd) { Eina_Bool int_ret = EINA_FALSE; eo_do_super(obj, MY_CLASS, int_ret = elm_obj_widget_theme_apply()); if (!int_ret) return EINA_FALSE; _mirrored_set(obj, elm_widget_mirrored_get(obj)); _notify_theme_apply(obj); if (sd->block_events) _block_events_theme_apply(obj); edje_object_scale_set (sd->notify, elm_widget_scale_get(obj) * elm_config_scale_get()); _sizing_eval(obj); return EINA_TRUE; }
EOLIAN static void _efl_ui_text_alert_popup_efl_canvas_group_group_calculate(Eo *obj, Efl_Ui_Text_Alert_Popup_Data *pd) { /* When elm_layout_sizing_eval() is called, just flag is set instead of size * calculation. * The actual size calculation is done here when the object is rendered to * avoid duplicate size calculations. */ EFL_UI_POPUP_DATA_GET_OR_RETURN(obj, ppd); if (ppd->needs_group_calc) { if (ppd->needs_size_calc) _sizing_eval(obj, pd); //Not to calculate size by super class ppd->needs_size_calc = EINA_FALSE; efl_canvas_group_calculate(efl_super(obj, MY_CLASS)); } }
Evas_Object * elm_keypad_add(Evas_Object * parent) { // Evas_Object *obj; Instead I'm using the wd->widget variable Evas *e; Widget_Data *wd; wd = ELM_NEW(Widget_Data); e = evas_object_evas_get(parent); wd->widget = elm_widget_add(e); elm_widget_data_set(wd->widget, wd); elm_widget_del_hook_set(wd->widget, _del_hook); wd->keypad = edje_object_add(e); g_debug("keypad evas object: %d", wd->keypad); edje_object_file_set(wd->keypad, KEYPAD_FILE, "keypad"); edje_object_signal_callback_add(wd->keypad, "*", "input", _signal_clicked, wd->widget); edje_object_signal_callback_add(wd->keypad, "0", "mouse_up", _zero_mouse_up, wd->widget); edje_object_signal_callback_add(wd->keypad, "0", "mouse_down", _zero_mouse_down, wd->widget); edje_object_part_text_set(wd->keypad, "text2_desc", D_("ABC")); edje_object_part_text_set(wd->keypad, "text3_desc", D_("DEF")); edje_object_part_text_set(wd->keypad, "text4_desc", D_("GHI")); edje_object_part_text_set(wd->keypad, "text5_desc", D_("JKL")); edje_object_part_text_set(wd->keypad, "text6_desc", D_("MNO")); edje_object_part_text_set(wd->keypad, "text7_desc", D_("PQRS")); edje_object_part_text_set(wd->keypad, "text8_desc", D_("TUV")); edje_object_part_text_set(wd->keypad, "text9_desc", D_("XYZ")); elm_widget_resize_object_set(wd->widget, wd->keypad); //evas_object_smart_callback_add(wd->widget, "sub-object-del", _sub_del, wd->widget); _sizing_eval(wd->widget); return wd->widget; }
static Eina_Bool _elm_photo_smart_theme(Evas_Object *obj) { ELM_PHOTO_DATA_GET(obj, sd); if (!ELM_WIDGET_CLASS(_elm_photo_parent_sc)->theme(obj)) return EINA_FALSE; edje_object_mirrored_set (ELM_WIDGET_DATA(sd)->resize_obj, elm_widget_mirrored_get(obj)); elm_widget_theme_object_set (obj, ELM_WIDGET_DATA(sd)->resize_obj, "photo", "base", elm_widget_style_get(obj)); elm_object_scale_set(sd->icon, elm_widget_scale_get(obj)); edje_object_scale_set(ELM_WIDGET_DATA(sd)->resize_obj, elm_widget_scale_get(obj) * elm_config_scale_get()); _sizing_eval(obj); return EINA_TRUE; }
static void _elm_notify_smart_theme(Eo *obj, void *_pd, va_list *list) { Elm_Notify_Smart_Data *sd = _pd; Eina_Bool *ret = va_arg(*list, Eina_Bool *); if (ret) *ret = EINA_FALSE; Eina_Bool int_ret = EINA_FALSE; eo_do_super(obj, MY_CLASS, elm_wdg_theme(&int_ret)); if (!int_ret) return; _mirrored_set(obj, elm_widget_mirrored_get(obj)); _notify_theme_apply(obj); if (sd->block_events) _block_events_theme_apply(obj); edje_object_scale_set (sd->notify, elm_widget_scale_get(obj) * elm_config_scale_get()); _sizing_eval(obj); if (ret) *ret = EINA_TRUE; }
static void _theme_hook(Evas_Object *obj) { Widget_Data *wd = elm_widget_data_get(obj); int i; if ((!wd) || (!wd->base)) return; _elm_theme_object_set(obj, wd->base, "colorselector", "bg", elm_widget_style_get(obj)); for (i = 0; i < 4; i++) { evas_object_del(wd->cp[i]->colorbar); wd->cp[i]->colorbar = NULL; evas_object_del(wd->cp[i]->bar); wd->cp[i]->bar = NULL; evas_object_del(wd->cp[i]->lbt); wd->cp[i]->lbt = NULL; evas_object_del(wd->cp[i]->rbt); wd->cp[i]->rbt = NULL; if (i != 0) { evas_object_del(wd->cp[i]->bg_rect); wd->cp[i]->bg_rect = NULL; } evas_object_del(wd->cp[i]->arrow); wd->cp[i]->arrow = NULL; evas_object_del(wd->cp[i]->touch_area); wd->cp[i]->touch_area = NULL; } _add_colorbar(obj); elm_colorselector_color_set(obj, wd->r, wd->g, wd->b, wd->a); _sizing_eval(obj); }
EOLIAN static Elm_Theme_Apply _elm_photo_elm_widget_theme_apply(Eo *obj, Elm_Photo_Data *sd) { Elm_Theme_Apply int_ret = ELM_THEME_APPLY_FAILED; ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE); int_ret = elm_obj_widget_theme_apply(efl_super(obj, MY_CLASS)); if (!int_ret) return ELM_THEME_APPLY_FAILED; edje_object_mirrored_set (wd->resize_obj, elm_widget_mirrored_get(obj)); elm_widget_theme_object_set (obj, wd->resize_obj, "photo", "base", elm_widget_style_get(obj)); elm_object_scale_set(sd->icon, elm_widget_scale_get(obj)); edje_object_scale_set(wd->resize_obj, elm_widget_scale_get(obj) * elm_config_scale_get()); _sizing_eval(obj); return int_ret; }
EOLIAN static Eina_Error _elm_photo_efl_ui_widget_theme_apply(Eo *obj, Elm_Photo_Data *sd) { Eina_Error int_ret = EFL_UI_THEME_APPLY_ERROR_GENERIC; ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE); int_ret = efl_ui_widget_theme_apply(efl_super(obj, MY_CLASS)); if (int_ret == EFL_UI_THEME_APPLY_ERROR_GENERIC) return int_ret; edje_object_mirrored_set (wd->resize_obj, efl_ui_mirrored_get(obj)); elm_widget_theme_object_set (obj, wd->resize_obj, "photo", "base", elm_widget_style_get(obj)); elm_object_scale_set(sd->icon, efl_gfx_entity_scale_get(obj)); edje_object_scale_set(wd->resize_obj, efl_gfx_entity_scale_get(obj) * elm_config_scale_get()); _sizing_eval(obj); return int_ret; }
static void _calc(Evas_Object *obj) { Evas_Coord minw = -1, minh = -1; Evas_Coord x, y, w, h; ELM_NOTIFY_DATA_GET(obj, sd); _sizing_eval(obj); evas_object_geometry_get(obj, &x, &y, &w, &h); edje_object_size_min_get(sd->notify, &minw, &minh); edje_object_size_min_restricted_calc(sd->notify, &minw, &minh, minw, minh); if (sd->horizontal_align == ELM_NOTIFY_ALIGN_FILL) minw = w; if (sd->vertical_align == ELM_NOTIFY_ALIGN_FILL) minh = h; if (sd->content) { _notify_move_to_orientation(obj); evas_object_resize(sd->notify, minw, minh); } }