summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Juyung Seo <seojuyung2@gmail.com>2013-11-15 21:18:04 +0900
committerDaniel Juyung Seo <seojuyung2@gmail.com>2013-11-15 21:50:40 +0900
commit075048c2300b69e111dafa63cbbd6f40f114ad83 (patch)
treebba798c56f87ca2d80ab78c4a5d7908bca75f69f /src
parent9e0ce05d0cdbc86e6ad3af88424d2bee1b837b82 (diff)
test_index.c: added index clear example and use activated callback for entry.
Diffstat (limited to 'src')
-rw-r--r--src/bin/test_index.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/bin/test_index.c b/src/bin/test_index.c
index 3cb7be983..2fea0849b 100644
--- a/src/bin/test_index.c
+++ b/src/bin/test_index.c
@@ -323,6 +323,16 @@ _test_index2_it_add(void *data, Evas_Object *obj EINA_UNUSED, void *event_info E
323} 323}
324 324
325static void 325static void
326_test_index2_clear(void *data, Evas_Object *obj EINA_UNUSED,
327 void *event_info EINA_UNUSED)
328{
329 Test_Index2_Elements *gui = data;
330
331 elm_list_clear(gui->lst);
332 elm_index_item_clear(gui->id);
333}
334
335static void
326_test_index2_it_del(void *data, Evas_Object *obj EINA_UNUSED, void *event_info) 336_test_index2_it_del(void *data, Evas_Object *obj EINA_UNUSED, void *event_info)
327{ 337{
328 Test_Index2_Elements *gui = data; 338 Test_Index2_Elements *gui = data;
@@ -391,6 +401,7 @@ test_index2(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_in
391 elm_entry_single_line_set(gui->entry, EINA_TRUE); 401 elm_entry_single_line_set(gui->entry, EINA_TRUE);
392 evas_object_size_hint_weight_set(gui->entry, EVAS_HINT_EXPAND, 0); 402 evas_object_size_hint_weight_set(gui->entry, EVAS_HINT_EXPAND, 0);
393 evas_object_size_hint_fill_set(gui->entry, EVAS_HINT_FILL, EVAS_HINT_FILL); 403 evas_object_size_hint_fill_set(gui->entry, EVAS_HINT_FILL, EVAS_HINT_FILL);
404 evas_object_smart_callback_add(gui->entry, "activated", _test_index2_it_add, gui);
394 elm_box_pack_end(box, gui->entry); 405 elm_box_pack_end(box, gui->entry);
395 evas_object_show(gui->entry); 406 evas_object_show(gui->entry);
396 407
@@ -402,6 +413,14 @@ test_index2(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_in
402 evas_object_smart_callback_add(bt, "clicked", _test_index2_it_add, gui); 413 evas_object_smart_callback_add(bt, "clicked", _test_index2_it_add, gui);
403 evas_object_show(bt); 414 evas_object_show(bt);
404 415
416 bt = elm_button_add(win);
417 elm_object_text_set(bt, "Clear");
418 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0);
419 evas_object_size_hint_fill_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
420 elm_box_pack_end(box, bt);
421 evas_object_smart_callback_add(bt, "clicked", _test_index2_clear, gui);
422 evas_object_show(bt);
423
405 gui->lst = elm_list_add(win); 424 gui->lst = elm_list_add(win);
406 elm_box_pack_end(box, gui->lst); 425 elm_box_pack_end(box, gui->lst);
407 evas_object_size_hint_weight_set(gui->lst, EVAS_HINT_EXPAND, 426 evas_object_size_hint_weight_set(gui->lst, EVAS_HINT_EXPAND,