forked from enlightenment/efl
parent
4e52b7da7f
commit
1fda3f02d2
|
@ -34,7 +34,7 @@ void test_clock(void *data, Evas_Object *obj, void *event_info);
|
||||||
void test_clock2(void *data, Evas_Object *obj, void *event_info);
|
void test_clock2(void *data, Evas_Object *obj, void *event_info);
|
||||||
void test_clock3(void *data, Evas_Object *obj, void *event_info);
|
void test_clock3(void *data, Evas_Object *obj, void *event_info);
|
||||||
void test_check(void *data, Evas_Object *obj, void *event_info);
|
void test_check(void *data, Evas_Object *obj, void *event_info);
|
||||||
void test_check2(void *data, Evas_Object *obj, void *event_info);
|
void test_check_toggle(void *data, Evas_Object *obj, void *event_info);
|
||||||
void test_radio(void *data, Evas_Object *obj, void *event_info);
|
void test_radio(void *data, Evas_Object *obj, void *event_info);
|
||||||
void test_layout(void *data, Evas_Object *obj, void *event_info);
|
void test_layout(void *data, Evas_Object *obj, void *event_info);
|
||||||
void test_layout2(void *data, Evas_Object *obj, void *event_info);
|
void test_layout2(void *data, Evas_Object *obj, void *event_info);
|
||||||
|
@ -505,8 +505,8 @@ add_tests:
|
||||||
ADD_TEST(NULL, "Range Values", "Progressbar", test_progressbar);
|
ADD_TEST(NULL, "Range Values", "Progressbar", test_progressbar);
|
||||||
|
|
||||||
//------------------------------//
|
//------------------------------//
|
||||||
ADD_TEST(NULL, "Booleans", "Checks", test_check);
|
ADD_TEST(NULL, "Booleans", "Check", test_check);
|
||||||
ADD_TEST(NULL, "Booleans", "Checks 2", test_check2);
|
ADD_TEST(NULL, "Booleans", "Check Toggle", test_check_toggle);
|
||||||
|
|
||||||
//------------------------------//
|
//------------------------------//
|
||||||
ADD_TEST(NULL, "Popups", "Ctxpopup", test_ctxpopup);
|
ADD_TEST(NULL, "Popups", "Ctxpopup", test_ctxpopup);
|
||||||
|
|
|
@ -24,18 +24,12 @@ state_changed_cb(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event
|
||||||
void
|
void
|
||||||
test_check(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
test_check(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
||||||
{
|
{
|
||||||
Evas_Object *win, *bg, *bx, *ic, *ck, *ck0;
|
Evas_Object *win, *bx, *ic, *ck, *ck0;
|
||||||
char buf[PATH_MAX];
|
char buf[PATH_MAX];
|
||||||
|
|
||||||
win = elm_win_add(NULL, "checks", ELM_WIN_BASIC);
|
win = elm_win_util_standard_add("check", "Check");
|
||||||
elm_win_title_set(win, "Checks");
|
|
||||||
elm_win_autodel_set(win, EINA_TRUE);
|
elm_win_autodel_set(win, EINA_TRUE);
|
||||||
|
|
||||||
bg = elm_bg_add(win);
|
|
||||||
elm_win_resize_object_add(win, bg);
|
|
||||||
evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
|
||||||
evas_object_show(bg);
|
|
||||||
|
|
||||||
bx = elm_box_add(win);
|
bx = elm_box_add(win);
|
||||||
evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||||
elm_win_resize_object_add(win, bx);
|
elm_win_resize_object_add(win, bx);
|
||||||
|
@ -50,7 +44,7 @@ test_check(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
|
||||||
evas_object_size_hint_align_set(ck, EVAS_HINT_FILL, 0.5);
|
evas_object_size_hint_align_set(ck, EVAS_HINT_FILL, 0.5);
|
||||||
elm_object_text_set(ck, "Icon sized to check");
|
elm_object_text_set(ck, "Icon sized to check");
|
||||||
elm_object_part_content_set(ck, "icon", ic);
|
elm_object_part_content_set(ck, "icon", ic);
|
||||||
elm_check_state_set(ck, 1);
|
elm_check_state_set(ck, EINA_TRUE);
|
||||||
elm_box_pack_end(bx, ck);
|
elm_box_pack_end(bx, ck);
|
||||||
evas_object_show(ck);
|
evas_object_show(ck);
|
||||||
evas_object_show(ic);
|
evas_object_show(ic);
|
||||||
|
@ -60,9 +54,9 @@ test_check(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
|
||||||
ic = elm_icon_add(win);
|
ic = elm_icon_add(win);
|
||||||
snprintf(buf, sizeof(buf), "%s/images/logo_small.png", elm_app_data_dir_get());
|
snprintf(buf, sizeof(buf), "%s/images/logo_small.png", elm_app_data_dir_get());
|
||||||
elm_icon_file_set(ic, buf, NULL);
|
elm_icon_file_set(ic, buf, NULL);
|
||||||
elm_icon_resizable_set(ic, 0, 0);
|
elm_icon_resizable_set(ic, EINA_FALSE, EINA_FALSE);
|
||||||
ck = elm_check_add(win);
|
ck = elm_check_add(win);
|
||||||
elm_object_text_set(ck, "Icon no scale");
|
elm_object_text_set(ck, "Icon not resizable");
|
||||||
elm_object_part_content_set(ck, "icon", ic);
|
elm_object_part_content_set(ck, "icon", ic);
|
||||||
elm_box_pack_end(bx, ck);
|
elm_box_pack_end(bx, ck);
|
||||||
evas_object_show(ck);
|
evas_object_show(ck);
|
||||||
|
@ -76,13 +70,13 @@ test_check(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
|
||||||
evas_object_show(ck);
|
evas_object_show(ck);
|
||||||
|
|
||||||
ck = elm_check_add(win);
|
ck = elm_check_add(win);
|
||||||
elm_object_text_set(ck, "Using State Pointer");
|
elm_object_text_set(ck, "Use State Pointer");
|
||||||
elm_check_state_pointer_set(ck, &eb);
|
elm_check_state_pointer_set(ck, &eb);
|
||||||
elm_box_pack_end(bx, ck);
|
elm_box_pack_end(bx, ck);
|
||||||
evas_object_show(ck);
|
evas_object_show(ck);
|
||||||
|
|
||||||
ck = elm_check_add(win);
|
ck = elm_check_add(win);
|
||||||
elm_object_text_set(ck, "Check State Pointer Value");
|
elm_object_text_set(ck, "Print State Pointer Value");
|
||||||
elm_box_pack_end(bx, ck);
|
elm_box_pack_end(bx, ck);
|
||||||
evas_object_show(ck);
|
evas_object_show(ck);
|
||||||
evas_object_smart_callback_add(ck, "changed", state_changed_cb, NULL);
|
evas_object_smart_callback_add(ck, "changed", state_changed_cb, NULL);
|
||||||
|
@ -96,16 +90,16 @@ test_check(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
|
||||||
evas_object_size_hint_align_set(ck, EVAS_HINT_FILL, 0.5);
|
evas_object_size_hint_align_set(ck, EVAS_HINT_FILL, 0.5);
|
||||||
elm_object_text_set(ck, "Disabled check");
|
elm_object_text_set(ck, "Disabled check");
|
||||||
elm_object_part_content_set(ck, "icon", ic);
|
elm_object_part_content_set(ck, "icon", ic);
|
||||||
elm_check_state_set(ck, 1);
|
elm_check_state_set(ck, EINA_TRUE);
|
||||||
elm_box_pack_end(bx, ck);
|
elm_box_pack_end(bx, ck);
|
||||||
elm_object_disabled_set(ck, 1);
|
elm_object_disabled_set(ck, EINA_TRUE);
|
||||||
evas_object_show(ck);
|
evas_object_show(ck);
|
||||||
evas_object_show(ic);
|
evas_object_show(ic);
|
||||||
|
|
||||||
ic = elm_icon_add(win);
|
ic = elm_icon_add(win);
|
||||||
snprintf(buf, sizeof(buf), "%s/images/logo_small.png", elm_app_data_dir_get());
|
snprintf(buf, sizeof(buf), "%s/images/logo_small.png", elm_app_data_dir_get());
|
||||||
elm_icon_file_set(ic, buf, NULL);
|
elm_icon_file_set(ic, buf, NULL);
|
||||||
elm_icon_resizable_set(ic, 0, 0);
|
elm_icon_resizable_set(ic, EINA_FALSE, EINA_FALSE);
|
||||||
ck = elm_check_add(win);
|
ck = elm_check_add(win);
|
||||||
elm_object_part_content_set(ck, "icon", ic);
|
elm_object_part_content_set(ck, "icon", ic);
|
||||||
elm_box_pack_end(bx, ck);
|
elm_box_pack_end(bx, ck);
|
||||||
|
@ -116,20 +110,14 @@ test_check(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
test_check2(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
test_check_toggle(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
||||||
{
|
{
|
||||||
Evas_Object *win, *bg, *bx, *ic, *tg;
|
Evas_Object *win, *bx, *ic, *tg;
|
||||||
char buf[PATH_MAX];
|
char buf[PATH_MAX];
|
||||||
|
|
||||||
win = elm_win_add(NULL, "check2", ELM_WIN_BASIC);
|
win = elm_win_util_standard_add("check-toggle", "Check Toggle");
|
||||||
elm_win_title_set(win, "Checks 2");
|
|
||||||
elm_win_autodel_set(win, EINA_TRUE);
|
elm_win_autodel_set(win, EINA_TRUE);
|
||||||
|
|
||||||
bg = elm_bg_add(win);
|
|
||||||
elm_win_resize_object_add(win, bg);
|
|
||||||
evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
|
||||||
evas_object_show(bg);
|
|
||||||
|
|
||||||
bx = elm_box_add(win);
|
bx = elm_box_add(win);
|
||||||
evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||||
elm_win_resize_object_add(win, bx);
|
elm_win_resize_object_add(win, bx);
|
||||||
|
@ -156,7 +144,7 @@ test_check2(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
|
||||||
ic = elm_icon_add(win);
|
ic = elm_icon_add(win);
|
||||||
snprintf(buf, sizeof(buf), "%s/images/logo_small.png", elm_app_data_dir_get());
|
snprintf(buf, sizeof(buf), "%s/images/logo_small.png", elm_app_data_dir_get());
|
||||||
elm_icon_file_set(ic, buf, NULL);
|
elm_icon_file_set(ic, buf, NULL);
|
||||||
elm_icon_resizable_set(ic, 0, 0);
|
elm_icon_resizable_set(ic, EINA_FALSE, EINA_FALSE);
|
||||||
|
|
||||||
tg = elm_check_add(win);
|
tg = elm_check_add(win);
|
||||||
elm_object_style_set(tg, "toggle");
|
elm_object_style_set(tg, "toggle");
|
||||||
|
@ -169,11 +157,11 @@ test_check2(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
|
||||||
ic = elm_icon_add(win);
|
ic = elm_icon_add(win);
|
||||||
snprintf(buf, sizeof(buf), "%s/images/logo_small.png", elm_app_data_dir_get());
|
snprintf(buf, sizeof(buf), "%s/images/logo_small.png", elm_app_data_dir_get());
|
||||||
elm_icon_file_set(ic, buf, NULL);
|
elm_icon_file_set(ic, buf, NULL);
|
||||||
elm_icon_resizable_set(ic, 0, 0);
|
elm_icon_resizable_set(ic, EINA_FALSE, EINA_FALSE);
|
||||||
|
|
||||||
tg = elm_check_add(win);
|
tg = elm_check_add(win);
|
||||||
elm_object_style_set(tg, "toggle");
|
elm_object_style_set(tg, "toggle");
|
||||||
elm_object_text_set(tg, "Icon no scale");
|
elm_object_text_set(tg, "Disabled toggle");
|
||||||
elm_object_part_content_set(tg, "icon", ic);
|
elm_object_part_content_set(tg, "icon", ic);
|
||||||
elm_object_disabled_set(tg, EINA_TRUE);
|
elm_object_disabled_set(tg, EINA_TRUE);
|
||||||
elm_box_pack_end(bx, tg);
|
elm_box_pack_end(bx, tg);
|
||||||
|
@ -191,7 +179,7 @@ test_check2(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
|
||||||
ic = elm_icon_add(win);
|
ic = elm_icon_add(win);
|
||||||
snprintf(buf, sizeof(buf), "%s/images/logo_small.png", elm_app_data_dir_get());
|
snprintf(buf, sizeof(buf), "%s/images/logo_small.png", elm_app_data_dir_get());
|
||||||
elm_icon_file_set(ic, buf, NULL);
|
elm_icon_file_set(ic, buf, NULL);
|
||||||
elm_icon_resizable_set(ic, 0, 0);
|
elm_icon_resizable_set(ic, EINA_FALSE, EINA_FALSE);
|
||||||
|
|
||||||
tg = elm_check_add(win);
|
tg = elm_check_add(win);
|
||||||
elm_object_style_set(tg, "toggle");
|
elm_object_style_set(tg, "toggle");
|
||||||
|
|
Loading…
Reference in New Issue