diff options
author | Yakov Goldberg <yakov.goldberg@gmail.com> | 2013-01-23 15:05:09 +0000 |
---|---|---|
committer | Yakov Goldberg <yakov.goldberg@gmail.com> | 2013-01-23 15:05:09 +0000 |
commit | faf1579d35c232607a0bfa39b33a185071e843ed (patch) | |
tree | 9bce93c3e50c6b842fe0165ec1fa9f801db4d04d /src/bin/widgets_list_2_grouped.c | |
parent | 42339e1e323b23382e84b5ff781ec8565edeaba8 (diff) |
expedite: porting to Eo
Signed-off-by: Yakov Goldberg <yakov.goldberg@gmail.com>
SVN revision: 83180
Diffstat (limited to 'src/bin/widgets_list_2_grouped.c')
-rw-r--r-- | src/bin/widgets_list_2_grouped.c | 37 |
1 files changed, 19 insertions, 18 deletions
diff --git a/src/bin/widgets_list_2_grouped.c b/src/bin/widgets_list_2_grouped.c index ed3f0a0..4295721 100644 --- a/src/bin/widgets_list_2_grouped.c +++ b/src/bin/widgets_list_2_grouped.c | |||
@@ -62,27 +62,28 @@ static void _setup(void) | |||
62 | Evas_Object *o; | 62 | Evas_Object *o; |
63 | for (i = 0; i < NUM; i++) | 63 | for (i = 0; i < NUM; i++) |
64 | { | 64 | { |
65 | o = evas_object_image_filled_add(evas); | 65 | o = eo_add(EVAS_OBJ_IMAGE_CLASS, evas); |
66 | o_images[i] = o; | 66 | o_images[i] = o; |
67 | evas_object_image_border_set(o, 2, 2, 2, 2); | 67 | eo_do(o, evas_obj_image_filled_set(1), |
68 | evas_object_image_file_set(o, build_path("pan.png"), NULL); | 68 | evas_obj_image_border_set(2, 2, 2, 2), |
69 | evas_object_resize(o, win_w, ICON_SIZE); | 69 | evas_obj_image_file_set(build_path("pan.png"), NULL), |
70 | evas_object_show(o); | 70 | evas_obj_size_set(win_w, ICON_SIZE), |
71 | 71 | evas_obj_visibility_set(EINA_TRUE)); | |
72 | o = evas_object_text_add(evas); | 72 | |
73 | o = eo_add(EVAS_OBJ_TEXT_CLASS, evas); | ||
73 | o_texts[i] = o; | 74 | o_texts[i] = o; |
74 | evas_object_text_font_set(o, "Vera-Bold", 10); | 75 | eo_do(o, evas_obj_text_font_set("Vera-Bold", 10), |
75 | evas_object_text_text_set(o, labels[i % 26]); | 76 | evas_obj_text_text_set(labels[i % 26]), |
76 | evas_object_color_set(o, 0, 0, 0, 255); | 77 | evas_obj_color_set(0, 0, 0, 255), |
77 | evas_object_show(o); | 78 | evas_obj_visibility_set(EINA_TRUE)); |
78 | } | 79 | } |
79 | for (i = 0; i < NUM; i++) | 80 | for (i = 0; i < NUM; i++) |
80 | { | 81 | { |
81 | evas_object_raise(o_images[i]); | 82 | eo_do(o_images[i], evas_obj_raise()); |
82 | } | 83 | } |
83 | for (i = 0; i < NUM; i++) | 84 | for (i = 0; i < NUM; i++) |
84 | { | 85 | { |
85 | evas_object_raise(o_texts[i]); | 86 | eo_do(o_texts[i], evas_obj_raise()); |
86 | } | 87 | } |
87 | done = 0; | 88 | done = 0; |
88 | } | 89 | } |
@@ -91,8 +92,8 @@ static void _setup(void) | |||
91 | static void _cleanup(void) | 92 | static void _cleanup(void) |
92 | { | 93 | { |
93 | int i; | 94 | int i; |
94 | for (i = 0; i < NUM; i++) evas_object_del(o_images[i]); | 95 | for (i = 0; i < NUM; i++) eo_del(o_images[i]); |
95 | for (i = 0; i < NUM; i++) evas_object_del(o_texts[i]); | 96 | for (i = 0; i < NUM; i++) eo_del(o_texts[i]); |
96 | } | 97 | } |
97 | 98 | ||
98 | /* loop - do things */ | 99 | /* loop - do things */ |
@@ -104,10 +105,10 @@ static void _loop(double t, int f) | |||
104 | y = 0 - f; | 105 | y = 0 - f; |
105 | for (i = 0; i < NUM; i++) | 106 | for (i = 0; i < NUM; i++) |
106 | { | 107 | { |
107 | evas_object_move(o_images[i], x, y); | 108 | eo_do(o_images[i], evas_obj_position_set(x, y)); |
108 | evas_object_geometry_get(o_texts[i], NULL, NULL, &tw, &th); | 109 | eo_do(o_texts[i], evas_obj_size_get(&tw, &th)); |
109 | cent = (ICON_SIZE - th) / 2; | 110 | cent = (ICON_SIZE - th) / 2; |
110 | evas_object_move(o_texts[i], x + 8, y + cent); | 111 | eo_do(o_texts[i], evas_obj_position_set(x + 8, y + cent)); |
111 | y += ICON_SIZE; | 112 | y += ICON_SIZE; |
112 | } | 113 | } |
113 | FPS_STD(NAME); | 114 | FPS_STD(NAME); |