summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLarry <larry.olj@gmail.com>2016-02-01 18:53:07 -0200
committerFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2016-02-09 14:14:09 -0200
commitbd29d628f9b129c26a70272da8eee931832bc425 (patch)
tree639caae1c7c3c48811d66e4c9e0dff5561049218
parent1a7b5ecd9529d3c10fe6fd5873c9d24ee9f1c1fd (diff)
Elm.Map: move emun Zoom Mode, Source Type and Route Type to Eolian
-rw-r--r--src/lib/elm_map.eo76
-rw-r--r--src/lib/elm_map_common.h60
2 files changed, 70 insertions, 66 deletions
diff --git a/src/lib/elm_map.eo b/src/lib/elm_map.eo
index e98ce8243..6e3751e0e 100644
--- a/src/lib/elm_map.eo
+++ b/src/lib/elm_map.eo
@@ -1,3 +1,67 @@
1
2enum Elm.Map.Zoom_Mode
3{
4 [[
5 Set map's zoom behavior. It can be set to manual or automatic.
6
7 Default value is #ELM_MAP_ZOOM_MODE_MANUAL.
8
9 Values <b> don't </b> work as bitmask, only one can be chosen.
10
11 Valid sizes are 2^zoom, consequently the map may be smaller
12 than the scroller view.
13
14 See @Elm.Map.zoom_mode.set()
15 See @Elm.Map.zoom_mode.get()
16 ]]
17 manual, [[Zoom controlled manually by elm_map_zoom_set(). It's set by default.]]
18 auto_fit, [[Zoom until map fits inside the scroll frame with no pixels outside this area.]]
19 auto_fill, [[Zoom until map fills scroll, ensuring no pixels are left unfilled.]]
20 last
21}
22
23enum Elm.Map.Source_Type
24{
25 [[
26 Set type of a external source (provider).
27
28 See @Elm.Map.sources_get()
29 See @Elm.Map.source_get()
30 See @Elm.Map.source_set()
31 ]]
32 tile, [[Map tile provider.]]
33 route, [[Route service provider.]]
34 name, [[Name service provider.]]
35 last
36}
37
38enum Elm.Map.Route_Type
39{
40 [[
41 Set type of transport used on route.
42
43 See @Elm.Map.route_add()
44 ]]
45 motocar, [[Route should consider an automobile will be used.]]
46 bicycle, [[Route should consider a bicycle will be used by the user.]]
47 foot, [[Route should consider user will be walking.]]
48 last
49}
50
51
52enum Elm.Map.Route_Method
53{
54 [[
55 Set the routing method, what should be prioritized, time or distance.
56
57 See @Elm.Map.route_add()
58 ]]
59 fastest, [[Route should prioritize time.]]
60 shortest, [[Route should prioritize distance.]]
61 last
62}
63
64
1class Elm.Map (Elm.Widget, Elm.Interface_Scrollable, 65class Elm.Map (Elm.Widget, Elm.Interface_Scrollable,
2 Elm.Interface_Atspi_Widget_Action, 66 Elm.Interface_Atspi_Widget_Action,
3 Evas.Clickable_Interface) 67 Evas.Clickable_Interface)
@@ -163,7 +227,7 @@ class Elm.Map (Elm.Widget, Elm.Interface_Scrollable,
163 ]] 227 ]]
164 } 228 }
165 values { 229 values {
166 mode: Elm_Map_Zoom_Mode; [[The zoom mode of the map, being it 230 mode: Elm.Map.Zoom_Mode; [[The zoom mode of the map, being it
167 one of #ELM_MAP_ZOOM_MODE_MANUAL 231 one of #ELM_MAP_ZOOM_MODE_MANUAL
168 (default), #ELM_MAP_ZOOM_MODE_AUTO_FIT, 232 (default), #ELM_MAP_ZOOM_MODE_AUTO_FIT,
169 or #ELM_MAP_ZOOM_MODE_AUTO_FILL.]] 233 or #ELM_MAP_ZOOM_MODE_AUTO_FILL.]]
@@ -229,7 +293,7 @@ class Elm.Map (Elm.Widget, Elm.Interface_Scrollable,
229 The current source can be get using @.source_get. 293 The current source can be get using @.source_get.
230 ]] 294 ]]
231 params { 295 params {
232 @in type: Elm_Map_Source_Type; [[Source type.]] 296 @in type: Elm.Map.Source_Type; [[Source type.]]
233 @in source_name: const(char)*; [[The source to be used.]] 297 @in source_name: const(char)*; [[The source to be used.]]
234 } 298 }
235 } 299 }
@@ -237,7 +301,7 @@ class Elm.Map (Elm.Widget, Elm.Interface_Scrollable,
237 [[Get the name of currently used source for a specific type.]] 301 [[Get the name of currently used source for a specific type.]]
238 return: const(char)*; [[The name of the source in use.]] 302 return: const(char)*; [[The name of the source in use.]]
239 params { 303 params {
240 @in type: Elm_Map_Source_Type; [[Source type.]] 304 @in type: Elm.Map.Source_Type; [[Source type.]]
241 } 305 }
242 } 306 }
243 route_add { 307 route_add {
@@ -263,8 +327,8 @@ class Elm.Map (Elm.Widget, Elm.Interface_Scrollable,
263 ]] 327 ]]
264 return: Elm_Map_Route *; [[The created route or $null upon failure.]] 328 return: Elm_Map_Route *; [[The created route or $null upon failure.]]
265 params { 329 params {
266 @in type: Elm_Map_Route_Type; [[The type of transport to be considered when tracing a route.]] 330 @in type: Elm.Map.Route_Type; [[The type of transport to be considered when tracing a route.]]
267 @in method: Elm_Map_Route_Method; [[The routing method, what should be prioritized.]] 331 @in method: Elm.Map.Route_Method; [[The routing method, what should be prioritized.]]
268 @in flon: double; [[The start longitude.]] 332 @in flon: double; [[The start longitude.]]
269 @in flat: double; [[The start latitude.]] 333 @in flat: double; [[The start latitude.]]
270 @in tlon: double; [[The destination longitude.]] 334 @in tlon: double; [[The destination longitude.]]
@@ -359,7 +423,7 @@ class Elm.Map (Elm.Widget, Elm.Interface_Scrollable,
359 ]] 423 ]]
360 return: const(char)**; [[The char pointer array of source names.]] 424 return: const(char)**; [[The char pointer array of source names.]]
361 params { 425 params {
362 @in type: Elm_Map_Source_Type; [[Source type.]] 426 @in type: Elm.Map.Source_Type; [[Source type.]]
363 } 427 }
364 } 428 }
365 overlay_polygon_add { 429 overlay_polygon_add {
diff --git a/src/lib/elm_map_common.h b/src/lib/elm_map_common.h
index 5de92eb7a..55fa9553a 100644
--- a/src/lib/elm_map_common.h
+++ b/src/lib/elm_map_common.h
@@ -4,66 +4,6 @@
4 * @{ 4 * @{
5 */ 5 */
6 6
7/**
8 * Set map's zoom behavior. It can be set to manual or automatic.
9 *
10 * Default value is #ELM_MAP_ZOOM_MODE_MANUAL.
11 *
12 * Values <b> don't </b> work as bitmask, only one can be chosen.
13 *
14 * @note Valid sizes are 2^zoom, consequently the map may be smaller
15 * than the scroller view.
16 *
17 * @see elm_map_zoom_mode_set()
18 * @see elm_map_zoom_mode_get()
19 */
20typedef enum
21{
22 ELM_MAP_ZOOM_MODE_MANUAL, /**< Zoom controlled manually by elm_map_zoom_set(). It's set by default. */
23 ELM_MAP_ZOOM_MODE_AUTO_FIT, /**< Zoom until map fits inside the scroll frame with no pixels outside this area. */
24 ELM_MAP_ZOOM_MODE_AUTO_FILL, /**< Zoom until map fills scroll, ensuring no pixels are left unfilled. */
25 ELM_MAP_ZOOM_MODE_LAST
26} Elm_Map_Zoom_Mode;
27
28/**
29 * Set type of a external source (provider).
30 *
31 * @see elm_map_sources_get()
32 * @see elm_map_source_get()
33 * @see elm_map_source_set()
34 */
35typedef enum
36{
37 ELM_MAP_SOURCE_TYPE_TILE, /**< Map tile provider. */
38 ELM_MAP_SOURCE_TYPE_ROUTE, /**< Route service provider. */
39 ELM_MAP_SOURCE_TYPE_NAME, /**< Name service provider. */
40 ELM_MAP_SOURCE_TYPE_LAST
41} Elm_Map_Source_Type;
42
43/**
44 * Set type of transport used on route.
45 *
46 * @see elm_map_route_add()
47 */
48typedef enum
49{
50 ELM_MAP_ROUTE_TYPE_MOTOCAR, /**< Route should consider an automobile will be used. */
51 ELM_MAP_ROUTE_TYPE_BICYCLE, /**< Route should consider a bicycle will be used by the user. */
52 ELM_MAP_ROUTE_TYPE_FOOT, /**< Route should consider user will be walking. */
53 ELM_MAP_ROUTE_TYPE_LAST
54} Elm_Map_Route_Type;
55
56/**
57 * Set the routing method, what should be prioritized, time or distance.
58 *
59 * @see elm_map_route_add()
60 */
61typedef enum
62{
63 ELM_MAP_ROUTE_METHOD_FASTEST, /**< Route should prioritize time. */
64 ELM_MAP_ROUTE_METHOD_SHORTEST, /**< Route should prioritize distance. */
65 ELM_MAP_ROUTE_METHOD_LAST
66} Elm_Map_Route_Method;
67 7
68/** 8/**
69 * Set the name search method. 9 * Set the name search method.