summaryrefslogtreecommitdiff
path: root/legacy/elementary/src/lib/elm_map.h
diff options
context:
space:
mode:
authorBluezery <ohpowel@gmail.com>2012-03-22 10:40:04 +0000
committerCarsten Haitzler <raster@rasterman.com>2012-03-22 10:40:04 +0000
commit9e3b73137bf83e3cb2b62a03c6275e40ffd120c5 (patch)
treeb159a54584e83bee277af2f505c86c8a90db0e3f /legacy/elementary/src/lib/elm_map.h
parent047fcff3c303dbf1abdf28a6c96d41720e9cc7cf (diff)
From: Bluezery <ohpowel@gmail.com>
Subject: [E-devel] [Patch][elm_map] Add line, polygon, circle, scale overlay This patch adds new overlay APIs (line, polygon, circle, scale) for elm_map. These overlays are adhered to map even though zooming, panning. You can test these by doing "elementary_test --> click mouse right --> overlay" SVN revision: 69562
Diffstat (limited to '')
-rw-r--r--legacy/elementary/src/lib/elm_map.h126
1 files changed, 124 insertions, 2 deletions
diff --git a/legacy/elementary/src/lib/elm_map.h b/legacy/elementary/src/lib/elm_map.h
index 8b68156c96..b0b89dc41c 100644
--- a/legacy/elementary/src/lib/elm_map.h
+++ b/legacy/elementary/src/lib/elm_map.h
@@ -165,9 +165,14 @@ typedef enum _Elm_Map_Overlay_Type
165 ELM_MAP_OVERLAY_TYPE_NONE = 0, 165 ELM_MAP_OVERLAY_TYPE_NONE = 0,
166 ELM_MAP_OVERLAY_TYPE_DEFAULT, 166 ELM_MAP_OVERLAY_TYPE_DEFAULT,
167 ELM_MAP_OVERLAY_TYPE_CLASS, 167 ELM_MAP_OVERLAY_TYPE_CLASS,
168 ELM_MAP_OVERLAY_TYPE_GROUP,
168 ELM_MAP_OVERLAY_TYPE_BUBBLE, 169 ELM_MAP_OVERLAY_TYPE_BUBBLE,
169 ELM_MAP_OVERLAY_TYPE_ROUTE, 170 ELM_MAP_OVERLAY_TYPE_ROUTE,
170 ELM_MAP_OVERLAY_TYPE_GROUP 171 ELM_MAP_OVERLAY_TYPE_LINE,
172 ELM_MAP_OVERLAY_TYPE_POLYGON,
173 ELM_MAP_OVERLAY_TYPE_CIRCLE,
174 ELM_MAP_OVERLAY_TYPE_SCALE
175
171} Elm_Map_Overlay_Type; 176} Elm_Map_Overlay_Type;
172 177
173typedef 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(). */ 178typedef 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(). */
@@ -935,6 +940,10 @@ EAPI void elm_map_overlays_show(Eina_List *overlays);
935 * 940 *
936 * If the overlay is clicked, the callback wll be called. 941 * If the overlay is clicked, the callback wll be called.
937 * The clicked overlay is returned by callback. 942 * The clicked overlay is returned by callback.
943 *
944 * You can add callback to the class overlay. If one of the group overlays in this class
945 * is clicked, callback will be called and return a virtual group overlays.
946 *
938 * You can delete this callback function by setting @c NULL. 947 * You can delete this callback function by setting @c NULL.
939 * 948 *
940 * @ingroup Map 949 * @ingroup Map
@@ -956,7 +965,7 @@ EAPI void elm_map_overlay_get_cb_set(Elm_Map_Overlay *overlay, Elm_Map_Overlay_G
956 * 965 *
957 * You can change the state (hidden, paused, etc.) or set the content 966 * You can change the state (hidden, paused, etc.) or set the content
958 * or icon of the group overlays by chaning the state of the class overlay. 967 * or icon of the group overlays by chaning the state of the class overlay.
959 * Do not control the group overlay itself. 968 * Do not modifty the group overlay itself.
960 * 969 *
961 * Also these changes have a influence on the overlays in the same class 970 * Also these changes have a influence on the overlays in the same class
962 * even if each overlay is alone and is not grouped. 971 * even if each overlay is alone and is not grouped.
@@ -1024,6 +1033,27 @@ EAPI void elm_map_overlay_class_zoom_max_set(Elm_Map_Overlay *c
1024EAPI int elm_map_overlay_class_zoom_max_get(const Elm_Map_Overlay *clas); 1033EAPI int elm_map_overlay_class_zoom_max_get(const Elm_Map_Overlay *clas);
1025 1034
1026/** 1035/**
1036 * Get the overlay members of the group overlay.
1037 *
1038 * @param clas The group overlay has overlay members.
1039 *
1040 * @return The list of group overlay memebers.
1041 *
1042 * The group overlays are virtualy overlays. Those are shown and hidden dynamically.
1043 * You can add callback to the class overlay. If one of the group overlays in this class
1044 * is clicked, callback will be called and return a virtual group overlays.
1045 *
1046 * You can change the state (hidden, paused, etc.) or set the content
1047 * or icon of the group overlays by chaning the state of the class overlay.
1048 * Do not modifty the group overlay itself.
1049 *
1050 * @see elm_map_overlay_class_add()
1051 *
1052 * @ingroup Map
1053 */
1054EAPI Eina_List * elm_map_overlay_group_members_get(const Elm_Map_Overlay *grp);
1055
1056/**
1027 * Add a new bubble overlay to the map object. 1057 * Add a new bubble overlay to the map object.
1028 * This overlay has a bubble type. 1058 * This overlay has a bubble type.
1029 * 1059 *
@@ -1114,6 +1144,98 @@ EAPI void elm_map_overlay_bubble_content_clear(Elm_Map_Overlay
1114EAPI Elm_Map_Overlay * elm_map_overlay_route_add(Evas_Object *obj, const Elm_Map_Route *route); 1144EAPI Elm_Map_Overlay * elm_map_overlay_route_add(Evas_Object *obj, const Elm_Map_Route *route);
1115 1145
1116/** 1146/**
1147 * Add a new line overlay to the map object.
1148 * This overlay has a line type.
1149 *
1150 * @param obj The map object to add a new overlay.
1151 * @param flon The start longitude.
1152 * @param flat The start latitude.
1153 * @param tlon The destination longitude.
1154 * @param tlat The destination latitude.
1155 * @return The created overlay or @c NULL upon failure.
1156 *
1157 * Overlay created with this method can be deleted with elm_map_overlay_del().
1158 *
1159 * @see elm_map_overlay_del()
1160 *
1161 * @ingroup Map
1162 */
1163EAPI Elm_Map_Overlay * elm_map_overlay_line_add(Evas_Object *obj, double flon, double flat, double tlon, double tlat);
1164
1165/**
1166 * Add a new polygon overlay to the map object.
1167 * This overlay has a polygon type.
1168 *
1169 * @param obj The map object to add a new overlay.
1170 * @return The created overlay or @c NULL upon failure.
1171 *
1172 * At least 3 regions should be added to show the polygon overlay.
1173 *
1174 * Overlay created with this method can be deleted with elm_map_overlay_del().
1175 *
1176 * @see elm_map_overlay_polygon_region_add()
1177 * @see elm_map_overlay_del()
1178 *
1179 * @ingroup Map
1180 */
1181EAPI Elm_Map_Overlay * elm_map_overlay_polygon_add(Evas_Object *obj);
1182
1183/**
1184 * Add a geographic coordinates to the polygon overlay.
1185 *
1186 * @param overlay The polygon overlay to get a region.
1187 * @param lon The longitude.
1188 * @param lat The latitude.
1189 *
1190 * At least 3 regions should be added to show the polygon overlay.
1191 *
1192 * Overlay created with this method can be deleted with elm_map_overlay_del().
1193 *
1194 * @see elm_map_overlay_polygon_add()
1195 * @see elm_map_overlay_del()
1196 *
1197 * @ingroup Map
1198 */
1199EAPI void elm_map_overlay_polygon_region_add(Elm_Map_Overlay *overlay, double lon, double lat);
1200
1201/**
1202 * Add a new circle overlay to the map object.
1203 * This overlay has a circle type.
1204 *
1205 * @param obj The map object to add a new overlay.
1206 * @param lon The center longitude.
1207 * @param lat The center latitude.
1208 * @param radius The pixel length of radius.
1209 * @return The created overlay or @c NULL upon failure.
1210 *
1211 * Overlay created with this method can be deleted with elm_map_overlay_del().
1212 *
1213 * @see elm_map_overlay_del()
1214 *
1215 * @ingroup Map
1216 */
1217EAPI Elm_Map_Overlay * elm_map_overlay_circle_add(Evas_Object *obj, double lon, double lat, double radius);
1218
1219/**
1220 * Add a new scale overlay to the map object.
1221 * This overlay has a scale type.
1222 *
1223 * @param obj The map object to add a new overlay.
1224 * @param x horizontal pixel coordinate.
1225 * @param y vertical pixel coordinate
1226 * @return The created overlay or @c NULL upon failure.
1227 *
1228 * The scale overlay shows the ratio of a distance on the map to the corresponding distance.
1229 *
1230 * Overlay created with this method can be deleted with elm_map_overlay_del().
1231 *
1232 * @see elm_map_overlay_del()
1233 *
1234 * @ingroup Map
1235 */
1236EAPI Elm_Map_Overlay * elm_map_overlay_scale_add(Evas_Object *obj, Evas_Coord x, Evas_Coord y);
1237
1238/**
1117 * Get the information of tile load status. 1239 * Get the information of tile load status.
1118 * 1240 *
1119 * @param obj The map object. 1241 * @param obj The map object.