]> git.itanic.dy.fi Git - maemo-mapper/blob - src/util.h
Always compile before checkins!
[maemo-mapper] / src / util.h
1 /*
2  * Copyright (C) 2006, 2007 John Costigan.
3  *
4  * POI and GPS-Info code originally written by Cezary Jackiewicz.
5  *
6  * Default map data provided by http://www.openstreetmap.org/
7  *
8  * This file is part of Maemo Mapper.
9  *
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.
14  *
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.
19  *
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/>.
22  */
23
24 #ifdef HAVE_CONFIG_H
25 #    include "config.h"
26 #endif
27
28 #ifndef MAEMO_MAPPER_UTIL_H
29 #define MAEMO_MAPPER_UTIL_H
30
31 #ifndef LEGACY
32 #    include <hildon/hildon-controlbar.h>
33 #else
34 #    include <hildon-widgets/hildon-controlbar.h>
35 #endif
36
37 void popup_error(GtkWidget *window, const gchar *error);
38
39 Point locate_address(GtkWidget *parent, const gchar *address);
40
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);
45
46 void force_min_visible_bars(HildonControlbar *control_bar, gint num_bars);
47
48 gboolean banner_reset(void);
49
50 void deg_format(gdouble coor, gchar *scoor, gchar neg_char, gchar pos_char);
51
52 gdouble strdmstod(const gchar *nptr, gchar **endptr);
53
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);
56
57 gboolean coord_system_check_lat_lon (gdouble lat, gdouble lon, gint *fallback_deg_format);
58
59 gint64 g_ascii_strtoll(const gchar *nptr, gchar **endptr, guint base);
60
61 #endif /* ifndef MAEMO_MAPPER_UTIL_H */