Parent Directory | Revision Log
Unified coo tool
1 | harbaum | 1 | /* |
2 | * Copyright (C) 2008 Till Harbaum <till@harbaum.org>. | ||
3 | * | ||
4 | * This file is part of GPXView. | ||
5 | * | ||
6 | * GPXView is free software: you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation, either version 3 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * GPXView is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with GPXView. If not, see <http://www.gnu.org/licenses/>. | ||
18 | */ | ||
19 | |||
20 | #ifndef MISC_H | ||
21 | #define MISC_H | ||
22 | |||
23 | #define SIZE_NORMAL 0 | ||
24 | #define SIZE_BIG 1 /* effect only on non-maemo */ | ||
25 | #define SIZE_SMALL 2 /* effect only on maemo */ | ||
26 | |||
27 | #define STRIKETHROUGH_NONE 0 | ||
28 | #define STRIKETHROUGH 1 | ||
29 | #define STRIKETHROUGH_RED 2 | ||
30 | |||
31 | #ifdef USE_MAEMO | ||
32 | #define GTK_LABEL_BIG(a) gtk_label_new(a) | ||
33 | #define GTK_LABEL_SMALL(a) gtk_label_small(a) | ||
34 | GtkWidget *gtk_label_small(char *str); | ||
35 | #else | ||
36 | #define GTK_LABEL_SMALL(a) gtk_label_new(a) | ||
37 | #define GTK_LABEL_BIG(a) gtk_label_big(a) | ||
38 | GtkWidget *gtk_label_big(char *str); | ||
39 | #endif | ||
40 | |||
41 | GtkWidget *gtk_label_attrib(char *str, int size, int strikethrough); | ||
42 | GtkWidget *gtk_button_attrib(char *str, int size, int strikethrough); | ||
43 | void gtk_label_attrib_set(GtkWidget *label, | ||
44 | char *str, int size, int strikethrough); | ||
45 | |||
46 | void pos_lat_str(char *str, int len, float latitude); | ||
47 | void pos_lon_str(char *str, int len, float longitude); | ||
48 | GtkWidget *pos_lat(float latitude, int size, int strikethrough); | ||
49 | GtkWidget *pos_lon(float longitude, int size, int strikethrough); | ||
50 | float pos_parse_lat(char *str); | ||
51 | float pos_parse_lon(char *str); | ||
52 | const char *pos_get_bearing_str(pos_t from, pos_t to); | ||
53 | |||
54 | void textbox_enable(GtkWidget *widget); | ||
55 | void textbox_disable(GtkWidget *widget); | ||
56 | |||
57 | int checkdir(char *dir); | ||
58 | char strlastchr(char *str); | ||
59 | |||
60 | pos_t *get_pos(appdata_t *appdata); | ||
61 | |||
62 | void distance_str(char *str, int len, float dist, gboolean mil); | ||
63 | float distance_parse(char *str, gboolean imperial); | ||
64 | |||
65 | GtkWidget *lat_entry_new(float lat); | ||
66 | GtkWidget *lon_entry_new(float lon); | ||
67 | GtkWidget *dist_entry_new(float dist, gboolean mil); | ||
68 | float lat_get(GtkWidget *widget); | ||
69 | float lon_get(GtkWidget *widget); | ||
70 | float dist_get(GtkWidget *widget, gboolean mil); | ||
71 | |||
72 | harbaum | 198 | GtkWidget *left_label_new(char *str); |
73 | |||
74 | harbaum | 1 | #ifndef USE_MAEMO |
75 | #ifdef ENABLE_BROWSER_INTERFACE | ||
76 | extern int browser_url(appdata_t *appdata, char *url); | ||
77 | #endif | ||
78 | #endif | ||
79 | |||
80 | harbaum | 77 | void rmdir_recursive(char *path); |
81 | harbaum | 137 | GtkWidget *link_button_attrib(appdata_t *appdata, char *str, char *url, |
82 | int size, int strikethrough); | ||
83 | GtkWidget *link_button_by_id(appdata_t *appdata, char *str, | ||
84 | const char *type, int id); | ||
85 | harbaum | 138 | GtkWidget *link_icon_button_by_id(appdata_t *appdata, GtkWidget *icon, |
86 | const char *type, int id); | ||
87 | harbaum | 165 | GtkWidget *simple_text_widget(char *text); |
88 | harbaum | 212 | |
89 | GtkWidget *coo_popup(appdata_t *appdata, GtkWidget *lat_entry, GtkWidget *lon_entry); | ||
90 | GtkWidget *entry_new(void); | ||
91 | |||
92 | harbaum | 214 | gboolean pos_differ(pos_t *pos1, pos_t *pos2); |
93 | |||
94 | harbaum | 1 | #endif // MISC_H |