summaryrefslogtreecommitdiff
path: root/src/bin/test_toolbar.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/test_toolbar.c')
-rw-r--r--src/bin/test_toolbar.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/bin/test_toolbar.c b/src/bin/test_toolbar.c
index f247e6a5f..eff88578f 100644
--- a/src/bin/test_toolbar.c
+++ b/src/bin/test_toolbar.c
@@ -6,6 +6,17 @@
6Evas_Object * _focus_autoscroll_mode_frame_create(Evas_Object *parent); 6Evas_Object * _focus_autoscroll_mode_frame_create(Evas_Object *parent);
7 7
8static void 8static void
9_selected_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info)
10{
11 const char *str = elm_object_item_text_get(event_info);
12 printf("item %p is %s.", event_info, (char *)data);
13 if (str)
14 printf(" string is \"%s\"\n", str);
15 else
16 printf("\n");
17}
18
19static void
9_tb_sel1_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) 20_tb_sel1_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
10{ 21{
11 char buf[PATH_MAX]; 22 char buf[PATH_MAX];
@@ -106,6 +117,8 @@ test_toolbar(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_i
106 evas_object_show(bx); 117 evas_object_show(bx);
107 118
108 tb = elm_toolbar_add(win); 119 tb = elm_toolbar_add(win);
120 evas_object_smart_callback_add(tb, "selected", _selected_cb, "selected");
121 evas_object_smart_callback_add(tb, "unselected", _selected_cb, "unselected");
109 elm_toolbar_shrink_mode_set(tb, ELM_TOOLBAR_SHRINK_MENU); 122 elm_toolbar_shrink_mode_set(tb, ELM_TOOLBAR_SHRINK_MENU);
110 evas_object_size_hint_weight_set(tb, 0.0, 0.0); 123 evas_object_size_hint_weight_set(tb, 0.0, 0.0);
111 evas_object_size_hint_align_set(tb, EVAS_HINT_FILL, 0.0); 124 evas_object_size_hint_align_set(tb, EVAS_HINT_FILL, 0.0);