summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2019-03-05 17:00:37 -0500
committerCedric BAIL <cedric.bail@free.fr>2019-03-07 14:15:45 -0800
commite26db8dea5cd5a57945e03cb58c816dc0e9a9cb6 (patch)
treeac9e7b74fa11fa32f358d0b18fb183eb9d64a7e9 /src
parent3bedd6ba554c298fef9826220a88a58adda243d0 (diff)
elm_map: remove all legacy usage from eo files
this takes the current generated output from eolian for legacy code in efl and adds it to the tree, then removes legacy references from the corresponding eo files. in the case where the entire eo file was for a legacy object, that eo file has been removed from the tree ref T7724 Reviewed-by: Cedric BAIL <cedric.bail@free.fr> Differential Revision: https://phab.enlightenment.org/D8183
Diffstat (limited to 'src')
-rw-r--r--src/Makefile_Efl_Mono.am2
-rw-r--r--src/Makefile_Elementary.am9
-rw-r--r--src/lib/elementary/elm_map.c8
-rw-r--r--src/lib/elementary/elm_map.eo532
-rw-r--r--src/lib/elementary/elm_map_eo.c365
-rw-r--r--src/lib/elementary/elm_map_eo.h731
-rw-r--r--src/lib/elementary/elm_map_eo.legacy.c192
-rw-r--r--src/lib/elementary/elm_map_eo.legacy.h616
-rw-r--r--src/lib/elementary/elm_map_legacy.h2
-rw-r--r--src/lib/elementary/elm_map_pan.eo34
-rw-r--r--src/lib/elementary/elm_map_pan_eo.c67
-rw-r--r--src/lib/elementary/elm_map_pan_eo.h24
-rw-r--r--src/lib/elementary/elm_map_pan_eo.legacy.h17
-rw-r--r--src/lib/elementary/meson.build6
14 files changed, 2029 insertions, 576 deletions
diff --git a/src/Makefile_Efl_Mono.am b/src/Makefile_Efl_Mono.am
index eb908f8..cf88848 100644
--- a/src/Makefile_Efl_Mono.am
+++ b/src/Makefile_Efl_Mono.am
@@ -170,7 +170,7 @@ lib/eo/efl_object_override.eo.cs
170 170
171elementary_eolian_blacklisted_files = \ 171elementary_eolian_blacklisted_files = \
172lib/elementary/elm_web.eo.cs \ 172lib/elementary/elm_web.eo.cs \
173lib/elementary/elm_map.eo.cs \ 173lib/elementary/elm_map_eo.cs \
174lib/elementary/elm_combobox.eo.cs \ 174lib/elementary/elm_combobox.eo.cs \
175lib/elementary/elm_list_eo.cs \ 175lib/elementary/elm_list_eo.cs \
176lib/elementary/elm_genlist_eo.cs \ 176lib/elementary/elm_genlist_eo.cs \
diff --git a/src/Makefile_Elementary.am b/src/Makefile_Elementary.am
index 27e8d8b..ad60028 100644
--- a/src/Makefile_Elementary.am
+++ b/src/Makefile_Elementary.am
@@ -186,8 +186,6 @@ elm_private_eolian_files = \
186# Legacy classes - not part of public EO API 186# Legacy classes - not part of public EO API
187elm_legacy_eolian_files = \ 187elm_legacy_eolian_files = \
188 lib/elementary/efl_ui_clock_legacy.eo \ 188 lib/elementary/efl_ui_clock_legacy.eo \
189 lib/elementary/elm_map.eo \
190 lib/elementary/elm_map_pan.eo \
191 lib/elementary/elm_menu.eo \ 189 lib/elementary/elm_menu.eo \
192 lib/elementary/elm_notify.eo \ 190 lib/elementary/elm_notify.eo \
193 lib/elementary/elm_panel.eo \ 191 lib/elementary/elm_panel.eo \
@@ -367,6 +365,9 @@ lib/elementary/elm_list_item_eo.c \
367lib/elementary/elm_list_item_eo.legacy.c \ 365lib/elementary/elm_list_item_eo.legacy.c \
368lib/elementary/elm_mapbuf_eo.c \ 366lib/elementary/elm_mapbuf_eo.c \
369lib/elementary/elm_mapbuf_eo.legacy.c \ 367lib/elementary/elm_mapbuf_eo.legacy.c \
368lib/elementary/elm_map_eo.c \
369lib/elementary/elm_map_eo.legacy.c \
370lib/elementary/elm_map_pan_eo.c \
370$(NULL) 371$(NULL)
371 372
372elm_legacy_eo_headers = \ 373elm_legacy_eo_headers = \
@@ -504,6 +505,10 @@ lib/elementary/elm_list_item_eo.h \
504lib/elementary/elm_list_item_eo.legacy.h \ 505lib/elementary/elm_list_item_eo.legacy.h \
505lib/elementary/elm_mapbuf_eo.h \ 506lib/elementary/elm_mapbuf_eo.h \
506lib/elementary/elm_mapbuf_eo.legacy.h \ 507lib/elementary/elm_mapbuf_eo.legacy.h \
508lib/elementary/elm_map_eo.h \
509lib/elementary/elm_map_eo.legacy.h \
510lib/elementary/elm_map_pan_eo.h \
511lib/elementary/elm_map_pan_eo.legacy.h \
507$(NULL) 512$(NULL)
508 513
509 514
diff --git a/src/lib/elementary/elm_map.c b/src/lib/elementary/elm_map.c
index b54f9ba..364d491 100644
--- a/src/lib/elementary/elm_map.c
+++ b/src/lib/elementary/elm_map.c
@@ -10,8 +10,8 @@
10#include "elm_priv.h" 10#include "elm_priv.h"
11#include "elm_widget_map.h" 11#include "elm_widget_map.h"
12#include "elm_interface_scrollable.h" 12#include "elm_interface_scrollable.h"
13#include "elm_map_pan.eo.h" 13#include "elm_map_pan_eo.h"
14#include "elm_map.eo.h" 14#include "elm_map_eo.h"
15 15
16#define MY_PAN_CLASS ELM_MAP_PAN_CLASS 16#define MY_PAN_CLASS ELM_MAP_PAN_CLASS
17 17
@@ -3995,7 +3995,7 @@ _elm_map_pan_class_constructor(Efl_Class *klass)
3995 evas_smart_legacy_type_register(MY_PAN_CLASS_NAME_LEGACY, klass); 3995 evas_smart_legacy_type_register(MY_PAN_CLASS_NAME_LEGACY, klass);
3996} 3996}
3997 3997
3998#include "elm_map_pan.eo.c" 3998#include "elm_map_pan_eo.c"
3999 3999
4000EOLIAN static Eina_Error 4000EOLIAN static Eina_Error
4001_elm_map_efl_ui_widget_theme_apply(Eo *obj, Elm_Map_Data *sd EINA_UNUSED) 4001_elm_map_efl_ui_widget_theme_apply(Eo *obj, Elm_Map_Data *sd EINA_UNUSED)
@@ -5726,4 +5726,4 @@ ELM_WIDGET_KEY_DOWN_DEFAULT_IMPLEMENT(elm_map, Elm_Map_Data)
5726#define ELM_MAP_EXTRA_OPS \ 5726#define ELM_MAP_EXTRA_OPS \
5727 EFL_CANVAS_GROUP_ADD_DEL_OPS(elm_map) 5727 EFL_CANVAS_GROUP_ADD_DEL_OPS(elm_map)
5728 5728
5729#include "elm_map.eo.c" 5729#include "elm_map_eo.c"
diff --git a/src/lib/elementary/elm_map.eo b/src/lib/elementary/elm_map.eo
deleted file mode 100644
index ebf4412..0000000
--- a/src/lib/elementary/elm_map.eo
+++ /dev/null
@@ -1,532 +0,0 @@
1/* FIXME: Handle properly. */
2type Elm_Map_Route: __undefined_type; [[Elementary map route type]]
3type Elm_Map_Route_Cb: __undefined_type; [[Elementary map route callback type]]
4type Elm_Map_Overlay: __undefined_type; [[Elementary map overlay type]]
5type Elm_Map_Name: __undefined_type; [[Elementary map name type]]
6type Elm_Map_Name_Cb: __undefined_type; [[Elementary map name callback type]]
7type Elm_Map_Name_List_Cb: __undefined_type; [[Elementary map name list callback type]]
8type Evas.Event_Mouse_Down: __undefined_type;
9
10enum Elm.Map.Source_Type
11{
12 [[
13 Set type of a external source (provider).
14
15 See @Elm.Map.sources_get()
16 See @Elm.Map.source_get()
17 See @Elm.Map.source_set()
18 ]]
19 tile, [[Map tile provider.]]
20 route, [[Route service provider.]]
21 name, [[Name service provider.]]
22 last [[Sentinel value to indicate last enum field during iteration]]
23}
24
25enum Elm.Map.Route_Type
26{
27 [[
28 Set type of transport used on route.
29
30 See @Elm.Map.route_add()
31 ]]
32 motocar, [[Route should consider an automobile will be used.]]
33 bicycle, [[Route should consider a bicycle will be used by the user.]]
34 foot, [[Route should consider user will be walking.]]
35 last [[Sentinel value to indicate last enum field during iteration]]
36}
37
38
39enum Elm.Map.Route_Method
40{
41 [[
42 Set the routing method, what should be prioritized, time or distance.
43
44 See @Elm.Map.route_add()
45 ]]
46 fastest, [[Route should prioritize time.]]
47 shortest, [[Route should prioritize distance.]]
48 last [[Sentinel value to indicate last enum field during iteration]]
49}
50
51
52class Elm.Map extends Efl.Ui.Widget implements Elm.Interface_Scrollable,
53 Efl.Access.Widget.Action,
54 Efl.Ui.Clickable, Efl.Ui.Legacy, Efl.Ui.Zoom
55{
56 [[Elementary map class]]
57 legacy_prefix: elm_map;
58 eo_prefix: elm_obj_map;
59 event_prefix: elm_map;
60 methods {
61 @property zoom_min {
62 set {
63 [[Set the minimum zoom of the source.]]
64 }
65 get {
66 [[Get the minimum zoom of the source.]]
67 }
68 values {
69 zoom: int(-1); [[Minimum zoom value to be used.]]
70 }
71 }
72 @property map_rotate {
73 set {
74 [[Rotate the map.]]
75 legacy: elm_map_rotate_set;
76 }
77 get {
78 [[Get the rotate degree of the map.]]
79 legacy: elm_map_rotate_get;
80 }
81 values {
82 degree: double; [[Angle from 0.0 to 360.0 to rotate around Z axis.]]
83 cx: int; [[Rotation's center horizontal position.]]
84 cy: int; [[Rotation's center vertical position.]]
85 }
86 }
87 @property user_agent {
88 set {
89 [[Set the user agent used by the map object to access routing
90 services.
91
92 User agent is a client application implementing a network
93 protocol used in communications within a clientserver
94 distributed computing system
95
96 The $user_agent identification string will transmitted in
97 a header field $User-Agent.
98 ]]
99 }
100 get {
101 [[Get the user agent used by the map object.]]
102 }
103 values {
104 user_agent: string; [[The user agent to be used by the map.]]
105 }
106 }
107 @property zoom_max {
108 set {
109 [[Set the maximum zoom of the source.]]
110 }
111 get {
112 [[Get the maximum zoom of the source.]]
113 }
114 values {
115 zoom: int(-1); [[Maximum zoom value to be used.]]
116 }
117 }
118 @property region {
119 get {
120 [[Get the current geographic coordinates of the map.
121
122 This gets the current center coordinates of the map object.
123 It can be set by @.map_region_bring_in and @.region_show.
124 ]]
125 }
126 values {
127 lon: double; [[Pointer to store longitude.]]
128 lat: double; [[Pointer to store latitude.]]
129 }
130 }
131 @property overlays {
132 get {
133 [[Return all overlays in the map object.
134
135 This list includes group overlays also.
136 So this can be changed dynamically while zooming and panning.
137
138 @since 1.7
139 ]]
140 return: list<ptr(Elm_Map_Overlay)>; [[The list of all overlays or $null upon failure.]]
141 }
142 }
143 @property tile_load_status {
144 get {
145 [[Get the information of tile load status.
146
147 This gets the current tile loaded status for the map object.
148 ]]
149 }
150 values {
151 try_num: int; [[Pointer to store number of tiles download requested.]]
152 finish_num: int; [[Pointer to store number of tiles successfully downloaded.]]
153 }
154 }
155 source_set {
156 [[Set the current source of the map for a specific type.
157
158 Map widget retrieves tile images that composes the map from a
159 web service. This web service can be set with this method
160 for #ELM_MAP_SOURCE_TYPE_TILE type. A different service can
161 return a different maps with different information and it can
162 use different zoom values.
163
164 Map widget provides route data based on a external web service.
165 This web service can be set with this method
166 for #ELM_MAP_SOURCE_TYPE_ROUTE type.
167
168 Map widget also provide geoname data based on a external web
169 service. This web service can be set with this method
170 for #ELM_MAP_SOURCE_TYPE_NAME type.
171
172 The $source_name need to match one of the names provided by
173 @.sources_get.
174
175 The current source can be get using @.source_get.
176 ]]
177 params {
178 @in type: Elm.Map.Source_Type; [[Source type.]]
179 @in source_name: string; [[The source to be used.]]
180 }
181 }
182 source_get @const {
183 [[Get the name of currently used source for a specific type.]]
184 return: string; [[The name of the source in use.]]
185 params {
186 @in type: Elm.Map.Source_Type; [[Source type.]]
187 }
188 }
189 route_add {
190 [[Add a new route to the map object.
191
192 A route will be traced by point on coordinates ($flat, $flon)
193 to point on coordinates ($tlat, $tlon), using the route service
194 set with @.source_set.
195
196 It will take $type on consideration to define the route,
197 depending if the user will be walking or driving, the route may
198 vary. One of #ELM_MAP_ROUTE_TYPE_MOTOCAR, #ELM_MAP_ROUTE_TYPE_BICYCLE,
199 or #ELM_MAP_ROUTE_TYPE_FOOT need to be used.
200
201 Another parameter is what the route should prioritize, the minor
202 distance or the less time to be spend on the route. So $method
203 should be one of #ELM_MAP_ROUTE_METHOD_SHORTEST or
204 #ELM_MAP_ROUTE_METHOD_FASTEST.
205
206 Routes created with this method can be deleted with
207 \@ref elm_map_route_del and distance can be get with
208 \@ref elm_map_route_distance_get.
209 ]]
210 return: ptr(Elm_Map_Route); [[The created route or $null upon failure.]]
211 params {
212 @in type: Elm.Map.Route_Type; [[The type of transport to be considered when tracing a route.]]
213 @in method: Elm.Map.Route_Method; [[The routing method, what should be prioritized.]]
214 @in flon: double; [[The start longitude.]]
215 @in flat: double; [[The start latitude.]]
216 @in tlon: double; [[The destination longitude.]]
217 @in tlat: double; [[The destination latitude.]]
218 @in route_cb: Elm_Map_Route_Cb @optional; [[The route to be traced.]]
219 @in data: void_ptr @optional; [[A pointer of user data.]]
220 }
221 }
222 track_add {
223 [[Add a track on the map.]]
224 return: Efl.Canvas.Object; [[The route object. This is an elm object of type Route.]]
225 params {
226 @in emap: void_ptr; [[The emap route object.]]
227 }
228 }
229 region_to_canvas_convert @const {
230 [[Convert geographic coordinates (longitude, latitude)
231 into canvas coordinates.
232
233 This gets canvas x, y coordinates from longitude and latitude.
234 The canvas coordinates mean x, y coordinate from current viewport.
235 ]]
236 params {
237 @in lon: double; [[The longitude to convert.]]
238 @in lat: double; [[The latitude to convert.]]
239 @out x: int; [[A pointer to horizontal coordinate.]]
240 @out y: int; [[A pointer to vertical coordinate.]]
241 }
242 }
243 overlay_circle_add {
244 [[Add a new circle overlay to the map object.
245 This overlay has a circle type.
246
247 Overlay created with this method can be deleted with
248 \@ref elm_map_overlay_del.
249 ]]
250
251 return: ptr(Elm_Map_Overlay); [[The created overlay or $null upon failure.]]
252 params {
253 @in lon: double; [[The center longitude.]]
254 @in lat: double; [[The center latitude.]]
255 @in radius: double; [[The pixel length of radius.]]
256 }
257 }
258 overlay_class_add {
259 [[Add a new class overlay to the map object.
260 This overlay has a class type.
261
262 This overlay is not shown before overlay members are appended.
263 if overlay members in the same class are close, group overlays
264 are created. If they are far away, group overlays are hidden.
265 When group overlays are shown, they have default style layouts
266 at first.
267
268 You can change the state (hidden, paused, etc.) or set the
269 content or icon of the group overlays by chaning the state of
270 the class overlay. Do not modify the group overlay itself.
271
272 Also these changes have a influence on the overlays in the
273 same class even if each overlay is alone and is not grouped.
274 ]]
275 return: ptr(Elm_Map_Overlay); [[The created overlay or $null upon failure.]]
276 }
277 overlay_bubble_add {
278 [[Add a new bubble overlay to the map object.
279 This overlay has a bubble type.
280
281 A bubble will not be displayed before geographic coordinates
282 are set or any other overlays are followed.
283
284 This overlay has a bubble style layout and icon or content can
285 not be set.
286
287 Overlay created with this method can be deleted with
288 \@ref elm_map_overlay_del.
289 ]]
290 return: ptr(Elm_Map_Overlay); [[The created overlay or $null upon failure.]]
291 }
292 sources_get @const {
293 [[Get the names of available sources for a specific type.
294
295 It will provide a list with all available sources.
296 Current source can be set by @.source_set, or get with
297 @.source_get.
298
299 At least available sources of tile type are "Mapnik", "Osmarender",
300 "CycleMap" and "Maplint".
301
302 At least available sources of route type are "Yours".
303
304 At least available sources of name type are "Nominatim".
305 ]]
306 return: legacy(ptr(string)); [[The char pointer array of source names.]]
307 params {
308 @in type: Elm.Map.Source_Type; [[Source type.]]
309 }
310 }
311 overlay_polygon_add {
312 [[Add a new polygon overlay to the map object.
313 This overlay has a polygon type.
314
315 At least 3 regions should be added to show the polygon overlay.
316
317 Overlay created with this method can be deleted with
318 \@ref elm_map_overlay_del.
319 ]]
320 return: ptr(Elm_Map_Overlay); [[The created overlay or $null upon failure.]]
321 }
322 overlay_line_add {
323 [[Add a new line overlay to the map object.
324 This overlay has a line type.
325
326 Overlay created with this method can be deleted with
327 \@ref elm_map_overlay_del.
328 ]]
329 return: ptr(Elm_Map_Overlay); [[The created overlay or $null upon failure.]]
330 params {
331 @in flon: double; [[The start longitude.]]
332 @in flat: double; [[The start latitude.]]
333 @in tlon: double; [[The destination longitude.]]
334 @in tlat: double; [[The destination latitude.]]
335 }
336 }
337 region_show {
338 [[Show the given coordinates at the center of the map, immediately.
339
340 This causes map to redraw its viewport's contents to the region
341 containing the given $lat and $lon, that will be moved to the
342 center of the map.
343
344 See @.map_region_bring_in for a function to move with animation.
345 ]]
346 params {
347 @in lon: double; [[Longitude to center at.]]
348 @in lat: double; [[Latitude to center at.]]
349 }
350 }
351 name_add @const {
352 [[Request a address or geographic coordinates(longitude, latitude)
353 from a given address or geographic coordinate(longitude, latitude).
354
355 If you want to get address from geographic coordinates, set input
356 $address as $null and set $lon, $lat as you want to convert. If
357 address is set except NULL, $lon and $lat are checked.
358
359 To get the string for this address, \@ref elm_map_name_address_get
360 should be used after callback or "name,loaded" signal is called.
361
362 To get the longitude and latitude, \@ref elm_map_region_get
363 should be used.
364 ]]
365 return: ptr(Elm_Map_Name); [[A #Elm_Map_Name handle for this coordinate.]]
366 params {
367 @in address: string @optional; [[The address.]]
368 @in lon: double; [[The longitude.]]
369 @in lat: double; [[The latitude.]]
370 @in name_cb: Elm_Map_Name_Cb @optional; [[The callback function.]]
371 @in data: void_ptr @optional; [[The user callback data.]]
372 }
373 }
374 name_search @const {
375 [[Requests a list of addresses corresponding to a given name.
376
377 \@internal
378
379 @since 1.8
380 ]]
381 params {
382 @in address: string; [[The address.]]
383 @in name_cb: Elm_Map_Name_List_Cb @optional; [[The callback function.]]
384 @in data: void_ptr @optional; [[The user callback data.]]
385 }
386 }
387 map_region_bring_in {
388 [[Animatedly bring in given coordinates to the center of the map.
389
390 This causes map to jump to the given $lat and $lon coordinates
391 and show it (by scrolling) in the center of the viewport, if it
392 is not already centered. This will use animation to do so and
393 take a period of time to complete.
394
395 See @.region_show for a function to avoid animation.
396 ]]
397 legacy: elm_map_region_bring_in;
398 params {
399 @in lon: double; [[Longitude to center at.]]
400 @in lat: double; [[Latitude to center at.]]
401 }
402 }
403 region_zoom_bring_in {
404 [[Animatedly set the zoom level of the map and bring in given
405 coordinates to the center of the map.
406
407 This causes map to zoom into specific zoom level and also move
408 to the given $lat and $lon coordinates and show it (by scrolling)
409 in the center of the viewport concurrently.
410
411 See also @.map_region_bring_in.
412
413 @since 1.11
414 ]]
415 params {
416 @in zoom: int; [[The zoom level to set.]]
417 @in lon: double; [[Longitude to center at.]]
418 @in lat: double; [[Latitude to center at.]]
419 }
420 }
421 track_remove {
422 [[Remove a track from the map.]]
423 params {
424 @in route: Efl.Canvas.Object; [[The track to remove.]]
425 }
426 }
427 overlay_route_add {
428 [[Add a new route overlay to the map object.
429 This overlay has a route type.
430
431 This overlay has a route style layout and icon or content can
432 not be set.
433
434 The color scheme can be changed by
435 \@ref elm_map_overlay_content_set.
436
437 Overlay created with this method can be deleted with
438 \@ref elm_map_overlay_del.
439 ]]
440 return: ptr(Elm_Map_Overlay); [[The created overlay or $null upon failure.]]
441 params {
442 @cref route: Elm_Map_Route; [[The route object to make a overlay.]]
443 }
444 }
445 overlay_scale_add {
446 [[Add a new scale overlay to the map object. This overlay has a
447 scale type.
448
449 The scale overlay shows the ratio of a distance on the map to
450 the corresponding distance.
451
452 Overlay created with this method can be deleted with
453 \@ref elm_map_overlay_del.
454 ]]
455 return: ptr(Elm_Map_Overlay); [[The created overlay or $null upon failure.]]
456 params {
457 @in x: int; [[horizontal pixel coordinate.]]
458 @in y: int; [[vertical pixel coordinate.]]
459 }
460 }
461 overlay_add {
462 [[Add a new overlay to the map object. This overlay has a default
463 type.
464
465 A overlay will be created and shown in a specific point of the
466 map, defined by $lon and $lat.
467
468 The created overlay has a default style layout before content or
469 icon is set. If content or icon is set, those are displayed
470 instead of default style layout.
471
472 You can set by using \@ref elm_map_overlay_content_set or
473 \@ref elm_map_overlay_icon_set. If $null is set, default style
474 is shown again.
475
476 Overlay created with this method can be deleted by
477 \@ref elm_map_overlay_del.
478 ]]
479 return: ptr(Elm_Map_Overlay); [[The created overlay or $null upon failure.]]
480 params {
481 @in lon: double; [[The longitude of the overlay.]]
482 @in lat: double; [[The latitude of the overlay.]]
483 }
484 }
485 canvas_to_region_convert @const {
486 [[Convert canvas coordinates into geographic coordinates
487 (longitude, latitude).
488
489 This gets longitude and latitude from canvas x, y coordinates.
490 The canvas coordinates mean x, y coordinate from current viewport.
491 ]]
492 params {
493 @in x: int; [[Horizontal coordinate of the point to convert.]]
494 @in y: int; [[Vertical coordinate of the point to convert.]]
495 @out lon: double; [[A pointer to the longitude.]]
496 @out lat: double; [[A pointer to the latitude.]]
497 }
498 }
499 }
500 implements {
501 class.constructor;
502 Efl.Object.constructor;
503 Efl.Object.invalidate;
504 Efl.Gfx.Entity.position { set; }
505 Efl.Gfx.Entity.size { set; }
506 Efl.Canvas.Group.group_member_add;
507 Efl.Ui.Widget.theme_apply;
508 Efl.Ui.Focus.Object.on_focus_update;
509 Efl.Ui.Widget.widget_input_event_handler;
510 Efl.Access.Widget.Action.elm_actions { get; }
511 Efl.Ui.Zoom.zoom_level { set; get; }
512 Efl.Ui.Zoom.zoom_mode { set; get; }
513 Efl.Ui.Zoom.zoom_animation { get; set; }
514 Elm.Interface_Scrollable.wheel_disabled { set; }
515 }
516 events {
517 press: Evas.Event_Mouse_Down; [[Called when map was pressed]]
518 loaded: void; [[Called when map loaded]]
519 tile,load: void; [[Called when title load started]]
520 tile,loaded: void; [[Called when title load finished]]
521 tile,loaded,fail: void; [[Called when title load failed]]
522 route,load: Elm_Map_Route; [[Called when route load started]]
523 route,loaded: void; [[Called when route load finished]]
524 route,loaded,fail: void; [[Called when route load failed]]
525 /* FIXME: Can be Elm_Map_Name or list<Elm_Map_Name> */
526 name,load: void; [[Called when name load started]]
527 name,loaded: void; [[Called when name load finished]]
528 name,loaded,fail: void; [[Called when name load failed]]
529 overlay,clicked: Elm_Map_Overlay; [[Called when overlay was clicked]]
530 overlay,del: Elm_Map_Overlay; [[Called when overlay was deleted]]
531 }
532}
diff --git a/src/lib/elementary/elm_map_eo.c b/src/lib/elementary/elm_map_eo.c
new file mode 100644
index 0000000..3bc322b
--- /dev/null
+++ b/src/lib/elementary/elm_map_eo.c
@@ -0,0 +1,365 @@
1EWAPI const Efl_Event_Description _ELM_MAP_EVENT_PRESS =
2 EFL_EVENT_DESCRIPTION("press");
3EWAPI const Efl_Event_Description _ELM_MAP_EVENT_LOADED =
4 EFL_EVENT_DESCRIPTION("loaded");
5EWAPI const Efl_Event_Description _ELM_MAP_EVENT_TILE_LOAD =
6 EFL_EVENT_DESCRIPTION("tile,load");
7EWAPI const Efl_Event_Description _ELM_MAP_EVENT_TILE_LOADED =
8 EFL_EVENT_DESCRIPTION("tile,loaded");
9EWAPI const Efl_Event_Description _ELM_MAP_EVENT_TILE_LOADED_FAIL =
10 EFL_EVENT_DESCRIPTION("tile,loaded,fail");
11EWAPI const Efl_Event_Description _ELM_MAP_EVENT_ROUTE_LOAD =
12 EFL_EVENT_DESCRIPTION("route,load");
13EWAPI const Efl_Event_Description _ELM_MAP_EVENT_ROUTE_LOADED =
14 EFL_EVENT_DESCRIPTION("route,loaded");
15EWAPI const Efl_Event_Description _ELM_MAP_EVENT_ROUTE_LOADED_FAIL =
16 EFL_EVENT_DESCRIPTION("route,loaded,fail");
17EWAPI const Efl_Event_Description _ELM_MAP_EVENT_NAME_LOAD =
18 EFL_EVENT_DESCRIPTION("name,load");
19EWAPI const Efl_Event_Description _ELM_MAP_EVENT_NAME_LOADED =
20 EFL_EVENT_DESCRIPTION("name,loaded");
21EWAPI const Efl_Event_Description _ELM_MAP_EVENT_NAME_LOADED_FAIL =
22 EFL_EVENT_DESCRIPTION("name,loaded,fail");
23EWAPI const Efl_Event_Description _ELM_MAP_EVENT_OVERLAY_CLICKED =
24 EFL_EVENT_DESCRIPTION("overlay,clicked");
25EWAPI const Efl_Event_Description _ELM_MAP_EVENT_OVERLAY_DEL =
26 EFL_EVENT_DESCRIPTION("overlay,del");
27
28void _elm_map_zoom_min_set(Eo *obj, Elm_Map_Data *pd, int zoom);
29
30
31static Eina_Error
32__eolian_elm_map_zoom_min_set_reflect(Eo *obj, Eina_Value val)
33{
34 Eina_Error r = 0; int cval;
35 if (!eina_value_int_convert(&val, &cval))
36 {
37 r = EINA_ERROR_VALUE_FAILED;
38 goto end;
39 }
40 elm_obj_map_zoom_min_set(obj, cval);
41 end:
42 eina_value_flush(&val);
43 return r;
44}
45
46EOAPI EFL_VOID_FUNC_BODYV(elm_obj_map_zoom_min_set, EFL_FUNC_CALL(zoom), int zoom);
47
48int _elm_map_zoom_min_get(const Eo *obj, Elm_Map_Data *pd);
49
50
51static Eina_Value
52__eolian_elm_map_zoom_min_get_reflect(Eo *obj)
53{
54 int val = elm_obj_map_zoom_min_get(obj);
55 return eina_value_int_init(val);
56}
57
58EOAPI EFL_FUNC_BODY_CONST(elm_obj_map_zoom_min_get, int, -1 /* +1 */);
59
60void _elm_map_map_rotate_set(Eo *obj, Elm_Map_Data *pd, double degree, int cx, int cy);
61
62EOAPI EFL_VOID_FUNC_BODYV(elm_obj_map_rotate_set, EFL_FUNC_CALL(degree, cx, cy), double degree, int cx, int cy);
63
64void _elm_map_map_rotate_get(const Eo *obj, Elm_Map_Data *pd, double *degree, int *cx, int *cy);
65
66EOAPI EFL_VOID_FUNC_BODYV_CONST(elm_obj_map_rotate_get, EFL_FUNC_CALL(degree, cx, cy), double *degree, int *cx, int *cy);
67
68void _elm_map_user_agent_set(Eo *obj, Elm_Map_Data *pd, const char *user_agent);
69
70
71static Eina_Error
72__eolian_elm_map_user_agent_set_reflect(Eo *obj, Eina_Value val)
73{
74 Eina_Error r = 0; const char *cval;
75 if (!eina_value_string_convert(&val, &cval))
76 {
77 r = EINA_ERROR_VALUE_FAILED;
78 goto end;
79 }
80 elm_obj_map_user_agent_set(obj, cval);
81 end:
82 eina_value_flush(&val);
83 return r;
84}
85
86EOAPI EFL_VOID_FUNC_BODYV(elm_obj_map_user_agent_set, EFL_FUNC_CALL(user_agent), const char *user_agent);
87
88const char *_elm_map_user_agent_get(const Eo *obj, Elm_Map_Data *pd);
89
90
91static Eina_Value
92__eolian_elm_map_user_agent_get_reflect(Eo *obj)
93{
94 const char *val = elm_obj_map_user_agent_get(obj);
95 return eina_value_string_init(val);
96}
97
98EOAPI EFL_FUNC_BODY_CONST(elm_obj_map_user_agent_get, const char *, NULL);
99
100void _elm_map_zoom_max_set(Eo *obj, Elm_Map_Data *pd, int zoom);
101
102
103static Eina_Error
104__eolian_elm_map_zoom_max_set_reflect(Eo *obj, Eina_Value val)
105{
106 Eina_Error r = 0; int cval;
107 if (!eina_value_int_convert(&val, &cval))
108 {
109 r = EINA_ERROR_VALUE_FAILED;
110 goto end;
111 }
112 elm_obj_map_zoom_max_set(obj, cval);
113 end:
114 eina_value_flush(&val);
115 return r;
116}
117
118EOAPI EFL_VOID_FUNC_BODYV(elm_obj_map_zoom_max_set, EFL_FUNC_CALL(zoom), int zoom);
119
120int _elm_map_zoom_max_get(const Eo *obj, Elm_Map_Data *pd);
121
122
123static Eina_Value
124__eolian_elm_map_zoom_max_get_reflect(Eo *obj)
125{
126 int val = elm_obj_map_zoom_max_get(obj);
127 return eina_value_int_init(val);
128}
129
130EOAPI EFL_FUNC_BODY_CONST(elm_obj_map_zoom_max_get, int, -1 /* +1 */);
131
132void _elm_map_region_get(const Eo *obj, Elm_Map_Data *pd, double *lon, double *lat);
133
134EOAPI EFL_VOID_FUNC_BODYV_CONST(elm_obj_map_region_get, EFL_FUNC_CALL(lon, lat), double *lon, double *lat);
135
136Eina_List *_elm_map_overlays_get(const Eo *obj, Elm_Map_Data *pd);
137
138EOAPI EFL_FUNC_BODY_CONST(elm_obj_map_overlays_get, Eina_List *, NULL);
139
140void _elm_map_tile_load_status_get(const Eo *obj, Elm_Map_Data *pd, int *try_num, int *finish_num);
141
142EOAPI EFL_VOID_FUNC_BODYV_CONST(elm_obj_map_tile_load_status_get, EFL_FUNC_CALL(try_num, finish_num), int *try_num, int *finish_num);
143
144void _elm_map_source_set(Eo *obj, Elm_Map_Data *pd, Elm_Map_Source_Type type, const char *source_name);
145
146EOAPI EFL_VOID_FUNC_BODYV(elm_obj_map_source_set, EFL_FUNC_CALL(type, source_name), Elm_Map_Source_Type type, const char *source_name);
147
148const char *_elm_map_source_get(const Eo *obj, Elm_Map_Data *pd, Elm_Map_Source_Type type);
149
150EOAPI EFL_FUNC_BODYV_CONST(elm_obj_map_source_get, const char *, NULL, EFL_FUNC_CALL(type), Elm_Map_Source_Type type);
151
152Elm_Map_Route *_elm_map_route_add(Eo *obj, Elm_Map_Data *pd, 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);
153
154EOAPI EFL_FUNC_BODYV(elm_obj_map_route_add, Elm_Map_Route *, NULL, EFL_FUNC_CALL(type, method, flon, flat, tlon, tlat, route_cb, data), 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);
155
156Efl_Canvas_Object *_elm_map_track_add(Eo *obj, Elm_Map_Data *pd, void *emap);
157
158EOAPI EFL_FUNC_BODYV(elm_obj_map_track_add, Efl_Canvas_Object *, NULL, EFL_FUNC_CALL(emap), void *emap);
159
160void _elm_map_region_to_canvas_convert(const Eo *obj, Elm_Map_Data *pd, double lon, double lat, int *x, int *y);
161
162EOAPI EFL_VOID_FUNC_BODYV_CONST(elm_obj_map_region_to_canvas_convert, EFL_FUNC_CALL(lon, lat, x, y), double lon, double lat, int *x, int *y);
163
164Elm_Map_Overlay *_elm_map_overlay_circle_add(Eo *obj, Elm_Map_Data *pd, double lon, double lat, double radius);
165
166EOAPI EFL_FUNC_BODYV(elm_obj_map_overlay_circle_add, Elm_Map_Overlay *, NULL, EFL_FUNC_CALL(lon, lat, radius), double lon, double lat, double radius);
167
168Elm_Map_Overlay *_elm_map_overlay_class_add(Eo *obj, Elm_Map_Data *pd);
169
170EOAPI EFL_FUNC_BODY(elm_obj_map_overlay_class_add, Elm_Map_Overlay *, NULL);
171
172Elm_Map_Overlay *_elm_map_overlay_bubble_add(Eo *obj, Elm_Map_Data *pd);
173
174EOAPI EFL_FUNC_BODY(elm_obj_map_overlay_bubble_add, Elm_Map_Overlay *, NULL);
175
176const char **_elm_map_sources_get(const Eo *obj, Elm_Map_Data *pd, Elm_Map_Source_Type type);
177
178EOAPI EFL_FUNC_BODYV_CONST(elm_obj_map_sources_get, const char **, NULL, EFL_FUNC_CALL(type), Elm_Map_Source_Type type);
179
180Elm_Map_Overlay *_elm_map_overlay_polygon_add(Eo *obj, Elm_Map_Data *pd);
181
182EOAPI EFL_FUNC_BODY(elm_obj_map_overlay_polygon_add, Elm_Map_Overlay *, NULL);
183
184Elm_Map_Overlay *_elm_map_overlay_line_add(Eo *obj, Elm_Map_Data *pd, double flon, double flat, double tlon, double tlat);
185
186EOAPI EFL_FUNC_BODYV(elm_obj_map_overlay_line_add, Elm_Map_Overlay *, NULL, EFL_FUNC_CALL(flon, flat, tlon, tlat), double flon, double flat, double tlon, double tlat);
187
188void _elm_map_region_show(Eo *obj, Elm_Map_Data *pd, double lon, double lat);
189
190EOAPI EFL_VOID_FUNC_BODYV(elm_obj_map_region_show, EFL_FUNC_CALL(lon, lat), double lon, double lat);
191
192Elm_Map_Name *_elm_map_name_add(const Eo *obj, Elm_Map_Data *pd, const char *address, double lon, double lat, Elm_Map_Name_Cb name_cb, void *data);
193
194EOAPI EFL_FUNC_BODYV_CONST(elm_obj_map_name_add, Elm_Map_Name *, NULL, EFL_FUNC_CALL(address, lon, lat, name_cb, data), const char *address, double lon, double lat, Elm_Map_Name_Cb name_cb, void *data);
195
196void _elm_map_name_search(const Eo *obj, Elm_Map_Data *pd, const char *address, Elm_Map_Name_List_Cb name_cb, void *data);
197
198EOAPI EFL_VOID_FUNC_BODYV_CONST(elm_obj_map_name_search, EFL_FUNC_CALL(address, name_cb, data), const char *address, Elm_Map_Name_List_Cb name_cb, void *data);
199
200void _elm_map_map_region_bring_in(Eo *obj, Elm_Map_Data *pd, double lon, double lat);
201
202EOAPI EFL_VOID_FUNC_BODYV(elm_obj_map_region_bring_in, EFL_FUNC_CALL(lon, lat), double lon, double lat);
203
204void _elm_map_region_zoom_bring_in(Eo *obj, Elm_Map_Data *pd, int zoom, double lon, double lat);
205
206EOAPI EFL_VOID_FUNC_BODYV(elm_obj_map_region_zoom_bring_in, EFL_FUNC_CALL(zoom, lon, lat), int zoom, double lon, double lat);
207
208void _elm_map_track_remove(Eo *obj, Elm_Map_Data *pd, Efl_Canvas_Object *route);
209
210EOAPI EFL_VOID_FUNC_BODYV(elm_obj_map_track_remove, EFL_FUNC_CALL(route), Efl_Canvas_Object *route);
211
212Elm_Map_Overlay *_elm_map_overlay_route_add(Eo *obj, Elm_Map_Data *pd, const Elm_Map_Route *route);
213
214EOAPI EFL_FUNC_BODYV(elm_obj_map_overlay_route_add, Elm_Map_Overlay *, NULL, EFL_FUNC_CALL(route), const Elm_Map_Route *route);
215
216Elm_Map_Overlay *_elm_map_overlay_scale_add(Eo *obj, Elm_Map_Data *pd, int x, int y);
217
218EOAPI EFL_FUNC_BODYV(elm_obj_map_overlay_scale_add, Elm_Map_Overlay *, NULL, EFL_FUNC_CALL(x, y), int x, int y);
219
220Elm_Map_Overlay *_elm_map_overlay_add(Eo *obj, Elm_Map_Data *pd, double lon, double lat);
221
222EOAPI EFL_FUNC_BODYV(elm_obj_map_overlay_add, Elm_Map_Overlay *, NULL, EFL_FUNC_CALL(lon, lat), double lon, double lat);
223
224void _elm_map_canvas_to_region_convert(const Eo *obj, Elm_Map_Data *pd, int x, int y, double *lon, double *lat);
225
226EOAPI EFL_VOID_FUNC_BODYV_CONST(elm_obj_map_canvas_to_region_convert, EFL_FUNC_CALL(x, y, lon, lat), int x, int y, double *lon, double *lat);
227
228Efl_Object *_elm_map_efl_object_constructor(Eo *obj, Elm_Map_Data *pd);
229
230
231void _elm_map_efl_object_invalidate(Eo *obj, Elm_Map_Data *pd);
232
233
234void _elm_map_efl_gfx_entity_position_set(Eo *obj, Elm_Map_Data *pd, Eina_Position2D pos);
235
236
237void _elm_map_efl_gfx_entity_size_set(Eo *obj, Elm_Map_Data *pd, Eina_Size2D size);
238
239
240void _elm_map_efl_canvas_group_group_member_add(Eo *obj, Elm_Map_Data *pd, Efl_Canvas_Object *sub_obj);
241
242
243Eina_Error _elm_map_efl_ui_widget_theme_apply(Eo *obj, Elm_Map_Data *pd);
244
245
246Eina_Bool _elm_map_efl_ui_focus_object_on_focus_update(Eo *obj, Elm_Map_Data *pd);
247
248
249Eina_Bool _elm_map_efl_ui_widget_widget_input_event_handler(Eo *obj, Elm_Map_Data *pd, const Efl_Event *eo_event, Efl_Canvas_Object *source);
250
251
252const Efl_Access_Action_Data *_elm_map_efl_access_widget_action_elm_actions_get(const Eo *obj, Elm_Map_Data *pd);
253
254
255void _elm_map_efl_ui_zoom_zoom_level_set(Eo *obj, Elm_Map_Data *pd, double zoom);
256
257
258double _elm_map_efl_ui_zoom_zoom_level_get(const Eo *obj, Elm_Map_Data *pd);
259
260
261void _elm_map_efl_ui_zoom_zoom_mode_set(Eo *obj, Elm_Map_Data *pd, Efl_Ui_Zoom_Mode mode);
262
263
264Efl_Ui_Zoom_Mode _elm_map_efl_ui_zoom_zoom_mode_get(const Eo *obj, Elm_Map_Data *pd);
265
266
267void _elm_map_efl_ui_zoom_zoom_animation_set(Eo *obj, Elm_Map_Data *pd, Eina_Bool paused);
268
269
270Eina_Bool _elm_map_efl_ui_zoom_zoom_animation_get(const Eo *obj, Elm_Map_Data *pd);
271
272
273void _elm_map_elm_interface_scrollable_wheel_disabled_set(Eo *obj, Elm_Map_Data *pd, Eina_Bool disabled);
274
275
276static Eina_Bool
277_elm_map_class_initializer(Efl_Class *klass)
278{
279 const Efl_Object_Ops *opsp = NULL;
280
281 const Efl_Object_Property_Reflection_Ops *ropsp = NULL;
282
283#ifndef ELM_MAP_EXTRA_OPS
284#define ELM_MAP_EXTRA_OPS
285#endif
286
287 EFL_OPS_DEFINE(ops,
288 EFL_OBJECT_OP_FUNC(elm_obj_map_zoom_min_set, _elm_map_zoom_min_set),
289 EFL_OBJECT_OP_FUNC(elm_obj_map_zoom_min_get, _elm_map_zoom_min_get),
290 EFL_OBJECT_OP_FUNC(elm_obj_map_rotate_set, _elm_map_map_rotate_set),
291 EFL_OBJECT_OP_FUNC(elm_obj_map_rotate_get, _elm_map_map_rotate_get),
292 EFL_OBJECT_OP_FUNC(elm_obj_map_user_agent_set, _elm_map_user_agent_set),
293 EFL_OBJECT_OP_FUNC(elm_obj_map_user_agent_get, _elm_map_user_agent_get),
294 EFL_OBJECT_OP_FUNC(elm_obj_map_zoom_max_set, _elm_map_zoom_max_set),
295 EFL_OBJECT_OP_FUNC(elm_obj_map_zoom_max_get, _elm_map_zoom_max_get),
296 EFL_OBJECT_OP_FUNC(elm_obj_map_region_get, _elm_map_region_get),
297 EFL_OBJECT_OP_FUNC(elm_obj_map_overlays_get, _elm_map_overlays_get),
298 EFL_OBJECT_OP_FUNC(elm_obj_map_tile_load_status_get, _elm_map_tile_load_status_get),
299 EFL_OBJECT_OP_FUNC(elm_obj_map_source_set, _elm_map_source_set),
300 EFL_OBJECT_OP_FUNC(elm_obj_map_source_get, _elm_map_source_get),
301 EFL_OBJECT_OP_FUNC(elm_obj_map_route_add, _elm_map_route_add),
302 EFL_OBJECT_OP_FUNC(elm_obj_map_track_add, _elm_map_track_add),
303 EFL_OBJECT_OP_FUNC(elm_obj_map_region_to_canvas_convert, _elm_map_region_to_canvas_convert),
304 EFL_OBJECT_OP_FUNC(elm_obj_map_overlay_circle_add, _elm_map_overlay_circle_add),
305 EFL_OBJECT_OP_FUNC(elm_obj_map_overlay_class_add, _elm_map_overlay_class_add),
306 EFL_OBJECT_OP_FUNC(elm_obj_map_overlay_bubble_add, _elm_map_overlay_bubble_add),
307 EFL_OBJECT_OP_FUNC(elm_obj_map_sources_get, _elm_map_sources_get),
308 EFL_OBJECT_OP_FUNC(elm_obj_map_overlay_polygon_add, _elm_map_overlay_polygon_add),
309 EFL_OBJECT_OP_FUNC(elm_obj_map_overlay_line_add, _elm_map_overlay_line_add),
310 EFL_OBJECT_OP_FUNC(elm_obj_map_region_show, _elm_map_region_show),
311 EFL_OBJECT_OP_FUNC(elm_obj_map_name_add, _elm_map_name_add),
312 EFL_OBJECT_OP_FUNC(elm_obj_map_name_search, _elm_map_name_search),
313 EFL_OBJECT_OP_FUNC(elm_obj_map_region_bring_in, _elm_map_map_region_bring_in),
314 EFL_OBJECT_OP_FUNC(elm_obj_map_region_zoom_bring_in, _elm_map_region_zoom_bring_in),
315 EFL_OBJECT_OP_FUNC(elm_obj_map_track_remove, _elm_map_track_remove),
316 EFL_OBJECT_OP_FUNC(elm_obj_map_overlay_route_add, _elm_map_overlay_route_add),
317 EFL_OBJECT_OP_FUNC(elm_obj_map_overlay_scale_add, _elm_map_overlay_scale_add),
318 EFL_OBJECT_OP_FUNC(elm_obj_map_overlay_add, _elm_map_overlay_add),
319 EFL_OBJECT_OP_FUNC(elm_obj_map_canvas_to_region_convert, _elm_map_canvas_to_region_convert),
320 EFL_OBJECT_OP_FUNC(efl_constructor, _elm_map_efl_object_constructor),
321 EFL_OBJECT_OP_FUNC(efl_invalidate, _elm_map_efl_object_invalidate),
322 EFL_OBJECT_OP_FUNC(efl_gfx_entity_position_set, _elm_map_efl_gfx_entity_position_set),
323 EFL_OBJECT_OP_FUNC(efl_gfx_entity_size_set, _elm_map_efl_gfx_entity_size_set),
324 EFL_OBJECT_OP_FUNC(efl_canvas_group_member_add, _elm_map_efl_canvas_group_group_member_add),
325 EFL_OBJECT_OP_FUNC(efl_ui_widget_theme_apply, _elm_map_efl_ui_widget_theme_apply),
326 EFL_OBJECT_OP_FUNC(efl_ui_focus_object_on_focus_update, _elm_map_efl_ui_focus_object_on_focus_update),
327 EFL_OBJECT_OP_FUNC(efl_ui_widget_input_event_handler, _elm_map_efl_ui_widget_widget_input_event_handler),
328 EFL_OBJECT_OP_FUNC(efl_access_widget_action_elm_actions_get, _elm_map_efl_access_widget_action_elm_actions_get),
329 EFL_OBJECT_OP_FUNC(efl_ui_zoom_level_set, _elm_map_efl_ui_zoom_zoom_level_set),
330 EFL_OBJECT_OP_FUNC(efl_ui_zoom_level_get, _elm_map_efl_ui_zoom_zoom_level_get),
331 EFL_OBJECT_OP_FUNC(efl_ui_zoom_mode_set, _elm_map_efl_ui_zoom_zoom_mode_set),
332 EFL_OBJECT_OP_FUNC(efl_ui_zoom_mode_get, _elm_map_efl_ui_zoom_zoom_mode_get),
333 EFL_OBJECT_OP_FUNC(efl_ui_zoom_animation_set, _elm_map_efl_ui_zoom_zoom_animation_set),
334 EFL_OBJECT_OP_FUNC(efl_ui_zoom_animation_get, _elm_map_efl_ui_zoom_zoom_animation_get),
335 EFL_OBJECT_OP_FUNC(elm_interface_scrollable_wheel_disabled_set, _elm_map_elm_interface_scrollable_wheel_disabled_set),
336 ELM_MAP_EXTRA_OPS
337 );
338 opsp = &ops;
339
340 static const Efl_Object_Property_Reflection refl_table[] = {
341 {"zoom_min", __eolian_elm_map_zoom_min_set_reflect, __eolian_elm_map_zoom_min_get_reflect},
342 {"user_agent", __eolian_elm_map_user_agent_set_reflect, __eolian_elm_map_user_agent_get_reflect},
343 {"zoom_max", __eolian_elm_map_zoom_max_set_reflect, __eolian_elm_map_zoom_max_get_reflect},
344 };
345 static const Efl_Object_Property_Reflection_Ops rops = {
346 refl_table, EINA_C_ARRAY_LENGTH(refl_table)
347 };
348 ropsp = &rops;
349
350 return efl_class_functions_set(klass, opsp, ropsp);
351}
352
353static const Efl_Class_Description _elm_map_class_desc = {
354 EO_VERSION,
355 "Elm.Map",
356 EFL_CLASS_TYPE_REGULAR,
357 sizeof(Elm_Map_Data),
358 _elm_map_class_initializer,
359 _elm_map_class_constructor,
360 NULL
361};
362
363EFL_DEFINE_CLASS(elm_map_class_get, &_elm_map_class_desc, EFL_UI_WIDGET_CLASS, ELM_INTERFACE_SCROLLABLE_MIXIN, EFL_ACCESS_WIDGET_ACTION_MIXIN, EFL_UI_CLICKABLE_INTERFACE, EFL_UI_LEGACY_INTERFACE, EFL_UI_ZOOM_INTERFACE, NULL);
364
365#include "elm_map_eo.legacy.c"
diff --git a/src/lib/elementary/elm_map_eo.h b/src/lib/elementary/elm_map_eo.h
new file mode 100644
index 0000000..d33e955
--- /dev/null
+++ b/src/lib/elementary/elm_map_eo.h
@@ -0,0 +1,731 @@
1#ifndef _ELM_MAP_EO_H_
2#define _ELM_MAP_EO_H_
3
4#ifndef _ELM_MAP_EO_CLASS_TYPE
5#define _ELM_MAP_EO_CLASS_TYPE
6
7typedef Eo Elm_Map;
8
9#endif
10
11#ifndef _ELM_MAP_EO_TYPES
12#define _ELM_MAP_EO_TYPES
13
14/**
15 * @brief Set type of a external source (provider).
16 *
17 * See @ref elm_obj_map_sources_get() See @ref elm_obj_map_source_get() See
18 * @ref elm_obj_map_source_set()
19 *
20 * @ingroup Elm_Map
21 */
22typedef enum
23{
24 ELM_MAP_SOURCE_TYPE_TILE = 0, /**< Map tile provider. */
25 ELM_MAP_SOURCE_TYPE_ROUTE, /**< Route service provider. */
26 ELM_MAP_SOURCE_TYPE_NAME, /**< Name service provider. */
27 ELM_MAP_SOURCE_TYPE_LAST /**< Sentinel value to indicate last enum field
28 * during iteration */
29} Elm_Map_Source_Type;
30
31/**
32 * @brief Set type of transport used on route.
33 *
34 * See @ref elm_obj_map_route_add()
35 *
36 * @ingroup Elm_Map
37 */
38typedef enum
39{
40 ELM_MAP_ROUTE_TYPE_MOTOCAR = 0, /**< Route should consider an automobile will
41 * be used. */
42 ELM_MAP_ROUTE_TYPE_BICYCLE, /**< Route should consider a bicycle will be used
43 * by the user. */
44 ELM_MAP_ROUTE_TYPE_FOOT, /**< Route should consider user will be walking. */
45 ELM_MAP_ROUTE_TYPE_LAST /**< Sentinel value to indicate last enum field during
46 * iteration */
47} Elm_Map_Route_Type;
48
49/**
50 * @brief Set the routing method, what should be prioritized, time or distance.
51 *
52 * See @ref elm_obj_map_route_add()
53 *
54 * @ingroup Elm_Map
55 */
56typedef enum
57{
58 ELM_MAP_ROUTE_METHOD_FASTEST = 0, /**< Route should prioritize time. */
59 ELM_MAP_ROUTE_METHOD_SHORTEST, /**< Route should prioritize distance. */
60 ELM_MAP_ROUTE_METHOD_LAST /**< Sentinel value to indicate last enum field
61 * during iteration */
62} Elm_Map_Route_Method;
63
64
65#endif
66/** Elementary map class
67 *
68 * @ingroup Elm_Map
69 */
70#define ELM_MAP_CLASS elm_map_class_get()
71
72EWAPI const Efl_Class *elm_map_class_get(void);
73
74/**
75 * @brief Set the minimum zoom of the source.
76 *
77 * @param[in] obj The object.
78 * @param[in] zoom Minimum zoom value to be used.
79 *
80 * @ingroup Elm_Map
81 */
82EOAPI void elm_obj_map_zoom_min_set(Eo *obj, int zoom);
83
84/**
85 * @brief Get the minimum zoom of the source.
86 *
87 * @param[in] obj The object.
88 *
89 * @return Minimum zoom value to be used.
90 *
91 * @ingroup Elm_Map
92 */
93EOAPI int elm_obj_map_zoom_min_get(const Eo *obj);
94
95/**
96 * @brief Rotate the map.
97 *
98 * @param[in] obj The object.
99 * @param[in] degree Angle from 0.0 to 360.0 to rotate around Z axis.
100 * @param[in] cx Rotation's center horizontal position.
101 * @param[in] cy Rotation's center vertical position.
102 *
103 * @ingroup Elm_Map
104 */
105EOAPI void elm_obj_map_rotate_set(Eo *obj, double degree, int cx, int cy);
106
107/**
108 * @brief Get the rotate degree of the map.
109 *
110 * @param[in] obj The object.
111 * @param[out] degree Angle from 0.0 to 360.0 to rotate around Z axis.
112 * @param[out] cx Rotation's center horizontal position.
113 * @param[out] cy Rotation's center vertical position.
114 *
115 * @ingroup Elm_Map
116 */
117EOAPI void elm_obj_map_rotate_get(const Eo *obj, double *degree, int *cx, int *cy);
118
119/**
120 * @brief Set the user agent used by the map object to access routing services.
121 *
122 * User agent is a client application implementing a network protocol used in
123 * communications within a clientserver distributed computing system
124 *
125 * The @c user_agent identification string will transmitted in a header field
126 * @c User-Agent.
127 *
128 * @param[in] obj The object.
129 * @param[in] user_agent The user agent to be used by the map.
130 *
131 * @ingroup Elm_Map
132 */
133EOAPI void elm_obj_map_user_agent_set(Eo *obj, const char *user_agent);
134
135/**
136 * @brief Get the user agent used by the map object.
137 *
138 * @param[in] obj The object.
139 *
140 * @return The user agent to be used by the map.
141 *
142 * @ingroup Elm_Map
143 */
144EOAPI const char *elm_obj_map_user_agent_get(const Eo *obj);
145
146/**
147 * @brief Set the maximum zoom of the source.
148 *
149 * @param[in] obj The object.
150 * @param[in] zoom Maximum zoom value to be used.
151 *
152 * @ingroup Elm_Map
153 */
154EOAPI void elm_obj_map_zoom_max_set(Eo *obj, int zoom);
155
156/**
157 * @brief Get the maximum zoom of the source.
158 *
159 * @param[in] obj The object.
160 *
161 * @return Maximum zoom value to be used.
162 *
163 * @ingroup Elm_Map
164 */
165EOAPI int elm_obj_map_zoom_max_get(const Eo *obj);
166
167/**
168 * @brief Get the current geographic coordinates of the map.
169 *
170 * This gets the current center coordinates of the map object. It can be set by
171 * @ref elm_obj_map_region_bring_in and @ref elm_obj_map_region_show.
172 *
173 * @param[in] obj The object.
174 * @param[out] lon Pointer to store longitude.
175 * @param[out] lat Pointer to store latitude.
176 *
177 * @ingroup Elm_Map
178 */
179EOAPI void elm_obj_map_region_get(const Eo *obj, double *lon, double *lat);
180
181/**
182 * @brief Return all overlays in the map object.
183 *
184 * This list includes group overlays also. So this can be changed dynamically
185 * while zooming and panning.
186 *
187 * @param[in] obj The object.
188 *
189 * @return The list of all overlays or @c null upon failure.
190 *
191 * @since 1.7
192 *
193 * @ingroup Elm_Map
194 */
195EOAPI Eina_List *elm_obj_map_overlays_get(const Eo *obj);
196
197/**
198 * @brief Get the information of tile load status.
199 *
200 * This gets the current tile loaded status for the map object.
201 *
202 * @param[in] obj The object.
203 * @param[out] try_num Pointer to store number of tiles download requested.
204 * @param[out] finish_num Pointer to store number of tiles successfully
205 * downloaded.
206 *
207 * @ingroup Elm_Map
208 */
209EOAPI void elm_obj_map_tile_load_status_get(const Eo *obj, int *try_num, int *finish_num);
210
211/**
212 * @brief Set the current source of the map for a specific type.
213 *
214 * Map widget retrieves tile images that composes the map from a web service.
215 * This web service can be set with this method for #ELM_MAP_SOURCE_TYPE_TILE
216 * type. A different service can return a different maps with different
217 * information and it can use different zoom values.
218 *
219 * Map widget provides route data based on a external web service. This web
220 * service can be set with this method for #ELM_MAP_SOURCE_TYPE_ROUTE type.
221 *
222 * Map widget also provide geoname data based on a external web service. This
223 * web service can be set with this method for #ELM_MAP_SOURCE_TYPE_NAME type.
224 *
225 * The @c source_name need to match one of the names provided by
226 * @ref elm_obj_map_sources_get.
227 *
228 * The current source can be get using @ref elm_obj_map_source_get.
229 *
230 * @param[in] obj The object.
231 * @param[in] type Source type.
232 * @param[in] source_name The source to be used.
233 *
234 * @ingroup Elm_Map
235 */
236EOAPI void elm_obj_map_source_set(Eo *obj, Elm_Map_Source_Type type, const char *source_name);
237
238/**
239 * @brief Get the name of currently used source for a specific type.
240 *
241 * @param[in] obj The object.
242 * @param[in] type Source type.
243 *
244 * @return The name of the source in use.
245 *
246 * @ingroup Elm_Map
247 */
248EOAPI const char *elm_obj_map_source_get(const Eo *obj, Elm_Map_Source_Type type);
249
250/**
251 * @brief Add a new route to the map object.
252 *
253 * A route will be traced by point on coordinates ($flat, @c flon) to point on
254 * coordinates ($tlat, @c tlon), using the route service set with
255 * @ref elm_obj_map_source_set.
256 *
257 * It will take @c type on consideration to define the route, depending if the
258 * user will be walking or driving, the route may vary. One of
259 * #ELM_MAP_ROUTE_TYPE_MOTOCAR, #ELM_MAP_ROUTE_TYPE_BICYCLE, or
260 * #ELM_MAP_ROUTE_TYPE_FOOT need to be used.
261 *
262 * Another parameter is what the route should prioritize, the minor distance or
263 * the less time to be spend on the route. So @c method should be one of
264 * #ELM_MAP_ROUTE_METHOD_SHORTEST or #ELM_MAP_ROUTE_METHOD_FASTEST.
265 *
266 * Routes created with this method can be deleted with @ref elm_map_route_del
267 * and distance can be get with @ref elm_map_route_distance_get.
268 *
269 * @param[in] obj The object.
270 * @param[in] type The type of transport to be considered when tracing a route.
271 * @param[in] method The routing method, what should be prioritized.
272 * @param[in] flon The start longitude.
273 * @param[in] flat The start latitude.
274 * @param[in] tlon The destination longitude.
275 * @param[in] tlat The destination latitude.
276 * @param[in] route_cb The route to be traced.
277 * @param[in] data A pointer of user data.
278 *
279 * @return The created route or @c null upon failure.
280 *
281 * @ingroup Elm_Map
282 */
283EOAPI Elm_Map_Route *elm_obj_map_route_add(Eo *obj, 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);
284
285/**
286 * @brief Add a track on the map.
287 *
288 * @param[in] obj The object.
289 * @param[in] emap The emap route object.
290 *
291 * @return The route object. This is an elm object of type Route.
292 *
293 * @ingroup Elm_Map
294 */
295EOAPI Efl_Canvas_Object *elm_obj_map_track_add(Eo *obj, void *emap);
296
297/**
298 * @brief Convert geographic coordinates (longitude, latitude) into canvas
299 * coordinates.
300 *
301 * This gets canvas x, y coordinates from longitude and latitude. The canvas
302 * coordinates mean x, y coordinate from current viewport.
303 *
304 * @param[in] obj The object.
305 * @param[in] lon The longitude to convert.
306 * @param[in] lat The latitude to convert.
307 * @param[out] x A pointer to horizontal coordinate.
308 * @param[out] y A pointer to vertical coordinate.
309 *
310 * @ingroup Elm_Map
311 */
312EOAPI void elm_obj_map_region_to_canvas_convert(const Eo *obj, double lon, double lat, int *x, int *y);
313
314/**
315 * @brief Add a new circle overlay to the map object. This overlay has a circle
316 * type.
317 *
318 * Overlay created with this method can be deleted with @ref
319 * elm_map_overlay_del.
320 *
321 * @param[in] obj The object.
322 * @param[in] lon The center longitude.
323 * @param[in] lat The center latitude.
324 * @param[in] radius The pixel length of radius.
325 *
326 * @return The created overlay or @c null upon failure.
327 *
328 * @ingroup Elm_Map
329 */
330EOAPI Elm_Map_Overlay *elm_obj_map_overlay_circle_add(Eo *obj, double lon, double lat, double radius);
331
332/**
333 * @brief Add a new class overlay to the map object. This overlay has a class
334 * type.
335 *
336 * This overlay is not shown before overlay members are appended. if overlay
337 * members in the same class are close, group overlays are created. If they are
338 * far away, group overlays are hidden. When group overlays are shown, they
339 * have default style layouts at first.
340 *
341 * You can change the state (hidden, paused, etc.) or set the content or icon
342 * of the group overlays by chaning the state of the class overlay. Do not
343 * modify the group overlay itself.
344 *
345 * Also these changes have a influence on the overlays in the same class even
346 * if each overlay is alone and is not grouped.
347 *
348 * @param[in] obj The object.
349 *
350 * @return The created overlay or @c null upon failure.
351 *
352 * @ingroup Elm_Map
353 */
354EOAPI Elm_Map_Overlay *elm_obj_map_overlay_class_add(Eo *obj);
355
356/**
357 * @brief Add a new bubble overlay to the map object. This overlay has a bubble
358 * type.
359 *
360 * A bubble will not be displayed before geographic coordinates are set or any
361 * other overlays are followed.
362 *
363 * This overlay has a bubble style layout and icon or content can not be set.
364 *
365 * Overlay created with this method can be deleted with @ref
366 * elm_map_overlay_del.
367 *
368 * @param[in] obj The object.
369 *
370 * @return The created overlay or @c null upon failure.
371 *
372 * @ingroup Elm_Map
373 */
374EOAPI Elm_Map_Overlay *elm_obj_map_overlay_bubble_add(Eo *obj);
375
376/**
377 * @brief Get the names of available sources for a specific type.
378 *
379 * It will provide a list with all available sources. Current source can be set
380 * by @ref elm_obj_map_source_set, or get with @ref elm_obj_map_source_get.
381 *
382 * At least available sources of tile type are "Mapnik", "Osmarender",
383 * "CycleMap" and "Maplint".
384 *
385 * At least available sources of route type are "Yours".
386 *
387 * At least available sources of name type are "Nominatim".
388 *
389 * @param[in] obj The object.
390 * @param[in] type Source type.
391 *
392 * @return The char pointer array of source names.
393 *
394 * @ingroup Elm_Map
395 */
396EOAPI const char **elm_obj_map_sources_get(const Eo *obj, Elm_Map_Source_Type type);
397
398/**
399 * @brief Add a new polygon overlay to the map object. This overlay has a
400 * polygon type.
401 *
402 * At least 3 regions should be added to show the polygon overlay.
403 *
404 * Overlay created with this method can be deleted with @ref
405 * elm_map_overlay_del.
406 *
407 * @param[in] obj The object.
408 *
409 * @return The created overlay or @c null upon failure.
410 *
411 * @ingroup Elm_Map
412 */
413EOAPI Elm_Map_Overlay *elm_obj_map_overlay_polygon_add(Eo *obj);
414
415/**
416 * @brief Add a new line overlay to the map object. This overlay has a line
417 * type.
418 *
419 * Overlay created with this method can be deleted with @ref
420 * elm_map_overlay_del.
421 *
422 * @param[in] obj The object.
423 * @param[in] flon The start longitude.
424 * @param[in] flat The start latitude.
425 * @param[in] tlon The destination longitude.
426 * @param[in] tlat The destination latitude.
427 *
428 * @return The created overlay or @c null upon failure.
429 *
430 * @ingroup Elm_Map
431 */
432EOAPI Elm_Map_Overlay *elm_obj_map_overlay_line_add(Eo *obj, double flon, double flat, double tlon, double tlat);
433
434/**
435 * @brief Show the given coordinates at the center of the map, immediately.
436 *
437 * This causes map to redraw its viewport's contents to the region containing
438 * the given @c lat and @c lon, that will be moved to the center of the map.
439 *
440 * See @ref elm_obj_map_region_bring_in for a function to move with animation.
441 *
442 * @param[in] obj The object.
443 * @param[in] lon Longitude to center at.
444 * @param[in] lat Latitude to center at.
445 *
446 * @ingroup Elm_Map
447 */
448EOAPI void elm_obj_map_region_show(Eo *obj, double lon, double lat);
449
450/**
451 * @brief Request a address or geographic coordinates(longitude, latitude) from
452 * a given address or geographic coordinate(longitude, latitude).
453 *
454 * If you want to get address from geographic coordinates, set input @c address
455 * as @c null and set @c lon, @c lat as you want to convert. If address is set
456 * except NULL, @c lon and @c lat are checked.
457 *
458 * To get the string for this address, @ref elm_map_name_address_get should be
459 * used after callback or "name,loaded" signal is called.
460 *
461 * To get the longitude and latitude, @ref elm_map_region_get should be used.
462 *
463 * @param[in] obj The object.
464 * @param[in] address The address.
465 * @param[in] lon The longitude.
466 * @param[in] lat The latitude.
467 * @param[in] name_cb The callback function.
468 * @param[in] data The user callback data.
469 *
470 * @return A #Elm_Map_Name handle for this coordinate.
471 *
472 * @ingroup Elm_Map
473 */
474EOAPI Elm_Map_Name *elm_obj_map_name_add(const Eo *obj, const char *address, double lon, double lat, Elm_Map_Name_Cb name_cb, void *data);
475
476/**
477 * @brief Requests a list of addresses corresponding to a given name.
478 *
479 * @internal
480 *
481 * @param[in] obj The object.
482 * @param[in] address The address.
483 * @param[in] name_cb The callback function.
484 * @param[in] data The user callback data.
485 *
486 * @since 1.8
487 *
488 * @ingroup Elm_Map
489 */
490EOAPI void elm_obj_map_name_search(const Eo *obj, const char *address, Elm_Map_Name_List_Cb name_cb, void *data);
491
492/**
493 * @brief Animatedly bring in given coordinates to the center of the map.
494 *
495 * This causes map to jump to the given @c lat and @c lon coordinates and show
496 * it (by scrolling) in the center of the viewport, if it is not already
497 * centered. This will use animation to do so and take a period of time to
498 * complete.
499 *
500 * See @ref elm_obj_map_region_show for a function to avoid animation.
501 *
502 * @param[in] obj The object.
503 * @param[in] lon Longitude to center at.
504 * @param[in] lat Latitude to center at.
505 *
506 * @ingroup Elm_Map
507 */
508EOAPI void elm_obj_map_region_bring_in(Eo *obj, double lon, double lat);
509
510/**
511 * @brief Animatedly set the zoom level of the map and bring in given
512 * coordinates to the center of the map.
513 *
514 * This causes map to zoom into specific zoom level and also move to the given
515 * @c lat and @c lon coordinates and show it (by scrolling) in the center of
516 * the viewport concurrently.
517 *
518 * See also @ref elm_obj_map_region_bring_in.
519 *
520 * @param[in] obj The object.
521 * @param[in] zoom The zoom level to set.
522 * @param[in] lon Longitude to center at.
523 * @param[in] lat Latitude to center at.
524 *
525 * @since 1.11
526 *
527 * @ingroup Elm_Map
528 */
529EOAPI void elm_obj_map_region_zoom_bring_in(Eo *obj, int zoom, double lon, double lat);
530
531/**
532 * @brief Remove a track from the map.
533 *
534 * @param[in] obj The object.
535 * @param[in] route The track to remove.
536 *
537 * @ingroup Elm_Map
538 */
539EOAPI void elm_obj_map_track_remove(Eo *obj, Efl_Canvas_Object *route);
540
541/**
542 * @brief Add a new route overlay to the map object. This overlay has a route
543 * type.
544 *
545 * This overlay has a route style layout and icon or content can not be set.
546 *
547 * The color scheme can be changed by @ref elm_map_overlay_content_set.
548 *
549 * Overlay created with this method can be deleted with @ref
550 * elm_map_overlay_del.
551 *
552 * @param[in] obj The object.
553 * @param[in] route The route object to make a overlay.
554 *
555 * @return The created overlay or @c null upon failure.
556 *
557 * @ingroup Elm_Map
558 */
559EOAPI Elm_Map_Overlay *elm_obj_map_overlay_route_add(Eo *obj, const Elm_Map_Route *route);
560
561/**
562 * @brief Add a new scale overlay to the map object. This overlay has a scale
563 * type.
564 *
565 * The scale overlay shows the ratio of a distance on the map to the
566 * corresponding distance.
567 *
568 * Overlay created with this method can be deleted with @ref
569 * elm_map_overlay_del.
570 *
571 * @param[in] obj The object.
572 * @param[in] x horizontal pixel coordinate.
573 * @param[in] y vertical pixel coordinate.
574 *
575 * @return The created overlay or @c null upon failure.
576 *
577 * @ingroup Elm_Map
578 */
579EOAPI Elm_Map_Overlay *elm_obj_map_overlay_scale_add(Eo *obj, int x, int y);
580
581/**
582 * @brief Add a new overlay to the map object. This overlay has a default type.
583 *
584 * A overlay will be created and shown in a specific point of the map, defined
585 * by @c lon and @c lat.
586 *
587 * The created overlay has a default style layout before content or icon is
588 * set. If content or icon is set, those are displayed instead of default style
589 * layout.
590 *
591 * You can set by using @ref elm_map_overlay_content_set or @ref
592 * elm_map_overlay_icon_set. If @c null is set, default style is shown again.
593 *
594 * Overlay created with this method can be deleted by @ref elm_map_overlay_del.
595 *
596 * @param[in] obj The object.
597 * @param[in] lon The longitude of the overlay.
598 * @param[in] lat The latitude of the overlay.
599 *
600 * @return The created overlay or @c null upon failure.
601 *
602 * @ingroup Elm_Map
603 */
604EOAPI Elm_Map_Overlay *elm_obj_map_overlay_add(Eo *obj, double lon, double lat);
605
606/**
607 * @brief Convert canvas coordinates into geographic coordinates (longitude,
608 * latitude).
609 *
610 * This gets longitude and latitude from canvas x, y coordinates. The canvas
611 * coordinates mean x, y coordinate from current viewport.
612 *
613 * @param[in] obj The object.
614 * @param[in] x Horizontal coordinate of the point to convert.
615 * @param[in] y Vertical coordinate of the point to convert.
616 * @param[out] lon A pointer to the longitude.
617 * @param[out] lat A pointer to the latitude.
618 *
619 * @ingroup Elm_Map
620 */
621EOAPI void elm_obj_map_canvas_to_region_convert(const Eo *obj, int x, int y, double *lon, double *lat);
622
623EWAPI extern const Efl_Event_Description _ELM_MAP_EVENT_PRESS;
624
625/** Called when map was pressed
626 * @return Evas_Event_Mouse_Down
627 *
628 * @ingroup Elm_Map
629 */
630#define ELM_MAP_EVENT_PRESS (&(_ELM_MAP_EVENT_PRESS))
631
632EWAPI extern const Efl_Event_Description _ELM_MAP_EVENT_LOADED;
633
634/** Called when map loaded
635 *
636 * @ingroup Elm_Map
637 */
638#define ELM_MAP_EVENT_LOADED (&(_ELM_MAP_EVENT_LOADED))
639
640EWAPI extern const Efl_Event_Description _ELM_MAP_EVENT_TILE_LOAD;
641
642/** Called when title load started
643 *
644 * @ingroup Elm_Map
645 */
646#define ELM_MAP_EVENT_TILE_LOAD (&(_ELM_MAP_EVENT_TILE_LOAD))
647
648EWAPI extern const Efl_Event_Description _ELM_MAP_EVENT_TILE_LOADED;
649
650/** Called when title load finished
651 *
652 * @ingroup Elm_Map
653 */
654#define ELM_MAP_EVENT_TILE_LOADED (&(_ELM_MAP_EVENT_TILE_LOADED))
655
656EWAPI extern const Efl_Event_Description _ELM_MAP_EVENT_TILE_LOADED_FAIL;
657
658/** Called when title load failed
659 *
660 * @ingroup Elm_Map
661 */
662#define ELM_MAP_EVENT_TILE_LOADED_FAIL (&(_ELM_MAP_EVENT_TILE_LOADED_FAIL))
663
664EWAPI extern const Efl_Event_Description _ELM_MAP_EVENT_ROUTE_LOAD;
665
666/** Called when route load started
667 * @return Elm_Map_Route
668 *
669 * @ingroup Elm_Map
670 */
671#define ELM_MAP_EVENT_ROUTE_LOAD (&(_ELM_MAP_EVENT_ROUTE_LOAD))
672
673EWAPI extern const Efl_Event_Description _ELM_MAP_EVENT_ROUTE_LOADED;
674
675/** Called when route load finished
676 *
677 * @ingroup Elm_Map
678 */
679#define ELM_MAP_EVENT_ROUTE_LOADED (&(_ELM_MAP_EVENT_ROUTE_LOADED))
680
681EWAPI extern const Efl_Event_Description _ELM_MAP_EVENT_ROUTE_LOADED_FAIL;
682
683/** Called when route load failed
684 *
685 * @ingroup Elm_Map
686 */
687#define ELM_MAP_EVENT_ROUTE_LOADED_FAIL (&(_ELM_MAP_EVENT_ROUTE_LOADED_FAIL))
688
689EWAPI extern const Efl_Event_Description _ELM_MAP_EVENT_NAME_LOAD;
690
691/** Called when name load started
692 *
693 * @ingroup Elm_Map
694 */
695#define ELM_MAP_EVENT_NAME_LOAD (&(_ELM_MAP_EVENT_NAME_LOAD))
696
697EWAPI extern const Efl_Event_Description _ELM_MAP_EVENT_NAME_LOADED;
698
699/** Called when name load finished
700 *
701 * @ingroup Elm_Map
702 */
703#define ELM_MAP_EVENT_NAME_LOADED (&(_ELM_MAP_EVENT_NAME_LOADED))
704
705EWAPI extern const Efl_Event_Description _ELM_MAP_EVENT_NAME_LOADED_FAIL;
706
707/** Called when name load failed
708 *
709 * @ingroup Elm_Map
710 */
711#define ELM_MAP_EVENT_NAME_LOADED_FAIL (&(_ELM_MAP_EVENT_NAME_LOADED_FAIL))
712
713EWAPI extern const Efl_Event_Description _ELM_MAP_EVENT_OVERLAY_CLICKED;
714
715/** Called when overlay was clicked
716 * @return Elm_Map_Overlay
717 *
718 * @ingroup Elm_Map
719 */
720#define ELM_MAP_EVENT_OVERLAY_CLICKED (&(_ELM_MAP_EVENT_OVERLAY_CLICKED))
721
722EWAPI extern const Efl_Event_Description _ELM_MAP_EVENT_OVERLAY_DEL;
723
724/** Called when overlay was deleted
725 * @return Elm_Map_Overlay
726 *
727 * @ingroup Elm_Map
728 */
729#define ELM_MAP_EVENT_OVERLAY_DEL (&(_ELM_MAP_EVENT_OVERLAY_DEL))
730
731#endif
diff --git a/src/lib/elementary/elm_map_eo.legacy.c b/src/lib/elementary/elm_map_eo.legacy.c
new file mode 100644
index 0000000..a89ce86
--- /dev/null
+++ b/src/lib/elementary/elm_map_eo.legacy.c
@@ -0,0 +1,192 @@
1
2EAPI void
3elm_map_zoom_min_set(Elm_Map *obj, int zoom)
4{
5 elm_obj_map_zoom_min_set(obj, zoom);
6}
7
8EAPI int
9elm_map_zoom_min_get(const Elm_Map *obj)
10{
11 return elm_obj_map_zoom_min_get(obj);
12}
13
14EAPI void
15elm_map_rotate_set(Elm_Map *obj, double degree, int cx, int cy)
16{
17 elm_obj_map_rotate_set(obj, degree, cx, cy);
18}
19
20EAPI void
21elm_map_rotate_get(const Elm_Map *obj, double *degree, int *cx, int *cy)
22{
23 elm_obj_map_rotate_get(obj, degree, cx, cy);
24}
25
26EAPI void
27elm_map_user_agent_set(Elm_Map *obj, const char *user_agent)
28{
29 elm_obj_map_user_agent_set(obj, user_agent);
30}
31
32EAPI const char *
33elm_map_user_agent_get(const Elm_Map *obj)
34{
35 return elm_obj_map_user_agent_get(obj);
36}
37
38EAPI void
39elm_map_zoom_max_set(Elm_Map *obj, int zoom)
40{
41 elm_obj_map_zoom_max_set(obj, zoom);
42}
43
44EAPI int
45elm_map_zoom_max_get(const Elm_Map *obj)
46{
47 return elm_obj_map_zoom_max_get(obj);
48}
49
50EAPI void
51elm_map_region_get(const Elm_Map *obj, double *lon, double *lat)
52{
53 elm_obj_map_region_get(obj, lon, lat);
54}
55
56EAPI Eina_List *
57elm_map_overlays_get(const Elm_Map *obj)
58{
59 return elm_obj_map_overlays_get(obj);
60}
61
62EAPI void
63elm_map_tile_load_status_get(const Elm_Map *obj, int *try_num, int *finish_num)
64{
65 elm_obj_map_tile_load_status_get(obj, try_num, finish_num);
66}
67
68EAPI void
69elm_map_source_set(Elm_Map *obj, Elm_Map_Source_Type type, const char *source_name)
70{
71 elm_obj_map_source_set(obj, type, source_name);
72}
73
74EAPI const char *
75elm_map_source_get(const Elm_Map *obj, Elm_Map_Source_Type type)
76{
77 return elm_obj_map_source_get(obj, type);
78}
79
80EAPI Elm_Map_Route *
81elm_map_route_add(Elm_Map *obj, 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)
82{
83 return elm_obj_map_route_add(obj, type, method, flon, flat, tlon, tlat, route_cb, data);
84}
85
86EAPI Efl_Canvas_Object *
87elm_map_track_add(Elm_Map *obj, void *emap)
88{
89 return elm_obj_map_track_add(obj, emap);
90}
91
92EAPI void
93elm_map_region_to_canvas_convert(const Elm_Map *obj, double lon, double lat, int *x, int *y)
94{
95 elm_obj_map_region_to_canvas_convert(obj, lon, lat, x, y);
96}
97
98EAPI Elm_Map_Overlay *
99elm_map_overlay_circle_add(Elm_Map *obj, double lon, double lat, double radius)
100{
101 return elm_obj_map_overlay_circle_add(obj, lon, lat, radius);
102}
103
104EAPI Elm_Map_Overlay *
105elm_map_overlay_class_add(Elm_Map *obj)
106{
107 return elm_obj_map_overlay_class_add(obj);
108}
109
110EAPI Elm_Map_Overlay *
111elm_map_overlay_bubble_add(Elm_Map *obj)
112{
113 return elm_obj_map_overlay_bubble_add(obj);
114}
115
116EAPI const char **
117elm_map_sources_get(const Elm_Map *obj, Elm_Map_Source_Type type)
118{
119 return elm_obj_map_sources_get(obj, type);
120}
121
122EAPI Elm_Map_Overlay *
123elm_map_overlay_polygon_add(Elm_Map *obj)
124{
125 return elm_obj_map_overlay_polygon_add(obj);
126}
127
128EAPI Elm_Map_Overlay *
129elm_map_overlay_line_add(Elm_Map *obj, double flon, double flat, double tlon, double tlat)
130{
131 return elm_obj_map_overlay_line_add(obj, flon, flat, tlon, tlat);
132}
133
134EAPI void
135elm_map_region_show(Elm_Map *obj, double lon, double lat)
136{
137 elm_obj_map_region_show(obj, lon, lat);
138}
139
140EAPI Elm_Map_Name *
141elm_map_name_add(const Elm_Map *obj, const char *address, double lon, double lat, Elm_Map_Name_Cb name_cb, void *data)
142{
143 return elm_obj_map_name_add(obj, address, lon, lat, name_cb, data);
144}
145
146EAPI void
147elm_map_name_search(const Elm_Map *obj, const char *address, Elm_Map_Name_List_Cb name_cb, void *data)
148{
149 elm_obj_map_name_search(obj, address, name_cb, data);
150}
151
152EAPI void
153elm_map_region_bring_in(Elm_Map *obj, double lon, double lat)
154{
155 elm_obj_map_region_bring_in(obj, lon, lat);
156}
157
158EAPI void
159elm_map_region_zoom_bring_in(Elm_Map *obj, int zoom, double lon, double lat)
160{
161 elm_obj_map_region_zoom_bring_in(obj, zoom, lon, lat);
162}
163
164EAPI void
165elm_map_track_remove(Elm_Map *obj, Efl_Canvas_Object *route)
166{
167 elm_obj_map_track_remove(obj, route);
168}
169
170EAPI Elm_Map_Overlay *
171elm_map_overlay_route_add(Elm_Map *obj, const Elm_Map_Route *route)
172{
173 return elm_obj_map_overlay_route_add(obj, route);
174}
175
176EAPI Elm_Map_Overlay *
177elm_map_overlay_scale_add(Elm_Map *obj, int x, int y)
178{
179 return elm_obj_map_overlay_scale_add(obj, x, y);
180}
181
182EAPI Elm_Map_Overlay *
183elm_map_overlay_add(Elm_Map *obj, double lon, double lat)
184{
185 return elm_obj_map_overlay_add(obj, lon, lat);
186}
187
188EAPI void
189elm_map_canvas_to_region_convert(const Elm_Map *obj, int x, int y, double *lon, double *lat)
190{
191 elm_obj_map_canvas_to_region_convert(obj, x, y, lon, lat);
192}
diff --git a/src/lib/elementary/elm_map_eo.legacy.h b/src/lib/elementary/elm_map_eo.legacy.h
new file mode 100644
index 0000000..cd51009
--- /dev/null
+++ b/src/lib/elementary/elm_map_eo.legacy.h
@@ -0,0 +1,616 @@
1#ifndef _ELM_MAP_EO_LEGACY_H_
2#define _ELM_MAP_EO_LEGACY_H_
3
4#ifndef _ELM_MAP_EO_CLASS_TYPE
5#define _ELM_MAP_EO_CLASS_TYPE
6
7typedef Eo Elm_Map;
8
9#endif
10
11#ifndef _ELM_MAP_EO_TYPES
12#define _ELM_MAP_EO_TYPES
13
14/**
15 * @brief Set type of a external source (provider).
16 *
17 * See @ref elm_map_sources_get() See @ref elm_map_source_get() See
18 * @ref elm_map_source_set()
19 *
20 * @ingroup Elm_Map
21 */
22typedef enum
23{
24 ELM_MAP_SOURCE_TYPE_TILE = 0, /**< Map tile provider. */
25 ELM_MAP_SOURCE_TYPE_ROUTE, /**< Route service provider. */
26 ELM_MAP_SOURCE_TYPE_NAME, /**< Name service provider. */
27 ELM_MAP_SOURCE_TYPE_LAST /**< Sentinel value to indicate last enum field
28 * during iteration */
29} Elm_Map_Source_Type;
30
31/**
32 * @brief Set type of transport used on route.
33 *
34 * See @ref elm_map_route_add()
35 *
36 * @ingroup Elm_Map
37 */
38typedef enum
39{
40 ELM_MAP_ROUTE_TYPE_MOTOCAR = 0, /**< Route should consider an automobile will
41 * be used. */
42 ELM_MAP_ROUTE_TYPE_BICYCLE, /**< Route should consider a bicycle will be used
43 * by the user. */
44 ELM_MAP_ROUTE_TYPE_FOOT, /**< Route should consider user will be walking. */
45 ELM_MAP_ROUTE_TYPE_LAST /**< Sentinel value to indicate last enum field during
46 * iteration */
47} Elm_Map_Route_Type;
48
49/**
50 * @brief Set the routing method, what should be prioritized, time or distance.
51 *
52 * See @ref elm_map_route_add()
53 *
54 * @ingroup Elm_Map
55 */
56typedef enum
57{
58 ELM_MAP_ROUTE_METHOD_FASTEST = 0, /**< Route should prioritize time. */
59 ELM_MAP_ROUTE_METHOD_SHORTEST, /**< Route should prioritize distance. */
60 ELM_MAP_ROUTE_METHOD_LAST /**< Sentinel value to indicate last enum field
61 * during iteration */
62} Elm_Map_Route_Method;
63
64
65#endif
66
67/**
68 * @brief Set the minimum zoom of the source.
69 *
70 * @param[in] obj The object.
71 * @param[in] zoom Minimum zoom value to be used.
72 *
73 * @ingroup Elm_Map_Group
74 */
75EAPI void elm_map_zoom_min_set(Elm_Map *obj, int zoom);
76
77/**
78 * @brief Get the minimum zoom of the source.
79 *
80 * @param[in] obj The object.
81 *
82 * @return Minimum zoom value to be used.
83 *
84 * @ingroup Elm_Map_Group
85 */
86EAPI int elm_map_zoom_min_get(const Elm_Map *obj);
87
88/**
89 * @brief Rotate the map.
90 *
91 * @param[in] obj The object.
92 * @param[in] degree Angle from 0.0 to 360.0 to rotate around Z axis.
93 * @param[in] cx Rotation's center horizontal position.
94 * @param[in] cy Rotation's center vertical position.
95 *
96 * @ingroup Elm_Map_Group
97 */
98EAPI void elm_map_rotate_set(Elm_Map *obj, double degree, int cx, int cy);
99
100/**
101 * @brief Get the rotate degree of the map.
102 *
103 * @param[in] obj The object.
104 * @param[out] degree Angle from 0.0 to 360.0 to rotate around Z axis.
105 * @param[out] cx Rotation's center horizontal position.
106 * @param[out] cy Rotation's center vertical position.
107 *
108 * @ingroup Elm_Map_Group
109 */
110EAPI void elm_map_rotate_get(const Elm_Map *obj, double *degree, int *cx, int *cy);
111
112/**
113 * @brief Set the user agent used by the map object to access routing services.
114 *
115 * User agent is a client application implementing a network protocol used in
116 * communications within a clientserver distributed computing system
117 *
118 * The @c user_agent identification string will transmitted in a header field
119 * @c User-Agent.
120 *
121 * @param[in] obj The object.
122 * @param[in] user_agent The user agent to be used by the map.
123 *
124 * @ingroup Elm_Map_Group
125 */
126EAPI void elm_map_user_agent_set(Elm_Map *obj, const char *user_agent);
127
128/**
129 * @brief Get the user agent used by the map object.
130 *
131 * @param[in] obj The object.
132 *
133 * @return The user agent to be used by the map.
134 *
135 * @ingroup Elm_Map_Group
136 */
137EAPI const char *elm_map_user_agent_get(const Elm_Map *obj);
138
139/**
140 * @brief Set the maximum zoom of the source.
141 *
142 * @param[in] obj The object.
143 * @param[in] zoom Maximum zoom value to be used.
144 *
145 * @ingroup Elm_Map_Group
146 */
147EAPI void elm_map_zoom_max_set(Elm_Map *obj, int zoom);
148
149/**
150 * @brief Get the maximum zoom of the source.
151 *
152 * @param[in] obj The object.
153 *
154 * @return Maximum zoom value to be used.
155 *
156 * @ingroup Elm_Map_Group
157 */
158EAPI int elm_map_zoom_max_get(const Elm_Map *obj);
159
160/**
161 * @brief Get the current geographic coordinates of the map.
162 *
163 * This gets the current center coordinates of the map object. It can be set by
164 * @ref elm_map_region_bring_in and @ref elm_map_region_show.
165 *
166 * @param[in] obj The object.
167 * @param[out] lon Pointer to store longitude.
168 * @param[out] lat Pointer to store latitude.
169 *
170 * @ingroup Elm_Map_Group
171 */
172EAPI void elm_map_region_get(const Elm_Map *obj, double *lon, double *lat);
173
174/**
175 * @brief Return all overlays in the map object.
176 *
177 * This list includes group overlays also. So this can be changed dynamically
178 * while zooming and panning.
179 *
180 * @param[in] obj The object.
181 *
182 * @return The list of all overlays or @c null upon failure.
183 *
184 * @since 1.7
185 *
186 * @ingroup Elm_Map_Group
187 */
188EAPI Eina_List *elm_map_overlays_get(const Elm_Map *obj);
189
190/**
191 * @brief Get the information of tile load status.
192 *
193 * This gets the current tile loaded status for the map object.
194 *
195 * @param[in] obj The object.
196 * @param[out] try_num Pointer to store number of tiles download requested.
197 * @param[out] finish_num Pointer to store number of tiles successfully
198 * downloaded.
199 *
200 * @ingroup Elm_Map_Group
201 */
202EAPI void elm_map_tile_load_status_get(const Elm_Map *obj, int *try_num, int *finish_num);
203
204/**
205 * @brief Set the current source of the map for a specific type.
206 *
207 * Map widget retrieves tile images that composes the map from a web service.
208 * This web service can be set with this method for #ELM_MAP_SOURCE_TYPE_TILE
209 * type. A different service can return a different maps with different
210 * information and it can use different zoom values.
211 *
212 * Map widget provides route data based on a external web service. This web
213 * service can be set with this method for #ELM_MAP_SOURCE_TYPE_ROUTE type.
214 *
215 * Map widget also provide geoname data based on a external web service. This
216 * web service can be set with this method for #ELM_MAP_SOURCE_TYPE_NAME type.
217 *
218 * The @c source_name need to match one of the names provided by
219 * @ref elm_map_sources_get.
220 *
221 * The current source can be get using @ref elm_map_source_get.
222 *
223 * @param[in] obj The object.
224 * @param[in] type Source type.
225 * @param[in] source_name The source to be used.
226 *
227 * @ingroup Elm_Map_Group
228 */
229EAPI void elm_map_source_set(Elm_Map *obj, Elm_Map_Source_Type type, const char *source_name);
230
231/**
232 * @brief Get the name of currently used source for a specific type.
233 *
234 * @param[in] obj The object.
235 * @param[in] type Source type.
236 *
237 * @return The name of the source in use.
238 *
239 * @ingroup Elm_Map_Group
240 */
241EAPI const char *elm_map_source_get(const Elm_Map *obj, Elm_Map_Source_Type type);
242
243/**
244 * @brief Add a new route to the map object.
245 *
246 * A route will be traced by point on coordinates ($flat, @c flon) to point on
247 * coordinates ($tlat, @c tlon), using the route service set with
248 * @ref elm_map_source_set.
249 *
250 * It will take @c type on consideration to define the route, depending if the
251 * user will be walking or driving, the route may vary. One of
252 * #ELM_MAP_ROUTE_TYPE_MOTOCAR, #ELM_MAP_ROUTE_TYPE_BICYCLE, or
253 * #ELM_MAP_ROUTE_TYPE_FOOT need to be used.
254 *
255 * Another parameter is what the route should prioritize, the minor distance or
256 * the less time to be spend on the route. So @c method should be one of
257 * #ELM_MAP_ROUTE_METHOD_SHORTEST or #ELM_MAP_ROUTE_METHOD_FASTEST.
258 *
259 * Routes created with this method can be deleted with @ref elm_map_route_del
260 * and distance can be get with @ref elm_map_route_distance_get.
261 *
262 * @param[in] obj The object.
263 * @param[in] type The type of transport to be considered when tracing a route.
264 * @param[in] method The routing method, what should be prioritized.
265 * @param[in] flon The start longitude.
266 * @param[in] flat The start latitude.
267 * @param[in] tlon The destination longitude.
268 * @param[in] tlat The destination latitude.
269 * @param[in] route_cb The route to be traced.
270 * @param[in] data A pointer of user data.
271 *
272 * @return The created route or @c null upon failure.
273 *
274 * @ingroup Elm_Map_Group
275 */
276EAPI Elm_Map_Route *elm_map_route_add(Elm_Map *obj, 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);
277
278/**
279 * @brief Add a track on the map.
280 *
281 * @param[in] obj The object.
282 * @param[in] emap The emap route object.
283 *
284 * @return The route object. This is an elm object of type Route.
285 *
286 * @ingroup Elm_Map_Group
287 */
288EAPI Efl_Canvas_Object *elm_map_track_add(Elm_Map *obj, void *emap);
289
290/**
291 * @brief Convert geographic coordinates (longitude, latitude) into canvas
292 * coordinates.
293 *
294 * This gets canvas x, y coordinates from longitude and latitude. The canvas
295 * coordinates mean x, y coordinate from current viewport.
296 *
297 * @param[in] obj The object.
298 * @param[in] lon The longitude to convert.
299 * @param[in] lat The latitude to convert.
300 * @param[out] x A pointer to horizontal coordinate.
301 * @param[out] y A pointer to vertical coordinate.
302 *
303 * @ingroup Elm_Map_Group
304 */
305EAPI void elm_map_region_to_canvas_convert(const Elm_Map *obj, double lon, double lat, int *x, int *y);
306
307/**
308 * @brief Add a new circle overlay to the map object. This overlay has a circle
309 * type.
310 *
311 * Overlay created with this method can be deleted with @ref
312 * elm_map_overlay_del.
313 *
314 * @param[in] obj The object.
315 * @param[in] lon The center longitude.
316 * @param[in] lat The center latitude.
317 * @param[in] radius The pixel length of radius.
318 *
319 * @return The created overlay or @c null upon failure.
320 *
321 * @ingroup Elm_Map_Group
322 */
323EAPI Elm_Map_Overlay *elm_map_overlay_circle_add(Elm_Map *obj, double lon, double lat, double radius);
324
325/**
326 * @brief Add a new class overlay to the map object. This overlay has a class
327 * type.
328 *
329 * This overlay is not shown before overlay members are appended. if overlay
330 * members in the same class are close, group overlays are created. If they are
331 * far away, group overlays are hidden. When group overlays are shown, they
332 * have default style layouts at first.
333 *
334 * You can change the state (hidden, paused, etc.) or set the content or icon
335 * of the group overlays by chaning the state of the class overlay. Do not
336 * modify the group overlay itself.
337 *
338 * Also these changes have a influence on the overlays in the same class even
339 * if each overlay is alone and is not grouped.
340 *
341 * @param[in] obj The object.
342 *
343 * @return The created overlay or @c null upon failure.
344 *
345 * @ingroup Elm_Map_Group
346 */
347EAPI Elm_Map_Overlay *elm_map_overlay_class_add(Elm_Map *obj);
348
349/**
350 * @brief Add a new bubble overlay to the map object. This overlay has a bubble
351 * type.
352 *
353 * A bubble will not be displayed before geographic coordinates are set or any
354 * other overlays are followed.
355 *
356 * This overlay has a bubble style layout and icon or content can not be set.
357 *
358 * Overlay created with this method can be deleted with @ref
359 * elm_map_overlay_del.
360 *
361 * @param[in] obj The object.
362 *
363 * @return The created overlay or @c null upon failure.
364 *
365 * @ingroup Elm_Map_Group
366 */
367EAPI Elm_Map_Overlay *elm_map_overlay_bubble_add(Elm_Map *obj);
368
369/**
370 * @brief Get the names of available sources for a specific type.
371 *
372 * It will provide a list with all available sources. Current source can be set
373 * by @ref elm_map_source_set, or get with @ref elm_map_source_get.
374 *
375 * At least available sources of tile type are "Mapnik", "Osmarender",
376 * "CycleMap" and "Maplint".
377 *
378 * At least available sources of route type are "Yours".
379 *
380 * At least available sources of name type are "Nominatim".
381 *
382 * @param[in] obj The object.
383 * @param[in] type Source type.
384 *
385 * @return The char pointer array of source names.
386 *
387 * @ingroup Elm_Map_Group
388 */
389EAPI const char **elm_map_sources_get(const Elm_Map *obj, Elm_Map_Source_Type type);
390
391/**
392 * @brief Add a new polygon overlay to the map object. This overlay has a
393 * polygon type.
394 *
395 * At least 3 regions should be added to show the polygon overlay.
396 *
397 * Overlay created with this method can be deleted with @ref
398 * elm_map_overlay_del.
399 *
400 * @param[in] obj The object.
401 *
402 * @return The created overlay or @c null upon failure.
403 *
404 * @ingroup Elm_Map_Group
405 */
406EAPI Elm_Map_Overlay *elm_map_overlay_polygon_add(Elm_Map *obj);
407
408/**
409 * @brief Add a new line overlay to the map object. This overlay has a line
410 * type.
411 *
412 * Overlay created with this method can be deleted with @ref
413 * elm_map_overlay_del.
414 *
415 * @param[in] obj The object.
416 * @param[in] flon The start longitude.
417 * @param[in] flat The start latitude.
418 * @param[in] tlon The destination longitude.
419 * @param[in] tlat The destination latitude.
420 *
421 * @return The created overlay or @c null upon failure.
422 *
423 * @ingroup Elm_Map_Group
424 */
425EAPI Elm_Map_Overlay *elm_map_overlay_line_add(Elm_Map *obj, double flon, double flat, double tlon, double tlat);
426
427/**
428 * @brief Show the given coordinates at the center of the map, immediately.
429 *
430 * This causes map to redraw its viewport's contents to the region containing
431 * the given @c lat and @c lon, that will be moved to the center of the map.
432 *
433 * See @ref elm_map_region_bring_in for a function to move with animation.
434 *
435 * @param[in] obj The object.
436 * @param[in] lon Longitude to center at.
437 * @param[in] lat Latitude to center at.
438 *
439 * @ingroup Elm_Map_Group
440 */
441EAPI void elm_map_region_show(Elm_Map *obj, double lon, double lat);
442
443/**
444 * @brief Request a address or geographic coordinates(longitude, latitude) from
445 * a given address or geographic coordinate(longitude, latitude).
446 *
447 * If you want to get address from geographic coordinates, set input @c address
448 * as @c null and set @c lon, @c lat as you want to convert. If address is set
449 * except NULL, @c lon and @c lat are checked.
450 *
451 * To get the string for this address, @ref elm_map_name_address_get should be
452 * used after callback or "name,loaded" signal is called.
453 *
454 * To get the longitude and latitude, @ref elm_map_region_get should be used.
455 *
456 * @param[in] obj The object.
457 * @param[in] address The address.
458 * @param[in] lon The longitude.
459 * @param[in] lat The latitude.
460 * @param[in] name_cb The callback function.
461 * @param[in] data The user callback data.
462 *
463 * @return A #Elm_Map_Name handle for this coordinate.
464 *
465 * @ingroup Elm_Map_Group
466 */
467EAPI Elm_Map_Name *elm_map_name_add(const Elm_Map *obj, const char *address, double lon, double lat, Elm_Map_Name_Cb name_cb, void *data);
468
469/**
470 * @brief Requests a list of addresses corresponding to a given name.
471 *
472 * @internal
473 *
474 * @param[in] obj The object.
475 * @param[in] address The address.
476 * @param[in] name_cb The callback function.
477 * @param[in] data The user callback data.
478 *
479 * @since 1.8
480 *
481 * @ingroup Elm_Map_Group
482 */
483EAPI void elm_map_name_search(const Elm_Map *obj, const char *address, Elm_Map_Name_List_Cb name_cb, void *data);
484
485/**
486 * @brief Animatedly bring in given coordinates to the center of the map.
487 *
488 * This causes map to jump to the given @c lat and @c lon coordinates and show
489 * it (by scrolling) in the center of the viewport, if it is not already
490 * centered. This will use animation to do so and take a period of time to
491 * complete.
492 *
493 * See @ref elm_map_region_show for a function to avoid animation.
494 *
495 * @param[in] obj The object.
496 * @param[in] lon Longitude to center at.
497 * @param[in] lat Latitude to center at.
498 *
499 * @ingroup Elm_Map_Group
500 */
501EAPI void elm_map_region_bring_in(Elm_Map *obj, double lon, double lat);
502
503/**
504 * @brief Animatedly set the zoom level of the map and bring in given
505 * coordinates to the center of the map.
506 *
507 * This causes map to zoom into specific zoom level and also move to the given
508 * @c lat and @c lon coordinates and show it (by scrolling) in the center of
509 * the viewport concurrently.
510 *
511 * See also @ref elm_map_region_bring_in.
512 *
513 * @param[in] obj The object.
514 * @param[in] zoom The zoom level to set.
515 * @param[in] lon Longitude to center at.
516 * @param[in] lat Latitude to center at.
517 *
518 * @since 1.11
519 *
520 * @ingroup Elm_Map_Group
521 */
522EAPI void elm_map_region_zoom_bring_in(Elm_Map *obj, int zoom, double lon, double lat);
523
524/**
525 * @brief Remove a track from the map.
526 *
527 * @param[in] obj The object.
528 * @param[in] route The track to remove.
529 *
530 * @ingroup Elm_Map_Group
531 */
532EAPI void elm_map_track_remove(Elm_Map *obj, Efl_Canvas_Object *route);
533
534/**
535 * @brief Add a new route overlay to the map object. This overlay has a route
536 * type.
537 *
538 * This overlay has a route style layout and icon or content can not be set.
539 *
540 * The color scheme can be changed by @ref elm_map_overlay_content_set.
541 *
542 * Overlay created with this method can be deleted with @ref
543 * elm_map_overlay_del.
544 *
545 * @param[in] obj The object.
546 * @param[in] route The route object to make a overlay.
547 *
548 * @return The created overlay or @c null upon failure.
549 *
550 * @ingroup Elm_Map_Group
551 */
552EAPI Elm_Map_Overlay *elm_map_overlay_route_add(Elm_Map *obj, const Elm_Map_Route *route);
553
554/**
555 * @brief Add a new scale overlay to the map object. This overlay has a scale
556 * type.
557 *
558 * The scale overlay shows the ratio of a distance on the map to the
559 * corresponding distance.
560 *
561 * Overlay created with this method can be deleted with @ref
562 * elm_map_overlay_del.
563 *
564 * @param[in] obj The object.
565 * @param[in] x horizontal pixel coordinate.
566 * @param[in] y vertical pixel coordinate.
567 *
568 * @return The created overlay or @c null upon failure.
569 *
570 * @ingroup Elm_Map_Group
571 */
572EAPI Elm_Map_Overlay *elm_map_overlay_scale_add(Elm_Map *obj, int x, int y);
573
574/**
575 * @brief Add a new overlay to the map object. This overlay has a default type.
576 *
577 * A overlay will be created and shown in a specific point of the map, defined
578 * by @c lon and @c lat.
579 *
580 * The created overlay has a default style layout before content or icon is
581 * set. If content or icon is set, those are displayed instead of default style
582 * layout.
583 *
584 * You can set by using @ref elm_map_overlay_content_set or @ref
585 * elm_map_overlay_icon_set. If @c null is set, default style is shown again.
586 *
587 * Overlay created with this method can be deleted by @ref elm_map_overlay_del.
588 *
589 * @param[in] obj The object.
590 * @param[in] lon The longitude of the overlay.
591 * @param[in] lat The latitude of the overlay.
592 *
593 * @return The created overlay or @c null upon failure.
594 *
595 * @ingroup Elm_Map_Group
596 */
597EAPI Elm_Map_Overlay *elm_map_overlay_add(Elm_Map *obj, double lon, double lat);
598
599/**
600 * @brief Convert canvas coordinates into geographic coordinates (longitude,
601 * latitude).
602 *
603 * This gets longitude and latitude from canvas x, y coordinates. The canvas
604 * coordinates mean x, y coordinate from current viewport.
605 *
606 * @param[in] obj The object.
607 * @param[in] x Horizontal coordinate of the point to convert.
608 * @param[in] y Vertical coordinate of the point to convert.
609 * @param[out] lon A pointer to the longitude.
610 * @param[out] lat A pointer to the latitude.
611 *
612 * @ingroup Elm_Map_Group
613 */
614EAPI void elm_map_canvas_to_region_convert(const Elm_Map *obj, int x, int y, double *lon, double *lat);
615
616#endif
diff --git a/src/lib/elementary/elm_map_legacy.h b/src/lib/elementary/elm_map_legacy.h
index 758d661..37fffcb 100644
--- a/src/lib/elementary/elm_map_legacy.h
+++ b/src/lib/elementary/elm_map_legacy.h
@@ -172,4 +172,4 @@ EAPI void elm_map_paused_set(Evas_Object *obj, Eina_Bool paused);
172 */ 172 */
173EAPI Eina_Bool elm_map_paused_get(const Evas_Object *obj); 173EAPI Eina_Bool elm_map_paused_get(const Evas_Object *obj);
174 174
175#include "elm_map.eo.legacy.h" 175#include "elm_map_eo.legacy.h"
diff --git a/src/lib/elementary/elm_map_pan.eo b/src/lib/elementary/elm_map_pan.eo
deleted file mode 100644
index 61684b6..0000000
--- a/src/lib/elementary/elm_map_pan.eo
+++ /dev/null
@@ -1,34 +0,0 @@
1class Elm.Map.Pan extends Elm.Pan
2{
3 [[Elementary map pan class]]
4 legacy_prefix: elm_map_pan;
5 eo_prefix: elm_obj_map_pan;
6 event_prefix: elm_map_pan;
7 implements {
8 class.constructor;
9 Efl.Object.destructor;
10 Efl.Gfx.Entity.position { set; }
11 Efl.Gfx.Entity.size { set; }
12 Efl.Canvas.Group.group_calculate;
13 Elm.Pan.content_size { get; }
14 Elm.Pan.pos { get; set; }
15 Elm.Pan.pos_min { get; }
16 Elm.Pan.pos_max { get; }
17 }
18 events {
19 /* FIXME: Nobody is emitting these
20 loaded; [[Called when map loaded]]
21 tile,load; [[Called when map tile loading started]]
22 tile,loaded; [[Called when map tile loading finished]]
23 tile,loaded,fail; [[Called when map tile loading failed]]
24 route,load; [[Called when route loiding started]]
25 route,loaded; [[Called when route loading finsihed]]
26 route,loaded,fail; [[Called when route loading failed]]
27 name,load; [[Called when name loading started]]
28 name,loaded; [[Called when name loading finished]]
29 name,loaded,fail; [[Called when name loading failed]]
30 overlay,clicked; [[Called when overlay was clicked]]
31 overlay,del; [[Called when overlay was deleted]]
32 */
33 }
34}
diff --git a/src/lib/elementary/elm_map_pan_eo.c b/src/lib/elementary/elm_map_pan_eo.c
new file mode 100644
index 0000000..6b249cc
--- /dev/null
+++ b/src/lib/elementary/elm_map_pan_eo.c
@@ -0,0 +1,67 @@
1
2void _elm_map_pan_efl_object_destructor(Eo *obj, Elm_Map_Pan_Data *pd);
3
4
5void _elm_map_pan_efl_gfx_entity_position_set(Eo *obj, Elm_Map_Pan_Data *pd, Eina_Position2D pos);
6
7
8void _elm_map_pan_efl_gfx_entity_size_set(Eo *obj, Elm_Map_Pan_Data *pd, Eina_Size2D size);
9
10
11void _elm_map_pan_efl_canvas_group_group_calculate(Eo *obj, Elm_Map_Pan_Data *pd);
12
13
14void _elm_map_pan_elm_pan_content_size_get(const Eo *obj, Elm_Map_Pan_Data *pd, int *w, int *h);
15
16
17void _elm_map_pan_elm_pan_pos_set(Eo *obj, Elm_Map_Pan_Data *pd, int x, int y);
18
19
20void _elm_map_pan_elm_pan_pos_get(const Eo *obj, Elm_Map_Pan_Data *pd, int *x, int *y);
21
22
23void _elm_map_pan_elm_pan_pos_min_get(const Eo *obj, Elm_Map_Pan_Data *pd, int *x, int *y);
24
25
26void _elm_map_pan_elm_pan_pos_max_get(const Eo *obj, Elm_Map_Pan_Data *pd, int *x, int *y);
27
28
29static Eina_Bool
30_elm_map_pan_class_initializer(Efl_Class *klass)
31{
32 const Efl_Object_Ops *opsp = NULL;
33
34 const Efl_Object_Property_Reflection_Ops *ropsp = NULL;
35
36#ifndef ELM_MAP_PAN_EXTRA_OPS
37#define ELM_MAP_PAN_EXTRA_OPS
38#endif
39
40 EFL_OPS_DEFINE(ops,
41 EFL_OBJECT_OP_FUNC(efl_destructor, _elm_map_pan_efl_object_destructor),
42 EFL_OBJECT_OP_FUNC(efl_gfx_entity_position_set, _elm_map_pan_efl_gfx_entity_position_set),
43 EFL_OBJECT_OP_FUNC(efl_gfx_entity_size_set, _elm_map_pan_efl_gfx_entity_size_set),
44 EFL_OBJECT_OP_FUNC(efl_canvas_group_calculate, _elm_map_pan_efl_canvas_group_group_calculate),
45 EFL_OBJECT_OP_FUNC(elm_obj_pan_content_size_get, _elm_map_pan_elm_pan_content_size_get),
46 EFL_OBJECT_OP_FUNC(elm_obj_pan_pos_set, _elm_map_pan_elm_pan_pos_set),
47 EFL_OBJECT_OP_FUNC(elm_obj_pan_pos_get, _elm_map_pan_elm_pan_pos_get),
48 EFL_OBJECT_OP_FUNC(elm_obj_pan_pos_min_get, _elm_map_pan_elm_pan_pos_min_get),
49 EFL_OBJECT_OP_FUNC(elm_obj_pan_pos_max_get, _elm_map_pan_elm_pan_pos_max_get),
50 ELM_MAP_PAN_EXTRA_OPS
51 );
52 opsp = &ops;
53
54 return efl_class_functions_set(klass, opsp, ropsp);
55}
56
57static const Efl_Class_Description _elm_map_pan_class_desc = {
58 EO_VERSION,
59 "Elm.Map.Pan",
60 EFL_CLASS_TYPE_REGULAR,
61 sizeof(Elm_Map_Pan_Data),
62 _elm_map_pan_class_initializer,
63 _elm_map_pan_class_constructor,
64 NULL
65};
66
67EFL_DEFINE_CLASS(elm_map_pan_class_get, &_elm_map_pan_class_desc, ELM_PAN_CLASS, NULL);
diff --git a/src/lib/elementary/elm_map_pan_eo.h b/src/lib/elementary/elm_map_pan_eo.h
new file mode 100644
index 0000000..be8be64
--- /dev/null
+++ b/src/lib/elementary/elm_map_pan_eo.h
@@ -0,0 +1,24 @@
1#ifndef _ELM_MAP_PAN_EO_H_
2#define _ELM_MAP_PAN_EO_H_
3
4#ifndef _ELM_MAP_PAN_EO_CLASS_TYPE
5#define _ELM_MAP_PAN_EO_CLASS_TYPE
6
7typedef Eo Elm_Map_Pan;
8
9#endif
10
11#ifndef _ELM_MAP_PAN_EO_TYPES
12#define _ELM_MAP_PAN_EO_TYPES
13
14
15#endif
16/** Elementary map pan class
17 *
18 * @ingroup Elm_Map_Pan
19 */
20#define ELM_MAP_PAN_CLASS elm_map_pan_class_get()
21
22EWAPI const Efl_Class *elm_map_pan_class_get(void);
23
24#endif
diff --git a/src/lib/elementary/elm_map_pan_eo.legacy.h b/src/lib/elementary/elm_map_pan_eo.legacy.h
new file mode 100644
index 0000000..d78a357
--- /dev/null
+++ b/src/lib/elementary/elm_map_pan_eo.legacy.h
@@ -0,0 +1,17 @@
1#ifndef _ELM_MAP_PAN_EO_LEGACY_H_
2#define _ELM_MAP_PAN_EO_LEGACY_H_
3
4#ifndef _ELM_MAP_PAN_EO_CLASS_TYPE
5#define _ELM_MAP_PAN_EO_CLASS_TYPE
6
7typedef Eo Elm_Map_Pan;
8
9#endif
10
11#ifndef _ELM_MAP_PAN_EO_TYPES
12#define _ELM_MAP_PAN_EO_TYPES
13
14
15#endif
16
17#endif
diff --git a/src/lib/elementary/meson.build b/src/lib/elementary/meson.build
index d16831a..e2d72b7 100644
--- a/src/lib/elementary/meson.build
+++ b/src/lib/elementary/meson.build
@@ -1,7 +1,5 @@
1pub_legacy_eo_files = [ 1pub_legacy_eo_files = [
2 'efl_ui_clock_legacy.eo', 2 'efl_ui_clock_legacy.eo',
3 'elm_map.eo',
4 'elm_map_pan.eo',
5 'elm_menu.eo', 3 'elm_menu.eo',
6 'elm_notify.eo', 4 'elm_notify.eo',
7 'elm_panel.eo', 5 'elm_panel.eo',
@@ -769,6 +767,10 @@ elementary_pub_headers = [
769 'elm_list_item_eo.legacy.h', 767 'elm_list_item_eo.legacy.h',
770 'elm_mapbuf_eo.h', 768 'elm_mapbuf_eo.h',
771 'elm_mapbuf_eo.legacy.h', 769 'elm_mapbuf_eo.legacy.h',
770 'elm_map_eo.h',
771 'elm_map_eo.legacy.h',
772 'elm_map_pan_eo.h',
773 'elm_map_pan_eo.legacy.h',
772] 774]
773 775
774elementary_header_src = [ 776elementary_header_src = [