X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=src%2Fplugins%2Fgps-plugin.h;h=c9734dd50fe3bdcae36012c837e38a34391bd5a7;hb=a96b7735350ebb0d046b4cbac263110a7a10b683;hp=6517cddfefec69bee759c53f1ac785590393832b;hpb=10a7c438a16e1a499ba0ccd4d4da717657fbd343;p=aweather diff --git a/src/plugins/gps-plugin.h b/src/plugins/gps-plugin.h index 6517cdd..c9734dd 100644 --- a/src/plugins/gps-plugin.h +++ b/src/plugins/gps-plugin.h @@ -17,63 +17,54 @@ #ifndef _GPS_PLUGIN_H #define _GPS_PLUGIN_H -gpointer gps_init(GtkWidget *gbox, GtkWidget *status_bar); - -void gps_set_follow(gpointer state, gboolean track); -gboolean gps_key_press_event(gpointer state, GdkEventKey *kevent); -gboolean gps_redraw_all(gpointer data); - #define GRITS_TYPE_PLUGIN_GPS (grits_plugin_gps_get_type ()) -#define GRITS_PLUGIN_GPS(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GRITS_TYPE_PLUGIN_GPS, GritsPluginGPS)) +#define GRITS_PLUGIN_GPS(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GRITS_TYPE_PLUGIN_GPS, GritsPluginGps)) #define GRITS_IS_PLUGIN_GPS(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GRITS_TYPE_PLUGIN_GPS)) -#define GRITS_PLUGIN_GPS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GRITS_TYPE_PLUGIN_GPS, GritsPluginGPSClass)) +#define GRITS_PLUGIN_GPS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GRITS_TYPE_PLUGIN_GPS, GritsPluginGpsClass)) #define GRITS_IS_PLUGIN_GPS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GRITS_TYPE_PLUGIN_GPS)) -#define GRITS_PLUGIN_GPS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GRITS_TYPE_PLUGIN_GPS, GritsPluginGPSClass)) +#define GRITS_PLUGIN_GPS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GRITS_TYPE_PLUGIN_GPS, GritsPluginGpsClass)) -typedef struct _GritsPluginGPS GritsPluginGPS; -typedef struct _GritsPluginGPSClass GritsPluginGPSClass; +typedef struct _GritsPluginGps GritsPluginGps; +typedef struct _GritsPluginGpsClass GritsPluginGpsClass; /* All the User Interface objects we need to keep track of. */ -struct gps_ui_t { - /* gps info frame */ - GtkWidget *gps_status_frame; - GtkWidget *gps_status_table; - GtkWidget *gps_status_label; - GtkWidget *gps_latitude_label; - GtkWidget *gps_longitude_label; - GtkWidget *gps_heading_label; - GtkWidget *gps_elevation_label; - - GtkWidget *status_bar; - - /* control frame */ - GtkWidget *gps_follow_checkbox; - GtkWidget *gps_track_checkbox; - GtkWidget *gps_clear_button; - - /* log frame */ - GtkWidget *gps_log_checkbox; - GtkWidget *gps_log_filename_entry; - GtkWidget *gps_log_interval_slider; - guint gps_log_timeout_id; /* id of timeout so we can delete it */ - unsigned int gps_log_number; /* sequential log number */ - - /* range ring frame */ - GtkWidget *gps_rangering_checkbox; -}; - -struct gps_track_t { +typedef struct { + /* gps info frame */ + GtkWidget *gps_status_frame; + GtkWidget *gps_status_table; + GtkWidget *gps_status_label; + GtkWidget *gps_latitude_label; + GtkWidget *gps_longitude_label; + GtkWidget *gps_heading_label; + GtkWidget *gps_elevation_label; + + GtkWidget *status_bar; + + /* control frame */ + GtkWidget *gps_follow_checkbox; + GtkWidget *gps_track_checkbox; + GtkWidget *gps_clear_button; + + /* log frame */ + GtkWidget *gps_log_checkbox; + GtkWidget *gps_log_filename_entry; + GtkWidget *gps_log_interval_slider; + guint gps_log_timeout_id; /* id of timeout so we can delete it */ + guint gps_log_number; /* sequential log number */ +} GpsUi; + +typedef struct { /* track storage */ - gboolean active; /* Display track history */ + gboolean active; /* Display track history */ gdouble (**points)[3]; GritsLine *line; - guint cur_point; - guint num_points; - guint cur_group; -}; + guint cur_point; + guint num_points; + guint cur_group; +} GpsTrack; /* GPS private data */ -struct _GritsPluginGPS { +struct _GritsPluginGps { GObject parent_instance; /* instance members */ @@ -81,19 +72,18 @@ struct _GritsPluginGPS { GritsPrefs *prefs; GtkWidget *config; guint tab_id; - GtkWidget *hbox; GritsMarker *marker; struct gps_data_t gps_data; - gboolean follow_gps; - gboolean gps_rangering_active; /* range rings are visible or not */ - guint gps_update_timeout_id; /* id of timeout so we can delete it */ - struct gps_track_t track; - struct gps_ui_t ui; + gboolean follow_gps; + guint gps_update_timeout_id; /* id of timeout so we can delete it */ + + GpsTrack track; + GpsUi ui; }; -struct _GritsPluginGPSClass { +struct _GritsPluginGpsClass { GObjectClass parent_class; };