Contents of /trunk/src/cache.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 228 - (hide annotations)
Thu Dec 3 20:07:13 2009 UTC (14 years, 6 months ago) by harbaum
File MIME type: text/plain
File size: 2143 byte(s)
Various small bug fixes
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 CACHE_H
21     #define CACHE_H
22    
23 harbaum 158 #include "gcvote.h"
24    
25 harbaum 1 /* 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 harbaum 214 GtkWidget *distance_label, *bearing_label, *eph_label;
37 harbaum 221 GtkWidget *lat_entry, *lon_entry, *coo_popup;
38 harbaum 1
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     } goto_context_t;
52    
53 harbaum 228 typedef struct cache_context_s {
54 harbaum 1 appdata_t *appdata;
55     cache_t *cache;
56     notes_context_t notes;
57     goto_context_t gotoc;
58    
59 harbaum 228 #ifdef USE_STACKABLE_WINDOW
60     /* save if the notes are being changed so the cachelist can be redrawn */
61     /* if we return to it */
62     gboolean notes_have_been_changed;
63     #endif
64    
65 harbaum 1 /* widgets in the overview that change when the pos is overwritten */
66     GtkWidget *pos_lat_label, *pos_lon_label;
67     GtkWidget *bearing_hbox;
68    
69 harbaum 159 GtkWidget *votes, *quality, *votebox;
70 harbaum 158 gcvote_request_t *gcvote_request;
71    
72 harbaum 1 #ifdef USE_MAEMO
73     guint handler_id;
74     #endif
75     } cache_context_t;
76    
77     void cache_dialog(appdata_t *appdata, cache_t *cache);
78     GtkWidget *cache_view(appdata_t *appdata, cache_t *cache);
79    
80     #endif // CACHE_H