static void set_api_state(api_data *api) { const Eina_List *items = elm_box_children_get(api->box); if (!eina_list_count(items)) return; /* Get first item of list of vbox children */ Evas_Object *fs_bt = eina_list_nth(items, 0); /* use elm_box_children_get() to get list of children */ switch(api->state) { /* Put all api-changes under switch */ case ICON_UNSET: elm_object_part_content_unset(fs_bt, NULL); break; case WINDOW_TITLE_SET: elm_fileselector_button_window_title_set(fs_bt, "Custom title from API"); break; case API_STATE_LAST: break; default: return; } }
static void bs_gocomics_hide (Evas_Object *layout) { url_free(mod->url); ENNA_FREE(mod->comic_name); ENNA_FREE(mod->comic_id); ENNA_OBJECT_DEL(mod->list); elm_object_part_content_unset(mod->layout, "service.browser.swallow"); ENNA_FREE(mod->path); ENNA_FREE(mod); }
static void _swallow_btn_cb(void *data, Evas_Object *btn, void *event_info) { Evas_Object *layout = data; Evas_Object *item; elm_layout_table_clear(layout, TABLE, EINA_TRUE); elm_layout_box_remove_all(layout, BOX, EINA_TRUE); item = elm_object_part_content_unset(layout, SWALLOW); evas_object_del(item); }
static void _tab_view_switch_content(Evas_Object *content_to_switch_to, tab_view_data *data) { RETM_IF(!content_to_switch_to, "content_to_switch_to is NULL"); RETM_IF(!data, "data is NULL"); Evas_Object *content_to_switch_from = NULL; content_to_switch_from = elm_object_part_content_unset(data->layout, "elm.swallow.content"); evas_object_hide(content_to_switch_from); elm_object_part_content_set(data->layout, "elm.swallow.content", content_to_switch_to); evas_object_show(content_to_switch_to); }
static void set_api_state(api_data *api) { Evas_Object *icon; const Eina_List *items = elm_box_children_get(api->box); if (!eina_list_count(items)) return; /* use elm_box_children_get() to get list of children */ switch(api->state) { /* Put all api-changes under switch */ case HOVERSEL_HORIZ: /* Make first hover horiz (0) */ elm_hoversel_horizontal_set(eina_list_nth(items, 0), EINA_TRUE); elm_hoversel_hover_begin(eina_list_nth(items, 0)); break; case HOVERSEL_END: /* Make first hover horiz (1) */ elm_hoversel_hover_begin(eina_list_nth(items, 1)); elm_hoversel_hover_end(eina_list_nth(items, 1)); break; case HOVERSEL_LABAL_SET: /* set second hover label (2) */ elm_object_text_set(eina_list_nth(items, 1), "Label from API"); break; case HOVERSEL_ICON_UNSET: /* 3 */ elm_object_text_set(eina_list_nth(items, 5), "Label only"); icon = elm_object_part_content_unset(eina_list_nth(items, 5), "icon"); evas_object_del(icon); break; case HOVERSEL_CLEAR_OPEN: /* 4 */ elm_hoversel_hover_begin(eina_list_nth(items, 1)); elm_hoversel_clear(eina_list_nth(items, 1)); break; case HOVERSEL_CLEAR: /* 5 */ elm_hoversel_clear(eina_list_nth(items, 0)); break; case API_STATE_LAST: break; default: return; } }
void nfc_fill_item_cb(void *data, Evas_Object *obj, void *event_info) { elm_list_item_selected_set(event_info, EINA_FALSE); notification_data* notify_info=(notification_data*)data; layout_view_data2 *datas = calloc(1, sizeof(layout_view_data2)); Evas_Object* lists=notify_info->status; datas->navi = evas_object_data_get(lists, "view_data"); datas->name = notify_info->name; datas->layout = ui_utils_layout_add(datas->navi, _layout_view_destroy2, datas); if(!datas->layout) { free(datas); return ; } Evas_Object* list= elm_list_add(datas->layout); notification_data *notification_list = NULL; int size=0; // notification_list=nfc_component_list_get(&size); for(int i=0;i<size;i++){ notification_list[i].status=lists; elm_list_item_append(list,notification_list[i].name,NULL,NULL,_tab_view_layout_fill_cb2depth,¬ification_list[i]); } evas_object_hide(elm_object_part_content_unset(datas->layout, "elm.swallow.content")); elm_object_part_content_set(datas->layout, "elm.swallow.content", list); evas_object_show(list); datas->navi_item = elm_naviframe_item_push(datas->navi, datas->name, NULL, NULL,datas->layout , NULL); // _tab_view_layout_fill_cb2depth(data,obj,event_info); }
void Object::unsetContent(const std::string &part) { /* ignore return */ elm_object_part_content_unset(o, part.c_str()); }
void Object::unsetContent() { /* ignore return */ elm_object_part_content_unset(o, NULL); }
EINA_DEPRECATED EAPI Evas_Object * elm_scrolled_entry_end_unset(Evas_Object *obj) {return elm_object_part_content_unset(obj, "end");}
static void intf_pop_view(interface *intf) { if (naviframe_count(intf->nf_content) == 1) { playback_service *p_ps = application_get_playback_service(intf->p_app); if (playback_service_is_playing(p_ps)) { /* Lower the window (but keep the mainloop running) */ elm_win_lower(intf->win); playback_service_set_auto_exit(p_ps, true); } else { ui_app_exit(); } return; } /* Get the top of the NaviFrame Stack */ Elm_Object_Item *it = elm_naviframe_top_item_get(intf->nf_content); interface_view *view = (interface_view *)elm_object_item_data_get(it); if (view) { if(view->pf_stop != NULL) { view->pf_stop(view->p_view_sys); } } // NOTE: When pop() is called a naviframe will free the content of the item // unless elm_naviframe_content_preserve_on_pop_set is set but this // function seems broken or underspecified (at least in Tizen 2.3 SDK). // To workaround this issue there's two options: // // * Don't recycle view and instantiate a new one instead // * Remove the view from the item before calling pop() // // The second option has one drawback though, once unset the part // will be flying and needs to be hidden until it's reattached. evas_object_hide(elm_object_part_content_unset(intf->nf_content, "elm.swallow.content")); /* Pop the top view */ elm_naviframe_item_pop(intf->nf_content); elm_win_indicator_opacity_set(intf->win, ELM_WIN_INDICATOR_OPAQUE); Evas_Object *sidebar_toggle_btn = create_button(intf->nf_content, "naviframe/drawers"); evas_object_smart_callback_add(sidebar_toggle_btn, "clicked", left_panel_button_clicked_cb, intf); elm_object_part_content_set(intf->nf_content, "title_left_btn", sidebar_toggle_btn); view = (interface_view *)elm_object_item_data_get(elm_naviframe_top_item_get(intf->nf_content)); if (view) { intf->current_view = view->i_type; sidebar_set_selected_view(intf->sidebar, intf->current_view); if (view->pf_has_menu && view->pf_has_menu(view->p_view_sys) == true) { Evas_Object *popup_toggle_btn = create_button(intf->nf_content, "naviframe/custom_more"); evas_object_smart_callback_add(popup_toggle_btn, "clicked", right_panel_button_clicked_cb, intf); elm_object_part_content_set(intf->nf_content, "title_right_btn", popup_toggle_btn); evas_object_show(popup_toggle_btn); } evas_object_show(view->view); } else { LOGE("Cannot get view metadata"); } }