summaryrefslogtreecommitdiff
path: root/src/tests/emotion
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2017-09-15 18:37:25 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-09-18 13:34:50 +0900
commit4c634ed78e0b298f916e4c79a7e222100d0085d2 (patch)
tree9fa8b385d3d8c2445ea94c839fdc38a30eb36f7d /src/tests/emotion
parent8fb194d969ccb9227e56ea60f538d977393408d7 (diff)
efl: Use Eina.Size2D for Efl.Gfx.size
Big patch as a lot of things call or reimplement size_set. Hopefully I got it right... fingers crossed.
Diffstat (limited to 'src/tests/emotion')
-rw-r--r--src/tests/emotion/emotion_test_main-eo.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/tests/emotion/emotion_test_main-eo.c b/src/tests/emotion/emotion_test_main-eo.c
index 9663ab719e..fae86ccaed 100644
--- a/src/tests/emotion/emotion_test_main-eo.c
+++ b/src/tests/emotion/emotion_test_main-eo.c
@@ -76,7 +76,7 @@ static const char *theme_file = NULL;
76static void 76static void
77bg_resize(Evas_Coord w, Evas_Coord h) 77bg_resize(Evas_Coord w, Evas_Coord h)
78{ 78{
79 efl_gfx_size_set(o_bg, w, h); 79 efl_gfx_size_set(o_bg, EINA_SIZE2D(w, h));
80} 80}
81 81
82static void 82static void
@@ -114,7 +114,7 @@ bg_setup(void)
114 o_bg = efl_add(EDJE_OBJECT_CLASS, evas); 114 o_bg = efl_add(EDJE_OBJECT_CLASS, evas);
115 efl_file_set(o_bg, theme_file, "background"); 115 efl_file_set(o_bg, theme_file, "background");
116 efl_gfx_position_set(o_bg, EINA_POSITION2D(0, 0)); 116 efl_gfx_position_set(o_bg, EINA_POSITION2D(0, 0));
117 efl_gfx_size_set(o_bg, startw, starth); 117 efl_gfx_size_set(o_bg, EINA_SIZE2D(startw, starth));
118 efl_gfx_stack_layer_set(o_bg, -999); 118 efl_gfx_stack_layer_set(o_bg, -999);
119 efl_gfx_visible_set(o_bg, EINA_TRUE); 119 efl_gfx_visible_set(o_bg, EINA_TRUE);
120 evas_object_focus_set(o_bg, EINA_TRUE); 120 evas_object_focus_set(o_bg, EINA_TRUE);
@@ -354,7 +354,7 @@ video_obj_frame_resize_cb(void *data, const Efl_Event *event)
354 evas_object_size_hint_min_set(event->object, iw, ih); 354 evas_object_size_hint_min_set(event->object, iw, ih);
355 edje_object_part_swallow(oe, "video_swallow", event->object); 355 edje_object_part_swallow(oe, "video_swallow", event->object);
356 edje_object_size_min_calc(oe, &w, &h); 356 edje_object_size_min_calc(oe, &w, &h);
357 efl_gfx_size_set(oe, w, h); 357 efl_gfx_size_set(oe, EINA_SIZE2D(w, h));
358 evas_object_size_hint_min_set(event->object, 0, 0); 358 evas_object_size_hint_min_set(event->object, 0, 0);
359 edje_object_part_swallow(oe, "video_swallow", event->object); 359 edje_object_part_swallow(oe, "video_swallow", event->object);
360} 360}
@@ -566,11 +566,12 @@ video_obj_signal_frame_move_cb(void *data EINA_UNUSED, Evas_Object *o, const cha
566 } 566 }
567 else if (fd->resizing) 567 else if (fd->resizing)
568 { 568 {
569 Evas_Coord x, y, ow, oh; 569 Evas_Coord x, y;
570 Eina_Size2D sz;
570 571
571 evas_canvas_pointer_canvas_xy_get(evas_object_evas_get(o), &x, &y); 572 evas_canvas_pointer_canvas_xy_get(evas_object_evas_get(o), &x, &y);
572 efl_gfx_size_get(o, &ow, &oh); 573 sz = efl_gfx_size_get(o);
573 evas_object_resize(o, ow + (x - fd->x), oh + (y - fd->y)); 574 evas_object_resize(o, sz.w + (x - fd->x), sz.h + (y - fd->y));
574 fd->x = x; 575 fd->x = x;
575 fd->y = y; 576 fd->y = y;
576 } 577 }
@@ -629,7 +630,7 @@ init_video_object(const char *module_filename, const char *filename)
629 offset = 20 * (eina_list_count(video_objs) - 1); 630 offset = 20 * (eina_list_count(video_objs) - 1);
630 efl_gfx_position_set(oe, EINA_POSITION2D(offset, offset)); 631 efl_gfx_position_set(oe, EINA_POSITION2D(offset, offset));
631 edje_object_size_min_calc(oe, &w, &h); 632 edje_object_size_min_calc(oe, &w, &h);
632 efl_gfx_size_set(oe, w, h); 633 efl_gfx_size_set(oe, EINA_SIZE2D(w, h));
633 634
634 efl_event_callback_array_add(o, emotion_object_test_callbacks(), oe); 635 efl_event_callback_array_add(o, emotion_object_test_callbacks(), oe);
635 636