2 * Copyright (C) 2006, 2007 John Costigan.
4 * POI and GPS-Info code originally written by Cezary Jackiewicz.
6 * Default map data provided by http://www.openstreetmap.org/
8 * This file is part of Maemo Mapper.
10 * Maemo Mapper is free software: you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation, either version 3 of the License, or
13 * (at your option) any later version.
15 * Maemo Mapper is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with Maemo Mapper. If not, see <http://www.gnu.org/licenses/>.
28 #ifndef MAEMO_MAPPER_UTIL_H
29 #define MAEMO_MAPPER_UTIL_H
32 # include <hildon/hildon-controlbar.h>
34 # include <hildon-widgets/hildon-controlbar.h>
37 void popup_error(GtkWidget *window, const gchar *error);
39 Point locate_address(GtkWidget *parent, const gchar *address);
41 gdouble calculate_distance(gdouble lat1, gdouble lon1,
42 gdouble lat2, gdouble lon2);
43 gdouble calculate_bearing(gdouble lat1, gdouble lon1,
44 gdouble lat2, gdouble lon2);
46 void force_min_visible_bars(HildonControlbar *control_bar, gint num_bars);
48 gboolean banner_reset(void);
50 void deg_format(gdouble coor, gchar *scoor, gchar neg_char, gchar pos_char);
52 gdouble strdmstod(const gchar *nptr, gchar **endptr);
54 gboolean parse_coords(const gchar* txt_lat, const gchar* txt_lon, gdouble* lat, gdouble* lon);
55 void format_lat_lon(gdouble d_lat, gdouble d_lon, gchar* lat, gchar* lon);
57 gboolean coord_system_check_lat_lon (gdouble lat, gdouble lon, gint *fallback_deg_format);
59 gint64 g_ascii_strtoll(const gchar *nptr, gchar **endptr, guint base);
61 #endif /* ifndef MAEMO_MAPPER_UTIL_H */