summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2016-03-03 10:10:20 +0000
committerTom Hacohen <tom@stosb.com>2016-03-03 10:10:20 +0000
commit7b3fa8abc46ca049f2ddb335ba33d2d8f32cf963 (patch)
treeedec8487efc725694830b102b9c896c9fb01e00d
parent36669f1eccc3b6c320fb4c4ecc0e029b95834f57 (diff)
parent02e87e89af529cf4fb9146dda736f3c4995dd7a7 (diff)
Migrate elementary to the new Eo4 syntax
Eo's syntax has changed (see efl.git for more info), this adjusts elementary accordingly. This is a merge commit that merges my branch will all of the fixes
-rw-r--r--src/bin/test_anim.c2
-rw-r--r--src/bin/test_application_server.c55
-rw-r--r--src/bin/test_entry.c14
-rw-r--r--src/bin/test_systray.c14
-rw-r--r--src/bin/test_task_switcher.c54
-rw-r--r--src/bin/test_win_plug.c2
-rw-r--r--src/examples/evas3d_map_example.c244
-rw-r--r--src/examples/evas3d_object_on_button_example.c131
-rw-r--r--src/examples/evas3d_scene_on_button_example.c126
-rw-r--r--src/examples/filemvc.c46
-rw-r--r--src/examples/fileviewlist.c13
-rw-r--r--src/examples/performance/camera_light.c18
-rw-r--r--src/examples/performance/graphical.c270
-rw-r--r--src/examples/performance/performance.c33
-rw-r--r--src/examples/sphere_hunter/evas_3d_sphere_hunter.c270
-rw-r--r--src/lib/elc_combobox.c71
-rw-r--r--src/lib/elc_ctxpopup.c52
-rw-r--r--src/lib/elc_fileselector.c199
-rw-r--r--src/lib/elc_fileselector_button.c49
-rw-r--r--src/lib/elc_fileselector_entry.c62
-rw-r--r--src/lib/elc_hoversel.c69
-rw-r--r--src/lib/elc_multibuttonentry.c97
-rw-r--r--src/lib/elc_naviframe.c89
-rw-r--r--src/lib/elc_player.c57
-rw-r--r--src/lib/elc_popup.c115
-rw-r--r--src/lib/elm_access.c7
-rw-r--r--src/lib/elm_actionslider.c83
-rw-r--r--src/lib/elm_app_client.c30
-rw-r--r--src/lib/elm_app_client_view.c39
-rw-r--r--src/lib/elm_app_server.c43
-rw-r--r--src/lib/elm_app_server_view.c32
-rw-r--r--src/lib/elm_atspi_app_object.c4
-rw-r--r--src/lib/elm_atspi_bridge.c237
-rw-r--r--src/lib/elm_bg.c18
-rw-r--r--src/lib/elm_box.c45
-rw-r--r--src/lib/elm_bubble.c17
-rw-r--r--src/lib/elm_button.c41
-rw-r--r--src/lib/elm_calendar.c21
-rw-r--r--src/lib/elm_check.c31
-rw-r--r--src/lib/elm_clock.c19
-rw-r--r--src/lib/elm_cnp.c32
-rw-r--r--src/lib/elm_color_class.c12
-rw-r--r--src/lib/elm_colorselector.c84
-rw-r--r--src/lib/elm_conform.c49
-rw-r--r--src/lib/elm_datetime.c29
-rw-r--r--src/lib/elm_dayselector.c34
-rw-r--r--src/lib/elm_dbus_menu.c4
-rw-r--r--src/lib/elm_diskselector.c124
-rw-r--r--src/lib/elm_entry.c291
-rw-r--r--src/lib/elm_flip.c29
-rw-r--r--src/lib/elm_flipselector.c35
-rw-r--r--src/lib/elm_frame.c26
-rw-r--r--src/lib/elm_gengrid.c382
-rw-r--r--src/lib/elm_genlist.c525
-rw-r--r--src/lib/elm_gesture_layer.c10
-rw-r--r--src/lib/elm_glview.c23
-rw-r--r--src/lib/elm_grid.c15
-rw-r--r--src/lib/elm_helper.h4
-rw-r--r--src/lib/elm_hover.c69
-rw-r--r--src/lib/elm_icon.c35
-rw-r--r--src/lib/elm_image.c103
-rw-r--r--src/lib/elm_index.c75
-rw-r--r--src/lib/elm_interface_atspi_accessible.c30
-rw-r--r--src/lib/elm_interface_atspi_accessible.h24
-rw-r--r--src/lib/elm_interface_atspi_action.c2
-rw-r--r--src/lib/elm_interface_atspi_component.c18
-rw-r--r--src/lib/elm_interface_atspi_image.c10
-rw-r--r--src/lib/elm_interface_atspi_widget_action.c8
-rw-r--r--src/lib/elm_interface_atspi_window.h14
-rw-r--r--src/lib/elm_interface_scrollable.c331
-rw-r--r--src/lib/elm_inwin.c17
-rw-r--r--src/lib/elm_label.c21
-rw-r--r--src/lib/elm_layout.c80
-rw-r--r--src/lib/elm_list.c184
-rw-r--r--src/lib/elm_main.c17
-rw-r--r--src/lib/elm_map.c191
-rw-r--r--src/lib/elm_mapbuf.c23
-rw-r--r--src/lib/elm_menu.c101
-rw-r--r--src/lib/elm_notify.c35
-rw-r--r--src/lib/elm_panel.c167
-rw-r--r--src/lib/elm_panes.c23
-rw-r--r--src/lib/elm_photo.c30
-rw-r--r--src/lib/elm_photocam.c226
-rw-r--r--src/lib/elm_plug.c21
-rw-r--r--src/lib/elm_prefs.c42
-rw-r--r--src/lib/elm_progressbar.c27
-rw-r--r--src/lib/elm_radio.c23
-rw-r--r--src/lib/elm_route.c11
-rw-r--r--src/lib/elm_scroller.c284
-rw-r--r--src/lib/elm_segment_control.c39
-rw-r--r--src/lib/elm_separator.c13
-rw-r--r--src/lib/elm_slider.c39
-rw-r--r--src/lib/elm_slideshow.c33
-rw-r--r--src/lib/elm_spinner.c54
-rw-r--r--src/lib/elm_store.c15
-rw-r--r--src/lib/elm_sys_notify.c28
-rw-r--r--src/lib/elm_sys_notify_dbus.c4
-rw-r--r--src/lib/elm_table.c21
-rw-r--r--src/lib/elm_thumb.c51
-rw-r--r--src/lib/elm_toolbar.c194
-rw-r--r--src/lib/elm_video.c20
-rw-r--r--src/lib/elm_view_form.c16
-rw-r--r--src/lib/elm_view_list.c55
-rw-r--r--src/lib/elm_web2.c59
-rw-r--r--src/lib/elm_widget.c229
-rw-r--r--src/lib/elm_widget.h9
-rw-r--r--src/lib/elm_win.c144
-rw-r--r--src/lib/elm_win_standard.c8
-rw-r--r--src/modules/datetime_input_ctxpopup/datetime_input_ctxpopup.c16
-rw-r--r--src/modules/prefs/elm_button.c4
-rw-r--r--src/modules/prefs/elm_check.c4
-rw-r--r--src/modules/prefs/elm_datetime.c4
-rw-r--r--src/modules/prefs/elm_entry.c8
-rw-r--r--src/modules/prefs/elm_slider.c4
-rw-r--r--src/modules/prefs/elm_spinner.c4
-rw-r--r--src/tests/elm_test_actionslider.c2
-rw-r--r--src/tests/elm_test_atspi.c104
-rw-r--r--src/tests/elm_test_box.c2
-rw-r--r--src/tests/elm_test_bubble.c2
-rw-r--r--src/tests/elm_test_button.c2
-rw-r--r--src/tests/elm_test_calendar.c2
-rw-r--r--src/tests/elm_test_check.c2
-rw-r--r--src/tests/elm_test_clock.c2
-rw-r--r--src/tests/elm_test_colorselector.c2
-rw-r--r--src/tests/elm_test_conformant.c2
-rw-r--r--src/tests/elm_test_ctxpopup.c2
-rw-r--r--src/tests/elm_test_datetime.c2
-rw-r--r--src/tests/elm_test_dayselector.c2
-rw-r--r--src/tests/elm_test_diskselector.c2
-rw-r--r--src/tests/elm_test_entry.c68
-rw-r--r--src/tests/elm_test_fileselector.c2
-rw-r--r--src/tests/elm_test_fileselector_button.c2
-rw-r--r--src/tests/elm_test_fileselector_entry.c2
-rw-r--r--src/tests/elm_test_flip.c2
-rw-r--r--src/tests/elm_test_flipselector.c2
-rw-r--r--src/tests/elm_test_frame.c2
-rw-r--r--src/tests/elm_test_gengrid.c4
-rw-r--r--src/tests/elm_test_genlist.c14
-rw-r--r--src/tests/elm_test_glview.c2
-rw-r--r--src/tests/elm_test_grid.c2
-rw-r--r--src/tests/elm_test_hover.c2
-rw-r--r--src/tests/elm_test_hoversel.c2
-rw-r--r--src/tests/elm_test_icon.c2
-rw-r--r--src/tests/elm_test_image.c33
-rw-r--r--src/tests/elm_test_index.c2
-rw-r--r--src/tests/elm_test_inwin.c2
-rw-r--r--src/tests/elm_test_label.c2
-rw-r--r--src/tests/elm_test_layout.c2
-rw-r--r--src/tests/elm_test_list.c28
-rw-r--r--src/tests/elm_test_map.c2
-rw-r--r--src/tests/elm_test_mapbuf.c2
-rw-r--r--src/tests/elm_test_menu.c2
-rw-r--r--src/tests/elm_test_multibuttonentry.c2
-rw-r--r--src/tests/elm_test_naviframe.c2
-rw-r--r--src/tests/elm_test_notify.c2
-rw-r--r--src/tests/elm_test_panel.c2
-rw-r--r--src/tests/elm_test_panes.c2
-rw-r--r--src/tests/elm_test_photo.c2
-rw-r--r--src/tests/elm_test_photocam.c2
-rw-r--r--src/tests/elm_test_player.c2
-rw-r--r--src/tests/elm_test_plug.c2
-rw-r--r--src/tests/elm_test_popup.c2
-rw-r--r--src/tests/elm_test_prefs.c2
-rw-r--r--src/tests/elm_test_progressbar.c2
-rw-r--r--src/tests/elm_test_radio.c2
-rw-r--r--src/tests/elm_test_scroller.c2
-rw-r--r--src/tests/elm_test_segmentcontrol.c2
-rw-r--r--src/tests/elm_test_separator.c2
-rw-r--r--src/tests/elm_test_slider.c2
-rw-r--r--src/tests/elm_test_slideshow.c2
-rw-r--r--src/tests/elm_test_spinner.c2
-rw-r--r--src/tests/elm_test_table.c2
-rw-r--r--src/tests/elm_test_thumb.c2
-rw-r--r--src/tests/elm_test_toolbar.c2
-rw-r--r--src/tests/elm_test_video.c2
-rw-r--r--src/tests/elm_test_web.c2
-rw-r--r--src/tests/elm_test_win.c26
177 files changed, 3815 insertions, 4416 deletions
diff --git a/src/bin/test_anim.c b/src/bin/test_anim.c
index 8f2428155..a688a1961 100644
--- a/src/bin/test_anim.c
+++ b/src/bin/test_anim.c
@@ -93,5 +93,5 @@ test_anim(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info
93 evas_object_resize(win, 480, 800); 93 evas_object_resize(win, 480, 800);
94 evas_object_show(win); 94 evas_object_show(win);
95 95
96 eo_do(win, eo_event_callback_add(EFL_CORE_ANIMATOR_EVENT_ANIMATOR_TICK, _anim_tick, NULL)); 96 eo_event_callback_add(win, EFL_CORE_ANIMATOR_EVENT_ANIMATOR_TICK, _anim_tick, NULL);
97} 97}
diff --git a/src/bin/test_application_server.c b/src/bin/test_application_server.c
index 0d7874e6b..1272ff619 100644
--- a/src/bin/test_application_server.c
+++ b/src/bin/test_application_server.c
@@ -66,7 +66,7 @@ _resume_cb(void *data, const Eo_Event *event)
66 if (!ctx->win) 66 if (!ctx->win)
67 { 67 {
68 _window_create(ctx); 68 _window_create(ctx);
69 eo_do(event->obj, elm_app_server_view_window_set(ctx->win)); 69 elm_app_server_view_window_set(event->obj, ctx->win);
70 } 70 }
71 71
72 _text_update(ctx, "alive"); 72 _text_update(ctx, "alive");
@@ -80,7 +80,7 @@ _view_del_cb(void *data, const Eo_Event *event)
80 80
81 if (ctx->win) 81 if (ctx->win)
82 evas_object_del(ctx->win); 82 evas_object_del(ctx->win);
83 eo_do(event->obj, elm_app_server_view_window_set(NULL)); 83 elm_app_server_view_window_set(event->obj, NULL);
84 eina_stringshare_del(ctx->view_name); 84 eina_stringshare_del(ctx->view_name);
85 free(ctx); 85 free(ctx);
86 return EINA_TRUE; 86 return EINA_TRUE;
@@ -100,23 +100,22 @@ _create_view_cb(Elm_App_Server *app_server, const Eina_Value *args EINA_UNUSED,
100 return NULL; 100 return NULL;
101 } 101 }
102 102
103 view = eo_add(ELM_APP_SERVER_VIEW_CLASS, app_server, 103 view = eo_add(ELM_APP_SERVER_VIEW_CLASS, app_server, elm_app_server_view_id_set(eoid, NULL));
104 elm_app_server_view_id_set(NULL));
105 104
106 eo_do(view, id = elm_app_server_view_id_get()); 105 id = elm_app_server_view_id_get(view);
107 eo_do(app_server, pkg = elm_app_server_package_get()); 106 pkg = elm_app_server_package_get(app_server);
108 ctx->view_name = eina_stringshare_printf("%s %s", pkg, id); 107 ctx->view_name = eina_stringshare_printf("%s %s", pkg, id);
109 108
110 _window_create(ctx); 109 _window_create(ctx);
111 110
112 eo_do(view, elm_app_server_view_title_set(ctx->view_name), 111 elm_app_server_view_title_set(view, ctx->view_name);
113 elm_app_server_view_new_events_set(5), 112 elm_app_server_view_new_events_set(view, 5);
114 elm_app_server_view_window_set(ctx->win), 113 elm_app_server_view_window_set(view, ctx->win);
115 elm_app_server_view_resume(), 114 elm_app_server_view_resume(view);
116 eo_event_callback_add(ELM_APP_SERVER_VIEW_EVENT_CLOSED, _close_cb, ctx), 115 eo_event_callback_add(view, ELM_APP_SERVER_VIEW_EVENT_CLOSED, _close_cb, ctx);
117 eo_event_callback_add(ELM_APP_SERVER_VIEW_EVENT_PAUSED, _pause_cb, ctx), 116 eo_event_callback_add(view, ELM_APP_SERVER_VIEW_EVENT_PAUSED, _pause_cb, ctx);
118 eo_event_callback_add(ELM_APP_SERVER_VIEW_EVENT_RESUMED, _resume_cb, ctx), 117 eo_event_callback_add(view, ELM_APP_SERVER_VIEW_EVENT_RESUMED, _resume_cb, ctx);
119 eo_event_callback_add(EO_BASE_EVENT_DEL, _view_del_cb, ctx)); 118 eo_event_callback_add(view, EO_BASE_EVENT_DEL, _view_del_cb, ctx);
120 119
121 return view; 120 return view;
122} 121}
@@ -127,8 +126,8 @@ _terminate_cb(void *data EINA_UNUSED, const Eo_Event *event)
127 const char *title = NULL; 126 const char *title = NULL;
128 127
129 printf("terminate cb\n"); 128 printf("terminate cb\n");
130 eo_do(event->obj, elm_app_server_save(), 129 elm_app_server_save(event->obj);
131 title = elm_app_server_title_get()); 130 title = elm_app_server_title_get(event->obj);
132 131
133 printf("Closing: %s\n", title); 132 printf("Closing: %s\n", title);
134 eo_unref(event->obj); 133 eo_unref(event->obj);
@@ -142,11 +141,10 @@ test_application_server_common(const char *pkg)
142 Elm_App_Server_View *view; 141 Elm_App_Server_View *view;
143 Elm_App_Server *server; 142 Elm_App_Server *server;
144 143
145 server = eo_add(ELM_APP_SERVER_CLASS, NULL, 144 server = eo_add(ELM_APP_SERVER_CLASS, NULL, elm_app_server_constructor(eoid, pkg, _create_view_cb));
146 elm_app_server_constructor(pkg, _create_view_cb)); 145 elm_app_server_title_set(server, pkg);
147 eo_do(server, elm_app_server_title_set(pkg), 146 views_iter = elm_app_server_views_get(server);
148 views_iter = elm_app_server_views_get(), 147 eo_event_callback_add(server, ELM_APP_SERVER_EVENT_TERMINATE, _terminate_cb, NULL);
149 eo_event_callback_add(ELM_APP_SERVER_EVENT_TERMINATE, _terminate_cb, NULL));
150 148
151 //views create in shallow state 149 //views create in shallow state
152 EINA_ITERATOR_FOREACH(views_iter, view) 150 EINA_ITERATOR_FOREACH(views_iter, view)
@@ -156,14 +154,13 @@ test_application_server_common(const char *pkg)
156 154
157 ctx = calloc(1, sizeof(App_View_Context)); 155 ctx = calloc(1, sizeof(App_View_Context));
158 156
159 eo_do(view, id = elm_app_server_view_id_get()); 157 id = elm_app_server_view_id_get(view);
160 ctx->view_name = eina_stringshare_printf("%s %s", pkg, id); 158 ctx->view_name = eina_stringshare_printf("%s %s", pkg, id);
161 159
162 eo_do(view, 160 eo_event_callback_add(view, ELM_APP_SERVER_VIEW_EVENT_CLOSED, _close_cb, ctx);
163 eo_event_callback_add(ELM_APP_SERVER_VIEW_EVENT_CLOSED, _close_cb, ctx), 161 eo_event_callback_add(view, ELM_APP_SERVER_VIEW_EVENT_PAUSED, _pause_cb, ctx);
164 eo_event_callback_add(ELM_APP_SERVER_VIEW_EVENT_PAUSED, _pause_cb, ctx), 162 eo_event_callback_add(view, ELM_APP_SERVER_VIEW_EVENT_RESUMED, _resume_cb, ctx);
165 eo_event_callback_add(ELM_APP_SERVER_VIEW_EVENT_RESUMED, _resume_cb, ctx), 163 eo_event_callback_add(view, EO_BASE_EVENT_DEL, _view_del_cb, ctx);
166 eo_event_callback_add(EO_BASE_EVENT_DEL, _view_del_cb, ctx));
167 } 164 }
168 eina_iterator_free(views_iter); 165 eina_iterator_free(views_iter);
169 166
@@ -190,7 +187,7 @@ test_application_server_phone(void *data EINA_UNUSED,
190 } 187 }
191 printf("Starting phone\n"); 188 printf("Starting phone\n");
192 phone_server = test_application_server_common("org.enlightenment.phone"); 189 phone_server = test_application_server_common("org.enlightenment.phone");
193 eo_do(phone_server, eo_event_callback_add(EO_BASE_EVENT_DEL, _server_del_cb, &phone_server)); 190 eo_event_callback_add(phone_server, EO_BASE_EVENT_DEL, _server_del_cb, &phone_server);
194} 191}
195 192
196void 193void
@@ -205,5 +202,5 @@ test_application_server_message(void *data EINA_UNUSED,
205 } 202 }
206 printf("Starting message\n"); 203 printf("Starting message\n");
207 msg_server = test_application_server_common( "org.enlightenment.message"); 204 msg_server = test_application_server_common( "org.enlightenment.message");
208 eo_do(msg_server, eo_event_callback_add(EO_BASE_EVENT_DEL, _server_del_cb, &msg_server)); 205 eo_event_callback_add(msg_server, EO_BASE_EVENT_DEL, _server_del_cb, &msg_server);
209} 206}
diff --git a/src/bin/test_entry.c b/src/bin/test_entry.c
index b92f933df..1a56d000e 100644
--- a/src/bin/test_entry.c
+++ b/src/bin/test_entry.c
@@ -573,7 +573,7 @@ test_entry_scrolled(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *
573 evas_object_smart_callback_add(en, "anchor,clicked", scrolled_anchor_test, en); 573 evas_object_smart_callback_add(en, "anchor,clicked", scrolled_anchor_test, en);
574 evas_object_show(en); 574 evas_object_show(en);
575 elm_box_pack_end(bx, en); 575 elm_box_pack_end(bx, en);
576 eo_do(en, eo_event_callback_add(ELM_ENTRY_EVENT_CONTEXT_OPEN, _context_menu_show_cb, NULL)); 576 eo_event_callback_add(en, ELM_ENTRY_EVENT_CONTEXT_OPEN, _context_menu_show_cb, NULL);
577 577
578 bx2 = elm_box_add(win); 578 bx2 = elm_box_add(win);
579 elm_box_horizontal_set(bx2, EINA_TRUE); 579 elm_box_horizontal_set(bx2, EINA_TRUE);
@@ -2438,8 +2438,8 @@ _test_regex_bt_cb(void *data,
2438 2438
2439 if (test_data->re) 2439 if (test_data->re)
2440 { 2440 {
2441 eo_do(test_data->en_single, eo_event_callback_del(ELM_ENTRY_EVENT_VALIDATE, elm_validator_regexp_helper, test_data->re)); 2441 eo_event_callback_del(test_data->en_single, ELM_ENTRY_EVENT_VALIDATE, elm_validator_regexp_helper, test_data->re);
2442 eo_do(test_data->en_multi, eo_event_callback_del(ELM_ENTRY_EVENT_VALIDATE, elm_validator_regexp_helper, test_data->re)); 2442 eo_event_callback_del(test_data->en_multi, ELM_ENTRY_EVENT_VALIDATE, elm_validator_regexp_helper, test_data->re);
2443 elm_validator_regexp_free(test_data->re); 2443 elm_validator_regexp_free(test_data->re);
2444 } 2444 }
2445 test_data->re = elm_validator_regexp_new(elm_entry_entry_get(test_data->en_regex), NULL); 2445 test_data->re = elm_validator_regexp_new(elm_entry_entry_get(test_data->en_regex), NULL);
@@ -2463,8 +2463,8 @@ _test_regex_bt_cb(void *data,
2463 } 2463 }
2464 if (!status) 2464 if (!status)
2465 { 2465 {
2466 eo_do(test_data->en_single, eo_event_callback_add(ELM_ENTRY_EVENT_VALIDATE, elm_validator_regexp_helper, test_data->re)); 2466 eo_event_callback_add(test_data->en_single, ELM_ENTRY_EVENT_VALIDATE, elm_validator_regexp_helper, test_data->re);
2467 eo_do(test_data->en_multi, eo_event_callback_add(ELM_ENTRY_EVENT_VALIDATE, elm_validator_regexp_helper, test_data->re)); 2467 eo_event_callback_add(test_data->en_multi, ELM_ENTRY_EVENT_VALIDATE, elm_validator_regexp_helper, test_data->re);
2468 } 2468 }
2469 2469
2470 elm_object_text_set(test_data->lb_regex, eina_strbuf_string_get(tmp)); 2470 elm_object_text_set(test_data->lb_regex, eina_strbuf_string_get(tmp));
@@ -2563,8 +2563,8 @@ test_entry_regex(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *eve
2563 2563
2564 test_data->re = elm_validator_regexp_new(REGEX, NULL); 2564 test_data->re = elm_validator_regexp_new(REGEX, NULL);
2565 elm_entry_entry_set(test_data->en_regex, REGEX); 2565 elm_entry_entry_set(test_data->en_regex, REGEX);
2566 eo_do(test_data->en_single, eo_event_callback_add(ELM_ENTRY_EVENT_VALIDATE, elm_validator_regexp_helper, test_data->re)); 2566 eo_event_callback_add(test_data->en_single, ELM_ENTRY_EVENT_VALIDATE, elm_validator_regexp_helper, test_data->re);
2567 eo_do(test_data->en_multi, eo_event_callback_add(ELM_ENTRY_EVENT_VALIDATE, elm_validator_regexp_helper, test_data->re)); 2567 eo_event_callback_add(test_data->en_multi, ELM_ENTRY_EVENT_VALIDATE, elm_validator_regexp_helper, test_data->re);
2568 2568
2569 evas_object_resize(win, 400, 400); 2569 evas_object_resize(win, 400, 400);
2570 evas_object_show(win); 2570 evas_object_show(win);
diff --git a/src/bin/test_systray.c b/src/bin/test_systray.c
index 4efe8d685..1271242d5 100644
--- a/src/bin/test_systray.c
+++ b/src/bin/test_systray.c
@@ -20,7 +20,7 @@ _ev_handler(void *data EINA_UNUSED,
20 20
21 printf("systray ready event\n"); 21 printf("systray ready event\n");
22 22
23 eo_do(item, ret = elm_obj_systray_register()); 23 ret = elm_obj_systray_register(item);
24 24
25 printf("Item Registration: "); 25 printf("Item Registration: ");
26 if (ret) 26 if (ret)
@@ -36,8 +36,8 @@ _bt_clicked(void *data EINA_UNUSED,
36 Evas_Object *obj EINA_UNUSED, 36 Evas_Object *obj EINA_UNUSED,
37 void *event_info EINA_UNUSED) 37 void *event_info EINA_UNUSED)
38{ 38{
39 eo_do(item, elm_obj_systray_icon_name_set(elm_entry_entry_get(i))); 39 elm_obj_systray_icon_name_set(item, elm_entry_entry_get(i));
40 eo_do(item, elm_obj_systray_att_icon_name_set(elm_entry_entry_get(ai))); 40 elm_obj_systray_att_icon_name_set(item, elm_entry_entry_get(ai));
41} 41}
42 42
43static void 43static void
@@ -45,7 +45,7 @@ static void
45 Evas_Object *obj EINA_UNUSED, 45 Evas_Object *obj EINA_UNUSED,
46 void *event_info EINA_UNUSED) 46 void *event_info EINA_UNUSED)
47{ 47{
48 eo_do(item, elm_obj_systray_status_set(elm_radio_value_get(r))); 48 elm_obj_systray_status_set(item, elm_radio_value_get(r));
49} 49}
50 50
51static void 51static void
@@ -83,9 +83,9 @@ test_systray(void *data EINA_UNUSED,
83 83
84 // Status Notifier Item Handler 84 // Status Notifier Item Handler
85 item = eo_add(ELM_SYSTRAY_CLASS, win); 85 item = eo_add(ELM_SYSTRAY_CLASS, win);
86 eo_do(item, elm_obj_systray_icon_name_set("elementary")); 86 elm_obj_systray_icon_name_set(item, "elementary");
87 eo_do(item, elm_obj_systray_att_icon_name_set("elementary")); 87 elm_obj_systray_att_icon_name_set(item, "elementary");
88 eo_do(item, elm_obj_systray_menu_set(it)); 88 elm_obj_systray_menu_set(item, it);
89 89
90 it = elm_bg_add(win); 90 it = elm_bg_add(win);
91 elm_win_resize_object_add(win, it); 91 elm_win_resize_object_add(win, it);
diff --git a/src/bin/test_task_switcher.c b/src/bin/test_task_switcher.c
index 535e88e09..1c2b441dd 100644
--- a/src/bin/test_task_switcher.c
+++ b/src/bin/test_task_switcher.c
@@ -18,19 +18,19 @@ static void _apps_list_update(void);
18static void _btn_close_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) 18static void _btn_close_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
19{ 19{
20 Elm_App_Client_View *view = data; 20 Elm_App_Client_View *view = data;
21 eo_do(view, elm_app_client_view_close(NULL, NULL)); 21 elm_app_client_view_close(view, NULL, NULL);
22} 22}
23 23
24static void _btn_pause_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) 24static void _btn_pause_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
25{ 25{
26 Elm_App_Client_View *view = data; 26 Elm_App_Client_View *view = data;
27 eo_do(view, elm_app_client_view_pause(NULL, NULL)); 27 elm_app_client_view_pause(view, NULL, NULL);
28} 28}
29 29
30static void _btn_resume_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) 30static void _btn_resume_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
31{ 31{
32 Elm_App_Client_View *view = data; 32 Elm_App_Client_View *view = data;
33 eo_do(view, elm_app_client_view_resume(NULL, NULL)); 33 elm_app_client_view_resume(view, NULL, NULL);
34} 34}
35 35
36static Eina_Bool 36static Eina_Bool
@@ -38,7 +38,7 @@ _app_view_prop_changed_cb(void *data EINA_UNUSED, const Eo_Event *event)
38{ 38{
39 Elm_App_View_State state = ELM_APP_VIEW_STATE_UNKNOWN; 39 Elm_App_View_State state = ELM_APP_VIEW_STATE_UNKNOWN;
40 40
41 eo_do(event->obj, state = elm_app_client_view_state_get()); 41 state = elm_app_client_view_state_get(event->obj);
42 42
43 if (state == ELM_APP_VIEW_STATE_CLOSED) 43 if (state == ELM_APP_VIEW_STATE_CLOSED)
44 { 44 {
@@ -69,9 +69,7 @@ _app_view_clicked(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EIN
69 Elm_App_Client_View *old_view; 69 Elm_App_Client_View *old_view;
70 70
71 old_view = evas_object_data_del(view_props, "view"); 71 old_view = evas_object_data_del(view_props, "view");
72 eo_do(old_view, 72 eo_event_callback_del(old_view, ELM_APP_CLIENT_VIEW_EVENT_PROPERTY_CHANGED, _app_view_prop_changed_cb, table);
73 eo_event_callback_del(ELM_APP_CLIENT_VIEW_EVENT_PROPERTY_CHANGED,
74 _app_view_prop_changed_cb, table));
75 elm_list_clear(view_props); 73 elm_list_clear(view_props);
76 } 74 }
77 else 75 else
@@ -85,13 +83,12 @@ _app_view_clicked(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EIN
85 83
86 evas_object_data_set(view_props, "view", view); 84 evas_object_data_set(view_props, "view", view);
87 85
88 eo_do(view, title = elm_app_client_view_title_get(), 86 title = elm_app_client_view_title_get(view);
89 icon = elm_app_client_view_icon_get(), 87 icon = elm_app_client_view_icon_get(view);
90 progress = elm_app_client_view_progress_get(), 88 progress = elm_app_client_view_progress_get(view);
91 new_events = elm_app_client_view_new_events_get(), 89 new_events = elm_app_client_view_new_events_get(view);
92 window = elm_app_client_view_window_get(), 90 window = elm_app_client_view_window_get(view);
93 eo_event_callback_add(ELM_APP_CLIENT_VIEW_EVENT_PROPERTY_CHANGED, 91 eo_event_callback_add(view, ELM_APP_CLIENT_VIEW_EVENT_PROPERTY_CHANGED, _app_view_prop_changed_cb, table);
94 _app_view_prop_changed_cb, table));
95 92
96 snprintf(buffer, sizeof(buffer), "Title=%s", title); 93 snprintf(buffer, sizeof(buffer), "Title=%s", title);
97 elm_list_item_append(view_props, buffer, NULL, NULL, NULL, NULL); 94 elm_list_item_append(view_props, buffer, NULL, NULL, NULL, NULL);
@@ -108,7 +105,7 @@ _app_view_clicked(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EIN
108 snprintf(buffer, sizeof(buffer), "WindowID=%d", window); 105 snprintf(buffer, sizeof(buffer), "WindowID=%d", window);
109 elm_list_item_append(view_props, buffer, NULL, NULL, NULL, NULL); 106 elm_list_item_append(view_props, buffer, NULL, NULL, NULL, NULL);
110 107
111 eo_do(view, state = elm_app_client_view_state_get()); 108 state = elm_app_client_view_state_get(view);
112 if (state == ELM_APP_VIEW_STATE_LIVE) 109 if (state == ELM_APP_VIEW_STATE_LIVE)
113 snprintf(buffer, sizeof(buffer), "State=alive"); 110 snprintf(buffer, sizeof(buffer), "State=alive");
114 else if (state == ELM_APP_VIEW_STATE_PAUSED) 111 else if (state == ELM_APP_VIEW_STATE_PAUSED)
@@ -176,7 +173,7 @@ static void _popup_btn_open_view_cb(void *data, Evas_Object *obj EINA_UNUSED, vo
176 Eina_Value *args = NULL;//TODO fill with args of popup 173 Eina_Value *args = NULL;//TODO fill with args of popup
177 Elm_App_Client *app = evas_object_data_get(popup, "app"); 174 Elm_App_Client *app = evas_object_data_get(popup, "app");
178 175
179 eo_do(app, elm_app_client_view_open(args, app_client_view_open_cb, NULL)); 176 elm_app_client_view_open(app, args, app_client_view_open_cb, NULL);
180 177
181 evas_object_del(popup); 178 evas_object_del(popup);
182} 179}
@@ -214,14 +211,14 @@ _app_view_open(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_U
214static void _app_close_all_views_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) 211static void _app_close_all_views_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
215{ 212{
216 Elm_App_Client *app = data; 213 Elm_App_Client *app = data;
217 eo_do(app, elm_app_client_view_all_close()); 214 elm_app_client_view_all_close(app);
218} 215}
219 216
220static void 217static void
221_app_terminate_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) 218_app_terminate_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
222{ 219{
223 Elm_App_Client *app = data; 220 Elm_App_Client *app = data;
224 eo_do(app, elm_app_client_terminate()); 221 elm_app_client_terminate(app);
225} 222}
226 223
227static void 224static void
@@ -250,12 +247,12 @@ _app_clicked(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNU
250 evas_object_smart_callback_add(btn_open_view, "clicked", _app_view_open, app); 247 evas_object_smart_callback_add(btn_open_view, "clicked", _app_view_open, app);
251 elm_list_item_append(views, NULL, btn_open_view, NULL, NULL, NULL); 248 elm_list_item_append(views, NULL, btn_open_view, NULL, NULL, NULL);
252 249
253 eo_do(app, views_iter = elm_app_client_views_get()); 250 views_iter = elm_app_client_views_get(app);
254 EINA_ITERATOR_FOREACH(views_iter, client_view) 251 EINA_ITERATOR_FOREACH(views_iter, client_view)
255 { 252 {
256 const char *path = NULL; 253 const char *path = NULL;
257 254
258 eo_do(client_view, path = elm_app_client_view_path_get()); 255 path = elm_app_client_view_path_get(client_view);
259 elm_list_item_append(views, path, NULL, NULL, _app_view_clicked, client_view); 256 elm_list_item_append(views, path, NULL, NULL, _app_view_clicked, client_view);
260 } 257 }
261 eina_iterator_free(views_iter); 258 eina_iterator_free(views_iter);
@@ -299,22 +296,17 @@ _app_open(const char *package)
299 { 296 {
300 const char *app_package = NULL; 297 const char *app_package = NULL;
301 298
302 eo_do(app, app_package = elm_app_client_package_get()); 299 app_package = elm_app_client_package_get(app);
303 if (!app_package) 300 if (!app_package)
304 return; 301 return;
305 if (!strcmp(package, app_package)) 302 if (!strcmp(package, app_package))
306 return; 303 return;
307 } 304 }
308 305
309 app = eo_add(ELM_APP_CLIENT_CLASS, NULL, 306 app = eo_add(ELM_APP_CLIENT_CLASS, NULL, elm_app_client_constructor(eoid, package));
310 elm_app_client_constructor(package)); 307 eo_event_callback_add(app, ELM_APP_CLIENT_EVENT_VIEW_LIST_LOADED, _view_list_update_cb, table);
311 eo_do(app, 308 eo_event_callback_add(app, ELM_APP_CLIENT_EVENT_VIEW_CREATED, _view_list_update_cb, table);
312 eo_event_callback_add(ELM_APP_CLIENT_EVENT_VIEW_LIST_LOADED, 309 eo_event_callback_add(app, ELM_APP_CLIENT_EVENT_VIEW_DELETED, _view_list_update_cb, table);
313 _view_list_update_cb, table),
314 eo_event_callback_add(ELM_APP_CLIENT_EVENT_VIEW_CREATED,
315 _view_list_update_cb, table),
316 eo_event_callback_add(ELM_APP_CLIENT_EVENT_VIEW_DELETED,
317 _view_list_update_cb, table));
318 apps_list = eina_list_append(apps_list, app); 310 apps_list = eina_list_append(apps_list, app);
319} 311}
320 312
@@ -351,7 +343,7 @@ _apps_list_update(void)
351 EINA_LIST_FOREACH(apps_list, l, app) 343 EINA_LIST_FOREACH(apps_list, l, app)
352 { 344 {
353 const char *app_package = NULL; 345 const char *app_package = NULL;
354 eo_do(app, app_package = elm_app_client_package_get()); 346 app_package = elm_app_client_package_get(app);
355 elm_list_item_append(apps, app_package, NULL, NULL, _app_clicked, app); 347 elm_list_item_append(apps, app_package, NULL, NULL, _app_clicked, app);
356 } 348 }
357 349
diff --git a/src/bin/test_win_plug.c b/src/bin/test_win_plug.c
index 25fad1899..3e4226d47 100644
--- a/src/bin/test_win_plug.c
+++ b/src/bin/test_win_plug.c
@@ -161,7 +161,7 @@ _notify_error(Evas_Object *parent, const char *msg)
161 evas_object_size_hint_weight_set(notif, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); 161 evas_object_size_hint_weight_set(notif, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
162 elm_notify_align_set(notif, 0.5, 1.0); 162 elm_notify_align_set(notif, 0.5, 1.0);
163 elm_notify_timeout_set(notif, 3.0); 163 elm_notify_timeout_set(notif, 3.0);
164 eo_do(notif, eo_event_callback_add(ELM_NOTIFY_EVENT_DISMISSED, _notify_end, NULL)); 164 eo_event_callback_add(notif, ELM_NOTIFY_EVENT_DISMISSED, _notify_end, NULL);
165 165
166 txt = elm_label_add(notif); 166 txt = elm_label_add(notif);
167 elm_object_text_set(txt, msg); 167 elm_object_text_set(txt, msg);
diff --git a/src/examples/evas3d_map_example.c b/src/examples/evas3d_map_example.c
index eead4d743..ca584527a 100644
--- a/src/examples/evas3d_map_example.c
+++ b/src/examples/evas3d_map_example.c
@@ -225,8 +225,7 @@ animate_scene(void *data)
225 225
226 angle += 0.05; 226 angle += 0.05;
227 227
228 eo_do((Evas_Canvas3D_Node *)data, 228 evas_canvas3d_node_orientation_angle_axis_set((Evas_Canvas3D_Node *)data, angle, 0.0, 1.0, 0.0);
229 evas_canvas3d_node_orientation_angle_axis_set(angle, 0.0, 1.0, 0.0));
230 229
231 /* Rotate */ 230 /* Rotate */
232 if (angle > 360.0) 231 if (angle > 360.0)
@@ -382,7 +381,7 @@ change_to_2d_map(void)
382 elm_map_zoom_mode_set(map, ELM_MAP_ZOOM_MODE_MANUAL); 381 elm_map_zoom_mode_set(map, ELM_MAP_ZOOM_MODE_MANUAL);
383 elm_map_paused_set(map, EINA_TRUE); 382 elm_map_paused_set(map, EINA_TRUE);
384 383
385 eo_do(texture_diffuse, evas_canvas3d_texture_source_visible_set(EINA_TRUE)); 384 evas_canvas3d_texture_source_visible_set(texture_diffuse, EINA_TRUE);
386 385
387 evas_object_hide(image); 386 evas_object_hide(image);
388 387
@@ -433,8 +432,7 @@ zoom_factor_set(double new_zoom_factor)
433 if (cur_zoom_factor < MIN_2D_ZOOM_FACTOR) 432 if (cur_zoom_factor < MIN_2D_ZOOM_FACTOR)
434 { 433 {
435 zoom_factor = MIN_2D_ZOOM_FACTOR; 434 zoom_factor = MIN_2D_ZOOM_FACTOR;
436 eo_do(scene, evas_canvas3d_scene_pick(IMG_SIZE / 2, IMG_SIZE / 2, 435 evas_canvas3d_scene_pick(scene, IMG_SIZE / 2, IMG_SIZE / 2, &n, &m, &s, &t);
437 &n, &m, &s, &t));
438 src_size = IMG_SIZE * cur_zoom_factor; 436 src_size = IMG_SIZE * cur_zoom_factor;
439 src_x = (Evas_Coord)(src_size * s); 437 src_x = (Evas_Coord)(src_size * s);
440 src_y = (Evas_Coord)(src_size * t); 438 src_y = (Evas_Coord)(src_size * t);
@@ -466,12 +464,10 @@ zoom_factor_set(double new_zoom_factor)
466 464
467 /* Apply updated texture source. */ 465 /* Apply updated texture source. */
468 texture_diffuse = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas); 466 texture_diffuse = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
469 eo_do(texture_diffuse, 467 evas_canvas3d_texture_source_set(texture_diffuse, map);
470 evas_canvas3d_texture_source_set(map), 468 evas_canvas3d_texture_source_visible_set(texture_diffuse, EINA_FALSE);
471 evas_canvas3d_texture_source_visible_set(EINA_FALSE));
472 469
473 eo_do(material, 470 evas_canvas3d_material_texture_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, texture_diffuse);
474 evas_canvas3d_material_texture_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, texture_diffuse));
475 471
476 /* Update camera position. */ 472 /* Update camera position. */
477 vec3_normalize(&camera_pos_unit_vec, &camera_pos); 473 vec3_normalize(&camera_pos_unit_vec, &camera_pos);
@@ -479,8 +475,7 @@ zoom_factor_set(double new_zoom_factor)
479 camera_pos.y = (camera_pos_unit_vec.y * MAX_CAMERA_DISTANCE) / zoom_factor; 475 camera_pos.y = (camera_pos_unit_vec.y * MAX_CAMERA_DISTANCE) / zoom_factor;
480 camera_pos.z = (camera_pos_unit_vec.z * MAX_CAMERA_DISTANCE) / zoom_factor; 476 camera_pos.z = (camera_pos_unit_vec.z * MAX_CAMERA_DISTANCE) / zoom_factor;
481 477
482 eo_do(camera_node, 478 evas_canvas3d_node_position_set(camera_node, camera_pos.x, camera_pos.y, camera_pos.z);
483 evas_canvas3d_node_position_set(camera_pos.x, camera_pos.y, camera_pos.z));
484 } 479 }
485 480
486 /* Update zoom slider. */ 481 /* Update zoom slider. */
@@ -517,7 +512,7 @@ zoom_to_2d_map_cb(void *data,
517 512
518 if (map_dimension_state == MAP_DIMENSION_STATE_2D) return; 513 if (map_dimension_state == MAP_DIMENSION_STATE_2D) return;
519 514
520 eo_do(scene, evas_canvas3d_scene_pick(mouse_down_pos.x, mouse_down_pos.y, &n, &m, &s, &t)); 515 evas_canvas3d_scene_pick(scene, mouse_down_pos.x, mouse_down_pos.y, &n, &m, &s, &t);
521 src_size = (Evas_Coord)(IMG_SIZE * zoom_factor); 516 src_size = (Evas_Coord)(IMG_SIZE * zoom_factor);
522 src_x = (Evas_Coord)(src_size * s); 517 src_x = (Evas_Coord)(src_size * s);
523 src_y = (Evas_Coord)(src_size * t); 518 src_y = (Evas_Coord)(src_size * t);
@@ -564,7 +559,7 @@ submenu_info_add(Elm_Object_Item *parent)
564 559
565 if (map_dimension_state == MAP_DIMENSION_STATE_3D) 560 if (map_dimension_state == MAP_DIMENSION_STATE_3D)
566 { 561 {
567 eo_do(scene, evas_canvas3d_scene_pick(mouse_down_pos.x, mouse_down_pos.y, &n, &m, &s, &t)); 562 evas_canvas3d_scene_pick(scene, mouse_down_pos.x, mouse_down_pos.y, &n, &m, &s, &t);
568 src_size = (Evas_Coord) (IMG_SIZE * zoom_factor); 563 src_size = (Evas_Coord) (IMG_SIZE * zoom_factor);
569 src_x = (Evas_Coord)(src_size * s); 564 src_x = (Evas_Coord)(src_size * s);
570 src_y = (Evas_Coord)(src_size * t); 565 src_y = (Evas_Coord)(src_size * t);
@@ -623,12 +618,12 @@ map_mouse_down_cb(void *data,
623 obj_x = ev->canvas.x - x; 618 obj_x = ev->canvas.x - x;
624 obj_y = ev->canvas.y - y; 619 obj_y = ev->canvas.y - y;
625 620
626 eo_do(scene, evas_canvas3d_scene_size_get(&scene_w, &scene_h)); 621 evas_canvas3d_scene_size_get(scene, &scene_w, &scene_h);
627 622
628 scene_x = obj_x * scene_w / (double)w; 623 scene_x = obj_x * scene_w / (double)w;
629 scene_y = obj_y * scene_h / (double)h; 624 scene_y = obj_y * scene_h / (double)h;
630 625
631 eo_do(scene, pick = evas_canvas3d_scene_pick(scene_x, scene_y, &n, &m, &s, &t)); 626 pick = evas_canvas3d_scene_pick(scene, scene_x, scene_y, &n, &m, &s, &t);
632 if (pick) 627 if (pick)
633 printf("Picked : "); 628 printf("Picked : ");
634 else 629 else
@@ -693,12 +688,12 @@ mouse_down_cb(void *data,
693 obj_x = ev->canvas.x - x; 688 obj_x = ev->canvas.x - x;
694 obj_y = ev->canvas.y - y; 689 obj_y = ev->canvas.y - y;
695 690
696 eo_do(scene, evas_canvas3d_scene_size_get(&scene_w, &scene_h)); 691 evas_canvas3d_scene_size_get(scene, &scene_w, &scene_h);
697 692
698 scene_x = obj_x * scene_w / (double)w; 693 scene_x = obj_x * scene_w / (double)w;
699 scene_y = obj_y * scene_h / (double)h; 694 scene_y = obj_y * scene_h / (double)h;
700 695
701 eo_do(scene, pick = evas_canvas3d_scene_pick(scene_x, scene_y, &n, &m, &s, &t)); 696 pick = evas_canvas3d_scene_pick(scene, scene_x, scene_y, &n, &m, &s, &t);
702 if (pick) 697 if (pick)
703 printf("Picked : "); 698 printf("Picked : ");
704 else 699 else
@@ -763,18 +758,14 @@ mouse_move_cb(void *data,
763 vec3_normalize(&camera_pos_unit_vec, &camera_pos); 758 vec3_normalize(&camera_pos_unit_vec, &camera_pos);
764 vec3_scale(&camera_pos, &camera_pos_unit_vec, distance_to_origin); 759 vec3_scale(&camera_pos, &camera_pos_unit_vec, distance_to_origin);
765 760
766 eo_do(camera_node, 761 evas_canvas3d_node_position_set(camera_node, camera_pos.x, camera_pos.y, camera_pos.z);
767 evas_canvas3d_node_position_set(camera_pos.x, camera_pos.y, camera_pos.z), 762 evas_canvas3d_node_look_at_set(camera_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, camera_up_vec.x, camera_up_vec.y, camera_up_vec.z);
768 evas_canvas3d_node_look_at_set(EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0,
769 EVAS_CANVAS3D_SPACE_PARENT, camera_up_vec.x, camera_up_vec.y, camera_up_vec.z));
770 763
771 if (elm_check_state_get(light_toggle)) 764 if (elm_check_state_get(light_toggle))
772 { 765 {
773 /* Update light position as the same as camera position. */ 766 /* Update light position as the same as camera position. */
774 eo_do(light_node, 767 evas_canvas3d_node_position_set(light_node, camera_pos.x, camera_pos.y, camera_pos.z);
775 evas_canvas3d_node_position_set(camera_pos.x, camera_pos.y, camera_pos.z), 768 evas_canvas3d_node_look_at_set(light_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, camera_up_vec.x, camera_up_vec.y, camera_up_vec.z);
776 evas_canvas3d_node_look_at_set(EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0,
777 EVAS_CANVAS3D_SPACE_PARENT, camera_up_vec.x, camera_up_vec.y, camera_up_vec.z));
778 } 769 }
779 } 770 }
780} 771}
@@ -800,12 +791,12 @@ mouse_up_cb(void *data,
800 obj_x = ev->canvas.x - x; 791 obj_x = ev->canvas.x - x;
801 obj_y = ev->canvas.y - y; 792 obj_y = ev->canvas.y - y;
802 793
803 eo_do(scene, evas_canvas3d_scene_size_get(&scene_w, &scene_h)); 794 evas_canvas3d_scene_size_get(scene, &scene_w, &scene_h);
804 795
805 scene_x = obj_x * scene_w / (double)w; 796 scene_x = obj_x * scene_w / (double)w;
806 scene_y = obj_y * scene_h / (double)h; 797 scene_y = obj_y * scene_h / (double)h;
807 798
808 eo_do(scene, pick = evas_canvas3d_scene_pick(scene_x, scene_y, &n, &m, &s, &t)); 799 pick = evas_canvas3d_scene_pick(scene, scene_x, scene_y, &n, &m, &s, &t);
809 if (pick) 800 if (pick)
810 printf("Picked : "); 801 printf("Picked : ");
811 else 802 else
@@ -856,21 +847,14 @@ skybox_setup(void)
856 char buf[PATH_MAX]; 847 char buf[PATH_MAX];
857 848
858 skybox_mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas); 849 skybox_mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
859 eo_do(skybox_mesh, 850 evas_canvas3d_mesh_vertex_count_set(skybox_mesh, 24);
860 evas_canvas3d_mesh_vertex_count_set(24), 851 evas_canvas3d_mesh_frame_add(skybox_mesh, 0);
861 evas_canvas3d_mesh_frame_add(0), 852 evas_canvas3d_mesh_frame_vertex_data_set(skybox_mesh, 0, EVAS_CANVAS3D_VERTEX_ATTRIB_POSITION, 12 * sizeof(float), &skybox_vertices[0]);
862 853 evas_canvas3d_mesh_frame_vertex_data_set(skybox_mesh, 0, EVAS_CANVAS3D_VERTEX_ATTRIB_NORMAL, 12 * sizeof(float), &skybox_vertices[3]);
863 evas_canvas3d_mesh_frame_vertex_data_set(0, EVAS_CANVAS3D_VERTEX_ATTRIB_POSITION, 854 evas_canvas3d_mesh_frame_vertex_data_set(skybox_mesh, 0, EVAS_CANVAS3D_VERTEX_ATTRIB_COLOR, 12 * sizeof(float), &skybox_vertices[6]);
864 12 * sizeof(float), &skybox_vertices[0]), 855 evas_canvas3d_mesh_frame_vertex_data_set(skybox_mesh, 0, EVAS_CANVAS3D_VERTEX_ATTRIB_TEXCOORD, 12 * sizeof(float), &skybox_vertices[10]);
865 evas_canvas3d_mesh_frame_vertex_data_set(0, EVAS_CANVAS3D_VERTEX_ATTRIB_NORMAL, 856 evas_canvas3d_mesh_index_data_set(skybox_mesh, EVAS_CANVAS3D_INDEX_FORMAT_UNSIGNED_SHORT, 36, &skybox_indices[0]);
866 12 * sizeof(float), &skybox_vertices[3]), 857 evas_canvas3d_mesh_vertex_assembly_set(skybox_mesh, EVAS_CANVAS3D_VERTEX_ASSEMBLY_TRIANGLES);
867 evas_canvas3d_mesh_frame_vertex_data_set(0, EVAS_CANVAS3D_VERTEX_ATTRIB_COLOR,
868 12 * sizeof(float), &skybox_vertices[6]),
869 evas_canvas3d_mesh_frame_vertex_data_set(0, EVAS_CANVAS3D_VERTEX_ATTRIB_TEXCOORD,
870 12 * sizeof(float), &skybox_vertices[10]),
871
872 evas_canvas3d_mesh_index_data_set(EVAS_CANVAS3D_INDEX_FORMAT_UNSIGNED_SHORT, 36, &skybox_indices[0]),
873 evas_canvas3d_mesh_vertex_assembly_set(EVAS_CANVAS3D_VERTEX_ASSEMBLY_TRIANGLES));
874 858
875 /* Set skybox texture source image. */ 859 /* Set skybox texture source image. */
876 skybox_image = elm_image_add(win); 860 skybox_image = elm_image_add(win);
@@ -881,31 +865,26 @@ skybox_setup(void)
881 865
882 /* Set skybox texture material. */ 866 /* Set skybox texture material. */
883 skybox_material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas); 867 skybox_material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
884 eo_do(skybox_mesh, evas_canvas3d_mesh_frame_material_set(0, skybox_material)); 868 evas_canvas3d_mesh_frame_material_set(skybox_mesh, 0, skybox_material);
885 869
886 skybox_texture_diffuse = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas); 870 skybox_texture_diffuse = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
887 871
888 eo_do(skybox_texture_diffuse, 872 evas_canvas3d_texture_source_set(skybox_texture_diffuse, skybox_image);
889 evas_canvas3d_texture_source_set(skybox_image), 873 evas_canvas3d_texture_source_visible_set(skybox_texture_diffuse, EINA_FALSE);
890 evas_canvas3d_texture_source_visible_set(EINA_FALSE)); 874
891 875 evas_canvas3d_material_texture_set(skybox_material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, skybox_texture_diffuse);
892 eo_do(skybox_material, 876 evas_canvas3d_material_enable_set(skybox_material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE);
893 evas_canvas3d_material_texture_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, skybox_texture_diffuse), 877 evas_canvas3d_material_enable_set(skybox_material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE);
894 878 evas_canvas3d_material_enable_set(skybox_material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, EINA_TRUE);
895 evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE), 879 evas_canvas3d_material_color_set(skybox_material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, 0.1, 0.1, 0.1, 1.0);
896 evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE), 880 evas_canvas3d_material_color_set(skybox_material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, 1.0, 1.0, 1.0, 1.0);
897 evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, EINA_TRUE), 881 evas_canvas3d_material_color_set(skybox_material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 0.1, 0.1, 0.1, 1.0);
898 882 evas_canvas3d_material_shininess_set(skybox_material, 50.0);
899 evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, 0.1, 0.1, 0.1, 1.0), 883
900 evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, 1.0, 1.0, 1.0, 1.0), 884 skybox_mesh_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
901 evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 0.1, 0.1, 0.1, 1.0), 885 evas_canvas3d_node_member_add(root_node, skybox_mesh_node);
902 evas_canvas3d_material_shininess_set(50.0)); 886 evas_canvas3d_node_mesh_add(skybox_mesh_node, skybox_mesh);
903 887 evas_canvas3d_mesh_shade_mode_set(skybox_mesh, EVAS_CANVAS3D_SHADE_MODE_DIFFUSE);
904 skybox_mesh_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
905 evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH));
906 eo_do(root_node, evas_canvas3d_node_member_add(skybox_mesh_node));
907 eo_do(skybox_mesh_node, evas_canvas3d_node_mesh_add(skybox_mesh));
908 eo_do(skybox_mesh, evas_canvas3d_mesh_shade_mode_set(EVAS_CANVAS3D_SHADE_MODE_DIFFUSE));
909} 888}
910 889
911static void 890static void
@@ -944,7 +923,7 @@ camera_setup(void)
944{ 923{
945 /* Add the camera. */ 924 /* Add the camera. */
946 camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas); 925 camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
947 eo_do(camera, evas_canvas3d_camera_projection_perspective_set(60.0, 1.0, 1.0, 100.0)); 926 evas_canvas3d_camera_projection_perspective_set(camera, 60.0, 1.0, 1.0, 100.0);
948 927
949 /* Set camera position. */ 928 /* Set camera position. */
950 camera_pos.x = 0.0; 929 camera_pos.x = 0.0;
@@ -961,33 +940,26 @@ camera_setup(void)
961 camera_right_vec.y = 0.0; 940 camera_right_vec.y = 0.0;
962 camera_right_vec.z = 0.0; 941 camera_right_vec.z = 0.0;
963 942
964 camera_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, 943 camera_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
965 evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_CAMERA)); 944 evas_canvas3d_node_camera_set(camera_node, camera);
966 eo_do(camera_node, 945 evas_canvas3d_node_position_set(camera_node, camera_pos.x, camera_pos.y, camera_pos.z);
967 evas_canvas3d_node_camera_set(camera), 946 evas_canvas3d_node_look_at_set(camera_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, camera_up_vec.x, camera_up_vec.y, camera_up_vec.z);
968 evas_canvas3d_node_position_set(camera_pos.x, camera_pos.y, camera_pos.z), 947 evas_canvas3d_node_member_add(root_node, camera_node);
969 evas_canvas3d_node_look_at_set(EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0,
970 EVAS_CANVAS3D_SPACE_PARENT, camera_up_vec.x, camera_up_vec.y, camera_up_vec.z));
971 eo_do(root_node, evas_canvas3d_node_member_add(camera_node));
972} 948}
973 949
974static void 950static void
975light_setup(void) 951light_setup(void)
976{ 952{
977 light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas); 953 light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
978 eo_do(light, 954 evas_canvas3d_light_ambient_set(light, 0.2, 0.2, 0.2, 1.0);
979 evas_canvas3d_light_ambient_set(0.2, 0.2, 0.2, 1.0), 955 evas_canvas3d_light_diffuse_set(light, 1.0, 1.0, 1.0, 1.0);
980 evas_canvas3d_light_diffuse_set(1.0, 1.0, 1.0, 1.0), 956 evas_canvas3d_light_specular_set(light, 0.2, 0.2, 0.2, 1.0);
981 evas_canvas3d_light_specular_set(0.2, 0.2, 0.2, 1.0)); 957
982 958 light_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
983 light_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, 959 evas_canvas3d_node_light_set(light_node, light);
984 evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_LIGHT)); 960 evas_canvas3d_node_position_set(light_node, 0.0, 0.0, MAX_CAMERA_DISTANCE);
985 eo_do(light_node, 961 evas_canvas3d_node_look_at_set(light_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0);
986 evas_canvas3d_node_light_set(light), 962 evas_canvas3d_node_member_add(root_node, light_node);
987 evas_canvas3d_node_position_set(0.0, 0.0, MAX_CAMERA_DISTANCE),
988 evas_canvas3d_node_look_at_set(EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0,
989 EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0));
990 eo_do(root_node, evas_canvas3d_node_member_add(light_node));
991} 963}
992 964
993static void 965static void
@@ -997,56 +969,42 @@ mesh_setup(void)
997 sphere_init(50); 969 sphere_init(50);
998 970
999 mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas); 971 mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
1000 eo_do(mesh, 972 evas_canvas3d_mesh_vertex_count_set(mesh, vertex_count);
1001 evas_canvas3d_mesh_vertex_count_set(vertex_count), 973 evas_canvas3d_mesh_frame_add(mesh, 0);
1002 evas_canvas3d_mesh_frame_add(0), 974 evas_canvas3d_mesh_frame_vertex_data_set(mesh, 0, EVAS_CANVAS3D_VERTEX_ATTRIB_POSITION, sizeof(vertex), &vertices[0].position);
1003 975 evas_canvas3d_mesh_frame_vertex_data_set(mesh, 0, EVAS_CANVAS3D_VERTEX_ATTRIB_NORMAL, sizeof(vertex), &vertices[0].normal);
1004 evas_canvas3d_mesh_frame_vertex_data_set(0, EVAS_CANVAS3D_VERTEX_ATTRIB_POSITION, 976 evas_canvas3d_mesh_frame_vertex_data_set(mesh, 0, EVAS_CANVAS3D_VERTEX_ATTRIB_TANGENT, sizeof(vertex), &vertices[0].tangent);
1005 sizeof(vertex), &vertices[0].position), 977 evas_canvas3d_mesh_frame_vertex_data_set(mesh, 0, EVAS_CANVAS3D_VERTEX_ATTRIB_COLOR, sizeof(vertex), &vertices[0].color);
1006 evas_canvas3d_mesh_frame_vertex_data_set(0, EVAS_CANVAS3D_VERTEX_ATTRIB_NORMAL, 978 evas_canvas3d_mesh_frame_vertex_data_set(mesh, 0, EVAS_CANVAS3D_VERTEX_ATTRIB_TEXCOORD, sizeof(vertex), &vertices[0].texcoord);
1007 sizeof(vertex), &vertices[0].normal), 979 evas_canvas3d_mesh_index_data_set(mesh, EVAS_CANVAS3D_INDEX_FORMAT_UNSIGNED_SHORT, index_count, &indices[0]);
1008 evas_canvas3d_mesh_frame_vertex_data_set(0, EVAS_CANVAS3D_VERTEX_ATTRIB_TANGENT, 980 evas_canvas3d_mesh_vertex_assembly_set(mesh, EVAS_CANVAS3D_VERTEX_ASSEMBLY_TRIANGLES);
1009 sizeof(vertex), &vertices[0].tangent),
1010 evas_canvas3d_mesh_frame_vertex_data_set(0, EVAS_CANVAS3D_VERTEX_ATTRIB_COLOR,
1011 sizeof(vertex), &vertices[0].color),
1012 evas_canvas3d_mesh_frame_vertex_data_set(0, EVAS_CANVAS3D_VERTEX_ATTRIB_TEXCOORD,
1013 sizeof(vertex), &vertices[0].texcoord),
1014
1015 evas_canvas3d_mesh_index_data_set(EVAS_CANVAS3D_INDEX_FORMAT_UNSIGNED_SHORT, index_count, &indices[0]),
1016 evas_canvas3d_mesh_vertex_assembly_set(EVAS_CANVAS3D_VERTEX_ASSEMBLY_TRIANGLES));
1017 981
1018 material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas); 982 material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
1019 eo_do(mesh, evas_canvas3d_mesh_frame_material_set(0, material)); 983 evas_canvas3d_mesh_frame_material_set(mesh, 0, material);
1020 984
1021 texture_diffuse = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas); 985 texture_diffuse = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
1022 eo_do(texture_diffuse, 986 evas_canvas3d_texture_source_set(texture_diffuse, map);
1023 evas_canvas3d_texture_source_set(map), 987 evas_canvas3d_texture_source_visible_set(texture_diffuse, EINA_FALSE);
1024 evas_canvas3d_texture_source_visible_set(EINA_FALSE));
1025 988
1026 texture_normal = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas); 989 texture_normal = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
1027 eo_do(texture_normal, 990 evas_canvas3d_texture_source_set(texture_normal, normal_map);
1028 evas_canvas3d_texture_source_set(normal_map), 991 evas_canvas3d_texture_source_visible_set(texture_normal, EINA_FALSE);
1029 evas_canvas3d_texture_source_visible_set(EINA_FALSE)); 992
1030 993 evas_canvas3d_material_texture_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, texture_diffuse);
1031 eo_do(material, 994 evas_canvas3d_material_texture_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_NORMAL, texture_normal);
1032 evas_canvas3d_material_texture_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, texture_diffuse), 995 evas_canvas3d_material_enable_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE);
1033 evas_canvas3d_material_texture_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_NORMAL, texture_normal), 996 evas_canvas3d_material_enable_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE);
1034 997 evas_canvas3d_material_enable_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, EINA_TRUE);
1035 evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE), 998 evas_canvas3d_material_enable_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_NORMAL, EINA_TRUE);
1036 evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE), 999 evas_canvas3d_material_color_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, 0.1, 0.1, 0.1, 1.0);
1037 evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, EINA_TRUE), 1000 evas_canvas3d_material_color_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, 1.0, 1.0, 1.0, 1.0);
1038 evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_NORMAL, EINA_TRUE), 1001 evas_canvas3d_material_color_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 0.1, 0.1, 0.1, 1.0);
1039 1002 evas_canvas3d_material_shininess_set(material, 50.0);
1040 evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, 0.1, 0.1, 0.1, 1.0), 1003
1041 evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, 1.0, 1.0, 1.0, 1.0), 1004 mesh_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
1042 evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 0.1, 0.1, 0.1, 1.0), 1005 evas_canvas3d_node_member_add(root_node, mesh_node);
1043 evas_canvas3d_material_shininess_set(50.0)); 1006 evas_canvas3d_node_mesh_add(mesh_node, mesh);
1044 1007 evas_canvas3d_mesh_shade_mode_set(mesh, EVAS_CANVAS3D_SHADE_MODE_NORMAL_MAP);
1045 mesh_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
1046 evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH));
1047 eo_do(root_node, evas_canvas3d_node_member_add(mesh_node));
1048 eo_do(mesh_node, evas_canvas3d_node_mesh_add(mesh));
1049 eo_do(mesh, evas_canvas3d_mesh_shade_mode_set(EVAS_CANVAS3D_SHADE_MODE_NORMAL_MAP));
1050} 1008}
1051 1009
1052static void 1010static void
@@ -1116,18 +1074,14 @@ light_toggle_changed_cb(void *data,
1116 if (elm_check_state_get(obj)) 1074 if (elm_check_state_get(obj))
1117 { 1075 {
1118 /* Set light position as the same as camera position. */ 1076 /* Set light position as the same as camera position. */
1119 eo_do(light_node, 1077 evas_canvas3d_node_position_set(light_node, camera_pos.x, camera_pos.y, camera_pos.z);
1120 evas_canvas3d_node_position_set(camera_pos.x, camera_pos.y, camera_pos.z), 1078 evas_canvas3d_node_look_at_set(light_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, camera_up_vec.x, camera_up_vec.y, camera_up_vec.z);
1121 evas_canvas3d_node_look_at_set(EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0,
1122 EVAS_CANVAS3D_SPACE_PARENT, camera_up_vec.x, camera_up_vec.y, camera_up_vec.z));
1123 } 1079 }
1124 else 1080 else
1125 { 1081 {
1126 /* Set light position to default position. */ 1082 /* Set light position to default position. */
1127 eo_do(light_node, 1083 evas_canvas3d_node_position_set(light_node, 0.0, 0.0, MAX_CAMERA_DISTANCE);
1128 evas_canvas3d_node_position_set(0.0, 0.0, MAX_CAMERA_DISTANCE), 1084 evas_canvas3d_node_look_at_set(light_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0);
1129 evas_canvas3d_node_look_at_set(EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0,
1130 EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0));
1131 } 1085 }
1132} 1086}
1133 1087
@@ -1215,8 +1169,7 @@ elm_main(int argc, char **argv)
1215 scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas); 1169 scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
1216 1170
1217 /* Add a root node for the scene. */ 1171 /* Add a root node for the scene. */
1218 root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, 1172 root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
1219 evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_NODE));
1220 1173
1221 skybox_setup(); 1174 skybox_setup();
1222 texture_source_setup(); 1175 texture_source_setup();
@@ -1225,11 +1178,10 @@ elm_main(int argc, char **argv)
1225 mesh_setup(); 1178 mesh_setup();
1226 1179
1227 /* Set up scene. */ 1180 /* Set up scene. */
1228 eo_do(scene, 1181 evas_canvas3d_scene_root_node_set(scene, root_node);
1229 evas_canvas3d_scene_root_node_set(root_node), 1182 evas_canvas3d_scene_camera_node_set(scene, camera_node);
1230 evas_canvas3d_scene_camera_node_set(camera_node), 1183 evas_canvas3d_scene_size_set(scene, WIDTH, HEIGHT);
1231 evas_canvas3d_scene_size_set(WIDTH, HEIGHT)); 1184 evas_obj_image_scene_set(image, scene);
1232 eo_do(image, evas_obj_image_scene_set(scene));
1233 1185
1234 /* Add a layout for controlers. */ 1186 /* Add a layout for controlers. */
1235 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 97a90c36b..eb06dc01a 100644
--- a/src/examples/evas3d_object_on_button_example.c
+++ b/src/examples/evas3d_object_on_button_example.c
@@ -115,14 +115,13 @@ _stop_scene(void *data,
115 { 115 {
116 Eina_Bool ret; 116 Eina_Bool ret;
117 117
118 eo_do(d->scene, evas_canvas3d_scene_color_pick_enable_set(EINA_TRUE)); 118 evas_canvas3d_scene_color_pick_enable_set(d->scene, EINA_TRUE);
119 eo_do(d->scene, 119 ret = evas_canvas3d_scene_pick(d->scene, ev->canvas.x, ev->canvas.y, &n, &m, &s, &t);
120 ret = evas_canvas3d_scene_pick(ev->canvas.x, ev->canvas.y, &n, &m, &s, &t));
121 if (ret) 120 if (ret)
122 { 121 {
123 d_angle = 0.0; 122 d_angle = 0.0;
124 elm_object_signal_emit(btn, "mouse,down,1", "event"); 123 elm_object_signal_emit(btn, "mouse,down,1", "event");
125 eo_do(d->mesh_node, evas_canvas3d_node_position_set(0.0, 0.0, -0.2)); 124 evas_canvas3d_node_position_set(d->mesh_node, 0.0, 0.0, -0.2);
126 } 125 }
127 } 126 }
128} 127}
@@ -137,7 +136,7 @@ _play_scene(void *data,
137 136
138 d_angle = 0.5; 137 d_angle = 0.5;
139 elm_object_signal_emit(btn, "mouse,up,1", "event"); 138 elm_object_signal_emit(btn, "mouse,up,1", "event");
140 eo_do(d->mesh_node, evas_canvas3d_node_position_set(0.0, 0.0, 0.0)); 139 evas_canvas3d_node_position_set(d->mesh_node, 0.0, 0.0, 0.0);
141} 140}
142 141
143 142
@@ -149,8 +148,7 @@ _animate_scene(void *data)
149 148
150 angle += d_angle; 149 angle += d_angle;
151 150
152 eo_do(scene->mesh_node, 151 evas_canvas3d_node_orientation_angle_axis_set(scene->mesh_node, angle, 1.0, 1.0, 1.0);
153 evas_canvas3d_node_orientation_angle_axis_set(angle, 1.0, 1.0, 1.0));
154 152
155 /* Rotate */ 153 /* Rotate */
156 if (angle > 360.0) angle -= 360.0f; 154 if (angle > 360.0) angle -= 360.0f;
@@ -163,38 +161,30 @@ _camera_setup(Scene_Data *data)
163{ 161{
164 data->camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas); 162 data->camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
165 163
166 eo_do(data->camera, 164 evas_canvas3d_camera_projection_perspective_set(data->camera, 20.0, 1.0, 2.0, 50.0);
167 evas_canvas3d_camera_projection_perspective_set(20.0, 1.0, 2.0, 50.0));
168 165
169 data->camera_node = 166 data->camera_node =
170 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, 167 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
171 evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_CAMERA)); 168 evas_canvas3d_node_camera_set(data->camera_node, data->camera);
172 eo_do(data->camera_node, 169 evas_canvas3d_node_position_set(data->camera_node, 0.0, 0.0, 15.0);
173 evas_canvas3d_node_camera_set(data->camera), 170 evas_canvas3d_node_look_at_set(data->camera_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, -1.0, 0.0);
174 evas_canvas3d_node_position_set(0.0, 0.0, 15.0), 171 evas_canvas3d_node_member_add(data->root_node, data->camera_node);
175 evas_canvas3d_node_look_at_set(EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0,
176 EVAS_CANVAS3D_SPACE_PARENT, 0.0, -1.0, 0.0));
177 eo_do(data->root_node, evas_canvas3d_node_member_add(data->camera_node));
178} 172}
179 173
180static void 174static void
181_light_setup(Scene_Data *data) 175_light_setup(Scene_Data *data)
182{ 176{
183 data->light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas); 177 data->light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
184 eo_do(data->light, 178 evas_canvas3d_light_ambient_set(data->light, 0.2, 0.2, 0.2, 1.0);
185 evas_canvas3d_light_ambient_set(0.2, 0.2, 0.2, 1.0), 179 evas_canvas3d_light_diffuse_set(data->light, 1.0, 1.0, 1.0, 1.0);
186 evas_canvas3d_light_diffuse_set(1.0, 1.0, 1.0, 1.0), 180 evas_canvas3d_light_specular_set(data->light, 1.0, 1.0, 1.0, 1.0);
187 evas_canvas3d_light_specular_set(1.0, 1.0, 1.0, 1.0));
188 181
189 data->light_node = 182 data->light_node =
190 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, 183 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
191 evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_LIGHT)); 184 evas_canvas3d_node_light_set(data->light_node, data->light);
192 eo_do(data->light_node, 185 evas_canvas3d_node_position_set(data->light_node, 0.0, 0.0, 10.0);
193 evas_canvas3d_node_light_set(data->light), 186 evas_canvas3d_node_look_at_set(data->light_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0);
194 evas_canvas3d_node_position_set(0.0, 0.0, 10.0), 187 evas_canvas3d_node_member_add(data->root_node, data->light_node);
195 evas_canvas3d_node_look_at_set(EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0,
196 EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0));
197 eo_do(data->root_node, evas_canvas3d_node_member_add(data->light_node));
198} 188}
199static void 189static void
200_mesh_setup(Scene_Data *data) 190_mesh_setup(Scene_Data *data)
@@ -203,72 +193,54 @@ _mesh_setup(Scene_Data *data)
203 data->material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas); 193 data->material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
204 data->texture = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas); 194 data->texture = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
205 195
206 eo_do(data->texture, 196 evas_canvas3d_texture_source_set(data->texture, btn);
207 evas_canvas3d_texture_source_set(btn), 197 evas_canvas3d_texture_source_visible_set(data->texture, EINA_FALSE);
208 evas_canvas3d_texture_source_visible_set(EINA_FALSE));
209 198
210 eo_do(data->material, 199 evas_canvas3d_material_texture_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, data->texture);
211 evas_canvas3d_material_texture_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, data->texture), 200 evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE);
212 201 evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE);
213 evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE), 202 evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, EINA_TRUE);
214 evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE), 203 evas_canvas3d_material_color_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, 0.2, 0.2, 0.2, 1.0);
215 evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, EINA_TRUE), 204 evas_canvas3d_material_color_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, 0.8, 0.8, 0.8, 1.0);
216 205 evas_canvas3d_material_color_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0);
217 evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, 0.2, 0.2, 0.2, 1.0), 206 evas_canvas3d_material_shininess_set(data->material, 100.0);
218 evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, 0.8, 0.8, 0.8, 1.0),
219 evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0),
220 evas_canvas3d_material_shininess_set(100.0));
221 207
222 /* Setup mesh. */ 208 /* Setup mesh. */
223 data->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas); 209 data->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
224 eo_do(data->mesh, 210 evas_canvas3d_mesh_vertex_count_set(data->mesh, 24);
225 evas_canvas3d_mesh_vertex_count_set(24), 211 evas_canvas3d_mesh_frame_add(data->mesh, 0);
226 evas_canvas3d_mesh_frame_add(0), 212 evas_canvas3d_mesh_frame_vertex_data_set(data->mesh, 0, EVAS_CANVAS3D_VERTEX_ATTRIB_POSITION, 12 * sizeof(float), &cube_vertices[ 0]);
227 213 evas_canvas3d_mesh_frame_vertex_data_set(data->mesh, 0, EVAS_CANVAS3D_VERTEX_ATTRIB_NORMAL, 12 * sizeof(float), &cube_vertices[ 3]);
228 evas_canvas3d_mesh_frame_vertex_data_set(0, EVAS_CANVAS3D_VERTEX_ATTRIB_POSITION, 214 evas_canvas3d_mesh_frame_vertex_data_set(data->mesh, 0, EVAS_CANVAS3D_VERTEX_ATTRIB_COLOR, 12 * sizeof(float), &cube_vertices[ 6]);
229 12 * sizeof(float), &cube_vertices[ 0]), 215 evas_canvas3d_mesh_frame_vertex_data_set(data->mesh, 0, EVAS_CANVAS3D_VERTEX_ATTRIB_TEXCOORD, 12 * sizeof(float), &cube_vertices[10]);
230 evas_canvas3d_mesh_frame_vertex_data_set(0, EVAS_CANVAS3D_VERTEX_ATTRIB_NORMAL, 216 evas_canvas3d_mesh_index_data_set(data->mesh, EVAS_CANVAS3D_INDEX_FORMAT_UNSIGNED_SHORT, 36, &cube_indices[0]);
231 12 * sizeof(float), &cube_vertices[ 3]), 217 evas_canvas3d_mesh_vertex_assembly_set(data->mesh, EVAS_CANVAS3D_VERTEX_ASSEMBLY_TRIANGLES);
232 evas_canvas3d_mesh_frame_vertex_data_set(0, EVAS_CANVAS3D_VERTEX_ATTRIB_COLOR, 218 evas_canvas3d_mesh_shade_mode_set(data->mesh, EVAS_CANVAS3D_SHADE_MODE_PHONG);
233 12 * sizeof(float), &cube_vertices[ 6]), 219 evas_canvas3d_mesh_frame_material_set(data->mesh, 0, data->material);
234 evas_canvas3d_mesh_frame_vertex_data_set(0, EVAS_CANVAS3D_VERTEX_ATTRIB_TEXCOORD, 220 evas_canvas3d_mesh_color_pick_enable_set(data->mesh, EINA_TRUE);
235 12 * sizeof(float), &cube_vertices[10]),
236
237 evas_canvas3d_mesh_index_data_set(EVAS_CANVAS3D_INDEX_FORMAT_UNSIGNED_SHORT,
238 36, &cube_indices[0]),
239 evas_canvas3d_mesh_vertex_assembly_set(EVAS_CANVAS3D_VERTEX_ASSEMBLY_TRIANGLES),
240
241 evas_canvas3d_mesh_shade_mode_set(EVAS_CANVAS3D_SHADE_MODE_PHONG),
242
243 evas_canvas3d_mesh_frame_material_set(0, data->material),
244 evas_canvas3d_mesh_color_pick_enable_set(EINA_TRUE));
245 221
246 data->mesh_node = 222 data->mesh_node =
247 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, 223 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
248 evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH)); 224 evas_canvas3d_node_member_add(data->root_node, data->mesh_node);
249 eo_do(data->root_node, evas_canvas3d_node_member_add(data->mesh_node)); 225 evas_canvas3d_node_mesh_add(data->mesh_node, data->mesh);
250 eo_do(data->mesh_node, evas_canvas3d_node_mesh_add(data->mesh));
251} 226}
252 227
253static void 228static void
254_scene_setup(Scene_Data *data) 229_scene_setup(Scene_Data *data)
255{ 230{
256 data->scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas); 231 data->scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
257 eo_do(data->scene, 232 evas_canvas3d_scene_size_set(data->scene, WIDTH, HEIGHT);
258 evas_canvas3d_scene_size_set(WIDTH, HEIGHT); 233 evas_canvas3d_scene_background_color_set(data->scene, 0.0, 0.0, 0.0, 0.0);
259 evas_canvas3d_scene_background_color_set(0.0, 0.0, 0.0, 0.0));
260 234
261 data->root_node = 235 data->root_node =
262 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, 236 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
263 evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_NODE));
264 237
265 _camera_setup(data); 238 _camera_setup(data);
266 _light_setup(data); 239 _light_setup(data);
267 _mesh_setup(data); 240 _mesh_setup(data);
268 241
269 eo_do(data->scene, 242 evas_canvas3d_scene_root_node_set(data->scene, data->root_node);
270 evas_canvas3d_scene_root_node_set(data->root_node), 243 evas_canvas3d_scene_camera_node_set(data->scene, data->camera_node);
271 evas_canvas3d_scene_camera_node_set(data->camera_node));
272} 244}
273 245
274int 246int
@@ -286,9 +258,8 @@ elm_main(int argc, char **argv)
286 258
287 /* Add an image object for 3D scene rendering. */ 259 /* Add an image object for 3D scene rendering. */
288 image = evas_object_image_filled_add(evas); 260 image = evas_object_image_filled_add(evas);
289 eo_do(image, 261 efl_gfx_size_set(image, WIDTH, HEIGHT);
290 efl_gfx_size_set(WIDTH, HEIGHT), 262 efl_gfx_visible_set(image, EINA_TRUE);
291 efl_gfx_visible_set(EINA_TRUE));
292 263
293 btn = elm_button_add(win); 264 btn = elm_button_add(win);
294 evas_object_resize(btn, (WIDTH * 2) / 3, (HEIGHT * 2) / 3); 265 evas_object_resize(btn, (WIDTH * 2) / 3, (HEIGHT * 2) / 3);
@@ -299,7 +270,7 @@ elm_main(int argc, char **argv)
299 /* Set the image object as render target for 3D scene. */ 270 /* Set the image object as render target for 3D scene. */
300 _scene_setup(&data); 271 _scene_setup(&data);
301 evas_object_focus_set(image, EINA_TRUE); 272 evas_object_focus_set(image, EINA_TRUE);
302 eo_do(image, evas_obj_image_scene_set(data.scene)); 273 evas_obj_image_scene_set(image, data.scene);
303 274
304 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);
305 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 50115c195..c7cf82c32 100644
--- a/src/examples/evas3d_scene_on_button_example.c
+++ b/src/examples/evas3d_scene_on_button_example.c
@@ -109,8 +109,7 @@ _animate_scene(void *data)
109 109
110 angle += d_angle; 110 angle += d_angle;
111 111
112 eo_do(scene->mesh_node, 112 evas_canvas3d_node_orientation_angle_axis_set(scene->mesh_node, angle, 1.0, 1.0, 1.0);
113 evas_canvas3d_node_orientation_angle_axis_set(angle, 1.0, 1.0, 1.0));
114 113
115 /* Rotate */ 114 /* Rotate */
116 if (angle > 360.0) angle -= 360.0f; 115 if (angle > 360.0) angle -= 360.0f;
@@ -123,38 +122,30 @@ _camera_setup(Scene_Data *data)
123{ 122{
124 data->camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas); 123 data->camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
125 124
126 eo_do(data->camera, 125 evas_canvas3d_camera_projection_perspective_set(data->camera, 60.0, 1.0, 2.0, 50.0);
127 evas_canvas3d_camera_projection_perspective_set(60.0, 1.0, 2.0, 50.0));
128 126
129 data->camera_node = 127 data->camera_node =
130 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, 128 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
131 evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_CAMERA)); 129 evas_canvas3d_node_camera_set(data->camera_node, data->camera);
132 eo_do(data->camera_node, 130 evas_canvas3d_node_position_set(data->camera_node, 0.0, 0.0, 10.0);
133 evas_canvas3d_node_camera_set(data->camera), 131 evas_canvas3d_node_look_at_set(data->camera_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0);
134 evas_canvas3d_node_position_set(0.0, 0.0, 10.0), 132 evas_canvas3d_node_member_add(data->root_node, data->camera_node);
135 evas_canvas3d_node_look_at_set(EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0,
136 EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0));
137 eo_do(data->root_node, evas_canvas3d_node_member_add(data->camera_node));
138} 133}
139 134
140static void 135static void
141_light_setup(Scene_Data *data) 136_light_setup(Scene_Data *data)
142{ 137{
143 data->light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas); 138 data->light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
144 eo_do(data->light, 139 evas_canvas3d_light_ambient_set(data->light, 0.2, 0.2, 0.2, 1.0);
145 evas_canvas3d_light_ambient_set(0.2, 0.2, 0.2, 1.0), 140 evas_canvas3d_light_diffuse_set(data->light, 1.0, 1.0, 1.0, 1.0);
146 evas_canvas3d_light_diffuse_set(1.0, 1.0, 1.0, 1.0), 141 evas_canvas3d_light_specular_set(data->light, 1.0, 1.0, 1.0, 1.0);
147 evas_canvas3d_light_specular_set(1.0, 1.0, 1.0, 1.0));
148 142
149 data->light_node = 143 data->light_node =
150 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, 144 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
151 evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_LIGHT)); 145 evas_canvas3d_node_light_set(data->light_node, data->light);
152 eo_do(data->light_node, 146 evas_canvas3d_node_position_set(data->light_node, 0.0, 0.0, 10.0);
153 evas_canvas3d_node_light_set(data->light), 147 evas_canvas3d_node_look_at_set(data->light_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0);
154 evas_canvas3d_node_position_set(0.0, 0.0, 10.0), 148 evas_canvas3d_node_member_add(data->root_node, data->light_node);
155 evas_canvas3d_node_look_at_set(EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0,
156 EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0));
157 eo_do(data->root_node, evas_canvas3d_node_member_add(data->light_node));
158} 149}
159static void 150static void
160_mesh_setup(Scene_Data *data) 151_mesh_setup(Scene_Data *data)
@@ -162,70 +153,49 @@ _mesh_setup(Scene_Data *data)
162 /* Setup material. */ 153 /* Setup material. */
163 data->material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas); 154 data->material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
164 155
165 eo_do(data->material, 156 evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE);
166 evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE), 157 evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE);
167 evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE), 158 evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, EINA_TRUE);
168 evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, EINA_TRUE), 159 evas_canvas3d_material_color_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, 0.2, 0.2, 0.2, 1.0);
169 160 evas_canvas3d_material_color_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, 0.8, 0.8, 0.8, 1.0);
170 evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, 161 evas_canvas3d_material_color_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0);
171 0.2, 0.2, 0.2, 1.0), 162 evas_canvas3d_material_shininess_set(data->material, 100.0);
172 evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE,
173 0.8, 0.8, 0.8, 1.0),
174 evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR,
175 1.0, 1.0, 1.0, 1.0),
176 evas_canvas3d_material_shininess_set(100.0));
177 163
178 /* Setup mesh. */ 164 /* Setup mesh. */
179 data->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas); 165 data->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
180 eo_do(data->mesh, 166 evas_canvas3d_mesh_vertex_count_set(data->mesh, 24);
181 evas_canvas3d_mesh_vertex_count_set(24), 167 evas_canvas3d_mesh_frame_add(data->mesh, 0);
182 evas_canvas3d_mesh_frame_add(0), 168 evas_canvas3d_mesh_frame_vertex_data_set(data->mesh, 0, EVAS_CANVAS3D_VERTEX_ATTRIB_POSITION, 12 * sizeof(float), &cube_vertices[ 0]);
183 169 evas_canvas3d_mesh_frame_vertex_data_set(data->mesh, 0, EVAS_CANVAS3D_VERTEX_ATTRIB_NORMAL, 12 * sizeof(float), &cube_vertices[ 3]);
184 evas_canvas3d_mesh_frame_vertex_data_set(0, EVAS_CANVAS3D_VERTEX_ATTRIB_POSITION, 170 evas_canvas3d_mesh_frame_vertex_data_set(data->mesh, 0, EVAS_CANVAS3D_VERTEX_ATTRIB_COLOR, 12 * sizeof(float), &cube_vertices[ 6]);
185 12 * sizeof(float), 171 evas_canvas3d_mesh_frame_vertex_data_set(data->mesh, 0, EVAS_CANVAS3D_VERTEX_ATTRIB_TEXCOORD, 12 * sizeof(float), &cube_vertices[10]);
186 &cube_vertices[ 0]), 172 evas_canvas3d_mesh_index_data_set(data->mesh, EVAS_CANVAS3D_INDEX_FORMAT_UNSIGNED_SHORT, 36, &cube_indices[0]);
187 evas_canvas3d_mesh_frame_vertex_data_set(0, EVAS_CANVAS3D_VERTEX_ATTRIB_NORMAL, 173 evas_canvas3d_mesh_vertex_assembly_set(data->mesh, EVAS_CANVAS3D_VERTEX_ASSEMBLY_TRIANGLES);
188 12 * sizeof(float), 174 evas_canvas3d_mesh_shade_mode_set(data->mesh, EVAS_CANVAS3D_SHADE_MODE_PHONG);
189 &cube_vertices[ 3]), 175 evas_canvas3d_mesh_frame_material_set(data->mesh, 0, data->material);
190 evas_canvas3d_mesh_frame_vertex_data_set(0, EVAS_CANVAS3D_VERTEX_ATTRIB_COLOR,
191 12 * sizeof(float),
192 &cube_vertices[ 6]),
193 evas_canvas3d_mesh_frame_vertex_data_set(0, EVAS_CANVAS3D_VERTEX_ATTRIB_TEXCOORD,
194 12 * sizeof(float),
195 &cube_vertices[10]),
196
197 evas_canvas3d_mesh_index_data_set(EVAS_CANVAS3D_INDEX_FORMAT_UNSIGNED_SHORT,
198 36, &cube_indices[0]),
199 evas_canvas3d_mesh_vertex_assembly_set(EVAS_CANVAS3D_VERTEX_ASSEMBLY_TRIANGLES),
200 evas_canvas3d_mesh_shade_mode_set(EVAS_CANVAS3D_SHADE_MODE_PHONG),
201 evas_canvas3d_mesh_frame_material_set(0, data->material));
202 176
203 data->mesh_node = 177 data->mesh_node =
204 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, 178 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
205 evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH)); 179 evas_canvas3d_node_member_add(data->root_node, data->mesh_node);
206 eo_do(data->root_node, evas_canvas3d_node_member_add(data->mesh_node)); 180 evas_canvas3d_node_mesh_add(data->mesh_node, data->mesh);
207 eo_do(data->mesh_node, evas_canvas3d_node_mesh_add(data->mesh));
208} 181}
209 182
210static void 183static void
211_scene_setup(Scene_Data *data) 184_scene_setup(Scene_Data *data)
212{ 185{
213 data->scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas); 186 data->scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
214 eo_do(data->scene, 187 evas_canvas3d_scene_size_set(data->scene, WIDTH - d_w, HEIGHT - d_h);
215 evas_canvas3d_scene_size_set(WIDTH - d_w, HEIGHT - d_h); 188 evas_canvas3d_scene_background_color_set(data->scene, 0.0, 0.0, 0.0, 0.0);
216 evas_canvas3d_scene_background_color_set(0.0, 0.0, 0.0, 0.0));
217 189
218 data->root_node = 190 data->root_node =
219 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, 191 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
220 evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_NODE));
221 192
222 _camera_setup(data); 193 _camera_setup(data);
223 _light_setup(data); 194 _light_setup(data);
224 _mesh_setup(data); 195 _mesh_setup(data);
225 196
226 eo_do(data->scene, 197 evas_canvas3d_scene_root_node_set(data->scene, data->root_node);
227 evas_canvas3d_scene_root_node_set(data->root_node), 198 evas_canvas3d_scene_camera_node_set(data->scene, data->camera_node);
228 evas_canvas3d_scene_camera_node_set(data->camera_node));
229} 199}
230 200
231static void 201static void
@@ -237,17 +207,13 @@ _stop_scene(void *data,
237 Evas_Event_Mouse_Down *ev = event_info; 207 Evas_Event_Mouse_Down *ev = event_info;
238 Scene_Data *d = (Scene_Data *)data; 208 Scene_Data *d = (Scene_Data *)data;
239 209
240 eo_do(d->mesh_node, 210 evas_canvas3d_node_scale_set(d->mesh_node, 0.97, 0.97, 0.97);
241 evas_canvas3d_node_scale_set(0.97, 0.97, 0.97));
242 211
243 if (ev->button == 1) 212 if (ev->button == 1)
244 { 213 {
245 Evas_Canvas3D_Node *ret; 214 Evas_Canvas3D_Node *ret;
246 215
247 if (eo_do_ret(d->scene, ret, 216 if (evas_canvas3d_scene_exist(d->scene, (ev->canvas.x - (d_w / 2)), (ev->canvas.y - (d_h / 2)), d->mesh_node))
248 evas_canvas3d_scene_exist((ev->canvas.x - (d_w / 2)),
249 (ev->canvas.y - (d_h / 2)),
250 d->mesh_node)))
251 { 217 {
252 d_angle = 0; 218 d_angle = 0;
253 } 219 }
@@ -264,8 +230,7 @@ _play_scene(void *data,
264 230
265 d_angle = 0.5; 231 d_angle = 0.5;
266 232
267 eo_do(d->mesh_node, 233 evas_canvas3d_node_scale_set(d->mesh_node, 1.0, 1.0, 1.0);
268 evas_canvas3d_node_scale_set(1.0, 1.0, 1.0));
269} 234}
270 235
271int 236int
@@ -286,11 +251,10 @@ elm_main(int argc, char **argv)
286 _scene_setup(&data); 251 _scene_setup(&data);
287 252
288 image = evas_object_image_filled_add(evas); 253 image = evas_object_image_filled_add(evas);
289 eo_do(image, 254 efl_gfx_visible_set(image, EINA_TRUE);
290 efl_gfx_visible_set(EINA_TRUE));
291 255
292 /* Set the image object as render target for 3D scene. */ 256 /* Set the image object as render target for 3D scene. */
293 eo_do(image, evas_obj_image_scene_set(data.scene)); 257 evas_obj_image_scene_set(image, data.scene);
294 258
295 /* Setup scene to the widget button. */ 259 /* Setup scene to the widget button. */
296 btn = elm_button_add(win); 260 btn = elm_button_add(win);
diff --git a/src/examples/filemvc.c b/src/examples/filemvc.c
index 00f4f8634..6ef183e44 100644
--- a/src/examples/filemvc.c
+++ b/src/examples/filemvc.c
@@ -54,7 +54,7 @@ _list_selected_cb(void *data EINA_UNUSED, const Eo_Event *event)
54 ethumb_client_file_free(elm_thumb_ethumb_client_get()); 54 ethumb_client_file_free(elm_thumb_ethumb_client_get());
55 55
56 printf("LIST selected model\n"); 56 printf("LIST selected model\n");
57 eo_do(priv->formview, elm_view_form_model_set(child)); 57 elm_view_form_model_set(priv->formview, child);
58 return EINA_TRUE; 58 return EINA_TRUE;
59} 59}
60 60
@@ -69,11 +69,11 @@ _tree_selected_cb(void *data, const Eo_Event *event)
69 69
70 printf("TREE selected model\n"); 70 printf("TREE selected model\n");
71 71
72 eo_do(child, efl_model_property_get("path", &vpath)); 72 efl_model_property_get(child, "path", &vpath);
73 eina_value_get(vpath, &path); 73 eina_value_get(vpath, &path);
74 model = eo_add(EIO_MODEL_CLASS, NULL, eio_model_path_set(path)); 74 model = eo_add(EIO_MODEL_CLASS, NULL, eio_model_path_set(eoid, path));
75 eo_do(model, efl_model_load()); 75 efl_model_load(model);
76 eo_do(priv->fileview, elm_view_list_model_set(model)); 76 elm_view_list_model_set(priv->fileview, model);
77 return EINA_TRUE; 77 return EINA_TRUE;
78} 78}
79 79
@@ -137,35 +137,35 @@ elm_main(int argc, char **argv)
137 else dirname = EFL_MODEL_TEST_FILENAME_PATH; 137 else dirname = EFL_MODEL_TEST_FILENAME_PATH;
138 138
139 //treemodel 139 //treemodel
140 priv.treemodel = eo_add(EIO_MODEL_CLASS, NULL, eio_model_path_set(dirname)); 140 priv.treemodel = eo_add(EIO_MODEL_CLASS, NULL, eio_model_path_set(eoid, dirname));
141 eo_do(priv.treemodel, eio_model_children_filter_set(_filter_cb, NULL)); 141 eio_model_children_filter_set(priv.treemodel, _filter_cb, NULL);
142 eo_do(priv.treemodel, efl_model_load()); 142 efl_model_load(priv.treemodel);
143 143
144 //treeview 144 //treeview
145 genlist = elm_genlist_add(win); 145 genlist = elm_genlist_add(win);
146 priv.treeview = eo_add(ELM_VIEW_LIST_CLASS, NULL, elm_view_list_genlist_set(genlist, ELM_GENLIST_ITEM_TREE, NULL)); 146 priv.treeview = eo_add(ELM_VIEW_LIST_CLASS, NULL, elm_view_list_genlist_set(eoid, genlist, ELM_GENLIST_ITEM_TREE, NULL));
147 eo_do(priv.treeview, elm_view_list_property_connect("filename", "elm.text"), 147 elm_view_list_property_connect(priv.treeview, "filename", "elm.text");
148 elm_view_list_property_connect("icon", "elm.swallow.icon"), 148 elm_view_list_property_connect(priv.treeview, "icon", "elm.swallow.icon");
149 elm_view_list_model_set(priv.treemodel)); 149 elm_view_list_model_set(priv.treeview, priv.treemodel);
150 _widget_init(genlist); 150 _widget_init(genlist);
151 elm_object_part_content_set(panes, "left", genlist); 151 elm_object_part_content_set(panes, "left", genlist);
152 eo_do(panes, elm_obj_panes_content_left_size_set(0.3)); 152 elm_obj_panes_content_left_size_set(panes, 0.3);
153 153
154 vpanes = elm_panes_add(win); 154 vpanes = elm_panes_add(win);
155 _widget_init(vpanes); 155 _widget_init(vpanes);
156 elm_object_part_content_set(panes, "right", vpanes); 156 elm_object_part_content_set(panes, "right", vpanes);
157 eo_do(priv.treeview, eo_event_callback_add(ELM_VIEW_LIST_EVENT_MODEL_SELECTED, _tree_selected_cb, &priv)); 157 eo_event_callback_add(priv.treeview, ELM_VIEW_LIST_EVENT_MODEL_SELECTED, _tree_selected_cb, &priv);
158 //listview 158 //listview
159 genlist = elm_genlist_add(win); 159 genlist = elm_genlist_add(win);
160 priv.fileview = eo_add(ELM_VIEW_LIST_CLASS, NULL, elm_view_list_genlist_set(genlist, ELM_GENLIST_ITEM_NONE, "double_label")); 160 priv.fileview = eo_add(ELM_VIEW_LIST_CLASS, NULL, elm_view_list_genlist_set(eoid, genlist, ELM_GENLIST_ITEM_NONE, "double_label"));
161 eo_do(priv.fileview, elm_view_list_property_connect("filename", "elm.text"), 161 elm_view_list_property_connect(priv.fileview, "filename", "elm.text");
162 elm_view_list_property_connect("size", "elm.text.sub")); 162 elm_view_list_property_connect(priv.fileview, "size", "elm.text.sub");
163 163
164 evas_object_event_callback_add(win, EVAS_CALLBACK_DEL, _cleanup_cb, &priv); 164 evas_object_event_callback_add(win, EVAS_CALLBACK_DEL, _cleanup_cb, &priv);
165 _widget_init(genlist); 165 _widget_init(genlist);
166 elm_object_part_content_set(vpanes, "left", genlist); 166 elm_object_part_content_set(vpanes, "left", genlist);
167 167
168 eo_do(priv.fileview, eo_event_callback_add(ELM_VIEW_LIST_EVENT_MODEL_SELECTED, _list_selected_cb, &priv)); 168 eo_event_callback_add(priv.fileview, ELM_VIEW_LIST_EVENT_MODEL_SELECTED, _list_selected_cb, &priv);
169 169
170 //formview 170 //formview
171 bxr = elm_box_add(win); 171 bxr = elm_box_add(win);
@@ -174,13 +174,13 @@ elm_main(int argc, char **argv)
174 priv.formview = eo_add(ELM_VIEW_FORM_CLASS, NULL); 174 priv.formview = eo_add(ELM_VIEW_FORM_CLASS, NULL);
175 175
176 /*Label widget */ 176 /*Label widget */
177 eo_do(priv.formview, elm_view_form_widget_add("filename", _label_init(win, bxr, "File Name"))); 177 elm_view_form_widget_add(priv.formview, "filename", _label_init(win, bxr, "File Name"));
178 178
179 _label_init(win, bxr, "Size:"); 179 _label_init(win, bxr, "Size:");
180 eo_do(priv.formview, elm_view_form_widget_add("size", _label_init(win, bxr, ""))); 180 elm_view_form_widget_add(priv.formview, "size", _label_init(win, bxr, ""));
181 181
182 _label_init(win, bxr, "Modified:"); 182 _label_init(win, bxr, "Modified:");
183 eo_do(priv.formview, elm_view_form_widget_add("mtime", _label_init(win, bxr, ""))); 183 elm_view_form_widget_add(priv.formview, "mtime", _label_init(win, bxr, ""));
184 184
185 /* Entry widget */ 185 /* Entry widget */
186 entry = elm_entry_add(win); 186 entry = elm_entry_add(win);
@@ -188,7 +188,7 @@ elm_main(int argc, char **argv)
188 evas_object_size_hint_weight_set(entry, EVAS_HINT_FILL, EVAS_HINT_FILL); 188 evas_object_size_hint_weight_set(entry, EVAS_HINT_FILL, EVAS_HINT_FILL);
189 elm_box_pack_end(bxr, entry); 189 elm_box_pack_end(bxr, entry);
190 evas_object_show(entry); 190 evas_object_show(entry);
191 eo_do(priv.formview, elm_view_form_widget_add("path", entry)); 191 elm_view_form_widget_add(priv.formview, "path", entry);
192 192
193 /* Thumb widget */ 193 /* Thumb widget */
194 elm_need_ethumb(); 194 elm_need_ethumb();
@@ -196,7 +196,7 @@ elm_main(int argc, char **argv)
196 _widget_init(priv.thumb); 196 _widget_init(priv.thumb);
197 elm_box_pack_end(bxr, priv.thumb); 197 elm_box_pack_end(bxr, priv.thumb);
198 elm_thumb_editable_set(priv.thumb, EINA_FALSE); 198 elm_thumb_editable_set(priv.thumb, EINA_FALSE);
199 eo_do(priv.formview, elm_view_form_widget_add("path", priv.thumb)); 199 elm_view_form_widget_add(priv.formview, "path", priv.thumb);
200 evas_object_smart_callback_add(priv.thumb, "generate,error", _thumb_error_cb, &priv); 200 evas_object_smart_callback_add(priv.thumb, "generate,error", _thumb_error_cb, &priv);
201 evas_object_smart_callback_add(priv.thumb, "load,error", _thumb_error_cb, &priv); 201 evas_object_smart_callback_add(priv.thumb, "load,error", _thumb_error_cb, &priv);
202 202
diff --git a/src/examples/fileviewlist.c b/src/examples/fileviewlist.c
index e50789333..d91efdb23 100644
--- a/src/examples/fileviewlist.c
+++ b/src/examples/fileviewlist.c
@@ -55,15 +55,14 @@ elm_main(int argc, char **argv)
55 evas_object_size_hint_weight_set(genlist, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); 55 evas_object_size_hint_weight_set(genlist, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
56 evas_object_show(genlist); 56 evas_object_show(genlist);
57 57
58 priv.filemodel = eo_add(EIO_MODEL_CLASS, NULL, eio_model_path_set(dirname)); 58 priv.filemodel = eo_add(EIO_MODEL_CLASS, NULL, eio_model_path_set(eoid, dirname));
59 priv.fileview = eo_add(ELM_VIEW_LIST_CLASS, NULL, 59 priv.fileview = eo_add(ELM_VIEW_LIST_CLASS, NULL, elm_view_list_genlist_set(eoid, genlist, ELM_GENLIST_ITEM_TREE, "double_label"));
60 elm_view_list_genlist_set(genlist, ELM_GENLIST_ITEM_TREE, "double_label")); 60 elm_view_list_model_set(priv.fileview, priv.filemodel);
61 eo_do(priv.fileview, elm_view_list_model_set(priv.filemodel)); 61 efl_model_load(priv.filemodel);
62 eo_do(priv.filemodel, efl_model_load());
63 evas_object_event_callback_add(win, EVAS_CALLBACK_DEL, _cleanup_cb, &priv); 62 evas_object_event_callback_add(win, EVAS_CALLBACK_DEL, _cleanup_cb, &priv);
64 63
65 eo_do(priv.fileview, elm_view_list_property_connect("filename", "elm.text"), 64 elm_view_list_property_connect(priv.fileview, "filename", "elm.text");
66 elm_view_list_property_connect("mtime", "elm.text.sub")); 65 elm_view_list_property_connect(priv.fileview, "mtime", "elm.text.sub");
67 66
68 evas_object_resize(win, 320, 520); 67 evas_object_resize(win, 320, 520);
69 elm_win_resize_object_add(win, genlist); 68 elm_win_resize_object_add(win, genlist);
diff --git a/src/examples/performance/camera_light.c b/src/examples/performance/camera_light.c
index 2d4a28c31..45992ba87 100644
--- a/src/examples/performance/camera_light.c
+++ b/src/examples/performance/camera_light.c
@@ -104,7 +104,7 @@ init_panel_camera_light(Evas_Object *win, Eo *camera_node, Eo *light_node, doubl
104 evas_object_show(spZ); 104 evas_object_show(spZ);
105 evas_object_smart_callback_add(spZ, "changed", _camera_light_changeZ_cb, camera_node); 105 evas_object_smart_callback_add(spZ, "changed", _camera_light_changeZ_cb, camera_node);
106 106
107 eo_do(camera_node, evas_canvas3d_node_position_get(EVAS_CANVAS3D_SPACE_PARENT, &px, &py, &pz)); 107 evas_canvas3d_node_position_get(camera_node, EVAS_CANVAS3D_SPACE_PARENT, &px, &py, &pz);
108 elm_spinner_value_set(spX, px); 108 elm_spinner_value_set(spX, px);
109 elm_spinner_value_set(spY, py); 109 elm_spinner_value_set(spY, py);
110 elm_spinner_value_set(spZ, pz); 110 elm_spinner_value_set(spZ, pz);
@@ -176,7 +176,7 @@ init_panel_camera_light(Evas_Object *win, Eo *camera_node, Eo *light_node, doubl
176 evas_object_show(splZ); 176 evas_object_show(splZ);
177 evas_object_smart_callback_add(splZ, "changed", _camera_light_changeZ_cb, light_node); 177 evas_object_smart_callback_add(splZ, "changed", _camera_light_changeZ_cb, light_node);
178 178
179 eo_do(light_node, evas_canvas3d_node_position_get(EVAS_CANVAS3D_SPACE_PARENT, &px, &py, &pz)); 179 evas_canvas3d_node_position_get(light_node, EVAS_CANVAS3D_SPACE_PARENT, &px, &py, &pz);
180 elm_spinner_value_set(splX, px); 180 elm_spinner_value_set(splX, px);
181 elm_spinner_value_set(splY, py); 181 elm_spinner_value_set(splY, py);
182 elm_spinner_value_set(splZ, pz); 182 elm_spinner_value_set(splZ, pz);
@@ -232,9 +232,9 @@ _camera_light_changeX_cb(void *data, Evas_Object *obj, void *event_info)
232 232
233 if ((Eo*)data) 233 if ((Eo*)data)
234 { 234 {
235 eo_do((Eo*)data, evas_canvas3d_node_position_get(EVAS_CANVAS3D_SPACE_PARENT, NULL, &y, &z)); 235 evas_canvas3d_node_position_get((Eo*)data, EVAS_CANVAS3D_SPACE_PARENT, NULL, &y, &z);
236 x = elm_spinner_value_get(obj); 236 x = elm_spinner_value_get(obj);
237 eo_do((Eo*)data, evas_canvas3d_node_position_set(x, y, z)); 237 evas_canvas3d_node_position_set((Eo*)data, x, y, z);
238 } 238 }
239} 239}
240static void 240static void
@@ -244,9 +244,9 @@ _camera_light_changeY_cb(void *data, Evas_Object *obj, void *event_info)
244 244
245 if ((Eo*)data) 245 if ((Eo*)data)
246 { 246 {
247 eo_do((Eo*)data, evas_canvas3d_node_position_get(EVAS_CANVAS3D_SPACE_PARENT, &x, NULL, &z)); 247 evas_canvas3d_node_position_get((Eo*)data, EVAS_CANVAS3D_SPACE_PARENT, &x, NULL, &z);
248 y = elm_spinner_value_get(obj); 248 y = elm_spinner_value_get(obj);
249 eo_do((Eo*)data, evas_canvas3d_node_position_set(x, y, z)); 249 evas_canvas3d_node_position_set((Eo*)data, x, y, z);
250 } 250 }
251} 251}
252static void 252static void
@@ -256,9 +256,9 @@ _camera_light_changeZ_cb(void *data, Evas_Object *obj, void *event_info)
256 256
257 if ((Eo*)data) 257 if ((Eo*)data)
258 { 258 {
259 eo_do((Eo*)data, evas_canvas3d_node_position_get(EVAS_CANVAS3D_SPACE_PARENT, &x, &y, NULL)); 259 evas_canvas3d_node_position_get((Eo*)data, EVAS_CANVAS3D_SPACE_PARENT, &x, &y, NULL);
260 z = elm_spinner_value_get(obj); 260 z = elm_spinner_value_get(obj);
261 eo_do((Eo*)data, evas_canvas3d_node_position_set(x, y, z)); 261 evas_canvas3d_node_position_set((Eo*)data, x, y, z);
262 } 262 }
263} 263}
264static void 264static void
@@ -270,7 +270,7 @@ _camera_light_angle_change_cb(void *data, Evas_Object *obj, void *event_info)
270 { 270 {
271 aw = elm_spinner_value_get(obj); 271 aw = elm_spinner_value_get(obj);
272 aw = cos(aw * M_PI / 360.0); 272 aw = cos(aw * M_PI / 360.0);
273 eo_do(((Eo*)data), evas_canvas3d_node_orientation_set(key->x, key->y, key->z, aw)); 273 evas_canvas3d_node_orientation_set(((Eo*)data), key->x, key->y, key->z, aw);
274 } 274 }
275} 275}
276static void 276static void
diff --git a/src/examples/performance/graphical.c b/src/examples/performance/graphical.c
index 9bc60e827..788459195 100644
--- a/src/examples/performance/graphical.c
+++ b/src/examples/performance/graphical.c
@@ -250,45 +250,31 @@ void _init_bounding()
250 250
251 globalGraphical.material_box = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, globalGraphical.evas); 251 globalGraphical.material_box = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, globalGraphical.evas);
252 252
253 eo_do(globalGraphical.material_box, 253 evas_canvas3d_material_enable_set(globalGraphical.material_box, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE);
254 evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE), 254 evas_canvas3d_material_enable_set(globalGraphical.material_box, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE);
255 evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE), 255 evas_canvas3d_material_enable_set(globalGraphical.material_box, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, EINA_TRUE);
256 evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, EINA_TRUE), 256 evas_canvas3d_material_color_set(globalGraphical.material_box, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, 0.2, 0.2, 0.2, 1.0);
257 257 evas_canvas3d_material_color_set(globalGraphical.material_box, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, 0.8, 0.8, 0.8, 1.0);
258 evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, 0.2, 0.2, 0.2, 1.0), 258 evas_canvas3d_material_color_set(globalGraphical.material_box, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0);
259 evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, 0.8, 0.8, 0.8, 1.0), 259 evas_canvas3d_material_shininess_set(globalGraphical.material_box, 100.0);
260 evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0),
261 evas_canvas3d_material_shininess_set(100.0));
262 260
263 /* Setup mesh. */ 261 /* Setup mesh. */
264 globalGraphical.mesh_box = eo_add(EVAS_CANVAS3D_MESH_CLASS, globalGraphical.evas); 262 globalGraphical.mesh_box = eo_add(EVAS_CANVAS3D_MESH_CLASS, globalGraphical.evas);
265 eo_do(globalGraphical.mesh_box, 263 evas_canvas3d_mesh_vertex_count_set(globalGraphical.mesh_box, 24);
266 evas_canvas3d_mesh_vertex_count_set(24), 264 evas_canvas3d_mesh_frame_add(globalGraphical.mesh_box, 0);
267 evas_canvas3d_mesh_frame_add(0), 265 evas_canvas3d_mesh_frame_vertex_data_copy_set(globalGraphical.mesh_box, 0, EVAS_CANVAS3D_VERTEX_ATTRIB_POSITION, 12 * sizeof(float), &cube_vertices[ 0]);
268 266 evas_canvas3d_mesh_frame_vertex_data_copy_set(globalGraphical.mesh_box, 0, EVAS_CANVAS3D_VERTEX_ATTRIB_NORMAL, 12 * sizeof(float), &cube_vertices[ 3]);
269 evas_canvas3d_mesh_frame_vertex_data_copy_set(0, EVAS_CANVAS3D_VERTEX_ATTRIB_POSITION, 267 evas_canvas3d_mesh_frame_vertex_data_copy_set(globalGraphical.mesh_box, 0, EVAS_CANVAS3D_VERTEX_ATTRIB_COLOR, 12 * sizeof(float), &cube_vertices[ 6]);
270 12 * sizeof(float), &cube_vertices[ 0]), 268 evas_canvas3d_mesh_frame_vertex_data_copy_set(globalGraphical.mesh_box, 0, EVAS_CANVAS3D_VERTEX_ATTRIB_TEXCOORD, 12 * sizeof(float), &cube_vertices[10]);
271 evas_canvas3d_mesh_frame_vertex_data_copy_set(0, EVAS_CANVAS3D_VERTEX_ATTRIB_NORMAL, 269 evas_canvas3d_mesh_index_data_copy_set(globalGraphical.mesh_box, EVAS_CANVAS3D_INDEX_FORMAT_UNSIGNED_SHORT, 36, &cube_indices[0]);
272 12 * sizeof(float), &cube_vertices[ 3]), 270 evas_canvas3d_mesh_vertex_assembly_set(globalGraphical.mesh_box, EVAS_CANVAS3D_VERTEX_ASSEMBLY_TRIANGLES);
273 evas_canvas3d_mesh_frame_vertex_data_copy_set(0, EVAS_CANVAS3D_VERTEX_ATTRIB_COLOR, 271 evas_canvas3d_mesh_shade_mode_set(globalGraphical.mesh_box, EVAS_CANVAS3D_SHADE_MODE_PHONG);
274 12 * sizeof(float), &cube_vertices[ 6]), 272 evas_canvas3d_mesh_frame_material_set(globalGraphical.mesh_box, 0, globalGraphical.material_box);
275 evas_canvas3d_mesh_frame_vertex_data_copy_set(0, EVAS_CANVAS3D_VERTEX_ATTRIB_TEXCOORD,
276 12 * sizeof(float), &cube_vertices[10]),
277
278 evas_canvas3d_mesh_index_data_copy_set(EVAS_CANVAS3D_INDEX_FORMAT_UNSIGNED_SHORT,
279 36, &cube_indices[0]),
280 evas_canvas3d_mesh_vertex_assembly_set(EVAS_CANVAS3D_VERTEX_ASSEMBLY_TRIANGLES),
281
282 evas_canvas3d_mesh_shade_mode_set(EVAS_CANVAS3D_SHADE_MODE_PHONG),
283
284 evas_canvas3d_mesh_frame_material_set(0, globalGraphical.material_box));
285 273
286 globalGraphical.mesh_nodebox = 274 globalGraphical.mesh_nodebox =
287 eo_add(EVAS_CANVAS3D_NODE_CLASS, globalGraphical.evas, 275 eo_add(EVAS_CANVAS3D_NODE_CLASS, globalGraphical.evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH), evas_canvas3d_node_position_set(eoid, 0, -30.0, 0.0));
288 evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH), 276 evas_canvas3d_node_member_add(globalGraphical.root_node, globalGraphical.mesh_nodebox);
289 evas_canvas3d_node_position_set(0, -30.0, 0.0)); 277 evas_canvas3d_node_mesh_add(globalGraphical.mesh_nodebox, globalGraphical.mesh_box);
290 eo_do(globalGraphical.root_node, evas_canvas3d_node_member_add(globalGraphical.mesh_nodebox));
291 eo_do(globalGraphical.mesh_nodebox, evas_canvas3d_node_mesh_add(globalGraphical.mesh_box));
292} 278}
293static void 279static void
294_change_scene_setup() 280_change_scene_setup()
@@ -297,12 +283,11 @@ _change_scene_setup()
297 Eina_List *l = NULL; 283 Eina_List *l = NULL;
298 int i = 0; 284 int i = 0;
299 int quantity = (globalGraphical.count + 1) * (globalGraphical.count + 1); 285 int quantity = (globalGraphical.count + 1) * (globalGraphical.count + 1);
300 eo_do(globalGraphical.camera, 286 evas_canvas3d_camera_projection_perspective_set(globalGraphical.camera, globalGraphical.angle, 1.0, 2.0, 1000);
301 evas_canvas3d_camera_projection_perspective_set(globalGraphical.angle, 1.0, 2.0, 1000));
302 287
303 EINA_LIST_FOREACH (globalGraphical.list_nodes, l, node) 288 EINA_LIST_FOREACH (globalGraphical.list_nodes, l, node)
304 { 289 {
305 eo_do(globalGraphical.root_node, evas_canvas3d_node_member_del(node)); 290 evas_canvas3d_node_member_del(globalGraphical.root_node, node);
306 globalGraphical.list_nodes = eina_list_remove(globalGraphical.list_nodes, node); 291 globalGraphical.list_nodes = eina_list_remove(globalGraphical.list_nodes, node);
307 /*eo_del(node);Unless evas_canvas3d_destructors work properly*/ 292 /*eo_del(node);Unless evas_canvas3d_destructors work properly*/
308 } 293 }
@@ -325,59 +310,47 @@ _change_scene_setup()
325 globalGraphical.mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, globalGraphical.evas); 310 globalGraphical.mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, globalGraphical.evas);
326 if (!globalGraphical.model_path) 311 if (!globalGraphical.model_path)
327 { 312 {
328 eo_do(globalGraphical.mesh, 313 evas_canvas3d_mesh_vertex_count_set(globalGraphical.mesh, globalGraphical.vertex_count);
329 evas_canvas3d_mesh_vertex_count_set(globalGraphical.vertex_count), 314 evas_canvas3d_mesh_frame_add(globalGraphical.mesh, 0);
330 evas_canvas3d_mesh_frame_add(0), 315 evas_canvas3d_mesh_frame_vertex_data_copy_set(globalGraphical.mesh, 0, EVAS_CANVAS3D_VERTEX_ATTRIB_POSITION, sizeof(vertex), &globalGraphical.vertices[0].position);
331 evas_canvas3d_mesh_frame_vertex_data_copy_set(0, EVAS_CANVAS3D_VERTEX_ATTRIB_POSITION, 316 evas_canvas3d_mesh_frame_vertex_data_copy_set(globalGraphical.mesh, 0, EVAS_CANVAS3D_VERTEX_ATTRIB_NORMAL, sizeof(vertex), &globalGraphical.vertices[0].normal);
332 sizeof(vertex), 317 evas_canvas3d_mesh_frame_vertex_data_copy_set(globalGraphical.mesh, 0, EVAS_CANVAS3D_VERTEX_ATTRIB_TANGENT, sizeof(vertex), &globalGraphical.vertices[0].tangent);
333 &globalGraphical.vertices[0].position), 318 evas_canvas3d_mesh_frame_vertex_data_copy_set(globalGraphical.mesh, 0, EVAS_CANVAS3D_VERTEX_ATTRIB_COLOR, sizeof(vertex), &globalGraphical.vertices[0].color);
334 evas_canvas3d_mesh_frame_vertex_data_copy_set(0, EVAS_CANVAS3D_VERTEX_ATTRIB_NORMAL, 319 evas_canvas3d_mesh_frame_vertex_data_copy_set(globalGraphical.mesh, 0, EVAS_CANVAS3D_VERTEX_ATTRIB_TEXCOORD, sizeof(vertex), &globalGraphical.vertices[0].texcoord);
335 sizeof(vertex), 320 evas_canvas3d_mesh_index_data_copy_set(globalGraphical.mesh, EVAS_CANVAS3D_INDEX_FORMAT_UNSIGNED_SHORT, globalGraphical.index_count, &globalGraphical.indices[0]);
336 &globalGraphical.vertices[0].normal), 321 evas_canvas3d_mesh_vertex_assembly_set(globalGraphical.mesh, EVAS_CANVAS3D_VERTEX_ASSEMBLY_TRIANGLES);
337 evas_canvas3d_mesh_frame_vertex_data_copy_set(0, EVAS_CANVAS3D_VERTEX_ATTRIB_TANGENT, 322 evas_canvas3d_mesh_shade_mode_set(globalGraphical.mesh, EVAS_CANVAS3D_SHADE_MODE_PHONG);
338 sizeof(vertex),
339 &globalGraphical.vertices[0].tangent),
340 evas_canvas3d_mesh_frame_vertex_data_copy_set(0, EVAS_CANVAS3D_VERTEX_ATTRIB_COLOR,
341 sizeof(vertex), &globalGraphical.vertices[0].color),
342 evas_canvas3d_mesh_frame_vertex_data_copy_set(0, EVAS_CANVAS3D_VERTEX_ATTRIB_TEXCOORD,
343 sizeof(vertex),
344 &globalGraphical.vertices[0].texcoord),
345
346 evas_canvas3d_mesh_index_data_copy_set(EVAS_CANVAS3D_INDEX_FORMAT_UNSIGNED_SHORT,
347 globalGraphical.index_count, &globalGraphical.indices[0]),
348 evas_canvas3d_mesh_vertex_assembly_set(EVAS_CANVAS3D_VERTEX_ASSEMBLY_TRIANGLES),
349 evas_canvas3d_mesh_shade_mode_set(EVAS_CANVAS3D_SHADE_MODE_PHONG));
350 } 323 }
351 else 324 else
352 { 325 {
353 eo_do(globalGraphical.mesh, 326 efl_file_set(globalGraphical.mesh, globalGraphical.model_path, NULL);
354 efl_file_set(globalGraphical.model_path, NULL), 327 evas_canvas3d_mesh_frame_material_set(globalGraphical.mesh, 0, globalGraphical.material);
355 evas_canvas3d_mesh_frame_material_set(0, globalGraphical.material), 328 evas_canvas3d_mesh_shade_mode_set(globalGraphical.mesh, EVAS_CANVAS3D_SHADE_MODE_PHONG);
356 evas_canvas3d_mesh_shade_mode_set(EVAS_CANVAS3D_SHADE_MODE_PHONG));
357 } 329 }
358 330
359 if (globalGraphical.flags.fog_enable) 331 if (globalGraphical.flags.fog_enable)
360 { 332 {
361 eo_do(globalGraphical.mesh, evas_canvas3d_mesh_fog_enable_set(EINA_TRUE), evas_canvas3d_mesh_fog_color_set(FOG_COLOR, FOG_FACTOR)); 333 evas_canvas3d_mesh_fog_enable_set(globalGraphical.mesh, EINA_TRUE);
334 evas_canvas3d_mesh_fog_color_set(globalGraphical.mesh, FOG_COLOR, FOG_FACTOR);
362 } 335 }
363 else 336 else
364 { 337 {
365 eo_do(globalGraphical.mesh, evas_canvas3d_mesh_fog_enable_set(EINA_FALSE)); 338 evas_canvas3d_mesh_fog_enable_set(globalGraphical.mesh, EINA_FALSE);
366 } 339 }
367 if (globalGraphical.flags.colorpick_enable) 340 if (globalGraphical.flags.colorpick_enable)
368 eo_do(globalGraphical.mesh, evas_canvas3d_mesh_color_pick_enable_set(EINA_TRUE)); 341 evas_canvas3d_mesh_color_pick_enable_set(globalGraphical.mesh, EINA_TRUE);
369 else 342 else
370 eo_do(globalGraphical.mesh, evas_canvas3d_mesh_color_pick_enable_set(EINA_FALSE)); 343 evas_canvas3d_mesh_color_pick_enable_set(globalGraphical.mesh, EINA_FALSE);
371 344
372 if (globalGraphical.flags.blend_enable) 345 if (globalGraphical.flags.blend_enable)
373 { 346 {
374 eo_do(globalGraphical.mesh, evas_canvas3d_mesh_blending_enable_set(EINA_TRUE), 347 evas_canvas3d_mesh_blending_enable_set(globalGraphical.mesh, EINA_TRUE);
375 evas_canvas3d_mesh_blending_func_set(EVAS_CANVAS3D_BLEND_FUNC_SRC_ALPHA, EVAS_CANVAS3D_BLEND_FUNC_ONE_MINUS_SRC_ALPHA)); 348 evas_canvas3d_mesh_blending_func_set(globalGraphical.mesh, EVAS_CANVAS3D_BLEND_FUNC_SRC_ALPHA, EVAS_CANVAS3D_BLEND_FUNC_ONE_MINUS_SRC_ALPHA);
376 } 349 }
377 else 350 else
378 eo_do(globalGraphical.mesh, evas_canvas3d_mesh_blending_enable_set(EINA_FALSE)); 351 evas_canvas3d_mesh_blending_enable_set(globalGraphical.mesh, EINA_FALSE);
379 352
380 eo_do(globalGraphical.mesh, evas_canvas3d_mesh_frame_material_set(0, globalGraphical.material)); 353 evas_canvas3d_mesh_frame_material_set(globalGraphical.mesh, 0, globalGraphical.material);
381 globalGraphical.list_meshes = eina_list_append(globalGraphical.list_meshes, globalGraphical.mesh); 354 globalGraphical.list_meshes = eina_list_append(globalGraphical.list_meshes, globalGraphical.mesh);
382 } 355 }
383 356
@@ -386,15 +359,11 @@ _change_scene_setup()
386 for (i = 0; i < quantity; i++) 359 for (i = 0; i < quantity; i++)
387 { 360 {
388 globalGraphical.mesh_node = 361 globalGraphical.mesh_node =
389 eo_add(EVAS_CANVAS3D_NODE_CLASS, globalGraphical.evas, 362 eo_add(EVAS_CANVAS3D_NODE_CLASS, globalGraphical.evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH), evas_canvas3d_node_position_set(eoid, globalGraphical.places[i].position.x * 20, globalGraphical.places[i].position.y * 20, globalGraphical.places[i].position.z * 20));
390 evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH),
391 evas_canvas3d_node_position_set(globalGraphical.places[i].position.x * 20,
392 globalGraphical.places[i].position.y * 20,
393 globalGraphical.places[i].position.z * 20));
394 if (globalGraphical.model_path) 363 if (globalGraphical.model_path)
395 eo_do(globalGraphical.mesh_node, evas_canvas3d_node_scale_set(0.2, 0.2, 0.2)); 364 evas_canvas3d_node_scale_set(globalGraphical.mesh_node, 0.2, 0.2, 0.2);
396 eo_do(globalGraphical.root_node, evas_canvas3d_node_member_add(globalGraphical.mesh_node)); 365 evas_canvas3d_node_member_add(globalGraphical.root_node, globalGraphical.mesh_node);
397 eo_do(globalGraphical.mesh_node, evas_canvas3d_node_mesh_add((Eo*)eina_list_nth(globalGraphical.list_meshes, i))); 366 evas_canvas3d_node_mesh_add(globalGraphical.mesh_node, (Eo*)eina_list_nth(globalGraphical.list_meshes, i));
398 globalGraphical.list_nodes = eina_list_append(globalGraphical.list_nodes, globalGraphical.mesh_node); 367 globalGraphical.list_nodes = eina_list_append(globalGraphical.list_nodes, globalGraphical.mesh_node);
399 } 368 }
400 369
@@ -405,16 +374,16 @@ _change_scene_setup()
405 ecore_animator_frametime_set(0.0001); 374 ecore_animator_frametime_set(0.0001);
406 375
407 if (globalGraphical.flags.shadow_enable) 376 if (globalGraphical.flags.shadow_enable)
408 eo_do(globalGraphical.scene, evas_canvas3d_scene_shadows_enable_set(EINA_TRUE)); 377 evas_canvas3d_scene_shadows_enable_set(globalGraphical.scene, EINA_TRUE);
409 else 378 else
410 eo_do(globalGraphical.scene, evas_canvas3d_scene_shadows_enable_set(EINA_FALSE)); 379 evas_canvas3d_scene_shadows_enable_set(globalGraphical.scene, EINA_FALSE);
411 380
412 if (globalGraphical.flags.colorpick_enable) 381 if (globalGraphical.flags.colorpick_enable)
413 { 382 {
414 eo_do(globalGraphical.scene, evas_canvas3d_scene_color_pick_enable_set(EINA_TRUE)); 383 evas_canvas3d_scene_color_pick_enable_set(globalGraphical.scene, EINA_TRUE);
415 } 384 }
416 else 385 else
417 eo_do(globalGraphical.scene, evas_canvas3d_scene_color_pick_enable_set(EINA_FALSE)); 386 evas_canvas3d_scene_color_pick_enable_set(globalGraphical.scene, EINA_FALSE);
418} 387}
419 388
420static void 389static void
@@ -428,63 +397,48 @@ _init_scene(Evas_Object *img)
428 globalGraphical.scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, globalGraphical.evas); 397 globalGraphical.scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, globalGraphical.evas);
429 398
430 /* Add the root node for the scene. */ 399 /* Add the root node for the scene. */
431 globalGraphical.root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, globalGraphical.evas, 400 globalGraphical.root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, globalGraphical.evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
432 evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_NODE));
433 401
434 /* Add the camera. */ 402 /* Add the camera. */
435 globalGraphical.camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, globalGraphical.evas); 403 globalGraphical.camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, globalGraphical.evas);
436 eo_do(globalGraphical.camera, 404 evas_canvas3d_camera_projection_perspective_set(globalGraphical.camera, globalGraphical.angle, 1.0, 2.0, 1000.0);
437 evas_canvas3d_camera_projection_perspective_set(globalGraphical.angle, 1.0, 2.0, 1000.0));
438 405
439 globalGraphical.camera_node = 406 globalGraphical.camera_node =
440 eo_add(EVAS_CANVAS3D_NODE_CLASS, globalGraphical.evas, 407 eo_add(EVAS_CANVAS3D_NODE_CLASS, globalGraphical.evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
441 evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_CAMERA)); 408 evas_canvas3d_node_camera_set(globalGraphical.camera_node, globalGraphical.camera);
442 eo_do(globalGraphical.camera_node, 409 evas_canvas3d_node_position_set(globalGraphical.camera_node, 0.0, 0.0, 25.0);
443 evas_canvas3d_node_camera_set(globalGraphical.camera), 410 evas_canvas3d_node_look_at_set(globalGraphical.camera_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0);
444 evas_canvas3d_node_position_set(0.0, 0.0, 25.0), 411 evas_canvas3d_node_member_add(globalGraphical.root_node, globalGraphical.camera_node);
445 evas_canvas3d_node_look_at_set(EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0,
446 EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0));
447 eo_do(globalGraphical.root_node, evas_canvas3d_node_member_add(globalGraphical.camera_node));
448 412
449 globalGraphical.light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, globalGraphical.evas); 413 globalGraphical.light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, globalGraphical.evas);
450 eo_do(globalGraphical.light, 414 evas_canvas3d_light_ambient_set(globalGraphical.light, 1.0, 1.0, 1.0, 1.0);
451 evas_canvas3d_light_ambient_set(1.0, 1.0, 1.0, 1.0), 415 evas_canvas3d_light_diffuse_set(globalGraphical.light, 1.0, 1.0, 1.0, 1.0);
452 evas_canvas3d_light_diffuse_set(1.0, 1.0, 1.0, 1.0), 416 evas_canvas3d_light_specular_set(globalGraphical.light, 1.0, 1.0, 1.0, 1.0);
453 evas_canvas3d_light_specular_set(1.0, 1.0, 1.0, 1.0), 417 evas_canvas3d_light_projection_perspective_set(globalGraphical.light, globalGraphical.angle / 5, 1.0, 1.0, 1000.0);
454 evas_canvas3d_light_projection_perspective_set(globalGraphical.angle / 5, 1.0, 1.0, 1000.0), 418 evas_canvas3d_light_spot_cutoff_set(globalGraphical.light, globalGraphical.angle / 15);
455 /*evas_canvas3d_light_projection_perspective_set(value, ...) =>
456 evas_canvas3d_light_spot_cutoff_set(~(value / 3))*/
457 evas_canvas3d_light_spot_cutoff_set(globalGraphical.angle / 15));
458 419
459 globalGraphical.light_node = 420 globalGraphical.light_node =
460 eo_add(EVAS_CANVAS3D_NODE_CLASS, globalGraphical.evas, 421 eo_add(EVAS_CANVAS3D_NODE_CLASS, globalGraphical.evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
461 evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_LIGHT)); 422 evas_canvas3d_node_light_set(globalGraphical.light_node, globalGraphical.light);
462 eo_do(globalGraphical.light_node, 423 evas_canvas3d_node_position_set(globalGraphical.light_node, 0.0, 100.0, 1.0);
463 evas_canvas3d_node_light_set(globalGraphical.light), 424 evas_canvas3d_node_look_at_set(globalGraphical.light_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0);
464 evas_canvas3d_node_position_set(0.0, 100.0, 1.0), 425 evas_canvas3d_node_member_add(globalGraphical.root_node, globalGraphical.light_node);
465 evas_canvas3d_node_look_at_set(EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0,
466 EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0));
467 eo_do(globalGraphical.root_node, evas_canvas3d_node_member_add(globalGraphical.light_node));
468 426
469 427
470 globalGraphical.material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, globalGraphical.evas); 428 globalGraphical.material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, globalGraphical.evas);
471 globalGraphical.texture = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, globalGraphical.evas); 429 globalGraphical.texture = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, globalGraphical.evas);
472 eo_do(globalGraphical.texture, 430 evas_canvas3d_texture_file_set(globalGraphical.texture, "target_texture.png", NULL);
473 evas_canvas3d_texture_file_set("target_texture.png", NULL), 431 evas_canvas3d_texture_filter_set(globalGraphical.texture, EVAS_CANVAS3D_TEXTURE_FILTER_LINEAR, EVAS_CANVAS3D_TEXTURE_FILTER_LINEAR);
474 evas_canvas3d_texture_filter_set(EVAS_CANVAS3D_TEXTURE_FILTER_LINEAR, 432 evas_canvas3d_texture_wrap_set(globalGraphical.texture, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT);
475 EVAS_CANVAS3D_TEXTURE_FILTER_LINEAR), 433 evas_canvas3d_material_texture_set(globalGraphical.material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, globalGraphical.texture);
476 evas_canvas3d_texture_wrap_set(EVAS_CANVAS3D_WRAP_MODE_REPEAT, 434 evas_canvas3d_material_texture_set(globalGraphical.material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, globalGraphical.texture);
477 EVAS_CANVAS3D_WRAP_MODE_REPEAT)); 435 evas_canvas3d_material_enable_set(globalGraphical.material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE);
478 eo_do(globalGraphical.material, 436 evas_canvas3d_material_enable_set(globalGraphical.material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE);
479 evas_canvas3d_material_texture_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, globalGraphical.texture), 437 evas_canvas3d_material_enable_set(globalGraphical.material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, EINA_TRUE);
480 evas_canvas3d_material_texture_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, globalGraphical.texture), 438 evas_canvas3d_material_enable_set(globalGraphical.material, EVAS_CANVAS3D_MATERIAL_ATTRIB_NORMAL, EINA_TRUE);
481 evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE), 439 evas_canvas3d_material_color_set(globalGraphical.material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, 1.0, 0.2, 0.2, 0.2);
482 evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE), 440 evas_canvas3d_material_color_set(globalGraphical.material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, 1.0, 0.0, 0.0, 0.2);
483 evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, EINA_TRUE), 441 evas_canvas3d_material_color_set(globalGraphical.material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 0.2);
484 evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_NORMAL, EINA_TRUE),
485 evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, 1.0, 0.2, 0.2, 0.2),
486 evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, 1.0, 0.0, 0.0, 0.2),
487 evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 0.2));
488 /* Add the mesh with target precision */ 442 /* Add the mesh with target precision */
489 _sphere_init(globalGraphical.precision); 443 _sphere_init(globalGraphical.precision);
490 444
@@ -493,37 +447,24 @@ _init_scene(Evas_Object *img)
493 globalGraphical.mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, globalGraphical.evas); 447 globalGraphical.mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, globalGraphical.evas);
494 if (!globalGraphical.model_path) 448 if (!globalGraphical.model_path)
495 { 449 {
496 eo_do(globalGraphical.mesh, 450 evas_canvas3d_mesh_vertex_count_set(globalGraphical.mesh, globalGraphical.vertex_count);
497 evas_canvas3d_mesh_vertex_count_set(globalGraphical.vertex_count), 451 evas_canvas3d_mesh_frame_add(globalGraphical.mesh, 0);
498 evas_canvas3d_mesh_frame_add(0), 452 evas_canvas3d_mesh_frame_vertex_data_copy_set(globalGraphical.mesh, 0, EVAS_CANVAS3D_VERTEX_ATTRIB_POSITION, sizeof(vertex), &globalGraphical.vertices[0].position);
499 evas_canvas3d_mesh_frame_vertex_data_copy_set(0, EVAS_CANVAS3D_VERTEX_ATTRIB_POSITION, 453 evas_canvas3d_mesh_frame_vertex_data_copy_set(globalGraphical.mesh, 0, EVAS_CANVAS3D_VERTEX_ATTRIB_NORMAL, sizeof(vertex), &globalGraphical.vertices[0].normal);
500 sizeof(vertex), 454 evas_canvas3d_mesh_frame_vertex_data_copy_set(globalGraphical.mesh, 0, EVAS_CANVAS3D_VERTEX_ATTRIB_TANGENT, sizeof(vertex), &globalGraphical.vertices[0].tangent);
501 &globalGraphical.vertices[0].position), 455 evas_canvas3d_mesh_frame_vertex_data_copy_set(globalGraphical.mesh, 0, EVAS_CANVAS3D_VERTEX_ATTRIB_COLOR, sizeof(vertex), &globalGraphical.vertices[0].color);
502 evas_canvas3d_mesh_frame_vertex_data_copy_set(0, EVAS_CANVAS3D_VERTEX_ATTRIB_NORMAL, 456 evas_canvas3d_mesh_frame_vertex_data_copy_set(globalGraphical.mesh, 0, EVAS_CANVAS3D_VERTEX_ATTRIB_TEXCOORD, sizeof(vertex), &globalGraphical.vertices[0].texcoord);
503 sizeof(vertex), 457 evas_canvas3d_mesh_index_data_copy_set(globalGraphical.mesh, EVAS_CANVAS3D_INDEX_FORMAT_UNSIGNED_SHORT, globalGraphical.index_count, &globalGraphical.indices[0]);
504 &globalGraphical.vertices[0].normal), 458 evas_canvas3d_mesh_vertex_assembly_set(globalGraphical.mesh, EVAS_CANVAS3D_VERTEX_ASSEMBLY_TRIANGLES);
505 evas_canvas3d_mesh_frame_vertex_data_copy_set(0, EVAS_CANVAS3D_VERTEX_ATTRIB_TANGENT, 459 evas_canvas3d_mesh_shade_mode_set(globalGraphical.mesh, EVAS_CANVAS3D_SHADE_MODE_PHONG);
506 sizeof(vertex),
507 &globalGraphical.vertices[0].tangent),
508 evas_canvas3d_mesh_frame_vertex_data_copy_set(0, EVAS_CANVAS3D_VERTEX_ATTRIB_COLOR,
509 sizeof(vertex), &globalGraphical.vertices[0].color),
510 evas_canvas3d_mesh_frame_vertex_data_copy_set(0, EVAS_CANVAS3D_VERTEX_ATTRIB_TEXCOORD,
511 sizeof(vertex),
512 &globalGraphical.vertices[0].texcoord),
513
514 evas_canvas3d_mesh_index_data_copy_set(EVAS_CANVAS3D_INDEX_FORMAT_UNSIGNED_SHORT,
515 globalGraphical.index_count, &globalGraphical.indices[0]),
516 evas_canvas3d_mesh_vertex_assembly_set(EVAS_CANVAS3D_VERTEX_ASSEMBLY_TRIANGLES),
517 evas_canvas3d_mesh_shade_mode_set(EVAS_CANVAS3D_SHADE_MODE_PHONG));
518 } 460 }
519 else 461 else
520 { 462 {
521 eo_do(globalGraphical.mesh, 463 efl_file_set(globalGraphical.mesh, globalGraphical.model_path, NULL);
522 efl_file_set(globalGraphical.model_path, NULL), 464 evas_canvas3d_mesh_frame_material_set(globalGraphical.mesh, 0, globalGraphical.material);
523 evas_canvas3d_mesh_frame_material_set(0, globalGraphical.material), 465 evas_canvas3d_mesh_shade_mode_set(globalGraphical.mesh, EVAS_CANVAS3D_SHADE_MODE_PHONG);
524 evas_canvas3d_mesh_shade_mode_set(EVAS_CANVAS3D_SHADE_MODE_PHONG));
525 } 466 }
526 eo_do(globalGraphical.mesh, evas_canvas3d_mesh_frame_material_set(0, globalGraphical.material)); 467 evas_canvas3d_mesh_frame_material_set(globalGraphical.mesh, 0, globalGraphical.material);
527 globalGraphical.list_meshes = eina_list_append(globalGraphical.list_meshes, globalGraphical.mesh); 468 globalGraphical.list_meshes = eina_list_append(globalGraphical.list_meshes, globalGraphical.mesh);
528 } 469 }
529 470
@@ -533,24 +474,19 @@ _init_scene(Evas_Object *img)
533 for (i = 0; i < quantity; i++) 474 for (i = 0; i < quantity; i++)
534 { 475 {
535 globalGraphical.mesh_node = 476 globalGraphical.mesh_node =
536 eo_add(EVAS_CANVAS3D_NODE_CLASS, globalGraphical.evas, 477 eo_add(EVAS_CANVAS3D_NODE_CLASS, globalGraphical.evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH), evas_canvas3d_node_position_set(eoid, globalGraphical.places[i].position.x * 20, globalGraphical.places[i].position.y * 20, globalGraphical.places[i].position.z * 20));
537 evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH),
538 evas_canvas3d_node_position_set(globalGraphical.places[i].position.x * 20,
539 globalGraphical.places[i].position.y * 20,
540 globalGraphical.places[i].position.z * 20));
541 if (globalGraphical.model_path) 478 if (globalGraphical.model_path)
542 eo_do(globalGraphical.mesh_node, evas_canvas3d_node_scale_set(0.2, 0.2, 0.2)); 479 evas_canvas3d_node_scale_set(globalGraphical.mesh_node, 0.2, 0.2, 0.2);
543 eo_do(globalGraphical.root_node, evas_canvas3d_node_member_add(globalGraphical.mesh_node)); 480 evas_canvas3d_node_member_add(globalGraphical.root_node, globalGraphical.mesh_node);
544 eo_do(globalGraphical.mesh_node, evas_canvas3d_node_mesh_add((Eo*)eina_list_nth(globalGraphical.list_meshes, i))); 481 evas_canvas3d_node_mesh_add(globalGraphical.mesh_node, (Eo*)eina_list_nth(globalGraphical.list_meshes, i));
545 globalGraphical.list_nodes = eina_list_append(globalGraphical.list_nodes, globalGraphical.mesh_node); 482 globalGraphical.list_nodes = eina_list_append(globalGraphical.list_nodes, globalGraphical.mesh_node);
546 } 483 }
547 484
548 _init_bounding(); 485 _init_bounding();
549 evas_object_geometry_get(img, &x, &y, &w, &h); 486 evas_object_geometry_get(img, &x, &y, &w, &h);
550 eo_do(globalGraphical.scene, 487 evas_canvas3d_scene_root_node_set(globalGraphical.scene, globalGraphical.root_node);
551 evas_canvas3d_scene_root_node_set(globalGraphical.root_node), 488 evas_canvas3d_scene_camera_node_set(globalGraphical.scene, globalGraphical.camera_node);
552 evas_canvas3d_scene_camera_node_set(globalGraphical.camera_node), 489 evas_canvas3d_scene_size_set(globalGraphical.scene, w, h);
553 evas_canvas3d_scene_size_set(w, h));
554 490
555 ecore_animator_frametime_set(1.0 / (globalGraphical.speed)); 491 ecore_animator_frametime_set(1.0 / (globalGraphical.speed));
556} 492}
@@ -673,7 +609,7 @@ init_graphical_window(Evas_Object *img)
673 _init_graphical(); 609 _init_graphical();
674 globalGraphical.evas = evas_object_evas_get(img); 610 globalGraphical.evas = evas_object_evas_get(img);
675 _init_scene(img); 611 _init_scene(img);
676 eo_do(img, evas_obj_image_scene_set(globalGraphical.scene)); 612 evas_obj_image_scene_set(img, globalGraphical.scene);
677 613
678 return img; 614 return img;
679} 615}
diff --git a/src/examples/performance/performance.c b/src/examples/performance/performance.c
index e3c7f014f..c1d0ef87d 100644
--- a/src/examples/performance/performance.c
+++ b/src/examples/performance/performance.c
@@ -85,13 +85,11 @@ _animate_scene(void *data)
85 static float angle = 0.0f; 85 static float angle = 0.0f;
86 angle += 0.03; 86 angle += 0.03;
87 87
88 eo_do((Evas_Canvas3D_Node *)data, 88 evas_canvas3d_node_look_at_set((Evas_Canvas3D_Node *)data, EVAS_CANVAS3D_SPACE_PARENT, 8 * sin(angle), 0.0, 8 * cos(angle), EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0);
89 evas_canvas3d_node_look_at_set(EVAS_CANVAS3D_SPACE_PARENT, 8 * sin(angle), 0.0, 8 * cos(angle),
90 EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0));
91 89
92 EINA_LIST_FOREACH (globalGraphical.list_nodes, l, node) 90 EINA_LIST_FOREACH (globalGraphical.list_nodes, l, node)
93 { 91 {
94 eo_do(node, evas_canvas3d_node_orientation_angle_axis_set(10 * angle, 1.0, 1.0, 0.0)); 92 evas_canvas3d_node_orientation_angle_axis_set(node, 10 * angle, 1.0, 1.0, 0.0);
95 } 93 }
96 94
97 /* Rotate */ 95 /* Rotate */
@@ -132,7 +130,7 @@ _on_mouse_down(void *data, Evas *e EINA_UNUSED, Evas_Object *obj,
132 obj_x = ev->canvas.x - x; 130 obj_x = ev->canvas.x - x;
133 obj_y = ev->canvas.y - y; 131 obj_y = ev->canvas.y - y;
134 132
135 eo_do(globalGraphical.scene, evas_canvas3d_scene_size_get(&scene_w, &scene_h)); 133 evas_canvas3d_scene_size_get(globalGraphical.scene, &scene_w, &scene_h);
136 134
137 scene_x = obj_x * scene_w / (Evas_Real)w; 135 scene_x = obj_x * scene_w / (Evas_Real)w;
138 scene_y = obj_y * scene_h / (Evas_Real)h; 136 scene_y = obj_y * scene_h / (Evas_Real)h;
@@ -140,29 +138,28 @@ _on_mouse_down(void *data, Evas *e EINA_UNUSED, Evas_Object *obj,
140 time = clock(); 138 time = clock();
141 if (globalGraphical.flags.colorpick_enable) 139 if (globalGraphical.flags.colorpick_enable)
142 { 140 {
143 eo_do(globalGraphical.scene, pick = evas_canvas3d_scene_color_pick_enable_set(EINA_TRUE)); 141 pick = evas_canvas3d_scene_color_pick_enable_set(globalGraphical.scene, EINA_TRUE);
144 eo_do(globalGraphical.scene, 142 pick = evas_canvas3d_scene_pick(globalGraphical.scene, ev->canvas.x, ev->canvas.y, &n, &m, NULL, NULL);
145 pick = evas_canvas3d_scene_pick(ev->canvas.x, ev->canvas.y, &n, &m, NULL, NULL));
146 time = clock() - time; 143 time = clock() - time;
147 diff_sec = ((float)time) / CLOCKS_PER_SEC / 10; 144 diff_sec = ((float)time) / CLOCKS_PER_SEC / 10;
148 if (pick) 145 if (pick)
149 { 146 {
150 fprintf(stdout, "Boom! Color pick time expended for pick: %2.7f \n", diff_sec); 147 fprintf(stdout, "Boom! Color pick time expended for pick: %2.7f \n", diff_sec);
151 if (n != globalGraphical.mesh_nodebox) 148 if (n != globalGraphical.mesh_nodebox)
152 eo_do(n, evas_canvas3d_node_scale_set(0.5, 0.5, 0.5)); 149 evas_canvas3d_node_scale_set(n, 0.5, 0.5, 0.5);
153 } 150 }
154 } 151 }
155 else 152 else
156 { 153 {
157 eo_do(globalGraphical.scene, pick = evas_canvas3d_scene_color_pick_enable_set(EINA_FALSE)); 154 pick = evas_canvas3d_scene_color_pick_enable_set(globalGraphical.scene, EINA_FALSE);
158 eo_do(globalGraphical.scene, pick = evas_canvas3d_scene_pick(scene_x, scene_y, &n, &m, &s, &t)); 155 pick = evas_canvas3d_scene_pick(globalGraphical.scene, scene_x, scene_y, &n, &m, &s, &t);
159 time = clock() - time; 156 time = clock() - time;
160 diff_sec = ((float)time) / CLOCKS_PER_SEC / 10; 157 diff_sec = ((float)time) / CLOCKS_PER_SEC / 10;
161 if (pick) 158 if (pick)
162 { 159 {
163 fprintf(stdout, "Boom! Geometry pick time expended for pick: %2.7f, TexCoord (%f, %f)\n", diff_sec, s, t); 160 fprintf(stdout, "Boom! Geometry pick time expended for pick: %2.7f, TexCoord (%f, %f)\n", diff_sec, s, t);
164 if (n != globalGraphical.mesh_nodebox) 161 if (n != globalGraphical.mesh_nodebox)
165 eo_do(n, evas_canvas3d_node_scale_set(0.5, 0.5, 0.5)); 162 evas_canvas3d_node_scale_set(n, 0.5, 0.5, 0.5);
166 } 163 }
167 } 164 }
168 } 165 }
@@ -204,12 +201,12 @@ _node_orientation_change_cb(void *data, Evas_Object *obj, void *event_info)
204 it = elm_flipselector_selected_item_get((Evas_Object*)data); 201 it = elm_flipselector_selected_item_get((Evas_Object*)data);
205 const char *str = elm_object_item_text_get(it); 202 const char *str = elm_object_item_text_get(it);
206 if (str && !strcmp(str, "root node")) 203 if (str && !strcmp(str, "root node"))
207 eo_do(globalGraphical.root_node, evas_canvas3d_node_orientation_angle_axis_set(15, 1.0, 1.0, 1.0)); 204 evas_canvas3d_node_orientation_angle_axis_set(globalGraphical.root_node, 15, 1.0, 1.0, 1.0);
208 else 205 else
209 { 206 {
210 EINA_LIST_FOREACH (globalGraphical.list_nodes, l, node) 207 EINA_LIST_FOREACH (globalGraphical.list_nodes, l, node)
211 { 208 {
212 eo_do((Eo*)node, evas_canvas3d_node_orientation_angle_axis_set(15, 1.0, 1.0, 1.0)); 209 evas_canvas3d_node_orientation_angle_axis_set((Eo*)node, 15, 1.0, 1.0, 1.0);
213 } 210 }
214 } 211 }
215} 212}
@@ -222,12 +219,12 @@ _node_position_change_cb(void *data, Evas_Object *obj, void *event_info)
222 it = elm_flipselector_selected_item_get((Evas_Object*)data); 219 it = elm_flipselector_selected_item_get((Evas_Object*)data);
223 const char *str = elm_object_item_text_get(it); 220 const char *str = elm_object_item_text_get(it);
224 if (str && !strcmp(str, "root node")) 221 if (str && !strcmp(str, "root node"))
225 eo_do(globalGraphical.root_node, evas_canvas3d_node_position_set(10.0, 1.0, 1.0)); 222 evas_canvas3d_node_position_set(globalGraphical.root_node, 10.0, 1.0, 1.0);
226 else 223 else
227 { 224 {
228 EINA_LIST_FOREACH (globalGraphical.list_nodes, l, node) 225 EINA_LIST_FOREACH (globalGraphical.list_nodes, l, node)
229 { 226 {
230 eo_do((Eo*)node, evas_canvas3d_node_position_set(1.0, 1.0, 1.0)); 227 evas_canvas3d_node_position_set((Eo*)node, 1.0, 1.0, 1.0);
231 } 228 }
232 } 229 }
233} 230}
@@ -240,12 +237,12 @@ _node_scale_change_cb(void *data, Evas_Object *obj, void *event_info)
240 it = elm_flipselector_selected_item_get((Evas_Object*)data); 237 it = elm_flipselector_selected_item_get((Evas_Object*)data);
241 const char *str = elm_object_item_text_get(it); 238 const char *str = elm_object_item_text_get(it);
242 if (str && !strcmp(str, "root node")) 239 if (str && !strcmp(str, "root node"))
243 eo_do(globalGraphical.root_node, evas_canvas3d_node_scale_set(1.0, 1.0, 1.0)); 240 evas_canvas3d_node_scale_set(globalGraphical.root_node, 1.0, 1.0, 1.0);
244 else 241 else
245 { 242 {
246 EINA_LIST_FOREACH (globalGraphical.list_nodes, l, node) 243 EINA_LIST_FOREACH (globalGraphical.list_nodes, l, node)
247 { 244 {
248 eo_do((Eo*)node, evas_canvas3d_node_scale_set(1.0, 1.0, 1.0)); 245 evas_canvas3d_node_scale_set((Eo*)node, 1.0, 1.0, 1.0);
249 } 246 }
250 } 247 }
251} 248}
diff --git a/src/examples/sphere_hunter/evas_3d_sphere_hunter.c b/src/examples/sphere_hunter/evas_3d_sphere_hunter.c
index fe1712e9e..6de714d17 100644
--- a/src/examples/sphere_hunter/evas_3d_sphere_hunter.c
+++ b/src/examples/sphere_hunter/evas_3d_sphere_hunter.c
@@ -332,8 +332,7 @@ _restart_level(void *data, Evas_Object *btn, void *ev)
332 332
333 EINA_LIST_FOREACH(scene->items, l, item) 333 EINA_LIST_FOREACH(scene->items, l, item)
334 { 334 {
335 eo_do(scene->root_node, 335 evas_canvas3d_node_member_del(scene->root_node, item);
336 evas_canvas3d_node_member_del(item));
337 scene->items = eina_list_remove_list(scene->items, l); 336 scene->items = eina_list_remove_list(scene->items, l);
338 } 337 }
339 338
@@ -341,8 +340,7 @@ _restart_level(void *data, Evas_Object *btn, void *ev)
341 scene->items = eina_list_append(scene->items, item); 340 scene->items = eina_list_append(scene->items, item);
342 341
343 EINA_LIST_FOREACH(scene->items, l, item) 342 EINA_LIST_FOREACH(scene->items, l, item)
344 eo_do(scene->root_node, 343 evas_canvas3d_node_member_add(scene->root_node, item);
345 evas_canvas3d_node_member_add(item));
346 344
347 ball_position_x = 0.0; 345 ball_position_x = 0.0;
348 ball_position_y = -1.0; 346 ball_position_y = -1.0;
@@ -438,18 +436,14 @@ static void
438_camera_setup(Scene_Data *data) 436_camera_setup(Scene_Data *data)
439{ 437{
440 data->camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas); 438 data->camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
441 eo_do(data->camera, 439 evas_canvas3d_camera_projection_perspective_set(data->camera, 50.0, 1.0, 1.0, 1000.0);
442 evas_canvas3d_camera_projection_perspective_set(50.0, 1.0, 1.0, 1000.0)); 440
443 441 data->camera_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
444 data->camera_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, 442 evas_canvas3d_node_camera_set(data->camera_node, data->camera);
445 evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_CAMERA)); 443 evas_canvas3d_node_position_set(data->camera_node, 0.0, 40, 70);
446 eo_do(data->camera_node, 444 evas_canvas3d_node_look_at_set(data->camera_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0);
447 evas_canvas3d_node_camera_set(data->camera), 445
448 evas_canvas3d_node_position_set(0.0, 40, 70), 446 evas_canvas3d_node_member_add(data->root_node, data->camera_node);
449 evas_canvas3d_node_look_at_set(EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0));
450
451 eo_do(data->root_node,
452 evas_canvas3d_node_member_add(data->camera_node));
453} 447}
454 448
455static Eina_Bool 449static Eina_Bool
@@ -457,8 +451,7 @@ _animate_camera(void *data)
457{ 451{
458 Scene_Data *scene = (Scene_Data *)data; 452 Scene_Data *scene = (Scene_Data *)data;
459 453
460 eo_do(scene->camera_node, 454 evas_canvas3d_node_position_set(scene->camera_node, 0.0, camera_y, camera_z);
461 evas_canvas3d_node_position_set(0.0, camera_y, camera_z));
462 455
463 return EINA_TRUE; 456 return EINA_TRUE;
464} 457}
@@ -468,21 +461,17 @@ _light_setup(Scene_Data *data)
468{ 461{
469 data->light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas); 462 data->light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
470 463
471 eo_do(data->light, 464 evas_canvas3d_light_ambient_set(data->light, 0.2, 0.2, 0.2, 1.0);
472 evas_canvas3d_light_ambient_set(0.2, 0.2, 0.2, 1.0), 465 evas_canvas3d_light_diffuse_set(data->light, 1.0, 1.0, 1.0, 1.0);
473 evas_canvas3d_light_diffuse_set(1.0, 1.0, 1.0, 1.0), 466 evas_canvas3d_light_specular_set(data->light, 1.0, 1.0, 1.0, 1.0);
474 evas_canvas3d_light_specular_set(1.0, 1.0, 1.0, 1.0), 467 evas_canvas3d_light_projection_perspective_set(data->light, 100.0, 1.0, 1.0, 1000.0);
475 evas_canvas3d_light_projection_perspective_set(100.0, 1.0, 1.0, 1000.0)); 468
476 469 data->light_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
477 data->light_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, 470 evas_canvas3d_node_light_set(data->light_node, data->light);
478 evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_LIGHT)); 471 evas_canvas3d_node_position_set(data->light_node, 0.1, 25.0, 0.1);
479 eo_do(data->light_node, 472 evas_canvas3d_node_look_at_set(data->light_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0);
480 evas_canvas3d_node_light_set(data->light), 473
481 evas_canvas3d_node_position_set(0.1, 25.0, 0.1), 474 evas_canvas3d_node_member_add(data->root_node, data->light_node);
482 evas_canvas3d_node_look_at_set(EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0));
483
484 eo_do(data->root_node,
485 evas_canvas3d_node_member_add(data->light_node));
486} 475}
487 476
488static void 477static void
@@ -490,31 +479,24 @@ _mesh_cube_setup(Scene_Data *data)
490{ 479{
491 data->mesh_cube = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas); 480 data->mesh_cube = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
492 data->material_cube = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas); 481 data->material_cube = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
493 eo_do(data->material_cube, 482 evas_canvas3d_material_enable_set(data->material_cube, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE);
494 evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE), 483 evas_canvas3d_material_enable_set(data->material_cube, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE);
495 evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE), 484 evas_canvas3d_material_enable_set(data->material_cube, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, EINA_TRUE);
496 evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, EINA_TRUE), 485 evas_canvas3d_material_color_set(data->material_cube, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, 0.2, 0.2, 0.2, 1.0);
497 evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, 0.2, 0.2, 0.2, 1.0), 486 evas_canvas3d_material_color_set(data->material_cube, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, 0.8, 0.8, 0.8, 1.0);
498 evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, 0.8, 0.8, 0.8, 1.0), 487 evas_canvas3d_material_color_set(data->material_cube, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0);
499 evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0), 488 evas_canvas3d_material_shininess_set(data->material_cube, 50.0);
500 evas_canvas3d_material_shininess_set(50.0)); 489
501 490 evas_canvas3d_mesh_vertex_count_set(data->mesh_cube, 24);
502 eo_do(data->mesh_cube, 491 evas_canvas3d_mesh_frame_add(data->mesh_cube, 0);
503 evas_canvas3d_mesh_vertex_count_set(24), 492 evas_canvas3d_mesh_frame_vertex_data_set(data->mesh_cube, 0, EVAS_CANVAS3D_VERTEX_ATTRIB_POSITION, 12 * sizeof(float), &cube_vertices[ 0]);
504 evas_canvas3d_mesh_frame_add(0), 493 evas_canvas3d_mesh_frame_vertex_data_set(data->mesh_cube, 0, EVAS_CANVAS3D_VERTEX_ATTRIB_NORMAL, 12 * sizeof(float), &cube_vertices[ 3]);
505 evas_canvas3d_mesh_frame_vertex_data_set(0, EVAS_CANVAS3D_VERTEX_ATTRIB_POSITION, 494 evas_canvas3d_mesh_frame_vertex_data_set(data->mesh_cube, 0, EVAS_CANVAS3D_VERTEX_ATTRIB_COLOR, 12 * sizeof(float), &cube_vertices[ 6]);
506 12 * sizeof(float), &cube_vertices[ 0]), 495 evas_canvas3d_mesh_frame_vertex_data_set(data->mesh_cube, 0, EVAS_CANVAS3D_VERTEX_ATTRIB_TEXCOORD, 12 * sizeof(float), &cube_vertices[10]);
507 evas_canvas3d_mesh_frame_vertex_data_set(0, EVAS_CANVAS3D_VERTEX_ATTRIB_NORMAL, 496 evas_canvas3d_mesh_index_data_set(data->mesh_cube, EVAS_CANVAS3D_INDEX_FORMAT_UNSIGNED_SHORT, 36, &cube_indices[0]);
508 12 * sizeof(float), &cube_vertices[ 3]), 497 evas_canvas3d_mesh_vertex_assembly_set(data->mesh_cube, EVAS_CANVAS3D_VERTEX_ASSEMBLY_TRIANGLES);
509 evas_canvas3d_mesh_frame_vertex_data_set(0, EVAS_CANVAS3D_VERTEX_ATTRIB_COLOR, 498 evas_canvas3d_mesh_shade_mode_set(data->mesh_cube, EVAS_CANVAS3D_SHADE_MODE_PHONG);
510 12 * sizeof(float), &cube_vertices[ 6]), 499 evas_canvas3d_mesh_frame_material_set(data->mesh_cube, 0, data->material_cube);
511 evas_canvas3d_mesh_frame_vertex_data_set(0, EVAS_CANVAS3D_VERTEX_ATTRIB_TEXCOORD,
512 12 * sizeof(float), &cube_vertices[10]),
513 evas_canvas3d_mesh_index_data_set(EVAS_CANVAS3D_INDEX_FORMAT_UNSIGNED_SHORT,
514 36, &cube_indices[0]),
515 evas_canvas3d_mesh_vertex_assembly_set(EVAS_CANVAS3D_VERTEX_ASSEMBLY_TRIANGLES),
516 evas_canvas3d_mesh_shade_mode_set(EVAS_CANVAS3D_SHADE_MODE_PHONG),
517 evas_canvas3d_mesh_frame_material_set(0, data->material_cube));
518 500
519} 501}
520static void 502static void
@@ -526,49 +508,37 @@ _create_bondar(Scene_Data *data, Evas_Real scale_x, Evas_Real scale_y, Evas_Real
526 508
527 mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas); 509 mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
528 material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas); 510 material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
529 node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, 511 node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
530 evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH)); 512
531 513 evas_canvas3d_material_enable_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE);
532 eo_do(material, 514 evas_canvas3d_material_enable_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE);
533 evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE), 515 evas_canvas3d_material_enable_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, EINA_TRUE);
534 evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE), 516 evas_canvas3d_material_color_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, 0.0, 1.0, 1.0, 1.0);
535 evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, EINA_TRUE), 517 evas_canvas3d_material_color_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, 0.8, 0.8, 0.8, 1.0);
536 evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, 0.0, 1.0, 1.0, 1.0), 518 evas_canvas3d_material_color_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0);
537 evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, 0.8, 0.8, 0.8, 1.0), 519 evas_canvas3d_material_shininess_set(material, 50.0);
538 evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0),
539 evas_canvas3d_material_shininess_set(50.0));
540 520
541 if (color) 521 if (color)
542 eo_do(material, 522 evas_canvas3d_material_color_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, 0.0, 0.7, 1.0, 1.0);
543 evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, 0.0, 0.7, 1.0, 1.0));
544 else 523 else
545 eo_do(material, 524 evas_canvas3d_material_color_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, 0.0, 1.0, 1.0, 1.0);
546 evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, 0.0, 1.0, 1.0, 1.0)); 525
547 526 evas_canvas3d_mesh_vertex_count_set(mesh, 24);
548 eo_do(mesh, 527 evas_canvas3d_mesh_frame_add(mesh, 0);
549 evas_canvas3d_mesh_vertex_count_set(24), 528 evas_canvas3d_mesh_frame_vertex_data_set(mesh, 0, EVAS_CANVAS3D_VERTEX_ATTRIB_POSITION, 12 * sizeof(float), &cube_vertices[ 0]);
550 evas_canvas3d_mesh_frame_add(0), 529 evas_canvas3d_mesh_frame_vertex_data_set(mesh, 0, EVAS_CANVAS3D_VERTEX_ATTRIB_NORMAL, 12 * sizeof(float), &cube_vertices[ 3]);
551 evas_canvas3d_mesh_frame_vertex_data_set(0, EVAS_CANVAS3D_VERTEX_ATTRIB_POSITION, 530 evas_canvas3d_mesh_frame_vertex_data_set(mesh, 0, EVAS_CANVAS3D_VERTEX_ATTRIB_COLOR, 12 * sizeof(float), &cube_vertices[ 6]);
552 12 * sizeof(float), &cube_vertices[ 0]), 531 evas_canvas3d_mesh_frame_vertex_data_set(mesh, 0, EVAS_CANVAS3D_VERTEX_ATTRIB_TEXCOORD, 12 * sizeof(float), &cube_vertices[10]);
553 evas_canvas3d_mesh_frame_vertex_data_set(0, EVAS_CANVAS3D_VERTEX_ATTRIB_NORMAL, 532 evas_canvas3d_mesh_index_data_set(mesh, EVAS_CANVAS3D_INDEX_FORMAT_UNSIGNED_SHORT, 36, &cube_indices[0]);
554 12 * sizeof(float), &cube_vertices[ 3]), 533 evas_canvas3d_mesh_vertex_assembly_set(mesh, EVAS_CANVAS3D_VERTEX_ASSEMBLY_TRIANGLES);
555 evas_canvas3d_mesh_frame_vertex_data_set(0, EVAS_CANVAS3D_VERTEX_ATTRIB_COLOR, 534 evas_canvas3d_mesh_shade_mode_set(mesh, EVAS_CANVAS3D_SHADE_MODE_PHONG);
556 12 * sizeof(float), &cube_vertices[ 6]), 535 evas_canvas3d_mesh_frame_material_set(mesh, 0, material);
557 evas_canvas3d_mesh_frame_vertex_data_set(0, EVAS_CANVAS3D_VERTEX_ATTRIB_TEXCOORD, 536
558 12 * sizeof(float), &cube_vertices[10]), 537 evas_canvas3d_node_member_add(data->root_node, node);
559 evas_canvas3d_mesh_index_data_set(EVAS_CANVAS3D_INDEX_FORMAT_UNSIGNED_SHORT, 538
560 36, &cube_indices[0]), 539 evas_canvas3d_node_mesh_add(node, mesh);
561 evas_canvas3d_mesh_vertex_assembly_set(EVAS_CANVAS3D_VERTEX_ASSEMBLY_TRIANGLES), 540 evas_canvas3d_node_position_set(node, x, y, z);
562 evas_canvas3d_mesh_shade_mode_set(EVAS_CANVAS3D_SHADE_MODE_PHONG), 541 evas_canvas3d_node_scale_set(node, scale_x, scale_y, scale_z);
563 evas_canvas3d_mesh_frame_material_set(0, material));
564
565 eo_do(data->root_node,
566 evas_canvas3d_node_member_add(node));
567
568 eo_do(node,
569 evas_canvas3d_node_mesh_add(mesh),
570 evas_canvas3d_node_position_set(x, y, z);
571 evas_canvas3d_node_scale_set(scale_x, scale_y, scale_z));
572 542
573} 543}
574static void 544static void
@@ -586,16 +556,13 @@ _create_cubes(Scene_Data *data, Evas_Real r, int count)
586 Eo *node = NULL; 556 Eo *node = NULL;
587 557
588 alpha = d_alpha * i * M_PI / 180; 558 alpha = d_alpha * i * M_PI / 180;
589 node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, 559 node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
590 evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH));
591 560
592 eo_do(node, 561 evas_canvas3d_node_mesh_add(node, data->mesh_cube);
593 evas_canvas3d_node_mesh_add(data->mesh_cube), 562 evas_canvas3d_node_position_set(node, r * sin(alpha), 2.0 + (r / 4 * sin(alpha)), r * cos(alpha));
594 evas_canvas3d_node_position_set(r * sin(alpha), 2.0 + (r / 4 * sin(alpha)), r * cos(alpha)); 563 evas_canvas3d_node_scale_set(node, 1.0, 1.0, 1.0);
595 evas_canvas3d_node_scale_set(1.0, 1.0, 1.0));
596 564
597 eo_do(data->root_node, 565 evas_canvas3d_node_member_add(data->root_node, node);
598 evas_canvas3d_node_member_add(node));
599 566
600 data->items = eina_list_append(data->items, node); 567 data->items = eina_list_append(data->items, node);
601 } 568 }
@@ -608,43 +575,33 @@ _mesh_ball_setup(Scene_Data *data)
608 575
609 data->mesh_ball = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas); 576 data->mesh_ball = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
610 data->material_ball = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas); 577 data->material_ball = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
611 data->mesh_node_ball = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, 578 data->mesh_node_ball = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
612 evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH));
613 579
614 /* Setup material for ball. */ 580 /* Setup material for ball. */
615 eo_do(data->material_ball, 581 evas_canvas3d_material_enable_set(data->material_ball, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE);
616 evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE), 582 evas_canvas3d_material_enable_set(data->material_ball, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE);
617 evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE), 583 evas_canvas3d_material_enable_set(data->material_ball, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, EINA_TRUE);
618 evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, EINA_TRUE), 584 evas_canvas3d_material_color_set(data->material_ball, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, 0.2, 0.2, 0.2, 1.0);
619 evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, 0.2, 0.2, 0.2, 1.0), 585 evas_canvas3d_material_color_set(data->material_ball, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, 0.8, 0.8, 0.8, 1.0);
620 evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, 0.8, 0.8, 0.8, 1.0), 586 evas_canvas3d_material_color_set(data->material_ball, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0);
621 evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0), 587 evas_canvas3d_material_shininess_set(data->material_ball, 50.0);
622 evas_canvas3d_material_shininess_set(50.0));
623 588
624 /* Setup mesh for ball. */ 589 /* Setup mesh for ball. */
625 eo_do(data->mesh_ball, 590 evas_canvas3d_mesh_vertex_count_set(data->mesh_ball, vertex_count);
626 evas_canvas3d_mesh_vertex_count_set(vertex_count), 591 evas_canvas3d_mesh_frame_add(data->mesh_ball, 0);
627 evas_canvas3d_mesh_frame_add(0), 592 evas_canvas3d_mesh_frame_vertex_data_set(data->mesh_ball, 0, EVAS_CANVAS3D_VERTEX_ATTRIB_POSITION, sizeof(vertex), &vertices[0].position);
628 evas_canvas3d_mesh_frame_vertex_data_set(0, EVAS_CANVAS3D_VERTEX_ATTRIB_POSITION, 593 evas_canvas3d_mesh_frame_vertex_data_set(data->mesh_ball, 0, EVAS_CANVAS3D_VERTEX_ATTRIB_NORMAL, sizeof(vertex), &vertices[0].normal);
629 sizeof(vertex), &vertices[0].position), 594 evas_canvas3d_mesh_frame_vertex_data_set(data->mesh_ball, 0, EVAS_CANVAS3D_VERTEX_ATTRIB_TANGENT, sizeof(vertex), &vertices[0].tangent);
630 evas_canvas3d_mesh_frame_vertex_data_set(0, EVAS_CANVAS3D_VERTEX_ATTRIB_NORMAL, 595 evas_canvas3d_mesh_frame_vertex_data_set(data->mesh_ball, 0, EVAS_CANVAS3D_VERTEX_ATTRIB_COLOR, sizeof(vertex), &vertices[0].color);
631 sizeof(vertex), &vertices[0].normal), 596 evas_canvas3d_mesh_frame_vertex_data_set(data->mesh_ball, 0, EVAS_CANVAS3D_VERTEX_ATTRIB_TEXCOORD, sizeof(vertex), &vertices[0].texcoord);
632 evas_canvas3d_mesh_frame_vertex_data_set(0, EVAS_CANVAS3D_VERTEX_ATTRIB_TANGENT, 597 evas_canvas3d_mesh_index_data_set(data->mesh_ball, EVAS_CANVAS3D_INDEX_FORMAT_UNSIGNED_SHORT, index_count, &indices[0]);
633 sizeof(vertex), &vertices[0].tangent), 598 evas_canvas3d_mesh_vertex_assembly_set(data->mesh_ball, EVAS_CANVAS3D_VERTEX_ASSEMBLY_TRIANGLES);
634 evas_canvas3d_mesh_frame_vertex_data_set(0, EVAS_CANVAS3D_VERTEX_ATTRIB_COLOR, 599 evas_canvas3d_mesh_shade_mode_set(data->mesh_ball, EVAS_CANVAS3D_SHADE_MODE_PHONG);
635 sizeof(vertex), &vertices[0].color), 600 evas_canvas3d_mesh_frame_material_set(data->mesh_ball, 0, data->material_ball);
636 evas_canvas3d_mesh_frame_vertex_data_set(0, EVAS_CANVAS3D_VERTEX_ATTRIB_TEXCOORD, 601
637 sizeof(vertex), &vertices[0].texcoord), 602 evas_canvas3d_node_member_add(data->root_node, data->mesh_node_ball);
638 evas_canvas3d_mesh_index_data_set(EVAS_CANVAS3D_INDEX_FORMAT_UNSIGNED_SHORT, index_count, &indices[0]), 603
639 evas_canvas3d_mesh_vertex_assembly_set(EVAS_CANVAS3D_VERTEX_ASSEMBLY_TRIANGLES), 604 evas_canvas3d_node_mesh_add(data->mesh_node_ball, data->mesh_ball);
640 evas_canvas3d_mesh_shade_mode_set(EVAS_CANVAS3D_SHADE_MODE_PHONG),
641 evas_canvas3d_mesh_frame_material_set(0, data->material_ball));
642
643 eo_do(data->root_node,
644 evas_canvas3d_node_member_add(data->mesh_node_ball));
645
646 eo_do(data->mesh_node_ball,
647 evas_canvas3d_node_mesh_add(data->mesh_ball));
648} 605}
649 606
650static void 607static void
@@ -655,13 +612,11 @@ _scene_setup(Scene_Data *data, Evas_Real r, int count)
655 data->scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas); 612 data->scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
656 613
657 /* Add the root node for the scene. */ 614 /* Add the root node for the scene. */
658 data->root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, 615 data->root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
659 evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_NODE));
660 616
661 eo_do(data->scene, 617 evas_canvas3d_scene_size_set(data->scene, WIDTH, HEIGHT);
662 evas_canvas3d_scene_size_set(WIDTH, HEIGHT), 618 evas_canvas3d_scene_shadows_enable_set(data->scene, EINA_TRUE);
663 evas_canvas3d_scene_shadows_enable_set(EINA_TRUE), 619 evas_canvas3d_scene_background_color_set(data->scene, 0.0, 0.0, 0.0, 0.0);
664 evas_canvas3d_scene_background_color_set(0.0, 0.0, 0.0, 0.0));
665 620
666 _camera_setup(data); 621 _camera_setup(data);
667 _light_setup(data); 622 _light_setup(data);
@@ -678,9 +633,8 @@ _scene_setup(Scene_Data *data, Evas_Real r, int count)
678 EINA_LIST_FOREACH(data->items, l, item) 633 EINA_LIST_FOREACH(data->items, l, item)
679 nodes = eina_list_append(nodes, item); 634 nodes = eina_list_append(nodes, item);
680 635
681 eo_do(data->scene, 636 evas_canvas3d_scene_root_node_set(data->scene, data->root_node);
682 evas_canvas3d_scene_root_node_set(data->root_node), 637 evas_canvas3d_scene_camera_node_set(data->scene, data->camera_node);
683 evas_canvas3d_scene_camera_node_set(data->camera_node));
684} 638}
685 639
686char score_buffer[32]; 640char score_buffer[32];
@@ -718,8 +672,7 @@ _animate_ball(void *data)
718 if (reload == EINA_TRUE) 672 if (reload == EINA_TRUE)
719 elm_object_signal_emit(layout, "play", "efl_game"); 673 elm_object_signal_emit(layout, "play", "efl_game");
720 674
721 eo_do(scene->mesh_node_ball, 675 evas_canvas3d_node_position_set(scene->mesh_node_ball, ball_position_x, ball_position_y, ball_position_z);
722 evas_canvas3d_node_position_set(ball_position_x, ball_position_y, ball_position_z));
723 676
724 if ((ball_position_x < -21.0) || (ball_position_x > 21.0) || (ball_position_z < -21.0) || (ball_position_z > 21.0)) 677 if ((ball_position_x < -21.0) || (ball_position_x > 21.0) || (ball_position_z < -21.0) || (ball_position_z > 21.0))
725 { 678 {
@@ -772,13 +725,11 @@ _animate_ball(void *data)
772 } 725 }
773 } 726 }
774 727
775 eo_do(scene->mesh_node_ball, 728 evas_canvas3d_node_position_get(scene->mesh_node_ball, EVAS_CANVAS3D_SPACE_PARENT, &x, &y, &z);
776 evas_canvas3d_node_position_get(EVAS_CANVAS3D_SPACE_PARENT, &x, &y, &z));
777 729
778 EINA_LIST_FOREACH(scene->items, l, node) 730 EINA_LIST_FOREACH(scene->items, l, node)
779 { 731 {
780 eo_do(node, 732 evas_canvas3d_node_position_get(node, EVAS_CANVAS3D_SPACE_PARENT, &xx, &yy, &zz);
781 evas_canvas3d_node_position_get(EVAS_CANVAS3D_SPACE_PARENT, &xx, &yy, &zz));
782 733
783 d_x = xx - x; 734 d_x = xx - x;
784 d_y = yy - y; 735 d_y = yy - y;
@@ -786,8 +737,7 @@ _animate_ball(void *data)
786 737
787 if (d_x < 2.0 && d_x > -2.0 && d_y < 2.0 && d_y > -2.0 && d_z < 2.0 && d_z > -2.0) 738 if (d_x < 2.0 && d_x > -2.0 && d_y < 2.0 && d_y > -2.0 && d_z < 2.0 && d_z > -2.0)
788 { 739 {
789 eo_do(scene->root_node, 740 evas_canvas3d_node_member_del(scene->root_node, node);
790 evas_canvas3d_node_member_del(node));
791 scene->items = eina_list_remove_list(scene->items, l); 741 scene->items = eina_list_remove_list(scene->items, l);
792 742
793 i--; 743 i--;
@@ -819,8 +769,7 @@ _animate_cubes(void *data)
819 angle += 0.5; 769 angle += 0.5;
820 770
821 EINA_LIST_FOREACH(scene->items, l, cube) 771 EINA_LIST_FOREACH(scene->items, l, cube)
822 eo_do(cube, 772 evas_canvas3d_node_orientation_angle_axis_set(cube, angle, 1.0, 1.0, 1.0);
823 evas_canvas3d_node_orientation_angle_axis_set(angle, 1.0, 1.0, 1.0));
824 773
825 /* Rotate */ 774 /* Rotate */
826 if (angle > 360.0) 775 if (angle > 360.0)
@@ -866,9 +815,8 @@ elm_main(int argc, char **argv)
866 _scene_setup(&data, 10.0, 10); 815 _scene_setup(&data, 10.0, 10);
867 816
868 image = evas_object_image_filled_add(evas); 817 image = evas_object_image_filled_add(evas);
869 eo_do(image, 818 efl_gfx_visible_set(image, EINA_TRUE);
870 efl_gfx_visible_set(EINA_TRUE), 819 evas_obj_image_scene_set(image, data.scene);
871 evas_obj_image_scene_set(data.scene));
872 820
873 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);
874 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);
diff --git a/src/lib/elc_combobox.c b/src/lib/elc_combobox.c
index cd8e32cbe..408b59050 100644
--- a/src/lib/elc_combobox.c
+++ b/src/lib/elc_combobox.c
@@ -45,12 +45,12 @@ static const Elm_Action key_actions[] = {
45EOLIAN static Eina_Bool 45EOLIAN static Eina_Bool
46_elm_combobox_elm_widget_translate(Eo *obj EINA_UNUSED, Elm_Combobox_Data *sd) 46_elm_combobox_elm_widget_translate(Eo *obj EINA_UNUSED, Elm_Combobox_Data *sd)
47{ 47{
48 eo_do_super(obj, MY_CLASS, elm_obj_widget_translate()); 48 elm_obj_widget_translate(eo_super(obj, MY_CLASS));
49 eo_do(sd->genlist, elm_obj_widget_translate()); 49 elm_obj_widget_translate(sd->genlist);
50 eo_do(sd->entry, elm_obj_widget_translate()); 50 elm_obj_widget_translate(sd->entry);
51 51
52 if (sd->hover) 52 if (sd->hover)
53 eo_do(sd->hover, elm_obj_widget_translate()); 53 elm_obj_widget_translate(sd->hover);
54 54
55 return EINA_TRUE; 55 return EINA_TRUE;
56} 56}
@@ -72,7 +72,7 @@ _elm_combobox_elm_widget_theme_apply(Eo *obj, Elm_Combobox_Data *sd)
72 /* combobox's style has no extra bit for orientation but could have... */ 72 /* combobox's style has no extra bit for orientation but could have... */
73 eina_stringshare_replace(&(wd->style), buf); 73 eina_stringshare_replace(&(wd->style), buf);
74 74
75 eo_do_super(obj, MY_CLASS, int_ret = elm_obj_widget_theme_apply()); 75 int_ret = elm_obj_widget_theme_apply(eo_super(obj, MY_CLASS));
76 if (!int_ret) return EINA_FALSE; 76 if (!int_ret) return EINA_FALSE;
77 77
78 eina_stringshare_replace(&(wd->style), style); 78 eina_stringshare_replace(&(wd->style), style);
@@ -117,7 +117,7 @@ _hover_end_finished(void *data,
117 { 117 {
118 sd->expanded = EINA_FALSE; 118 sd->expanded = EINA_FALSE;
119 evas_object_hide(sd->hover); 119 evas_object_hide(sd->hover);
120 eo_do(data, eo_event_callback_call(ELM_COMBOBOX_EVENT_DISMISSED, NULL)); 120 eo_event_callback_call(data, ELM_COMBOBOX_EVENT_DISMISSED, NULL);
121 } 121 }
122} 122}
123 123
@@ -190,7 +190,7 @@ _activate(Evas_Object *obj)
190 evas_object_show(sd->genlist); 190 evas_object_show(sd->genlist);
191 elm_genlist_item_selected_set(sd->item, EINA_TRUE); 191 elm_genlist_item_selected_set(sd->item, EINA_TRUE);
192 evas_object_show(sd->hover); 192 evas_object_show(sd->hover);
193 eo_do(obj, eo_event_callback_call(ELM_COMBOBOX_EVENT_EXPANDED, NULL)); 193 eo_event_callback_call(obj, ELM_COMBOBOX_EVENT_EXPANDED, NULL);
194} 194}
195 195
196static void 196static void
@@ -198,13 +198,13 @@ _on_item_selected(void *data , Evas_Object *obj EINA_UNUSED, void *event)
198{ 198{
199 ELM_COMBOBOX_DATA_GET(data, sd); 199 ELM_COMBOBOX_DATA_GET(data, sd);
200 elm_object_focus_set(sd->entry, EINA_TRUE); 200 elm_object_focus_set(sd->entry, EINA_TRUE);
201 eo_do(data, eo_event_callback_call(ELM_COMBOBOX_EVENT_ITEM_SELECTED, event)); 201 eo_event_callback_call(data, ELM_COMBOBOX_EVENT_ITEM_SELECTED, event);
202} 202}
203 203
204static void 204static void
205_on_item_pressed(void *data , Evas_Object *obj EINA_UNUSED, void *event) 205_on_item_pressed(void *data , Evas_Object *obj EINA_UNUSED, void *event)
206{ 206{
207 eo_do(data, eo_event_callback_call(ELM_COMBOBOX_EVENT_ITEM_PRESSED, event)); 207 eo_event_callback_call(data, ELM_COMBOBOX_EVENT_ITEM_PRESSED, event);
208} 208}
209 209
210static Eina_Bool 210static Eina_Bool
@@ -221,7 +221,7 @@ _gl_filter_finished_cb(void *data, const Eo_Event *event)
221 return EINA_TRUE; 221 return EINA_TRUE;
222 } 222 }
223 223
224 eo_do(data, eo_event_callback_call(ELM_COMBOBOX_EVENT_FILTER_DONE, event->event_info)); 224 eo_event_callback_call(data, ELM_COMBOBOX_EVENT_FILTER_DONE, event->event_info);
225 225
226 if (sd->count > 0) 226 if (sd->count > 0)
227 { 227 {
@@ -252,7 +252,7 @@ _on_aborted(void *data, const Eo_Event *event EINA_UNUSED)
252static Eina_Bool 252static Eina_Bool
253_on_changed(void *data, const Eo_Event *event EINA_UNUSED) 253_on_changed(void *data, const Eo_Event *event EINA_UNUSED)
254{ 254{
255 eo_do(data, eo_event_callback_call(ELM_ENTRY_EVENT_CHANGED, NULL)); 255 eo_event_callback_call(data, ELM_ENTRY_EVENT_CHANGED, NULL);
256 return EINA_TRUE; 256 return EINA_TRUE;
257} 257}
258 258
@@ -266,36 +266,35 @@ _on_clicked(void *data, const Eo_Event *event EINA_UNUSED)
266EOLIAN static void 266EOLIAN static void
267_elm_combobox_evas_object_smart_add(Eo *obj, Elm_Combobox_Data *sd EINA_UNUSED) 267_elm_combobox_evas_object_smart_add(Eo *obj, Elm_Combobox_Data *sd EINA_UNUSED)
268{ 268{
269 eo_do_super(obj, MY_CLASS, evas_obj_smart_add()); 269 evas_obj_smart_add(eo_super(obj, MY_CLASS));
270 elm_widget_sub_object_parent_add(obj); 270 elm_widget_sub_object_parent_add(obj);
271 271
272 elm_widget_mirrored_automatic_set(obj, EINA_FALSE); 272 elm_widget_mirrored_automatic_set(obj, EINA_FALSE);
273 273
274 eo_do(obj, eo_event_callback_add( 274 eo_event_callback_add(obj, EVAS_CLICKABLE_INTERFACE_EVENT_CLICKED, _on_clicked, obj);
275 EVAS_CLICKABLE_INTERFACE_EVENT_CLICKED, _on_clicked, obj));
276 275
277 //What are you doing here? 276 //What are you doing here?
278 eo_do(obj, elm_obj_widget_theme_apply()); 277 elm_obj_widget_theme_apply(obj);
279} 278}
280 279
281EOLIAN static void 280EOLIAN static void
282_elm_combobox_evas_object_smart_del(Eo *obj, Elm_Combobox_Data *sd) 281_elm_combobox_evas_object_smart_del(Eo *obj, Elm_Combobox_Data *sd)
283{ 282{
284 sd->hover_parent = NULL; 283 sd->hover_parent = NULL;
285 eo_do_super(obj, MY_CLASS, evas_obj_smart_del()); 284 evas_obj_smart_del(eo_super(obj, MY_CLASS));
286} 285}
287 286
288EOLIAN static void 287EOLIAN static void
289_elm_combobox_evas_object_smart_show(Eo *obj, Elm_Combobox_Data *sd) 288_elm_combobox_evas_object_smart_show(Eo *obj, Elm_Combobox_Data *sd)
290{ 289{
291 eo_do_super(obj, MY_CLASS, evas_obj_smart_show()); 290 evas_obj_smart_show(eo_super(obj, MY_CLASS));
292 if (sd->expanded) evas_object_show(sd->hover); 291 if (sd->expanded) evas_object_show(sd->hover);
293} 292}
294 293
295EOLIAN static void 294EOLIAN static void
296_elm_combobox_evas_object_smart_hide(Eo *obj, Elm_Combobox_Data *sd) 295_elm_combobox_evas_object_smart_hide(Eo *obj, Elm_Combobox_Data *sd)
297{ 296{
298 eo_do_super(obj, MY_CLASS, evas_obj_smart_hide()); 297 evas_obj_smart_hide(eo_super(obj, MY_CLASS));
299 if (sd->hover) evas_object_hide(sd->hover); 298 if (sd->hover) evas_object_hide(sd->hover);
300} 299}
301 300
@@ -321,14 +320,13 @@ _elm_combobox_eo_base_constructor(Eo *obj, Elm_Combobox_Data *sd)
321 Evas_Object *entry; 320 Evas_Object *entry;
322 char buf[128]; 321 char buf[128];
323 322
324 eo_do_super(obj, MY_CLASS, eo_constructor()); 323 eo_constructor(eo_super(obj, MY_CLASS));
325 324
326 sd->first_filter = EINA_TRUE; 325 sd->first_filter = EINA_TRUE;
327 326
328 eo_do(obj, 327 evas_obj_type_set(obj, MY_CLASS_NAME_LEGACY);
329 evas_obj_type_set(MY_CLASS_NAME_LEGACY), 328 evas_obj_smart_callbacks_descriptions_set(obj, _smart_callbacks);
330 evas_obj_smart_callbacks_descriptions_set(_smart_callbacks), 329 elm_interface_atspi_accessible_role_set(obj, ELM_ATSPI_ROLE_GLASS_PANE);
331 elm_interface_atspi_accessible_role_set(ELM_ATSPI_ROLE_GLASS_PANE));
332 330
333 //hover-parent 331 //hover-parent
334 sd->hover_parent = elm_object_parent_widget_get(obj); 332 sd->hover_parent = elm_object_parent_widget_get(obj);
@@ -342,8 +340,8 @@ _elm_combobox_eo_base_constructor(Eo *obj, Elm_Combobox_Data *sd)
342 elm_widget_style_get(obj)); 340 elm_widget_style_get(obj));
343 elm_object_style_set(sd->hover, buf); 341 elm_object_style_set(sd->hover, buf);
344 342
345 eo_do(sd->hover, eo_event_callback_add 343 eo_event_callback_add
346 (EVAS_CLICKABLE_INTERFACE_EVENT_CLICKED, _on_hover_clicked, obj)); 344 (sd->hover, EVAS_CLICKABLE_INTERFACE_EVENT_CLICKED, _on_hover_clicked, obj);
347 elm_layout_signal_callback_add 345 elm_layout_signal_callback_add
348 (sd->hover, "elm,action,hide,finished", "elm", _hover_end_finished, obj); 346 (sd->hover, "elm,action,hide,finished", "elm", _hover_end_finished, obj);
349 347
@@ -368,8 +366,7 @@ _elm_combobox_eo_base_constructor(Eo *obj, Elm_Combobox_Data *sd)
368 evas_object_size_hint_align_set(gl, EVAS_HINT_FILL, EVAS_HINT_FILL); 366 evas_object_size_hint_align_set(gl, EVAS_HINT_FILL, EVAS_HINT_FILL);
369 evas_object_smart_callback_add(gl, "selected", _on_item_selected, obj); 367 evas_object_smart_callback_add(gl, "selected", _on_item_selected, obj);
370 evas_object_smart_callback_add(gl, "pressed", _on_item_pressed, obj); 368 evas_object_smart_callback_add(gl, "pressed", _on_item_pressed, obj);
371 eo_do(gl, eo_event_callback_add(ELM_GENLIST_EVENT_FILTER_DONE, 369 eo_event_callback_add(gl, ELM_GENLIST_EVENT_FILTER_DONE, _gl_filter_finished_cb, obj);
372 _gl_filter_finished_cb, obj));
373 elm_genlist_homogeneous_set(gl, EINA_TRUE); 370 elm_genlist_homogeneous_set(gl, EINA_TRUE);
374 elm_genlist_mode_set(gl, ELM_LIST_COMPRESS); 371 elm_genlist_mode_set(gl, ELM_LIST_COMPRESS);
375 elm_table_pack(sd->tbl, gl, 0, 0, 1, 1); 372 elm_table_pack(sd->tbl, gl, 0, 0, 1, 1);
@@ -382,15 +379,12 @@ _elm_combobox_eo_base_constructor(Eo *obj, Elm_Combobox_Data *sd)
382 ELM_SCROLLER_POLICY_OFF); 379 ELM_SCROLLER_POLICY_OFF);
383 elm_entry_scrollable_set(entry, EINA_TRUE); 380 elm_entry_scrollable_set(entry, EINA_TRUE);
384 elm_entry_single_line_set(entry, EINA_TRUE); 381 elm_entry_single_line_set(entry, EINA_TRUE);
385 eo_do(entry, eo_event_callback_add(ELM_ENTRY_EVENT_CHANGED_USER, 382 eo_event_callback_add(entry, ELM_ENTRY_EVENT_CHANGED_USER, _on_changed, obj);
386 _on_changed, obj)); 383 eo_event_callback_add(entry, ELM_ENTRY_EVENT_ABORTED, _on_aborted, obj);
387 eo_do(entry, eo_event_callback_add(ELM_ENTRY_EVENT_ABORTED,
388 _on_aborted, obj));
389 evas_object_show(entry); 384 evas_object_show(entry);
390 385
391 eo_do(obj, 386 eo_composite_attach(obj, gl);
392 eo_composite_attach(gl), 387 eo_composite_attach(obj, entry);
393 eo_composite_attach(entry));
394 388
395 elm_object_part_content_set(obj, "elm.swallow.content", entry); 389 elm_object_part_content_set(obj, "elm.swallow.content", entry);
396 return obj; 390 return obj;
@@ -417,7 +411,7 @@ _elm_combobox_hover_end(Eo *obj, Elm_Combobox_Data *sd)
417 { 411 {
418 sd->expanded = EINA_FALSE; 412 sd->expanded = EINA_FALSE;
419 evas_object_hide(sd->hover); 413 evas_object_hide(sd->hover);
420 eo_do(obj, eo_event_callback_call(ELM_COMBOBOX_EVENT_DISMISSED, NULL)); 414 eo_event_callback_call(obj, ELM_COMBOBOX_EVENT_DISMISSED, NULL);
421 } // for backward compatibility 415 } // for backward compatibility
422} 416}
423 417
@@ -463,8 +457,7 @@ _key_action_activate(Evas_Object *obj, const char *params EINA_UNUSED)
463 elm_combobox_hover_begin(obj); 457 elm_combobox_hover_begin(obj);
464 else 458 else
465 { 459 {
466 eo_do(sd->genlist, eo_event_callback_call(EVAS_CLICKABLE_INTERFACE_EVENT_PRESSED, 460 eo_event_callback_call(sd->genlist, EVAS_CLICKABLE_INTERFACE_EVENT_PRESSED, sd->item);
467 sd->item));
468 elm_entry_cursor_end_set(sd->entry); 461 elm_entry_cursor_end_set(sd->entry);
469 } 462 }
470 return EINA_TRUE; 463 return EINA_TRUE;
@@ -511,7 +504,7 @@ _elm_combobox_elm_genlist_filter_set(Eo *obj EINA_UNUSED, Elm_Combobox_Data *pd,
511{ 504{
512 pd->first_filter = EINA_FALSE; 505 pd->first_filter = EINA_FALSE;
513 506
514 eo_do(pd->genlist, elm_obj_genlist_filter_set(key)); 507 elm_obj_genlist_filter_set(pd->genlist, key);
515} 508}
516 509
517EOLIAN void 510EOLIAN void
@@ -532,7 +525,7 @@ EOLIAN static void
532_elm_combobox_evas_object_smart_resize(Eo *obj, Elm_Combobox_Data *pd, 525_elm_combobox_evas_object_smart_resize(Eo *obj, Elm_Combobox_Data *pd,
533 Evas_Coord w, Evas_Coord h) 526 Evas_Coord w, Evas_Coord h)
534{ 527{
535 eo_do_super(obj, MY_CLASS, evas_obj_smart_resize(w, h)); 528 evas_obj_smart_resize(eo_super(obj, MY_CLASS), w, h);
536 if (pd->count > 0) _table_resize(obj); 529 if (pd->count > 0) _table_resize(obj);
537} 530}
538#include "elm_combobox.eo.c" 531#include "elm_combobox.eo.c"
diff --git a/src/lib/elc_ctxpopup.c b/src/lib/elc_ctxpopup.c
index e1ce44116..68f65d43c 100644
--- a/src/lib/elc_ctxpopup.c
+++ b/src/lib/elc_ctxpopup.c
@@ -53,9 +53,9 @@ _elm_ctxpopup_elm_widget_translate(Eo *obj, Elm_Ctxpopup_Data *sd)
53 if (sd->auto_hide) evas_object_hide(obj); 53 if (sd->auto_hide) evas_object_hide(obj);
54 54
55 EINA_LIST_FOREACH(sd->items, l, it) 55 EINA_LIST_FOREACH(sd->items, l, it)
56 eo_do(it, elm_wdg_item_translate()); 56 elm_wdg_item_translate(it);
57 57
58 eo_do_super(obj, MY_CLASS, elm_obj_widget_translate()); 58 elm_obj_widget_translate(eo_super(obj, MY_CLASS));
59 59
60 return EINA_TRUE; 60 return EINA_TRUE;
61} 61}
@@ -622,7 +622,7 @@ _elm_ctxpopup_elm_widget_sub_object_add(Eo *obj, Elm_Ctxpopup_Data *_pd EINA_UNU
622{ 622{
623 Eina_Bool int_ret = EINA_FALSE; 623 Eina_Bool int_ret = EINA_FALSE;
624 624
625 eo_do_super(obj, MY_CLASS, int_ret = elm_obj_widget_sub_object_add(sobj)); 625 int_ret = elm_obj_widget_sub_object_add(eo_super(obj, MY_CLASS), sobj);
626 626
627 return int_ret; 627 return int_ret;
628} 628}
@@ -675,7 +675,7 @@ _elm_ctxpopup_elm_layout_sizing_eval(Eo *obj, Elm_Ctxpopup_Data *sd)
675 675
676 _show_signals_emit(obj, sd->dir); 676 _show_signals_emit(obj, sd->dir);
677 677
678 eo_do(obj, eo_event_callback_call(ELM_CTXPOPUP_EVENT_GEOMETRY_UPDATE, &rect)); 678 eo_event_callback_call(obj, ELM_CTXPOPUP_EVENT_GEOMETRY_UPDATE, &rect);
679} 679}
680 680
681static void 681static void
@@ -713,7 +713,7 @@ _on_parent_resize(void *data,
713 sd->dir = ELM_CTXPOPUP_DIRECTION_UNKNOWN; 713 sd->dir = ELM_CTXPOPUP_DIRECTION_UNKNOWN;
714 714
715 evas_object_hide(data); 715 evas_object_hide(data);
716 eo_do(data, eo_event_callback_call(ELM_CTXPOPUP_EVENT_DISMISSED, NULL)); 716 eo_event_callback_call(data, ELM_CTXPOPUP_EVENT_DISMISSED, NULL);
717 } 717 }
718 else 718 else
719 { 719 {
@@ -755,7 +755,7 @@ _elm_ctxpopup_elm_widget_theme_apply(Eo *obj, Elm_Ctxpopup_Data *sd)
755{ 755{
756 Eina_Bool int_ret = EINA_FALSE; 756 Eina_Bool int_ret = EINA_FALSE;
757 757
758 eo_do_super(obj, MY_CLASS, int_ret = elm_obj_widget_theme_apply()); 758 int_ret = elm_obj_widget_theme_apply(eo_super(obj, MY_CLASS));
759 if (!int_ret) return EINA_FALSE; 759 if (!int_ret) return EINA_FALSE;
760 760
761 elm_widget_theme_object_set 761 elm_widget_theme_object_set
@@ -787,7 +787,7 @@ _elm_ctxpopup_elm_container_content_set(Eo *obj, Elm_Ctxpopup_Data *sd, const ch
787 787
788 if ((part) && (strcmp(part, "default"))) 788 if ((part) && (strcmp(part, "default")))
789 { 789 {
790 eo_do_super(obj, MY_CLASS, int_ret = elm_obj_container_content_set(part, content)); 790 int_ret = elm_obj_container_content_set(eo_super(obj, MY_CLASS), part, content);
791 return int_ret; 791 return int_ret;
792 } 792 }
793 793
@@ -821,7 +821,7 @@ _elm_ctxpopup_elm_container_content_get(Eo *obj, Elm_Ctxpopup_Data *sd, const ch
821 if ((part) && (strcmp(part, "default"))) 821 if ((part) && (strcmp(part, "default")))
822 { 822 {
823 Evas_Object *ret = NULL; 823 Evas_Object *ret = NULL;
824 eo_do_super(obj, MY_CLASS, ret = elm_obj_container_content_get(part)); 824 ret = elm_obj_container_content_get(eo_super(obj, MY_CLASS), part);
825 return ret; 825 return ret;
826 } 826 }
827 827
@@ -835,7 +835,7 @@ _elm_ctxpopup_elm_container_content_unset(Eo *obj, Elm_Ctxpopup_Data *sd, const
835 835
836 if ((part) && (strcmp(part, "default"))) 836 if ((part) && (strcmp(part, "default")))
837 { 837 {
838 eo_do_super(obj, MY_CLASS, content = elm_obj_container_content_unset(part)); 838 content = elm_obj_container_content_unset(eo_super(obj, MY_CLASS), part);
839 return content; 839 return content;
840 } 840 }
841 841
@@ -918,9 +918,8 @@ EOLIAN static void
918_elm_ctxpopup_item_elm_widget_item_disable(Eo *eo_ctxpopup_it, 918_elm_ctxpopup_item_elm_widget_item_disable(Eo *eo_ctxpopup_it,
919 Elm_Ctxpopup_Item_Data *ctxpopup_it) 919 Elm_Ctxpopup_Item_Data *ctxpopup_it)
920{ 920{
921 Eina_Bool tmp;
922 elm_object_item_disabled_set 921 elm_object_item_disabled_set
923 (ctxpopup_it->list_item, eo_do_ret(eo_ctxpopup_it, tmp, elm_wdg_item_disabled_get())); 922 (ctxpopup_it->list_item, elm_wdg_item_disabled_get(eo_ctxpopup_it));
924} 923}
925 924
926EOLIAN static void 925EOLIAN static void
@@ -1027,7 +1026,7 @@ _hide_finished_cb(void *data,
1027 const char *source EINA_UNUSED) 1026 const char *source EINA_UNUSED)
1028{ 1027{
1029 evas_object_hide(data); 1028 evas_object_hide(data);
1030 eo_do(data, eo_event_callback_call(ELM_CTXPOPUP_EVENT_DISMISSED, NULL)); 1029 eo_event_callback_call(data, ELM_CTXPOPUP_EVENT_DISMISSED, NULL);
1031} 1030}
1032 1031
1033static void 1032static void
@@ -1076,7 +1075,7 @@ _elm_ctxpopup_item_eo_base_destructor(Eo *eo_ctxpopup_it,
1076 if (sd->list_visible) elm_layout_sizing_eval(WIDGET(ctxpopup_it)); 1075 if (sd->list_visible) elm_layout_sizing_eval(WIDGET(ctxpopup_it));
1077 } 1076 }
1078 1077
1079 eo_do_super(eo_ctxpopup_it, ELM_CTXPOPUP_ITEM_CLASS, eo_destructor()); 1078 eo_destructor(eo_super(eo_ctxpopup_it, ELM_CTXPOPUP_ITEM_CLASS));
1080} 1079}
1081 1080
1082EOLIAN static Eina_Bool 1081EOLIAN static Eina_Bool
@@ -1084,7 +1083,7 @@ _elm_ctxpopup_elm_widget_disable(Eo *obj, Elm_Ctxpopup_Data *sd)
1084{ 1083{
1085 Eina_Bool int_ret = EINA_FALSE; 1084 Eina_Bool int_ret = EINA_FALSE;
1086 1085
1087 eo_do_super(obj, MY_CLASS, int_ret = elm_obj_widget_disable()); 1086 int_ret = elm_obj_widget_disable(eo_super(obj, MY_CLASS));
1088 if (!int_ret) return EINA_FALSE; 1087 if (!int_ret) return EINA_FALSE;
1089 if (sd->list) 1088 if (sd->list)
1090 elm_object_disabled_set(sd->list, elm_widget_disabled_get(obj)); 1089 elm_object_disabled_set(sd->list, elm_widget_disabled_get(obj));
@@ -1099,7 +1098,7 @@ _elm_ctxpopup_evas_object_smart_add(Eo *obj, Elm_Ctxpopup_Data *priv)
1099{ 1098{
1100 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd); 1099 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
1101 1100
1102 eo_do_super(obj, MY_CLASS, evas_obj_smart_add()); 1101 evas_obj_smart_add(eo_super(obj, MY_CLASS));
1103 elm_widget_sub_object_parent_add(obj); 1102 elm_widget_sub_object_parent_add(obj);
1104 1103
1105 if (!elm_layout_theme_set 1104 if (!elm_layout_theme_set
@@ -1138,7 +1137,7 @@ _elm_ctxpopup_evas_object_smart_add(Eo *obj, Elm_Ctxpopup_Data *priv)
1138 (priv->box, EVAS_CALLBACK_RESIZE, _on_content_resized, obj); 1137 (priv->box, EVAS_CALLBACK_RESIZE, _on_content_resized, obj);
1139 1138
1140 /* box will be our content placeholder, thus the parent's version call */ 1139 /* box will be our content placeholder, thus the parent's version call */
1141 eo_do_super(obj, MY_CLASS, elm_obj_container_content_set("elm.swallow.content", priv->box)); 1140 elm_obj_container_content_set(eo_super(obj, MY_CLASS), "elm.swallow.content", priv->box);
1142 1141
1143 evas_object_event_callback_add(obj, EVAS_CALLBACK_SHOW, _on_show, NULL); 1142 evas_object_event_callback_add(obj, EVAS_CALLBACK_SHOW, _on_show, NULL);
1144 evas_object_event_callback_add(obj, EVAS_CALLBACK_HIDE, _on_hide, NULL); 1143 evas_object_event_callback_add(obj, EVAS_CALLBACK_HIDE, _on_hide, NULL);
@@ -1163,7 +1162,7 @@ _elm_ctxpopup_evas_object_smart_del(Eo *obj, Elm_Ctxpopup_Data *sd)
1163 EINA_LIST_FREE(sd->items, it) 1162 EINA_LIST_FREE(sd->items, it)
1164 eo_del(it); 1163 eo_del(it);
1165 1164
1166 eo_do_super(obj, MY_CLASS, evas_obj_smart_del()); 1165 evas_obj_smart_del(eo_super(obj, MY_CLASS));
1167} 1166}
1168 1167
1169EOLIAN static void 1168EOLIAN static void
@@ -1190,11 +1189,10 @@ elm_ctxpopup_add(Evas_Object *parent)
1190EOLIAN static Eo * 1189EOLIAN static Eo *
1191_elm_ctxpopup_eo_base_constructor(Eo *obj, Elm_Ctxpopup_Data *_pd EINA_UNUSED) 1190_elm_ctxpopup_eo_base_constructor(Eo *obj, Elm_Ctxpopup_Data *_pd EINA_UNUSED)
1192{ 1191{
1193 obj = eo_do_super_ret(obj, MY_CLASS, obj, eo_constructor()); 1192 obj = eo_constructor(eo_super(obj, MY_CLASS));
1194 eo_do(obj, 1193 evas_obj_type_set(obj, MY_CLASS_NAME_LEGACY);
1195 evas_obj_type_set(MY_CLASS_NAME_LEGACY), 1194 evas_obj_smart_callbacks_descriptions_set(obj, _smart_callbacks);
1196 evas_obj_smart_callbacks_descriptions_set(_smart_callbacks), 1195 elm_interface_atspi_accessible_role_set(obj, ELM_ATSPI_ROLE_POPUP_MENU);
1197 elm_interface_atspi_accessible_role_set(ELM_ATSPI_ROLE_POPUP_MENU));
1198 1196
1199 return obj; 1197 return obj;
1200} 1198}
@@ -1271,7 +1269,7 @@ _item_wrap_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UN
1271EOLIAN static Eo * 1269EOLIAN static Eo *
1272_elm_ctxpopup_item_eo_base_constructor(Eo *obj, Elm_Ctxpopup_Item_Data *it) 1270_elm_ctxpopup_item_eo_base_constructor(Eo *obj, Elm_Ctxpopup_Item_Data *it)
1273{ 1271{
1274 obj = eo_do_super_ret(obj, ELM_CTXPOPUP_ITEM_CLASS, obj, eo_constructor()); 1272 obj = eo_constructor(eo_super(obj, ELM_CTXPOPUP_ITEM_CLASS));
1275 it->base = eo_data_scope_get(obj, ELM_WIDGET_ITEM_CLASS); 1273 it->base = eo_data_scope_get(obj, ELM_WIDGET_ITEM_CLASS);
1276 1274
1277 return obj; 1275 return obj;
@@ -1282,7 +1280,7 @@ _elm_ctxpopup_item_append(Eo *obj, Elm_Ctxpopup_Data *sd, const char *label, Eva
1282{ 1280{
1283 Eo *eo_item; 1281 Eo *eo_item;
1284 1282
1285 eo_item = eo_add(ELM_CTXPOPUP_ITEM_CLASS, obj, elm_obj_ctxpopup_item_init(func, data)); 1283 eo_item = eo_add(ELM_CTXPOPUP_ITEM_CLASS, obj, elm_obj_ctxpopup_item_init(eoid, func, data));
1286 if (!eo_item) return NULL; 1284 if (!eo_item) return NULL;
1287 1285
1288 ELM_CTXPOPUP_ITEM_DATA_GET(eo_item, item); 1286 ELM_CTXPOPUP_ITEM_DATA_GET(eo_item, item);
@@ -1376,7 +1374,7 @@ _elm_ctxpopup_item_prepend(Eo *obj, Elm_Ctxpopup_Data *sd, const char *label, Ev
1376{ 1374{
1377 Eo *eo_item; 1375 Eo *eo_item;
1378 1376
1379 eo_item = eo_add(ELM_CTXPOPUP_ITEM_CLASS, obj, elm_obj_ctxpopup_item_init(func, data)); 1377 eo_item = eo_add(ELM_CTXPOPUP_ITEM_CLASS, obj, elm_obj_ctxpopup_item_init(eoid, func, data));
1380 if (!eo_item) return NULL; 1378 if (!eo_item) return NULL;
1381 1379
1382 ELM_CTXPOPUP_ITEM_DATA_GET(eo_item, item); 1380 ELM_CTXPOPUP_ITEM_DATA_GET(eo_item, item);
@@ -1428,7 +1426,7 @@ _elm_ctxpopup_item_init(Eo *eo_item,
1428 const void *data) 1426 const void *data)
1429{ 1427{
1430 Eo *obj; 1428 Eo *obj;
1431 eo_do(eo_item, obj = eo_parent_get()); 1429 obj = eo_parent_get(eo_item);
1432 Elm_Ctxpopup_Data *sd = eo_data_scope_get(obj, ELM_CTXPOPUP_CLASS); 1430 Elm_Ctxpopup_Data *sd = eo_data_scope_get(obj, ELM_CTXPOPUP_CLASS);
1433 if (!sd->list) 1431 if (!sd->list)
1434 { 1432 {
@@ -1470,7 +1468,7 @@ EOLIAN static Elm_Atspi_State_Set
1470_elm_ctxpopup_elm_interface_atspi_accessible_state_set_get(Eo *obj, Elm_Ctxpopup_Data *sd EINA_UNUSED) 1468_elm_ctxpopup_elm_interface_atspi_accessible_state_set_get(Eo *obj, Elm_Ctxpopup_Data *sd EINA_UNUSED)
1471{ 1469{
1472 Elm_Atspi_State_Set ret; 1470 Elm_Atspi_State_Set ret;
1473 eo_do_super(obj, MY_CLASS, ret = elm_interface_atspi_accessible_state_set_get()); 1471 ret = elm_interface_atspi_accessible_state_set_get(eo_super(obj, MY_CLASS));
1474 1472
1475 STATE_TYPE_SET(ret, ELM_ATSPI_STATE_MODAL); 1473 STATE_TYPE_SET(ret, ELM_ATSPI_STATE_MODAL);
1476 1474
diff --git a/src/lib/elc_fileselector.c b/src/lib/elc_fileselector.c
index 6922594c1..3ead81682 100644
--- a/src/lib/elc_fileselector.c
+++ b/src/lib/elc_fileselector.c
@@ -66,7 +66,7 @@ _elm_fileselector_smart_del_do(Elm_Fileselector_Data *sd)
66 free(ecore_idler_del(sd->populate_idler)); 66 free(ecore_idler_del(sd->populate_idler));
67 ecore_idler_del(sd->path_entry_idler); 67 ecore_idler_del(sd->path_entry_idler);
68 68
69 eo_do_super(sd->obj, MY_CLASS, evas_obj_smart_del()); 69 evas_obj_smart_del(eo_super(sd->obj, MY_CLASS));
70} 70}
71 71
72EOLIAN static void 72EOLIAN static void
@@ -104,7 +104,7 @@ _elm_fileselector_elm_widget_theme_apply(Eo *obj, Elm_Fileselector_Data *sd)
104 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE); 104 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE);
105 105
106 Eina_Bool int_ret = EINA_FALSE; 106 Eina_Bool int_ret = EINA_FALSE;
107 eo_do_super(obj, MY_CLASS, int_ret = elm_obj_widget_theme_apply()); 107 int_ret = elm_obj_widget_theme_apply(eo_super(obj, MY_CLASS));
108 if (!int_ret) return EINA_FALSE; 108 if (!int_ret) return EINA_FALSE;
109 109
110 style = elm_widget_style_get(obj); 110 style = elm_widget_style_get(obj);
@@ -544,8 +544,8 @@ _signal_first(Listing_Request *lreq)
544 EINA_LIST_FREE(sd->paths, path) free(path); 544 EINA_LIST_FREE(sd->paths, path) free(path);
545 } 545 }
546 546
547 eo_do(lreq->obj, eo_event_callback_call 547 eo_event_callback_call
548 (ELM_FILESELECTOR_EVENT_DIRECTORY_OPEN, (void *)lreq->path)); 548 (lreq->obj, ELM_FILESELECTOR_EVENT_DIRECTORY_OPEN, (void *)lreq->path);
549 549
550 if (!lreq->parent_it) 550 if (!lreq->parent_it)
551 { 551 {
@@ -801,8 +801,8 @@ _on_item_activated(void *data, const Eo_Event *event)
801 is_dir = ecore_file_is_dir(path); 801 is_dir = ecore_file_is_dir(path);
802 if (!is_dir) 802 if (!is_dir)
803 { 803 {
804 eo_do(data, eo_event_callback_call 804 eo_event_callback_call
805 (ELM_FILESELECTOR_EVENT_ACTIVATED, (void *)path)); 805 (data, ELM_FILESELECTOR_EVENT_ACTIVATED, (void *)path);
806 return EINA_TRUE; 806 return EINA_TRUE;
807 } 807 }
808 808
@@ -890,8 +890,8 @@ _on_item_selected(void *data, const Eo_Event *event)
890 else 890 else
891 elm_object_text_set(sd->name_entry, ecore_file_file_get(path)); 891 elm_object_text_set(sd->name_entry, ecore_file_file_get(path));
892 892
893 eo_do(data, eo_event_callback_call 893 eo_event_callback_call
894 (EVAS_SELECTABLE_INTERFACE_EVENT_SELECTED, (void *)path)); 894 (data, EVAS_SELECTABLE_INTERFACE_EVENT_SELECTED, (void *)path);
895 } 895 }
896 else if (sd->multi && is_dir && sd->double_tap_navigation) 896 else if (sd->multi && is_dir && sd->double_tap_navigation)
897 { 897 {
@@ -1021,7 +1021,7 @@ _ok(void *data, const Eo_Event *event EINA_UNUSED)
1021 1021
1022 if (!sd->path) 1022 if (!sd->path)
1023 { 1023 {
1024 eo_do(fs, eo_event_callback_call(ELM_FILESELECTOR_EVENT_DONE, NULL)); 1024 eo_event_callback_call(fs, ELM_FILESELECTOR_EVENT_DONE, NULL);
1025 return EINA_TRUE; 1025 return EINA_TRUE;
1026 } 1026 }
1027 1027
@@ -1037,8 +1037,8 @@ _ok(void *data, const Eo_Event *event EINA_UNUSED)
1037 else 1037 else
1038 selection = eina_stringshare_add(elm_fileselector_selected_get(fs)); 1038 selection = eina_stringshare_add(elm_fileselector_selected_get(fs));
1039 1039
1040 eo_do(fs, eo_event_callback_call 1040 eo_event_callback_call
1041 (ELM_FILESELECTOR_EVENT_DONE, (void *)selection)); 1041 (fs, ELM_FILESELECTOR_EVENT_DONE, (void *)selection);
1042 eina_stringshare_del(selection); 1042 eina_stringshare_del(selection);
1043 1043
1044 return EINA_TRUE; 1044 return EINA_TRUE;
@@ -1049,7 +1049,7 @@ _canc(void *data, const Eo_Event *event EINA_UNUSED)
1049{ 1049{
1050 Evas_Object *fs = data; 1050 Evas_Object *fs = data;
1051 1051
1052 eo_do(fs, eo_event_callback_call(ELM_FILESELECTOR_EVENT_DONE, NULL)); 1052 eo_event_callback_call(fs, ELM_FILESELECTOR_EVENT_DONE, NULL);
1053 1053
1054 return EINA_TRUE; 1054 return EINA_TRUE;
1055} 1055}
@@ -1067,10 +1067,10 @@ _on_text_activated(void *data, const Eo_Event *event)
1067 1067
1068 if (!ecore_file_exists(path)) 1068 if (!ecore_file_exists(path))
1069 { 1069 {
1070 eo_do(fs, eo_event_callback_call 1070 eo_event_callback_call
1071 (EVAS_SELECTABLE_INTERFACE_EVENT_SELECTED, (void *)path)); 1071 (fs, EVAS_SELECTABLE_INTERFACE_EVENT_SELECTED, (void *)path);
1072 eo_do(fs, eo_event_callback_call 1072 eo_event_callback_call
1073 (ELM_FILESELECTOR_EVENT_SELECTED_INVALID, (void *)path)); 1073 (fs, ELM_FILESELECTOR_EVENT_SELECTED_INVALID, (void *)path);
1074 goto end; 1074 goto end;
1075 } 1075 }
1076 1076
@@ -1082,8 +1082,8 @@ _on_text_activated(void *data, const Eo_Event *event)
1082 eina_stringshare_del(p); 1082 eina_stringshare_del(p);
1083 1083
1084 if (sd->only_folder) 1084 if (sd->only_folder)
1085 eo_do(fs, eo_event_callback_call 1085 eo_event_callback_call
1086 (EVAS_SELECTABLE_INTERFACE_EVENT_SELECTED, (void *)path)); 1086 (fs, EVAS_SELECTABLE_INTERFACE_EVENT_SELECTED, (void *)path);
1087 1087
1088 goto end; 1088 goto end;
1089 } 1089 }
@@ -1096,8 +1096,8 @@ _on_text_activated(void *data, const Eo_Event *event)
1096 _populate(fs, dir, NULL, path); 1096 _populate(fs, dir, NULL, path);
1097 1097
1098 if (sd->only_folder) 1098 if (sd->only_folder)
1099 eo_do(fs, eo_event_callback_call