summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/bin/efl_wl/efl_wl_test.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/bin/efl_wl/efl_wl_test.c b/src/bin/efl_wl/efl_wl_test.c
index cb50a5d84e..faa4b41ae6 100644
--- a/src/bin/efl_wl/efl_wl_test.c
+++ b/src/bin/efl_wl/efl_wl_test.c
@@ -30,6 +30,16 @@ dostuff(void *data)
30 return EINA_FALSE; 30 return EINA_FALSE;
31} 31}
32 32
33static void
34hints_changed(void *data, Evas *e EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED)
35{
36 int w, h;
37 Evas_Aspect_Control aspect;
38
39 evas_object_size_hint_aspect_get(obj, &aspect, &w, &h);
40 evas_object_size_hint_aspect_set(data, aspect, w, h);
41}
42
33int 43int
34main(int argc, char *argv[]) 44main(int argc, char *argv[])
35{ 45{
@@ -50,8 +60,10 @@ main(int argc, char *argv[])
50 elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); 60 elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
51 61
52 o = efl_wl_add(evas_object_evas_get(win)); 62 o = efl_wl_add(evas_object_evas_get(win));
63 efl_wl_aspect_set(o, 1);
53 evas_object_size_hint_align_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL); 64 evas_object_size_hint_align_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL);
54 evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); 65 evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
66 evas_object_event_callback_add(o, EVAS_CALLBACK_CHANGED_SIZE_HINTS, hints_changed, win);
55 elm_win_resize_object_add(win, o); 67 elm_win_resize_object_add(win, o);
56 evas_object_show(o); 68 evas_object_show(o);
57 evas_object_show(win); 69 evas_object_show(win);