static void
_disable_cb(void *data, Evas_Object *obj, void *event_info)
{
   Elm_Object_Item *selected_item;
   Evas_Object *li = data;

   selected_item = elm_list_selected_item_get(li);
   if (!selected_item) return;
   elm_object_item_disabled_set(selected_item, EINA_TRUE);
}
int viewer_manager_hidden_disable_set(int mode)
{
	__COMMON_FUNC_ENTER__;
	assertm_if(NULL == manager_object->item_hidden_btn, "NULL!!");
	
	elm_object_item_disabled_set(manager_object->item_hidden_btn, mode);
	elm_genlist_item_update(manager_object->item_hidden_btn);

	__COMMON_FUNC_EXIT__;
	return TRUE;
}
Ejemplo n.º 3
0
static Eina_Bool _back_cb(void *data , Elm_Object_Item *item)
{
    DBG("test _back_cb()");
    oicappData *ad = data;

    elm_genlist_item_update(ad->itemConsumer);
    elm_genlist_item_update(ad->itemConsumerHost);
    elm_genlist_item_update(ad->itemConsumerTemp);
    elm_genlist_item_update(ad->itemConsumerHumid);
    elm_genlist_item_update(ad->itemConsumerUri);

    elm_object_item_disabled_set(ad->itemConsumer , EINA_FALSE);
    elm_object_item_disabled_set(ad->itemConsumerHost , EINA_TRUE);
    elm_object_item_disabled_set(ad->itemConsumerTemp , EINA_TRUE);
    elm_object_item_disabled_set(ad->itemConsumerHumid , EINA_TRUE);
    elm_object_item_disabled_set(ad->itemConsumerUri , EINA_TRUE);

    elm_exit();

    return EINA_FALSE;
}
Ejemplo n.º 4
0
/* disable selected item */
static void
_toggle_disabled_cb(void        *data,
                    Evas_Object *obj,
                    void        *event_info)
{
   Elm_Object_Item *gg_it = elm_gengrid_selected_item_get(data);

   if (!gg_it) return;

   elm_gengrid_item_selected_set(gg_it, EINA_FALSE);
   elm_object_item_disabled_set(gg_it, EINA_TRUE);
}
int viewer_list_item_enable_all(void)
{
	__COMMON_FUNC_ENTER__;
	assertm_if(NULL == container, "NULL!!");

	int count = g_slist_length(container);
	int i = 1;

	for(;i<count;i++){
		Elm_Object_Item* det = NULL;
		det = (Elm_Object_Item*) g_slist_nth_data(container, i);
		assertm_if(NULL == det, "NULL!!");
		elm_object_item_disabled_set(det, EINA_FALSE);
	}

	__COMMON_FUNC_EXIT__;
	return TRUE;
}
Elm_Object_Item *common_utils_add_2_line_txt_disabled_item(Evas_Object* view_list, const char *style_name, const char *line1_txt, const char *line2_txt)
{
	static Elm_Genlist_Item_Class two_line_display_itc;
	two_line_disp_data_t *two_line_data = NULL;
	Elm_Object_Item *item = NULL;

	two_line_display_itc.item_style = style_name;
	two_line_display_itc.func.text_get = __common_utils_2line_text_get;
	two_line_display_itc.func.content_get = NULL;
	two_line_display_itc.func.state_get = NULL;
	two_line_display_itc.func.del = __common_utils_2line_text_del;

	two_line_data = g_malloc0(sizeof(two_line_disp_data_t));
	two_line_data->title_str = g_strdup(line1_txt);
	two_line_data->info_str = g_strdup(line2_txt);
	INFO_LOG(UG_NAME_NORMAL, "title_str = %s info_str = %s", two_line_data->title_str, two_line_data->info_str);

	item = elm_genlist_item_append(view_list, &two_line_display_itc, two_line_data, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
	elm_object_item_disabled_set(item, TRUE);

	return item;
}
Ejemplo n.º 7
0
static void
_win_toolbar_eval(Win *w)
{
   Eina_Bool tb_nowp_state, is_prefs;

   is_prefs = elm_pager_content_top_get(w->list) == w->preferences;

   if (!w->db)
     tb_nowp_state = EINA_FALSE;
   else if (is_prefs)
     tb_nowp_state = EINA_TRUE;
   else
     tb_nowp_state = !!w->song;

   if ((w->play.shuffle) || (list_prev_exists(w->list)))
      elm_object_item_disabled_set(w->action.prev, EINA_FALSE);
   else
      elm_object_item_disabled_set(w->action.prev, EINA_TRUE);

   if ((w->play.shuffle) || (list_next_exists(w->list)))
      elm_object_item_disabled_set(w->action.next, EINA_FALSE);
   else
      elm_object_item_disabled_set(w->action.next, EINA_TRUE);

   if (w->song)
     elm_object_item_disabled_set(w->action.play, EINA_FALSE);
   else
     elm_object_item_disabled_set(w->action.play, EINA_TRUE);

   elm_object_item_disabled_set(w->action.nowplaying, !tb_nowp_state);

   if ((is_prefs) && (!w->song))
     elm_toolbar_item_state_set(w->action.nowplaying, w->action.playlist);

   ecore_event_add(ENJOY_EVENT_PLAYER_CAPS_CHANGE, NULL, NULL, NULL);
}
Ejemplo n.º 8
0
static void
set_api_state(api_data *api)
{
/** HOW TO TEST ************************
0 ITEM PREPEND
Scroll to end
1 INSERT BEFORE
Scroll to end
2 INSERT AFTER
3 INSERT SEPERATOR
Scroll to end
4 ITEM DEL
5 POLICY ON, BOUNCE_SET(TRUE, TRUE)
6 POLICY OFF
Scroll to end
7 TOOLTIP last-item
8 Cancel tootip
9 Curosr set on last item
10 Cursor style set last item
11 DISABLE last item
12 MODE COMPRESS
13 MODE LIMIT
14 MODE EXPAND
15 HORIZ SET
16 VERT MODE, BOUNCE(TRUE, FALSE) try to bounce on Y-axis
17 List clear
*** HOW TO TEST ***********************/
   Evas_Object *li = api->list;

   switch(api->state)
     { /* Put all api-changes under switch */
      case ITEM_PREPEND: /* 0 */
           {
              const Eina_List *items = elm_list_items_get(li);
              elm_list_item_prepend(li, "PREPEND", NULL, NULL, NULL, NULL);
              elm_list_go(li);
              elm_list_item_bring_in(eina_list_nth(items, 0));
           }
         break;

      case ITEM_INSERT_BEFORE: /* 1 */
           {
              const Eina_List *items = elm_list_items_get(li);
              if (eina_list_count(items))
                {
                  elm_list_item_insert_before(li,
                        eina_list_nth(items, eina_list_count(items)-1),
                        "1-before-last", NULL, NULL, NULL, NULL);
                  elm_list_go(li);
                  elm_list_item_bring_in(eina_list_data_get(eina_list_last(items)));
                }
           }
         break;

      case ITEM_INSERT_AFTER: /* 2 */
           {
              const Eina_List *items = elm_list_items_get(li);
              if (eina_list_count(items))
                {
                  elm_list_item_insert_after(li,
                        eina_list_nth(items, eina_list_count(items)-2),
                        "insert-after", NULL, NULL, NULL, NULL);
                  elm_list_go(li);
                  elm_list_item_bring_in(eina_list_data_get(eina_list_last(items)));
                }
           }
         break;

      case ITEM_SEPARATOR_SET: /* 3 */
           {
              const Eina_List *items = elm_list_items_get(li);
              if (eina_list_count(items))
                {
                  elm_list_item_separator_set(eina_list_nth(items, eina_list_count(items)-3), EINA_TRUE);
                  elm_list_item_bring_in(eina_list_nth(items, eina_list_count(items)-3));
                  elm_list_go(li);
                }
           }
         break;

      case LIST_ITEM_DEL: /* 4 */
           {
              const Eina_List *items = elm_list_items_get(li);
              if (eina_list_count(items))
                {
                  elm_object_item_del(eina_list_data_get(eina_list_last(items)));
                }
           }
         break;

      case SCROLLER_POLICY_SET_ON: /* 5 */
         elm_scroller_bounce_set(li, EINA_TRUE, EINA_TRUE);
         elm_scroller_policy_set(li, ELM_SCROLLER_POLICY_ON, ELM_SCROLLER_POLICY_ON);
         break;

      case SCROLLER_POLICY_SET_OFF: /* Back to AUTO next (6) */
         elm_scroller_policy_set(li, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_OFF);
         break;

      case TOOLTIP_TEXT_SET: /* 7 */
           {
              const Eina_List *items = elm_list_items_get(li);
              if (eina_list_count(items))
                {
                  elm_object_item_tooltip_text_set(eina_list_data_get(eina_list_last(items)), "Tooltip set from API");
                }
              elm_scroller_policy_set(li, ELM_SCROLLER_POLICY_AUTO, ELM_SCROLLER_POLICY_AUTO);
           }
         break;

      case TOOLTIP_UNSET: /* 8 */
           {
              const Eina_List *items = elm_list_items_get(li);
              if (eina_list_count(items))
                {
                  elm_object_item_tooltip_unset(eina_list_data_get(eina_list_last(items)));
                }
           }
         break;

      case ITEM_CURSOR_SET: /* 9 */
           {
              const Eina_List *items = elm_list_items_get(li);
              if (eina_list_count(items))
                {
                  elm_object_item_cursor_set(eina_list_data_get(eina_list_last(items)), ELM_CURSOR_HAND2);
                }
           }
         break;

      case ITEM_CURSOR_STYLE_SET: /* 10 */
           {
              const Eina_List *items = elm_list_items_get(li);
              if (eina_list_count(items))
                {
                  elm_object_item_cursor_style_set(eina_list_data_get(eina_list_last(items)), "transparent");
                }
           }
         break;

      case DISABLED_SET: /* 11 */
           {
              const Eina_List *items = elm_list_items_get(li);
              if (eina_list_count(items))
                {
                  elm_object_item_disabled_set(eina_list_data_get(eina_list_last(items)), EINA_TRUE);
                }
           }
         break;

      case MODE_SET_COMPRESS: /* 12 */
         elm_list_mode_set(li, ELM_LIST_COMPRESS);
         break;

      case MODE_SET_LIMIT: /* 13 */
         elm_list_mode_set(li, ELM_LIST_LIMIT);
         break;

      case MODE_SET_EXPAND: /* 14 */
         elm_list_mode_set(li, ELM_LIST_EXPAND);
         break;

      case HORIZONTAL_SET: /* 15 */
         elm_list_mode_set(li, ELM_LIST_SCROLL); /* return to default mode */
         elm_list_horizontal_set(li, EINA_TRUE);
         break;

      case BOUNCE_SET: /* 16 */
         elm_list_horizontal_set(li, EINA_FALSE);
         elm_scroller_bounce_set(li, EINA_TRUE, EINA_FALSE);
         break;

      case LIST_CLEAR: /* 17 */
         elm_list_clear(li);
         break;

      case API_STATE_LAST:
         break;

      default:
         return;
     }
}
void Browser_Settings_Website_Setting::_show_details_list(website_setting_item *item_info)
{
	BROWSER_LOGD("[%s]", __func__);
	if(!item_info)
		return;

	m_details_genlist = elm_genlist_add(m_navi_bar);
	if (!m_details_genlist) {
		BROWSER_LOGE("elm_genlist_add failed");
		return;
	}

	evas_object_show(m_details_genlist);

	m_1_text_1_icon_item_class.item_style = "1text.1icon";
	m_1_text_1_icon_item_class.func.text_get = __details_genlist_label_get;
	m_1_text_1_icon_item_class.func.content_get = __details_genlist_icon_get;
	m_1_text_1_icon_item_class.func.state_get = NULL;
	m_1_text_1_icon_item_class.func.del = NULL;

	if (item_info->geolocation) {
		m_location_item_callback_data.type = BR_MENU_LOCATION;
		m_location_item_callback_data.cp = this;
		m_location_item_callback_data.user_data = item_info;
		m_location_item_callback_data.it = elm_genlist_item_append(m_details_genlist,
			&m_1_text_1_icon_item_class, &m_location_item_callback_data, NULL, ELM_GENLIST_ITEM_NONE,
			__details_item_selected_cb, &m_location_item_callback_data);
	}

	if (item_info->storage) {
		m_web_storage_item_callback_data.type = BR_MENU_WEB_STORAGE;
		m_web_storage_item_callback_data.cp = this;
		m_web_storage_item_callback_data.user_data = item_info;
		m_web_storage_item_callback_data.it = elm_genlist_item_append(m_details_genlist,
				&m_1_text_1_icon_item_class, &m_web_storage_item_callback_data, NULL, ELM_GENLIST_ITEM_NONE,
				__details_item_selected_cb, &m_web_storage_item_callback_data);
	}

	m_back_button_details = elm_button_add(m_details_genlist);
	if (!m_back_button_details) {
		BROWSER_LOGE("elm_button_add failed");
		return;
	}
	elm_object_style_set(m_back_button_details, "browser/bookmark_controlbar_back");
	evas_object_show(m_back_button_details);
	evas_object_smart_callback_add(m_back_button_details, "clicked", __back_button_clicked_cb, this);

	Elm_Object_Item *navi_it = elm_naviframe_item_push(m_navi_bar, item_info->url.c_str(),
							m_back_button_details, NULL, m_details_genlist, "browser_titlebar");

	m_details_bottom_control_bar = elm_toolbar_add(m_navi_bar);
	if (!m_details_bottom_control_bar) {
		BROWSER_LOGE("elm_toolbar_add failed");
		return;
	}
	elm_object_style_set(m_details_bottom_control_bar, "browser/default");
	elm_toolbar_shrink_mode_set(m_details_bottom_control_bar, ELM_TOOLBAR_SHRINK_EXPAND);

	m_delete_all_details_conbar_item = elm_toolbar_item_append(m_details_bottom_control_bar,
							NULL, BR_STRING_DELETE_ALL,
							__delete_all_details_list_conbar_item_clicked_cb, this);
	if (elm_genlist_items_count(m_details_genlist) == 0) {
		elm_object_item_disabled_set(m_delete_all_details_conbar_item, EINA_TRUE);
	}

	Elm_Object_Item *empty_item = elm_toolbar_item_append(m_details_bottom_control_bar, NULL, NULL, NULL, NULL);
	elm_object_item_disabled_set(empty_item, EINA_TRUE);

	empty_item = elm_toolbar_item_append(m_details_bottom_control_bar, NULL, NULL, NULL, NULL);
	elm_object_item_disabled_set(empty_item, EINA_TRUE);

	evas_object_show(m_details_bottom_control_bar);
	elm_object_item_part_content_set(navi_it, ELM_NAVIFRAME_ITEM_CONTROLBAR, m_details_bottom_control_bar);
}
Evas_Object* viewer_manager_create(Evas_Object* _parent)
{
	__COMMON_FUNC_ENTER__;

	if (manager_object != NULL || _parent == NULL) {
		__COMMON_FUNC_EXIT__;
		return NULL;
	}

	manager_object = (viewer_manager_object*) g_malloc0(sizeof(viewer_manager_object));
	memset(manager_object, 0, sizeof(viewer_manager_object));

	manager_object->list = NULL;
	manager_object->item_hidden_btn = NULL;
	manager_object->item_sep_above_hidden_button = NULL;
	manager_object->item_sep_below_hidden_button = NULL;
	manager_object->item_header = NULL;

	/* Add Full Layout */
	Evas_Object* layout = elm_layout_add(_parent);
	elm_layout_theme_set(layout, "layout", "application", "default");
	evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
	elm_win_resize_object_add(_parent, layout);
	edje_object_signal_emit(elm_layout_edje_get(layout), "elm,state,show,content", "elm");
	edje_object_signal_emit(elm_layout_edje_get(layout), "elm,bg,show,group_list", "elm");
	edje_object_signal_emit(elm_layout_edje_get(layout), "elm,state,show,indicator", "elm");

	/* Add Naviframe */
	manager_object->nav = elm_naviframe_add(layout);
	elm_object_part_content_set(layout, "elm.swallow.content", manager_object->nav);

	/* Add back button on Navigationbar */
	Evas_Object* button_back = elm_button_add(manager_object->nav);

	/* Add MainView Layout */
	Evas_Object* view_content = elm_layout_add(manager_object->nav);
	elm_layout_theme_set(view_content, "standard", "window", "integration");
	edje_object_signal_emit(elm_layout_edje_get(view_content), "elm,state,show,content", "elm");
	edje_object_signal_emit(elm_layout_edje_get(view_content), "elm,bg,show,group_list", "elm");

	/* Add Conformant */
	Evas_Object *conform = elm_conformant_add(manager_object->nav);
	elm_object_style_set(conform, "internal_layout");
	elm_object_part_content_set(view_content, "elm.swallow.content", conform);
	evas_object_show(conform);

	/* Add Genlist */
	manager_object->list = viewer_list_create(manager_object->nav);
	assertm_if(NULL == manager_object->list, "manager_object->list is NULL!!");
	viewer_manager_header_create(manager_object->list);
	viewer_manager_bottom_create(manager_object->list);
	viewer_manager_hidden_button_create(manager_object->list);

	elm_object_content_set(conform, manager_object->list);

	if (ug_app_state->ug_type == UG_VIEW_SETUP_WIZARD) {
		Elm_Object_Item* navi_it = elm_naviframe_item_push(manager_object->nav, sc(PACKAGE, I18N_TYPE_Wi_Fi), NULL, NULL, view_content, NULL);
		evas_object_data_set(manager_object->nav, SCREEN_TYPE_ID_KEY, (void *)VIEW_MANAGER_VIEW_TYPE_MAIN);
		evas_object_smart_callback_add(manager_object->nav, "transition,finished", _hide_finished_cb, navi_it);

		Evas_Object *toolbar = elm_toolbar_add(manager_object->nav);
		elm_toolbar_shrink_mode_set(toolbar, ELM_TOOLBAR_SHRINK_EXPAND);

		if(ug_app_state->lbutton_setup_wizard_prev_icon != NULL && ug_app_state->lbutton_setup_wizard != NULL) {
		    manager_object->prev_button = (Evas_Object *)elm_toolbar_item_append(toolbar, ug_app_state->lbutton_setup_wizard_prev_icon, ug_app_state->lbutton_setup_wizard, _lbutton_click_cb, NULL);
		    elm_object_item_disabled_set(elm_toolbar_item_append(toolbar, NULL, "", NULL, NULL), EINA_TRUE);
		}
		if(ug_app_state->rbutton_setup_wizard_scan_icon != NULL) {
		    manager_object->scan_button = (Evas_Object *)elm_toolbar_item_append(toolbar, ug_app_state->rbutton_setup_wizard_scan_icon, sc(PACKAGE, I18N_TYPE_Scan), _refresh_sk_cb, NULL);
		    elm_object_item_disabled_set(elm_toolbar_item_append(toolbar, NULL, "", NULL, NULL), EINA_TRUE);
		}
		if(ug_app_state->rbutton_setup_wizard_skip_icon != NULL && ug_app_state->rbutton_setup_wizard_skip != NULL) {
		    manager_object->next_button = (Evas_Object *)elm_toolbar_item_append(toolbar, ug_app_state->rbutton_setup_wizard_skip_icon, ug_app_state->rbutton_setup_wizard_skip, _rbutton_click_cb, NULL);
		}
		elm_object_item_part_content_set(navi_it, "controlbar", toolbar);

	} else {
		Elm_Object_Item* navi_it = elm_naviframe_item_push(manager_object->nav, sc(PACKAGE, I18N_TYPE_Wi_Fi), button_back, NULL, view_content, NULL);
		evas_object_data_set(manager_object->nav, SCREEN_TYPE_ID_KEY, (void *)VIEW_MANAGER_VIEW_TYPE_MAIN);
		evas_object_smart_callback_add(manager_object->nav, "transition,finished", _hide_finished_cb, navi_it);

		Evas_Object *toolbar = elm_toolbar_add(manager_object->nav);
		elm_toolbar_shrink_mode_set(toolbar, ELM_TOOLBAR_SHRINK_EXPAND);

		manager_object->scan_button = (Evas_Object *)elm_toolbar_item_append(toolbar, NULL, sc(PACKAGE, I18N_TYPE_Scan), _refresh_sk_cb, NULL);
		elm_object_item_disabled_set(elm_toolbar_item_append(toolbar, NULL, "", NULL, NULL), EINA_TRUE);
		elm_object_item_part_content_set(navi_it, "controlbar", toolbar);

		elm_object_style_set(button_back, "naviframe/back_btn/default");
		evas_object_smart_callback_add(button_back, "clicked", _back_sk_cb, NULL);
	}

	evas_object_show(layout);

	__COMMON_FUNC_EXIT__;
	return layout;
}
EAPI_MAIN int
elm_main(int argc, char **argv)
{
   Evas_Object *win, *bg, *box, *fbox;
   Evas_Object *list;
   Evas_Object *bt_bring_in, *bt_show;
   Evas_Object *bt_middle_in, *bt_middle_show;
   Evas_Object *bt_top_in, *bt_top_show;
   int i;

   win = elm_win_add(NULL, "icon", ELM_WIN_BASIC);
   elm_win_title_set(win, "Icon");
   elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
   elm_win_autodel_set(win, EINA_TRUE);

   bg = elm_bg_add(win);
   elm_bg_color_set(bg, 255,255 ,255);
   evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
   elm_win_resize_object_add(win, bg);
   evas_object_show(bg);

   box = elm_box_add(win);
   evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
   evas_object_size_hint_align_set(box, EVAS_HINT_FILL, EVAS_HINT_FILL);
   elm_win_resize_object_add(win, box);
   evas_object_show(box);

   if (!_itc)
     {
        _itc = elm_genlist_item_class_new();
        _itc->item_style = "default";
        _itc->func.text_get = _item_label_get;
        _itc->func.content_get = _item_content_get;
        _itc->func.state_get = NULL;
        _itc->func.del = NULL;
     }

   if (!_itc_group)
     {
        _itc_group = elm_genlist_item_class_new();
        _itc_group->item_style = "group_index";
        _itc_group->func.text_get = _group_label_get;
        _itc_group->func.content_get = _group_content_get;
        _itc_group->func.state_get = NULL;
        _itc_group->func.del = NULL;
     }
   list = elm_genlist_add(win);

   evas_object_size_hint_weight_set(list, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
   evas_object_size_hint_align_set(list, EVAS_HINT_FILL, EVAS_HINT_FILL);
   elm_box_pack_end(box, list);
   evas_object_show(list);

   fbox = elm_box_add(win);
   elm_box_layout_set(fbox, evas_object_box_layout_flow_horizontal,
                      NULL, NULL);
   evas_object_size_hint_weight_set(fbox, EVAS_HINT_EXPAND, 0);
   evas_object_size_hint_align_set(fbox, EVAS_HINT_FILL, EVAS_HINT_FILL);
   elm_box_pack_end(box, fbox);
   evas_object_show(fbox);

   _button_add(list, fbox, "prepend", _prepend_cb);
   _button_add(list, fbox, "append", _append_cb);
   _button_add(list, fbox, "insert before", _insert_before_cb);
   _button_add(list, fbox, "insert after", _insert_after_cb);
   _button_add(list, fbox, "prev", _prev_cb);
   _button_add(list, fbox, "next", _next_cb);
   _button_add(list, fbox, "realize", _realize_cb);
   bt_bring_in = _button_add(list, fbox, "bring #50", NULL);
   bt_show = _button_add(list, fbox, "show #50", NULL);
   bt_middle_in = _button_add(list, fbox, "bring to middle #200", NULL);
   bt_middle_show = _button_add(list, fbox, "show in middle #200", NULL);
   bt_top_in = _button_add(list, fbox, "bring to top #250", NULL);
   bt_top_show = _button_add(list, fbox, "show in top #250", NULL);

   for (i = 0; i < N_ITEMS; i++)
     {
        Elm_Object_Item *gli, *glg;

        if (i % 7 == 0)
          {
             glg = gli = elm_genlist_item_append(list, _itc_group,
                                                 (void *)(long)nitems++, NULL,
                                                 ELM_GENLIST_ITEM_GROUP,
                                                 _item_sel_cb, NULL);
             elm_genlist_item_select_mode_set(gli, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
          }
        else
          {
             gli = elm_genlist_item_append(list, _itc,
                                           (void *)(long)nitems++, glg,
                                           ELM_GENLIST_ITEM_NONE,
                                           _item_sel_cb, NULL);
          }

        switch (i)
          {
           case 3:
              elm_object_item_disabled_set(gli, EINA_TRUE);
              break;
           case 50:
              evas_object_smart_callback_add(
                 bt_bring_in, "clicked", _bring_in_cb, gli);
              evas_object_smart_callback_add(
                 bt_show, "clicked", _show_cb, gli);
              break;
           case 200:
              evas_object_smart_callback_add(
                 bt_middle_in, "clicked", _middle_in_cb, gli);
              evas_object_smart_callback_add(
                 bt_middle_show, "clicked", _middle_show_cb, gli);
              break;
           case 250:
              evas_object_smart_callback_add(
                 bt_top_in, "clicked", _top_in_cb, gli);
              evas_object_smart_callback_add(
                 bt_top_show, "clicked", _top_show_cb, gli);
          }
     }

   evas_object_size_hint_min_set(bg, 160, 160);
   evas_object_size_hint_max_set(bg, 640, 640);
   evas_object_resize(win, 420, 320);
   evas_object_show(win);

   elm_run();
   elm_shutdown();

   return 0;
}