Contents of /trunk/src/cache.h

Parent Directory Parent Directory | Revision Log Revision Log


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