Parent Directory | Revision Log
Espeak and minor features added
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 CACHE_H |
21 | #define CACHE_H |
22 | |
23 | #include "gcvote.h" |
24 | |
25 | /* number of heading values used max for averaging */ |
26 | #define MAX_AVERAGE 10 |
27 | |
28 | typedef struct { |
29 | GtkTextBuffer *buffer; |
30 | GtkWidget *latw, *lonw, *overridew, *foundw, *datew, *loggedw; |
31 | gboolean modified; |
32 | time_t ftime; |
33 | } notes_context_t; |
34 | |
35 | typedef struct { |
36 | GtkWidget *distance_label, *bearing_label, *eph_label; |
37 | GtkWidget *lat_entry, *lon_entry; |
38 | |
39 | /* Backing pixmap for drawing area */ |
40 | GtkWidget *compass_area; |
41 | GdkPixmap *compass_pixmap; |
42 | |
43 | guint handler_id; |
44 | pos_t pos; |
45 | float heading, head_avg[MAX_AVERAGE]; |
46 | |
47 | /* things needed for sat view */ |
48 | GtkWidget *sat_area; |
49 | GdkPixmap *sat_pixmap; |
50 | |
51 | #ifdef ESPEAK |
52 | guint espeak_handler; |
53 | #endif |
54 | |
55 | } goto_context_t; |
56 | |
57 | typedef struct cache_context_s { |
58 | appdata_t *appdata; |
59 | cache_t *cache; |
60 | notes_context_t notes; |
61 | goto_context_t gotoc; |
62 | |
63 | #ifdef USE_STACKABLE_WINDOW |
64 | /* save if the notes are being changed so the cachelist can be redrawn */ |
65 | /* if we return to it */ |
66 | gboolean notes_have_been_changed; |
67 | #endif |
68 | |
69 | /* widgets in the overview that change when the pos is overwritten */ |
70 | GtkWidget *pos_lat_label, *pos_lon_label; |
71 | GtkWidget *bearing_hbox; |
72 | |
73 | GtkWidget *votes, *quality, *votebox; |
74 | gcvote_request_t *gcvote_request; |
75 | |
76 | #ifdef USE_MAEMO |
77 | guint handler_id; |
78 | #endif |
79 | } cache_context_t; |
80 | |
81 | void cache_dialog(appdata_t *appdata, cache_t *cache); |
82 | GtkWidget *cache_view(appdata_t *appdata, cache_t *cache); |
83 | |
84 | #endif // CACHE_H |