コード例 #1
0
void create_list_view(appdata_s *ad)
{
	Evas_Object *list;
	Evas_Object *btn;
	Evas_Object *nf = ad->navi;
	Elm_Object_Item *nf_it;

	/* List */
	list = elm_list_add(nf);
	elm_list_mode_set(list, ELM_LIST_COMPRESS);
	evas_object_smart_callback_add(list, "selected", list_selected_cb, NULL);

	/* Main Menu Items Here */
	elm_list_item_append(list, "Wait Connection", NULL, NULL, _wait_cb, ad);
	elm_list_item_append(list, "Gesture Setting", NULL, NULL, _setting_cb, ad);

	elm_list_go(list);

	/* This button is set for devices which doesn't have H/W back key. */
	btn = elm_button_add(nf);
	elm_object_style_set(btn, "naviframe/end_btn/default");

	// 네비프레임 맨위를 설정한다.
	nf_it = elm_naviframe_item_push(nf, "Gear Presentor", btn, NULL, list, NULL);
	elm_naviframe_item_pop_cb_set(nf_it, _naviframe_pop_cb, ad);
}
コード例 #2
0
ファイル: screen_reader.c プロジェクト: 10zeroone/study_tizen
void
screen_reader_cb(void *data, Evas_Object *obj, void *event_info)
{
	Evas_Object *nf = data;
	Evas_Object *list;
	Evas_Object *screen_reader_onoff_check;

	list = elm_list_add(nf);
	elm_list_mode_set(list, ELM_LIST_COMPRESS);
	evas_object_smart_callback_add(list, "selected", list_selected_cb, NULL);
	screen_reader_on = is_screen_reader_running();
	screen_reader_onoff_check = elm_check_add(list);
	elm_object_style_set(screen_reader_onoff_check, "on&off");
	elm_check_state_set(screen_reader_onoff_check, screen_reader_on);
	evas_object_smart_callback_add(screen_reader_onoff_check, "changed", check_changed_cb, NULL);
	evas_object_propagate_events_set(screen_reader_onoff_check, EINA_FALSE);

	elm_list_item_append(list, "UI Descriptions", NULL, NULL, description_cb, nf);
	elm_list_item_append(list, "UI Reading order", NULL, NULL, reading_order_cb, nf);
	elm_list_item_append(list, "Custom Frame", NULL, NULL, custom_frame_cb, nf);

	elm_list_item_prepend(list, "Screen Reader (TTS)", NULL, screen_reader_onoff_check, screen_reader_item_cb,
							screen_reader_onoff_check);

	elm_list_go(list);

	elm_naviframe_item_push(nf, "Screen Reader", NULL, NULL, list, NULL);
}
コード例 #3
0
ファイル: tmsampleapp.cpp プロジェクト: EmuxEvans/iotivity
static void
create_list_view(appdata_s *ad)
{
    Evas_Object *list;
    Evas_Object *btn;
    Evas_Object *nf = ad->nf;
    Elm_Object_Item *nf_it;

    // List
    list = elm_list_add(nf);
    elm_list_mode_set(list, ELM_LIST_COMPRESS);
    evas_object_smart_callback_add(list, "selected", list_selected_cb, NULL);

    // Main Menu Items Here
    elm_list_item_append(list, "Group APIs", NULL, NULL, group_cb, nf);
    elm_list_item_append(list, "Configuration APIs", NULL, NULL, configuration_cb, nf);

    elm_list_go(list);

    // This button is set for devices which doesn't have H/W back key.
    btn = elm_button_add(nf);
    elm_object_style_set(btn, "naviframe/end_btn/default");
    nf_it = elm_naviframe_item_push(nf, "Things Manager", btn, NULL, list, NULL);
    elm_naviframe_item_pop_cb_set(nf_it, naviframe_pop_cb, ad->win);
}
コード例 #4
0
void pfx_cert_install_cb(void *data, Evas_Object *obj, void *event_info) {
    LOGD("pfx_cert_cb");

    struct ug_data *ad = (struct ug_data *) data;
    Evas_Object *list = NULL;

    DIR *dir;
    struct dirent *dp;

    firstListElement = initList();
    lastListElement = firstListElement;

    list = elm_list_add(ad->win_main);
    elm_list_mode_set(list, ELM_LIST_COMPRESS);



    dir = opendir(dir_path);
    if (dir == NULL) {
        LOGE("There's no such directory: %s", dir_path);
        return; //TODO What if there's no SD card?
    }

    LOGD("Scanning dir (%s) - looking for certs", dir_path);
    while ((dp = readdir(dir)) != NULL) {
        char *tmp;
        tmp = path_cat(dir_path, dp->d_name);
        char *dot = strrchr(dp->d_name, '.');

        if(dot != NULL && strlen(dot)>3 && (strncmp(dot, ".pfx", 4) == 0 || strncmp(dot, ".PFX", 4) == 0 ||
                             strncmp(dot, ".p12", 4) == 0 || strncmp(dot, ".P12", 4) == 0)) {
            if (!(dp->d_type == DT_DIR)) {
                Elm_Object_Item * it;
                struct ListElement *current;
                current = addListElement(lastListElement, dp->d_name);
                lastListElement = current;
                it = elm_list_item_append(list, dp->d_name, NULL, NULL, install_pfx_button_cb, current);
                LOGD("elm list append = %s", current->name);
            }
            if (tmp) {
                free(tmp);
                tmp = NULL;
            }
        }
    }
    closedir(dir);

    elm_naviframe_item_push(ad->navi_bar, dgettext(PACKAGE, "CHOOSE_PFX_TO_INSTALL"), NULL, NULL, list, NULL);
}
コード例 #5
0
static Evas_Object *
create_main_list(Evas_Object *parent)
{
	Evas_Object *list = elm_list_add(parent);
	elm_list_mode_set(list, ELM_LIST_COMPRESS);
	elm_list_item_append(list, "2 Items with Title", NULL, NULL, toolbar_2_items_text_style_cb, parent);
	elm_list_item_append(list, "3 Items with Title", NULL, NULL, toolbar_3_items_text_style_cb, parent);
	elm_list_item_append(list, "4 Items with Title", NULL, NULL, toolbar_4_items_text_style_cb, parent);
	elm_list_item_append(list, "Multiple Items with Title", NULL, NULL, scrollable_style_cb, parent);

	elm_list_go(list);
	evas_object_smart_callback_add(list, "selected", list_selected_cb, NULL);

	evas_object_show(list);

	return list;
}
コード例 #6
0
static Evas_Object *
create_artists_list(Evas_Object *parent)
{
	Evas_Object *list = elm_list_add(parent);
	elm_list_mode_set(list, ELM_LIST_COMPRESS);
	elm_list_item_append(list, "Tab Bar", NULL, NULL, NULL, NULL);
	elm_list_item_append(list, "Navigation Bar", NULL, NULL, NULL, NULL);
	elm_list_item_append(list, "Slider", NULL, NULL, NULL, NULL);
	elm_list_item_append(list, "Genlist", NULL, NULL, NULL, NULL);
	elm_list_item_append(list, "Tool Bar", NULL, NULL, NULL, NULL);
	elm_list_item_append(list, "Color Picker", NULL, NULL, NULL, NULL);

	elm_list_go(list);
	evas_object_smart_callback_add(list, "selected", list_selected_cb, NULL);

	evas_object_show(list);

	return list;
}
コード例 #7
0
static Evas_Object *
create_song_list(Evas_Object *parent)
{
	Evas_Object *list = elm_list_add(parent);
	elm_list_mode_set(list, ELM_LIST_COMPRESS);
	elm_list_item_append(list, "Eina", NULL, NULL, NULL, NULL);
	elm_list_item_append(list, "Evas", NULL, NULL, NULL, NULL);
	elm_list_item_append(list, "Ecore", NULL, NULL, NULL, NULL);
	elm_list_item_append(list, "Elementary", NULL, NULL, NULL, NULL);
	elm_list_item_append(list, "Edje", NULL, NULL, NULL, NULL);
	elm_list_item_append(list, "Eet", NULL, NULL, NULL, NULL);

	elm_list_go(list);
	evas_object_smart_callback_add(list, "selected", list_selected_cb, NULL);

	evas_object_show(list);

	return list;
}
コード例 #8
0
static Evas_Object *
create_dialer_list(Evas_Object *parent)
{
	Evas_Object *list = elm_list_add(parent);
	elm_list_mode_set(list, ELM_LIST_COMPRESS);
	elm_list_item_append(list, "Aquila", NULL, NULL, NULL, NULL);
	elm_list_item_append(list, "Pantheon", NULL, NULL, NULL, NULL);
	elm_list_item_append(list, "Kessler", NULL, NULL, NULL, NULL);
	elm_list_item_append(list, "Neptune", NULL, NULL, NULL, NULL);
	elm_list_item_append(list, "Aqua", NULL, NULL, NULL, NULL);
	elm_list_item_append(list, "Beat", NULL, NULL, NULL, NULL);
	elm_list_item_append(list, "NBeat", NULL, NULL, NULL, NULL);
	elm_list_item_append(list, "Tizen", NULL, NULL, NULL, NULL);

	elm_list_go(list);
	evas_object_smart_callback_add(list, "selected", list_selected_cb, NULL);

	evas_object_show(list);

	return list;
}
コード例 #9
0
static Evas_Object* _create_list_winset(Evas_Object* parent, struct appdata* ad)
{
	Evas_Object *li;
	int idx = 0;
	//struct _menu_item *menu_its;
	int ret;
	ret = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_FONT_SIZE, system_settings_changed_font_size, NULL);

	ret = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_FONT_TYPE, system_settings_changed_font_type, NULL);
	if (ret < 0) {
		printf("SYSTEM_SETTINGS_KEY_FONT_TYPE returns negative values = %d \n", ret);
	} else {
		printf("SYSTEM_SETTINGS_KEY_FONT_TYPE returns positive values = %d, means successful return. \n", ret);
	}

	// callback registration
	ret = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_MOTION_ACTIVATION, system_settings_changed_motion_activation, NULL);
	if (ret < 0) {
			printf("SYSTEM_SETTINGS_KEY_MOTION_ACTIVATION returns negative values = %d \n", ret);
	} else {
			printf("SYSTEM_SETTINGS_KEY_MOTION_ACTIVATION returns positive values = %d, means successful return. \n", ret);
	}

	li = elm_list_add(parent);
	elm_list_mode_set(li, ELM_LIST_COMPRESS);

	elm_list_item_append( li, "QUIT", NULL, NULL, list_item_touch_handler_exit, ad);
	elm_list_item_append( li, "font size - bigger ", NULL, NULL, list_item_touch_handler1, ad);
	elm_list_item_append( li, "font size - normal ", NULL, NULL, list_item_touch_handler2, ad);
	elm_list_item_append( li, "font type - choose Helvetica 1 ", NULL, NULL, list_item_touch_handler3, ad);
	elm_list_item_append( li, "font type - choose Helvetica 2 ", NULL, NULL, list_item_touch_handler4, ad);
	elm_list_item_append( li, "motion activation ON ", NULL, NULL, list_item_touch_handler5, ad);
	elm_list_item_append( li, "motion activation OFF ", NULL, NULL, list_item_touch_handler6, ad);

	elm_list_go(li);
	return li;
}
コード例 #10
0
static Evas_Object *
create_play_list(Evas_Object *parent)
{
	Evas_Object *list = elm_list_add(parent);
	elm_list_mode_set(list, ELM_LIST_COMPRESS);
	elm_list_item_append(list, "Music", NULL, NULL, NULL, NULL);
	elm_list_item_append(list, "Message", NULL, NULL, NULL, NULL);
	elm_list_item_append(list, "Call", NULL, NULL, NULL, NULL);
	elm_list_item_append(list, "Memo", NULL, NULL, NULL, NULL);
	elm_list_item_append(list, "Alarm", NULL, NULL, NULL, NULL);
	elm_list_item_append(list, "SNS", NULL, NULL, NULL, NULL);
	elm_list_item_append(list, "Email", NULL, NULL, NULL, NULL);
	elm_list_item_append(list, "Worldclock", NULL, NULL, NULL, NULL);
	elm_list_item_append(list, "Conventer", NULL, NULL, NULL, NULL);
	elm_list_item_append(list, "Stopwatch", NULL, NULL, NULL, NULL);
	elm_list_item_append(list, "Calculator", NULL, NULL, NULL, NULL);

	elm_list_go(list);
	evas_object_smart_callback_add(list, "selected", list_selected_cb, NULL);

	evas_object_show(list);

	return list;
}
コード例 #11
0
ファイル: test_list.c プロジェクト: wjhendr/enlightenment
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;
     }
}