summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Zaoui <daniel.zaoui@samsung.com>2014-03-23 16:45:00 +0200
committerDaniel Zaoui <daniel.zaoui@samsung.com>2014-03-24 08:50:04 +0200
commit25beba7851bdac02d70b7c4f6934183dc2826958 (patch)
tree3112502ac58f3ff5a2979a39093f1444d1ca4c9d
parent60343f93caf47a306748c4bfe000e8c995cb62d4 (diff)
Eolian: Integration of Map and Map_Pan
-rw-r--r--src/lib/Makefile.am14
-rw-r--r--src/lib/elm_map.c1161
-rw-r--r--src/lib/elm_map.eo789
-rw-r--r--src/lib/elm_map_eo.h5
-rw-r--r--src/lib/elm_map_legacy.h2
-rw-r--r--src/lib/elm_map_pan.eo46
-rw-r--r--src/lib/elm_widget_map.h54
7 files changed, 1100 insertions, 971 deletions
diff --git a/src/lib/Makefile.am b/src/lib/Makefile.am
index 923f1fcf6..310ca4352 100644
--- a/src/lib/Makefile.am
+++ b/src/lib/Makefile.am
@@ -604,7 +604,11 @@ BUILT_SOURCES = \
604 elm_inwin.eo.c \ 604 elm_inwin.eo.c \
605 elm_inwin.eo.h \ 605 elm_inwin.eo.h \
606 elm_label.eo.c \ 606 elm_label.eo.c \
607 elm_label.eo.h 607 elm_label.eo.h \
608 elm_map_pan.eo.c \
609 elm_map_pan.eo.h \
610 elm_map.eo.c \
611 elm_map.eo.h
608 612
609EXTRA_DIST += \ 613EXTRA_DIST += \
610 elm_widget.eo \ 614 elm_widget.eo \
@@ -646,7 +650,9 @@ EXTRA_DIST += \
646 elm_icon.eo \ 650 elm_icon.eo \
647 elm_index.eo \ 651 elm_index.eo \
648 elm_inwin.eo \ 652 elm_inwin.eo \
649 elm_label.eo 653 elm_label.eo \
654 elm_map_pan.eo \
655 elm_map.eo
650 656
651nodist_includesunstable_HEADERS = \ 657nodist_includesunstable_HEADERS = \
652 elm_widget.eo.h \ 658 elm_widget.eo.h \
@@ -688,5 +694,7 @@ nodist_includesunstable_HEADERS = \
688 elm_icon.eo.h \ 694 elm_icon.eo.h \
689 elm_index.eo.h \ 695 elm_index.eo.h \
690 elm_inwin.eo.h \ 696 elm_inwin.eo.h \
691 elm_label.eo.h 697 elm_label.eo.h \
698 elm_map_pan.eo.h \
699 elm_map.eo.h
692 700
diff --git a/src/lib/elm_map.c b/src/lib/elm_map.c
index 65061312e..dd8d908ca 100644
--- a/src/lib/elm_map.c
+++ b/src/lib/elm_map.c
@@ -8,15 +8,11 @@
8#include "elm_widget_map.h" 8#include "elm_widget_map.h"
9#include "elm_interface_scrollable.h" 9#include "elm_interface_scrollable.h"
10 10
11EAPI Eo_Op ELM_OBJ_MAP_PAN_BASE_ID = EO_NOOP;
12
13#define MY_PAN_CLASS ELM_OBJ_MAP_PAN_CLASS 11#define MY_PAN_CLASS ELM_OBJ_MAP_PAN_CLASS
14 12
15#define MY_PAN_CLASS_NAME "Elm_Map_Pan" 13#define MY_PAN_CLASS_NAME "Elm_Map_Pan"
16#define MY_PAN_CLASS_NAME_LEGACY "elm_map_pan" 14#define MY_PAN_CLASS_NAME_LEGACY "elm_map_pan"
17 15
18EAPI Eo_Op ELM_OBJ_MAP_BASE_ID = EO_NOOP;
19
20#define MY_CLASS ELM_OBJ_MAP_CLASS 16#define MY_CLASS ELM_OBJ_MAP_CLASS
21 17
22#define MY_CLASS_NAME "Elm_Map" 18#define MY_CLASS_NAME "Elm_Map"
@@ -344,7 +340,7 @@ static const Evas_Smart_Cb_Description _smart_callbacks[] = {
344}; 340};
345 341
346static void 342static void
347_edj_overlay_size_get(Elm_Map_Smart_Data *sd, 343_edj_overlay_size_get(Elm_Map_Data *sd,
348 Evas_Coord *w, 344 Evas_Coord *w,
349 Evas_Coord *h) 345 Evas_Coord *h)
350{ 346{
@@ -386,7 +382,7 @@ _rotate_do(Evas_Coord x,
386} 382}
387 383
388static void 384static void
389_obj_rotate(Elm_Map_Smart_Data *sd, 385_obj_rotate(Elm_Map_Data *sd,
390 Evas_Object *obj) 386 Evas_Object *obj)
391{ 387{
392 Evas_Coord w, h, ow, oh; 388 Evas_Coord w, h, ow, oh;
@@ -423,7 +419,7 @@ _obj_place(Evas_Object *obj,
423} 419}
424 420
425static void 421static void
426_coord_to_region_convert(Elm_Map_Smart_Data *sd, 422_coord_to_region_convert(Elm_Map_Data *sd,
427 Evas_Coord x, 423 Evas_Coord x,
428 Evas_Coord y, 424 Evas_Coord y,
429 Evas_Coord size, 425 Evas_Coord size,
@@ -451,7 +447,7 @@ _coord_to_region_convert(Elm_Map_Smart_Data *sd,
451} 447}
452 448
453static void 449static void
454_region_to_coord_convert(Elm_Map_Smart_Data *sd, 450_region_to_coord_convert(Elm_Map_Data *sd,
455 double lon, 451 double lon,
456 double lat, 452 double lat,
457 Evas_Coord size, 453 Evas_Coord size,
@@ -477,7 +473,7 @@ _region_to_coord_convert(Elm_Map_Smart_Data *sd,
477} 473}
478 474
479static void 475static void
480_viewport_coord_get(Elm_Map_Smart_Data *sd, 476_viewport_coord_get(Elm_Map_Data *sd,
481 Evas_Coord *vx, 477 Evas_Coord *vx,
482 Evas_Coord *vy, 478 Evas_Coord *vy,
483 Evas_Coord *vw, 479 Evas_Coord *vw,
@@ -500,7 +496,7 @@ _viewport_coord_get(Elm_Map_Smart_Data *sd,
500 496
501// Map coordinates to canvas geometry without rotate 497// Map coordinates to canvas geometry without rotate
502static void 498static void
503_coord_to_canvas_no_rotation(Elm_Map_Smart_Data *sd, 499_coord_to_canvas_no_rotation(Elm_Map_Data *sd,
504 Evas_Coord x, 500 Evas_Coord x,
505 Evas_Coord y, 501 Evas_Coord y,
506 Evas_Coord *xx, 502 Evas_Coord *xx,
@@ -516,7 +512,7 @@ _coord_to_canvas_no_rotation(Elm_Map_Smart_Data *sd,
516 512
517// Map coordinates to canvas geometry 513// Map coordinates to canvas geometry
518static void 514static void
519_coord_to_canvas(Elm_Map_Smart_Data *sd, 515_coord_to_canvas(Elm_Map_Data *sd,
520 Evas_Coord x, 516 Evas_Coord x,
521 Evas_Coord y, 517 Evas_Coord y,
522 Evas_Coord *xx, 518 Evas_Coord *xx,
@@ -530,7 +526,7 @@ _coord_to_canvas(Elm_Map_Smart_Data *sd,
530 526
531// Canvas geometry to map coordinates 527// Canvas geometry to map coordinates
532static void 528static void
533_canvas_to_coord(Elm_Map_Smart_Data *sd, 529_canvas_to_coord(Elm_Map_Data *sd,
534 Evas_Coord x, 530 Evas_Coord x,
535 Evas_Coord y, 531 Evas_Coord y,
536 Evas_Coord *xx, 532 Evas_Coord *xx,
@@ -888,7 +884,7 @@ _grid_load(Grid *g)
888} 884}
889 885
890static void 886static void
891_grid_place(Elm_Map_Smart_Data *sd) 887_grid_place(Elm_Map_Data *sd)
892{ 888{
893 Eina_List *l; 889 Eina_List *l;
894 Grid *g; 890 Grid *g;
@@ -905,7 +901,7 @@ _grid_place(Elm_Map_Smart_Data *sd)
905} 901}
906 902
907static void 903static void
908_grid_all_create(Elm_Map_Smart_Data *sd) 904_grid_all_create(Elm_Map_Data *sd)
909{ 905{
910 int zoom; 906 int zoom;
911 907
@@ -928,7 +924,7 @@ _grid_all_create(Elm_Map_Smart_Data *sd)
928} 924}
929 925
930static void 926static void
931_grid_all_clear(Elm_Map_Smart_Data *sd) 927_grid_all_clear(Elm_Map_Data *sd)
932{ 928{
933 Grid *g; 929 Grid *g;
934 930
@@ -954,7 +950,7 @@ _grid_all_clear(Elm_Map_Smart_Data *sd)
954} 950}
955 951
956static void 952static void
957_track_place(Elm_Map_Smart_Data *sd) 953_track_place(Elm_Map_Data *sd)
958{ 954{
959#ifdef ELM_EMAP 955#ifdef ELM_EMAP
960 Eina_List *l; 956 Eina_List *l;
@@ -1004,7 +1000,7 @@ _track_place(Elm_Map_Smart_Data *sd)
1004} 1000}
1005 1001
1006static void 1002static void
1007_calc_job(Elm_Map_Smart_Data *sd) 1003_calc_job(Elm_Map_Data *sd)
1008{ 1004{
1009 if (sd->calc_job.region_show_bring_in) 1005 if (sd->calc_job.region_show_bring_in)
1010 { 1006 {
@@ -1025,7 +1021,7 @@ _calc_job(Elm_Map_Smart_Data *sd)
1025} 1021}
1026 1022
1027static void 1023static void
1028_smooth_update(Elm_Map_Smart_Data *sd) 1024_smooth_update(Elm_Map_Data *sd)
1029{ 1025{
1030 Eina_List *l; 1026 Eina_List *l;
1031 Grid *g; 1027 Grid *g;
@@ -1059,7 +1055,7 @@ _zoom_timeout_cb(void *data)
1059} 1055}
1060 1056
1061static void 1057static void
1062_zoom_do(Elm_Map_Smart_Data *sd, 1058_zoom_do(Elm_Map_Data *sd,
1063 double zoom) 1059 double zoom)
1064{ 1060{
1065 Evas_Coord vx, vy, vw, vh; 1061 Evas_Coord vx, vy, vw, vh;
@@ -1144,7 +1140,7 @@ _zoom_anim_cb(void *data)
1144} 1140}
1145 1141
1146static void 1142static void
1147_zoom_with_animation(Elm_Map_Smart_Data *sd, 1143_zoom_with_animation(Elm_Map_Data *sd,
1148 double zoom, 1144 double zoom,
1149 int cnt) 1145 int cnt)
1150{ 1146{
@@ -1728,7 +1724,7 @@ _overlay_group_free(Overlay_Group *grp)
1728} 1724}
1729 1725
1730static Overlay_Group * 1726static Overlay_Group *
1731_overlay_group_new(Elm_Map_Smart_Data *sd) 1727_overlay_group_new(Elm_Map_Data *sd)
1732{ 1728{
1733 Overlay_Group *grp; 1729 Overlay_Group *grp;
1734 Color c = {0x90, 0xee, 0x90, 0xff}; 1730 Color c = {0x90, 0xee, 0x90, 0xff};
@@ -1854,7 +1850,7 @@ _overlay_class_free(Overlay_Class *clas)
1854} 1850}
1855 1851
1856static Overlay_Class * 1852static Overlay_Class *
1857_overlay_class_new(Elm_Map_Smart_Data *sd) 1853_overlay_class_new(Elm_Map_Data *sd)
1858{ 1854{
1859 Overlay_Class *ovl; 1855 Overlay_Class *ovl;
1860 1856
@@ -2077,7 +2073,7 @@ _overlay_route_free(Overlay_Route *route)
2077} 2073}
2078 2074
2079static Overlay_Route * 2075static Overlay_Route *
2080_overlay_route_new(Elm_Map_Smart_Data *sd, 2076_overlay_route_new(Elm_Map_Data *sd,
2081 const Elm_Map_Route *route, 2077 const Elm_Map_Route *route,
2082 Color c) 2078 Color c)
2083{ 2079{
@@ -2134,7 +2130,7 @@ static void
2134_overlay_line_show(Overlay_Line *ovl) 2130_overlay_line_show(Overlay_Line *ovl)
2135{ 2131{
2136 Evas_Coord fx, fy, tx, ty; 2132 Evas_Coord fx, fy, tx, ty;
2137 Elm_Map_Smart_Data *sd = ovl->wsd; 2133 Elm_Map_Data *sd = ovl->wsd;
2138 2134
2139 _region_to_coord_convert(sd, ovl->flon, ovl->flat, sd->size.w, &fx, &fy); 2135 _region_to_coord_convert(sd, ovl->flon, ovl->flat, sd->size.w, &fx, &fy);
2140 _region_to_coord_convert(sd, ovl->tlon, ovl->tlat, sd->size.w, &tx, &ty); 2136 _region_to_coord_convert(sd, ovl->tlon, ovl->tlat, sd->size.w, &tx, &ty);
@@ -2154,7 +2150,7 @@ _overlay_line_free(Overlay_Line *ovl)
2154} 2150}
2155 2151
2156static Overlay_Line * 2152static Overlay_Line *
2157_overlay_line_new(Elm_Map_Smart_Data *sd, 2153_overlay_line_new(Elm_Map_Data *sd,
2158 double flon, 2154 double flon,
2159 double flat, 2155 double flat,
2160 double tlon, 2156 double tlon,
@@ -2199,7 +2195,7 @@ _overlay_polygon_show(Overlay_Polygon *ovl)
2199{ 2195{
2200 Eina_List *l; 2196 Eina_List *l;
2201 Region *r; 2197 Region *r;
2202 Elm_Map_Smart_Data *sd; 2198 Elm_Map_Data *sd;
2203 2199
2204 EINA_SAFETY_ON_NULL_RETURN(ovl); 2200 EINA_SAFETY_ON_NULL_RETURN(ovl);
2205 2201
@@ -2233,7 +2229,7 @@ _overlay_polygon_free(Overlay_Polygon *ovl)
2233} 2229}
2234 2230
2235static Overlay_Polygon * 2231static Overlay_Polygon *
2236_overlay_polygon_new(Elm_Map_Smart_Data *sd, Color c) 2232_overlay_polygon_new(Elm_Map_Data *sd, Color c)
2237{ 2233{
2238 Overlay_Polygon *ovl; 2234 Overlay_Polygon *ovl;
2239 2235
@@ -2272,7 +2268,7 @@ _overlay_circle_show(Overlay_Circle *ovl)
2272{ 2268{
2273 double r; 2269 double r;
2274 Evas_Coord x, y; 2270 Evas_Coord x, y;
2275 Elm_Map_Smart_Data *sd; 2271 Elm_Map_Data *sd;
2276 2272
2277 EINA_SAFETY_ON_NULL_RETURN(ovl); 2273 EINA_SAFETY_ON_NULL_RETURN(ovl);
2278 2274
@@ -2294,7 +2290,7 @@ _overlay_circle_free(Overlay_Circle *ovl)
2294} 2290}
2295 2291
2296static Overlay_Circle * 2292static Overlay_Circle *
2297_overlay_circle_new(Elm_Map_Smart_Data *sd, 2293_overlay_circle_new(Elm_Map_Data *sd,
2298 double lon, 2294 double lon,
2299 double lat, 2295 double lat,
2300 double radius, 2296 double radius,
@@ -2346,7 +2342,7 @@ _overlay_scale_show(Overlay_Scale *ovl)
2346 char buf[32]; 2342 char buf[32];
2347 double meter; 2343 double meter;
2348 double lon, lat; 2344 double lon, lat;
2349 Elm_Map_Smart_Data *sd; 2345 Elm_Map_Data *sd;
2350 2346
2351 EINA_SAFETY_ON_NULL_RETURN(ovl); 2347 EINA_SAFETY_ON_NULL_RETURN(ovl);
2352 2348
@@ -2382,7 +2378,7 @@ _overlay_scale_free(Overlay_Scale *ovl)
2382} 2378}
2383 2379
2384static Overlay_Scale * 2380static Overlay_Scale *
2385_overlay_scale_new(Elm_Map_Smart_Data *sd, 2381_overlay_scale_new(Elm_Map_Data *sd,
2386 Evas_Coord x, 2382 Evas_Coord x,
2387 Evas_Coord y, 2383 Evas_Coord y,
2388 Color c) 2384 Color c)
@@ -2480,7 +2476,7 @@ _overlay_grouping(Eina_List *clas_membs,
2480static void 2476static void
2481_overlay_show(Elm_Map_Overlay *overlay) 2477_overlay_show(Elm_Map_Overlay *overlay)
2482{ 2478{
2483 Elm_Map_Smart_Data *sd = overlay->wsd; 2479 Elm_Map_Data *sd = overlay->wsd;
2484 2480
2485 if (overlay->paused) return; 2481 if (overlay->paused) return;
2486 if ((overlay->grp) && (overlay->grp->klass) && (overlay->grp->klass->paused)) 2482 if ((overlay->grp) && (overlay->grp->klass) && (overlay->grp->klass->paused))
@@ -2551,7 +2547,7 @@ _overlay_show(Elm_Map_Overlay *overlay)
2551} 2547}
2552 2548
2553static void 2549static void
2554_overlay_place(Elm_Map_Smart_Data *sd) 2550_overlay_place(Elm_Map_Data *sd)
2555{ 2551{
2556 Eina_List *l, *ll; 2552 Eina_List *l, *ll;
2557 Elm_Map_Overlay *overlay; 2553 Elm_Map_Overlay *overlay;
@@ -2957,7 +2953,7 @@ _route_cb(void *data,
2957 int status) 2953 int status)
2958{ 2954{
2959 Elm_Map_Route *route; 2955 Elm_Map_Route *route;
2960 Elm_Map_Smart_Data *sd; 2956 Elm_Map_Data *sd;
2961 2957
2962 EINA_SAFETY_ON_NULL_RETURN(data); 2958 EINA_SAFETY_ON_NULL_RETURN(data);
2963 EINA_SAFETY_ON_NULL_RETURN(file); 2959 EINA_SAFETY_ON_NULL_RETURN(file);
@@ -2994,7 +2990,7 @@ _name_cb(void *data,
2994 int status) 2990 int status)
2995{ 2991{
2996 Elm_Map_Name *name; 2992 Elm_Map_Name *name;
2997 Elm_Map_Smart_Data *sd; 2993 Elm_Map_Data *sd;
2998 2994
2999 EINA_SAFETY_ON_NULL_RETURN(data); 2995 EINA_SAFETY_ON_NULL_RETURN(data);
3000 EINA_SAFETY_ON_NULL_RETURN(file); 2996 EINA_SAFETY_ON_NULL_RETURN(file);
@@ -3030,7 +3026,7 @@ _name_list_cb(void *data,
3030 int status) 3026 int status)
3031{ 3027{
3032 Elm_Map_Name_List *name_list; 3028 Elm_Map_Name_List *name_list;
3033 Elm_Map_Smart_Data *sd; 3029 Elm_Map_Data *sd;
3034 3030
3035 EINA_SAFETY_ON_NULL_RETURN(data); 3031 EINA_SAFETY_ON_NULL_RETURN(data);
3036 EINA_SAFETY_ON_NULL_RETURN(file); 3032 EINA_SAFETY_ON_NULL_RETURN(file);
@@ -3262,7 +3258,7 @@ _pinch_rotate_end_cb(void *data,
3262} 3258}
3263 3259
3264static void 3260static void
3265_source_tile_set(Elm_Map_Smart_Data *sd, 3261_source_tile_set(Elm_Map_Data *sd,
3266 const char *source_name) 3262 const char *source_name)
3267{ 3263{
3268 Source_Tile *s; 3264 Source_Tile *s;
@@ -3303,7 +3299,7 @@ _source_tile_set(Elm_Map_Smart_Data *sd,
3303} 3299}
3304 3300
3305static void 3301static void
3306_source_route_set(Elm_Map_Smart_Data *sd, 3302_source_route_set(Elm_Map_Data *sd,
3307 const char *source_name) 3303 const char *source_name)
3308{ 3304{
3309 Source_Route *s; 3305 Source_Route *s;
@@ -3330,7 +3326,7 @@ _source_route_set(Elm_Map_Smart_Data *sd,
3330} 3326}
3331 3327
3332static void 3328static void
3333_source_name_set(Elm_Map_Smart_Data *sd, 3329_source_name_set(Elm_Map_Data *sd,
3334 const char *source_name) 3330 const char *source_name)
3335{ 3331{
3336 Source_Name *s; 3332 Source_Name *s;
@@ -3361,7 +3357,7 @@ _source_mod_cb(Eina_Module *m,
3361 void *data) 3357 void *data)
3362{ 3358{
3363 const char *file; 3359 const char *file;
3364 Elm_Map_Smart_Data *sd = data; 3360 Elm_Map_Data *sd = data;
3365 3361
3366 Elm_Map_Module_Source_Name_Func name_cb; 3362 Elm_Map_Module_Source_Name_Func name_cb;
3367 Elm_Map_Module_Tile_Url_Func tile_url_cb; 3363 Elm_Map_Module_Tile_Url_Func tile_url_cb;
@@ -3441,7 +3437,7 @@ _source_mod_cb(Eina_Module *m,
3441} 3437}
3442 3438
3443static void 3439static void
3444_source_all_unload(Elm_Map_Smart_Data *sd) 3440_source_all_unload(Elm_Map_Data *sd)
3445{ 3441{
3446 int idx = 0; 3442 int idx = 0;
3447 Source_Tile *s; 3443 Source_Tile *s;
@@ -3461,7 +3457,7 @@ _source_all_unload(Elm_Map_Smart_Data *sd)
3461} 3457}
3462 3458
3463static void 3459static void
3464_source_all_load(Elm_Map_Smart_Data *sd) 3460_source_all_load(Elm_Map_Data *sd)
3465{ 3461{
3466 Source_Tile *src_tile; 3462 Source_Tile *src_tile;
3467 Source_Route *src_route; 3463 Source_Route *src_route;
@@ -3539,7 +3535,7 @@ _source_all_load(Elm_Map_Smart_Data *sd)
3539} 3535}
3540 3536
3541static void 3537static void
3542_zoom_mode_set(Elm_Map_Smart_Data *sd, double zoom) 3538_zoom_mode_set(Elm_Map_Data *sd, double zoom)
3543{ 3539{
3544 EINA_SAFETY_ON_NULL_RETURN(sd); 3540 EINA_SAFETY_ON_NULL_RETURN(sd);
3545 3541
@@ -3609,7 +3605,7 @@ _zoom_mode_set(Elm_Map_Smart_Data *sd, double zoom)
3609} 3605}
3610 3606
3611static void 3607static void
3612_region_show_bring_in(Elm_Map_Smart_Data *wsd, double lon, double lat, Eina_Bool bring_in) 3608_region_show_bring_in(Elm_Map_Data *wsd, double lon, double lat, Eina_Bool bring_in)
3613{ 3609{
3614 int x, y, w, h; 3610 int x, y, w, h;
3615 3611
@@ -3626,7 +3622,7 @@ _region_show_bring_in(Elm_Map_Smart_Data *wsd, double lon, double lat, Eina_Bool
3626} 3622}
3627 3623
3628static void 3624static void
3629_overlays_show(Elm_Map_Smart_Data *sd, Eina_List *overlays) 3625_overlays_show(Elm_Map_Data *sd, Eina_List *overlays)
3630{ 3626{
3631 double max_lon, min_lon, max_lat, min_lat, lon, lat; 3627 double max_lon, min_lon, max_lat, min_lat, lon, lat;
3632 int zoom, zoom_max; 3628 int zoom, zoom_max;
@@ -3662,13 +3658,9 @@ _overlays_show(Elm_Map_Smart_Data *sd, Eina_List *overlays)
3662 _region_show_bring_in(sd, lon, lat, EINA_FALSE); 3658 _region_show_bring_in(sd, lon, lat, EINA_FALSE);
3663} 3659}
3664 3660
3665static void 3661EOLIAN static void
3666_elm_map_pan_smart_pos_set(Eo *obj, void *_pd, va_list *list) 3662_elm_map_pan_elm_pan_pos_set(Eo *obj, Elm_Map_Pan_Data *psd, Evas_Coord x, Evas_Coord y)
3667{ 3663{
3668 Evas_Coord x = va_arg(*list, Evas_Coord);
3669 Evas_Coord y = va_arg(*list, Evas_Coord);
3670 Elm_Map_Pan_Smart_Data *psd = _pd;
3671
3672 if ((x == psd->wsd->pan_x) && (y == psd->wsd->pan_y)) return; 3664 if ((x == psd->wsd->pan_x) && (y == psd->wsd->pan_y)) return;
3673 3665
3674 psd->wsd->pan_x = x; 3666 psd->wsd->pan_x = x;
@@ -3677,25 +3669,17 @@ _elm_map_pan_smart_pos_set(Eo *obj, void *_pd, va_list *list)
3677 evas_object_smart_changed(obj); 3669 evas_object_smart_changed(obj);
3678} 3670}
3679 3671
3680static void 3672EOLIAN static void
3681_elm_map_pan_smart_pos_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list) 3673_elm_map_pan_elm_pan_pos_get(Eo *obj EINA_UNUSED, Elm_Map_Pan_Data *psd, Evas_Coord *x, Evas_Coord *y)
3682{ 3674{
3683 Evas_Coord *x = va_arg(*list, Evas_Coord *);
3684 Evas_Coord *y = va_arg(*list, Evas_Coord *);
3685 Elm_Map_Pan_Smart_Data *psd = _pd;
3686
3687 if (x) *x = psd->wsd->pan_x; 3675 if (x) *x = psd->wsd->pan_x;
3688 if (y) *y = psd->wsd->pan_y; 3676 if (y) *y = psd->wsd->pan_y;
3689} 3677}
3690 3678
3691static void 3679EOLIAN static void
3692_elm_map_pan_smart_pos_max_get(Eo *obj, void *_pd, va_list *list) 3680_elm_map_pan_elm_pan_pos_max_get(Eo *obj, Elm_Map_Pan_Data *psd, Evas_Coord *x, Evas_Coord *y)
3693{ 3681{
3694 Evas_Coord ow, oh; 3682 Evas_Coord ow, oh;
3695 Evas_Coord *x = va_arg(*list, Evas_Coord *);
3696 Evas_Coord *y = va_arg(*list, Evas_Coord *);
3697
3698 Elm_Map_Pan_Smart_Data *psd = _pd;
3699 3683
3700 evas_object_geometry_get(obj, NULL, NULL, &ow, &oh); 3684 evas_object_geometry_get(obj, NULL, NULL, &ow, &oh);
3701 ow = psd->wsd->size.w - ow; 3685 ow = psd->wsd->size.w - ow;
@@ -3707,46 +3691,33 @@ _elm_map_pan_smart_pos_max_get(Eo *obj, void *_pd, va_list *list)
3707 if (y) *y = oh; 3691 if (y) *y = oh;
3708} 3692}
3709 3693
3710static void 3694EOLIAN static void
3711_elm_map_pan_smart_pos_min_get(Eo *obj EINA_UNUSED, void *_pd EINA_UNUSED, va_list *list) 3695_elm_map_pan_elm_pan_pos_min_get(Eo *obj EINA_UNUSED, Elm_Map_Pan_Data *_pd EINA_UNUSED, Evas_Coord *x, Evas_Coord *y)
3712{ 3696{
3713 Evas_Coord *x = va_arg(*list, Evas_Coord *);
3714 Evas_Coord *y = va_arg(*list, Evas_Coord *);
3715 if (x) *x = 0; 3697 if (x) *x = 0;
3716 if (y) *y = 0; 3698 if (y) *y = 0;
3717} 3699}
3718 3700
3719static void 3701EOLIAN static void
3720_elm_map_pan_smart_content_size_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list) 3702_elm_map_pan_elm_pan_content_size_get(Eo *obj EINA_UNUSED, Elm_Map_Pan_Data *psd, Evas_Coord *w, Evas_Coord *h)
3721{ 3703{
3722 Evas_Coord *w = va_arg(*list, Evas_Coord *);
3723 Evas_Coord *h = va_arg(*list, Evas_Coord *);
3724 Elm_Map_Pan_Smart_Data *psd = _pd;
3725
3726 if (w) *w = psd->wsd->size.w; 3704 if (w) *w = psd->wsd->size.w;
3727 if (h) *h = psd->wsd->size.h; 3705 if (h) *h = psd->wsd->size.h;
3728} 3706}
3729 3707
3730static void 3708EOLIAN static void
3731_elm_map_pan_smart_resize(Eo *obj, void *_pd, va_list *list) 3709_elm_map_pan_evas_smart_resize(Eo *obj, Elm_Map_Pan_Data *psd, Evas_Coord _gen_param2 EINA_UNUSED, Evas_Coord _gen_param3 EINA_UNUSED)
3732{ 3710{
3733 va_arg(*list, Evas_Coord);
3734 va_arg(*list, Evas_Coord);
3735
3736 Elm_Map_Pan_Smart_Data *psd = _pd;
3737
3738 _sizing_eval(psd->wsd->obj); 3711 _sizing_eval(psd->wsd->obj);
3739 elm_map_zoom_mode_set(psd->wobj, psd->wsd->mode); 3712 elm_map_zoom_mode_set(psd->wobj, psd->wsd->mode);
3740 evas_object_smart_changed(obj); 3713 evas_object_smart_changed(obj);
3741} 3714}
3742 3715
3743static void 3716EOLIAN static void
3744_elm_map_pan_smart_calculate(Eo *obj, void *_pd, va_list *list EINA_UNUSED) 3717_elm_map_pan_evas_smart_calculate(Eo *obj, Elm_Map_Pan_Data *psd)
3745{ 3718{
3746 Evas_Coord w, h; 3719 Evas_Coord w, h;
3747 3720
3748 Elm_Map_Pan_Smart_Data *psd = _pd;
3749
3750 evas_object_geometry_get(obj, NULL, NULL, &w, &h); 3721 evas_object_geometry_get(obj, NULL, NULL, &w, &h);
3751 if (w <= 0 || h <= 0) return; 3722 if (w <= 0 || h <= 0) return;
3752 3723
@@ -3756,24 +3727,20 @@ _elm_map_pan_smart_calculate(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
3756 _calc_job(psd->wsd); 3727 _calc_job(psd->wsd);
3757} 3728}
3758 3729
3759static void 3730EOLIAN static void
3760_elm_map_pan_smart_move(Eo *obj, void *_pd EINA_UNUSED, va_list *list) 3731_elm_map_pan_evas_smart_move(Eo *obj, Elm_Map_Pan_Data *_pd EINA_UNUSED, Evas_Coord x EINA_UNUSED, Evas_Coord y EINA_UNUSED)
3761{ 3732{
3762 va_arg(*list, Evas_Coord);
3763 va_arg(*list, Evas_Coord);
3764 evas_object_smart_changed(obj); 3733 evas_object_smart_changed(obj);
3765} 3734}
3766 3735
3767static void 3736EOLIAN static Eina_Bool
3768_elm_map_smart_on_focus(Eo *obj, void *_pd EINA_UNUSED, va_list *list) 3737_elm_map_elm_widget_on_focus(Eo *obj, Elm_Map_Data *_pd EINA_UNUSED)
3769{ 3738{
3770 Eina_Bool *ret = va_arg(*list, Eina_Bool *); 3739 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE);
3771 if (ret) *ret = EINA_FALSE;
3772 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
3773 Eina_Bool int_ret = EINA_FALSE; 3740 Eina_Bool int_ret = EINA_FALSE;
3774 3741
3775 eo_do_super(obj, MY_CLASS, elm_obj_widget_on_focus(&int_ret)); 3742 eo_do_super(obj, MY_CLASS, elm_obj_widget_on_focus(&int_ret));
3776 if (!int_ret) return; 3743 if (!int_ret) return EINA_FALSE;
3777 3744
3778 if (elm_widget_focus_get(obj)) 3745 if (elm_widget_focus_get(obj))
3779 { 3746 {
@@ -3788,13 +3755,12 @@ _elm_map_smart_on_focus(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
3788 evas_object_focus_set(wd->resize_obj, EINA_FALSE); 3755 evas_object_focus_set(wd->resize_obj, EINA_FALSE);
3789 } 3756 }
3790 3757
3791 if (ret) *ret = EINA_TRUE; 3758 return EINA_TRUE;
3792} 3759}
3793 3760
3794static void 3761EOLIAN static void
3795_elm_map_pan_destructor(Eo *obj, void *_pd, va_list *list EINA_UNUSED) 3762_elm_map_pan_eo_base_destructor(Eo *obj, Elm_Map_Pan_Data *psd)
3796{ 3763{
3797 Elm_Map_Pan_Smart_Data *psd = _pd;
3798 eo_data_unref(psd->wobj, psd->wsd); 3764 eo_data_unref(psd->wobj, psd->wsd);
3799 eo_do_super(obj, MY_PAN_CLASS, eo_destructor()); 3765 eo_do_super(obj, MY_PAN_CLASS, eo_destructor());
3800} 3766}
@@ -3802,71 +3768,36 @@ _elm_map_pan_destructor(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
3802static void 3768static void
3803_elm_map_pan_class_constructor(Eo_Class *klass) 3769_elm_map_pan_class_constructor(Eo_Class *klass)
3804{ 3770{
3805 const Eo_Op_Func_Description func_desc[] = { 3771 evas_smart_legacy_type_register(MY_PAN_CLASS_NAME_LEGACY, klass);
3806 EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_DESTRUCTOR), _elm_map_pan_destructor), 3772}
3807
3808 EO_OP_FUNC(EVAS_OBJ_SMART_ID(EVAS_OBJ_SMART_SUB_ID_RESIZE), _elm_map_pan_smart_resize),
3809 EO_OP_FUNC(EVAS_OBJ_SMART_ID(EVAS_OBJ_SMART_SUB_ID_MOVE), _elm_map_pan_smart_move),
3810 EO_OP_FUNC(EVAS_OBJ_SMART_ID(EVAS_OBJ_SMART_SUB_ID_CALCULATE), _elm_map_pan_smart_calculate),
3811 EO_OP_FUNC(ELM_OBJ_PAN_ID(ELM_OBJ_PAN_SUB_ID_POS_SET), _elm_map_pan_smart_pos_set),
3812 EO_OP_FUNC(ELM_OBJ_PAN_ID(ELM_OBJ_PAN_SUB_ID_POS_GET), _elm_map_pan_smart_pos_get),
3813 EO_OP_FUNC(ELM_OBJ_PAN_ID(ELM_OBJ_PAN_SUB_ID_POS_MAX_GET), _elm_map_pan_smart_pos_max_get),
3814 EO_OP_FUNC(ELM_OBJ_PAN_ID(ELM_OBJ_PAN_SUB_ID_POS_MIN_GET), _elm_map_pan_smart_pos_min_get),
3815 EO_OP_FUNC(ELM_OBJ_PAN_ID(ELM_OBJ_PAN_SUB_ID_CONTENT_SIZE_GET), _elm_map_pan_smart_content_size_get),
3816 EO_OP_FUNC_SENTINEL
3817 };
3818 eo_class_funcs_set(klass, func_desc);
3819
3820 evas_smart_legacy_type_register(MY_PAN_CLASS_NAME_LEGACY, klass);
3821}
3822
3823static const Eo_Class_Description _elm_map_pan_class_desc = {
3824 EO_VERSION,
3825 MY_PAN_CLASS_NAME,
3826 EO_CLASS_TYPE_REGULAR,
3827 EO_CLASS_DESCRIPTION_OPS(NULL, NULL, 0),
3828 NULL,
3829 sizeof(Elm_Map_Pan_Smart_Data),
3830 _elm_map_pan_class_constructor,
3831 NULL
3832};
3833 3773
3834EO_DEFINE_CLASS(elm_obj_map_pan_class_get, &_elm_map_pan_class_desc, ELM_OBJ_PAN_CLASS, NULL); 3774#include "elm_map_pan.eo.c"
3835 3775
3836static void 3776EOLIAN static Eina_Bool
3837_elm_map_smart_theme(Eo *obj, void *_pd EINA_UNUSED, va_list *list) 3777_elm_map_elm_widget_theme_apply(Eo *obj, Elm_Map_Data *sd EINA_UNUSED)
3838{ 3778{
3839 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
3840 if (ret) *ret = EINA_FALSE;
3841 Eina_Bool int_ret = EINA_FALSE; 3779 Eina_Bool int_ret = EINA_FALSE;
3842
3843 eo_do_super(obj, MY_CLASS, elm_obj_widget_theme_apply(&int_ret)); 3780 eo_do_super(obj, MY_CLASS, elm_obj_widget_theme_apply(&int_ret));
3844 if (!int_ret) return; 3781 if (!int_ret) return EINA_FALSE;
3845 3782
3846 _sizing_eval(obj); 3783 _sizing_eval(obj);
3847 3784
3848 if (ret) *ret = EINA_TRUE; 3785 return EINA_TRUE;
3849} 3786}
3850 3787
3851static void 3788EOLIAN static Eina_Bool
3852_elm_map_smart_event(Eo *obj, void *_pd, va_list *list) 3789_elm_map_elm_widget_event(Eo *obj, Elm_Map_Data *sd, Evas_Object *src, Evas_Callback_Type type, void *event_info)
3853{ 3790{
3854 Evas_Object *src = va_arg(*list, Evas_Object *);
3855 Evas_Callback_Type type = va_arg(*list, Evas_Callback_Type);
3856 Evas_Event_Key_Down *ev = va_arg(*list, void *);
3857 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
3858 Elm_Map_Smart_Data *sd = _pd;
3859
3860 if (ret) *ret = EINA_FALSE;
3861 (void) src; 3791 (void) src;
3792 Evas_Event_Key_Down *ev = event_info;
3862 3793
3863 Evas_Coord vh; 3794 Evas_Coord vh;
3864 Evas_Coord x, y; 3795 Evas_Coord x, y;
3865 Evas_Coord step_x, step_y, page_x, page_y; 3796 Evas_Coord step_x, step_y, page_x, page_y;
3866 3797
3867 if (elm_widget_disabled_get(obj)) return; 3798 if (elm_widget_disabled_get(obj)) return EINA_FALSE;
3868 if (type != EVAS_CALLBACK_KEY_DOWN) return; 3799 if (type != EVAS_CALLBACK_KEY_DOWN) return EINA_FALSE;
3869 if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return; 3800 if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return EINA_FALSE;
3870 3801
3871 eo_do(obj, 3802 eo_do(obj,
3872 elm_interface_scrollable_content_pos_get(&x, &y), 3803 elm_interface_scrollable_content_pos_get(&x, &y),
@@ -3913,32 +3844,28 @@ _elm_map_smart_event(Eo *obj, void *_pd, va_list *list)
3913 else if (!strcmp(ev->key, "KP_Add")) 3844 else if (!strcmp(ev->key, "KP_Add"))
3914 { 3845 {
3915 _zoom_with_animation(sd, sd->zoom + 1, 10); 3846 _zoom_with_animation(sd, sd->zoom + 1, 10);
3916 if (ret) *ret = EINA_TRUE; 3847 return EINA_TRUE;
3917 return;
3918 } 3848 }
3919 else if (!strcmp(ev->key, "KP_Subtract")) 3849 else if (!strcmp(ev->key, "KP_Subtract"))
3920 { 3850 {
3921 _zoom_with_animation(sd, sd->zoom - 1, 10); 3851 _zoom_with_animation(sd, sd->zoom - 1, 10);
3922 if (ret) *ret = EINA_TRUE; 3852 return EINA_TRUE;
3923 return;
3924 } 3853 }
3925 else return; 3854 else return EINA_FALSE;
3926 3855
3927 ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD; 3856 ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
3928 eo_do(obj, elm_interface_scrollable_content_pos_set(x, y, EINA_TRUE)); 3857 eo_do(obj, elm_interface_scrollable_content_pos_set(x, y, EINA_TRUE));
3929 3858
3930 if (ret) *ret = EINA_TRUE; 3859 return EINA_TRUE;
3931} 3860}
3932 3861
3933static void 3862EOLIAN static void
3934_elm_map_smart_add(Eo *obj, void *_pd, va_list *list EINA_UNUSED) 3863_elm_map_evas_smart_add(Eo *obj, Elm_Map_Data *priv)
3935{ 3864{
3936 Evas_Coord minw, minh; 3865 Evas_Coord minw, minh;
3937 Elm_Map_Pan_Smart_Data *pan_data; 3866 Elm_Map_Pan_Data *pan_data;
3938 Evas_Object *edje; 3867 Evas_Object *edje;
3939 3868
3940 Elm_Map_Smart_Data *priv = _pd;
3941
3942 elm_widget_sub_object_parent_add(obj); 3869 elm_widget_sub_object_parent_add(obj);
3943 3870
3944 edje = edje_object_add(evas_object_evas_get(obj)); 3871 edje = edje_object_add(evas_object_evas_get(obj));
@@ -4041,8 +3968,8 @@ _elm_map_smart_add(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
4041 ERR("Ecore must be built with curl support for the map widget!"); 3968 ERR("Ecore must be built with curl support for the map widget!");
4042} 3969}
4043 3970
4044static void 3971EOLIAN static void
4045_elm_map_smart_del(Eo *obj, void *_pd, va_list *list EINA_UNUSED) 3972_elm_map_evas_smart_del(Eo *obj, Elm_Map_Data *sd)
4046{ 3973{
4047 Elm_Map_Route *r; 3974 Elm_Map_Route *r;
4048 Elm_Map_Name *na; 3975 Elm_Map_Name *na;
@@ -4050,8 +3977,6 @@ _elm_map_smart_del(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
4050 Evas_Object *track; 3977 Evas_Object *track;
4051 Elm_Map_Overlay *overlay; 3978 Elm_Map_Overlay *overlay;
4052 3979
4053 Elm_Map_Smart_Data *sd = _pd;
4054
4055 EINA_LIST_FOREACH_SAFE(sd->routes, l, ll, r) 3980 EINA_LIST_FOREACH_SAFE(sd->routes, l, ll, r)
4056 elm_map_route_del(r); 3981 elm_map_route_del(r);
4057 3982
@@ -4104,36 +4029,25 @@ _elm_map_smart_del(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
4104 eo_do_super(obj, MY_CLASS, evas_obj_smart_del()); 4029 eo_do_super(obj, MY_CLASS, evas_obj_smart_del());
4105} 4030}
4106 4031
4107static void 4032EOLIAN static void
4108_elm_map_smart_move(Eo *obj, void *_pd, va_list *list) 4033_elm_map_evas_smart_move(Eo *obj, Elm_Map_Data *sd, Evas_Coord x, Evas_Coord y)
4109{ 4034{
4110 Evas_Coord x = va_arg(*list, Evas_Coord);
4111 Evas_Coord y = va_arg(*list, Evas_Coord);
4112 Elm_Map_Smart_Data *sd = _pd;
4113
4114 eo_do_super(obj, MY_CLASS, evas_obj_smart_move(x, y)); 4035 eo_do_super(obj, MY_CLASS, evas_obj_smart_move(x, y));
4115 4036
4116 evas_object_move(sd->hit_rect, x, y); 4037 evas_object_move(sd->hit_rect, x, y);
4117} 4038}
4118 4039
4119static void 4040EOLIAN static void
4120_elm_map_smart_resize(Eo *obj, void *_pd, va_list *list) 4041_elm_map_evas_smart_resize(Eo *obj, Elm_Map_Data *sd, Evas_Coord w, Evas_Coord h)
4121{ 4042{
4122 Evas_Coord w = va_arg(*list, Evas_Coord);
4123 Evas_Coord h = va_arg(*list, Evas_Coord);
4124 Elm_Map_Smart_Data *sd = _pd;
4125
4126 eo_do_super(obj, MY_CLASS, evas_obj_smart_resize(w, h)); 4043 eo_do_super(obj, MY_CLASS, evas_obj_smart_resize(w, h));
4127 4044
4128 evas_object_resize(sd->hit_rect, w, h); 4045 evas_object_resize(sd->hit_rect, w, h);
4129} 4046}
4130 4047
4131static void 4048EOLIAN static void
4132_elm_map_smart_member_add(Eo *obj, void *_pd, va_list *list) 4049_elm_map_evas_smart_member_add(Eo *obj, Elm_Map_Data *sd, Evas_Object *member)
4133{ 4050{
4134 Evas_Object *member = va_arg(*list, Evas_Object *);
4135 Elm_Map_Smart_Data *sd = _pd;
4136
4137 eo_do_super(obj, MY_CLASS, evas_obj_smart_member_add(member)); 4051 eo_do_super(obj, MY_CLASS, evas_obj_smart_member_add(member));
4138 4052
4139 if (sd->hit_rect) 4053 if (sd->hit_rect)
@@ -4149,10 +4063,9 @@ elm_map_add(Evas_Object *parent)
4149 return obj; 4063 return obj;
4150} 4064}
4151 4065
4152static void 4066EOLIAN static void
4153_constructor(Eo *obj, void *_pd EINA_UNUSED, va_list *list EINA_UNUSED) 4067_elm_map_eo_base_constructor(Eo *obj, Elm_Map_Data *sd)
4154{ 4068{
4155 Elm_Map_Smart_Data *sd = _pd;
4156 sd->obj = obj; 4069 sd->obj = obj;
4157 4070
4158 eo_do_super(obj, MY_CLASS, eo_constructor()); 4071 eo_do_super(obj, MY_CLASS, eo_constructor());
@@ -4161,20 +4074,10 @@ _constructor(Eo *obj, void *_pd EINA_UNUSED, va_list *list EINA_UNUSED)
4161 evas_obj_smart_callbacks_descriptions_set(_smart_callbacks, NULL)); 4074 evas_obj_smart_callbacks_descriptions_set(_smart_callbacks, NULL));
4162} 4075}
4163 4076
4164EAPI void 4077EOLIAN static void
4165elm_map_zoom_set(Evas_Object *obj, 4078_elm_map_zoom_set(Eo *obj, Elm_Map_Data *sd, int zoom)
4166 int zoom)
4167{ 4079{
4168 eo_do(obj, elm_obj_map_zoom_set(zoom));
4169}
4170
4171static void
4172_zoom_set(Eo *obj, void *_pd, va_list *list)
4173{
4174 int zoom = va_arg(*list, int);
4175
4176 ELM_MAP_CHECK(obj); 4080 ELM_MAP_CHECK(obj);
4177 Elm_Map_Smart_Data *sd = _pd;
4178 EINA_SAFETY_ON_NULL_RETURN(sd->src_tile); 4081 EINA_SAFETY_ON_NULL_RETURN(sd->src_tile);
4179 4082
4180 if (sd->mode != ELM_MAP_ZOOM_MODE_MANUAL) return; 4083 if (sd->mode != ELM_MAP_ZOOM_MODE_MANUAL) return;
@@ -4187,38 +4090,15 @@ _zoom_set(Eo *obj, void *_pd, va_list *list)
4187 evas_object_smart_changed(sd->pan_obj); 4090 evas_object_smart_changed(sd->pan_obj);
4188} 4091}
4189 4092
4190EAPI int 4093EOLIAN static int
4191elm_map_zoom_get(const Evas_Object *obj) 4094_elm_map_zoom_get(Eo *obj EINA_UNUSED, Elm_Map_Data *sd)
4192{ 4095{
4193 ELM_MAP_CHECK(obj) 0; 4096 return sd->zoom;
4194 int ret = 0;
4195 eo_do((Eo *) obj, elm_obj_map_zoom_get(&ret));
4196 return ret;
4197} 4097}
4198 4098
4199static void 4099EOLIAN static void
4200_zoom_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list) 4100_elm_map_zoom_mode_set(Eo *obj EINA_UNUSED, Elm_Map_Data *sd, Elm_Map_Zoom_Mode mode)
4201{
4202 int *ret = va_arg(*list, int *);
4203 Elm_Map_Smart_Data *sd = _pd;
4204
4205 *ret = sd->zoom;
4206}
4207
4208EAPI void
4209elm_map_zoom_mode_set(Evas_Object *obj,
4210 Elm_Map_Zoom_Mode mode)
4211{
4212 ELM_MAP_CHECK(obj);
4213 eo_do(obj, elm_obj_map_zoom_mode_set(mode));
4214}
4215
4216static void
4217_zoom_mode_set_eo(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4218{ 4101{
4219 Elm_Map_Zoom_Mode mode = va_arg(*list, Elm_Map_Zoom_Mode);
4220 Elm_Map_Smart_Data *sd = _pd;
4221
4222 if ((mode == ELM_MAP_ZOOM_MODE_MANUAL) && (sd->mode == !!mode)) return; 4102 if ((mode == ELM_MAP_ZOOM_MODE_MANUAL) && (sd->mode == !!mode)) return;
4223 4103
4224 sd->mode = mode; 4104 sd->mode = mode;
@@ -4228,116 +4108,47 @@ _zoom_mode_set_eo(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4228 evas_object_smart_changed(sd->pan_obj); 4108 evas_object_smart_changed(sd->pan_obj);
4229} 4109}
4230 4110
4231EAPI Elm_Map_Zoom_Mode 4111EOLIAN static Elm_Map_Zoom_Mode
4232elm_map_zoom_mode_get(const Evas_Object *obj) 4112_elm_map_zoom_mode_get(Eo *obj EINA_UNUSED, Elm_Map_Data *sd)
4233{
4234 ELM_MAP_CHECK(obj) ELM_MAP_ZOOM_MODE_MANUAL;
4235 Elm_Map_Zoom_Mode ret = ELM_MAP_ZOOM_MODE_MANUAL;
4236 eo_do((Eo *) obj, elm_obj_map_zoom_mode_get(&ret));
4237 return ret;
4238}
4239
4240static void
4241_zoom_mode_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4242{
4243 Elm_Map_Zoom_Mode *ret = va_arg(*list, Elm_Map_Zoom_Mode *);
4244 Elm_Map_Smart_Data *sd = _pd;
4245
4246 *ret = sd->mode;
4247}
4248
4249EAPI void
4250elm_map_zoom_max_set(Evas_Object *obj,
4251 int zoom)
4252{ 4113{
4253 ELM_MAP_CHECK(obj); 4114 return sd->mode;
4254 eo_do(obj, elm_obj_map_zoom_max_set(zoom));
4255} 4115}
4256 4116
4257static void 4117EOLIAN static void
4258_zoom_max_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list) 4118_elm_map_zoom_max_set(Eo *obj EINA_UNUSED, Elm_Map_Data *sd, int zoom)
4259{ 4119{
4260 int zoom = va_arg(*list, int);
4261 Elm_Map_Smart_Data *sd = _pd;
4262 EINA_SAFETY_ON_NULL_RETURN(sd->src_tile); 4120 EINA_SAFETY_ON_NULL_RETURN(sd->src_tile);
4263 4121
4264 sd->zoom_max = zoom; 4122 sd->zoom_max = zoom;
4265} 4123}
4266 4124
4267EAPI int 4125EOLIAN static int
4268elm_map_zoom_max_get(const Evas_Object *obj) 4126_elm_map_zoom_max_get(Eo *obj EINA_UNUSED, Elm_Map_Data *sd)
4269{
4270 ELM_MAP_CHECK(obj) - 1;
4271 int ret = - 1;
4272 eo_do((Eo *) obj, elm_obj_map_zoom_max_get(&ret));
4273 return ret;
4274}
4275
4276static void
4277_zoom_max_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4278{ 4127{
4279 int *ret = va_arg(*list, int *); 4128 EINA_SAFETY_ON_NULL_RETURN_VAL(sd->src_tile, -1);
4280 *ret = -1;
4281 Elm_Map_Smart_Data *sd = _pd;
4282 EINA_SAFETY_ON_NULL_RETURN(sd->src_tile);
4283 4129
4284 *ret = sd->zoom_max; 4130 return sd->zoom_max;
4285} 4131}
4286 4132
4287EAPI void 4133EOLIAN static void
4288elm_map_zoom_min_set(Evas_Object *obj, 4134_elm_map_zoom_min_set(Eo *obj EINA_UNUSED, Elm_Map_Data *sd, int zoom)
4289 int zoom)
4290{
4291 ELM_MAP_CHECK(obj);
4292 eo_do(obj, elm_obj_map_zoom_min_set(zoom));
4293}
4294
4295static void
4296_zoom_min_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4297{ 4135{
4298 int zoom = va_arg(*list, int);
4299 Elm_Map_Smart_Data *sd = _pd;
4300 EINA_SAFETY_ON_NULL_RETURN(sd->src_tile); 4136 EINA_SAFETY_ON_NULL_RETURN(sd->src_tile);
4301 4137
4302 sd->zoom_min = zoom; 4138 sd->zoom_min = zoom;
4303} 4139}
4304 4140
4305EAPI int 4141EOLIAN static int
4306elm_map_zoom_min_get(const Evas_Object *obj) 4142_elm_map_zoom_min_get(Eo *obj EINA_UNUSED, Elm_Map_Data *sd)
4307{ 4143{
4308 ELM_MAP_CHECK(obj) - 1; 4144 EINA_SAFETY_ON_NULL_RETURN_VAL(sd->src_tile, -1);
4309 int ret = - 1;
4310 eo_do((Eo *) obj, elm_obj_map_zoom_min_get(&ret));
4311 return ret;
4312}
4313 4145
4314static void 4146 return sd->zoom_min;
4315_zoom_min_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4316{
4317 int *ret = va_arg(*list, int *);
4318 *ret = -1;
4319 Elm_Map_Smart_Data *sd = _pd;
4320 EINA_SAFETY_ON_NULL_RETURN(sd->src_tile);
4321
4322 *ret = sd->zoom_min;
4323}
4324
4325EAPI void
4326elm_map_region_bring_in(Evas_Object *obj,
4327 double lon,
4328 double lat)
4329{
4330 ELM_MAP_CHECK(obj);
4331 eo_do(obj, elm_obj_map_region_bring_in(lon, lat));
4332} 4147}
4333 4148
4334static void 4149EOLIAN static void
4335_region_bring_in(Eo *obj EINA_UNUSED, void *_pd, va_list *list) 4150_elm_map_region_bring_in(Eo *obj EINA_UNUSED, Elm_Map_Data *sd, double lon, double lat)
4336{ 4151{
4337 double lon = va_arg(*list, double);
4338 double lat = va_arg(*list, double);
4339 Elm_Map_Smart_Data *sd = _pd;
4340
4341 sd->calc_job.bring_in = EINA_TRUE; 4152 sd->calc_job.bring_in = EINA_TRUE;
4342 sd->calc_job.lon = lon; 4153 sd->calc_job.lon = lon;
4343 sd->calc_job.lat = lat; 4154 sd->calc_job.lat = lat;
@@ -4346,22 +4157,9 @@ _region_bring_in(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4346 evas_object_smart_changed(sd->pan_obj); 4157 evas_object_smart_changed(sd->pan_obj);
4347} 4158}
4348 4159
4349EAPI void 4160EOLIAN static void
4350elm_map_region_show(Evas_Object *obj, 4161_elm_map_region_show(Eo *obj EINA_UNUSED, Elm_Map_Data *sd, double lon, double lat)
4351 double lon,
4352 double lat)
4353{
4354 ELM_MAP_CHECK(obj);
4355 eo_do(obj, elm_obj_map_region_show(lon, lat));
4356}
4357
4358static void
4359_region_show(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4360{ 4162{
4361 double lon = va_arg(*list, double);
4362 double lat = va_arg(*list, double);
4363 Elm_Map_Smart_Data *sd = _pd;
4364
4365 sd->calc_job.bring_in = EINA_FALSE; 4163 sd->calc_job.bring_in = EINA_FALSE;
4366 sd->calc_job.lon = lon; 4164 sd->calc_job.lon = lon;
4367 sd->calc_job.lat = lat; 4165 sd->calc_job.lat = lat;
@@ -4370,25 +4168,12 @@ _region_show(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4370 evas_object_smart_changed(sd->pan_obj); 4168 evas_object_smart_changed(sd->pan_obj);
4371} 4169}
4372 4170
4373EAPI void 4171EOLIAN static void
4374elm_map_region_get(const Evas_Object *obj, 4172_elm_map_region_get(Eo *obj EINA_UNUSED, Elm_Map_Data *sd, double *lon, double *lat)
4375 double *lon,
4376 double *lat)
4377{
4378 ELM_MAP_CHECK(obj);
4379 eo_do((Eo *) obj, elm_obj_map_region_get(lon, lat));
4380}
4381
4382static void
4383_region_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4384{ 4173{
4385 double *lon = va_arg(*list, double *);
4386 double *lat = va_arg(*list, double *);
4387 double tlon, tlat; 4174 double tlon, tlat;
4388 Evas_Coord vx, vy, vw, vh; 4175 Evas_Coord vx, vy, vw, vh;
4389 4176
4390 Elm_Map_Smart_Data *sd = _pd;
4391
4392 _viewport_coord_get(sd, &vx, &vy, &vw, &vh); 4177 _viewport_coord_get(sd, &vx, &vy, &vw, &vh);
4393 _coord_to_region_convert 4178 _coord_to_region_convert
4394 (sd, vx + vw / 2, vy + vh / 2, sd->size.w, &tlon, &tlat); 4179 (sd, vx + vw / 2, vy + vh / 2, sd->size.w, &tlon, &tlat);
@@ -4396,19 +4181,9 @@ _region_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4396 if (lat) *lat = tlat; 4181 if (lat) *lat = tlat;
4397} 4182}
4398 4183
4399EAPI void 4184EOLIAN static void
4400elm_map_paused_set(Evas_Object *obj, 4185_elm_map_paused_set(Eo *obj, Elm_Map_Data *sd, Eina_Bool paused)
4401 Eina_Bool paused)
4402{
4403 ELM_MAP_CHECK(obj);
4404 eo_do(obj, elm_obj_map_paused_set(paused));
4405}
4406
4407static void
4408_paused_set(Eo *obj, void *_pd, va_list *list)
4409{ 4186{
4410 Eina_Bool paused = va_arg(*list, int);
4411 Elm_Map_Smart_Data *sd = _pd;
4412 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd); 4187 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
4413 4188
4414 if (sd->paused == !!paused) return; 4189 if (sd->paused == !!paused) return;
@@ -4432,42 +4207,15 @@ _paused_set(Eo *obj, void *_pd, va_list *list)
4432 } 4207 }
4433} 4208}
4434 4209
4435EAPI Eina_Bool 4210EOLIAN static Eina_Bool
4436elm_map_paused_get(const Evas_Object *obj) 4211_elm_map_paused_get(Eo *obj EINA_UNUSED, Elm_Map_Data *sd)
4437{
4438 ELM_MAP_CHECK(obj) EINA_FALSE;
4439 Eina_Bool ret = EINA_FALSE;
4440 eo_do((Eo *) obj, elm_obj_map_paused_get(&ret));
4441 return ret;
4442}
4443
4444static void
4445_paused_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4446{
4447 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
4448 Elm_Map_Smart_Data *sd = _pd;
4449
4450 *ret = sd->paused;
4451}
4452
4453EAPI void
4454elm_map_rotate_set(Evas_Object *obj,
4455 double degree,
4456 Evas_Coord cx,
4457 Evas_Coord cy)
4458{ 4212{
4459 ELM_MAP_CHECK(obj); 4213 return sd->paused;
4460 eo_do(obj, elm_obj_map_rotate_set(degree, cx, cy));
4461} 4214}
4462 4215
4463static void 4216EOLIAN static void
4464_rotate_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list) 4217_elm_map_rotate_set(Eo *obj EINA_UNUSED, Elm_Map_Data *sd, double degree, Evas_Coord cx, Evas_Coord cy)
4465{ 4218{
4466 double degree = va_arg(*list, double);
4467 Evas_Coord cx = va_arg(*list, Evas_Coord);
4468 Evas_Coord cy = va_arg(*list, Evas_Coord);
4469 Elm_Map_Smart_Data *sd = _pd;
4470
4471 sd->rotate.d = degree; 4219 sd->rotate.d = degree;
4472 sd->rotate.cx = cx; 4220 sd->rotate.cx = cx;
4473 sd->rotate.cy = cy; 4221 sd->rotate.cy = cy;
@@ -4475,43 +4223,17 @@ _rotate_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4475 evas_object_smart_changed(sd->pan_obj); 4223 evas_object_smart_changed(sd->pan_obj);
4476} 4224}
4477 4225
4478EAPI void 4226EOLIAN static void
4479elm_map_rotate_get(const Evas_Object *obj, 4227_elm_map_rotate_get(Eo *obj EINA_UNUSED, Elm_Map_Data *sd, double *degree, Evas_Coord *cx, Evas_Coord *cy)
4480 double *degree,
4481 Evas_Coord *cx,
4482 Evas_Coord *cy)
4483{
4484 ELM_MAP_CHECK(obj);
4485 eo_do((Eo *) obj, elm_obj_map_rotate_get(degree, cx, cy));
4486}
4487
4488static void
4489_rotate_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4490{ 4228{
4491 double *degree = va_arg(*list, double *);
4492 Evas_Coord *cx = va_arg(*list, Evas_Coord *);
4493 Evas_Coord *cy = va_arg(*list, Evas_Coord *);
4494 Elm_Map_Smart_Data *sd = _pd;
4495
4496 if (degree) *degree = sd->rotate.d; 4229 if (degree) *degree = sd->rotate.d;
4497 if (cx) *cx = sd->rotate.cx; 4230 if (cx) *cx = sd->rotate.cx;
4498 if (cy) *cy = sd->rotate.cy; 4231 if (cy) *cy = sd->rotate.cy;
4499} 4232}
4500 4233
4501EAPI void 4234EOLIAN static void
4502elm_map_wheel_disabled_set(Evas_Object *obj, 4235_elm_map_wheel_disabled_set(Eo *obj, Elm_Map_Data *sd, Eina_Bool disabled)
4503 Eina_Bool disabled)
4504{
4505 ELM_MAP_CHECK(obj);
4506 eo_do(obj, elm_obj_map_wheel_disabled_set(disabled));
4507}
4508
4509static void
4510_wheel_disabled_set(Eo *obj, void *_pd, va_list *list)
4511{ 4236{
4512 Eina_Bool disabled = va_arg(*list, int);
4513 Elm_Map_Smart_Data *sd = _pd;
4514
4515 if ((!sd->wheel_disabled) && (disabled)) 4237 if ((!sd->wheel_disabled) && (disabled))
4516 evas_object_event_callback_del_full 4238 evas_object_event_callback_del_full
4517 (obj, EVAS_CALLBACK_MOUSE_WHEEL, _mouse_wheel_cb, obj); 4239 (obj, EVAS_CALLBACK_MOUSE_WHEEL, _mouse_wheel_cb, obj);
@@ -4521,63 +4243,22 @@ _wheel_disabled_set(Eo *obj, void *_pd, va_list *list)
4521 sd->wheel_disabled = !!disabled; 4243 sd->wheel_disabled = !!disabled;
4522} 4244}
4523 4245
4524EAPI Eina_Bool 4246EOLIAN static Eina_Bool
4525elm_map_wheel_disabled_get(const Evas_Object *obj) 4247_elm_map_wheel_disabled_get(Eo *obj EINA_UNUSED, Elm_Map_Data *sd)
4526{
4527 ELM_MAP_CHECK(obj) EINA_FALSE;
4528 Eina_Bool ret = EINA_FALSE;
4529 eo_do((Eo *) obj, elm_obj_map_wheel_disabled_get(&ret));
4530 return ret;
4531}
4532
4533static void
4534_wheel_disabled_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4535{ 4248{
4536 Eina_Bool *ret = va_arg(*list, Eina_Bool *); 4249 return sd->wheel_disabled;
4537 Elm_Map_Smart_Data *sd = _pd;
4538
4539 *ret = sd->wheel_disabled;
4540} 4250}
4541 4251
4542EAPI void 4252EOLIAN static void
4543elm_map_tile_load_status_get(const Evas_Object *obj, 4253_elm_map_tile_load_status_get(Eo *obj EINA_UNUSED, Elm_Map_Data *sd, int *try_num, int *finish_num)
4544 int *try_num,
4545 int *finish_num)
4546{ 4254{
4547 ELM_MAP_CHECK(obj);
4548 eo_do((Eo *) obj, elm_obj_map_tile_load_status_get(try_num, finish_num));
4549}
4550
4551static void
4552_tile_load_status_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4553{
4554 int *try_num = va_arg(*list, int *);
4555 int *finish_num = va_arg(*list, int *);
4556 Elm_Map_Smart_Data *sd = _pd;
4557
4558 if (try_num) *try_num = sd->try_num; 4255 if (try_num) *try_num = sd->try_num;
4559 if (finish_num) *finish_num = sd->finish_num; 4256 if (finish_num) *finish_num = sd->finish_num;
4560} 4257}
4561 4258
4562EAPI void 4259EOLIAN static void
4563elm_map_canvas_to_region_convert(const Evas_Object *obj, 4260_elm_map_canvas_to_region_convert(Eo *obj EINA_UNUSED, Elm_Map_Data *sd, Evas_Coord x, Evas_Coord y, double *lon, double *lat)
4564 Evas_Coord x,
4565 Evas_Coord y,
4566 double *lon,
4567 double *lat)
4568{ 4261{
4569 ELM_MAP_CHECK(obj);
4570 eo_do((Eo *) obj, elm_obj_map_canvas_to_region_convert(x, y, lon, lat));
4571}
4572
4573static void
4574_canvas_to_region_convert(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4575{
4576 Evas_Coord x = va_arg(*list, Evas_Coord);
4577 Evas_Coord y = va_arg(*list, Evas_Coord);
4578 double *lon = va_arg(*list, double *);
4579 double *lat = va_arg(*list, double *);
4580 Elm_Map_Smart_Data *sd = _pd;
4581 EINA_SAFETY_ON_NULL_RETURN(lon); 4262 EINA_SAFETY_ON_NULL_RETURN(lon);
4582 EINA_SAFETY_ON_NULL_RETURN(lat); 4263 EINA_SAFETY_ON_NULL_RETURN(lat);
4583 4264
@@ -4585,25 +4266,9 @@ _canvas_to_region_convert(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4585 _coord_to_region_convert(sd, x, y, sd->size.w, lon, lat); 4266 _coord_to_region_convert(sd, x, y, sd->size.w, lon, lat);
4586} 4267}
4587 4268
4588EAPI void 4269EOLIAN static void
4589elm_map_region_to_canvas_convert(const Evas_Object *obj, 4270_elm_map_region_to_canvas_convert(Eo *obj EINA_UNUSED, Elm_Map_Data *sd, double lon, double lat, Evas_Coord *x, Evas_Coord *y)
4590 double lon,
4591 double lat,
4592 Evas_Coord *x,
4593 Evas_Coord *y)
4594{ 4271{
4595 ELM_MAP_CHECK(obj);
4596 eo_do((Eo *) obj, elm_obj_map_region_to_canvas_convert(lon, lat, x, y));
4597}
4598
4599static void
4600_region_to_canvas_convert(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4601{
4602 double lon = va_arg(*list, double);
4603 double lat = va_arg(*list, double);
4604 Evas_Coord *x = va_arg(*list, Evas_Coord *);
4605 Evas_Coord *y = va_arg(*list, Evas_Coord *);
4606 Elm_Map_Smart_Data *sd = _pd;
4607 EINA_SAFETY_ON_NULL_RETURN(x); 4272 EINA_SAFETY_ON_NULL_RETURN(x);
4608 EINA_SAFETY_ON_NULL_RETURN(y); 4273 EINA_SAFETY_ON_NULL_RETURN(y);
4609 4274
@@ -4611,19 +4276,9 @@ _region_to_canvas_convert(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4611 _coord_to_canvas(sd, *x, *y, x, y); 4276 _coord_to_canvas(sd, *x, *y, x, y);
4612} 4277}
4613 4278
4614EAPI void 4279EOLIAN static void
4615elm_map_user_agent_set(Evas_Object *obj, 4280_elm_map_user_agent_set(Eo *obj EINA_UNUSED, Elm_Map_Data *sd, const char *user_agent)
4616 const char *user_agent)
4617{
4618 ELM_MAP_CHECK(obj);
4619 eo_do(obj, elm_obj_map_user_agent_set(user_agent));
4620}
4621
4622static void
4623_user_agent_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4624{ 4281{
4625 const char *user_agent = va_arg(*list, const char *);
4626 Elm_Map_Smart_Data *sd = _pd;
4627 EINA_SAFETY_ON_NULL_RETURN(user_agent); 4282 EINA_SAFETY_ON_NULL_RETURN(user_agent);
4628 4283
4629 eina_stringshare_replace(&sd->user_agent, user_agent); 4284 eina_stringshare_replace(&sd->user_agent, user_agent);
@@ -4632,39 +4287,15 @@ _user_agent_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4632 eina_hash_set(sd->ua, "User-Agent", sd->user_agent); 4287 eina_hash_set(sd->ua, "User-Agent", sd->user_agent);
4633} 4288}
4634 4289
4635EAPI const char * 4290EOLIAN static const char*
4636elm_map_user_agent_get(const Evas_Object *obj) 4291_elm_map_user_agent_get(Eo *obj EINA_UNUSED, Elm_Map_Data *sd)
4637{ 4292{
4638 ELM_MAP_CHECK(obj) NULL; 4293 return sd->user_agent;
4639 const char *ret = NULL;
4640 eo_do((Eo *) obj, elm_obj_map_user_agent_get(&ret));
4641 return ret;
4642}
4643
4644static void
4645_user_agent_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4646{
4647 const char **ret = va_arg(*list, const char **);
4648 Elm_Map_Smart_Data *sd = _pd;
4649
4650 *ret = sd->user_agent;
4651}
4652
4653EAPI void
4654elm_map_source_set(Evas_Object *obj,
4655 Elm_Map_Source_Type type,
4656 const char *source_name)
4657{
4658 ELM_MAP_CHECK(obj);
4659 eo_do(obj, elm_obj_map_source_set(type, source_name));
4660} 4294}
4661 4295
4662static void 4296EOLIAN static void
4663_source_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list) 4297_elm_map_source_set(Eo *obj EINA_UNUSED, Elm_Map_Data *sd, Elm_Map_Source_Type type, const char *source_name)
4664{ 4298{
4665 Elm_Map_Source_Type type = va_arg(*list, Elm_Map_Source_Type);
4666 const char *source_name = va_arg(*list, const char *);
4667 Elm_Map_Smart_Data *sd = _pd;
4668 EINA_SAFETY_ON_NULL_RETURN(source_name); 4299 EINA_SAFETY_ON_NULL_RETURN(source_name);
4669 4300
4670 if (type == ELM_MAP_SOURCE_TYPE_TILE) _source_tile_set(sd, source_name); 4301 if (type == ELM_MAP_SOURCE_TYPE_TILE) _source_tile_set(sd, source_name);
@@ -4676,99 +4307,49 @@ _source_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4676 4307
4677} 4308}
4678 4309
4679EAPI const char * 4310EOLIAN static const char*
4680elm_map_source_get(const Evas_Object *obj, 4311_elm_map_source_get(Eo *obj EINA_UNUSED, Elm_Map_Data *sd, Elm_Map_Source_Type type)
4681 Elm_Map_Source_Type type)
4682{
4683 ELM_MAP_CHECK(obj) NULL;
4684 const char *ret = NULL;
4685 eo_do((Eo *) obj, elm_obj_map_source_get(type, &ret));
4686 return ret;
4687}
4688
4689static void
4690_source_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4691{ 4312{
4692 Elm_Map_Source_Type type = va_arg(*list, Elm_Map_Source_Type); 4313 EINA_SAFETY_ON_NULL_RETURN_VAL(sd->src_tile, NULL);
4693 const char **ret = va_arg(*list, const char **);
4694 *ret = NULL;
4695 Elm_Map_Smart_Data *sd = _pd;
4696
4697 EINA_SAFETY_ON_NULL_RETURN(sd->src_tile);
4698 4314
4699 if (type == ELM_MAP_SOURCE_TYPE_TILE) *ret = sd->src_tile->name; 4315 if (type == ELM_MAP_SOURCE_TYPE_TILE) return sd->src_tile->name;
4700 else if (type == ELM_MAP_SOURCE_TYPE_ROUTE) 4316 else if (type == ELM_MAP_SOURCE_TYPE_ROUTE)
4701 *ret = sd->src_route->name; 4317 return sd->src_route->name;
4702 else if (type == ELM_MAP_SOURCE_TYPE_NAME) 4318 else if (type == ELM_MAP_SOURCE_TYPE_NAME)
4703 *ret = sd->src_name->name; 4319 return sd->src_name->name;
4704 else ERR("Not supported map source type: %d", type); 4320 else ERR("Not supported map source type: %d", type);
4321 return NULL;
4705} 4322}
4706 4323
4707EAPI const char ** 4324EOLIAN static const char**
4708elm_map_sources_get(const Evas_Object *obj, 4325_elm_map_sources_get(Eo *obj EINA_UNUSED, Elm_Map_Data *sd, Elm_Map_Source_Type type)
4709 Elm_Map_Source_Type type)
4710{
4711 ELM_MAP_CHECK(obj) NULL;
4712 const char **ret = NULL;
4713 eo_do((Eo *) obj, elm_obj_map_sources_get(type, &ret));
4714 return ret;
4715}
4716
4717static void
4718_sources_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4719{ 4326{
4720 Elm_Map_Source_Type type = va_arg(*list, Elm_Map_Source_Type); 4327 const char **ret;
4721 const char ***ret = va_arg(*list, const char ***); 4328 ret = NULL;
4722 *ret = NULL;
4723 Elm_Map_Smart_Data *sd = _pd;
4724 4329
4725 if (type == ELM_MAP_SOURCE_TYPE_TILE) *ret = sd->src_tile_names; 4330 if (type == ELM_MAP_SOURCE_TYPE_TILE) ret = sd->src_tile_names;
4726 else if (type == ELM_MAP_SOURCE_TYPE_ROUTE) 4331 else if (type == ELM_MAP_SOURCE_TYPE_ROUTE)
4727 *ret = sd->src_route_names; 4332 ret = sd->src_route_names;
4728 else if (type == ELM_MAP_SOURCE_TYPE_NAME) 4333 else if (type == ELM_MAP_SOURCE_TYPE_NAME)
4729 *ret = sd->src_name_names; 4334 ret = sd->src_name_names;
4730 else ERR("Not supported map source type: %d", type); 4335 else ERR("Not supported map source type: %d", type);
4731}
4732 4336
4733EAPI Elm_Map_Route *
4734elm_map_route_add(Evas_Object *obj,
4735 Elm_Map_Route_Type type,
4736 Elm_Map_Route_Method method,
4737 double flon,
4738 double flat,
4739 double tlon,
4740 double tlat,
4741 Elm_Map_Route_Cb route_cb,
4742 void *data)
4743{
4744 ELM_MAP_CHECK(obj) NULL;
4745 Elm_Map_Route *ret = NULL;
4746 eo_do(obj, elm_obj_map_route_add(type, method, flon, flat, tlon, tlat, route_cb, data, &ret));
4747 return ret; 4337 return ret;
4748} 4338}
4749 4339
4750static void 4340EOLIAN static Elm_Map_Route*
4751_route_add(Eo *obj, void *_pd, va_list *list) 4341_elm_map_route_add(Eo *obj, Elm_Map_Data *sd, Elm_Map_Route_Type type, Elm_Map_Route_Method method, double flon, double flat, double tlon, double tlat, Elm_Map_Route_Cb route_cb, void *data)
4752{ 4342{
4753 Elm_Map_Route_Type type = va_arg(*list, Elm_Map_Route_Type); 4343 Elm_Map_Route *ret;
4754 Elm_Map_Route_Method method = va_arg(*list, Elm_Map_Route_Method); 4344 ret = NULL;
4755 double flon = va_arg(*list, double);
4756 double flat = va_arg(*list, double);
4757 double tlon = va_arg(*list, double);
4758 double tlat = va_arg(*list, double);
4759 Elm_Map_Route_Cb route_cb = va_arg(*list, Elm_Map_Route_Cb);
4760 void *data = va_arg(*list, void *);
4761 Elm_Map_Route **ret = va_arg(*list, Elm_Map_Route **);
4762 *ret = NULL;
4763 char *url; 4345 char *url;
4764 char *type_name; 4346 char *type_name;
4765 Elm_Map_Route *route; 4347 Elm_Map_Route *route;
4766 char fname[PATH_MAX], fname2[PATH_MAX]; 4348 char fname[PATH_MAX], fname2[PATH_MAX];
4767 4349
4768 Elm_Map_Smart_Data *sd = _pd; 4350 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, NULL);
4769 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
4770 4351
4771 EINA_SAFETY_ON_NULL_RETURN(sd->src_route); 4352 EINA_SAFETY_ON_NULL_RETURN_VAL(sd->src_route, NULL);
4772 4353
4773 { 4354 {
4774 snprintf(fname, sizeof(fname), "%s" CACHE_ROUTE_ROOT, 4355 snprintf(fname, sizeof(fname), "%s" CACHE_ROUTE_ROOT,
@@ -4789,7 +4370,7 @@ _route_add(Eo *obj, void *_pd, va_list *list)
4789 { 4370 {
4790 ERR("Route URL is NULL"); 4371 ERR("Route URL is NULL");
4791 free(type_name); 4372 free(type_name);
4792 return; 4373 return ret;
4793 } 4374 }
4794 free(type_name); 4375 free(type_name);
4795 4376
@@ -4812,7 +4393,7 @@ _route_add(Eo *obj, void *_pd, va_list *list)
4812 ERR("Can't request Route from %s to %s", url, route->fname); 4393 ERR("Can't request Route from %s to %s", url, route->fname);
4813 free(route->fname); 4394 free(route->fname);
4814 free(route); 4395 free(route);
4815 return; 4396 return ret;
4816 } 4397 }
4817 INF("Route requested from %s to %s", url, route->fname); 4398 INF("Route requested from %s to %s", url, route->fname);
4818 free(url); 4399 free(url);
@@ -4822,7 +4403,9 @@ _route_add(Eo *obj, void *_pd, va_list *list)
4822 (sd->obj, SIG_ROUTE_LOAD, route); 4403 (sd->obj, SIG_ROUTE_LOAD, route);
4823 edje_object_signal_emit(wd->resize_obj, 4404 edje_object_signal_emit(wd->resize_obj,
4824 "elm,state,busy,start", "elm"); 4405 "elm,state,busy,start", "elm");
4825 *ret = route; 4406 ret = route;
4407
4408 return ret;
4826} 4409}
4827 4410
4828EAPI void 4411EAPI void
@@ -4880,34 +4463,14 @@ elm_map_route_waypoint_get(const Elm_Map_Route *route)
4880 return route->info.waypoints; 4463 return route->info.waypoints;
4881} 4464}
4882 4465
4883EAPI Elm_Map_Name * 4466EOLIAN static Elm_Map_Name*
4884elm_map_name_add(const Evas_Object *obj, 4467_elm_map_name_add(Eo *obj, Elm_Map_Data *_pd EINA_UNUSED, const char *address, double lon, double lat, Elm_Map_Name_Cb name_cb, void *data)
4885 const char *address,
4886 double lon,
4887 double lat,
4888 Elm_Map_Name_Cb name_cb,
4889 void *data)
4890{ 4468{
4891 ELM_MAP_CHECK(obj) NULL;
4892 Elm_Map_Name *ret = NULL;
4893 eo_do((Eo *) obj, elm_obj_map_name_add(address, lon, lat, name_cb, data, &ret));
4894 return ret;
4895}
4896
4897static void
4898_name_add(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
4899{
4900 const char *address = va_arg(*list, const char *);
4901 double lon = va_arg(*list, double);
4902 double lat = va_arg(*list, double);
4903 Elm_Map_Name_Cb name_cb = va_arg(*list, Elm_Map_Name_Cb);
4904 void *data = va_arg(*list, void *);
4905 Elm_Map_Name **ret = va_arg(*list, Elm_Map_Name **);
4906 if (address) 4469 if (address)
4907 *ret = _name_request(obj, ELM_MAP_NAME_METHOD_SEARCH, address, 0, 0, 4470 return _name_request(obj, ELM_MAP_NAME_METHOD_SEARCH, address, 0, 0,
4908 name_cb, data); 4471 name_cb, data);
4909 else 4472 else
4910 *ret = _name_request(obj, ELM_MAP_NAME_METHOD_REVERSE, NULL, lon, lat, 4473 return _name_request(obj, ELM_MAP_NAME_METHOD_REVERSE, NULL, lon, lat,
4911 name_cb, data); 4474 name_cb, data);
4912} 4475}
4913 4476
@@ -4965,27 +4528,11 @@ elm_map_name_region_get(const Elm_Map_Name *name,
4965 if (lat) *lat = name->lat; 4528 if (lat) *lat = name->lat;
4966} 4529}
4967 4530
4968EAPI Elm_Map_Overlay * 4531EOLIAN static Elm_Map_Overlay*
4969elm_map_overlay_add(Evas_Object *obj, 4532_elm_map_overlay_add(Eo *obj EINA_UNUSED, Elm_Map_Data *sd, double lon, double lat)
4970 double lon,
4971 double lat)
4972{
4973 ELM_MAP_CHECK(obj) NULL;
4974 Elm_Map_Overlay *ret = NULL;
4975 eo_do(obj, elm_obj_map_overlay_add(lon, lat, &ret));
4976 return ret;
4977}
4978
4979static void
4980_overlay_add(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4981{ 4533{
4982 double lon = va_arg(*list, double);
4983 double lat = va_arg(*list, double);
4984 Elm_Map_Overlay **ret = va_arg(*list, Elm_Map_Overlay **);
4985 Elm_Map_Overlay *overlay; 4534 Elm_Map_Overlay *overlay;
4986 4535
4987 Elm_Map_Smart_Data *sd = _pd;
4988
4989 overlay = ELM_NEW(Elm_Map_Overlay); 4536 overlay = ELM_NEW(Elm_Map_Overlay);
4990 overlay->wsd = sd; 4537 overlay->wsd = sd;
4991 overlay->type = ELM_MAP_OVERLAY_TYPE_DEFAULT; 4538 overlay->type = ELM_MAP_OVERLAY_TYPE_DEFAULT;
@@ -4999,27 +4546,15 @@ _overlay_add(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4999 4546
5000 evas_object_smart_changed(sd->pan_obj); 4547 evas_object_smart_changed(sd->pan_obj);
5001 4548
5002 *ret = overlay; 4549 return overlay;
5003}
5004
5005EAPI Eina_List *
5006elm_map_overlays_get(Evas_Object *obj)
5007{
5008 ELM_MAP_CHECK(obj) NULL;
5009 Eina_List *ret = NULL;
5010 eo_do(obj, elm_obj_map_overlays_get(&ret));
5011 return ret;
5012} 4550}
5013 4551
5014static void 4552EOLIAN static Eina_List *
5015_overlays_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list) 4553_elm_map_overlays_get(Eo *obj EINA_UNUSED, Elm_Map_Data *sd)
5016{ 4554{
5017 Eina_List **ret = va_arg(*list, Eina_List **);
5018 Eina_List *l; 4555 Eina_List *l;
5019 Elm_Map_Overlay *ovl; 4556 Elm_Map_Overlay *ovl;
5020 4557
5021 Elm_Map_Smart_Data *sd = _pd;
5022
5023 sd->all_overlays = eina_list_free(sd->all_overlays); 4558 sd->all_overlays = eina_list_free(sd->all_overlays);
5024 4559
5025 EINA_LIST_FOREACH(sd->overlays, l, ovl) 4560 EINA_LIST_FOREACH(sd->overlays, l, ovl)
@@ -5027,7 +4562,7 @@ _overlays_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
5027 EINA_LIST_FOREACH(sd->group_overlays, l, ovl) 4562 EINA_LIST_FOREACH(sd->group_overlays, l, ovl)
5028 sd->all_overlays = eina_list_append(sd->all_overlays, ovl); 4563 sd->all_overlays = eina_list_append(sd->all_overlays, ovl);
5029 4564
5030 *ret = sd->all_overlays; 4565 return sd->all_overlays;
5031} 4566}
5032 4567
5033EAPI void 4568EAPI void
@@ -5464,23 +4999,11 @@ elm_map_overlay_del_cb_set(Elm_Map_Overlay *overlay,
5464 overlay->del_cb_data = data; 4999 overlay->del_cb_data = data;
5465} 5000}
5466 5001
5467EAPI Elm_Map_Overlay * 5002EOLIAN static Elm_Map_Overlay*
5468elm_map_overlay_class_add(Evas_Object *obj) 5003_elm_map_overlay_class_add(Eo *obj EINA_UNUSED, Elm_Map_Data *sd)
5469{
5470 ELM_MAP_CHECK(obj) NULL;
5471 Elm_Map_Overlay *ret = NULL;
5472 eo_do(obj, elm_obj_map_overlay_class_add(&ret));
5473 return ret;
5474}
5475
5476static void
5477_overlay_class_add(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
5478{ 5004{
5479 Elm_Map_Overlay **ret = va_arg(*list, Elm_Map_Overlay **);
5480 Elm_Map_Overlay *overlay; 5005 Elm_Map_Overlay *overlay;
5481 5006
5482 Elm_Map_Smart_Data *sd = _pd;
5483
5484 overlay = ELM_NEW(Elm_Map_Overlay); 5007 overlay = ELM_NEW(Elm_Map_Overlay);
5485 overlay->wsd = sd; 5008 overlay->wsd = sd;
5486 overlay->type = ELM_MAP_OVERLAY_TYPE_CLASS; 5009 overlay->type = ELM_MAP_OVERLAY_TYPE_CLASS;
@@ -5492,7 +5015,7 @@ _overlay_class_add(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
5492 sd->overlays = eina_list_append(sd->overlays, overlay); 5015 sd->overlays = eina_list_append(sd->overlays, overlay);
5493 5016
5494 evas_object_smart_changed(sd->pan_obj); 5017 evas_object_smart_changed(sd->pan_obj);
5495 *ret = overlay; 5018 return overlay;
5496} 5019}
5497 5020
5498EAPI void 5021EAPI void
@@ -5608,23 +5131,11 @@ elm_map_overlay_group_members_get(const Elm_Map_Overlay *grp)
5608 return ovl->members; 5131 return ovl->members;
5609} 5132}
5610 5133
5611EAPI Elm_Map_Overlay * 5134EOLIAN static Elm_Map_Overlay*
5612elm_map_overlay_bubble_add(Evas_Object *obj) 5135_elm_map_overlay_bubble_add(Eo *obj EINA_UNUSED, Elm_Map_Data *sd)
5613{ 5136{
5614 ELM_MAP_CHECK(obj) NULL;
5615 Elm_Map_Overlay *ret = NULL;
5616 eo_do(obj, elm_obj_map_overlay_bubble_add(&ret));
5617 return ret;
5618}
5619
5620static void
5621_overlay_bubble_add(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
5622{
5623 Elm_Map_Overlay **ret = va_arg(*list, Elm_Map_Overlay **);
5624 Elm_Map_Overlay *overlay; 5137 Elm_Map_Overlay *overlay;
5625 5138
5626 Elm_Map_Smart_Data *sd = _pd;
5627
5628 overlay = ELM_NEW(Elm_Map_Overlay); 5139 overlay = ELM_NEW(Elm_Map_Overlay);
5629 overlay->wsd = sd; 5140 overlay->wsd = sd;
5630 overlay->type = ELM_MAP_OVERLAY_TYPE_BUBBLE; 5141 overlay->type = ELM_MAP_OVERLAY_TYPE_BUBBLE;
@@ -5637,7 +5148,7 @@ _overlay_bubble_add(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
5637 sd->overlays = eina_list_append(sd->overlays, overlay); 5148 sd->overlays = eina_list_append(sd->overlays, overlay);
5638 5149
5639 evas_object_smart_changed(sd->pan_obj); 5150 evas_object_smart_changed(sd->pan_obj);
5640 *ret = overlay; 5151 return overlay;
5641} 5152}
5642 5153
5643EAPI void 5154EAPI void
@@ -5692,30 +5203,15 @@ elm_map_overlay_bubble_content_clear(Elm_Map_Overlay *bubble)
5692 evas_object_smart_changed(bubble->wsd->pan_obj); 5203 evas_object_smart_changed(bubble->wsd->pan_obj);
5693} 5204}
5694 5205
5695EAPI Elm_Map_Overlay * 5206EOLIAN static Elm_Map_Overlay*
5696elm_map_overlay_route_add(Evas_Object *obj, 5207_elm_map_overlay_route_add(Eo *obj, Elm_Map_Data *sd, const Elm_Map_Route *route)
5697 const Elm_Map_Route *route)
5698{ 5208{
5699 ELM_MAP_CHECK(obj) NULL;
5700 Elm_Map_Overlay *ret = NULL;
5701 eo_do(obj, elm_obj_map_overlay_route_add(route, &ret));
5702 return ret;
5703}
5704
5705static void
5706_overlay_route_add(Eo *obj, void *_pd, va_list *list)
5707{
5708 const Elm_Map_Route *route = va_arg(*list, const Elm_Map_Route *);
5709 Elm_Map_Overlay **ret = va_arg(*list, Elm_Map_Overlay **);
5710 *ret = NULL;
5711 Elm_Map_Overlay *overlay; 5209 Elm_Map_Overlay *overlay;
5712 5210
5713 Elm_Map_Smart_Data *sd = _pd; 5211 EINA_SAFETY_ON_NULL_RETURN_VAL(route, NULL);
5714 5212 EINA_SAFETY_ON_NULL_RETURN_VAL(route->wsd, NULL);
5715 EINA_SAFETY_ON_NULL_RETURN(route); 5213 EINA_SAFETY_ON_FALSE_RETURN_VAL
5716 EINA_SAFETY_ON_NULL_RETURN(route->wsd); 5214 (obj == (route->wsd)->obj, NULL);
5717 EINA_SAFETY_ON_FALSE_RETURN
5718 (obj == (route->wsd)->obj);
5719 5215
5720 overlay = ELM_NEW(Elm_Map_Overlay); 5216 overlay = ELM_NEW(Elm_Map_Overlay);
5721 overlay->wsd = sd; 5217 overlay->wsd = sd;
@@ -5729,34 +5225,14 @@ _overlay_route_add(Eo *obj, void *_pd, va_list *list)
5729 sd->overlays = eina_list_append(sd->overlays, overlay); 5225 sd->overlays = eina_list_append(sd->overlays, overlay);
5730 5226
5731 evas_object_smart_changed(sd->pan_obj); 5227 evas_object_smart_changed(sd->pan_obj);
5732 *ret = overlay; 5228 return overlay;
5733} 5229}
5734 5230
5735EAPI Elm_Map_Overlay * 5231EOLIAN static Elm_Map_Overlay*
5736elm_map_overlay_line_add(Evas_Object *obj, 5232_elm_map_overlay_line_add(Eo *obj EINA_UNUSED, Elm_Map_Data *sd, double flon, double flat, double tlon, double tlat)
5737 double flon,
5738 double flat,
5739 double tlon,
5740 double tlat)
5741{ 5233{
5742 ELM_MAP_CHECK(obj) NULL;
5743 Elm_Map_Overlay *ret = NULL;
5744 eo_do(obj, elm_obj_map_overlay_line_add(flon, flat, tlon, tlat, &ret));
5745 return ret;
5746}
5747
5748static void
5749_overlay_line_add(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
5750{
5751 double flon = va_arg(*list, double);
5752 double flat = va_arg(*list, double);
5753 double tlon = va_arg(*list, double);
5754 double tlat = va_arg(*list, double);
5755 Elm_Map_Overlay **ret = va_arg(*list, Elm_Map_Overlay **);
5756 Elm_Map_Overlay *overlay; 5234 Elm_Map_Overlay *overlay;
5757 5235
5758 Elm_Map_Smart_Data *sd = _pd;
5759
5760 overlay = ELM_NEW(Elm_Map_Overlay); 5236 overlay = ELM_NEW(Elm_Map_Overlay);
5761 overlay->wsd = sd; 5237 overlay->wsd = sd;
5762 overlay->type = ELM_MAP_OVERLAY_TYPE_LINE; 5238 overlay->type = ELM_MAP_OVERLAY_TYPE_LINE;
@@ -5769,26 +5245,14 @@ _overlay_line_add(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
5769 sd->overlays = eina_list_append(sd->overlays, overlay); 5245 sd->overlays = eina_list_append(sd->overlays, overlay);
5770 5246
5771 evas_object_smart_changed(sd->pan_obj); 5247 evas_object_smart_changed(sd->pan_obj);
5772 *ret = overlay; 5248 return overlay;
5773}
5774
5775EAPI Elm_Map_Overlay *
5776elm_map_overlay_polygon_add(Evas_Object *obj)
5777{
5778 ELM_MAP_CHECK(obj) NULL;
5779 Elm_Map_Overlay *ret = NULL;
5780 eo_do(obj, elm_obj_map_overlay_polygon_add(&ret));
5781 return ret;
5782} 5249}
5783 5250
5784static void 5251EOLIAN static Elm_Map_Overlay*
5785_overlay_polygon_add(Eo *obj EINA_UNUSED, void *_pd, va_list *list) 5252_elm_map_overlay_polygon_add(Eo *obj EINA_UNUSED, Elm_Map_Data *sd)
5786{ 5253{
5787 Elm_Map_Overlay **ret = va_arg(*list, Elm_Map_Overlay **);
5788 Elm_Map_Overlay *overlay; 5254 Elm_Map_Overlay *overlay;
5789 5255
5790 Elm_Map_Smart_Data *sd = _pd;
5791
5792 overlay = ELM_NEW(Elm_Map_Overlay); 5256 overlay = ELM_NEW(Elm_Map_Overlay);
5793 overlay->wsd = sd; 5257 overlay->wsd = sd;
5794 overlay->type = ELM_MAP_OVERLAY_TYPE_POLYGON; 5258 overlay->type = ELM_MAP_OVERLAY_TYPE_POLYGON;
@@ -5800,7 +5264,7 @@ _overlay_polygon_add(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
5800 overlay->grp = _overlay_group_new(sd); 5264 overlay->grp = _overlay_group_new(sd);
5801 sd->overlays = eina_list_append(sd->overlays, overlay); 5265 sd->overlays = eina_list_append(sd->overlays, overlay);
5802 evas_object_smart_changed(sd->pan_obj); 5266 evas_object_smart_changed(sd->pan_obj);
5803 *ret = overlay; 5267 return overlay;
5804} 5268}
5805 5269
5806EAPI void 5270EAPI void
@@ -5824,29 +5288,11 @@ elm_map_overlay_polygon_region_add(Elm_Map_Overlay *overlay,
5824 evas_object_smart_changed(ovl->wsd->pan_obj); 5288 evas_object_smart_changed(ovl->wsd->pan_obj);
5825} 5289}
5826 5290
5827EAPI Elm_Map_Overlay * 5291EOLIAN static Elm_Map_Overlay*
5828elm_map_overlay_circle_add(Evas_Object *obj, 5292_elm_map_overlay_circle_add(Eo *obj EINA_UNUSED, Elm_Map_Data *sd, double lon, double lat, double radius)
5829 double lon,
5830 double lat,
5831 double radius)
5832{
5833 ELM_MAP_CHECK(obj) NULL;
5834 Elm_Map_Overlay *ret = NULL;
5835 eo_do(obj, elm_obj_map_overlay_circle_add(lon, lat, radius, &ret));
5836 return ret;
5837}
5838
5839static void
5840_overlay_circle_add(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
5841{ 5293{
5842 double lon = va_arg(*list, double);
5843 double lat = va_arg(*list, double);
5844 double radius = va_arg(*list, double);
5845 Elm_Map_Overlay **ret = va_arg(*list, Elm_Map_Overlay **);
5846 Elm_Map_Overlay *overlay; 5294 Elm_Map_Overlay *overlay;
5847 5295
5848 Elm_Map_Smart_Data *sd = _pd;
5849
5850 overlay = ELM_NEW(Elm_Map_Overlay); 5296 overlay = ELM_NEW(Elm_Map_Overlay);
5851 overlay->wsd = sd; 5297 overlay->wsd = sd;
5852 overlay->type = ELM_MAP_OVERLAY_TYPE_CIRCLE; 5298 overlay->type = ELM_MAP_OVERLAY_TYPE_CIRCLE;
@@ -5859,30 +5305,14 @@ _overlay_circle_add(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
5859 sd->overlays = eina_list_append(sd->overlays, overlay); 5305 sd->overlays = eina_list_append(sd->overlays, overlay);
5860 5306
5861 evas_object_smart_changed(sd->pan_obj); 5307 evas_object_smart_changed(sd->pan_obj);
5862 *ret = overlay; 5308 return overlay;
5863} 5309}
5864 5310
5865EAPI Elm_Map_Overlay * 5311EOLIAN static Elm_Map_Overlay*
5866elm_map_overlay_scale_add(Evas_Object *obj, 5312_elm_map_overlay_scale_add(Eo *obj EINA_UNUSED, Elm_Map_Data *sd, Evas_Coord x, Evas_Coord y)
5867 Evas_Coord x,
5868 Evas_Coord y)
5869{ 5313{
5870 ELM_MAP_CHECK(obj) NULL;
5871 Elm_Map_Overlay *ret = NULL;
5872 eo_do(obj, elm_obj_map_overlay_scale_add(x, y, &ret));
5873 return ret;
5874}
5875
5876static void
5877_overlay_scale_add(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
5878{
5879 Evas_Coord x = va_arg(*list, Evas_Coord);
5880 Evas_Coord y = va_arg(*list, Evas_Coord);
5881 Elm_Map_Overlay **ret = va_arg(*list, Elm_Map_Overlay **);
5882 Elm_Map_Overlay *overlay; 5314 Elm_Map_Overlay *overlay;
5883 5315
5884 Elm_Map_Smart_Data *sd = _pd;
5885
5886 overlay = ELM_NEW(Elm_Map_Overlay); 5316 overlay = ELM_NEW(Elm_Map_Overlay);
5887 overlay->wsd = sd; 5317 overlay->wsd = sd;
5888 overlay->type = ELM_MAP_OVERLAY_TYPE_SCALE; 5318 overlay->type = ELM_MAP_OVERLAY_TYPE_SCALE;
@@ -5895,195 +5325,46 @@ _overlay_scale_add(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
5895 sd->overlays = eina_list_append(sd->overlays, overlay); 5325 sd->overlays = eina_list_append(sd->overlays, overlay);
5896 5326
5897 evas_object_smart_changed(sd->pan_obj); 5327 evas_object_smart_changed(sd->pan_obj);
5898 *ret = overlay; 5328 return overlay;
5899}
5900
5901#ifdef ELM_EMAP
5902EAPI Evas_Object *
5903elm_map_track_add(Evas_Object *obj,
5904 void *emap)
5905{
5906 ELM_MAP_CHECK(obj) NULL;
5907 Evas_Object *ret = NULL;
5908 eo_do(obj, elm_obj_map_track_add(emap, &ret));
5909 return ret;
5910}
5911
5912EAPI void
5913elm_map_track_remove(Evas_Object *obj,
5914 Evas_Object *route)
5915{
5916 ELM_MAP_CHECK(obj);
5917 eo_do(obj, elm_obj_map_track_remove(route));
5918}
5919
5920#else
5921EAPI Evas_Object *
5922elm_map_track_add(Evas_Object *obj EINA_UNUSED,
5923 void *emap EINA_UNUSED)
5924{
5925 return NULL;
5926}
5927
5928EAPI void
5929elm_map_track_remove(Evas_Object *obj EINA_UNUSED,
5930 Evas_Object *route EINA_UNUSED)
5931{
5932} 5329}
5933#endif
5934 5330
5935static void 5331EOLIAN static Evas_Object*
5936_track_add(Eo *obj, void *_pd, va_list *list) 5332_elm_map_track_add(Eo *obj, Elm_Map_Data *sd, void *emap)
5937{ 5333{
5938 void *emap = va_arg(*list, void *);
5939 Evas_Object **ret = va_arg(*list, Evas_Object **);
5940 *ret = NULL;
5941#ifdef ELM_EMAP 5334#ifdef ELM_EMAP
5942 EMap_Route *emapr = emap; 5335 EMap_Route *emapr = emap;
5943 Evas_Object *route; 5336 Evas_Object *route;
5944 5337
5945 Elm_Map_Smart_Data *sd = _pd;
5946
5947 route = elm_route_add(obj); 5338 route = elm_route_add(obj);
5948 elm_route_emap_set(route, emapr); 5339 elm_route_emap_set(route, emapr);
5949 sd->track = eina_list_append(sd->track, route); 5340 sd->track = eina_list_append(sd->track, route);
5950 5341
5951 *ret = route; 5342 return route;
5952#else 5343#else
5953 (void)obj; 5344 (void)obj;
5954 (void)_pd; 5345 (void)sd;
5955 (void)emap; 5346 (void)emap;
5347 return NULL;
5956#endif 5348#endif
5957} 5349}
5958 5350
5959static void 5351EOLIAN static void
5960_track_remove(Eo *obj EINA_UNUSED, void *_pd, va_list *list) 5352_elm_map_track_remove(Eo *obj EINA_UNUSED, Elm_Map_Data *sd, Evas_Object *route)
5961{ 5353{
5962 Evas_Object *route = va_arg(*list, Evas_Object *);
5963#ifdef ELM_EMAP 5354#ifdef ELM_EMAP
5964 Elm_Map_Smart_Data *sd = _pd;
5965
5966 sd->track = eina_list_remove(sd->track, route); 5355 sd->track = eina_list_remove(sd->track, route);
5967 evas_object_del(route); 5356 evas_object_del(route);
5968#else 5357#else
5969 (void)obj; 5358 (void)obj;
5970 (void)_pd; 5359 (void)sd;
5971 (void)route; 5360 (void)route;
5972#endif 5361#endif
5973} 5362}
5974 5363
5975static void 5364static void
5976_class_constructor(Eo_Class *klass) 5365_elm_map_class_constructor(Eo_Class *klass)
5977{ 5366{
5978 const Eo_Op_Func_Description func_desc[] = {
5979 EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_CONSTRUCTOR), _constructor),
5980
5981 EO_OP_FUNC(EVAS_OBJ_SMART_ID(EVAS_OBJ_SMART_SUB_ID_MEMBER_ADD), _elm_map_smart_member_add),
5982 EO_OP_FUNC(EVAS_OBJ_SMART_ID(EVAS_OBJ_SMART_SUB_ID_ADD), _elm_map_smart_add),
5983 EO_OP_FUNC(EVAS_OBJ_SMART_ID(EVAS_OBJ_SMART_SUB_ID_DEL), _elm_map_smart_del),
5984 EO_OP_FUNC(EVAS_OBJ_SMART_ID(EVAS_OBJ_SMART_SUB_ID_RESIZE), _elm_map_smart_resize),
5985 EO_OP_FUNC(EVAS_OBJ_SMART_ID(EVAS_OBJ_SMART_SUB_ID_MOVE), _elm_map_smart_move),
5986
5987 EO_OP_FUNC(ELM_OBJ_WIDGET_ID(ELM_OBJ_WIDGET_SUB_ID_ON_FOCUS), _elm_map_smart_on_focus),
5988 EO_OP_FUNC(ELM_OBJ_WIDGET_ID(ELM_OBJ_WIDGET_SUB_ID_THEME_APPLY), _elm_map_smart_theme),
5989 EO_OP_FUNC(ELM_OBJ_WIDGET_ID(ELM_OBJ_WIDGET_SUB_ID_EVENT), _elm_map_smart_event),
5990
5991 EO_OP_FUNC(ELM_OBJ_MAP_ID(ELM_OBJ_MAP_SUB_ID_ZOOM_SET), _zoom_set),
5992 EO_OP_FUNC(ELM_OBJ_MAP_ID(ELM_OBJ_MAP_SUB_ID_ZOOM_GET), _zoom_get),
5993 EO_OP_FUNC(ELM_OBJ_MAP_ID(ELM_OBJ_MAP_SUB_ID_ZOOM_MODE_SET), _zoom_mode_set_eo),
5994 EO_OP_FUNC(ELM_OBJ_MAP_ID(ELM_OBJ_MAP_SUB_ID_ZOOM_MODE_GET), _zoom_mode_get),
5995 EO_OP_FUNC(ELM_OBJ_MAP_ID(ELM_OBJ_MAP_SUB_ID_ZOOM_MAX_SET), _zoom_max_set),
5996 EO_OP_FUNC(ELM_OBJ_MAP_ID(ELM_OBJ_MAP_SUB_ID_ZOOM_MAX_GET), _zoom_max_get),
5997 EO_OP_FUNC(ELM_OBJ_MAP_ID(ELM_OBJ_MAP_SUB_ID_ZOOM_MIN_SET), _zoom_min_set),
5998 EO_OP_FUNC(ELM_OBJ_MAP_ID(ELM_OBJ_MAP_SUB_ID_ZOOM_MIN_GET), _zoom_min_get),
5999 EO_OP_FUNC(ELM_OBJ_MAP_ID(ELM_OBJ_MAP_SUB_ID_REGION_BRING_IN), _region_bring_in),
6000 EO_OP_FUNC(ELM_OBJ_MAP_ID(ELM_OBJ_MAP_SUB_ID_REGION_SHOW), _region_show),
6001 EO_OP_FUNC(ELM_OBJ_MAP_ID(ELM_OBJ_MAP_SUB_ID_REGION_GET), _region_get),
6002 EO_OP_FUNC(ELM_OBJ_MAP_ID(ELM_OBJ_MAP_SUB_ID_PAUSED_SET), _paused_set),
6003 EO_OP_FUNC(ELM_OBJ_MAP_ID(ELM_OBJ_MAP_SUB_ID_PAUSED_GET), _paused_get),
6004 EO_OP_FUNC(ELM_OBJ_MAP_ID(ELM_OBJ_MAP_SUB_ID_ROTATE_SET), _rotate_set),
6005 EO_OP_FUNC(ELM_OBJ_MAP_ID(ELM_OBJ_MAP_SUB_ID_ROTATE_GET), _rotate_get),
6006 EO_OP_FUNC(ELM_OBJ_MAP_ID(ELM_OBJ_MAP_SUB_ID_WHEEL_DISABLED_SET), _wheel_disabled_set),
6007 EO_OP_FUNC(ELM_OBJ_MAP_ID(ELM_OBJ_MAP_SUB_ID_WHEEL_DISABLED_GET), _wheel_disabled_get),
6008 EO_OP_FUNC(ELM_OBJ_MAP_ID(ELM_OBJ_MAP_SUB_ID_TILE_LOAD_STATUS_GET), _tile_load_status_get),
6009 EO_OP_FUNC(ELM_OBJ_MAP_ID(ELM_OBJ_MAP_SUB_ID_CANVAS_TO_REGION_CONVERT), _canvas_to_region_convert),
6010 EO_OP_FUNC(ELM_OBJ_MAP_ID(ELM_OBJ_MAP_SUB_ID_REGION_TO_CANVAS_CONVERT), _region_to_canvas_convert),
6011 EO_OP_FUNC(ELM_OBJ_MAP_ID(ELM_OBJ_MAP_SUB_ID_USER_AGENT_SET), _user_agent_set),
6012 EO_OP_FUNC(ELM_OBJ_MAP_ID(ELM_OBJ_MAP_SUB_ID_USER_AGENT_GET), _user_agent_get),
6013 EO_OP_FUNC(ELM_OBJ_MAP_ID(ELM_OBJ_MAP_SUB_ID_SOURCE_SET), _source_set),
6014 EO_OP_FUNC(ELM_OBJ_MAP_ID(ELM_OBJ_MAP_SUB_ID_SOURCE_GET), _source_get),
6015 EO_OP_FUNC(ELM_OBJ_MAP_ID(ELM_OBJ_MAP_SUB_ID_SOURCES_GET), _sources_get),
6016 EO_OP_FUNC(ELM_OBJ_MAP_ID(ELM_OBJ_MAP_SUB_ID_ROUTE_ADD), _route_add),
6017 EO_OP_FUNC(ELM_OBJ_MAP_ID(ELM_OBJ_MAP_SUB_ID_NAME_ADD), _name_add),
6018 EO_OP_FUNC(ELM_OBJ_MAP_ID(ELM_OBJ_MAP_SUB_ID_OVERLAY_ADD), _overlay_add),
6019 EO_OP_FUNC(ELM_OBJ_MAP_ID(ELM_OBJ_MAP_SUB_ID_OVERLAYS_GET), _overlays_get),
6020 EO_OP_FUNC(ELM_OBJ_MAP_ID(ELM_OBJ_MAP_SUB_ID_OVERLAY_CLASS_ADD), _overlay_class_add),
6021 EO_OP_FUNC(ELM_OBJ_MAP_ID(ELM_OBJ_MAP_SUB_ID_OVERLAY_BUBBLE_ADD), _overlay_bubble_add),
6022 EO_OP_FUNC(ELM_OBJ_MAP_ID(ELM_OBJ_MAP_SUB_ID_OVERLAY_ROUTE_ADD), _overlay_route_add),
6023 EO_OP_FUNC(ELM_OBJ_MAP_ID(ELM_OBJ_MAP_SUB_ID_OVERLAY_LINE_ADD), _overlay_line_add),
6024 EO_OP_FUNC(ELM_OBJ_MAP_ID(ELM_OBJ_MAP_SUB_ID_OVERLAY_POLYGON_ADD), _overlay_polygon_add),
6025 EO_OP_FUNC(ELM_OBJ_MAP_ID(ELM_OBJ_MAP_SUB_ID_OVERLAY_CIRCLE_ADD), _overlay_circle_add),
6026 EO_OP_FUNC(ELM_OBJ_MAP_ID(ELM_OBJ_MAP_SUB_ID_OVERLAY_SCALE_ADD), _overlay_scale_add),
6027 EO_OP_FUNC(ELM_OBJ_MAP_ID(ELM_OBJ_MAP_SUB_ID_TRACK_ADD), _track_add),
6028 EO_OP_FUNC(ELM_OBJ_MAP_ID(ELM_OBJ_MAP_SUB_ID_TRACK_REMOVE), _track_remove),
6029 EO_OP_FUNC_SENTINEL
6030 };
6031 eo_class_funcs_set(klass, func_desc);
6032
6033 evas_smart_legacy_type_register(MY_CLASS_NAME_LEGACY, klass); 5367 evas_smart_legacy_type_register(MY_CLASS_NAME_LEGACY, klass);
6034} 5368}
6035 5369
6036static const Eo_Op_Description op_desc[] = { 5370#include "elm_map.eo.c"
6037 EO_OP_DESCRIPTION(ELM_OBJ_MAP_SUB_ID_ZOOM_SET, "Set the zoom level of the map."),
6038 EO_OP_DESCRIPTION(ELM_OBJ_MAP_SUB_ID_ZOOM_GET, "Get the zoom level of the map."),
6039 EO_OP_DESCRIPTION(ELM_OBJ_MAP_SUB_ID_ZOOM_MODE_SET, "Set the zoom mode used by the map object."),
6040 EO_OP_DESCRIPTION(ELM_OBJ_MAP_SUB_ID_ZOOM_MODE_GET, "Get the zoom mode used by the map object."),
6041 EO_OP_DESCRIPTION(ELM_OBJ_MAP_SUB_ID_ZOOM_MAX_SET, "Set the maximum zoom of the source."),
6042 EO_OP_DESCRIPTION(ELM_OBJ_MAP_SUB_ID_ZOOM_MAX_GET, "Get the maximum zoom of the source."),
6043 EO_OP_DESCRIPTION(ELM_OBJ_MAP_SUB_ID_ZOOM_MIN_SET, "Set the minimum zoom of the source."),
6044 EO_OP_DESCRIPTION(ELM_OBJ_MAP_SUB_ID_ZOOM_MIN_GET, "Get the minimum zoom of the source."),
6045 EO_OP_DESCRIPTION(ELM_OBJ_MAP_SUB_ID_REGION_BRING_IN, "Animatedly bring in given coordinates to the center of the map."),
6046 EO_OP_DESCRIPTION(ELM_OBJ_MAP_SUB_ID_REGION_SHOW, "Show the given coordinates at the center of the map, immediately."),
6047 EO_OP_DESCRIPTION(ELM_OBJ_MAP_SUB_ID_REGION_GET, "Get the current geographic coordinates of the map."),
6048 EO_OP_DESCRIPTION(ELM_OBJ_MAP_SUB_ID_PAUSED_SET, "Pause or unpause the map."),
6049 EO_OP_DESCRIPTION(ELM_OBJ_MAP_SUB_ID_PAUSED_GET, "Get a value whether map is paused or not."),
6050 EO_OP_DESCRIPTION(ELM_OBJ_MAP_SUB_ID_ROTATE_SET, "Rotate the map."),
6051 EO_OP_DESCRIPTION(ELM_OBJ_MAP_SUB_ID_ROTATE_GET, "Get the rotate degree of the map."),
6052 EO_OP_DESCRIPTION(ELM_OBJ_MAP_SUB_ID_WHEEL_DISABLED_SET, "Enable or disable mouse wheel to be used to zoom in / out the map."),
6053 EO_OP_DESCRIPTION(ELM_OBJ_MAP_SUB_ID_WHEEL_DISABLED_GET, "Get a value whether mouse wheel is enabled or not."),
6054 EO_OP_DESCRIPTION(ELM_OBJ_MAP_SUB_ID_TILE_LOAD_STATUS_GET, "Get the information of tile load status."),
6055 EO_OP_DESCRIPTION(ELM_OBJ_MAP_SUB_ID_CANVAS_TO_REGION_CONVERT, "Convert canvas coordinates into geographic coordinates."),
6056 EO_OP_DESCRIPTION(ELM_OBJ_MAP_SUB_ID_REGION_TO_CANVAS_CONVERT, "Convert geographic coordinates (longitude, latitude)."),
6057 EO_OP_DESCRIPTION(ELM_OBJ_MAP_SUB_ID_USER_AGENT_SET, "Set the user agent used by the map object to access routing services."),
6058 EO_OP_DESCRIPTION(ELM_OBJ_MAP_SUB_ID_USER_AGENT_GET, "Get the user agent used by the map object."),
6059 EO_OP_DESCRIPTION(ELM_OBJ_MAP_SUB_ID_SOURCE_SET, "Set the current source of the map for a specific type."),
6060 EO_OP_DESCRIPTION(ELM_OBJ_MAP_SUB_ID_SOURCE_GET, "Get the name of currently used source for a specific type."),
6061 EO_OP_DESCRIPTION(ELM_OBJ_MAP_SUB_ID_SOURCES_GET, "Get the names of available sources for a specific type."),
6062 EO_OP_DESCRIPTION(ELM_OBJ_MAP_SUB_ID_ROUTE_ADD, "Add a new route to the map object."),
6063 EO_OP_DESCRIPTION(ELM_OBJ_MAP_SUB_ID_NAME_ADD, "Request a address or geographic coordinates(longitude, latitude)."),
6064 EO_OP_DESCRIPTION(ELM_OBJ_MAP_SUB_ID_OVERLAY_ADD, "Add a new overlay to the map object."),
6065 EO_OP_DESCRIPTION(ELM_OBJ_MAP_SUB_ID_OVERLAYS_GET, "Return all overlays in the map object."),
6066 EO_OP_DESCRIPTION(ELM_OBJ_MAP_SUB_ID_OVERLAY_CLASS_ADD, "Add a new class overlay to the map object."),
6067 EO_OP_DESCRIPTION(ELM_OBJ_MAP_SUB_ID_OVERLAY_BUBBLE_ADD, "Add a new bubble overlay to the map object."),
6068 EO_OP_DESCRIPTION(ELM_OBJ_MAP_SUB_ID_OVERLAY_ROUTE_ADD, "Add a new route overlay to the map object."),
6069 EO_OP_DESCRIPTION(ELM_OBJ_MAP_SUB_ID_OVERLAY_LINE_ADD, "Add a new line overlay to the map object."),
6070 EO_OP_DESCRIPTION(ELM_OBJ_MAP_SUB_ID_OVERLAY_POLYGON_ADD, "Add a new polygon overlay to the map object."),
6071 EO_OP_DESCRIPTION(ELM_OBJ_MAP_SUB_ID_OVERLAY_CIRCLE_ADD, "Add a new circle overlay to the map object."),
6072 EO_OP_DESCRIPTION(ELM_OBJ_MAP_SUB_ID_OVERLAY_SCALE_ADD, "Add a new scale overlay to the map object."),
6073 EO_OP_DESCRIPTION(ELM_OBJ_MAP_SUB_ID_TRACK_ADD, "Add a track on the map."),
6074 EO_OP_DESCRIPTION(ELM_OBJ_MAP_SUB_ID_TRACK_REMOVE, "Remove a track from the map."),
6075 EO_OP_DESCRIPTION_SENTINEL
6076};
6077
6078static const Eo_Class_Description class_desc = {
6079 EO_VERSION,
6080 MY_CLASS_NAME,
6081 EO_CLASS_TYPE_REGULAR,
6082 EO_CLASS_DESCRIPTION_OPS(&ELM_OBJ_MAP_BASE_ID, op_desc, ELM_OBJ_MAP_SUB_ID_LAST),
6083 NULL,
6084 sizeof(Elm_Map_Smart_Data),
6085 _class_constructor,
6086 NULL
6087};
6088
6089EO_DEFINE_CLASS(elm_obj_map_class_get, &class_desc, ELM_OBJ_WIDGET_CLASS, ELM_INTERFACE_SCROLLABLE_CLASS, NULL);
diff --git a/src/lib/elm_map.eo b/src/lib/elm_map.eo
new file mode 100644
index 000000000..ca7810bcf
--- /dev/null
+++ b/src/lib/elm_map.eo
@@ -0,0 +1,789 @@
1class Elm_Map (Elm_Widget, Elm_Interface_Scrollable)
2{
3 eo_prefix: elm_obj_map;
4 properties {
5 zoom {
6 set {
7 /*@
8 Set the zoom level of the map.
9
10 This sets the zoom level.
11
12 It will respect limits defined by elm_map_zoom_min_set() and
13 elm_map_zoom_max_set().
14
15 By default these values are 0 (world map) and 18 (maximum zoom).
16
17 This function should be used when zoom mode is set to #ELM_MAP_ZOOM_MODE_MANUAL.
18 This is the default mode, and can be set with elm_map_zoom_mode_set().
19
20 @see elm_map_zoom_mode_set()
21 @see elm_map_zoom_get()
22
23 @ingroup Map */
24 }
25 get {
26 /*@
27 Get the zoom level of the map.
28
29 @return The current zoom level.
30
31 This returns the current zoom level of the map object.
32
33 Note that if you set the fill mode to other than #ELM_MAP_ZOOM_MODE_MANUAL
34 (which is the default), the zoom level may be changed at any time by the
35 map object itself to account for map size and map viewport size.
36
37 @see elm_map_zoom_set() for details.
38
39 @ingroup Map */
40 }
41 values {
42 int zoom; /*@ The zoom level to set. */
43 }
44 }
45 paused {
46 set {
47 /*@
48 Pause or unpause the map.
49
50 This sets the paused state to on (@c EINA_TRUE) or off (@c EINA_FALSE)
51 for map.
52
53 The default is off.
54
55 This will stop zooming using animation, changing zoom levels will
56 change instantly. This will stop any existing animations that are running.
57
58 @see elm_map_paused_get()
59
60 @ingroup Map */
61 }
62 get {
63 /*@
64 Get a value whether map is paused or not.
65
66 @return @c EINA_TRUE means map is pause. @c EINA_FALSE indicates
67 it is not.
68
69 This gets the current paused state for the map object.
70
71 @see elm_map_paused_set() for details.
72
73 @ingroup Map */
74 }
75 values {
76 Eina_Bool paused; /*@ Use @c EINA_TRUE to pause the map @p obj or @c EINA_FALSE
77 to unpause it. */
78 }
79 }
80 wheel_disabled {
81 set {
82 /*@
83 Enable or disable mouse wheel to be used to zoom in / out the map.
84
85 Mouse wheel can be used for the user to zoom in or zoom out the map.
86
87 It's disabled by default.
88
89 @see elm_map_wheel_disabled_get()
90
91 @ingroup Map */
92 }
93 get {
94 /*@
95 Get a value whether mouse wheel is enabled or not.
96
97 @return @c EINA_TRUE means map is disabled. @c EINA_FALSE indicates
98 it is enabled.
99
100 Mouse wheel can be used for the user to zoom in or zoom out the map.
101
102 @see elm_map_wheel_disabled_set() for details.
103
104 @ingroup Map */
105 }
106 values {
107 Eina_Bool disabled; /*@ Use @c EINA_TRUE to disable mouse wheel or @c EINA_FALSE
108 to enable it. */
109 }
110 }
111 zoom_min {
112 set {
113 /*@
114 Set the minimum zoom of the source.
115
116 @see elm_map_zoom_min_get() for details.
117
118 @ingroup Map */
119 }
120 get {
121 /*@
122 Get the minimum zoom of the source.
123
124 @return Returns the minimum zoom of the source.
125
126 @see elm_map_zoom_min_set() for details.
127
128 @ingroup Map */
129 }
130 values {
131 int zoom; /*@ New minimum zoom value to be used. */
132 }
133 }
134 rotate {
135 set {
136 /*@
137 Rotate the map.
138
139 @see elm_map_rotate_get()
140
141 @ingroup Map */
142 }
143 get {
144 /*@
145 Get the rotate degree of the map
146
147 @see elm_map_rotate_set() to set map rotation.
148
149 @ingroup Map */
150 }
151 values {
152 double degree; /*@ Angle from 0.0 to 360.0 to rotate around Z axis. */
153 Evas_Coord cx; /*@ Rotation's center horizontal position. */
154 Evas_Coord cy; /*@ Rotation's center vertical position. */
155 }
156 }
157 user_agent {
158 set {
159 /*@
160 Set the user agent used by the map object to access routing services.
161
162 User agent is a client application implementing a network protocol used
163 in communications within a client–server distributed computing system
164
165 The @p user_agent identification string will transmitted in a header
166 field @c User-Agent.
167
168 @see elm_map_user_agent_get()
169
170 @ingroup Map */
171 }
172 get {
173 /*@
174 Get the user agent used by the map object.
175
176 @return The user agent identification string used by the map.
177
178 @see elm_map_user_agent_set() for details.
179
180 @ingroup Map */
181 }
182 values {
183 const char *user_agent; /*@ The user agent to be used by the map. */
184 }
185 }
186 zoom_max {
187 set {
188 /*@
189 Set the maximum zoom of the source.
190
191 @see elm_map_zoom_max_get() for details.
192
193 @ingroup Map */
194 }
195 get {
196 /*@
197 Get the maximum zoom of the source.
198
199 @return Returns the maximum zoom of the source.
200
201 @see elm_map_zoom_max_set() for details.
202
203 @ingroup Map */
204 }
205 values {
206 int zoom; /*@ New maximum zoom value to be used. */
207 }
208 }
209 zoom_mode {
210 set {
211 /*@
212 Set the zoom mode used by the map object.
213
214 This sets the zoom mode to manual or one of the automatic levels.
215 Manual (#ELM_MAP_ZOOM_MODE_MANUAL) means that zoom is set manually by
216 elm_map_zoom_set() and will stay at that level until changed by code
217 or until zoom mode is changed. This is the default mode.
218
219 The Automatic modes will allow the map object to automatically
220 adjust zoom mode based on properties. #ELM_MAP_ZOOM_MODE_AUTO_FIT will
221 adjust zoom so the map fits inside the scroll frame with no pixels
222 outside this area. #ELM_MAP_ZOOM_MODE_AUTO_FILL will be similar but
223 ensure no pixels within the frame are left unfilled. Do not forget that
224 the valid sizes are 2^zoom, consequently the map may be smaller than
225 the scroller view.
226
227 @see elm_map_zoom_set()
228
229 @ingroup Map */
230 }
231 get {
232 /*@
233 Get the zoom mode used by the map object.
234
235 @return The zoom mode of the map, being it one of #ELM_MAP_ZOOM_MODE_MANUAL
236 (default), #ELM_MAP_ZOOM_MODE_AUTO_FIT, or #ELM_MAP_ZOOM_MODE_AUTO_FILL.
237
238 This function returns the current zoom mode used by the map object.
239
240 @see elm_map_zoom_mode_set() for more details.
241
242 @ingroup Map */
243 }
244 values {
245 Elm_Map_Zoom_Mode mode; /*@ The zoom mode of the map, being it one of #ELM_MAP_ZOOM_MODE_MANUAL
246 (default), #ELM_MAP_ZOOM_MODE_AUTO_FIT, or #ELM_MAP_ZOOM_MODE_AUTO_FILL. */
247 }
248 }
249 region {
250 get {
251 /*@
252 Get the current geographic coordinates of the map.
253
254 This gets the current center coordinates of the map object. It can be
255 set by elm_map_region_bring_in() and elm_map_region_show().
256
257 @see elm_map_region_bring_in()
258 @see elm_map_region_show()
259
260 @ingroup Map */
261 }
262 values {
263 double lon; /*@ Pointer to store longitude. */
264 double lat; /*@ Pointer to store latitude. */
265 }
266 }
267 overlays {
268 get {
269 /*@
270 Return all overlays in the map object.
271
272 @return The list of all overlays or @c NULL upon failure.
273
274 This list includes group overlays also.
275 So this can be changed dynamically while zooming and panning.
276
277 @since 1.7
278
279 @ingroup Map */
280 return Eina_List *;
281 }
282 }
283 tile_load_status {
284 get {
285 /*@
286 Get the information of tile load status.
287
288 This gets the current tile loaded status for the map object.
289
290 @ingroup Map */
291 }
292 values {
293 int try_num; /*@ Pointer to store number of tiles download requested. */
294 int finish_num; /*@ Pointer to store number of tiles successfully downloaded. */
295 }
296 }
297 }
298 methods {
299 source_set {
300 /*@
301 Set the current source of the map for a specific type.
302
303 Map widget retrieves tile images that composes the map from a web service.
304 This web service can be set with this method
305 for ELM_MAP_SOURCE_TYPE_TILE type.
306 A different service can return a different maps with different
307 information and it can use different zoom values.
308
309 Map widget provides route data based on a external web service.
310 This web service can be set with this method
311 for ELM_MAP_SOURCE_TYPE_ROUTE type.
312
313 Map widget also provide geoname data based on a external web service.
314 This web service can be set with this method
315 for ELM_MAP_SOURCE_TYPE_NAME type.
316
317 The @p source_name need to match one of the names provided by
318 elm_map_sources_get().
319
320 The current source can be get using elm_map_source_get().
321
322 @see elm_map_sources_get()
323 @see elm_map_source_get()
324
325 @ingroup Map */
326
327 params {
328 @in Elm_Map_Source_Type type; /*@ source type. */
329 @in const char *source_name; /*@ The source to be used. */
330 }
331 }
332 source_get {
333 /*@
334 Get the name of currently used source for a specific type.
335
336 @return Returns the name of the source in use.
337
338 @see elm_map_sources_get()
339 @see elm_map_source_set()
340
341 @ingroup Map */
342
343 const;
344 return const char *;
345 params {
346 @in Elm_Map_Source_Type type; /*@ source type. */
347 }
348 }
349 route_add {
350 /*@
351 Add a new route to the map object.
352
353 @return The created route or @c NULL upon failure.
354
355 A route will be traced by point on coordinates (@p flat, @p flon)
356 to point on coordinates (@p tlat, @p tlon), using the route service
357 set with elm_map_source_set().
358
359 It will take @p type on consideration to define the route,
360 depending if the user will be walking or driving, the route may vary.
361 One of #ELM_MAP_ROUTE_TYPE_MOTOCAR, #ELM_MAP_ROUTE_TYPE_BICYCLE,
362 or #ELM_MAP_ROUTE_TYPE_FOOT need to be used.
363
364 Another parameter is what the route should prioritize, the minor distance
365 or the less time to be spend on the route. So @p method should be one
366 of #ELM_MAP_ROUTE_METHOD_SHORTEST or #ELM_MAP_ROUTE_METHOD_FASTEST.
367
368 Routes created with this method can be deleted with
369 elm_map_route_del(),
370 and distance can be get with elm_map_route_distance_get().
371
372 @see elm_map_route_del()
373 @see elm_map_route_distance_get()
374 @see elm_map_source_set()
375
376 @ingroup Map */
377
378 return Elm_Map_Route *;
379 params {
380 @in Elm_Map_Route_Type type; /*@ The type of transport to be considered when tracing a route. */
381 @in Elm_Map_Route_Method method; /*@ The routing method, what should be prioritized. */
382 @in double flon; /*@ The start longitude. */
383 @in double flat; /*@ The start latitude. */
384 @in double tlon; /*@ The destination longitude. */
385 @in double tlat; /*@ The destination latitude. */
386 @in Elm_Map_Route_Cb route_cb; /*@ The route to be traced. */
387 @in void *data; /*@ A pointer of user data. */
388 }
389 }
390 track_add {
391 /*@
392 Add a track on the map
393
394 @return The route object. This is an elm object of type Route.
395
396 @see elm_route_add() for details.
397
398 @ingroup Map */
399
400 return Evas_Object *;
401 params {
402 @in void *emap; /*@ The emap route object. */
403 }
404 }
405 region_to_canvas_convert {
406 /*@
407 Convert geographic coordinates (longitude, latitude)
408 into canvas coordinates.
409
410 This gets canvas x, y coordinates from longitude and latitude. The canvas
411 coordinates mean x, y coordinate from current viewport.
412
413 see elm_map_canvas_to_region_convert()
414
415 @ingroup Map */
416
417 const;
418 params {
419 @in double lon; /*@ The longitude to convert. */
420 @in double lat; /*@ The latitude to convert. */
421 @out Evas_Coord x; /*@ A pointer to horizontal coordinate. */
422 @out Evas_Coord y; /*@ A pointer to vertical coordinate. */
423 }
424 }
425 overlay_circle_add {
426 /*@
427 Add a new circle overlay to the map object.
428 This overlay has a circle type.
429
430 @return The created overlay or @c NULL upon failure.
431
432 Overlay created with this method can be deleted with elm_map_overlay_del().
433
434 @see elm_map_overlay_del()
435
436 @ingroup Map */
437
438 return Elm_Map_Overlay *;
439 params {
440 @in double lon; /*@ The center longitude. */
441 @in double lat; /*@ The center latitude. */
442 @in double radius; /*@ The pixel length of radius. */
443 }
444 }
445 overlay_class_add {
446 /*@
447 Add a new class overlay to the map object.
448 This overlay has a class type.
449
450 @return The created overlay or @c NULL upon failure.
451
452 This overlay is not shown before overlay members are appended.
453 if overlay members in the same class are close, group overlays
454 are created. If they are far away, group overlays are hidden.
455 When group overlays are shown, they have default style layouts at first.
456
457 You can change the state (hidden, paused, etc.) or set the content
458 or icon of the group overlays by chaning the state of the class overlay.
459 Do not modify the group overlay itself.
460
461 Also these changes have a influence on the overlays in the same class
462 even if each overlay is alone and is not grouped.
463
464 @see elm_map_overlay_del()
465 @see elm_map_overlay_add()
466 @see elm_map_overlay_bubble_add()
467
468 @ingroup Map */
469
470 return Elm_Map_Overlay *;
471 }
472 overlay_bubble_add {
473 /*@
474 Add a new bubble overlay to the map object.
475 This overlay has a bubble type.
476
477 @return The created overlay or @c NULL upon failure.
478
479 A bubble will not be displayed before geographic coordinates are set or
480 any other overlays are followed.
481
482 This overlay has a bubble style layout and icon or content can not
483 be set.
484
485 Overlay created with this method can be deleted with elm_map_overlay_del().
486
487 @see elm_map_overlay_del()
488 @see elm_map_overlay_add()
489 @see elm_map_overlay_class_add()
490 @see elm_map_overlay_region_set()
491 @see elm_map_overlay_bubble_follow()
492
493 @ingroup Map */
494
495 return Elm_Map_Overlay *;
496 }
497 sources_get {
498 /*@
499 Get the names of available sources for a specific type.
500
501 @return The char pointer array of source names.
502
503 It will provide a list with all available sources.
504 Current source can be set by elm_map_source_set(), or get with
505 elm_map_source_get().
506
507 At least available sources of tile type:
508 @li "Mapnik"
509 @li "Osmarender"
510 @li "CycleMap"
511 @li "Maplint"
512
513 At least available sources of route type:
514 @li "Yours"
515
516 At least available sources of name type:
517 @li "Nominatim"
518
519 @see elm_map_source_set()
520 @see elm_map_source_get()
521
522 @ingroup Map */
523
524 const;
525 return const char **;
526 params {
527 @in Elm_Map_Source_Type type; /*@ source type. */
528 }
529 }
530 overlay_polygon_add {
531 /*@
532 Add a new polygon overlay to the map object.
533 This overlay has a polygon type.
534
535 @return The created overlay or @c NULL upon failure.
536
537 At least 3 regions should be added to show the polygon overlay.
538
539 Overlay created with this method can be deleted with elm_map_overlay_del().
540
541 @see elm_map_overlay_polygon_region_add()
542 @see elm_map_overlay_del()
543
544 @ingroup Map */
545
546 return Elm_Map_Overlay *;
547 }
548 overlay_line_add {
549 /*@
550 Add a new line overlay to the map object.
551 This overlay has a line type.
552
553 @return The created overlay or @c NULL upon failure.
554
555 Overlay created with this method can be deleted with elm_map_overlay_del().
556
557 @see elm_map_overlay_del()
558
559 @ingroup Map */
560
561 return Elm_Map_Overlay *;
562 params {
563 @in double flon; /*@ The start longitude. */
564 @in double flat; /*@ The start latitude. */
565 @in double tlon; /*@ The destination longitude. */
566 @in double tlat; /*@ The destination latitude. */
567 }
568 }
569 region_show {
570 /*@
571 Show the given coordinates at the center of the map, @b immediately.
572
573 This causes map to @b redraw its viewport's contents to the
574 region containing the given @p lat and @p lon, that will be moved to the
575 center of the map.
576
577 @see elm_map_region_bring_in() for a function to move with animation.
578 @see elm_map_region_get()
579
580 @ingroup Map */
581
582 params {
583 @in double lon; /*@ Longitude to center at. */
584 @in double lat; /*@ Latitude to center at. */
585 }
586 }
587 name_add {
588 /*@
589 Request a address or geographic coordinates(longitude, latitude)
590 from a given address or geographic coordinate(longitude, latitude).
591
592 @return name A #Elm_Map_Name handle for this coordinate.
593
594 If you want to get address from geographic coordinates, set input @p address
595 as @c NULL and set @p lon, @p lat as you want to convert.
596 If address is set except NULL, @p lon and @p lat are checked.
597
598 To get the string for this address, elm_map_name_address_get()
599 should be used after callback or "name,loaded" signal is called.
600
601 To get the longitude and latitude, elm_map_name_region_get()
602 should be used.
603
604 @ingroup Map */
605
606 const;
607 return Elm_Map_Name *;
608 params {
609 @in const char *address; /*@ The address. */
610 @in double lon; /*@ The longitude. */
611 @in double lat; /*@ The latitude. */
612 @in Elm_Map_Name_Cb name_cb; /*@ The callback function. */
613 @in void *data; /*@ The user callback data. */
614 }
615 }
616 region_bring_in {
617 /*@
618 Animatedly bring in given coordinates to the center of the map.
619
620 This causes map to jump to the given @p lat and @p lon coordinates
621 and show it (by scrolling) in the center of the viewport, if it is not
622 already centered. This will use animation to do so and take a period
623 of time to complete.
624
625 @see elm_map_region_show() for a function to avoid animation.
626 @see elm_map_region_get()
627
628 @ingroup Map */
629
630 params {
631 @in double lon; /*@ Longitude to center at. */
632 @in double lat; /*@ Latitude to center at. */
633 }
634 }
635 track_remove {
636 /*@
637 Remove a track from the map
638
639 @ingroup Map */
640
641 params {
642 @in Evas_Object *route; /*@ The track to remove. */
643 }
644 }
645 overlay_route_add {
646 /*@
647 Add a new route overlay to the map object.
648 This overlay has a route type.
649
650 @return The created overlay or @c NULL upon failure.
651
652 This overlay has a route style layout and icon or content can not
653 be set.
654
655 The color scheme can be changed by elm_map_overlay_content_set().
656
657 Overlay created with this method can be deleted with elm_map_overlay_del().
658
659 @see elm_map_overlay_del()
660 @see elm_map_overlay_class_add()
661 @see elm_map_overlay_content_set()
662 @see elm_map_overlay_content_get()
663
664 @ingroup Map */
665
666 return Elm_Map_Overlay *;
667 params {
668 @in const Elm_Map_Route *route; /*@ The route object to make a overlay. */
669 }
670 }
671 overlay_scale_add {
672 /*@
673 Add a new scale overlay to the map object.
674 This overlay has a scale type.
675
676 @return The created overlay or @c NULL upon failure.
677
678 The scale overlay shows the ratio of a distance on the map to the corresponding distance.
679
680 Overlay created with this method can be deleted with elm_map_overlay_del().
681
682 @see elm_map_overlay_del()
683
684 @ingroup Map */
685
686 return Elm_Map_Overlay *;
687 params {
688 @in Evas_Coord x; /*@ horizontal pixel coordinate. */
689 @in Evas_Coord y; /*@ vertical pixel coordinate */
690 }
691 }
692 overlay_add {
693 /*@
694 Add a new overlay to the map object. This overlay has a default type.
695
696 @return The created overlay or @c NULL upon failure.
697
698 A overlay will be created and shown in a specific point of the map, defined
699 by @p lon and @p lat.
700
701 The created overlay has a default style layout before content or
702 icon is set.
703 If content or icon is set, those are displayed instead of default style
704 layout.
705 You can set by using elm_map_overlay_content_set() or
706 elm_map_overlay_icon_set(). If NULL is set, default style
707 is shown again.
708
709 Overlay created with this method can be deleted by elm_map_overlay_del().
710
711 @see elm_map_overlay_del()
712 @see elm_map_overlay_class_add()
713 @see elm_map_overlay_bubble_add()
714 @see elm_map_overlay_content_set()
715 @see elm_map_overlay_icon_set()
716
717 @ingroup Map */
718
719 return Elm_Map_Overlay *;
720 params {
721 @in double lon; /*@ The longitude of the overlay. */
722 @in double lat; /*@ The latitude of the overlay. */
723 }
724 }
725 canvas_to_region_convert {
726 /*@
727 Convert canvas coordinates into geographic coordinates
728 (longitude, latitude).
729
730 This gets longitude and latitude from canvas x, y coordinates. The canvas
731 coordinates mean x, y coordinate from current viewport.
732
733 see elm_map_region_to_canvas_convert()
734
735 @ingroup Map */
736
737 const;
738 params {
739 @in Evas_Coord x; /*@ horizontal coordinate of the point to convert. */
740 @in Evas_Coord y; /*@ vertical coordinate of the point to convert. */
741 @out double lon; /*@ A pointer to the longitude. */
742 @out double lat; /*@ A pointer to the latitude. */
743 }
744 }
745 }
746 implements {
747 class::constructor;
748 Eo_Base::constructor;
749 Evas_Smart::move;
750 Evas_Smart::add;
751 Evas_Smart::del;
752 Evas_Smart::member_add;
753 Evas_Smart::resize;
754 Elm_Widget::theme_apply;
755 Elm_Widget::on_focus;
756 Elm_Widget::event;
757 }
758 events {
759 clicked;
760 clicked,double;
761 press;
762 longpressed;
763 scroll;
764 scroll,drag,start;
765 scroll,drag,stop;
766 scroll,anim,start;
767 scroll,anim,stop;
768 zoom,start;
769 zoom,stop;
770 zoom,change;
771 loaded;
772 tile,load;
773 tile,loaded;
774 tile,loaded,fail;
775 route,load;
776 route,loaded;
777 route,loaded,fail;
778 name,load;
779 name,loaded;
780 name,loaded,fail;
781 overlay,clicked;
782 overlay,del;
783 language,changed;
784 access,changed;
785 focused;
786 unfocused;
787 }
788
789}
diff --git a/src/lib/elm_map_eo.h b/src/lib/elm_map_eo.h
index f547a9179..ff0fb7743 100644
--- a/src/lib/elm_map_eo.h
+++ b/src/lib/elm_map_eo.h
@@ -1,3 +1,7 @@
1#include "elm_map_pan.eo.h"
2#include "elm_map.eo.h"
3
4#if 0
1#define ELM_OBJ_MAP_PAN_CLASS elm_obj_map_pan_class_get() 5#define ELM_OBJ_MAP_PAN_CLASS elm_obj_map_pan_class_get()
2 6
3const Eo_Class *elm_obj_map_pan_class_get(void) EINA_CONST; 7const Eo_Class *elm_obj_map_pan_class_get(void) EINA_CONST;
@@ -628,3 +632,4 @@ enum
628 * @ingroup Map 632 * @ingroup Map
629 */ 633 */
630#define elm_obj_map_track_remove(route) ELM_OBJ_MAP_ID(ELM_OBJ_MAP_SUB_ID_TRACK_REMOVE), EO_TYPECHECK(Evas_Object *, route) 634#define elm_obj_map_track_remove(route) ELM_OBJ_MAP_ID(ELM_OBJ_MAP_SUB_ID_TRACK_REMOVE), EO_TYPECHECK(Evas_Object *, route)
635#endif
diff --git a/src/lib/elm_map_legacy.h b/src/lib/elm_map_legacy.h
index 89bc94377..6c74b695c 100644
--- a/src/lib/elm_map_legacy.h
+++ b/src/lib/elm_map_legacy.h
@@ -559,7 +559,7 @@ EAPI Elm_Map_Overlay * elm_map_overlay_add(Evas_Object *obj, double lon, dou
559 * 559 *
560 * @ingroup Map 560 * @ingroup Map
561 */ 561 */
562EAPI EAPI Eina_List * elm_map_overlays_get(Evas_Object *obj); 562EAPI EAPI Eina_List * elm_map_overlays_get(const Evas_Object *obj);
563 563
564/** 564/**
565 * Add a new class overlay to the map object. 565 * Add a new class overlay to the map object.
diff --git a/src/lib/elm_map_pan.eo b/src/lib/elm_map_pan.eo
new file mode 100644
index 000000000..e24b884ce
--- /dev/null
+++ b/src/lib/elm_map_pan.eo
@@ -0,0 +1,46 @@
1class Elm_Map_Pan (Elm_Pan)
2{
3 eo_prefix: elm_obj_map_pan;
4 implements {
5 class::constructor;
6 Eo_Base::destructor;
7 Evas_Smart::calculate;
8 Evas_Smart::move;
9 Evas_Smart::resize;
10 Elm_Pan::content_size::get;
11 Elm_Pan::pos;
12 Elm_Pan::pos_min::get;
13 Elm_Pan::pos_max::get;
14 }
15 events {
16 clicked;
17 clicked,double;
18 press;
19 longpressed;
20 scroll;
21 scroll,drag,start;
22 scroll,drag,stop;
23 scroll,anim,start;
24 scroll,anim,stop;
25 zoom,start;
26 zoom,stop;
27 zoom,change;
28 loaded;
29 tile,load;
30 tile,loaded;
31 tile,loaded,fail;
32 route,load;
33 route,loaded;
34 route,loaded,fail;
35 name,load;
36 name,loaded;
37 name,loaded,fail;
38 overlay,clicked;
39 overlay,del;
40 language,changed;
41 access,changed;
42 focused;
43 unfocused;
44 }
45
46}
diff --git a/src/lib/elm_widget_map.h b/src/lib/elm_widget_map.h
index 9d9e61b14..d94db3a7e 100644
--- a/src/lib/elm_widget_map.h
+++ b/src/lib/elm_widget_map.h
@@ -17,7 +17,7 @@
17/** 17/**
18 * Base widget smart data extended with map instance data. 18 * Base widget smart data extended with map instance data.
19 */ 19 */
20typedef struct _Elm_Map_Smart_Data Elm_Map_Smart_Data; 20typedef struct _Elm_Map_Data Elm_Map_Data;
21 21
22typedef struct _Elm_Map_Name_List Elm_Map_Name_List; 22typedef struct _Elm_Map_Name_List Elm_Map_Name_List;
23typedef char *(*Elm_Map_Module_Source_Name_Func)(void); 23typedef char *(*Elm_Map_Module_Source_Name_Func)(void);
@@ -148,7 +148,7 @@ struct _Color
148 148
149struct _Overlay_Group 149struct _Overlay_Group
150{ 150{
151 Elm_Map_Smart_Data *wsd; 151 Elm_Map_Data *wsd;
152 double lon, lat; 152 double lon, lat;
153 Elm_Map_Overlay *overlay; // virtual group type overlay 153 Elm_Map_Overlay *overlay; // virtual group type overlay
154 Elm_Map_Overlay *klass; // class overlay for this virtual group 154 Elm_Map_Overlay *klass; // class overlay for this virtual group
@@ -160,7 +160,7 @@ struct _Overlay_Group
160 160
161struct _Overlay_Default 161struct _Overlay_Default
162{ 162{
163 Elm_Map_Smart_Data *wsd; 163 Elm_Map_Data *wsd;
164 Evas_Coord w, h; 164 Evas_Coord w, h;
165 165
166 double lon, lat; 166 double lon, lat;
@@ -179,7 +179,7 @@ struct _Overlay_Default
179 179
180struct _Overlay_Class 180struct _Overlay_Class
181{ 181{
182 Elm_Map_Smart_Data *wsd; 182 Elm_Map_Data *wsd;
183 Eina_List *members; 183 Eina_List *members;
184 int zoom_max; 184 int zoom_max;
185 Evas_Object *content; 185 Evas_Object *content;
@@ -188,7 +188,7 @@ struct _Overlay_Class
188 188
189struct _Overlay_Bubble 189struct _Overlay_Bubble
190{ 190{
191 Elm_Map_Smart_Data *wsd; 191 Elm_Map_Data *wsd;
192 Evas_Object *pobj; 192 Evas_Object *pobj;
193 Evas_Object *obj, *sc, *bx; 193 Evas_Object *obj, *sc, *bx;
194 double lon, lat; 194 double lon, lat;
@@ -197,7 +197,7 @@ struct _Overlay_Bubble
197 197
198struct _Overlay_Route 198struct _Overlay_Route
199{ 199{
200 Elm_Map_Smart_Data *wsd; 200 Elm_Map_Data *wsd;
201 201
202 Evas_Object *obj; 202 Evas_Object *obj;
203 Eina_List *paths; 203 Eina_List *paths;
@@ -206,21 +206,21 @@ struct _Overlay_Route
206 206
207struct _Overlay_Line 207struct _Overlay_Line
208{ 208{
209 Elm_Map_Smart_Data *wsd; 209 Elm_Map_Data *wsd;
210 double flon, flat, tlon, tlat; 210 double flon, flat, tlon, tlat;
211 Evas_Object *obj; 211 Evas_Object *obj;
212}; 212};
213 213
214struct _Overlay_Polygon 214struct _Overlay_Polygon
215{ 215{
216 Elm_Map_Smart_Data *wsd; 216 Elm_Map_Data *wsd;
217 Eina_List *regions; // list of Regions 217 Eina_List *regions; // list of Regions
218 Evas_Object *obj; 218 Evas_Object *obj;
219}; 219};
220 220
221struct _Overlay_Circle 221struct _Overlay_Circle
222{ 222{
223 Elm_Map_Smart_Data *wsd; 223 Elm_Map_Data *wsd;
224 double lon, lat; 224 double lon, lat;
225 double radius; // Intial pixel in intial view 225 double radius; // Intial pixel in intial view
226 double ratio; // initial-radius/map-size 226 double ratio; // initial-radius/map-size
@@ -229,7 +229,7 @@ struct _Overlay_Circle
229 229
230struct _Overlay_Scale 230struct _Overlay_Scale
231{ 231{
232 Elm_Map_Smart_Data *wsd; 232 Elm_Map_Data *wsd;
233 Evas_Coord x, y; 233 Evas_Coord x, y;
234 Evas_Coord w, h; 234 Evas_Coord w, h;
235 Evas_Object *obj; 235 Evas_Object *obj;
@@ -237,7 +237,7 @@ struct _Overlay_Scale
237 237
238struct _Elm_Map_Overlay 238struct _Elm_Map_Overlay
239{ 239{
240 Elm_Map_Smart_Data *wsd; 240 Elm_Map_Data *wsd;
241 241
242 Evas_Coord zoom_min; 242 Evas_Coord zoom_min;
243 Color c; 243 Color c;
@@ -262,7 +262,7 @@ struct _Elm_Map_Overlay
262 262
263struct _Elm_Map_Route 263struct _Elm_Map_Route
264{ 264{
265 Elm_Map_Smart_Data *wsd; 265 Elm_Map_Data *wsd;
266 266
267 char *fname; 267 char *fname;
268 Elm_Map_Route_Type type; 268 Elm_Map_Route_Type type;
@@ -289,7 +289,7 @@ struct _Elm_Map_Route
289 289
290struct _Path_Node 290struct _Path_Node
291{ 291{
292 Elm_Map_Smart_Data *wsd; 292 Elm_Map_Data *wsd;
293 293
294 int idx; 294 int idx;
295 struct 295 struct
@@ -301,14 +301,14 @@ struct _Path_Node
301 301
302struct _Path_Waypoint 302struct _Path_Waypoint
303{ 303{
304 Elm_Map_Smart_Data *wsd; 304 Elm_Map_Data *wsd;
305 305
306 const char *point; 306 const char *point;
307}; 307};
308 308
309struct _Elm_Map_Name 309struct _Elm_Map_Name
310{ 310{
311 Elm_Map_Smart_Data *wsd; 311 Elm_Map_Data *wsd;
312 312
313 int method; 313 int method;
314 char *address; 314 char *address;
@@ -322,7 +322,7 @@ struct _Elm_Map_Name
322 322
323struct _Elm_Map_Name_List 323struct _Elm_Map_Name_List
324{ 324{
325 Elm_Map_Smart_Data *wsd; 325 Elm_Map_Data *wsd;
326 326
327 Eina_List *names; 327 Eina_List *names;
328 double lon, lat; 328 double lon, lat;
@@ -354,7 +354,7 @@ struct _Grid_Item
354{ 354{
355 Grid *g; 355 Grid *g;
356 356
357 Elm_Map_Smart_Data *wsd; 357 Elm_Map_Data *wsd;
358 Evas_Object *img; 358 Evas_Object *img;
359 const char *file; 359 const char *file;
360 const char *url; 360 const char *url;
@@ -367,7 +367,7 @@ struct _Grid_Item
367 367
368struct _Grid 368struct _Grid
369{ 369{
370 Elm_Map_Smart_Data *wsd; 370 Elm_Map_Data *wsd;
371 int zoom; /* zoom level tiles want for optimal 371 int zoom; /* zoom level tiles want for optimal
372 * display (1, 2, 4, 8) */ 372 * display (1, 2, 4, 8) */
373 int tw, th; // size of grid in tiles 373 int tw, th; // size of grid in tiles
@@ -377,18 +377,18 @@ struct _Grid
377struct _Calc_Job 377struct _Calc_Job
378{ 378{
379 double zoom; 379 double zoom;
380 void (*zoom_mode_set)(Elm_Map_Smart_Data *sd, double zoom); 380 void (*zoom_mode_set)(Elm_Map_Data *sd, double zoom);
381 381
382 Eina_Bool bring_in : 1; 382 Eina_Bool bring_in : 1;
383 double lon, lat; 383 double lon, lat;
384 void (*region_show_bring_in)(Elm_Map_Smart_Data *sd, double lon, 384 void (*region_show_bring_in)(Elm_Map_Data *sd, double lon,
385 double lat, Eina_Bool bring_in); 385 double lat, Eina_Bool bring_in);
386 386
387 Eina_List *overlays; 387 Eina_List *overlays;
388 void (*overlays_show)(Elm_Map_Smart_Data *sd, Eina_List *overlays); 388 void (*overlays_show)(Elm_Map_Data *sd, Eina_List *overlays);
389}; 389};
390 390
391struct _Elm_Map_Smart_Data 391struct _Elm_Map_Data
392{ 392{
393 Evas_Object *hit_rect; 393 Evas_Object *hit_rect;
394 Evas_Object *pan_obj; 394 Evas_Object *pan_obj;
@@ -477,11 +477,11 @@ struct _Elm_Map_Smart_Data
477 Calc_Job calc_job; 477 Calc_Job calc_job;
478}; 478};
479 479
480typedef struct _Elm_Map_Pan_Smart_Data Elm_Map_Pan_Smart_Data; 480typedef struct _Elm_Map_Pan_Data Elm_Map_Pan_Data;
481struct _Elm_Map_Pan_Smart_Data 481struct _Elm_Map_Pan_Data
482{ 482{
483 Evas_Object *wobj; 483 Evas_Object *wobj;
484 Elm_Map_Smart_Data *wsd; 484 Elm_Map_Data *wsd;
485}; 485};
486 486
487/** 487/**
@@ -489,10 +489,10 @@ struct _Elm_Map_Pan_Smart_Data
489 */ 489 */
490 490
491#define ELM_MAP_DATA_GET(o, sd) \ 491#define ELM_MAP_DATA_GET(o, sd) \
492 Elm_Map_Smart_Data * sd = eo_data_scope_get(o, ELM_OBJ_MAP_CLASS) 492 Elm_Map_Data * sd = eo_data_scope_get(o, ELM_OBJ_MAP_CLASS)
493 493
494#define ELM_MAP_PAN_DATA_GET(o, sd) \ 494#define ELM_MAP_PAN_DATA_GET(o, sd) \
495 Elm_Map_Pan_Smart_Data * sd = eo_data_scope_get(o, ELM_OBJ_MAP_PAN_CLASS) 495 Elm_Map_Pan_Data * sd = eo_data_scope_get(o, ELM_OBJ_MAP_PAN_CLASS)
496 496
497#define ELM_MAP_DATA_GET_OR_RETURN(o, ptr) \ 497#define ELM_MAP_DATA_GET_OR_RETURN(o, ptr) \
498 ELM_MAP_DATA_GET(o, ptr); \ 498 ELM_MAP_DATA_GET(o, ptr); \