Diff of /trunk/src/gpxview.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2 by harbaum, Sat Jun 20 11:44:14 2009 UTC revision 252 by harbaum, Thu Feb 4 20:15:19 2010 UTC
# Line 24  Line 24 
24  #if MAEMO_VERSION_MAJOR < 5  #if MAEMO_VERSION_MAJOR < 5
25  #define USE_BREAD_CRUMB_TRAIL  #define USE_BREAD_CRUMB_TRAIL
26  #else  #else
27    #define FREMANTLE
28    
29  // these are on maemo fremantle  // these are on maemo fremantle
30    #include <hildon/hildon-button.h>
31    #include <hildon/hildon-text-view.h>
32    #include <hildon/hildon-window-stack.h>
33    #define USE_HILDON_TEXT_VIEW
34  #define USE_STACKABLE_WINDOW  #define USE_STACKABLE_WINDOW
35  #define NO_COPY_N_PASTE  #define NO_COPY_N_PASTE
36    #define MENU_GPXLIST   0
37    #define MENU_CACHELIST 1
38    #define MENU_CACHE     2
39  #endif  #endif
40  #endif  #endif
41    
42    #ifdef BCT
43    #include "bct.h"
44    #endif
45    
46  #include "config.h"  #include "config.h"
47    
48  #include <string.h>  #include <string.h>
# Line 43  Line 56 
56    
57  #ifdef USE_MAEMO  #ifdef USE_MAEMO
58  #include <hildon/hildon-program.h>  #include <hildon/hildon-program.h>
 #include <hildon/hildon-text-view.h>  
59  #include <hildon/hildon-file-chooser-dialog.h>  #include <hildon/hildon-file-chooser-dialog.h>
60  #include <hildon/hildon-file-system-model.h>  #include <hildon/hildon-file-system-model.h>
61  #include <hildon/hildon-bread-crumb-trail.h>  #include <hildon/hildon-bread-crumb-trail.h>
# Line 55  Line 67 
67  #if MAEMO_VERSION_MAJOR >= 5  #if MAEMO_VERSION_MAJOR >= 5
68  #define USE_PANNABLE_AREA  #define USE_PANNABLE_AREA
69  #include <hildon/hildon-pannable-area.h>  #include <hildon/hildon-pannable-area.h>
70    /* panning a gtkhtml view currently doesn't work well */
71    #define PANNABLE_HTML
72  #endif  #endif
73  #endif  #endif
74    
# Line 97  typedef struct { Line 111  typedef struct {
111    pos_t gps;                  /* saved last gps position */    pos_t gps;                  /* saved last gps position */
112    
113    char *image_path;           /* path to cache images in */    char *image_path;           /* path to cache images in */
   gboolean load_images;       /* load images and cache them */  
114    
115    int search;                 /* "search in" items */    int search;                 /* "search in" items */
116    char *search_str;    char *search_str;
117    int search_days;    int search_days;
118    
119      struct proxy_s *proxy;      /* proxy settings */
120    
121    int gpxlist_items;    int gpxlist_items;
122    int cachelist_items;    int cachelist_items;
   guint cachelist_handler_id; /* update timer */  
123    gboolean cachelist_hide_found;    gboolean cachelist_hide_found;
124    
125    /* geotext related */    /* geotext related */
# Line 117  typedef struct { Line 131  typedef struct {
131    GtkWidget    *gpxview;    GtkWidget    *gpxview;
132    GConfClient *gconf_client;    GConfClient *gconf_client;
133    
   pos_t manual_goto;  
134    gboolean compass_locked;    gboolean compass_locked;
135    int compass_damping;    int compass_damping;
136    
137      gboolean disable_gcvote;
138    
139    struct gps_state *gps_state;    struct gps_state *gps_state;
140    
141    /* keep track of all html views so zoom events can be delivered */    /* keep track of all html views so zoom events can be delivered */
# Line 134  typedef struct { Line 149  typedef struct {
149  #ifndef NO_COPY_N_PASTE  #ifndef NO_COPY_N_PASTE
150    /* do enable/disable the edit entries */    /* do enable/disable the edit entries */
151    GtkWidget *menu_cut, *menu_copy, *menu_paste;    GtkWidget *menu_cut, *menu_copy, *menu_paste;
   GtkClipboard *clipboard;     /* clipboard for copy/paste */  
152    GtkTextBuffer *active_buffer;    GtkTextBuffer *active_buffer;
153  #endif  #endif
154    
155      GtkClipboard *clipboard;     /* clipboard for copy/paste */
156    
157    #ifdef USE_STACKABLE_WINDOW
158      GtkWidget *export_menu, *tools_menu;
159    #endif
160    
161    /* save result here to be able to "goto" it */    /* save result here to be able to "goto" it */
162    pos_t geomath;    pos_t geomath;
163    
# Line 157  typedef struct { Line 177  typedef struct {
177    
178  #ifdef USE_MAEMO  #ifdef USE_MAEMO
179    gboolean fullscreen;    gboolean fullscreen;
180    #ifdef ENABLE_MAEMO_MAPPER
181    pos_t mmpos;                /* position received from Maemo Mapper */    pos_t mmpos;                /* position received from Maemo Mapper */
182    gboolean mmpos_valid;    gboolean mmpos_valid;
183    #endif
184    
185    gboolean mmpoi_dontlaunch;    gboolean mmpoi_dontlaunch;
186    
187    gboolean cachelist_disable_screensaver;    gboolean cachelist_disable_screensaver;
188    gboolean goto_disable_screensaver;    gboolean goto_disable_screensaver;
   gboolean cachelist_update;  
189    
190    HildonProgram *program;    HildonProgram *program;
191    HildonWindow *window;    HildonWindow *window;
192    osso_context_t *osso_context;    osso_context_t *osso_context;
193    GtkWidget *bct;  #else
194    gpx_t *search_results;    GtkWidget *window;
195    #endif
196    
197      gboolean cachelist_update;
198    
199    #if defined(USE_BREAD_CRUMB_TRAIL) || defined(BCT)
200    /* reference to enable/disable these while walking the crumb trail */    /* reference to enable/disable these while walking the crumb trail */
201    GtkWidget *menu_import, *menu_export;    GtkWidget *menu_import, *menu_export;
202    GtkWidget *menu_search;    GtkWidget *menu_search;
203    
204      GtkWidget *bct;
205    #endif
206    
207    /* keep track of current "path" in the bread crumb trail */    /* keep track of current "path" in the bread crumb trail */
208    gpx_t *cur_gpx;    gpx_t *cur_gpx;
209    cache_t *cur_cache;    cache_t *cur_cache;
210      struct cache_context_s *cache_context;
211    
212  #else    gpx_t *search_results;
213    GtkWidget *window;  
214    #ifdef ENABLE_OSM_GPS_MAP
215      struct {
216        struct map_context_s *context;
217        int source;
218        int zoom;
219        pos_t pos;
220      } map;
221  #endif  #endif
222    
223      /* username is also used to detect own caches (by log entry) */
224      char *username;
225    
226      /* stuff to call geotoad */
227      struct {
228        char *password, *filename;
229        float distance, lat, lon;
230        int flags;
231        gboolean no_owned_found;
232      } gt;
233    
234    #ifdef ESPEAK
235      /* espeak handling */
236      struct {
237        gboolean enabled;
238        int sample_rate;  // or init error
239      } espeak;
240    #endif
241    
242    #ifndef USE_STACKABLE_WINDOW
243    GtkWidget *vbox;    GtkWidget *vbox;
244    #endif
245  } appdata_t;  } appdata_t;
246    
247  /* all includes that rely on appdata_t go here ... */  /* all includes that rely on appdata_t go here ... */
# Line 192  typedef struct { Line 250  typedef struct {
250  #include "gconf.h"  #include "gconf.h"
251  #include "html.h"  #include "html.h"
252  #include "icons.h"  #include "icons.h"
253    #include "gcvote.h"
254  #include "cache.h"  #include "cache.h"
255  #include "geomath.h"  #include "geomath.h"
256  #include "geotext.h"  #include "geotext.h"
# Line 200  typedef struct { Line 259  typedef struct {
259  #include "mm_poi.h"  #include "mm_poi.h"
260  #include "precpos.h"  #include "precpos.h"
261  #include "garmin_export.h"  #include "garmin_export.h"
262    #include "geotoad.h"
263    #include "about.h"
264    
265    #ifdef ENABLE_OSM_GPS_MAP
266    #include "map-tool.h"
267    #endif
268    
269  #ifdef USE_MAEMO  #ifdef USE_MAEMO
270  #include "dbus.h"  #include "dbus.h"
# Line 231  extern void main_after_settings_redraw(a Line 296  extern void main_after_settings_redraw(a
296  #include <stdarg.h>  #include <stdarg.h>
297  extern void errorf(const char *fmt, ...);  extern void errorf(const char *fmt, ...);
298  extern gboolean on_window_key_press(GtkWidget *widget,  extern gboolean on_window_key_press(GtkWidget *widget,
299                                      GdkEventKey *event, gpointer data);                                      GdkEventKey *event, appdata_t *appdata);
300    #ifdef USE_STACKABLE_WINDOW
301    HildonAppMenu *menu_create(appdata_t *appdata, int mode);
302    #endif
303    void cachelist_goto_cache(appdata_t *appdata, cache_t *cache);
304    void gpxlist_goto_cachelist(appdata_t *appdata, gpx_t *gpx);
305    gboolean gpxlist_find(appdata_t *appdata, GtkTreeIter *iter, gpx_t *gpx);
306    void gpxlist_set(GtkListStore *store, GtkTreeIter *iter, gpx_t *gpx);
307    void gpxlist_add(appdata_t *appdata, gpx_t *new);
308    void cachelist_redraw(appdata_t *appdata);
309    
310  #endif // GPXVIEW_H  #endif // GPXVIEW_H

Legend:
Removed from v.2  
changed lines
  Added in v.252