1 #include <Elementary.h>
3 # include "elementary_config.h"
5 #ifndef ELM_LIB_QUICKLAUNCH
8 #define MARKER_MAX 1000
9 #define NAME_ENTRY_TEXT "Enter freeform address"
12 typedef struct Marker_Data
17 typedef struct Overlay_Data
21 >>>>>>> remotes/origin/upstream
23 typedef struct Map_Source
30 static Elm_Map_Marker_Class *itc1, *itc2, *itc_parking;
31 static Elm_Map_Group_Class *itc_group1, *itc_group2, *itc_group_parking;
33 static Evas_Object *rect, *menu, *fs_win;
35 /*static Elm_Map_Marker *markers[MARKER_MAX];*/
36 static Elm_Map_Marker *route_from, *route_to;
38 Overlay_Data data1 = {PACKAGE_DATA_DIR"/images/logo.png"};
39 Overlay_Data data2 = {PACKAGE_DATA_DIR"/images/logo_small.png"};
40 Overlay_Data data3 = {PACKAGE_DATA_DIR"/images/panel_01.jpg"};
41 Overlay_Data data4 = {PACKAGE_DATA_DIR"/images/plant_01.jpg"};
42 Overlay_Data data5 = {PACKAGE_DATA_DIR"/images/rock_01.jpg"};
43 Overlay_Data data6 = {PACKAGE_DATA_DIR"/images/rock_02.jpg"};
44 Overlay_Data data7 = {PACKAGE_DATA_DIR"/images/sky_01.jpg"};
45 Overlay_Data data8 = {PACKAGE_DATA_DIR"/images/sky_02.jpg"};
46 Overlay_Data data9 = {PACKAGE_DATA_DIR"/images/sky_03.jpg"};
47 Overlay_Data data10 = {PACKAGE_DATA_DIR"/images/sky_03.jpg"};
48 Overlay_Data data11= {PACKAGE_DATA_DIR"/images/wood_01.jpg"};
49 Overlay_Data parking= {PACKAGE_DATA_DIR"/images/parking.png"};
50 Overlay_Data icon_data = {PACKAGE_DATA_DIR"/images/icon_14.png"};
52 static Elm_Map_Overlay *route_start, *route_end, *route_clas;
53 static Elm_Map_Overlay *bubble_img;
54 static Elm_Map_Overlay *bubble_parking;
55 static Elm_Map_Overlay *route_ovl;
57 static Evas_Object *menu, *fs_win;
58 >>>>>>> remotes/origin/upstream
59 static Elm_Map_Route *route;
60 static Elm_Map_Name *name;
61 static Evas_Object *track;
62 static const char **source_names = NULL;
63 static Evas_Coord old_x, old_y;
64 static Evas_Coord old_d;
65 static Map_Source ms[SOURCE_MAX];
68 Marker_Data data1 = {PACKAGE_DATA_DIR"/images/logo.png"};
69 Marker_Data data2 = {PACKAGE_DATA_DIR"/images/logo_small.png"};
70 Marker_Data data3 = {PACKAGE_DATA_DIR"/images/panel_01.jpg"};
71 Marker_Data data4 = {PACKAGE_DATA_DIR"/images/plant_01.jpg"};
72 Marker_Data data5 = {PACKAGE_DATA_DIR"/images/rock_01.jpg"};
73 Marker_Data data6 = {PACKAGE_DATA_DIR"/images/rock_02.jpg"};
74 Marker_Data data7 = {PACKAGE_DATA_DIR"/images/sky_01.jpg"};
75 Marker_Data data8 = {PACKAGE_DATA_DIR"/images/sky_02.jpg"};
76 Marker_Data data9 = {PACKAGE_DATA_DIR"/images/sky_03.jpg"};
77 Marker_Data data10 = {PACKAGE_DATA_DIR"/images/sky_03.jpg"};
78 Marker_Data data11= {PACKAGE_DATA_DIR"/images/wood_01.jpg"};
80 Marker_Data data_parking= {PACKAGE_DATA_DIR"/images/parking.png"};
82 static Evas_Object * _marker_get(Evas_Object *obj, Elm_Map_Marker *marker __UNUSED__, void *data);
83 static Evas_Object * _group_icon_get(Evas_Object *obj, void *data);
86 >>>>>>> remotes/origin/upstream
89 my_map_gpx_fileselector_done(void *data, Evas_Object *obj __UNUSED__, void *event_info)
91 my_map_gpx_fileselector_done(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info)
94 const char *selected = event_info;
98 printf("Selected file: %s\n", selected);
100 EMap_Route *emap = emap_route_gpx_new(selected);
101 track = elm_map_track_add(data, emap);
103 printf("libEMap is required !\n");
106 evas_object_del(fs_win);
111 my_map_clicked(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
117 my_map_press(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
123 my_map_longpressed(void *data __UNUSED__, Evas_Object *obj, void *event_info)
125 printf("longpressed\n");
127 Evas_Event_Mouse_Down *down = (Evas_Event_Mouse_Down *)event_info;
129 if (elm_map_zoom_get(obj) < 5) return;
131 elm_map_canvas_to_geo_convert(obj, down->canvas.x, down->canvas.y, &lon, &lat);
132 printf("x:%d, y:%d, lon:%lf, lat:%lf\n", down->canvas.x, down->canvas.y, lon, lat);
133 name = elm_map_utils_convert_coord_into_name(obj, lon, lat);
137 my_map_clicked_double(void *data __UNUSED__, Evas_Object *obj, void *event_info)
139 printf("clicked,double\n");
141 double flon, flat, tlon, tlat;
144 _route_icon_get(Evas_Object *obj)
146 Evas_Object *icon = elm_icon_add(obj);
147 elm_icon_file_set(icon, PACKAGE_DATA_DIR"/images/bubble.png", NULL);
148 evas_object_show(icon);
154 _map_clicked(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
160 _map_clicked_double(void *data __UNUSED__, Evas_Object *obj, void *event_info)
162 printf("clicked,double\n");
164 >>>>>>> remotes/origin/upstream
165 Evas_Event_Mouse_Down *down = (Evas_Event_Mouse_Down *)event_info;
167 if (elm_map_zoom_get(obj) < 5) return;
170 elm_map_canvas_to_geo_convert(obj, down->canvas.x, down->canvas.y, &lon, &lat);
171 printf("x:%d, y:%d, lon:%lf, lat:%lf\n", down->canvas.x, down->canvas.y, lon, lat);
172 itc1 = elm_map_marker_class_new(obj);
174 elm_map_marker_class_del_cb_set(itc1, NULL);
176 itc_group1 = elm_map_group_class_new(obj);
177 elm_map_group_class_icon_cb_set(itc_group1, _group_icon_get);
178 elm_map_group_class_data_set(itc_group1, (void *)PACKAGE_DATA_DIR"/images/bubble.png");
179 elm_map_group_class_style_set(itc_group1, "empty");
180 elm_map_group_class_zoom_displayed_set(itc_group1, 5);
182 if (route_from && route_to)
184 elm_map_marker_remove(route_from);
186 elm_map_marker_remove(route_to);
188 elm_map_route_remove(route);
191 if (!route_from) route_from = elm_map_marker_add(obj, lon, lat, itc1, itc_group1, NULL);
192 else route_to = elm_map_marker_add(obj, lon, lat, itc1, itc_group1, NULL);
194 if (route_from && route_to)
196 elm_map_marker_region_get(route_from, &flon, &flat);
197 elm_map_marker_region_get(route_to, &tlon, &tlat);
198 route = elm_map_route_add(obj, ELM_MAP_ROUTE_TYPE_MOTOCAR, ELM_MAP_ROUTE_METHOD_FASTEST, flon, flat, tlon, tlat);
199 elm_map_route_color_set(route, 255, 0, 0, 255);
201 elm_map_canvas_to_region_convert(obj, down->canvas.x, down->canvas.y, &lon, &lat);
202 printf("x:%d, y:%d, lon:%lf, lat:%lf\n", down->canvas.x, down->canvas.y, lon, lat);
206 route_clas = elm_map_overlay_class_add(obj);
207 elm_map_overlay_icon_set(route_clas, _route_icon_get(obj));
208 elm_map_overlay_displayed_zoom_min_set(route_clas, 5);
211 if (route_start && route_end)
213 elm_map_overlay_del(route_start);
214 elm_map_overlay_del(route_end);
220 if (!route_start) route_start = elm_map_overlay_add(obj, lon, lat);
221 else route_end = elm_map_overlay_add(obj, lon, lat);
223 if (route_start && route_end)
225 double start_lon, start_lat, end_lon, end_lat;
226 elm_map_overlay_class_append(route_clas, route_start);
227 elm_map_overlay_class_append(route_clas, route_end);
228 elm_map_overlay_region_get(route_start, &start_lon, &start_lat);
229 elm_map_overlay_region_get(route_end, &end_lon, &end_lat);
230 route = elm_map_route_add(obj, ELM_MAP_ROUTE_TYPE_MOTOCAR,
231 ELM_MAP_ROUTE_METHOD_FASTEST,
232 start_lon, start_lat, end_lon, end_lat,
234 >>>>>>> remotes/origin/upstream
240 my_map_load_detail(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
242 printf("load,detail\n");
246 my_map_loaded_detail(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
248 printf("loaded,detail\n");
252 my_map_zoom_start(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
254 printf("zoom,start\n");
258 my_map_zoom_stop(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
260 printf("zoom,stop\n");
264 my_map_zoom_change(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
266 printf("zoom,change\n");
270 my_map_anim_start(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
272 _map_press(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
278 _map_longpressed(void *data __UNUSED__, Evas_Object *obj, void *event_info)
280 if (!event_info) return;
282 Evas_Event_Mouse_Down *down = (Evas_Event_Mouse_Down *)event_info;
283 elm_map_canvas_to_region_convert(obj, down->canvas.x, down->canvas.y, &lon, &lat);
284 printf("longpressed, x:%d, y:%d, lon:%lf, lat:%lf\n", down->canvas.x, down->canvas.y, lon, lat);
286 if (elm_map_zoom_get(obj) < 8) return;
287 if (name) elm_map_name_del(name);
288 name = elm_map_name_add(obj, NULL, lon, lat, NULL, NULL);
292 _map_scroll(void *data __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__)
295 elm_map_region_get(obj, &lon, &lat);
296 printf("scroll, longitude: %f latitude: %f\n", lon, lat);
300 _map_drag_start(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
302 printf("scroll,drag,start\n");
303 evas_object_smart_callback_del(data, "longpressed", _map_longpressed);
307 _map_drag_stop(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
309 printf("scroll,drag,stop\n");
310 evas_object_smart_callback_add(data, "longpressed", _map_longpressed, data);
314 _map_anim_start(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
315 >>>>>>> remotes/origin/upstream
317 printf("scroll,anim,start\n");
322 my_map_anim_stop(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
324 _map_anim_stop(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
325 >>>>>>> remotes/origin/upstream
327 printf("scroll,anim,stop\n");
332 my_map_drag_start(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
334 printf("scroll,drag,start\n");
335 evas_object_smart_callback_del(data, "longpressed", my_map_longpressed);
339 my_map_drag_stop(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
341 printf("scroll,drag,stop\n");
342 evas_object_smart_callback_add(data, "longpressed", my_map_longpressed, data);
346 my_map_scroll(void *data __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__)
350 elm_map_geo_region_get(obj, &lon, &lat);
351 printf("scroll longitude : %f latitude : %f\n", lon, lat);
355 my_map_downloaded(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
357 int try_num, finish_num;
358 elm_map_utils_downloading_status_get(data, &try_num, &finish_num);
359 printf("downloaded : %d / %d\n", finish_num, try_num);
363 my_map_route_load(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
365 _map_zoom_start(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
367 printf("zoom,start\n");
371 _map_zoom_stop(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
373 printf("zoom,stop\n");
377 _map_zoom_change(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
379 printf("zoom,change\n");
383 _map_tile_load(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
385 printf("tile,load\n");
389 _map_tile_loaded(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
391 int try_num, finish_num;
392 elm_map_tile_load_status_get(data, &try_num, &finish_num);
393 printf("tile,loaded: %d / %d\n", finish_num, try_num);
397 _map_tile_loaded_fail(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
399 int try_num, finish_num;
400 elm_map_tile_load_status_get(data, &try_num, &finish_num);
401 printf("tile,loaded,fail: %d / %d\n", finish_num, try_num);
405 _map_route_load(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
406 >>>>>>> remotes/origin/upstream
408 printf("route,load\n");
413 my_map_route_loaded(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
415 _map_route_loaded(void *data __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__)
416 >>>>>>> remotes/origin/upstream
418 printf("route,loaded\n");
424 >>>>>>> remotes/origin/upstream
425 d = elm_map_route_distance_get(route);
426 printf("route distance = %lf km\n", d);
428 w = elm_map_route_waypoint_get(route);
429 if (w) printf("[waypoints]\n%s\n", w);
431 n = elm_map_route_node_get(route);
432 if (n) printf("[nodes]\n%s\n", n);
437 my_map_name_load(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
440 if (route_ovl) elm_map_overlay_del(route_ovl);
441 route_ovl = elm_map_overlay_route_add(obj, route);
442 elm_map_overlay_color_set(route_ovl, 255, 0, 0, 255);
446 _map_route_loaded_fail(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
448 printf("route,loaded,fail\n");
452 _map_name_load(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
453 >>>>>>> remotes/origin/upstream
455 printf("name,load\n");
460 my_map_name_loaded(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
462 _map_name_loaded(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
463 >>>>>>> remotes/origin/upstream
465 printf("name,loaded\n");
468 const char *addr = elm_map_name_address_get(name);
469 elm_map_name_region_get(name, &lon, &lat);
472 printf("name of [lon = %lf, lat = %lf] is %s\n", lon, lat, addr);
473 if ((lon != 0.0) && (lat !=0.0))
475 Eina_Bool b = elm_map_paused_get(data);
476 elm_map_paused_set(data, EINA_TRUE);
477 elm_map_zoom_mode_set(data, ELM_MAP_ZOOM_MODE_MANUAL);
479 elm_map_geo_region_show(data, lon, lat);
480 elm_map_zoom_set(data, elm_map_source_zoom_max_get(data));
481 elm_map_paused_set(data, b);
484 elm_map_name_remove(name);
486 elm_map_zoom_set(data, elm_map_zoom_max_get(data));
487 elm_map_region_show(data, lon, lat);
488 elm_map_paused_set(data, b);
492 elm_map_name_del(name);
497 _map_name_loaded_fail(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
499 printf("name,loaded,fail\n");
500 >>>>>>> remotes/origin/upstream
504 map_show_urmatt(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
506 Eina_Bool b = elm_map_paused_get(data);
507 elm_map_paused_set(data, EINA_TRUE);
508 elm_map_zoom_mode_set(data, ELM_MAP_ZOOM_MODE_MANUAL);
510 elm_map_geo_region_show(data,7.325201, 48.526813);
512 elm_map_region_show(data,7.325201, 48.526813);
513 >>>>>>> remotes/origin/upstream
514 elm_map_zoom_set(data, 12);
515 elm_map_paused_set(data, b);
519 map_bring_seoul(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
522 elm_map_geo_region_bring_in(data, 126.977969, 37.566535);
524 elm_map_region_bring_in(data, 126.977969, 37.566535);
525 >>>>>>> remotes/origin/upstream
529 map_paused_set(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
531 elm_map_paused_set(data, EINA_TRUE);
535 map_paused_unset(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
537 elm_map_paused_set(data, EINA_FALSE);
541 map_zoom_in(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
545 zoom = elm_map_zoom_get(data) + 1;
546 elm_map_zoom_mode_set(data, ELM_MAP_ZOOM_MODE_MANUAL);
547 elm_map_zoom_set(data, zoom);
551 map_zoom_out(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
555 zoom = elm_map_zoom_get(data) - 1;
556 elm_map_zoom_mode_set(data, ELM_MAP_ZOOM_MODE_MANUAL);
557 elm_map_zoom_set(data, zoom);
561 map_zoom_fit(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
563 elm_map_zoom_mode_set(data, ELM_MAP_ZOOM_MODE_AUTO_FIT);
567 map_zoom_fill(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
569 elm_map_zoom_mode_set(data, ELM_MAP_ZOOM_MODE_AUTO_FILL);
573 map_track_add(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
575 Evas_Object *fs, *bg, *vbox, *hbox, *sep;
578 fs_win = elm_win_add(NULL, "fileselector", ELM_WIN_BASIC);
579 elm_win_title_set(fs_win, "File Selector");
580 elm_win_autodel_set(fs_win, 1);
582 bg = elm_bg_add(fs_win);
583 elm_win_resize_object_add(fs_win, bg);
584 evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
585 evas_object_show(bg);
587 vbox = elm_box_add(fs_win);
588 elm_win_resize_object_add(fs_win, vbox);
589 evas_object_size_hint_weight_set(vbox, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
590 evas_object_show(vbox);
592 fs = elm_fileselector_add(fs_win);
593 elm_fileselector_is_save_set(fs, EINA_TRUE);
594 elm_fileselector_expandable_set(fs, EINA_FALSE);
595 path = getenv("HOME");
596 //if "HOME" is not available, set current dir. path
599 elm_fileselector_path_set(fs, path);
600 evas_object_size_hint_weight_set(fs, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
601 evas_object_size_hint_align_set(fs, EVAS_HINT_FILL, EVAS_HINT_FILL);
602 elm_box_pack_end(vbox, fs);
603 evas_object_show(fs);
605 evas_object_smart_callback_add(fs, "done", my_map_gpx_fileselector_done, data);
607 sep = elm_separator_add(fs_win);
608 elm_separator_horizontal_set(sep, EINA_TRUE);
609 elm_box_pack_end(vbox, sep);
610 evas_object_show(sep);
612 hbox = elm_box_add(fs_win);
613 elm_box_horizontal_set(hbox, EINA_TRUE);
614 elm_box_pack_end(vbox, hbox);
615 evas_object_show(hbox);
617 evas_object_resize(fs_win, 240, 350);
618 evas_object_show(fs_win);
623 map_track_remove(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
625 elm_map_track_remove(data, track);
629 map_rotate_cw(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
632 Evas_Coord x, y, w, h;
633 float half_w, half_h;
634 evas_object_geometry_get(data, &x, &y, &w, &h);
635 half_w = (float)w * 0.5;
636 half_h = (float)h * 0.5;
638 elm_map_rotate_get(data, &d, NULL, NULL);
640 elm_map_rotate_set(data, d, x + half_w, y + half_h);
644 map_rotate_ccw(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
647 Evas_Coord x, y, w, h;
648 float half_w, half_h;
649 evas_object_geometry_get(data, &x, &y, &w, &h);
650 half_w = (float)w * 0.5;
651 half_h = (float)h * 0.5;
653 elm_map_rotate_get(data, &d, NULL, NULL);
655 elm_map_rotate_set(data, d, x + half_w, y + half_h);
659 map_rotate_reset(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
661 Evas_Coord x, y, w, h;
662 float half_w, half_h;
663 evas_object_geometry_get(data, &x, &y, &w, &h);
664 half_w = (float)w * 0.5;
665 half_h = (float)h * 0.5;
667 elm_map_rotate_set(data, 0.0, x + half_w, y + half_h);
671 map_zoom_min_set(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
674 elm_map_source_zoom_min_set(data, 1);
676 elm_map_zoom_min_set(data, 1);
677 >>>>>>> remotes/origin/upstream
681 map_zoom_max_set(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
684 elm_map_source_zoom_max_set(data, 10);
686 elm_map_zoom_max_set(data, 10);
687 >>>>>>> remotes/origin/upstream
691 map_source(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
693 Map_Source *s = data;
697 elm_map_source_name_set(s->map, s->source_name);
699 elm_map_source_set(s->map, ELM_MAP_SOURCE_TYPE_TILE, s->source_name);
700 >>>>>>> remotes/origin/upstream
705 map_marker_add(void *data)
708 Elm_Map_Group_Class *g_clas;
709 Elm_Map_Marker_Class *m_clas;
711 Marker_Data *d = &data7;
713 Overlay_Data *d = &data7;
714 >>>>>>> remotes/origin/upstream
716 if (*markers) return;
717 for (i =0; i<MARKER_MAX; i++)
721 int r1 = rand() % (180*2*100);
722 if (r1<=180) r1 = -r1;
723 else r1 = r1 - 180*100;
725 int r2 = rand() % (85*2*100);
726 if (r2<=85) r2 = -r2;
727 else r2 = r2 - 85*100;
729 int style = rand() % 3;
730 if (!style) m_clas = itc1;
731 else if (style == 1) m_clas = itc2;
734 m_clas = itc_parking;
739 >>>>>>> remotes/origin/upstream
743 if (!style) g_clas = itc_group1;
744 else g_clas = itc_group2;
746 markers[i] = elm_map_marker_add(data, r1/100., r2/100., m_clas, g_clas, d);
749 printf("nb elements: %d\n", nb_elts);
753 map_marker_remove(void *data __UNUSED__)
757 for (i = 0; i<MARKER_MAX; i++)
761 elm_map_marker_remove(markers[i]);
768 my_map_entry_focused(void *data __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__)
770 const char *s = elm_scrolled_entry_entry_get(obj);
771 if (!strcmp(s, NAME_ENTRY_TEXT)) elm_scrolled_entry_entry_set(obj, "");
775 my_map_entry_activated(void *data, Evas_Object *obj, void *event_info __UNUSED__)
777 const char *s = elm_scrolled_entry_entry_get(obj);
778 char *addr = strdup(s);
779 name = elm_map_utils_convert_name_into_coord(data, addr);
780 if (addr) free (addr);
786 _marker_get(Evas_Object *obj, Elm_Map_Marker *marker __UNUSED__, void *data)
788 Marker_Data *d = data;
790 Evas_Object *bx = elm_box_add(obj);
791 evas_object_show(bx);
795 Evas_Object *icon = elm_icon_add(obj);
796 elm_icon_file_set(icon, d->file, NULL);
797 evas_object_show(icon);
799 Evas_Object *o = elm_button_add(obj);
800 elm_object_part_content_set(o, "icon", icon);
802 elm_box_pack_end(bx, o);
806 Evas_Object *o = evas_object_image_add(evas_object_evas_get(obj));
807 evas_object_image_file_set(o, d->file, NULL);
808 evas_object_image_filled_set(o, EINA_TRUE);
809 evas_object_size_hint_min_set(o, 64, 64);
811 elm_box_pack_end(bx, o);
813 Evas_Object *lbl = elm_label_add(obj);
814 elm_object_text_set(lbl, "Wolves Go !");
815 evas_object_show(lbl);
816 elm_box_pack_end(bx, lbl);
820 _box_get(Evas_Object *obj, Overlay_Data *data)
822 Evas_Object *bx, *img, *label;
823 bx = elm_box_add(obj);
824 evas_object_show(bx);
826 img = evas_object_image_add(evas_object_evas_get(obj));
827 evas_object_image_file_set(img, data->file, NULL);
828 evas_object_image_filled_set(img, EINA_TRUE);
829 evas_object_size_hint_min_set(img, 64, 64);
830 evas_object_show(img);
831 elm_box_pack_end(bx, img);
833 label = elm_label_add(obj);
834 elm_object_text_set(label, "Wolves go!!");
835 evas_object_show(label);
836 elm_box_pack_end(bx, label);
837 >>>>>>> remotes/origin/upstream
843 _icon_get(Evas_Object *obj, Elm_Map_Marker *marker __UNUSED__, void *data)
845 Marker_Data *d = data;
847 Evas_Object *icon = elm_icon_add(obj);
848 elm_icon_file_set(icon, d->file, NULL);
849 evas_object_show(icon);
855 _group_icon_get(Evas_Object *obj, void *data)
859 Evas_Object *icon = elm_icon_add(obj);
860 elm_icon_file_set(icon, file, NULL);
862 _icon_get(Evas_Object *obj, Overlay_Data *data)
864 Evas_Object *icon = elm_icon_add(obj);
865 elm_icon_file_set(icon, data->file, NULL);
866 >>>>>>> remotes/origin/upstream
867 evas_object_show(icon);
874 _map_move_resize_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
878 evas_object_geometry_get(data,&x,&y,&w,&h);
879 evas_object_resize(rect,w,h);
880 evas_object_move(rect,x,y);
885 >>>>>>> remotes/origin/upstream
886 _populate(void *data, Elm_Object_Item *menu_it)
890 if ((!data) || (!menu_it) || (!source_names)) return;
891 for (idx = 0; source_names[idx]; idx++)
893 if (idx >= SOURCE_MAX) break;
895 ms[idx].source_name = strdup(source_names[idx]);
896 elm_menu_item_add(menu, menu_it, "", source_names[idx], map_source,
902 _map_mouse_down(void *data, Evas *evas __UNUSED__, Evas_Object *obj, void *event_info)
904 Evas_Event_Mouse_Down *down = event_info;
905 Elm_Object_Item *menu_it;
908 if (down->button == 2)
910 old_x = down->canvas.x;
911 old_y = down->canvas.y;
914 else if (down->button == 3)
916 menu = elm_menu_add(obj);
917 menu_it = elm_menu_item_add(menu, NULL, NULL, "Source", NULL, NULL);
918 _populate(data, menu_it);
919 elm_menu_item_add(menu, NULL, NULL, "Show Urmatt", map_show_urmatt, data);
920 elm_menu_item_add(menu, NULL, NULL, "Bring Seoul", map_bring_seoul, data);
921 elm_menu_item_add(menu, NULL, NULL, "Paused Set", map_paused_set, data);
922 elm_menu_item_add(menu, NULL, NULL, "Paused Unset", map_paused_unset, data);
923 elm_menu_item_add(menu, NULL, NULL, "Zoom +", map_zoom_in, data);
924 elm_menu_item_add(menu, NULL, NULL, "Zoom -", map_zoom_out, data);
925 elm_menu_item_add(menu, NULL, NULL, "Zoom Fit", map_zoom_fit, data);
926 elm_menu_item_add(menu, NULL, NULL, "Zoom Fill", map_zoom_fill, data);
927 elm_menu_item_add(menu, NULL, NULL, "Add Track", map_track_add, data);
928 elm_menu_item_add(menu, NULL, NULL, "Remove Track", map_track_remove, data);
929 elm_menu_item_add(menu, NULL, NULL, "Add Marker", NULL, NULL);
930 elm_menu_item_add(menu, NULL, NULL, "Rotate CW", map_rotate_cw, data);
931 elm_menu_item_add(menu, NULL, NULL, "Rotate CCW", map_rotate_ccw, data);
932 elm_menu_item_add(menu, NULL, NULL, "Reset Rotate", map_rotate_reset, data);
933 elm_menu_item_add(menu, NULL, NULL, "Set Zoom Min to 1", map_zoom_min_set, data);
934 elm_menu_item_add(menu, NULL, NULL, "Set Zoom Max to 10", map_zoom_max_set, data);
936 elm_menu_move(menu, down->canvas.x, down->canvas.y);
937 evas_object_show(menu);
942 _map_mouse_move(void *data, Evas *evas __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info)
944 Evas_Event_Mouse_Move *move = event_info;
945 Evas_Coord x, y, w, h;
946 float half_w, half_h;
951 if (move->buttons == 2)
953 evas_object_geometry_get(data, &x, &y, &w, &h);
954 half_w = (float)w * 0.5;
955 half_h = (float)h * 0.5;
956 elm_map_rotate_get(data, &cur_d, NULL, NULL);
958 d = move->cur.canvas.x - old_x;
959 if (!old_d) old_d = d;
974 elm_map_rotate_set(data, cur_d, x + half_w, y + half_h);
980 _map_mouse_up(void *data __UNUSED__, Evas *evas __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info)
982 Evas_Event_Mouse_Up *up = event_info;
995 _overlay_cb(void *data __UNUSED__, Evas_Object *map, void *ev)
997 printf("Overlay clicked: ");
998 Elm_Map_Overlay *overlay = ev;
1001 Overlay_Data *od = elm_map_overlay_data_get(overlay);
1004 printf("No overlay data\n");
1006 else if (elm_map_overlay_type_get(overlay) == ELM_MAP_OVERLAY_TYPE_DEFAULT)
1008 // prevent duplication
1009 if (!bubble_img) bubble_img = elm_map_overlay_bubble_add(map);
1011 elm_map_overlay_bubble_follow(bubble_img, overlay);
1012 bx = _box_get(map, od);
1013 elm_map_overlay_bubble_content_clear(bubble_img);
1014 elm_map_overlay_bubble_content_append(bubble_img, bx);
1015 printf("overlay rendered\n");
1017 else printf("not default type\n");
1021 _parking_cb(void *data __UNUSED__, Evas_Object *map, const Elm_Map_Overlay *ovl)
1023 if (elm_map_overlay_type_get(ovl) != ELM_MAP_OVERLAY_TYPE_DEFAULT) return;
1027 elm_map_overlay_region_get(ovl, &lon, &lat);
1028 elm_map_region_to_canvas_convert(map, lon, lat, &x, &y);
1029 printf("Parking clicked: %lf %lf %d %d\n", lon, lat, x, y);
1031 if (!bubble_parking)
1033 Evas_Object *bubble, *label;
1034 bubble = elm_bubble_add(map);
1035 elm_bubble_pos_set(bubble, ELM_BUBBLE_POS_BOTTOM_LEFT);
1036 elm_object_text_set(bubble, "Overlay object");
1037 elm_object_part_text_set(bubble, "info", "Bubble is overlayed");
1039 label = elm_label_add(bubble);
1040 elm_object_text_set(label, "Parking Here !!");
1041 evas_object_show(label);
1042 elm_object_content_set(bubble, label);
1044 evas_object_resize(bubble, 125, 50);
1045 evas_object_show(bubble);
1047 bubble_parking = elm_map_overlay_add(map, lon + 0.0006, lat + 0.0006);
1048 elm_map_overlay_content_set(bubble_parking, bubble);
1050 elm_map_overlay_region_set(bubble_parking, lon + 0.0006, lat + 0.0006);
1054 _del_map(void *data __UNUSED__, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *ei __UNUSED__)
1056 if (route_start) elm_map_overlay_del(route_start);
1057 if (route_end) elm_map_overlay_del(route_end);
1058 if (route_clas) elm_map_overlay_del(route_clas);
1059 if (bubble_img) elm_map_overlay_del(bubble_img);
1060 if (bubble_parking) elm_map_overlay_del(bubble_parking);
1061 if (route_ovl) elm_map_overlay_del(route_ovl);
1066 bubble_parking = NULL;
1069 if (route) elm_map_route_del(route);
1070 if (name) elm_map_name_del(name);
1075 >>>>>>> remotes/origin/upstream
1077 test_map(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
1079 Evas_Object *win, *bg, *map;
1082 win = elm_win_add(NULL, "map", ELM_WIN_BASIC);
1083 elm_win_title_set(win, "Map");
1084 elm_win_autodel_set(win, EINA_TRUE);
1086 bg = elm_bg_add(win);
1087 evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
1088 elm_win_resize_object_add(win, bg);
1089 evas_object_show(bg);
1091 map = elm_map_add(win);
1097 source_names = elm_map_source_names_get(map);
1099 if (!source_names) return;
1100 printf("map sources [ ");
1101 for (idx = 0; source_names[idx] ; idx++) printf("%s ", source_names[idx]);
1103 Elm_Map_Overlay *ovl_1, *ovl_2, *ovl_3, *ovl_4, *ovl_5, *ovl6;
1104 Elm_Map_Overlay *ovl_7, *ovl_8, *ovl_9, *ovl_10, *ovl_11;
1105 Elm_Map_Overlay *parking1, *parking2, *parking3, *parking4, *parking5;
1106 Elm_Map_Overlay *grp1, *grp2, *grp_parking;
1108 evas_object_event_callback_add(map, EVAS_CALLBACK_DEL, _del_map, NULL);
1112 source_names = elm_map_sources_get(map, ELM_MAP_SOURCE_TYPE_TILE);
1114 if (!source_names) return;
1115 printf("map sources [ ");
1116 for (idx = 0; source_names[idx] ; idx++) printf("%s, ", source_names[idx]);
1117 >>>>>>> remotes/origin/upstream
1120 evas_object_size_hint_weight_set(map, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
1121 elm_win_resize_object_add(win, map);
1122 evas_object_data_set(map, "window", win);
1126 itc1 = elm_map_marker_class_new(map);
1127 elm_map_marker_class_get_cb_set(itc1, _marker_get);
1128 elm_map_marker_class_del_cb_set(itc1, NULL);
1130 itc2 = elm_map_marker_class_new(map);
1131 elm_map_marker_class_get_cb_set(itc2, _marker_get);
1132 elm_map_marker_class_del_cb_set(itc2, NULL);
1133 elm_map_marker_class_style_set(itc2, "radio2");
1135 itc_parking = elm_map_marker_class_new(map);
1136 elm_map_marker_class_get_cb_set(itc_parking, _marker_get);
1137 elm_map_marker_class_del_cb_set(itc_parking, NULL);
1138 elm_map_marker_class_icon_cb_set(itc_parking, _icon_get);
1139 elm_map_marker_class_style_set(itc_parking, "empty");
1143 itc_group1 = elm_map_group_class_new(map);
1144 elm_map_group_class_data_set(itc_group1, (void *)PACKAGE_DATA_DIR"/images/plant_01.jpg");
1146 itc_group2 = elm_map_group_class_new(map);
1147 elm_map_group_class_style_set(itc_group2, "radio2");
1148 elm_map_group_class_zoom_displayed_set(itc_group1, 3);
1150 itc_group_parking = elm_map_group_class_new(map);
1151 elm_map_group_class_icon_cb_set(itc_group_parking, _group_icon_get);
1152 elm_map_group_class_data_set(itc_group_parking, (void *)PACKAGE_DATA_DIR"/images/parking.png");
1153 elm_map_group_class_style_set(itc_group_parking, "empty");
1154 elm_map_group_class_zoom_displayed_set(itc_group_parking, 5);
1157 rect = evas_object_rectangle_add(evas_object_evas_get(win));
1158 evas_object_color_set(rect, 0, 0, 0, 0);
1159 evas_object_repeat_events_set(rect,1);
1160 evas_object_show(rect);
1161 evas_object_raise(rect);
1163 evas_object_event_callback_add(map, EVAS_CALLBACK_RESIZE,
1164 _map_move_resize_cb, map);
1165 evas_object_event_callback_add(map, EVAS_CALLBACK_MOVE,
1166 _map_move_resize_cb, map);
1168 >>>>>>> remotes/origin/upstream
1169 evas_object_event_callback_add(map, EVAS_CALLBACK_MOUSE_DOWN,
1170 _map_mouse_down, map);
1171 evas_object_event_callback_add(map, EVAS_CALLBACK_MOUSE_MOVE,
1172 _map_mouse_move, map);
1173 evas_object_event_callback_add(map, EVAS_CALLBACK_MOUSE_UP,
1174 _map_mouse_up, map);
1177 elm_map_marker_add(map, 2.352, 48.857, itc1, itc_group1, &data1);
1178 elm_map_marker_add(map, 2.355, 48.857, itc1, itc_group1, &data3);
1179 elm_map_marker_add(map, 3, 48.857, itc2, itc_group1, &data2);
1180 elm_map_marker_add(map, 2.352, 49, itc2, itc_group1, &data1);
1182 elm_map_marker_add(map, 7.31451, 48.857127, itc1, itc_group1, &data10);
1183 elm_map_marker_add(map, 7.314704, 48.857119, itc1, itc_group1, &data4);
1184 elm_map_marker_add(map, 7.314704, 48.857119, itc2, itc_group1, &data5);
1185 elm_map_marker_add(map, 7.31432, 48.856785, itc2, itc_group1, &data6);
1186 elm_map_marker_add(map, 7.3148, 48.85725, itc1, itc_group2, &data7);
1187 elm_map_marker_add(map, 7.316445, 48.8572210000694, itc1, itc_group1, &data8);
1188 elm_map_marker_add(map, 7.316527000125, 48.85609, itc2, itc_group2, &data9);
1189 elm_map_marker_add(map, 7.3165409990833, 48.856078, itc2, itc_group1, &data11);
1190 elm_map_marker_add(map, 7.319812, 48.856561, itc2, itc_group2, &data10);
1194 evas_object_smart_callback_add(map, "clicked", my_map_clicked, map);
1195 evas_object_smart_callback_add(map, "press", my_map_press, map);
1196 evas_object_smart_callback_add(map, "longpressed", my_map_longpressed, map);
1197 evas_object_smart_callback_add(map, "clicked,double", my_map_clicked_double, map);
1198 evas_object_smart_callback_add(map, "load,detail", my_map_load_detail, map);
1199 evas_object_smart_callback_add(map, "loaded,detail", my_map_loaded_detail, map);
1200 evas_object_smart_callback_add(map, "zoom,start", my_map_zoom_start, map);
1201 evas_object_smart_callback_add(map, "zoom,stop", my_map_zoom_stop, map);
1202 evas_object_smart_callback_add(map, "zoom,change", my_map_zoom_change, map);
1203 evas_object_smart_callback_add(map, "scroll,anim,start", my_map_anim_start, map);
1204 evas_object_smart_callback_add(map, "scroll,anim,stop", my_map_anim_stop, map);
1205 evas_object_smart_callback_add(map, "scroll,drag,start", my_map_drag_start, map);
1206 evas_object_smart_callback_add(map, "scroll,drag,stop", my_map_drag_stop, map);
1207 evas_object_smart_callback_add(map, "scroll", my_map_scroll, map);
1208 evas_object_smart_callback_add(map, "downloaded", my_map_downloaded, map);
1209 evas_object_smart_callback_add(map, "route,load", my_map_route_load, map);
1210 evas_object_smart_callback_add(map, "route,loaded", my_map_route_loaded, map);
1211 evas_object_smart_callback_add(map, "name,load", my_map_name_load, map);
1212 evas_object_smart_callback_add(map, "name,loaded", my_map_name_loaded, map);
1214 evas_object_smart_callback_add(map, "clicked", _map_clicked, map);
1215 evas_object_smart_callback_add(map, "clicked,double", _map_clicked_double, map);
1216 evas_object_smart_callback_add(map, "press", _map_press, map);
1217 evas_object_smart_callback_add(map, "longpressed", _map_longpressed, map);
1218 evas_object_smart_callback_add(map, "scroll", _map_scroll, map);
1219 evas_object_smart_callback_add(map, "scroll,drag,start", _map_drag_start, map);
1220 evas_object_smart_callback_add(map, "scroll,drag,stop", _map_drag_stop, map);
1221 evas_object_smart_callback_add(map, "scroll,anim,start", _map_anim_start, map);
1222 evas_object_smart_callback_add(map, "scroll,anim,stop", _map_anim_stop, map);
1223 evas_object_smart_callback_add(map, "zoom,start", _map_zoom_start, map);
1224 evas_object_smart_callback_add(map, "zoom,stop", _map_zoom_stop, map);
1225 evas_object_smart_callback_add(map, "zoom,change", _map_zoom_change, map);
1226 evas_object_smart_callback_add(map, "tile,load", _map_tile_load, map);
1227 evas_object_smart_callback_add(map, "tile,loaded", _map_tile_loaded, map);
1228 evas_object_smart_callback_add(map, "tile,loaded,fail", _map_tile_loaded_fail, map);
1229 evas_object_smart_callback_add(map, "route,load", _map_route_load, map);
1230 evas_object_smart_callback_add(map, "route,loaded", _map_route_loaded, map);
1231 evas_object_smart_callback_add(map, "route,loaded,fail", _map_route_loaded_fail, map);
1232 evas_object_smart_callback_add(map, "name,load", _map_name_load, map);
1233 evas_object_smart_callback_add(map, "name,loaded", _map_name_loaded, map);
1234 evas_object_smart_callback_add(map, "name,loaded,fail", _map_name_loaded_fail, map);
1235 evas_object_smart_callback_add(map, "overlay,clicked", _overlay_cb, map);
1238 ovl_1 = elm_map_overlay_add(map, 2.352, 48.857);
1239 ovl_2 = elm_map_overlay_add(map, 3, 48.857);
1240 ovl_3 = elm_map_overlay_add(map, 2.352, 49);
1241 ovl_4 = elm_map_overlay_add(map, 7.31451, 48.857127);
1242 ovl_5 = elm_map_overlay_add(map, 7.314704, 48.857119);
1243 ovl6 = elm_map_overlay_add(map, 7.31432, 48.856785);
1244 ovl_7 = elm_map_overlay_add(map, 7.3148, 48.85725);
1245 ovl_8 = elm_map_overlay_add(map, 7.316445, 48.8572210000694);
1246 ovl_9 = elm_map_overlay_add(map, 7.316527000125, 48.85609);
1247 ovl_10 = elm_map_overlay_add(map, 7.3165409990833, 48.856078);
1248 ovl_11 = elm_map_overlay_add(map, 7.319812, 48.856561);
1249 elm_map_overlay_data_set(ovl_1, &data1);
1250 elm_map_overlay_data_set(ovl_2, &data2);
1251 elm_map_overlay_data_set(ovl_3, &data3);
1252 elm_map_overlay_data_set(ovl_4, &data4);
1253 elm_map_overlay_data_set(ovl_5, &data5);
1254 elm_map_overlay_data_set(ovl6, &data6);
1255 elm_map_overlay_data_set(ovl_7, &data7);
1256 elm_map_overlay_data_set(ovl_8, &data8);
1257 elm_map_overlay_data_set(ovl_9, &data9);
1258 elm_map_overlay_data_set(ovl_10, &data10);
1259 elm_map_overlay_data_set(ovl_11, &data11);
1261 // Append overlays to groups
1262 grp1 = elm_map_overlay_class_add(map);
1263 elm_map_overlay_displayed_zoom_min_set(grp1, 3);
1264 elm_map_overlay_class_append(grp1, ovl_1);
1265 elm_map_overlay_class_append(grp1, ovl_2);
1266 elm_map_overlay_class_append(grp1, ovl_3);
1267 elm_map_overlay_class_append(grp1, ovl_4);
1268 elm_map_overlay_class_append(grp1, ovl_5);
1269 elm_map_overlay_class_append(grp1, ovl6);
1270 evas_object_smart_callback_add(map, "overlay,clicked", _overlay_cb, map);
1272 // Append overlays to groups
1273 grp2 = elm_map_overlay_class_add(map);
1274 elm_map_overlay_class_append(grp2, ovl_7);
1275 elm_map_overlay_class_append(grp2, ovl_8);
1276 elm_map_overlay_class_append(grp2, ovl_9);
1277 elm_map_overlay_class_append(grp2, ovl_10);
1278 elm_map_overlay_class_append(grp2, ovl_11);
1281 parking1 = elm_map_overlay_add(map, 127.04871, 37.25730);
1282 parking2 = elm_map_overlay_add(map, 127.05578, 37.25545);
1283 parking3 = elm_map_overlay_add(map, 127.05515, 37.25439);
1284 parking4 = elm_map_overlay_add(map, 127.05328, 37.25721);
1285 parking5 = elm_map_overlay_add(map, 127.05431, 37.25873);
1286 elm_map_overlay_icon_set(parking4, _icon_get(map, &icon_data));
1287 elm_map_overlay_get_cb_set(parking1, _parking_cb, NULL);
1288 elm_map_overlay_get_cb_set(parking2, _parking_cb, NULL);
1289 elm_map_overlay_get_cb_set(parking3, _parking_cb, NULL);
1290 elm_map_overlay_get_cb_set(parking4, _parking_cb, NULL);
1291 elm_map_overlay_get_cb_set(parking5, _parking_cb, NULL);
1293 // Append overlays to groups
1294 grp_parking = elm_map_overlay_class_add(map);
1295 elm_map_overlay_icon_set(grp_parking, _icon_get(map, &parking));
1296 elm_map_overlay_class_append(grp_parking, parking1);
1297 elm_map_overlay_class_append(grp_parking, parking2);
1298 elm_map_overlay_class_append(grp_parking, parking3);
1299 elm_map_overlay_class_append(grp_parking, parking4);
1300 elm_map_overlay_class_append(grp_parking, parking5);
1301 >>>>>>> remotes/origin/upstream
1303 evas_object_show(map);
1306 evas_object_resize(win, 800, 800);
1307 evas_object_show(win);