source: trunk/third/gnome-applets/gweather/gweather.h @ 20910

Revision 20910, 3.2 KB checked in by ghudson, 20 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r20909, which included commits to RCS files with non-trunk default branches.
Line 
1#ifndef __GWEATHER_H__
2#define __GWEATHER_H__
3
4/*
5 *  todd kulesza <fflewddur@dropline.net>
6 *
7 *  This code released under the GNU GPL.
8 *  Read the file COPYING for more information.
9 *
10 * main header file
11 *
12 */
13
14#include <gnome.h>
15#include <panel-applet.h>
16
17
18
19/* Radar map on by default. */
20#define RADARMAP
21
22G_BEGIN_DECLS
23 
24typedef struct _GWeatherApplet GWeatherApplet;
25typedef struct _GWeatherPrefs GWeatherPrefs;
26typedef struct _WeatherInfo WeatherInfo;
27typedef struct _WeatherLocation WeatherLocation;
28
29typedef enum {
30    TEMP_UNIT_INVALID = 0,
31    TEMP_UNIT_DEFAULT,
32    TEMP_UNIT_KELVIN,
33    TEMP_UNIT_CENTIGRADE,
34    TEMP_UNIT_FAHRENHEIT
35} TempUnit;
36
37typedef enum {
38    SPEED_UNIT_INVALID = 0,
39    SPEED_UNIT_DEFAULT,
40    SPEED_UNIT_MS,    /* metres per second */
41    SPEED_UNIT_KPH,   /* kilometres per hour */
42    SPEED_UNIT_MPH,   /* miles per hour */
43    SPEED_UNIT_KNOTS  /* Knots */
44} SpeedUnit;
45
46typedef enum {
47    PRESSURE_UNIT_INVALID = 0,
48    PRESSURE_UNIT_DEFAULT,
49        PRESSURE_UNIT_KPA,    /* kiloPascal */
50        PRESSURE_UNIT_HPA,    /* hectoPascal */
51        PRESSURE_UNIT_MB,     /* 1 millibars = 1 hectoPascal */
52    PRESSURE_UNIT_MM_HG,  /* millimeters of mecury */
53        PRESSURE_UNIT_INCH_HG /* inchecs of mercury */
54} PressureUnit;
55
56typedef enum {
57    DISTANCE_UNIT_INVALID = 0,
58    DISTANCE_UNIT_DEFAULT,
59    DISTANCE_UNIT_METERS,
60    DISTANCE_UNIT_KM,
61    DISTANCE_UNIT_MILES
62} DistanceUnit;
63
64struct _GWeatherPrefs {
65    WeatherLocation *location;
66    gint update_interval;  /* in seconds */
67    gboolean update_enabled;
68    gboolean detailed;
69    gboolean radar_enabled;
70    gboolean use_custom_radar_url;
71    gchar *radar;
72       
73        TempUnit     temperature_unit;
74        gboolean     use_temperature_default;
75        SpeedUnit    speed_unit;
76        gboolean     use_speed_default;
77        PressureUnit pressure_unit;
78        gboolean     use_pressure_default;
79        DistanceUnit distance_unit;
80        gboolean     use_distance_default;
81
82};
83
84struct _GWeatherApplet
85{
86        PanelApplet *applet;
87        WeatherInfo *gweather_info;
88
89        GtkWidget *container;
90        GtkWidget *box;
91        GtkWidget *label;
92        GtkWidget *image;
93        GtkTooltips *tooltips;
94       
95        PanelAppletOrient orient;
96        gint size;
97        gint timeout_tag;
98
99        GtkWidget *about_dialog;
100       
101        /* preferences  */
102        GWeatherPrefs gweather_pref;
103
104        GtkWidget *pref;
105
106        GtkWidget *pref_basic_detailed_btn;
107        GtkWidget *pref_basic_temp_combo;
108    GtkWidget *pref_basic_speed_combo;
109    GtkWidget *pref_basic_dist_combo;
110    GtkWidget *pref_basic_pres_combo;
111       
112#ifdef RADARMAP
113        GtkWidget *pref_basic_radar_btn;
114        GtkWidget *pref_basic_radar_url_btn;
115        GtkWidget *pref_basic_radar_url_hbox;
116        GtkWidget *pref_basic_radar_url_entry;
117#endif /* RADARMAP */
118        GtkWidget *pref_basic_update_spin;
119        GtkWidget *pref_basic_update_btn;
120        GtkWidget *pref_tree;
121       
122        /* dialog stuff */
123        GtkWidget *gweather_dialog;
124
125        GtkWidget *cond_location;
126        GtkWidget *cond_update;
127        GtkWidget *cond_cond;
128        GtkWidget *cond_sky;
129        GtkWidget *cond_temp;
130        GtkWidget *cond_dew;
131        GtkWidget *cond_humidity;
132        GtkWidget *cond_wind;
133        GtkWidget *cond_pressure;
134        GtkWidget *cond_vis;
135        GtkWidget *cond_apparent;
136        GtkWidget *cond_image;
137        GtkWidget *forecast_text;
138        GtkWidget *radar_image;
139
140        GdkPixbuf *dialog_pixbuf;
141        GdkBitmap *dialog_mask;
142        GdkPixbuf *applet_pixbuf;
143        GdkBitmap *applet_mask;
144};
145
146G_END_DECLS
147 
148#endif
Note: See TracBrowser for help on using the repository browser.