From e8a286efb31f482e7067a053fd388ee61fb65ee0 Mon Sep 17 00:00:00 2001 From: Bruno Dilly Date: Wed, 3 Aug 2011 21:05:20 +0000 Subject: [PATCH] Elementary: Map Documentation SVN revision: 62074 --- legacy/elementary/doc/Makefile.am | 1 + legacy/elementary/doc/index.doxy | 3 + legacy/elementary/doc/shot.sh | 2 +- legacy/elementary/doc/widgets/Makefile.am | 2 + .../doc/widgets/widget_preview_map.c | 44 + legacy/elementary/src/lib/Elementary.h.in | 1346 ++++++++++++++++- legacy/elementary/src/lib/elm_map.c | 714 +-------- 7 files changed, 1358 insertions(+), 754 deletions(-) create mode 100644 legacy/elementary/doc/widgets/widget_preview_map.c diff --git a/legacy/elementary/doc/Makefile.am b/legacy/elementary/doc/Makefile.am index 024f62d2f5..218b9a4d52 100644 --- a/legacy/elementary/doc/Makefile.am +++ b/legacy/elementary/doc/Makefile.am @@ -37,6 +37,7 @@ WGT_PREVIEW = \ panes:preview-00.png:widget_preview_panes:200:100 \ toolbar:preview-00.png:widget_preview_toolbar:300:100 \ mapbuf:preview-00.png:widget_preview_mapbuf:200:200 \ + map:preview-00.png:widget_preview_map:256:256 \ ctxpopup:preview-00.png:widget_preview_ctxpopup:200:130 \ icon:preview-00.png:widget_preview_icon:50:50 \ image:preview-00.png:widget_preview_image:50:50 \ diff --git a/legacy/elementary/doc/index.doxy b/legacy/elementary/doc/index.doxy index 55e783b078..d2450b8f3c 100644 --- a/legacy/elementary/doc/index.doxy +++ b/legacy/elementary/doc/index.doxy @@ -136,6 +136,9 @@ * @image html img/widget/label/preview-00.png * @image latex img/widget/label/preview-00.eps * @li @ref Map + * + * @image html img/widget/map/preview-00.png + * @image latex img/widget/map/preview-00.eps * @li @ref Mapbuf * * @image html img/widget/mapbuf/preview-00.png diff --git a/legacy/elementary/doc/shot.sh b/legacy/elementary/doc/shot.sh index 7101912277..1ac6da9305 100755 --- a/legacy/elementary/doc/shot.sh +++ b/legacy/elementary/doc/shot.sh @@ -7,7 +7,7 @@ shift export ELM_THEME=default export ELM_SCALE=1.0 -export ELM_ENGINE=shot:delay=0.5:file=$DIR/$FILE +export ELM_ENGINE=shot:delay=3:file=$DIR/$FILE export ILLUME_KBD=0,0,240,123 export ILLUME_IND=0,0,240,32 export ILLUME_STK=0,288,240,32 diff --git a/legacy/elementary/doc/widgets/Makefile.am b/legacy/elementary/doc/widgets/Makefile.am index 8221adb9c5..9bacc93a1e 100644 --- a/legacy/elementary/doc/widgets/Makefile.am +++ b/legacy/elementary/doc/widgets/Makefile.am @@ -52,6 +52,7 @@ widget_preview_slider \ widget_preview_panes \ widget_preview_toolbar \ widget_preview_mapbuf \ +widget_preview_map \ widget_preview_ctxpopup \ widget_preview_icon \ widget_preview_image \ @@ -123,6 +124,7 @@ EXTRA_DIST = \ widget_preview_panes.c \ widget_preview_toolbar.c \ widget_preview_mapbuf.c \ + widget_preview_map.c \ widget_preview_ctxpopup.c \ widget_preview_diskselector.c \ widget_preview_entry1.c \ diff --git a/legacy/elementary/doc/widgets/widget_preview_map.c b/legacy/elementary/doc/widgets/widget_preview_map.c new file mode 100644 index 0000000000..13dc1ee5d5 --- /dev/null +++ b/legacy/elementary/doc/widgets/widget_preview_map.c @@ -0,0 +1,44 @@ +#include +#ifdef HAVE_CONFIG_H +# include "elementary_config.h" +#else +# define __UNUSED__ +#endif + +/* FIXME: it shouldn't be required. For unknown reason map won't call + * pan_calculate until shot delay time, but then it will take a screenshot + * when the map isn't loaded yet (actually it won't be downloaded, because + * after the SS it will kill the preview). */ +static Eina_Bool +_nasty_hack(void *data) +{ + Evas_Object *o = data; + Evas *e = evas_object_evas_get(o); + evas_smart_objects_calculate(e); + return ECORE_CALLBACK_CANCEL; +} + +EAPI int +elm_main(int argc __UNUSED__, char **argv) +{ + Evas_Object *win, *bg; + Evas_Coord w, h; + + w = atoi(argv[1]); + h = atoi(argv[2]); + + win = elm_win_add(NULL, "main", ELM_WIN_BASIC); + bg = elm_bg_add(win); + elm_win_resize_object_add(win, bg); + evas_object_show(bg); + +evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + +Evas_Object *o = elm_map_add(win); +evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); +elm_win_resize_object_add(win, o); +evas_object_show(o); + +ecore_timer_add(0.5, _nasty_hack, win); + +#include "widget_preview_tmpl_foot.c" diff --git a/legacy/elementary/src/lib/Elementary.h.in b/legacy/elementary/src/lib/Elementary.h.in index b4fec3976b..ee2daa85b1 100644 --- a/legacy/elementary/src/lib/Elementary.h.in +++ b/legacy/elementary/src/lib/Elementary.h.in @@ -10749,7 +10749,7 @@ extern "C" { * @note Default value is #ELM_TOOLBAR_SHRINK_MENU. It reads value * from elm config. * - * Values don't work as bitmaks, only one can be choosen. + * Values don't work as bitmask, only one can be choosen. * * @see elm_toolbar_mode_shrink_set() * @see elm_toolbar_mode_shrink_get() @@ -12303,7 +12303,7 @@ extern "C" { * * @note Default value is #ELM_LIST_SCROLL. * - * Values don't work as bitmaks, only one can be choosen. + * Values don't work as bitmask, only one can be choosen. * * @see elm_list_mode_set() * @see elm_list_mode_get() @@ -18291,20 +18291,115 @@ extern "C" { * @} */ - /* map */ + /** + * @defgroup Map Map + * @ingroup Elementary + * + * @image html img/widget/map/preview-00.png + * @image latex img/widget/map/preview-00.eps + * + * This is a widget specifically for displaying a map. It uses basically + * OpenStreetMap provider http://www.openstreetmap.org/, + * but custom providers can be added. + * + * It supports some basic but yet nice features: + * @li zoom and scroll + * @li markers with content to be displayed when user clicks over it + * @li group of markers + * @li routes + * + * Smart callbacks one can listen to: + * + * - "clicked" - This is called when a user has clicked the map without + * dragging around. + * - "press" - This is called when a user has pressed down on the map. + * - "longpressed" - This is called when a user has pressed down on the map + * for a long time without dragging around. + * - "clicked,double" - This is called when a user has double-clicked + * the map. + * - "load,detail" - Map detailed data load begins. + * - "loaded,detail" - This is called when all currently visible parts of + * the map are loaded. + * - "zoom,start" - Zoom animation started. + * - "zoom,stop" - Zoom animation stopped. + * - "zoom,change" - Zoom changed when using an auto zoom mode. + * - "scroll" - the content has been scrolled (moved). + * - "scroll,anim,start" - scrolling animation has started. + * - "scroll,anim,stop" - scrolling animation has stopped. + * - "scroll,drag,start" - dragging the contents around has started. + * - "scroll,drag,stop" - dragging the contents around has stopped. + * - "downloaded" - This is called when all currently required map images + * are downloaded. + * - "route,load" - This is called when route request begins. + * - "route,loaded" - This is called when route request ends. + * - "name,load" - This is called when name request begins. + * - "name,loaded- This is called when name request ends. + * + * Available style for map widget: + * - @c "default" + * + * Available style for markers: + * - @c "radio" + * - @c "radio2" + * - @c "empty" + * + * Available style for marker bubble: + * - @c "default" + * + * List of examples: + * @li @ref map_example_01 + * @li @ref map_example_02 + * @li @ref map_example_03 + */ + + /** + * @addtogroup Map + * @{ + */ + + /** + * @enum _Elm_Map_Zoom_Mode + * @typedef Elm_Map_Zoom_Mode + * + * Set map's zoom behavior. It can be set to manual or automatic. + * + * Default value is #ELM_MAP_ZOOM_MODE_MANUAL. + * + * Values don't work as bitmask, only one can be choosen. + * + * @note Valid sizes are 2^zoom, consequently the map may be smaller + * than the scroller view. + * + * @see elm_map_zoom_mode_set() + * @see elm_map_zoom_mode_get() + * + * @ingroup Map + */ typedef enum _Elm_Map_Zoom_Mode { - ELM_MAP_ZOOM_MODE_MANUAL, - ELM_MAP_ZOOM_MODE_AUTO_FIT, - ELM_MAP_ZOOM_MODE_AUTO_FILL, + ELM_MAP_ZOOM_MODE_MANUAL, /**< Zoom controled manually by elm_map_zoom_set(). It's set by default. */ + ELM_MAP_ZOOM_MODE_AUTO_FIT, /**< Zoom until map fits inside the scroll frame with no pixels outside this area. */ + ELM_MAP_ZOOM_MODE_AUTO_FILL, /**< Zoom until map fills scroll, ensuring no pixels are left unfilled. */ ELM_MAP_ZOOM_MODE_LAST } Elm_Map_Zoom_Mode; + /** + * @enum _Elm_Map_Route_Sources + * @typedef Elm_Map_Route_Sources + * + * Set route service to be used. By default used source is + * #ELM_MAP_ROUTE_SOURCE_YOURS. + * + * @see elm_map_route_source_set() + * @see elm_map_route_source_get() + * + * @ingroup Map + */ typedef enum _Elm_Map_Route_Sources { - ELM_MAP_ROUTE_SOURCE_YOURS, - ELM_MAP_ROUTE_SOURCE_MONAV, - ELM_MAP_ROUTE_SOURCE_ORS, + ELM_MAP_ROUTE_SOURCE_YOURS, /**< Routing service http://www.yournavigation.org/ . Set by default.*/ + ELM_MAP_ROUTE_SOURCE_MONAV, /**< MoNav offers exact routing without heuristic assumptions. Its routing core is based on Contraction Hierarchies. It's not working with Map yet. */ + ELM_MAP_ROUTE_SOURCE_ORS, /**< Open Route Service: http://www.openrouteservice.org/ . It's not working with Map yet. */ ELM_MAP_ROUTE_SOURCE_LAST } Elm_Map_Route_Sources; @@ -18314,18 +18409,38 @@ extern "C" { ELM_MAP_NAME_SOURCE_LAST } Elm_Map_Name_Sources; + /** + * @enum _Elm_Map_Route_Type + * @typedef Elm_Map_Route_Type + * + * Set type of transport used on route. + * + * @see elm_map_route_add() + * + * @ingroup Map + */ typedef enum _Elm_Map_Route_Type { - ELM_MAP_ROUTE_TYPE_MOTOCAR, - ELM_MAP_ROUTE_TYPE_BICYCLE, - ELM_MAP_ROUTE_TYPE_FOOT, + ELM_MAP_ROUTE_TYPE_MOTOCAR, /**< Route should consider an automobile will be used. */ + ELM_MAP_ROUTE_TYPE_BICYCLE, /**< Route should consider a bicycle will be used by the user. */ + ELM_MAP_ROUTE_TYPE_FOOT, /**< Route should consider user will be walking. */ ELM_MAP_ROUTE_TYPE_LAST } Elm_Map_Route_Type; + /** + * @enum _Elm_Map_Route_Method + * @typedef Elm_Map_Route_Method + * + * Set the routing method, what should be priorized, time or distance. + * + * @see elm_map_route_add() + * + * @ingroup Map + */ typedef enum _Elm_Map_Route_Method { - ELM_MAP_ROUTE_METHOD_FASTEST, - ELM_MAP_ROUTE_METHOD_SHORTEST, + ELM_MAP_ROUTE_METHOD_FASTEST, /**< Route should priorize time. */ + ELM_MAP_ROUTE_METHOD_SHORTEST, /**< Route should priorize distance. */ ELM_MAP_ROUTE_METHOD_LAST } Elm_Map_Route_Method; @@ -18336,17 +18451,17 @@ extern "C" { ELM_MAP_NAME_METHOD_LAST } Elm_Map_Name_Method; - typedef struct _Elm_Map_Marker Elm_Map_Marker; - typedef struct _Elm_Map_Marker_Class Elm_Map_Marker_Class; - typedef struct _Elm_Map_Group_Class Elm_Map_Group_Class; - typedef struct _Elm_Map_Route Elm_Map_Route; - typedef struct _Elm_Map_Name Elm_Map_Name; + typedef struct _Elm_Map_Marker Elm_Map_Marker; /**< A marker to be shown in a specific point of the map. Can be created with elm_map_marker_add() and deleted with elm_map_marker_remove(). */ + typedef struct _Elm_Map_Marker_Class Elm_Map_Marker_Class; /**< Each marker must be associated to a class. It's required to add a mark. The class defines the style of the marker when a marker is displayed alone (not grouped). A new class can be created with elm_map_marker_class_new(). */ + typedef struct _Elm_Map_Group_Class Elm_Map_Group_Class; /**< Each marker must be associated to a group class. It's required to add a mark. The group class defines the style of the marker when a marker is grouped to other markers. Markers with the same group are grouped if they are close. A new group class can be created with elm_map_marker_group_class_new(). */ + typedef struct _Elm_Map_Route Elm_Map_Route; /**< A route to be shown in the map. Can be created with elm_map_route_add() and deleted with elm_map_route_remove(). */ + typedef struct _Elm_Map_Name Elm_Map_Name; /**< A handle for specific coordinates. */ typedef struct _Elm_Map_Track Elm_Map_Track; - typedef Evas_Object *(*ElmMapMarkerGetFunc) (Evas_Object *obj, Elm_Map_Marker *marker, void *data); - typedef void (*ElmMapMarkerDelFunc) (Evas_Object *obj, Elm_Map_Marker *marker, void *data, Evas_Object *o); - typedef Evas_Object *(*ElmMapMarkerIconGetFunc) (Evas_Object *obj, Elm_Map_Marker *marker, void *data); - typedef Evas_Object *(*ElmMapGroupIconGetFunc) (Evas_Object *obj, void *data); + typedef Evas_Object *(*ElmMapMarkerGetFunc) (Evas_Object *obj, Elm_Map_Marker *marker, void *data); /**< Bubble content fetching class function for marker classes. When the user click on a marker, a bubble is displayed with a content. */ + typedef void (*ElmMapMarkerDelFunc) (Evas_Object *obj, Elm_Map_Marker *marker, void *data, Evas_Object *o); /**< Function to delete bubble content for marker classes. */ + typedef Evas_Object *(*ElmMapMarkerIconGetFunc) (Evas_Object *obj, Elm_Map_Marker *marker, void *data); /**< Icon fetching class function for marker classes. */ + typedef Evas_Object *(*ElmMapGroupIconGetFunc) (Evas_Object *obj, void *data); /**< Icon fetching class function for markers group classes. */ typedef char *(*ElmMapModuleSourceFunc) (void); typedef int (*ElmMapModuleZoomMinFunc) (void); @@ -18358,91 +18473,1243 @@ extern "C" { typedef Eina_Bool (*ElmMapModuleGeoIntoCoordFunc) (const Evas_Object *obj, int zoom, double lon, double lat, int size, int *x, int *y); typedef Eina_Bool (*ElmMapModuleCoordIntoGeoFunc) (const Evas_Object *obj, int zoom, int x, int y, int size, double *lon, double *lat); + /** + * Add a new map widget to the given parent Elementary (container) object. + * + * @param parent The parent object. + * @return a new map widget handle or @c NULL, on errors. + * + * This function inserts a new map widget on the canvas. + * + * @ingroup Map + */ EAPI Evas_Object *elm_map_add(Evas_Object *parent) EINA_ARG_NONNULL(1); + + /** + * Set the zoom level of the map. + * + * @param obj The map object. + * @param zoom The zoom level to set. + * + * This sets the zoom level. + * + * It will respect limits defined by elm_map_source_zoom_min_set() and + * elm_map_source_zoom_max_set(). + * + * By default these values are 0 (world map) and 18 (maximum zoom). + * + * This function should be used when zoom mode is set to + * #ELM_MAP_ZOOM_MODE_MANUAL. This is the default mode, and can be set + * with elm_map_zoom_mode_set(). + * + * @see elm_map_zoom_mode_set(). + * @see elm_map_zoom_get(). + * + * @ingroup Map + */ EAPI void elm_map_zoom_set(Evas_Object *obj, int zoom) EINA_ARG_NONNULL(1); + + /** + * Get the zoom level of the map. + * + * @param obj The map object. + * @return The current zoom level. + * + * This returns the current zoom level of the map object. + * + * Note that if you set the fill mode to other than #ELM_MAP_ZOOM_MODE_MANUAL + * (which is the default), the zoom level may be changed at any time by the + * map object itself to account for map size and map viewport size. + * + * @see elm_map_zoom_set() for details. + * + * @ingroup Map + */ EAPI int elm_map_zoom_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); + + /** + * Set the zoom mode used by the map object. + * + * @param obj The map object. + * @param mode The zoom mode of the map, being it one of + * #ELM_MAP_ZOOM_MODE_MANUAL (default), #ELM_MAP_ZOOM_MODE_AUTO_FIT, + * or #ELM_MAP_ZOOM_MODE_AUTO_FILL. + * + * This sets the zoom mode to manual or one of the automatic levels. + * Manual (#ELM_MAP_ZOOM_MODE_MANUAL) means that zoom is set manually by + * elm_map_zoom_set() and will stay at that level until changed by code + * or until zoom mode is changed. This is the default mode. + * + * The Automatic modes will allow the map object to automatically + * adjust zoom mode based on properties. #ELM_MAP_ZOOM_MODE_AUTO_FIT will + * adjust zoom so the map fits inside the scroll frame with no pixels + * outside this area. #ELM_MAP_ZOOM_MODE_AUTO_FILL will be similar but + * ensure no pixels within the frame are left unfilled. Do not forget that + * the valid sizes are 2^zoom, consequently the map may be smaller than + * the scroller view. + * + * @see elm_map_zoom_set() + * + * @ingroup Map + */ EAPI void elm_map_zoom_mode_set(Evas_Object *obj, Elm_Map_Zoom_Mode mode) EINA_ARG_NONNULL(1); + + /** + * Get the zoom mode used by the map object. + * + * @param obj The map object. + * @return The zoom mode of the map, being it one of + * #ELM_MAP_ZOOM_MODE_MANUAL (default), #ELM_MAP_ZOOM_MODE_AUTO_FIT, + * or #ELM_MAP_ZOOM_MODE_AUTO_FILL. + * + * This function returns the current zoom mode used by the map object. + * + * @see elm_map_zoom_mode_set() for more details. + * + * @ingroup Map + */ EAPI Elm_Map_Zoom_Mode elm_map_zoom_mode_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); + + /** + * Get the current coordinates of the map. + * + * @param obj The map object. + * @param lon Pointer where to store longitude. + * @param lat Pointer where to store latitude. + * + * This gets the current center coordinates of the map object. It can be + * set by elm_map_geo_region_bring_in() and elm_map_geo_region_show(). + * + * @see elm_map_geo_region_bring_in() + * @see elm_map_geo_region_show() + * + * @ingroup Map + */ EAPI void elm_map_geo_region_get(const Evas_Object *obj, double *lon, double *lat) EINA_ARG_NONNULL(1); + + /** + * Animatedly bring in given coordinates to the center of the map. + * + * @param obj The map object. + * @param lon Longitude to center at. + * @param lat Latitude to center at. + * + * This causes map to jump to the given @p lat and @p lon coordinates + * and show it (by scrolling) in the center of the viewport, if it is not + * already centered. This will use animation to do so and take a period + * of time to complete. + * + * @see elm_map_geo_region_show() for a function to avoid animation. + * @see elm_map_geo_region_get() + * + * @ingroup Map + */ EAPI void elm_map_geo_region_bring_in(Evas_Object *obj, double lon, double lat) EINA_ARG_NONNULL(1); + + /** + * Show the given coordinates at the center of the map, @b immediately. + * + * @param obj The map object. + * @param lon Longitude to center at. + * @param lat Latitude to center at. + * + * This causes map to @b redraw its viewport's contents to the + * region contining the given @p lat and @p lon, that will be moved to the + * center of the map. + * + * @see elm_map_geo_region_bring_in() for a function to move with animation. + * @see elm_map_geo_region_get() + * + * @ingroup Map + */ EAPI void elm_map_geo_region_show(Evas_Object *obj, double lon, double lat) EINA_ARG_NONNULL(1); + + /** + * Pause or unpause the map. + * + * @param obj The map object. + * @param paused Use @c EINA_TRUE to pause the map @p obj or @c EINA_FALSE + * to unpause it. + * + * This sets the paused state to on (@c EINA_TRUE) or off (@c EINA_FALSE) + * for map. + * + * The default is off. + * + * This will stop zooming using animation, changing zoom levels will + * change instantly. This will stop any existing animations that are running. + * + * @see elm_map_paused_get() + * + * @ingroup Map + */ EAPI void elm_map_paused_set(Evas_Object *obj, Eina_Bool paused) EINA_ARG_NONNULL(1); + + /** + * Get a value whether map is paused or not. + * + * @param obj The map object. + * @return @c EINA_TRUE means map is pause. @c EINA_FALSE indicates + * it is not. If @p obj is @c NULL, @c EINA_FALSE is returned. + * + * This gets the current paused state for the map object. + * + * @see elm_map_paused_set() for details. + * + * @ingroup Map + */ EAPI Eina_Bool elm_map_paused_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); + + /** + * Set to show markers during zoom level changes or not. + * + * @param obj The map object. + * @param paused Use @c EINA_TRUE to @b not show markers or @c EINA_FALSE + * to show them. + * + * This sets the paused state to on (@c EINA_TRUE) or off (@c EINA_FALSE) + * for map. + * + * The default is off. + * + * This will stop zooming using animation, changing zoom levels will + * change instantly. This will stop any existing animations that are running. + * + * This sets the paused state to on (@c EINA_TRUE) or off (@c EINA_FALSE) + * for the markers. + * + * The default is off. + * + * Enabling it will force the map to stop displaying the markers during + * zoom level changes. Set to on if you have a large number of markers. + * + * @see elm_map_paused_markers_get() + * + * @ingroup Map + */ EAPI void elm_map_paused_markers_set(Evas_Object *obj, Eina_Bool paused) EINA_ARG_NONNULL(1); + + /** + * Get a value whether markers will be displayed on zoom level changes or not + * + * @param obj The map object. + * @return @c EINA_TRUE means map @b won't display markers or @c EINA_FALSE + * indicates it will. If @p obj is @c NULL, @c EINA_FALSE is returned. + * + * This gets the current markers paused state for the map object. + * + * @see elm_map_paused_markers_set() for details. + * + * @ingroup Map + */ EAPI Eina_Bool elm_map_paused_markers_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); + + /** + * Get the information of downloading status. + * + * @param obj The map object. + * @param try_num Pointer where to store number of tiles being downloaded. + * @param finish_num Pointer where to store number of tiles successfully + * downloaded. + * + * This gets the current downloading status for the map object, the number + * of tiles being downloaded and the number of tiles already downloaded. + * + * @ingroup Map + */ EAPI void elm_map_utils_downloading_status_get(const Evas_Object *obj, int *try_num, int *finish_num) EINA_ARG_NONNULL(1, 2, 3); + + /** + * Convert a pixel coordinate (x,y) into a geographic coordinate + * (longitude, latitude). + * + * @param obj The map object. + * @param x the coordinate. + * @param y the coordinate. + * @param size the size in pixels of the map. + * The map is a square and generally his size is : pow(2.0, zoom)*256. + * @param lon Pointer where to store the longitude that correspond to x. + * @param lat Pointer where to store the latitude that correspond to y. + * + * @note Origin pixel point is the top left corner of the viewport. + * Map zoom and size are taken on account. + * + * @see elm_map_utils_convert_geo_into_coord() if you need the inverse. + * + * @ingroup Map + */ EAPI void elm_map_utils_convert_coord_into_geo(const Evas_Object *obj, int x, int y, int size, double *lon, double *lat) EINA_ARG_NONNULL(1, 5, 6); + + /** + * Convert a geographic coordinate (longitude, latitude) into a pixel + * coordinate (x, y). + * + * @param obj The map object. + * @param lon the longitude. + * @param lat the latitude. + * @param size the size in pixels of the map. The map is a square + * and generally his size is : pow(2.0, zoom)*256. + * @param x Pointer where to store the horizontal pixel coordinate that + * correspond to the longitude. + * @param y Pointer where to store the vertical pixel coordinate that + * correspond to the latitude. + * + * @note Origin pixel point is the top left corner of the viewport. + * Map zoom and size are taken on account. + * + * @see elm_map_utils_convert_coord_into_geo() if you need the inverse. + * + * @ingroup Map + */ EAPI void elm_map_utils_convert_geo_into_coord(const Evas_Object *obj, double lon, double lat, int size, int *x, int *y) EINA_ARG_NONNULL(1, 5, 6); + + /** + * Convert a geographic coordinate (longitude, latitude) into a name + * (address). + * + * @param obj The map object. + * @param lon the longitude. + * @param lat the latitude. + * @return name A #Elm_Map_Name handle for this coordinate. + * + * To get the string for this address, elm_map_name_address_get() + * should be used. + * + * @see elm_map_utils_convert_name_into_coord() if you need the inverse. + * + * @ingroup Map + */ EAPI Elm_Map_Name *elm_map_utils_convert_coord_into_name(const Evas_Object *obj, double lon, double lat) EINA_ARG_NONNULL(1); + + /** + * Convert a name (address) into a geographic coordinate + * (longitude, latitude). + * + * @param obj The map object. + * @param name The address. + * @return name A #Elm_Map_Name handle for this address. + * + * To get the longitude and latitude, elm_map_name_region_get() + * should be used. + * + * @see elm_map_utils_convert_coord_into_name() if you need the inverse. + * + * @ingroup Map + */ EAPI Elm_Map_Name *elm_map_utils_convert_name_into_coord(const Evas_Object *obj, char *address) EINA_ARG_NONNULL(1, 2); + + /** + * Convert a pixel coordinate into a rotated pixel coordinate. + * + * @param obj The map object. + * @param x horizontal coordinate of the point to rotate. + * @param y vertical coordinate of the point to rotate. + * @param cx rotation's center horizontal position. + * @param cy rotation's center vertical position. + * @param degree amount of degrees from 0.0 to 360.0 to rotate arount Z axis. + * @param xx Pointer where to store rotated x. + * @param yy Pointer where to store rotated y. + * + * @ingroup Map + */ EAPI void elm_map_utils_rotate_coord(const Evas_Object *obj, const Evas_Coord x, const Evas_Coord y, const Evas_Coord cx, const Evas_Coord cy, const double degree, Evas_Coord *xx, Evas_Coord *yy) EINA_ARG_NONNULL(1); + + /** + * Add a new marker to the map object. + * + * @param obj The map object. + * @param lon The longitude of the marker. + * @param lat The latitude of the marker. + * @param clas The class, to use when marker @b isn't grouped to others. + * @param clas_group The class group, to use when marker is grouped to others + * @param data The data passed to the callbacks. + * + * @return The created marker or @c NULL upon failure. + * + * A marker will be created and shown in a specific point of the map, defined + * by @p lon and @p lat. + * + * It will be displayed using style defined by @p class when this marker + * is displayed alone (not grouped). A new class can be created with + * elm_map_marker_class_new(). + * + * If the marker is grouped to other markers, it will be displayed with + * style defined by @p class_group. Markers with the same group are grouped + * if they are close. A new group class can be created with + * elm_map_marker_group_class_new(). + * + * Markers created with this method can be deleted with + * elm_map_marker_remove(). + * + * A marker can have associated content to be displayed by a bubble, + * when a user click over it, as well as an icon. These objects will + * be fetch using class' callback functions. + * + * @see elm_map_marker_class_new() + * @see elm_map_marker_group_class_new() + * @see elm_map_marker_remove() + * + * @ingroup Map + */ EAPI Elm_Map_Marker *elm_map_marker_add(Evas_Object *obj, double lon, double lat, Elm_Map_Marker_Class *clas, Elm_Map_Group_Class *clas_group, void *data) EINA_ARG_NONNULL(1, 4, 5); + + /** + * Set the maximum numbers of markers' content to be displayed in a group. + * + * @param obj The map object. + * @param max The maximum numbers of items displayed in a bubble. + * + * A bubble will be displayed when the user clicks over the group, + * and will place the content of markers that belong to this group + * inside it. + * + * A group can have a long list of markers, consequently the creation + * of the content of the bubble can be very slow. + * + * In order to avoid this, a maximum number of items is displayed + * in a bubble. + * + * By default this number is 30. + * + * Marker with the same group class are grouped if they are close. + * + * @see elm_map_marker_add() + * + * @ingroup Map + */ EAPI void elm_map_max_marker_per_group_set(Evas_Object *obj, int max) EINA_ARG_NONNULL(1); + + /** + * Remove a marker from the map. + * + * @param marker The marker to remove. + * + * @see elm_map_marker_add() + * + * @ingroup Map + */ EAPI void elm_map_marker_remove(Elm_Map_Marker *marker) EINA_ARG_NONNULL(1); + + /** + * Get the current coordinates of the marker. + * + * @param marker marker. + * @param lat Pointer where to store the marker's latitude. + * @param lon Pointer where to store the marker's longitude. + * + * These values are set when adding markers, with function + * elm_map_marker_add(). + * + * @see elm_map_marker_add() + * + * @ingroup Map + */ EAPI void elm_map_marker_region_get(const Elm_Map_Marker *marker, double *lon, double *lat) EINA_ARG_NONNULL(1); + + /** + * Animatedly bring in given marker to the center of the map. + * + * @param marker The marker to center at. + * + * This causes map to jump to the given @p marker's coordinates + * and show it (by scrolling) in the center of the viewport, if it is not + * already centered. This will use animation to do so and take a period + * of time to complete. + * + * @see elm_map_marker_show() for a function to avoid animation. + * @see elm_map_marker_region_get() + * + * @ingroup Map + */ EAPI void elm_map_marker_bring_in(Elm_Map_Marker *marker) EINA_ARG_NONNULL(1); + + /** + * Show the given marker at the center of the map, @b immediately. + * + * @param marker The marker to center at. + * + * This causes map to @b redraw its viewport's contents to the + * region contining the given @p marker's coordinates, that will be + * moved to the center of the map. + * + * @see elm_map_marker_bring_in() for a function to move with animation. + * @see elm_map_markers_list_show() if more than one marker need to be + * displayed. + * @see elm_map_marker_region_get() + * + * @ingroup Map + */ EAPI void elm_map_marker_show(Elm_Map_Marker *marker) EINA_ARG_NONNULL(1); + + /** + * Move and zoom the map to display a list of markers. + * + * @param markers A list of #Elm_Map_Marker handles. + * + * The map will be centered on the center point of the markers in the list. + * Then the map will be zoomed in order to fit the markers using the maximum + * zoom which allows display of all the markers. + * + * @warning All the markers should belong to the same map object. + * + * @see elm_map_marker_show() to show a single marker. + * @see elm_map_marker_bring_in() + * + * @ingroup Map + */ EAPI void elm_map_markers_list_show(Eina_List *markers) EINA_ARG_NONNULL(1); + + /** + * Get the Evas object returned by the ElmMapMarkerGetFunc callback + * + * @param marker The marker wich content should be returned. + * @return Return the evas object if it exists, else @c NULL. + * + * To set callback function #ElmMapMarkerGetFunc for the marker class, + * elm_map_marker_class_get_cb_set() should be used. + * + * This content is what will be inside the bubble that will be displayed + * when an user clicks over the marker. + * + * This returns the actual Evas object used to be placed inside + * the bubble. This may be @c NULL, as it may + * not have been created or may have been deleted, at any time, by + * the map. Do not modify this object (move, resize, + * show, hide, etc.), as the map is controlling it. This + * function is for querying, emitting custom signals or hooking + * lower level callbacks for events on that object. Do not delete + * this object under any circumstances. + * + * @ingroup Map + */ EAPI Evas_Object *elm_map_marker_object_get(const Elm_Map_Marker *marker) EINA_ARG_NONNULL(1); + + /** + * Update the marker + * + * @param marker The marker to be updated. + * + * If a content is set to this marker, it will call function to delete it, + * #ElmMapMarkerDelFunc, and then will fetch the content again with + * #ElmMapMarkerGetFunc. + * + * These functions are set for the marker class with + * elm_map_marker_class_get_cb_set() and elm_map_marker_class_del_cb_set(). + * + * @ingroup Map + */ EAPI void elm_map_marker_update(Elm_Map_Marker *marker) EINA_ARG_NONNULL(1); + + /** + * Close all the bubbles opened by the user. + * + * @param obj The map object. + * + * A bubble is displayed with a content fetched with #ElmMapMarkerGetFunc + * when the user clicks on a marker. + * + * This functions is set for the marker class with + * elm_map_marker_class_get_cb_set(). + * + * @ingroup Map + */ EAPI void elm_map_bubbles_close(Evas_Object *obj) EINA_ARG_NONNULL(1); + + /** + * Create a new group class. + * + * @param obj The map object. + * @return Returns the new group class. + * + * Each marker must be associated to a group class. Markers in the same + * group are grouped if they are close. + * + * The group class defines the style of the marker when a marker is grouped + * to others markers. When it is alone, another class will be used. + * + * A group class will need to be provided when creating a marker with + * elm_map_marker_add(). + * + * Some properties and functions can be set by class, as: + * - style, with elm_map_group_class_style_set() + * - data - to be associated to the group class. It can be set using + * elm_map_group_class_data_set(). + * - min zoom to display markers, set with + * elm_map_group_class_zoom_displayed_set(). + * - max zoom to group markers, set using + * elm_map_group_class_zoom_grouped_set(). + * - visibility - set if markers will be visible or not, set with + * elm_map_group_class_hide_set(). + * - #ElmMapGroupIconGetFunc - used to fetch icon for markers group classes. + * It can be set using elm_map_group_class_icon_cb_set(). + * + * @see elm_map_marker_add() + * @see elm_map_group_class_style_set() + * @see elm_map_group_class_data_set() + * @see elm_map_group_class_zoom_displayed_set() + * @see elm_map_group_class_zoom_grouped_set() + * @see elm_map_group_class_hide_set() + * @see elm_map_group_class_icon_cb_set() + * + * @ingroup Map + */ EAPI Elm_Map_Group_Class *elm_map_group_class_new(Evas_Object *obj) EINA_ARG_NONNULL(1); + + /** + * Set the marker's style of a group class. + * + * @param clas The group class. + * @param style The style to be used by markers. + * + * Each marker must be associated to a group class, and will use the style + * defined by such class when grouped to other markers. + * + * The following styles are provided by default theme: + * @li @c radio - blue circle + * @li @c radio2 - green circle + * @li @c empty + * + * @see elm_map_group_class_new() for more details. + * @see elm_map_marker_add() + * + * @ingroup Map + */ EAPI void elm_map_group_class_style_set(Elm_Map_Group_Class *clas, const char *style) EINA_ARG_NONNULL(1); + + /** + * Set the icon callback function of a group class. + * + * @param clas The group class. + * @param icon_get The callback function that will return the icon. + * + * Each marker must be associated to a group class, and it can display a + * custom icon. The function @p icon_get must return this icon. + * + * @see elm_map_group_class_new() for more details. + * @see elm_map_marker_add() + * + * @ingroup Map + */ EAPI void elm_map_group_class_icon_cb_set(Elm_Map_Group_Class *clas, ElmMapGroupIconGetFunc icon_get) EINA_ARG_NONNULL(1); + + /** + * Set the data associated to the group class. + * + * @param clas The group class. + * @param data The new user data. + * + * This data will be passed for callback functions, like icon get callback, + * that can be set with elm_map_group_class_icon_cb_set(). + * + * If a data was previously set, the object will lose the pointer for it, + * so if needs to be freed, you must do it yourself. + * + * @see elm_map_group_class_new() for more details. + * @see elm_map_group_class_icon_cb_set() + * @see elm_map_marker_add() + * + * @ingroup Map + */ EAPI void elm_map_group_class_data_set(Elm_Map_Group_Class *clas, void *data) EINA_ARG_NONNULL(1); + + /** + * Set the minimum zoom from where the markers are displayed. + * + * @param clas The group class. + * @param zoom The minimum zoom. + * + * Markers only will be displayed when the map is displayed at @p zoom + * or bigger. + * + * @see elm_map_group_class_new() for more details. + * @see elm_map_marker_add() + * + * @ingroup Map + */ EAPI void elm_map_group_class_zoom_displayed_set(Elm_Map_Group_Class *clas, int zoom) EINA_ARG_NONNULL(1); + + /** + * Set the zoom from where the markers are no more grouped. + * + * @param clas The group class. + * @param zoom The maximum zoom. + * + * Markers only will be grouped when the map is displayed at + * less than @p zoom. + * + * @see elm_map_group_class_new() for more details. + * @see elm_map_marker_add() + * + * @ingroup Map + */ EAPI void elm_map_group_class_zoom_grouped_set(Elm_Map_Group_Class *clas, int zoom) EINA_ARG_NONNULL(1); + + /** + * Set if the markers associated to the group class @clas are hidden or not. + * + * @param clas The group class. + * @param hide Use @c EINA_TRUE to hide markers or @c EINA_FALSE + * to show them. + * + * If @p hide is @c EINA_TRUE the markers will be hidden, but default + * is to show them. + * + * @ingroup Map + */ EAPI void elm_map_group_class_hide_set(Evas_Object *obj, Elm_Map_Group_Class *clas, Eina_Bool hide) EINA_ARG_NONNULL(1, 2); + + /** + * Create a new marker class. + * + * @param obj The map object. + * @return Returns the new group class. + * + * Each marker must be associated to a class. + * + * The marker class defines the style of the marker when a marker is + * displayed alone, i.e., not grouped to to others markers. When grouped + * it will use group class style. + * + * A marker class will need to be provided when creating a marker with + * elm_map_marker_add(). + * + * Some properties and functions can be set by class, as: + * - style, with elm_map_marker_class_style_set() + * - #ElmMapMarkerIconGetFunc - used to fetch icon for markers classes. + * It can be set using elm_map_marker_class_icon_cb_set(). + * - #ElmMapMarkerGetFunc - used to fetch bubble content for marker classes. + * Set using elm_map_marker_class_get_cb_set(). + * - #ElmMapMarkerDelFunc - used to delete bubble content for marker classes. + * Set using elm_map_marker_class_del_cb_set(). + * + * @see elm_map_marker_add() + * @see elm_map_marker_class_style_set() + * @see elm_map_marker_class_icon_cb_set() + * @see elm_map_marker_class_get_cb_set() + * @see elm_map_marker_class_del_cb_set() + * + * @ingroup Map + */ EAPI Elm_Map_Marker_Class *elm_map_marker_class_new(Evas_Object *obj) EINA_ARG_NONNULL(1); + + /** + * Set the marker's style of a marker class. + * + * @param clas The marker class. + * @param style The style to be used by markers. + * + * Each marker must be associated to a marker class, and will use the style + * defined by such class when alone, i.e., @b not grouped to other markers. + * + * The following styles are provided by default theme: + * @li @c radio + * @li @c radio2 + * @li @c empty + * + * @see elm_map_marker_class_new() for more details. + * @see elm_map_marker_add() + * + * @ingroup Map + */ EAPI void elm_map_marker_class_style_set(Elm_Map_Marker_Class *clas, const char *style) EINA_ARG_NONNULL(1); + + /** + * Set the icon callback function of a marker class. + * + * @param clas The marker class. + * @param icon_get The callback function that will return the icon. + * + * Each marker must be associated to a marker class, and it can display a + * custom icon. The function @p icon_get must return this icon. + * + * @see elm_map_marker_class_new() for more details. + * @see elm_map_marker_add() + * + * @ingroup Map + */ EAPI void elm_map_marker_class_icon_cb_set(Elm_Map_Marker_Class *clas, ElmMapMarkerIconGetFunc icon_get) EINA_ARG_NONNULL(1); + + /** + * Set the bubble content callback function of a marker class. + * + * @param clas The marker class. + * @param get The callback function that will return the content. + * + * Each marker must be associated to a marker class, and it can display a + * a content on a bubble that opens when the user click over the marker. + * The function @p get must return this content object. + * + * If this content will need to be deleted, elm_map_marker_class_del_cb_set() + * can be used. + * + * @see elm_map_marker_class_new() for more details. + * @see elm_map_marker_class_del_cb_set() + * @see elm_map_marker_add() + * + * @ingroup Map + */ EAPI void elm_map_marker_class_get_cb_set(Elm_Map_Marker_Class *clas, ElmMapMarkerGetFunc get) EINA_ARG_NONNULL(1); + + /** + * Set the callback function used to delete bubble content of a marker class. + * + * @param clas The marker class. + * @param del The callback function that will delete the content. + * + * Each marker must be associated to a marker class, and it can display a + * a content on a bubble that opens when the user click over the marker. + * The function to return such content can be set with + * elm_map_marker_class_get_cb_set(). + * + * If this content must be freed, a callback function need to be + * set for that task with this function. + * + * If this callback is defined it will have to delete (or not) the + * object inside, but if the callback is not defined the object will be + * destroyed with evas_object_del(). + * + * @see elm_map_marker_class_new() for more details. + * @see elm_map_marker_class_get_cb_set() + * @see elm_map_marker_add() + * + * @ingroup Map + */ EAPI void elm_map_marker_class_del_cb_set(Elm_Map_Marker_Class *clas, ElmMapMarkerDelFunc del) EINA_ARG_NONNULL(1); + + /** + * Get the list of available sources. + * + * @param obj The map object. + * @return The source names list. + * + * It will provide a list with all available sources, that can be set as + * current source with elm_map_source_name_set(), or get with + * elm_map_source_name_get(). + * + * Available sources: + * @li "Mapnik" + * @li "Osmarender" + * @li "CycleMap" + * @li "Maplint" + * + * @see elm_map_source_name_set() for more details. + * @see elm_map_source_name_get() + * + * @ingroup Map + */ EAPI const char **elm_map_source_names_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); + + /** + * Set the source of the map. + * + * @param obj The map object. + * @param source The source to be used. + * + * Map widget retrieves images that composes the map from a web service. + * This web service can be set with this method. + * + * A different service can return a different maps with different + * information and it can use different zoom values. + * + * The @p source_name need to match one of the names provided by + * elm_map_source_names_get(). + * + * The current source can be get using elm_map_source_name_get(). + * + * @see elm_map_source_names_get() + * @see elm_map_source_name_get() + * + * + * @ingroup Map + */ EAPI void elm_map_source_name_set(Evas_Object *obj, const char *source_name) EINA_ARG_NONNULL(1); + + /** + * Get the name of currently used source. + * + * @param obj The map object. + * @return Returns the name of the source in use. + * + * @see elm_map_source_name_set() for more details. + * + * @ingroup Map + */ EAPI const char *elm_map_source_name_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); + + /** + * Set the source of the route service to be used by the map. + * + * @param obj The map object. + * @param source The route service to be used, being it one of + * #ELM_MAP_ROUTE_SOURCE_YOURS (default), #ELM_MAP_ROUTE_SOURCE_MONAV, + * and #ELM_MAP_ROUTE_SOURCE_ORS. + * + * Each one has its own algorithm, so the route retrieved may + * differ depending on the source route. Now, only the default is working. + * + * #ELM_MAP_ROUTE_SOURCE_YOURS is the routing service provided at + * http://www.yournavigation.org/. + * + * #ELM_MAP_ROUTE_SOURCE_MONAV, offers exact routing without heuristic + * assumptions. Its routing core is based on Contraction Hierarchies. + * + * #ELM_MAP_ROUTE_SOURCE_ORS, is provided at http://www.openrouteservice.org/ + * + * @see elm_map_route_source_get(). + * + * @ingroup Map + */ EAPI void elm_map_route_source_set(Evas_Object *obj, Elm_Map_Route_Sources source) EINA_ARG_NONNULL(1); + + /** + * Get the current route source. + * + * @param obj The map object. + * @return The source of the route service used by the map. + * + * @see elm_map_route_source_set() for details. + * + * @ingroup Map + */ EAPI Elm_Map_Route_Sources elm_map_route_source_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); + + /** + * Set the minimum zoom of the source. + * + * @param obj The map object. + * @param zoom New minimum zoom value to be used. + * + * By default, it's 0. + * + * @ingroup Map + */ EAPI void elm_map_source_zoom_min_set(Evas_Object *obj, int zoom) EINA_ARG_NONNULL(1); + + /** + * Get the minimum zoom of the source. + * + * @param obj The map object. + * @return Returns the minimum zoom of the source. + * + * @see elm_map_source_zoom_min_set() for details. + * + * @ingroup Map + */ EAPI int elm_map_source_zoom_min_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); + + /** + * Set the maximum zoom of the source. + * + * @param obj The map object. + * @param zoom New maximum zoom value to be used. + * + * By default, it's 18. + * + * @ingroup Map + */ EAPI void elm_map_source_zoom_max_set(Evas_Object *obj, int zoom) EINA_ARG_NONNULL(1); + + /** + * Get the maximum zoom of the source. + * + * @param obj The map object. + * @return Returns the maximum zoom of the source. + * + * @see elm_map_source_zoom_min_set() for details. + * + * @ingroup Map + */ EAPI int elm_map_source_zoom_max_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); + + /** + * Set the user agent used by the map object to access routing services. + * + * @param obj The map object. + * @param user_agent The user agent to be used by the map. + * + * User agent is a client application implementing a network protocol used + * in communications within a client–server distributed computing system + * + * The @p user_agent identification string will transmitted in a header + * field @c User-Agent. + * + * @see elm_map_user_agent_get() + * + * @ingroup Map + */ EAPI void elm_map_user_agent_set(Evas_Object *obj, const char *user_agent) EINA_ARG_NONNULL(1, 2); + + /** + * Get the user agent used by the map object. + * + * @param obj The map object. + * @return The user agent identification string used by the map. + * + * @see elm_map_user_agent_set() for details. + * + * @ingroup Map + */ EAPI const char *elm_map_user_agent_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); + + /** + * Add a new route to the map object. + * + * @param obj The map object. + * @param type The type of transport to be considered when tracing a route. + * @param method The routing method, what should be priorized. + * @param flon The start longitude. + * @param flat The start latitude. + * @param tlon The destination longitude. + * @param tlat The destination latitude. + * + * @return The created route or @c NULL upon failure. + * + * A route will be traced by point on coordinates (@p flat, @p flon) + * to point on coordinates (@p tlat, @p tlon), using the route service + * set with elm_map_route_source_set(). + * + * It will take @p type on consideration to define the route, + * depending if the user will be walking or driving, the route may vary. + * One of #ELM_MAP_ROUTE_TYPE_MOTOCAR, #ELM_MAP_ROUTE_TYPE_BICYCLE, or + * #ELM_MAP_ROUTE_TYPE_FOOT need to be used. + * + * Another parameter is what the route should priorize, the minor distance + * or the less time to be spend on the route. So @p method should be one + * of #ELM_MAP_ROUTE_METHOD_SHORTEST or #ELM_MAP_ROUTE_METHOD_FASTEST. + * + * Routes created with this method can be deleted with + * elm_map_route_remove(), colored with elm_map_route_color_set(), + * and distance can be get with elm_map_route_distance_get(). + * + * @see elm_map_route_remove() + * @see elm_map_route_color_set() + * @see elm_map_route_distance_get() + * @see elm_map_route_source_set() + * + * @ingroup Map + */ EAPI Elm_Map_Route *elm_map_route_add(Evas_Object *obj, Elm_Map_Route_Type type, Elm_Map_Route_Method method, double flon, double flat, double tlon, double tlat) EINA_ARG_NONNULL(1); + + /** + * Remove a route from the map. + * + * @param route The route to remove. + * + * @see elm_map_route_add() + * + * @ingroup Map + */ EAPI void elm_map_route_remove(Elm_Map_Route *route) EINA_ARG_NONNULL(1); + + /** + * Set the route color. + * + * @param route The route object. + * @param r Red channel value, from 0 to 255. + * @param g Green channel value, from 0 to 255. + * @param b Blue channel value, from 0 to 255. + * @param a Alpha channel value, from 0 to 255. + * + * It uses an additive color model, so each color channel represents + * how much of each primary colors must to be used. 0 represents + * ausence of this color, so if all of the three are set to 0, + * the color will be black. + * + * These component values should be integers in the range 0 to 255, + * (single 8-bit byte). + * + * This sets the color used for the route. By default, it is set to + * solid red (r = 255, g = 0, b = 0, a = 255). + * + * For alpha channel, 0 represents completely transparent, and 255, opaque. + * + * @see elm_map_route_color_get() + * + * @ingroup Map + */ EAPI void elm_map_route_color_set(Elm_Map_Route *route, int r, int g , int b, int a) EINA_ARG_NONNULL(1); + + /** + * Get the route color. + * + * @param route The route object. + * @param r Pointer where to store the red channel value. + * @param g Pointer where to store the green channel value. + * @param b Pointer where to store the blue channel value. + * @param a Pointer where to store the alpha channel value. + * + * @see elm_map_route_color_set() for details. + * + * @ingroup Map + */ EAPI void elm_map_route_color_get(const Elm_Map_Route *route, int *r, int *g , int *b, int *a) EINA_ARG_NONNULL(1); + + /** + * Get the route distance in kilometers. + * + * @param route The route object. + * @return The distance of route (unit : km). + * + * @ingroup Map + */ EAPI double elm_map_route_distance_get(const Elm_Map_Route *route) EINA_ARG_NONNULL(1); + + /** + * Get the information of route nodes. + * + * @param route The route object. + * @return Returns a string with the nodes of route. + * + * @ingroup Map + */ EAPI const char *elm_map_route_node_get(const Elm_Map_Route *route) EINA_ARG_NONNULL(1); + + /** + * Get the information of route waypoint. + * + * @param route the route object. + * @return Returns a string with information about waypoint of route. + * + * @ingroup Map + */ EAPI const char *elm_map_route_waypoint_get(const Elm_Map_Route *route) EINA_ARG_NONNULL(1); + + /** + * Get the address of the name. + * + * @param name The name handle. + * @return Returns the address string of @p name. + * + * This gets the coordinates of the @p name, created with one of the + * conversion functions. + * + * @see elm_map_utils_convert_name_into_coord() + * @see elm_map_utils_convert_coord_into_name() + * + * @ingroup Map + */ EAPI const char *elm_map_name_address_get(const Elm_Map_Name *name) EINA_ARG_NONNULL(1); + + /** + * Get the current coordinates of the name. + * + * @param name The name handle. + * @param lat Pointer where to store the latitude. + * @param lon Pointer where to store The longitude. + * + * This gets the coordinates of the @p name, created with one of the + * conversion functions. + * + * @see elm_map_utils_convert_name_into_coord() + * @see elm_map_utils_convert_coord_into_name() + * + * @ingroup Map + */ EAPI void elm_map_name_region_get(const Elm_Map_Name *name, double *lon, double *lat) EINA_ARG_NONNULL(1); + + /** + * Remove a name from the map. + * + * @param name The name to remove. + * + * Basically the struct handled by @p name will be freed, so convertions + * between address and coordinates will be lost. + * + * @see elm_map_utils_convert_name_into_coord() + * @see elm_map_utils_convert_coord_into_name() + * + * @ingroup Map + */ EAPI void elm_map_name_remove(Elm_Map_Name *name) EINA_ARG_NONNULL(1); + + /** + * Rotate the map. + * + * @param obj The map object. + * @param degree Angle from 0.0 to 360.0 to rotate arount Z axis. + * @param cx Rotation's center horizontal position. + * @param cy Rotation's center vertical position. + * + * @see elm_map_rotate_get() + * + * @ingroup Map + */ EAPI void elm_map_rotate_set(Evas_Object *obj, double degree, Evas_Coord cx, Evas_Coord cy) EINA_ARG_NONNULL(1); + + /** + * Get the rotate degree of the map + * + * @param obj The map object + * @param degree Pointer where to store degrees from 0.0 to 360.0 + * to rotate arount Z axis. + * @param cx Pointer where to store rotation's center horizontal position. + * @param cy Pointer where to store rotation's center vertical position. + * + * @see elm_map_rotate_set() to set map rotation. + * + * @ingroup Map + */ EAPI void elm_map_rotate_get(const Evas_Object *obj, double *degree, Evas_Coord *cx, Evas_Coord *cy) EINA_ARG_NONNULL(1, 2, 3, 4); + + /** + * Enable or disable mouse wheel to be used to zoom in / out the map. + * + * @param obj The map object. + * @param disabled Use @c EINA_TRUE to disable mouse wheel or @c EINA_FALSE + * to enable it. + * + * Mouse wheel can be used for the user to zoom in or zoom out the map. + * + * It's disabled by default. + * + * @see elm_map_wheel_disabled_get() + * + * @ingroup Map + */ EAPI void elm_map_wheel_disabled_set(Evas_Object *obj, Eina_Bool disabled) EINA_ARG_NONNULL(1); + + /** + * Get a value whether mouse wheel is enabled or not. + * + * @param obj The map object. + * @return @c EINA_TRUE means map is disabled. @c EINA_FALSE indicates + * it is enabled. If @p obj is @c NULL, @c EINA_FALSE is returned. + * + * Mouse wheel can be used for the user to zoom in or zoom out the map. + * + * @see elm_map_wheel_disabled_set() for details. + * + * @ingroup Map + */ EAPI Eina_Bool elm_map_wheel_disabled_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); + #ifdef ELM_EMAP + /** + * Add a track on the map + * + * @param obj The map object. + * @param emap The emap route object. + * @return The route object. This is an elm object of type Route. + * + * @see elm_route_add() for details. + * + * @ingroup Map + */ EAPI Evas_Object *elm_map_track_add(Evas_Object *obj, EMap_Route *emap) EINA_ARG_NONNULL(1); #endif + + /** + * Remove a track from the map + * + * @param obj The map object. + * @param route The track to remove. + * + * @ingroup Map + */ EAPI void elm_map_track_remove(Evas_Object *obj, Evas_Object *route) EINA_ARG_NONNULL(1); - /* smart callbacks called: - * "clicked" - when image clicked - * "press" - when mouse/finger held down initially on image - * "longpressed" - when mouse/finger held for long time on image - * "clicked,double" - when mouse/finger double-clicked - * "load,details" - when detailed image load begins - * "loaded,details" - when detailed image load done - * "zoom,start" - when zooming started - * "zoom,stop" - when zooming stopped - * "zoom,change" - when auto zoom mode changed zoom level - * "scroll - the content has been scrolled (moved) - * "scroll,anim,start" - scrolling animation has started - * "scroll,anim,stop" - scrolling animation has stopped - * "scroll,drag,start" - dragging the contents around has started - * "scroll,drag,stop" - dragging the contents around has stopped + /** + * @} */ /* Route */ @@ -19340,7 +20607,6 @@ extern "C" { * Get a value whether map is enabled or not. * * @param obj The mapbuf object. - * @return The value that the enabled state is set to. * @return @c EINA_TRUE means map is enabled. @c EINA_FALSE indicates * it's disabled. If @p obj is @c NULL, @c EINA_FALSE is returned. * @@ -20027,7 +21293,7 @@ extern "C" { * there will be marks every week after this date. Marks will be displayed * at 13th, 20th, 27th, 3rd June ... * - * Values don't work as bitmaks, only one can be choosen. + * Values don't work as bitmask, only one can be choosen. * * @see elm_calendar_mark_add() * diff --git a/legacy/elementary/src/lib/elm_map.c b/legacy/elementary/src/lib/elm_map.c index 8d78a41e93..f6bd2495f7 100644 --- a/legacy/elementary/src/lib/elm_map.c +++ b/legacy/elementary/src/lib/elm_map.c @@ -5,59 +5,6 @@ #include "Elementary.h" #include "elm_priv.h" -/** - * @defgroup Map Map - * @ingroup Elementary - * - * This is a widget specifically for displaying the map. It uses basically - * OpenStreetMap provider. but it can be added custom providers. - * - * Signals that you can add callbacks for are: - * - * "clicked" - This is called when a user has clicked the map without dragging - * around. - * - * "press" - This is called when a user has pressed down on the map. - * - * "longpressed" - This is called when a user has pressed down on the map for - * a long time without dragging around. - * - * "clicked,double" - This is called when a user has double-clicked the map. - * - * "load,detail" - Map detailed data load begins. - * - * "loaded,detail" - This is called when all parts of the map are loaded. - * - * "zoom,start" - Zoom animation started. - * - * "zoom,stop" - Zoom animation stopped. - * - * "zoom,change" - Zoom changed when using an auto zoom mode. - * - * "scroll" - the content has been scrolled (moved) - * - * "scroll,anim,start" - scrolling animation has started - * - * "scroll,anim,stop" - scrolling animation has stopped - * - * "scroll,drag,start" - dragging the contents around has started - * - * "scroll,drag,stop" - dragging the contents around has stopped - * - * "downloaded" - This is called when map images are downloaded - * - * "route,load" - This is called when route request begins - * - * "route,loaded" - This is called when route request ends - * - * "name,load" - This is called when name request begins - * - * "name,loaded- This is called when name request ends - * - * TODO : doxygen - */ - - typedef struct _Widget_Data Widget_Data; typedef struct _Pan Pan; typedef struct _Grid Grid; @@ -3130,14 +3077,6 @@ _utils_convert_name(const Evas_Object *obj, int method, char *address, double lo static int idnum = 1; -/** - * Add a new Map object - * - * @param parent The parent object - * @return The new object or NULL if it cannot be created - * - * @ingroup Map - */ EAPI Evas_Object * elm_map_add(Evas_Object *parent) { @@ -3273,16 +3212,6 @@ elm_map_add(Evas_Object *parent) return obj; } -/** - * Set the zoom level of the map - * - * This sets the zoom level. 0 is the world map and 18 is the maximum zoom. - * - * @param obj The map object - * @param zoom The zoom level to set - * - * @ingroup Map - */ EAPI void elm_map_zoom_set(Evas_Object *obj, int zoom) { @@ -3429,19 +3358,6 @@ elm_map_zoom_set(Evas_Object *obj, int zoom) if (zoom_changed) evas_object_smart_callback_call(obj, SIG_ZOOM_CHANGE, NULL); } -/** - * Get the zoom level of the map - * - * This returns the current zoom level of the map object. Note that if - * you set the fill mode to other than ELM_MAP_ZOOM_MODE_MANUAL - * (which is the default), the zoom level may be changed at any time by the - * map object itself to account for map size and map viewpoer size - * - * @param obj The map object - * @return The current zoom level - * - * @ingroup Map - */ EAPI int elm_map_zoom_get(const Evas_Object *obj) { @@ -3452,24 +3368,6 @@ elm_map_zoom_get(const Evas_Object *obj) return wd->zoom; } -/** - * Set the zoom mode - * - * This sets the zoom mode to manual or one of several automatic levels. - * Manual (ELM_MAP_ZOOM_MODE_MANUAL) means that zoom is set manually by - * elm_map_zoom_set() and will stay at that level until changed by code - * or until zoom mode is changed. This is the default mode. - * The Automatic modes will allow the map object to automatically - * adjust zoom mode based on properties. ELM_MAP_ZOOM_MODE_AUTO_FIT will - * adjust zoom so the map fits inside the scroll frame with no pixels - * outside this area. ELM_MAP_ZOOM_MODE_AUTO_FILL will be similar but - * ensure no pixels within the frame are left unfilled. Do not forget that the valid sizes are 2^zoom, consequently the map may be smaller than the scroller view. - * - * @param obj The map object - * @param mode The desired mode - * - * @ingroup Map - */ EAPI void elm_map_zoom_mode_set(Evas_Object *obj, Elm_Map_Zoom_Mode mode) { @@ -3488,16 +3386,6 @@ elm_map_zoom_mode_set(Evas_Object *obj, Elm_Map_Zoom_Mode mode) } } -/** - * Get the zoom mode - * - * This gets the current zoom mode of the map object - * - * @param obj The map object - * @return The current zoom mode - * - * @ingroup Map - */ EAPI Elm_Map_Zoom_Mode elm_map_zoom_mode_get(const Evas_Object *obj) { @@ -3508,15 +3396,6 @@ elm_map_zoom_mode_get(const Evas_Object *obj) return wd->mode; } -/** - * Centers the map at @p lon @p lat using an animation to scroll. - * - * @param obj The map object - * @param lon Longitude to center at - * @param lon Latitude to center at - * - * @ingroup Map - */ EAPI void elm_map_geo_region_bring_in(Evas_Object *obj, double lon, double lat) { @@ -3547,17 +3426,6 @@ elm_map_geo_region_bring_in(Evas_Object *obj, double lon, double lat) wd->center_on.lat = lat; } -/** - * Move the map to the current coordinates. - * - * This move the map to the current coordinates. The map will be centered on these coordinates. - * - * @param obj The map object - * @param lat The latitude. - * @param lon The longitude. - * - * @ingroup Map - */ EAPI void elm_map_geo_region_show(Evas_Object *obj, double lon, double lat) { @@ -3587,17 +3455,6 @@ elm_map_geo_region_show(Evas_Object *obj, double lon, double lat) wd->center_on.lat = lat; } -/** - * Get the current coordinates of the map. - * - * This gets the current coordinates of the map object. - * - * @param obj The map object - * @param lat The latitude. - * @param lon The longitude. - * - * @ingroup Map - */ EAPI void elm_map_geo_region_get(const Evas_Object *obj, double *lon, double *lat) { @@ -3614,18 +3471,6 @@ elm_map_geo_region_get(const Evas_Object *obj, double *lon, double *lat) elm_map_utils_convert_coord_into_geo(obj, sx, sy, wd->size.w, lon, lat); } -/** - * Set the paused state for map - * - * This sets the paused state to on (1) or off (0) for map. The default - * is off. This will stop zooming using animation change zoom levels and - * change instantly. This will stop any existing animations that are running. - * - * @param obj The map object - * @param paused The pause state to set - * - * @ingroup Map - */ EAPI void elm_map_paused_set(Evas_Object *obj, Eina_Bool paused) { @@ -3647,18 +3492,6 @@ elm_map_paused_set(Evas_Object *obj, Eina_Bool paused) } } -/** - * Set the paused state for the markers - * - * This sets the paused state to on (1) or off (0) for the markers. The default - * is off. This will stop displaying the markers during change zoom levels. Set - * to on if you have a large number of markers. - * - * @param obj The map object - * @param paused The pause state to set - * - * @ingroup Map - */ EAPI void elm_map_paused_markers_set(Evas_Object *obj, Eina_Bool paused) { @@ -3670,16 +3503,6 @@ elm_map_paused_markers_set(Evas_Object *obj, Eina_Bool paused) wd->paused_markers = paused; } -/** - * Get the paused state for map - * - * This gets the current paused state for the map object. - * - * @param obj The map object - * @return The current paused state - * - * @ingroup Map - */ EAPI Eina_Bool elm_map_paused_get(const Evas_Object *obj) { @@ -3690,16 +3513,6 @@ elm_map_paused_get(const Evas_Object *obj) return wd->paused; } -/** - * Get the paused state for the markers - * - * This gets the current paused state for the markers object. - * - * @param obj The map object - * @return The current paused state - * - * @ingroup Map - */ EAPI Eina_Bool elm_map_paused_markers_get(const Evas_Object *obj) { @@ -3710,18 +3523,6 @@ elm_map_paused_markers_get(const Evas_Object *obj) return wd->paused_markers; } -/** - * Get the information of downloading status - * - * This gets the current downloading status for the map object. - * - * @param obj The map object - * @param try_num the number of download trying map - * @param finish_num the number of downloaded map - * - * @ingroup Map - */ - EAPI void elm_map_utils_downloading_status_get(const Evas_Object *obj, int *try_num, int *finish_num) { @@ -3739,18 +3540,7 @@ elm_map_utils_downloading_status_get(const Evas_Object *obj, int *try_num, int * *finish_num = wd->finish_num; } } -/** - * Convert a pixel coordinate (x,y) into a geographic coordinate (longitude, latitude). - * - * @param obj The map object - * @param x the coordinate - * @param y the coordinate - * @param size the size in pixels of the map. The map is a square and generally his size is : pow(2.0, zoom)*256. - * @param lon the longitude correspond to x - * @param lat the latitude correspond to y - * - * @ingroup Map - */ + EAPI void elm_map_utils_convert_coord_into_geo(const Evas_Object *obj, int x, int y, int size, double *lon, double *lat) { @@ -3775,18 +3565,6 @@ elm_map_utils_convert_coord_into_geo(const Evas_Object *obj, int x, int y, int s } } -/** - * Convert a geographic coordinate (longitude, latitude) into a pixel coordinate (x, y). - * - * @param obj The map object - * @param lon the longitude - * @param lat the latitude - * @param size the size in pixels of the map. The map is a square and generally his size is : pow(2.0, zoom)*256. - * @param x the coordinate correspond to the longitude - * @param y the coordinate correspond to the latitude - * - * @ingroup Map - */ EAPI void elm_map_utils_convert_geo_into_coord(const Evas_Object *obj, double lon, double lat, int size, int *x, int *y) { @@ -3806,17 +3584,6 @@ elm_map_utils_convert_geo_into_coord(const Evas_Object *obj, double lon, double *y = floor((1.0 - log( tan(lat * ELM_PI / 180.0) + 1.0 / cos(lat * ELM_PI / 180.0)) / ELM_PI) / 2.0 * size); } -/** - * Convert a geographic coordinate (longitude, latitude) into a name (address). - * - * @param obj The map object - * @param lon the longitude - * @param lat the latitude - * - * @return name the address - * - * @ingroup Map - */ EAPI Elm_Map_Name * elm_map_utils_convert_coord_into_name(const Evas_Object *obj, double lon, double lat) { @@ -3824,17 +3591,6 @@ elm_map_utils_convert_coord_into_name(const Evas_Object *obj, double lon, double return _utils_convert_name(obj, ELM_MAP_NAME_METHOD_REVERSE, NULL, lon, lat); } -/** - * Convert a name (address) into a geographic coordinate (longitude, latitude). - * - * @param obj The map object - * @param name the address - * @param lat the latitude correspond to y - * - * @return name the address - * - * @ingroup Map - */ EAPI Elm_Map_Name * elm_map_utils_convert_name_into_coord(const Evas_Object *obj, char *address) { @@ -3843,20 +3599,6 @@ elm_map_utils_convert_name_into_coord(const Evas_Object *obj, char *address) return _utils_convert_name(obj, ELM_MAP_NAME_METHOD_SEARCH, address, 0.0, 0.0); } -/** - * Convert a pixel coordinate into a roated pixcel coordinate. - * - * @param obj The map object - * @param x x to rotate. - * @param y y to rotate. - * @param cx rotation's center horizontal position. - * @param cy rotation's center vertical position. - * @param degree amount of degrees from 0.0 to 360.0 to rotate arount Z axis. - * @param xx rotated x. - * @param yy rotated y. - * - * @ingroup Map - */ EAPI void elm_map_utils_rotate_coord(const Evas_Object *obj __UNUSED__, const Evas_Coord x, const Evas_Coord y, const Evas_Coord cx, const Evas_Coord cy, const double degree, Evas_Coord *xx, Evas_Coord *yy) { @@ -3877,20 +3619,6 @@ elm_map_utils_rotate_coord(const Evas_Object *obj __UNUSED__, const Evas_Coord x *yy = ty + cy; } -/** - * Add a marker on the map - * - * @param obj The map object - * @param lon the longitude - * @param lat the latitude - * @param clas the class to use - * @param clas_group the class group - * @param data the data passed to the callbacks - * - * @return The marker object - * - * @ingroup Map - */ EAPI Elm_Map_Marker * elm_map_marker_add(Evas_Object *obj, double lon, double lat, Elm_Map_Marker_Class *clas, Elm_Map_Group_Class *clas_group, void *data) { @@ -4075,13 +3803,6 @@ elm_map_marker_add(Evas_Object *obj, double lon, double lat, Elm_Map_Marker_Clas return marker; } -/** - * Remove a marker from the map - * - * @param marker The marker to remove - * - * @ingroup Map - */ EAPI void elm_map_marker_remove(Elm_Map_Marker *marker) { @@ -4149,15 +3870,6 @@ elm_map_marker_remove(Elm_Map_Marker *marker) } } -/** - * Get the current coordinates of the marker. - * - * @param marker marker. - * @param lat The latitude. - * @param lon The longitude. - * - * @ingroup Map - */ EAPI void elm_map_marker_region_get(const Elm_Map_Marker *marker, double *lon, double *lat) { @@ -4166,13 +3878,6 @@ elm_map_marker_region_get(const Elm_Map_Marker *marker, double *lon, double *lat if (lat) *lat = marker->latitude; } -/** - * Move the map to the coordinate of the marker. - * - * @param marker The marker where the map will be center. - * - * @ingroup Map - */ EAPI void elm_map_marker_bring_in(Elm_Map_Marker *marker) { @@ -4180,13 +3885,6 @@ elm_map_marker_bring_in(Elm_Map_Marker *marker) elm_map_geo_region_bring_in(marker->wd->obj, marker->longitude, marker->latitude); } -/** - * Move the map to the coordinate of the marker. - * - * @param marker The marker where the map will be center. - * - * @ingroup Map - */ EAPI void elm_map_marker_show(Elm_Map_Marker *marker) { @@ -4194,17 +3892,6 @@ elm_map_marker_show(Elm_Map_Marker *marker) elm_map_geo_region_show(marker->wd->obj, marker->longitude, marker->latitude); } -/** - * Move and zoom the map to display a list of markers. - * - * The map will be centered on the center point of the markers in the list. Then - * the map will be zoomed in order to fit the markers using the maximum zoom which - * allows display of all the markers. - * - * @param markers The list of markers (list of Elm_Map_Marker *) - * - * @ingroup Map - */ EAPI void elm_map_markers_list_show(Eina_List *markers) { @@ -4253,18 +3940,6 @@ elm_map_markers_list_show(Eina_List *markers) elm_map_zoom_set(wd->obj, zoom); } -/** - * Set the maximum numbers of markers display in a group. - * - * A group can have a long list of markers, consequently the creation of the content - * of the bubble can be very slow. In order to avoid this, a maximum number of items - * is displayed in a bubble. By default this number is 30. - * - * @param obj The map object. - * @param max The maximum numbers of items displayed in a bubble. - * - * @ingroup Map - */ EAPI void elm_map_max_marker_per_group_set(Evas_Object *obj, int max) { @@ -4275,14 +3950,6 @@ elm_map_max_marker_per_group_set(Evas_Object *obj, int max) wd->markers_max_num = max; } -/** - * Return the evas object getting from the ElmMapMarkerGetFunc callback - * - * @param marker The marker. - * @return Return the evas object if it exists, else NULL. - * - * @ingroup Map - */ EAPI Evas_Object * elm_map_marker_object_get(const Elm_Map_Marker *marker) { @@ -4290,13 +3957,6 @@ elm_map_marker_object_get(const Elm_Map_Marker *marker) return marker->content; } -/** - * Update the marker - * - * @param marker The marker. - * - * @ingroup Map - */ EAPI void elm_map_marker_update(Elm_Map_Marker *marker) { @@ -4312,13 +3972,6 @@ elm_map_marker_update(Elm_Map_Marker *marker) } } -/** - * Close all opened bubbles - * - * @param obj The map object - * - * @ingroup Map - */ EAPI void elm_map_bubbles_close(Evas_Object *obj) { @@ -4332,17 +3985,6 @@ elm_map_bubbles_close(Evas_Object *obj) _group_bubble_free(group); } -/** - * Create a group class. - * - * Each marker must be associated to a group class. Marker with the same group are grouped if they are close. - * The group class defines the style of the marker when a marker is grouped to others markers. - * - * @param obj The map object - * @return Returns the new group class - * - * @ingroup Map - */ EAPI Elm_Map_Group_Class * elm_map_group_class_new(Evas_Object *obj) { @@ -4356,14 +3998,6 @@ elm_map_group_class_new(Evas_Object *obj) return clas; } -/** - * Set the style of a group class (radio, radio2 or empty) - * - * @param clas the group class - * @param style the new style - * - * @ingroup Map - */ EAPI void elm_map_group_class_style_set(Elm_Map_Group_Class *clas, const char *style) { @@ -4371,16 +4005,6 @@ elm_map_group_class_style_set(Elm_Map_Group_Class *clas, const char *style) eina_stringshare_replace(&clas->style, style); } -/** - * Set the icon callback of a group class. - * - * A custom icon can be displayed in a marker. The function @ref icon_get must return this icon. - * - * @param clas the group class - * @param icon_get the callback to create the icon - * - * @ingroup Map - */ EAPI void elm_map_group_class_icon_cb_set(Elm_Map_Group_Class *clas, ElmMapGroupIconGetFunc icon_get) { @@ -4388,14 +4012,6 @@ elm_map_group_class_icon_cb_set(Elm_Map_Group_Class *clas, ElmMapGroupIconGetFun clas->func.icon_get = icon_get; } -/** - * Set the data associated to the group class (radio, radio2 or empty) - * - * @param clas the group class - * @param data the new user data - * - * @ingroup Map - */ EAPI void elm_map_group_class_data_set(Elm_Map_Group_Class *clas, void *data) { @@ -4403,16 +4019,6 @@ elm_map_group_class_data_set(Elm_Map_Group_Class *clas, void *data) clas->data = data; } -/** - * Set the zoom from where the markers are displayed. - * - * Markers will not be displayed for a zoom less than @ref zoom - * - * @param clas the group class - * @param zoom the zoom - * - * @ingroup Map - */ EAPI void elm_map_group_class_zoom_displayed_set(Elm_Map_Group_Class *clas, int zoom) { @@ -4420,14 +4026,6 @@ elm_map_group_class_zoom_displayed_set(Elm_Map_Group_Class *clas, int zoom) clas->zoom_displayed = zoom; } -/** - * Set the zoom from where the markers are no more grouped. - * - * @param clas the group class - * @param zoom the zoom - * - * @ingroup Map - */ EAPI void elm_map_group_class_zoom_grouped_set(Elm_Map_Group_Class *clas, int zoom) { @@ -4435,15 +4033,6 @@ elm_map_group_class_zoom_grouped_set(Elm_Map_Group_Class *clas, int zoom) clas->zoom_grouped = zoom; } -/** - * Set if the markers associated to the group class @p clas are hidden or not. - * If @ref hide is true the markers will be hidden. - * - * @param clas the group class - * @param hide if true the markers will be hidden, else they will be displayed. - * - * @ingroup Map - */ EAPI void elm_map_group_class_hide_set(Evas_Object *obj, Elm_Map_Group_Class *clas, Eina_Bool hide) { @@ -4462,18 +4051,6 @@ elm_map_group_class_hide_set(Evas_Object *obj, Elm_Map_Group_Class *clas, Eina_B } } - -/** - * Create a marker class. - * - * Each marker must be associated to a class. - * The class defines the style of the marker when a marker is displayed alone (not grouped). - * - * @param obj The map object - * @return Returns the new class - * - * @ingroup Map - */ EAPI Elm_Map_Marker_Class * elm_map_marker_class_new(Evas_Object *obj) { @@ -4486,14 +4063,6 @@ elm_map_marker_class_new(Evas_Object *obj) return clas; } -/** - * Set the style of a class (radio, radio2 or empty) - * - * @param clas the group class - * @param style the new style - * - * @ingroup Map - */ EAPI void elm_map_marker_class_style_set(Elm_Map_Marker_Class *clas, const char *style) { @@ -4501,16 +4070,6 @@ elm_map_marker_class_style_set(Elm_Map_Marker_Class *clas, const char *style) eina_stringshare_replace(&clas->style, style); } -/** - * Set the icon callback of a class. - * - * A custom icon can be displayed in a marker. The function @ref icon_get must return this icon. - * - * @param clas the group class - * @param icon_get the callback to create the icon - * - * @ingroup Map - */ EAPI void elm_map_marker_class_icon_cb_set(Elm_Map_Marker_Class *clas, ElmMapMarkerIconGetFunc icon_get) { @@ -4518,18 +4077,6 @@ elm_map_marker_class_icon_cb_set(Elm_Map_Marker_Class *clas, ElmMapMarkerIconGet clas->func.icon_get = icon_get; } -/** - * - * Set the callback of the content of the bubble. - * - * When the user click on a marker, a bubble is displayed with a content. - * The callback @ref get musst return this content. It can be NULL. - * - * @param clas the group class - * @param get the callback to create the content - * - * @ingroup Map - */ EAPI void elm_map_marker_class_get_cb_set(Elm_Map_Marker_Class *clas, ElmMapMarkerGetFunc get) { @@ -4537,17 +4084,6 @@ elm_map_marker_class_get_cb_set(Elm_Map_Marker_Class *clas, ElmMapMarkerGetFunc clas->func.get = get; } -/** - * Set the callback of the content of delete the object created by the callback "get". - * - * If this callback is defined the user will have to delete (or not) the object inside. - * If the callback is not defined the object will be destroyed with evas_object_del() - * - * @param clas the group class - * @param del the callback to delete the content - * - * @ingroup Map - */ EAPI void elm_map_marker_class_del_cb_set(Elm_Map_Marker_Class *clas, ElmMapMarkerDelFunc del) { @@ -4555,15 +4091,6 @@ elm_map_marker_class_del_cb_set(Elm_Map_Marker_Class *clas, ElmMapMarkerDelFunc clas->func.del = del; } -/** - * Get the list of the sources. - * - * @param obj The map object - * @return sources the source list - * - * @ingroup Map - */ - EAPI const char ** elm_map_source_names_get(const Evas_Object *obj) { @@ -4574,18 +4101,6 @@ elm_map_source_names_get(const Evas_Object *obj) return wd->source_names; } -/** - * Set the source of the map. - * - * Elm_Map retrieves the image which composed the map from a web service. This web service can - * be set with this method. A different service can return a different maps with different - * information and it can use different zoom value. - * - * @param obj the map object - * @param source the new source - * - * @ingroup Map - */ EAPI void elm_map_source_name_set(Evas_Object *obj, const char *source_name) { @@ -4620,14 +4135,6 @@ elm_map_source_name_set(Evas_Object *obj, const char *source_name) elm_map_zoom_set(obj, zoom); } -/** - * Get the name of a source. - * - * @param source the source - * @return Returns the name of the source - * - * @ingroup Map - */ EAPI const char * elm_map_source_name_get(const Evas_Object *obj) { @@ -4638,14 +4145,6 @@ elm_map_source_name_get(const Evas_Object *obj) return wd->src->name; } -/** - * Set the source of the route. - * - * @param clas the group class - * @param source the new source - * - * @ingroup Map - */ EAPI void elm_map_route_source_set(Evas_Object *obj, Elm_Map_Route_Sources source) { @@ -4656,14 +4155,6 @@ elm_map_route_source_set(Evas_Object *obj, Elm_Map_Route_Sources source) wd->route_source = source; } -/** - * Get the current route source - * - * @param obj the map object - * @return Returns the source of the route - * - * @ingroup Map - */ EAPI Elm_Map_Route_Sources elm_map_route_source_get(const Evas_Object *obj) { @@ -4674,13 +4165,6 @@ elm_map_route_source_get(const Evas_Object *obj) return wd->route_source; } -/** - * Set the maximum zoom of the source. - * - * @param source the source - * - * @ingroup Map - */ EAPI void elm_map_source_zoom_max_set(Evas_Object *obj, int zoom) { @@ -4692,14 +4176,6 @@ elm_map_source_zoom_max_set(Evas_Object *obj, int zoom) wd->src->zoom_max = zoom; } -/** - * Get the maximum zoom of the source. - * - * @param source the source - * @return Returns the maximum zoom of the source - * - * @ingroup Map - */ EAPI int elm_map_source_zoom_max_get(const Evas_Object *obj) { @@ -4710,13 +4186,6 @@ elm_map_source_zoom_max_get(const Evas_Object *obj) return wd->src->zoom_max; } -/** - * Set the minimum zoom of the source. - * - * @param source the source - * - * @ingroup Map - */ EAPI void elm_map_source_zoom_min_set(Evas_Object *obj, int zoom) { @@ -4728,15 +4197,6 @@ elm_map_source_zoom_min_set(Evas_Object *obj, int zoom) wd->src->zoom_min = zoom; } - -/** - * Get the minimum zoom of the source. - * - * @param source the source - * @return Returns the minimum zoom of the source - * - * @ingroup Map - */ EAPI int elm_map_source_zoom_min_get(const Evas_Object *obj) { @@ -4747,14 +4207,6 @@ elm_map_source_zoom_min_get(const Evas_Object *obj) return wd->src->zoom_min; } -/** - * Set the user agent of the widget map. - * - * @param obj The map object - * @param user_agent the user agent of the widget map - * - * @ingroup Map - */ EAPI void elm_map_user_agent_set(Evas_Object *obj, const char *user_agent) { @@ -4769,14 +4221,6 @@ elm_map_user_agent_set(Evas_Object *obj, const char *user_agent) eina_hash_set(wd->ua, "User-Agent", wd->user_agent); } -/** - * Get the user agent of the widget map. - * - * @param obj The map object - * @return The user agent of the widget map - * - * @ingroup Map - */ EAPI const char * elm_map_user_agent_get(const Evas_Object *obj) { @@ -4787,21 +4231,6 @@ elm_map_user_agent_get(const Evas_Object *obj) return wd->user_agent; } -/** - * Add a route on the map - * - * @param obj The map object - * @param type the type if transport - * @param method the routing method - * @param flon the start longitude - * @param flat the start latitude - * @param tlon the destination longitude - * @param tlat the destination latitude - * - * @return The Route object - * - * @ingroup Map - */ EAPI Elm_Map_Route * elm_map_route_add(Evas_Object *obj, Elm_Map_Route_Type type, @@ -4893,15 +4322,6 @@ elm_map_route_add(Evas_Object *obj, return route; } - -/** - * Remove a route from the map - * - * @param route The route to remove - * - * @ingroup Map - */ - EAPI void elm_map_route_remove(Elm_Map_Route *route) { @@ -4942,19 +4362,6 @@ elm_map_route_remove(Elm_Map_Route *route) } } -/** - * Set the option used for the background color - * - * @param route The route object - * @param r - * @param g - * @param b - * @param a - * - * This sets the color used for the route - * - * @ingroup Map - */ EAPI void elm_map_route_color_set(Elm_Map_Route *route, int r, int g , int b, int a) { @@ -4965,17 +4372,6 @@ elm_map_route_color_set(Elm_Map_Route *route, int r, int g , int b, int a) route->color.a = a; } -/** - * Get the option used for the background color - * - * @param route The route object - * @param r - * @param g - * @param b - * @param a - * - * @ingroup Map - */ EAPI void elm_map_route_color_get(const Elm_Map_Route *route, int *r, int *g , int *b, int *a) { @@ -4986,14 +4382,6 @@ elm_map_route_color_get(const Elm_Map_Route *route, int *r, int *g , int *b, int if (a) *a = route->color.a; } -/** - * Get the information of route distance - * - * @param route the route object - * @return Returns the distance of route (unit : km) - * - * @ingroup Map - */ EAPI double elm_map_route_distance_get(const Elm_Map_Route *route) { @@ -5001,15 +4389,6 @@ elm_map_route_distance_get(const Elm_Map_Route *route) return route->info.distance; } -/** - * Get the information of route nodes - * - * @param route the route object - * @return Returns the nodes of route - * - * @ingroup Map - */ - EAPI const char* elm_map_route_node_get(const Elm_Map_Route *route) { @@ -5017,15 +4396,6 @@ elm_map_route_node_get(const Elm_Map_Route *route) return route->info.nodes; } -/** - * Get the information of route waypoint - * - * @param route the route object - * @return Returns the waypoint of route - * - * @ingroup Map - */ - EAPI const char* elm_map_route_waypoint_get(const Elm_Map_Route *route) { @@ -5033,14 +4403,6 @@ elm_map_route_waypoint_get(const Elm_Map_Route *route) return route->info.waypoints; } -/** - * Get the information of address - * - * @param name the name object - * @return Returns the address of name - * - * @ingroup Map - */ EAPI const char * elm_map_name_address_get(const Elm_Map_Name *name) { @@ -5048,17 +4410,6 @@ elm_map_name_address_get(const Elm_Map_Name *name) return name->address; } -/** - * Get the current coordinates of the name. - * - * This gets the current coordinates of the name object. - * - * @param obj The name object - * @param lat The latitude - * @param lon The longitude - * - * @ingroup Map - */ EAPI void elm_map_name_region_get(const Elm_Map_Name *name, double *lon, double *lat) { @@ -5067,13 +4418,6 @@ elm_map_name_region_get(const Elm_Map_Name *name, double *lon, double *lat) if (lat) *lat = name->lat; } -/** - * Remove a name from the map - * - * @param name The name to remove - * - * @ingroup Map - */ EAPI void elm_map_name_remove(Elm_Map_Name *name) { @@ -5096,16 +4440,6 @@ elm_map_name_remove(Elm_Map_Name *name) } } -/** - * Set the rotate degree of the map - * - * @param obj The map object - * @param angle amount of degrees from 0.0 to 360.0 to rotate arount Z axis - * @param cx rotation's center horizontal position - * @param cy rotation's center vertical position - * - * @ingroup Map - */ EAPI void elm_map_rotate_set(Evas_Object *obj, double degree, Evas_Coord cx, Evas_Coord cy) { @@ -5119,16 +4453,6 @@ elm_map_rotate_set(Evas_Object *obj, double degree, Evas_Coord cx, Evas_Coord cy wd->calc_job = ecore_job_add(_calc_job, wd); } -/** - * Get the rotate degree of the map - * - * @param obj The map object - * @return amount of degrees from 0.0 to 360.0 to rotate arount Z axis - * @param cx rotation's center horizontal position - * @param cy rotation's center vertical position - * - * @ingroup Map - */ EAPI void elm_map_rotate_get(const Evas_Object *obj, double *degree, Evas_Coord *cx, Evas_Coord *cy) { @@ -5141,14 +4465,6 @@ elm_map_rotate_get(const Evas_Object *obj, double *degree, Evas_Coord *cx, Evas_ if (cy) *cy = wd->rotate.cy; } -/** - * Set the wheel control state of the map - * - * @param obj The map object - * @param disabled status of wheel control - * - * @ingroup Map - */ EAPI void elm_map_wheel_disabled_set(Evas_Object *obj, Eina_Bool disabled) { @@ -5163,14 +4479,6 @@ elm_map_wheel_disabled_set(Evas_Object *obj, Eina_Bool disabled) wd->wheel_disabled = !!disabled; } -/** - * Get the wheel control state of the map - * - * @param obj The map object - * @return Returns the status of wheel control - * - * @ingroup Map - */ EAPI Eina_Bool elm_map_wheel_disabled_get(const Evas_Object *obj) { @@ -5182,16 +4490,6 @@ elm_map_wheel_disabled_get(const Evas_Object *obj) } #ifdef ELM_EMAP -/** - * Add a track on the map - * - * @param obj The map object - * @param emap the emap object - * - * @return The Route object. This is a elm object of type Elm_Route - * - * @ingroup Map - */ EAPI Evas_Object * elm_map_track_add(Evas_Object *obj, EMap_Route *emap) { @@ -5206,17 +4504,8 @@ elm_map_track_add(Evas_Object *obj, EMap_Route *emap) return route; } - #endif -/** - * Remove a track from the map - * - * @param track The track to remove - * - * @ingroup Map - */ - EAPI void elm_map_track_remove(Evas_Object *obj, Evas_Object *route) { @@ -5331,4 +4620,3 @@ _nominatim_url_cb(Evas_Object *obj, int method, char *name, double lon, double l return strdup(buf); } -