| 1 | /* gweather-enums.h: enumerations for GWeather settings |
| 2 | * |
| 3 | * SPDX-FileCopyrightText: 2011 Giovanni Campagna <[email protected]> |
| 4 | * SPDX-License-Identifier: GPL-2.0-or-later |
| 5 | */ |
| 6 | |
| 7 | #pragma once |
| 8 | |
| 9 | #if !(defined(IN_GWEATHER_H) || defined(GWEATHER_COMPILATION)) |
| 10 | #error "gweather-enums.h must not be included individually, include gweather.h instead" |
| 11 | #endif |
| 12 | |
| 13 | #include <glib.h> |
| 14 | |
| 15 | G_BEGIN_DECLS |
| 16 | |
| 17 | /** |
| 18 | * GWeatherTemperatureUnit: |
| 19 | * @GWEATHER_TEMP_UNIT_INVALID: invalid unit |
| 20 | * @GWEATHER_TEMP_UNIT_DEFAULT: the user preferred temperature unit |
| 21 | * @GWEATHER_TEMP_UNIT_KELVIN: Kelvin (absolute) temperature scale |
| 22 | * @GWEATHER_TEMP_UNIT_CENTIGRADE: Celsius temperature scale |
| 23 | * @GWEATHER_TEMP_UNIT_FAHRENHEIT: Fahrenheit temperature scale |
| 24 | * |
| 25 | * The measure unit to use for temperature values, when retrieved by |
| 26 | * the gweather_info_get_value_temp() family of functions. |
| 27 | */ |
| 28 | typedef enum { /*< underscore_name=gweather_temperature_unit >*/ |
| 29 | GWEATHER_TEMP_UNIT_INVALID = 0, |
| 30 | GWEATHER_TEMP_UNIT_DEFAULT, |
| 31 | GWEATHER_TEMP_UNIT_KELVIN, |
| 32 | GWEATHER_TEMP_UNIT_CENTIGRADE, |
| 33 | GWEATHER_TEMP_UNIT_FAHRENHEIT |
| 34 | } GWeatherTemperatureUnit; |
| 35 | |
| 36 | /** |
| 37 | * GWeatherSpeedUnit: |
| 38 | * @GWEATHER_SPEED_UNIT_INVALID: invalid unit |
| 39 | * @GWEATHER_SPEED_UNIT_DEFAULT: the user preferred speed unit |
| 40 | * @GWEATHER_SPEED_UNIT_MS: meters per second |
| 41 | * @GWEATHER_SPEED_UNIT_KPH: kilometers per hour |
| 42 | * @GWEATHER_SPEED_UNIT_MPH: miles per hour |
| 43 | * @GWEATHER_SPEED_UNIT_KNOTS: knots |
| 44 | * @GWEATHER_SPEED_UNIT_BFT: Beaufort scale |
| 45 | * |
| 46 | * The measure unit to use for wind speed values, when retrieved by |
| 47 | * gweather_info_get_value_wind(). |
| 48 | */ |
| 49 | typedef enum { /*< underscore_name=gweather_speed_unit >*/ |
| 50 | GWEATHER_SPEED_UNIT_INVALID = 0, |
| 51 | GWEATHER_SPEED_UNIT_DEFAULT, |
| 52 | GWEATHER_SPEED_UNIT_MS, |
| 53 | GWEATHER_SPEED_UNIT_KPH, |
| 54 | GWEATHER_SPEED_UNIT_MPH, |
| 55 | GWEATHER_SPEED_UNIT_KNOTS, |
| 56 | GWEATHER_SPEED_UNIT_BFT |
| 57 | } GWeatherSpeedUnit; |
| 58 | |
| 59 | /** |
| 60 | * GWeatherPressureUnit: |
| 61 | * @GWEATHER_PRESSURE_UNIT_INVALID: invalid unit |
| 62 | * @GWEATHER_PRESSURE_UNIT_DEFAULT: the user preferred pressure unit |
| 63 | * @GWEATHER_PRESSURE_UNIT_KPA: kiloPascal (* 10^3 Pa) |
| 64 | * @GWEATHER_PRESSURE_UNIT_HPA: hectoPascal (* 10^2 Pa); also known |
| 65 | * as millibars, but formatted differently |
| 66 | * @GWEATHER_PRESSURE_UNIT_MB: millibars; same as %GWEATHER_PRESSURE_UNIT_HPA |
| 67 | * @GWEATHER_PRESSURE_UNIT_MM_HG: millimeters of mercury |
| 68 | * @GWEATHER_PRESSURE_UNIT_INCH_HG: inches of mercury |
| 69 | * @GWEATHER_PRESSURE_UNIT_ATM: atmospheres |
| 70 | * |
| 71 | * The measure unit to use for atmospheric pressure values, when |
| 72 | * retrieved by gweather_info_get_value_pressure(). |
| 73 | */ |
| 74 | typedef enum { /*< underscore_name=gweather_pressure_unit >*/ |
| 75 | GWEATHER_PRESSURE_UNIT_INVALID = 0, |
| 76 | GWEATHER_PRESSURE_UNIT_DEFAULT, |
| 77 | GWEATHER_PRESSURE_UNIT_KPA, |
| 78 | GWEATHER_PRESSURE_UNIT_HPA, |
| 79 | GWEATHER_PRESSURE_UNIT_MB, |
| 80 | GWEATHER_PRESSURE_UNIT_MM_HG, |
| 81 | GWEATHER_PRESSURE_UNIT_INCH_HG, |
| 82 | GWEATHER_PRESSURE_UNIT_ATM |
| 83 | } GWeatherPressureUnit; |
| 84 | |
| 85 | /** |
| 86 | * GWeatherDistanceUnit: |
| 87 | * @GWEATHER_DISTANCE_UNIT_INVALID: invalid unit |
| 88 | * @GWEATHER_DISTANCE_UNIT_DEFAULT: the user preferred distance unit |
| 89 | * @GWEATHER_DISTANCE_UNIT_METERS: meters |
| 90 | * @GWEATHER_DISTANCE_UNIT_KM: kilometers (= 1000 meters) |
| 91 | * @GWEATHER_DISTANCE_UNIT_MILES: miles |
| 92 | * |
| 93 | * The measure unit to use for sky visibility values, when retrieved |
| 94 | * by gweather_info_get_value_visibility(). |
| 95 | */ |
| 96 | typedef enum { /*< underscore_name=gweather_distance_unit >*/ |
| 97 | GWEATHER_DISTANCE_UNIT_INVALID = 0, |
| 98 | GWEATHER_DISTANCE_UNIT_DEFAULT, |
| 99 | GWEATHER_DISTANCE_UNIT_METERS, |
| 100 | GWEATHER_DISTANCE_UNIT_KM, |
| 101 | GWEATHER_DISTANCE_UNIT_MILES |
| 102 | } GWeatherDistanceUnit; |
| 103 | |
| 104 | /** |
| 105 | * GWeatherFormatOptions: |
| 106 | * @GWEATHER_FORMAT_OPTION_DEFAULT: The default string format |
| 107 | * @GWEATHER_FORMAT_OPTION_SENTENCE_CAPITALIZATION: Capitalize as if the string |
| 108 | * was starting a sentence |
| 109 | * @GWEATHER_FORMAT_OPTION_NO_CAPITALIZATION: Capitalize as if the string was |
| 110 | * appearing within a sentence |
| 111 | * |
| 112 | * Format options to influence the text returned by the |
| 113 | * `gweather_*_to_string_full()` functions. |
| 114 | */ |
| 115 | typedef enum { /*< underscore_name=gweather_format_options >*/ |
| 116 | GWEATHER_FORMAT_OPTION_DEFAULT = 0, |
| 117 | GWEATHER_FORMAT_OPTION_SENTENCE_CAPITALIZATION = 1 << 0, |
| 118 | GWEATHER_FORMAT_OPTION_NO_CAPITALIZATION = 1 << 1 |
| 119 | } GWeatherFormatOptions; |
| 120 | |
| 121 | G_END_DECLS |