summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2012-10-25 13:00:32 +0000
committerTom Hacohen <tom@stosb.com>2012-10-25 13:00:32 +0000
commit80c0932f40cd993ea70a19a8ad823de7ff7f4932 (patch)
treeb232ea72315c8d3f7aff400676c695f702209608
parente5468f16c13230d8ef43f7d40d5c39b0c162a016 (diff)
tb_test: When running with edje, gain focus on click.
SVN revision: 78453
-rw-r--r--test.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/test.c b/test.c
index 6561e82..4a475a6 100644
--- a/test.c
+++ b/test.c
@@ -13,6 +13,12 @@ my_win_del(void *data, Evas_Object *obj, void *event_info)
13 elm_exit(); /* exit the program's main loop that runs in elm_run() */ 13 elm_exit(); /* exit the program's main loop that runs in elm_run() */
14} 14}
15 15
16static void
17_edje_tb_mouse_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
18{
19 evas_object_focus_set(data, EINA_TRUE);
20}
21
16static char * 22static char *
17_buf_append(char *buf, const char *str, int *len, int *alloc) 23_buf_append(char *buf, const char *str, int *len, int *alloc)
18{ 24{
@@ -223,7 +229,7 @@ main(int argc, char *argv[])
223 else if (!strcmp(type, "edje")) 229 else if (!strcmp(type, "edje"))
224 { 230 {
225 edje_object_part_text_set(tb, "elm.text", buf); 231 edje_object_part_text_set(tb, "elm.text", buf);
226 evas_object_focus_set(tb, EINA_TRUE); 232 evas_object_event_callback_add(tb, EVAS_CALLBACK_MOUSE_DOWN, _edje_tb_mouse_down_cb, tb);
227 } 233 }
228 else if (!strcmp(type, "elm")) 234 else if (!strcmp(type, "elm"))
229 { 235 {