summaryrefslogtreecommitdiff
path: root/src/examples
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2015-02-23 18:46:11 +0100
committerCedric BAIL <cedric@osg.samsung.com>2015-02-23 18:46:11 +0100
commit5c22ae86acb0eb6881588b132b534c3ce8c5dbee (patch)
tree60bd6ce8b30ae11276fb07f5e4a8f5a30ed4043b /src/examples
parent1f9ac72b8e056a8f5df2e2807cb4e3c8317f9fc8 (diff)
eo: fix examples to follow new eo_do syntax.
Diffstat (limited to 'src/examples')
-rw-r--r--src/examples/eo/isa/eo_isa_mixin.c4
-rw-r--r--src/examples/eo/simple/simple_mixin.c4
-rw-r--r--src/examples/evas/evas-3d-moon-space.c8
-rw-r--r--src/examples/evas/evas-object-manipulation-eo.c4
-rw-r--r--src/examples/evas/shooter/evas-3d-shooter.c16
5 files changed, 20 insertions, 16 deletions
diff --git a/src/examples/eo/isa/eo_isa_mixin.c b/src/examples/eo/isa/eo_isa_mixin.c
index 66d501d..601c44e 100644
--- a/src/examples/eo/isa/eo_isa_mixin.c
+++ b/src/examples/eo/isa/eo_isa_mixin.c
@@ -11,7 +11,9 @@
11static int 11static int
12_a_square_get(Eo *obj, void *class_data EINA_UNUSED) 12_a_square_get(Eo *obj, void *class_data EINA_UNUSED)
13{ 13{
14 int a = eo_do(obj, simple_a_get()); 14 int a;
15
16 eo_do(obj, a = simple_a_get());
15 printf("%s %s\n", eo_class_name_get(MY_CLASS), __func__); 17 printf("%s %s\n", eo_class_name_get(MY_CLASS), __func__);
16 return a * a; 18 return a * a;
17} 19}
diff --git a/src/examples/eo/simple/simple_mixin.c b/src/examples/eo/simple/simple_mixin.c
index 9f31880..9173453 100644
--- a/src/examples/eo/simple/simple_mixin.c
+++ b/src/examples/eo/simple/simple_mixin.c
@@ -11,7 +11,9 @@
11static int 11static int
12_a_square_get(Eo *obj, void *class_data EINA_UNUSED) 12_a_square_get(Eo *obj, void *class_data EINA_UNUSED)
13{ 13{
14 int a = eo_do(obj, simple_a_get()); 14 int a;
15
16 eo_do(obj, a = simple_a_get());
15 printf("%s %s\n", eo_class_name_get(MY_CLASS), __func__); 17 printf("%s %s\n", eo_class_name_get(MY_CLASS), __func__);
16 return a * a; 18 return a * a;
17} 19}
diff --git a/src/examples/evas/evas-3d-moon-space.c b/src/examples/evas/evas-3d-moon-space.c
index 9469dbf..0a77a17 100644
--- a/src/examples/evas/evas-3d-moon-space.c
+++ b/src/examples/evas/evas-3d-moon-space.c
@@ -624,13 +624,13 @@ _stop_scene(void *data,
624 d_i = 0; 624 d_i = 0;
625 } 625 }
626 626
627 pick = eo_do(d->scene, 627 eo_do(d->scene,
628 evas_3d_scene_exist(ev->canvas.x, ev->canvas.y, d->mesh_node_planet)); 628 pick = evas_3d_scene_exist(ev->canvas.x, ev->canvas.y, d->mesh_node_planet));
629 629
630 if (pick) d_angle_planet = 0; 630 if (pick) d_angle_planet = 0;
631 631
632 nodes = eo_do(d->root_node, evas_3d_node_member_list_get()); 632 eo_do(d->root_node, nodes = evas_3d_node_member_list_get());
633 picked_nodes = eo_do(d->scene, evas_3d_scene_pick_member_list_get(ev->canvas.x, ev->canvas.y)); 633 eo_do(d->scene, picked_nodes = evas_3d_scene_pick_member_list_get(ev->canvas.x, ev->canvas.y));
634 634
635 root_count = eina_list_count(nodes); 635 root_count = eina_list_count(nodes);
636 picked_count = eina_list_count(picked_nodes); 636 picked_count = eina_list_count(picked_nodes);
diff --git a/src/examples/evas/evas-object-manipulation-eo.c b/src/examples/evas/evas-object-manipulation-eo.c
index e54e282..e594e90 100644
--- a/src/examples/evas/evas-object-manipulation-eo.c
+++ b/src/examples/evas/evas-object-manipulation-eo.c
@@ -126,7 +126,7 @@ _on_keydown(void *data EINA_UNUSED,
126 fprintf(stdout, "Toggling clipping "); 126 fprintf(stdout, "Toggling clipping ");
127 127
128 Evas_Object *clip = NULL; 128 Evas_Object *clip = NULL;
129 clip = eo_do(d.img, evas_obj_clip_get()); 129 eo_do(d.img, clip = evas_obj_clip_get());
130 if (clip == d.clipper) 130 if (clip == d.clipper)
131 { 131 {
132 eo_do(d.img, evas_obj_clip_unset()); 132 eo_do(d.img, evas_obj_clip_unset());
@@ -145,7 +145,7 @@ _on_keydown(void *data EINA_UNUSED,
145 Eina_Bool visibility; 145 Eina_Bool visibility;
146 /* Don't use "get"-"set" expressions in one eo_do call, 146 /* Don't use "get"-"set" expressions in one eo_do call,
147 * if you pass parameter to "set" by value. */ 147 * if you pass parameter to "set" by value. */
148 visibility = eo_do(d.clipper, evas_obj_visibility_get()); 148 eo_do(d.clipper, visibility = evas_obj_visibility_get());
149 eo_do(d.clipper, evas_obj_visibility_set(!visibility)); 149 eo_do(d.clipper, evas_obj_visibility_set(!visibility));
150 fprintf(stdout, "Clipper is now %s\n", visibility ? "hidden" : "visible"); 150 fprintf(stdout, "Clipper is now %s\n", visibility ? "hidden" : "visible");
151 return; 151 return;
diff --git a/src/examples/evas/shooter/evas-3d-shooter.c b/src/examples/evas/shooter/evas-3d-shooter.c
index a3e7e45..13cdc42 100644
--- a/src/examples/evas/shooter/evas-3d-shooter.c
+++ b/src/examples/evas/shooter/evas-3d-shooter.c
@@ -536,13 +536,13 @@ _animate_scene_gun(void *data)
536 /* rocket and gun movement */ 536 /* rocket and gun movement */
537 angle_eagle += d_angle_eagle; 537 angle_eagle += d_angle_eagle;
538 538
539 frame_eagle = eo_do(scene->mesh_node_eagle, 539 eo_do(scene->mesh_node_eagle,
540 evas_3d_node_mesh_frame_get(scene->mesh_eagle)); 540 frame_eagle = evas_3d_node_mesh_frame_get(scene->mesh_eagle));
541 if (frame_eagle > 19500) frame_eagle = 0; 541 if (frame_eagle > 19500) frame_eagle = 0;
542 frame_eagle += 150; 542 frame_eagle += 150;
543 543
544 frame_snake = eo_do(scene->mesh_node_snake, 544 eo_do(scene->mesh_node_snake,
545 evas_3d_node_mesh_frame_get(scene->mesh_snake)); 545 frame_snake = evas_3d_node_mesh_frame_get(scene->mesh_snake));
546 if (frame_snake > 16000) frame_snake = 0; 546 if (frame_snake > 16000) frame_snake = 0;
547 frame_snake += 64; 547 frame_snake += 64;
548 548
@@ -671,8 +671,8 @@ _animate_scene_gun(void *data)
671 } 671 }
672 else if (soldier_mode == 1) 672 else if (soldier_mode == 1)
673 { 673 {
674 frame_soldier = eo_do(scene->mesh_node_soldier, 674 eo_do(scene->mesh_node_soldier,
675 evas_3d_node_mesh_frame_get(scene->mesh_soldier_jump)); 675 frame_soldier = evas_3d_node_mesh_frame_get(scene->mesh_soldier_jump));
676 frame_soldier += 124; 676 frame_soldier += 124;
677 eo_do(scene->mesh_node_soldier, 677 eo_do(scene->mesh_node_soldier,
678 evas_3d_node_mesh_frame_set(scene->mesh_soldier_jump, frame_soldier)); 678 evas_3d_node_mesh_frame_set(scene->mesh_soldier_jump, frame_soldier));
@@ -698,8 +698,8 @@ _animate_scene_gun(void *data)
698 } 698 }
699 else if (camera_move) 699 else if (camera_move)
700 { 700 {
701 frame_soldier = eo_do(scene->mesh_node_soldier, 701 eo_do(scene->mesh_node_soldier,
702 evas_3d_node_mesh_frame_get(scene->mesh_soldier)); 702 frame_soldier = evas_3d_node_mesh_frame_get(scene->mesh_soldier));
703 frame_soldier += 124; 703 frame_soldier += 124;
704 if (frame_soldier > 6200) frame_soldier = 0; 704 if (frame_soldier > 6200) frame_soldier = 0;
705 eo_do(scene->mesh_node_soldier, 705 eo_do(scene->mesh_node_soldier,