X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fmap.h;h=901d5821965282c5e56bb7a56a062c0d7bb43514;hb=58474327652708ba09a8e63801db8e119c24ee33;hp=523ae5d5a36d1ecafb2b8f021fb8f633292d3019;hpb=4bbf05be3b9cfe0c5506201159a771411bfa3049;p=mapper diff --git a/src/map.h b/src/map.h index 523ae5d..901d582 100644 --- a/src/map.h +++ b/src/map.h @@ -22,9 +22,9 @@ #include "mapper-types.h" typedef enum { - MAP_MODE_NORMAL=0, + MAP_MODE_NORMAL=0, MAP_MODE_DRAW_TRACK, - MAP_MODE_DRAW_ROUTE, + MAP_MODE_DRAW_ROUTE, MAP_MODE_SET_ROUTE_FROM, MAP_MODE_SET_ROUTE_POINT, MAP_MODE_SET_ROUTE_TO, @@ -62,29 +62,38 @@ guint _focus_unitwidth; guint _focus_unitheight; guint _world_size_tiles; -/** VARIABLES FOR ACCESSING THE LOCATION/BOUNDS OF THE CURRENT MARK. */ -gint _mark_x1; -gint _mark_x2; -gint _mark_y1; -gint _mark_y2; -gint _mark_minx; -gint _mark_miny; -gint _mark_width; -gint _mark_height; - -/** DOWNLOAD PROGRESS. */ -CURLM *_curl_multi; -GQueue *_curl_easy_queue; -guint _num_downloads; -guint _curr_download; -GTree *_pui_tree; -GTree *_downloading_tree; -GHashTable *_pui_by_easy; - guint _key_zoom_new; guint _key_zoom_timeout_sid; +gboolean _map_location_known; +gdouble _map_location_dist; + +/** The widget that provides the visual display of the map. */ +GtkWidget *_map_widget; + +/** The backing pixmap of _map_widget. */ +GdkPixmap *_map_pixmap; + +GtkWidget *map_new(void); + gboolean map_key_zoom_timeout(); -gboolean curl_download_timeout(); + +int map_zoom(gint zdir); +gboolean map_zoom_in(void); +gboolean map_zoom_out(void); +void map_set_autozoom(gboolean az); +void map_render_path(Path * path, GdkGC ** gc); +void map_pan(gint delta_unitx, gint delta_unity); +void map_move_mark(void); +void map_set_mark(void); +void map_render_data(void); + +void map_render_tile(guint tilex, guint tiley, guint destx, guint desty, gboolean fast_fail); + +void map_center_unit(guint new_center_unitx, guint new_center_unity); +void map_center_latlon(gdouble lat, gdouble lon); + +gboolean map_goto_position(Position *pos); +gboolean map_update_location_from_center(void); #endif