summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChunEon Park <hermet@hermet.pe.kr>2014-06-05 16:38:34 +0900
committerChunEon Park <hermet@hermet.pe.kr>2014-06-05 16:38:34 +0900
commit1e026bb1bb2cffb052255060392521a773451401 (patch)
tree01a1b90614aff22be6db59f77dfab3ce5c3fbc3b
parent8ef70b665ed8b252a148321ed22de36e77cab985 (diff)
examples - clean up the button on 3d object example.
1. remove shadow var warnings. 2. use elm_main() 3. set engine gl in default.
-rw-r--r--src/examples/button_on_3d_object_example.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/examples/button_on_3d_object_example.c b/src/examples/button_on_3d_object_example.c
index 53a33f265..e6f231243 100644
--- a/src/examples/button_on_3d_object_example.c
+++ b/src/examples/button_on_3d_object_example.c
@@ -267,15 +267,15 @@ _scene_setup(Scene_Data *data)
267} 267}
268 268
269static void 269static void
270_mirror(Evas_Object *image) 270_mirror(Evas_Object *img)
271{ 271{
272 int x, y, w, h; 272 int x, y, w, h;
273 Evas_Map *m_rotate; 273 Evas_Map *m_rotate;
274 274
275 evas_object_geometry_get(image, &x, &y, &w, &h); 275 evas_object_geometry_get(img, &x, &y, &w, &h);
276 m_rotate = evas_map_new(4); 276 m_rotate = evas_map_new(4);
277 277
278 evas_map_util_points_populate_from_object(m_rotate, image); 278 evas_map_util_points_populate_from_object(m_rotate, img);
279 evas_map_util_rotate(m_rotate, 180, x + (w / 2), y + (h / 2)); 279 evas_map_util_rotate(m_rotate, 180, x + (w / 2), y + (h / 2));
280 280
281 evas_map_point_image_uv_set(m_rotate, 0, 0, h); 281 evas_map_point_image_uv_set(m_rotate, 0, 0, h);
@@ -283,19 +283,18 @@ _mirror(Evas_Object *image)
283 evas_map_point_image_uv_set(m_rotate, 2, w, h / 10); 283 evas_map_point_image_uv_set(m_rotate, 2, w, h / 10);
284 evas_map_point_image_uv_set(m_rotate, 3, 0, h / 10); 284 evas_map_point_image_uv_set(m_rotate, 3, 0, h / 10);
285 285
286 evas_object_map_set(image, m_rotate); 286 evas_object_map_set(img, m_rotate);
287 evas_object_map_enable_set(image, EINA_TRUE); 287 evas_object_map_enable_set(img, EINA_TRUE);
288 288
289 evas_map_free(m_rotate); 289 evas_map_free(m_rotate);
290} 290}
291 291
292int 292int
293main(void) 293elm_main(int argc, char **argv)
294{ 294{
295 Scene_Data data; 295 Scene_Data data;
296 296
297 if (!elm_init(0, 0)) return 0; 297 elm_config_preferred_engine_set("opengl_x11");
298
299 elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); 298 elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
300 299
301 win = elm_win_util_standard_add("__WIN__", " A button on the 3d object"); 300 win = elm_win_util_standard_add("__WIN__", " A button on the 3d object");
@@ -337,3 +336,4 @@ main(void)
337 336
338 return 0; 337 return 0;
339} 338}
339ELM_MAIN()