summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2016-03-16 20:26:34 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2016-03-17 13:55:01 +0900
commitbd860627db6dcb93e92c04f774b7661b84f3acbd (patch)
tree7088fe2a7f026050d85f653ba16b4fb002ec0ccf
parentd1796f9aa678bcb91eeca75096a16ccfb759ad5f (diff)
Examples: Fix usage of evas image apis
-rw-r--r--src/examples/evas3d_map_example.c4
-rw-r--r--src/examples/evas3d_object_on_button_example.c4
-rw-r--r--src/examples/evas3d_scene_on_button_example.c4
-rw-r--r--src/examples/performance/graphical.c2
-rw-r--r--src/examples/performance/performance.c3
-rw-r--r--src/examples/sphere_hunter/evas_3d_sphere_hunter.c4
6 files changed, 10 insertions, 11 deletions
diff --git a/src/examples/evas3d_map_example.c b/src/examples/evas3d_map_example.c
index eefa029a8..5cfb0103b 100644
--- a/src/examples/evas3d_map_example.c
+++ b/src/examples/evas3d_map_example.c
@@ -1156,7 +1156,7 @@ elm_main(int argc, char **argv)
1156 evas_object_show(bg); 1156 evas_object_show(bg);
1157 1157
1158 /* Add an image which shows a scene. */ 1158 /* Add an image which shows a scene. */
1159 image = evas_object_image_filled_add(evas); 1159 image = eo_add(EFL_CANVAS_SCENE3D_CLASS, evas);
1160 evas_object_resize(image, WIDTH, HEIGHT); 1160 evas_object_resize(image, WIDTH, HEIGHT);
1161 evas_object_show(image); 1161 evas_object_show(image);
1162 1162
@@ -1181,7 +1181,7 @@ elm_main(int argc, char **argv)
1181 evas_canvas3d_scene_root_node_set(scene, root_node); 1181 evas_canvas3d_scene_root_node_set(scene, root_node);
1182 evas_canvas3d_scene_camera_node_set(scene, camera_node); 1182 evas_canvas3d_scene_camera_node_set(scene, camera_node);
1183 evas_canvas3d_scene_size_set(scene, WIDTH, HEIGHT); 1183 evas_canvas3d_scene_size_set(scene, WIDTH, HEIGHT);
1184 evas_obj_image_scene_set(image, scene); 1184 efl_canvas_scene3d_set(image, scene);
1185 1185
1186 /* Add a layout for controlers. */ 1186 /* Add a layout for controlers. */
1187 control_layout = elm_layout_add(win); 1187 control_layout = elm_layout_add(win);
diff --git a/src/examples/evas3d_object_on_button_example.c b/src/examples/evas3d_object_on_button_example.c
index 4aff42eb8..842cdfd3a 100644
--- a/src/examples/evas3d_object_on_button_example.c
+++ b/src/examples/evas3d_object_on_button_example.c
@@ -257,7 +257,7 @@ elm_main(int argc, char **argv)
257 evas = evas_object_evas_get(win); 257 evas = evas_object_evas_get(win);
258 258
259 /* Add an image object for 3D scene rendering. */ 259 /* Add an image object for 3D scene rendering. */
260 image = evas_object_image_filled_add(evas); 260 image = eo_add(EFL_CANVAS_SCENE3D_CLASS, evas);
261 efl_gfx_size_set(image, WIDTH, HEIGHT); 261 efl_gfx_size_set(image, WIDTH, HEIGHT);
262 efl_gfx_visible_set(image, EINA_TRUE); 262 efl_gfx_visible_set(image, EINA_TRUE);
263 263
@@ -270,7 +270,7 @@ elm_main(int argc, char **argv)
270 /* Set the image object as render target for 3D scene. */ 270 /* Set the image object as render target for 3D scene. */
271 _scene_setup(&data); 271 _scene_setup(&data);
272 evas_object_focus_set(image, EINA_TRUE); 272 evas_object_focus_set(image, EINA_TRUE);
273 evas_obj_image_scene_set(image, data.scene); 273 efl_canvas_scene3d_set(image, data.scene);
274 274
275 evas_object_event_callback_add(image, EVAS_CALLBACK_MOUSE_DOWN, _stop_scene, &data); 275 evas_object_event_callback_add(image, EVAS_CALLBACK_MOUSE_DOWN, _stop_scene, &data);
276 evas_object_event_callback_add(image, EVAS_CALLBACK_MOUSE_UP, _play_scene, &data); 276 evas_object_event_callback_add(image, EVAS_CALLBACK_MOUSE_UP, _play_scene, &data);
diff --git a/src/examples/evas3d_scene_on_button_example.c b/src/examples/evas3d_scene_on_button_example.c
index 2e1aa5cfa..2aa8a2f79 100644
--- a/src/examples/evas3d_scene_on_button_example.c
+++ b/src/examples/evas3d_scene_on_button_example.c
@@ -250,11 +250,11 @@ elm_main(int argc, char **argv)
250 250
251 _scene_setup(&data); 251 _scene_setup(&data);
252 252
253 image = evas_object_image_filled_add(evas); 253 image = eo_add(EFL_CANVAS_SCENE3D_CLASS, evas);
254 efl_gfx_visible_set(image, EINA_TRUE); 254 efl_gfx_visible_set(image, EINA_TRUE);
255 255
256 /* Set the image object as render target for 3D scene. */ 256 /* Set the image object as render target for 3D scene. */
257 evas_obj_image_scene_set(image, data.scene); 257 efl_canvas_scene3d_set(image, data.scene);
258 258
259 /* Setup scene to the widget button. */ 259 /* Setup scene to the widget button. */
260 btn = elm_button_add(win); 260 btn = elm_button_add(win);
diff --git a/src/examples/performance/graphical.c b/src/examples/performance/graphical.c
index f5aafcf5e..7ca4d4cca 100644
--- a/src/examples/performance/graphical.c
+++ b/src/examples/performance/graphical.c
@@ -609,7 +609,7 @@ init_graphical_window(Evas_Object *img)
609 _init_graphical(); 609 _init_graphical();
610 globalGraphical.evas = evas_object_evas_get(img); 610 globalGraphical.evas = evas_object_evas_get(img);
611 _init_scene(img); 611 _init_scene(img);
612 evas_obj_image_scene_set(img, globalGraphical.scene); 612 efl_canvas_scene3d_set(img, globalGraphical.scene);
613 613
614 return img; 614 return img;
615} 615}
diff --git a/src/examples/performance/performance.c b/src/examples/performance/performance.c
index c1d0ef87d..cdfe6bec9 100644
--- a/src/examples/performance/performance.c
+++ b/src/examples/performance/performance.c
@@ -622,7 +622,7 @@ EAPI_MAIN
622 evas_object_show(startexitbox); 622 evas_object_show(startexitbox);
623 623
624 evas = evas_object_evas_get(win); 624 evas = evas_object_evas_get(win);
625 image = evas_object_image_add(evas); 625 image = eo_add(EFL_CANVAS_SCENE3D_CLASS, evas);
626 626
627 btnstart = elm_button_add(win); 627 btnstart = elm_button_add(win);
628 elm_object_text_set(btnstart, "Apply"); 628 elm_object_text_set(btnstart, "Apply");
@@ -906,7 +906,6 @@ EAPI_MAIN
906 evas_object_show(fs_bt); 906 evas_object_show(fs_bt);
907 evas_object_smart_callback_add(fs_bt, "file,chosen", _load_mesh, NULL); 907 evas_object_smart_callback_add(fs_bt, "file,chosen", _load_mesh, NULL);
908 908
909 evas_object_image_filled_set(image, EINA_TRUE);
910 elm_object_part_content_set(layout, "swallow.content", image); 909 elm_object_part_content_set(layout, "swallow.content", image);
911 evas_object_size_hint_weight_set(image, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); 910 evas_object_size_hint_weight_set(image, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
912 evas_object_size_hint_align_set(image, EVAS_HINT_FILL, EVAS_HINT_FILL); 911 evas_object_size_hint_align_set(image, EVAS_HINT_FILL, EVAS_HINT_FILL);
diff --git a/src/examples/sphere_hunter/evas_3d_sphere_hunter.c b/src/examples/sphere_hunter/evas_3d_sphere_hunter.c
index da6c73cbe..44b5dee15 100644
--- a/src/examples/sphere_hunter/evas_3d_sphere_hunter.c
+++ b/src/examples/sphere_hunter/evas_3d_sphere_hunter.c
@@ -814,9 +814,9 @@ elm_main(int argc, char **argv)
814 814
815 _scene_setup(&data, 10.0, 10); 815 _scene_setup(&data, 10.0, 10);
816 816
817 image = evas_object_image_filled_add(evas); 817 image = eo_add(EFL_CANVAS_SCENE3D_CLASS, evas);
818 efl_gfx_visible_set(image, EINA_TRUE); 818 efl_gfx_visible_set(image, EINA_TRUE);
819 evas_obj_image_scene_set(image, data.scene); 819 efl_canvas_scene3d_set(image, data.scene);
820 820
821 evas_object_size_hint_weight_set(image, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); 821 evas_object_size_hint_weight_set(image, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
822 evas_object_size_hint_align_set(image, EVAS_HINT_FILL, EVAS_HINT_FILL); 822 evas_object_size_hint_align_set(image, EVAS_HINT_FILL, EVAS_HINT_FILL);