summaryrefslogtreecommitdiff
path: root/src/bin
diff options
context:
space:
mode:
authorDaniel Juyung Seo <seojuyung2@gmail.com>2014-09-07 18:46:15 +0900
committerDaniel Juyung Seo <seojuyung2@gmail.com>2014-09-07 18:46:15 +0900
commitcd60679cbddb801b5bb1b905701866911728d27f (patch)
tree08a384bfc3233030de8b7d7396ba15affad808cf /src/bin
parentc3bb1a225703a5c822d6f7a5c7321188d8ba9e67 (diff)
test_genlist: Added 'add more items' button to genlist focus test.
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/test_genlist.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/bin/test_genlist.c b/src/bin/test_genlist.c
index 059a84c89..6a766aba2 100644
--- a/src/bin/test_genlist.c
+++ b/src/bin/test_genlist.c
@@ -4177,6 +4177,30 @@ _dis_btn_cb(void *data, Evas_Object *obj EINA_UNUSED,
4177} 4177}
4178 4178
4179static void 4179static void
4180_add_more_items_btn_cb(void *data, Evas_Object *obj EINA_UNUSED,
4181 void *event_info EINA_UNUSED)
4182{
4183 Elm_Genlist_Item_Class *itc = NULL;
4184 int i = 0;
4185
4186 itc = elm_genlist_item_class_new();
4187 itc->item_style = "default";
4188 itc->func.text_get = gl_text_get;
4189 itc->func.content_get = NULL;
4190 itc->func.state_get = NULL;
4191 itc->func.del = NULL;
4192
4193
4194 for (i = 0; i < 1000; i++)
4195 {
4196 elm_genlist_item_append(data, itc, (void *)(uintptr_t)i,
4197 NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
4198 }
4199
4200 elm_genlist_item_class_free(itc);
4201}
4202
4203static void
4180_focus_button_clicked_cb(void *data, Evas_Object *obj EINA_UNUSED, 4204_focus_button_clicked_cb(void *data, Evas_Object *obj EINA_UNUSED,
4181 void *event_info EINA_UNUSED) 4205 void *event_info EINA_UNUSED)
4182{ 4206{
@@ -4404,6 +4428,15 @@ _test_genlist_focus_option_panel_create(Evas_Object *win, Evas_Object *bx,
4404 elm_box_pack_end(btn_box, btn); 4428 elm_box_pack_end(btn_box, btn);
4405 evas_object_show(btn); 4429 evas_object_show(btn);
4406 evas_object_smart_callback_add(btn, "clicked", _dis_btn_cb, it_0); 4430 evas_object_smart_callback_add(btn, "clicked", _dis_btn_cb, it_0);
4431
4432
4433 btn = elm_button_add(btn_box);
4434 elm_object_text_set(btn, "Add more Genlist items");
4435 evas_object_size_hint_weight_set(btn, 0.0, EVAS_HINT_EXPAND);
4436 evas_object_size_hint_align_set(btn, EVAS_HINT_FILL, EVAS_HINT_FILL);
4437 elm_box_pack_end(btn_box, btn);
4438 evas_object_show(btn);
4439 evas_object_smart_callback_add(btn, "clicked", _add_more_items_btn_cb, gl);
4407} 4440}
4408 4441
4409void 4442void