diff options
author | Giovanni Campagna <gcampagna@src.gnome.org> | 2011-04-05 21:36:32 +0200 |
---|---|---|
committer | Javier Jardón <jjardon@gnome.org> | 2012-03-09 17:37:26 +0000 |
commit | 7d32d907d0997d8dbdafc08ca807f132820660e3 (patch) | |
tree | 77349e2f17e1550aea95fd36385d4356280ddf54 /libgweather/gweather-enums.h | |
parent | 0729a784672e2a26fe19185c01562798039eb926 (diff) | |
download | libgweather-7d32d907d0997d8dbdafc08ca807f132820660e3.tar.gz |
Port to GSettings
Kill GWeatherPrefs and GWeatherGConf, as it is very easy to just
construct a GSettings object. Make GWeatherInfo use a default
settings object for its string methods. Make GWeatherLocation
serializable to a GVariant and store that in the settings,
killing WeatherLocation.
https://bugzilla.gnome.org/show_bug.cgi?id=646854
Diffstat (limited to 'libgweather/gweather-enums.h')
-rw-r--r-- | libgweather/gweather-enums.h | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/libgweather/gweather-enums.h b/libgweather/gweather-enums.h new file mode 100644 index 0000000..1191cd6 --- /dev/null +++ b/libgweather/gweather-enums.h @@ -0,0 +1,67 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */ +/* gweather-enums.h: enumerations for GWeather settings + * + * Copyright: 2011 Giovanni Campagna <scampa.giovanni@gmail.com> + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see + * <http://www.gnu.org/licenses/>. + */ + +#ifndef __GWEATHER_ENUMS_H_ +#define __GWEATHER_ENUMS_H_ + +typedef enum { /*< underscore_name=gweather_forecast_type >*/ + GWEATHER_FORECAST_STATE, + GWEATHER_FORECAST_ZONE, + GWEATHER_FORECAST_LIST +} GWeatherForecastType; + +typedef enum { /*< underscore_name=gweather_temperature_unit >*/ + GWEATHER_TEMP_UNIT_INVALID = 0, + GWEATHER_TEMP_UNIT_DEFAULT, + GWEATHER_TEMP_UNIT_KELVIN, + GWEATHER_TEMP_UNIT_CENTIGRADE, + GWEATHER_TEMP_UNIT_FAHRENHEIT +} GWeatherTemperatureUnit; + +typedef enum { /*< underscore_name=gweather_speed_unit >*/ + GWEATHER_SPEED_UNIT_INVALID = 0, + GWEATHER_SPEED_UNIT_DEFAULT, + GWEATHER_SPEED_UNIT_MS, /* metres per second */ + GWEATHER_SPEED_UNIT_KPH, /* kilometres per hour */ + GWEATHER_SPEED_UNIT_MPH, /* miles per hour */ + GWEATHER_SPEED_UNIT_KNOTS, /* Knots */ + GWEATHER_SPEED_UNIT_BFT /* Beaufort scale */ +} GWeatherSpeedUnit; + +typedef enum { /*< underscore_name=gweather_pressure_unit >*/ + GWEATHER_PRESSURE_UNIT_INVALID = 0, + GWEATHER_PRESSURE_UNIT_DEFAULT, + GWEATHER_PRESSURE_UNIT_KPA, /* kiloPascal */ + GWEATHER_PRESSURE_UNIT_HPA, /* hectoPascal */ + GWEATHER_PRESSURE_UNIT_MB, /* 1 millibars = 1 hectoPascal */ + GWEATHER_PRESSURE_UNIT_MM_HG, /* millimeters of mercury */ + GWEATHER_PRESSURE_UNIT_INCH_HG, /* inches of mercury */ + GWEATHER_PRESSURE_UNIT_ATM /* atmosphere */ +} GWeatherPressureUnit; + +typedef enum { /*< underscore_name=gweather_distance_unit >*/ + GWEATHER_DISTANCE_UNIT_INVALID = 0, + GWEATHER_DISTANCE_UNIT_DEFAULT, + GWEATHER_DISTANCE_UNIT_METERS, + GWEATHER_DISTANCE_UNIT_KM, + GWEATHER_DISTANCE_UNIT_MILES +} GWeatherDistanceUnit; + +#endif /* __GWEATHER_ENUMS_H_ */ |