summaryrefslogtreecommitdiff
path: root/src/bin/efl_wl
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2020-03-12 12:15:27 -0400
committerMike Blumenkrantz <zmike@samsung.com>2020-03-12 12:17:07 -0400
commite6573154dcb291dc38099fba1055293b1e7b85d7 (patch)
treec690ee18cf8dc9f578f4345b0877be3b5e671f04 /src/bin/efl_wl
parent798fdfbc70a8160d7ec89a5829c01a0fccb40dd9 (diff)
efl-wl: start conversion to eo
Summary: this converts the main efl-wl object to an eo-based canvas group object Depends on D11465 Reviewers: segfaultxavi, bu5hm4n Reviewed By: bu5hm4n Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D11454
Diffstat (limited to 'src/bin/efl_wl')
-rw-r--r--src/bin/efl_wl/efl_wl_test.c13
-rw-r--r--src/bin/efl_wl/efl_wl_test_stack.c6
-rw-r--r--src/bin/efl_wl/meson.build4
3 files changed, 11 insertions, 12 deletions
diff --git a/src/bin/efl_wl/efl_wl_test.c b/src/bin/efl_wl/efl_wl_test.c
index bf5b2ad4d1..b9f9f6b450 100644
--- a/src/bin/efl_wl/efl_wl_test.c
+++ b/src/bin/efl_wl/efl_wl_test.c
@@ -6,13 +6,12 @@
6 6
7static Evas_Object *win; 7static Evas_Object *win;
8static Eina_Strbuf *buf; 8static Eina_Strbuf *buf;
9static Ecore_Exe *exe; 9static Eo *exe;
10 10
11static Eina_Bool 11static void
12del_handler(void *d EINA_UNUSED, int t EINA_UNUSED, Ecore_Exe_Event_Del *ev) 12del_handler(void *d EINA_UNUSED, const Efl_Event *ev)
13{ 13{
14 if (ev->exe == exe) ecore_main_loop_quit(); 14 if (ev->object == exe) ecore_main_loop_quit();
15 return ECORE_CALLBACK_RENEW;
16} 15}
17 16
18static void 17static void
@@ -25,7 +24,7 @@ static Eina_Bool
25dostuff(void *data) 24dostuff(void *data)
26{ 25{
27 exe = efl_wl_run(data, eina_strbuf_string_get(buf)); 26 exe = efl_wl_run(data, eina_strbuf_string_get(buf));
28 ecore_event_handler_add(ECORE_EXE_EVENT_DEL, (Ecore_Event_Handler_Cb)del_handler, NULL); 27 efl_event_callback_add(exe, EFL_TASK_EVENT_EXIT, del_handler, NULL);
29 evas_object_focus_set(data, 1); 28 evas_object_focus_set(data, 1);
30 return EINA_FALSE; 29 return EINA_FALSE;
31} 30}
@@ -63,7 +62,7 @@ main(int argc, char *argv[])
63 elm_win_autodel_set(win, 1); 62 elm_win_autodel_set(win, 1);
64 elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); 63 elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
65 64
66 o = efl_wl_add(evas_object_evas_get(win)); 65 o = efl_add(EFL_WL_CLASS, win);
67 efl_wl_aspect_set(o, 1); 66 efl_wl_aspect_set(o, 1);
68 efl_wl_minmax_set(o, 1); 67 efl_wl_minmax_set(o, 1);
69 evas_object_size_hint_align_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL); 68 evas_object_size_hint_align_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL);
diff --git a/src/bin/efl_wl/efl_wl_test_stack.c b/src/bin/efl_wl/efl_wl_test_stack.c
index 51cd598984..e6eaa34760 100644
--- a/src/bin/efl_wl/efl_wl_test_stack.c
+++ b/src/bin/efl_wl/efl_wl_test_stack.c
@@ -26,13 +26,13 @@ dostuff(void *data)
26static void 26static void
27prev_clicked(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) 27prev_clicked(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
28{ 28{
29 efl_wl_prev(data); 29 efl_wl_surface_prev(data);
30} 30}
31 31
32static void 32static void
33next_clicked(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) 33next_clicked(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
34{ 34{
35 efl_wl_next(data); 35 efl_wl_surface_next(data);
36} 36}
37 37
38int 38int
@@ -69,7 +69,7 @@ main(int argc, char *argv[])
69 evas_object_show(next); 69 evas_object_show(next);
70 elm_table_pack(o, next, 1, 0, 1, 1); 70 elm_table_pack(o, next, 1, 0, 1, 1);
71 71
72 comp = efl_wl_add(evas_object_evas_get(win)); 72 comp = efl_add(EFL_WL_CLASS, win);
73 evas_object_size_hint_min_set(comp, 640, 480); 73 evas_object_size_hint_min_set(comp, 640, 480);
74 elm_table_pack(o, comp, 0, 1, 2, 1); 74 elm_table_pack(o, comp, 0, 1, 2, 1);
75 evas_object_size_hint_align_set(comp, EVAS_HINT_FILL, EVAS_HINT_FILL); 75 evas_object_size_hint_align_set(comp, EVAS_HINT_FILL, EVAS_HINT_FILL);
diff --git a/src/bin/efl_wl/meson.build b/src/bin/efl_wl/meson.build
index c95cd0e767..dc0f0d248c 100644
--- a/src/bin/efl_wl/meson.build
+++ b/src/bin/efl_wl/meson.build
@@ -1,13 +1,13 @@
1executable('efl_wl_test', 1executable('efl_wl_test',
2 'efl_wl_test.c', 2 'efl_wl_test.c',
3 include_directories : config_dir, 3 include_directories : config_dir,
4 dependencies: [efl_wl, elementary], 4 dependencies: [efl_wl, efl_wl_deps, efl_wl_pub_deps, elementary],
5 install: true, 5 install: true,
6) 6)
7 7
8executable('efl_wl_test_stack', 8executable('efl_wl_test_stack',
9 'efl_wl_test_stack.c', 9 'efl_wl_test_stack.c',
10 include_directories : config_dir, 10 include_directories : config_dir,
11 dependencies: [efl_wl, elementary], 11 dependencies: [efl_wl, efl_wl_deps, efl_wl_pub_deps, elementary],
12 install: true, 12 install: true,
13) 13)