gweather-sys-4.5.0/.cargo_vcs_info.json0000644000000001550000000000100134650ustar { "git": { "sha1": "df4e06659f397c8e13c4506439508ed6df1c3d70" }, "path_in_vcs": "libgweather/sys" }gweather-sys-4.5.0/Cargo.toml0000644000000033710000000000100114660ustar # THIS FILE IS AUTOMATICALLY GENERATED BY CARGO # # When uploading crates to the registry Cargo will automatically # "normalize" Cargo.toml files for maximal compatibility # with all versions of Cargo and also rewrite `path` dependencies # to registry (e.g., crates.io) dependencies. # # If you are reading this file be aware that the original Cargo.toml # will likely look very different (and much more reasonable). # See Cargo.toml.orig for the original contents. [package] edition = "2021" name = "gweather-sys" version = "4.5.0" authors = ["Jamie Murphy "] build = "build.rs" links = "gweather4" autobins = false autoexamples = false autotests = false autobenches = false description = "FFI bindings for libgweather" homepage = "https://gitlab.gnome.org/World/Rust/libgweather-rs" documentation = "https://world.pages.gitlab.gnome.org/Rust/libgweather-rs/stable/latest/docs/gweather_sys" readme = false keywords = [ "gtk4-rs", "gnome", "weather", "gweather", ] categories = ["api-bindings"] license = "MIT" repository = "https://gitlab.gnome.org/World/Rust/libgweather-rs" resolver = "1" [package.metadata.docs.rs] features = [] rustc-args = [ "--cfg", "docsrs", ] rustdoc-args = [ "--cfg", "docsrs", "--generate-link-to-definition", ] [package.metadata.system-deps.gweather4] name = "gweather4" version = "4" [lib] name = "gweather_sys" path = "src/lib.rs" [[test]] name = "abi" path = "tests/abi.rs" [dependencies.gio-sys] version = "0.20" [dependencies.glib-sys] version = "0.20" [dependencies.gobject-sys] version = "0.20" [dependencies.libc] version = "0.2" [dev-dependencies.shell-words] version = "1.0.0" [dev-dependencies.tempfile] version = "3" [build-dependencies.system-deps] version = "7" [features] gweather-sys-4.5.0/Cargo.toml.orig000064400000000000000000000023241046102023000151440ustar 00000000000000[package] name = "gweather-sys" version = "4.5.0" authors = ["Jamie Murphy "] edition = "2021" build = "build.rs" links = "gweather4" categories = ["api-bindings"] keywords = ["gtk4-rs", "gnome", "weather", "gweather"] description = "FFI bindings for libgweather" license = "MIT" homepage = "https://gitlab.gnome.org/World/Rust/libgweather-rs" repository = "https://gitlab.gnome.org/World/Rust/libgweather-rs" documentation = "https://world.pages.gitlab.gnome.org/Rust/libgweather-rs/stable/latest/docs/gweather_sys" [package.metadata.system-deps.gweather4] name = "gweather4" version = "4" [package.metadata.docs.rs] features = [] rustc-args = ["--cfg", "docsrs"] rustdoc-args = ["--cfg", "docsrs", "--generate-link-to-definition"] [lib] name = "gweather_sys" [dependencies] libc = "0.2" [dependencies.gio-sys] git = "https://github.com/gtk-rs/gtk-rs-core" version = "0.20" branch = "0.20" [dependencies.glib-sys] git = "https://github.com/gtk-rs/gtk-rs-core" version = "0.20" branch = "0.20" [dependencies.gobject-sys] git = "https://github.com/gtk-rs/gtk-rs-core" version = "0.20" branch = "0.20" [build-dependencies] system-deps = "7" [dev-dependencies] shell-words = "1.0.0" tempfile = "3" [features] gweather-sys-4.5.0/Gir.toml000064400000000000000000000003331046102023000136710ustar 00000000000000[options] library = "GWeather" version = "4.0" target_path = "." min_cfg_version = "4.0" work_mode = "sys" girs_directories = ["../../gir-files", "../../"] external_libraries = [ "Gio", "GLib", "GObject", ]gweather-sys-4.5.0/LICENSE000064400000000000000000000017771046102023000132750ustar 00000000000000Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. gweather-sys-4.5.0/build.rs000064400000000000000000000007101046102023000137170ustar 00000000000000// Generated by gir (https://github.com/gtk-rs/gir @ 727e064a9792) // from // from gir-files (https://github.com/gtk-rs/gir-files.git @ 4d1189172a70) // DO NOT EDIT #[cfg(not(docsrs))] use std::process; #[cfg(docsrs)] fn main() {} // prevent linking libraries to avoid documentation failure #[cfg(not(docsrs))] fn main() { if let Err(s) = system_deps::Config::new().probe() { println!("cargo:warning={s}"); process::exit(1); } } gweather-sys-4.5.0/src/lib.rs000064400000000000000000000570311046102023000141650ustar 00000000000000// Generated by gir (https://github.com/gtk-rs/gir @ 727e064a9792) // from // from gir-files (https://github.com/gtk-rs/gir-files.git @ 4d1189172a70) // DO NOT EDIT #![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)] #![allow( clippy::approx_constant, clippy::type_complexity, clippy::unreadable_literal, clippy::upper_case_acronyms )] #![cfg_attr(docsrs, feature(doc_cfg))] use gio_sys as gio; use glib_sys as glib; use gobject_sys as gobject; #[allow(unused_imports)] use libc::{ c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void, intptr_t, off_t, size_t, ssize_t, time_t, uintptr_t, FILE, }; #[cfg(unix)] #[allow(unused_imports)] use libc::{dev_t, gid_t, pid_t, socklen_t, uid_t}; #[allow(unused_imports)] use glib::{gboolean, gconstpointer, gpointer, GType}; // Aliases pub type GWeatherMoonLatitude = c_double; pub type GWeatherMoonPhase = c_double; // Enums pub type GWeatherConditionPhenomenon = c_int; pub const GWEATHER_PHENOMENON_INVALID: GWeatherConditionPhenomenon = -1; pub const GWEATHER_PHENOMENON_NONE: GWeatherConditionPhenomenon = 0; pub const GWEATHER_PHENOMENON_DRIZZLE: GWeatherConditionPhenomenon = 1; pub const GWEATHER_PHENOMENON_RAIN: GWeatherConditionPhenomenon = 2; pub const GWEATHER_PHENOMENON_SNOW: GWeatherConditionPhenomenon = 3; pub const GWEATHER_PHENOMENON_SNOW_GRAINS: GWeatherConditionPhenomenon = 4; pub const GWEATHER_PHENOMENON_ICE_CRYSTALS: GWeatherConditionPhenomenon = 5; pub const GWEATHER_PHENOMENON_ICE_PELLETS: GWeatherConditionPhenomenon = 6; pub const GWEATHER_PHENOMENON_HAIL: GWeatherConditionPhenomenon = 7; pub const GWEATHER_PHENOMENON_SMALL_HAIL: GWeatherConditionPhenomenon = 8; pub const GWEATHER_PHENOMENON_UNKNOWN_PRECIPITATION: GWeatherConditionPhenomenon = 9; pub const GWEATHER_PHENOMENON_MIST: GWeatherConditionPhenomenon = 10; pub const GWEATHER_PHENOMENON_FOG: GWeatherConditionPhenomenon = 11; pub const GWEATHER_PHENOMENON_SMOKE: GWeatherConditionPhenomenon = 12; pub const GWEATHER_PHENOMENON_VOLCANIC_ASH: GWeatherConditionPhenomenon = 13; pub const GWEATHER_PHENOMENON_SAND: GWeatherConditionPhenomenon = 14; pub const GWEATHER_PHENOMENON_HAZE: GWeatherConditionPhenomenon = 15; pub const GWEATHER_PHENOMENON_SPRAY: GWeatherConditionPhenomenon = 16; pub const GWEATHER_PHENOMENON_DUST: GWeatherConditionPhenomenon = 17; pub const GWEATHER_PHENOMENON_SQUALL: GWeatherConditionPhenomenon = 18; pub const GWEATHER_PHENOMENON_SANDSTORM: GWeatherConditionPhenomenon = 19; pub const GWEATHER_PHENOMENON_DUSTSTORM: GWeatherConditionPhenomenon = 20; pub const GWEATHER_PHENOMENON_FUNNEL_CLOUD: GWeatherConditionPhenomenon = 21; pub const GWEATHER_PHENOMENON_TORNADO: GWeatherConditionPhenomenon = 22; pub const GWEATHER_PHENOMENON_DUST_WHIRLS: GWeatherConditionPhenomenon = 23; pub const GWEATHER_PHENOMENON_LAST: GWeatherConditionPhenomenon = 24; pub type GWeatherConditionQualifier = c_int; pub const GWEATHER_QUALIFIER_INVALID: GWeatherConditionQualifier = -1; pub const GWEATHER_QUALIFIER_NONE: GWeatherConditionQualifier = 0; pub const GWEATHER_QUALIFIER_VICINITY: GWeatherConditionQualifier = 1; pub const GWEATHER_QUALIFIER_LIGHT: GWeatherConditionQualifier = 2; pub const GWEATHER_QUALIFIER_MODERATE: GWeatherConditionQualifier = 3; pub const GWEATHER_QUALIFIER_HEAVY: GWeatherConditionQualifier = 4; pub const GWEATHER_QUALIFIER_SHALLOW: GWeatherConditionQualifier = 5; pub const GWEATHER_QUALIFIER_PATCHES: GWeatherConditionQualifier = 6; pub const GWEATHER_QUALIFIER_PARTIAL: GWeatherConditionQualifier = 7; pub const GWEATHER_QUALIFIER_THUNDERSTORM: GWeatherConditionQualifier = 8; pub const GWEATHER_QUALIFIER_BLOWING: GWeatherConditionQualifier = 9; pub const GWEATHER_QUALIFIER_SHOWERS: GWeatherConditionQualifier = 10; pub const GWEATHER_QUALIFIER_DRIFTING: GWeatherConditionQualifier = 11; pub const GWEATHER_QUALIFIER_FREEZING: GWeatherConditionQualifier = 12; pub const GWEATHER_QUALIFIER_LAST: GWeatherConditionQualifier = 13; pub type GWeatherDistanceUnit = c_int; pub const GWEATHER_DISTANCE_UNIT_INVALID: GWeatherDistanceUnit = 0; pub const GWEATHER_DISTANCE_UNIT_DEFAULT: GWeatherDistanceUnit = 1; pub const GWEATHER_DISTANCE_UNIT_METERS: GWeatherDistanceUnit = 2; pub const GWEATHER_DISTANCE_UNIT_KM: GWeatherDistanceUnit = 3; pub const GWEATHER_DISTANCE_UNIT_MILES: GWeatherDistanceUnit = 4; pub type GWeatherLocationLevel = c_int; pub const GWEATHER_LOCATION_WORLD: GWeatherLocationLevel = 0; pub const GWEATHER_LOCATION_REGION: GWeatherLocationLevel = 1; pub const GWEATHER_LOCATION_COUNTRY: GWeatherLocationLevel = 2; pub const GWEATHER_LOCATION_ADM1: GWeatherLocationLevel = 3; pub const GWEATHER_LOCATION_CITY: GWeatherLocationLevel = 4; pub const GWEATHER_LOCATION_WEATHER_STATION: GWeatherLocationLevel = 5; pub const GWEATHER_LOCATION_DETACHED: GWeatherLocationLevel = 6; pub const GWEATHER_LOCATION_NAMED_TIMEZONE: GWeatherLocationLevel = 7; pub type GWeatherPressureUnit = c_int; pub const GWEATHER_PRESSURE_UNIT_INVALID: GWeatherPressureUnit = 0; pub const GWEATHER_PRESSURE_UNIT_DEFAULT: GWeatherPressureUnit = 1; pub const GWEATHER_PRESSURE_UNIT_KPA: GWeatherPressureUnit = 2; pub const GWEATHER_PRESSURE_UNIT_HPA: GWeatherPressureUnit = 3; pub const GWEATHER_PRESSURE_UNIT_MB: GWeatherPressureUnit = 4; pub const GWEATHER_PRESSURE_UNIT_MM_HG: GWeatherPressureUnit = 5; pub const GWEATHER_PRESSURE_UNIT_INCH_HG: GWeatherPressureUnit = 6; pub const GWEATHER_PRESSURE_UNIT_ATM: GWeatherPressureUnit = 7; pub type GWeatherSky = c_int; pub const GWEATHER_SKY_INVALID: GWeatherSky = -1; pub const GWEATHER_SKY_CLEAR: GWeatherSky = 0; pub const GWEATHER_SKY_BROKEN: GWeatherSky = 1; pub const GWEATHER_SKY_SCATTERED: GWeatherSky = 2; pub const GWEATHER_SKY_FEW: GWeatherSky = 3; pub const GWEATHER_SKY_OVERCAST: GWeatherSky = 4; pub const GWEATHER_SKY_LAST: GWeatherSky = 5; pub type GWeatherSpeedUnit = c_int; pub const GWEATHER_SPEED_UNIT_INVALID: GWeatherSpeedUnit = 0; pub const GWEATHER_SPEED_UNIT_DEFAULT: GWeatherSpeedUnit = 1; pub const GWEATHER_SPEED_UNIT_MS: GWeatherSpeedUnit = 2; pub const GWEATHER_SPEED_UNIT_KPH: GWeatherSpeedUnit = 3; pub const GWEATHER_SPEED_UNIT_MPH: GWeatherSpeedUnit = 4; pub const GWEATHER_SPEED_UNIT_KNOTS: GWeatherSpeedUnit = 5; pub const GWEATHER_SPEED_UNIT_BFT: GWeatherSpeedUnit = 6; pub type GWeatherTemperatureUnit = c_int; pub const GWEATHER_TEMP_UNIT_INVALID: GWeatherTemperatureUnit = 0; pub const GWEATHER_TEMP_UNIT_DEFAULT: GWeatherTemperatureUnit = 1; pub const GWEATHER_TEMP_UNIT_KELVIN: GWeatherTemperatureUnit = 2; pub const GWEATHER_TEMP_UNIT_CENTIGRADE: GWeatherTemperatureUnit = 3; pub const GWEATHER_TEMP_UNIT_FAHRENHEIT: GWeatherTemperatureUnit = 4; pub type GWeatherWindDirection = c_int; pub const GWEATHER_WIND_INVALID: GWeatherWindDirection = -1; pub const GWEATHER_WIND_VARIABLE: GWeatherWindDirection = 0; pub const GWEATHER_WIND_N: GWeatherWindDirection = 1; pub const GWEATHER_WIND_NNE: GWeatherWindDirection = 2; pub const GWEATHER_WIND_NE: GWeatherWindDirection = 3; pub const GWEATHER_WIND_ENE: GWeatherWindDirection = 4; pub const GWEATHER_WIND_E: GWeatherWindDirection = 5; pub const GWEATHER_WIND_ESE: GWeatherWindDirection = 6; pub const GWEATHER_WIND_SE: GWeatherWindDirection = 7; pub const GWEATHER_WIND_SSE: GWeatherWindDirection = 8; pub const GWEATHER_WIND_S: GWeatherWindDirection = 9; pub const GWEATHER_WIND_SSW: GWeatherWindDirection = 10; pub const GWEATHER_WIND_SW: GWeatherWindDirection = 11; pub const GWEATHER_WIND_WSW: GWeatherWindDirection = 12; pub const GWEATHER_WIND_W: GWeatherWindDirection = 13; pub const GWEATHER_WIND_WNW: GWeatherWindDirection = 14; pub const GWEATHER_WIND_NW: GWeatherWindDirection = 15; pub const GWEATHER_WIND_NNW: GWeatherWindDirection = 16; pub const GWEATHER_WIND_LAST: GWeatherWindDirection = 17; // Flags pub type GWeatherFormatOptions = c_uint; pub const GWEATHER_FORMAT_OPTION_DEFAULT: GWeatherFormatOptions = 0; pub const GWEATHER_FORMAT_OPTION_SENTENCE_CAPITALIZATION: GWeatherFormatOptions = 1; pub const GWEATHER_FORMAT_OPTION_NO_CAPITALIZATION: GWeatherFormatOptions = 2; pub type GWeatherProvider = c_uint; pub const GWEATHER_PROVIDER_NONE: GWeatherProvider = 0; pub const GWEATHER_PROVIDER_METAR: GWeatherProvider = 1; pub const GWEATHER_PROVIDER_IWIN: GWeatherProvider = 4; pub const GWEATHER_PROVIDER_MET_NO: GWeatherProvider = 8; pub const GWEATHER_PROVIDER_OWM: GWeatherProvider = 16; pub const GWEATHER_PROVIDER_NWS: GWeatherProvider = 32; pub const GWEATHER_PROVIDER_ALL: GWeatherProvider = 61; // Callbacks pub type GWeatherFilterFunc = Option gboolean>; // Records #[derive(Copy, Clone)] #[repr(C)] pub struct GWeatherConditions { pub significant: gboolean, pub phenomenon: GWeatherConditionPhenomenon, pub qualifier: GWeatherConditionQualifier, } impl ::std::fmt::Debug for GWeatherConditions { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GWeatherConditions @ {self:p}")) .field("significant", &self.significant) .field("phenomenon", &self.phenomenon) .field("qualifier", &self.qualifier) .finish() } } #[derive(Copy, Clone)] #[repr(C)] pub struct GWeatherInfoClass { pub parent_class: gobject::GObjectClass, } impl ::std::fmt::Debug for GWeatherInfoClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GWeatherInfoClass @ {self:p}")) .field("parent_class", &self.parent_class) .finish() } } #[derive(Copy, Clone)] #[repr(C)] pub struct GWeatherLocationClass { pub parent_class: gobject::GObjectClass, } impl ::std::fmt::Debug for GWeatherLocationClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GWeatherLocationClass @ {self:p}")) .field("parent_class", &self.parent_class) .finish() } } // Classes #[repr(C)] pub struct GWeatherInfo { _data: [u8; 0], _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>, } impl ::std::fmt::Debug for GWeatherInfo { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GWeatherInfo @ {self:p}")).finish() } } #[repr(C)] pub struct GWeatherLocation { _data: [u8; 0], _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>, } impl ::std::fmt::Debug for GWeatherLocation { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GWeatherLocation @ {self:p}")) .finish() } } #[link(name = "gweather-4")] extern "C" { //========================================================================= // GWeatherConditionPhenomenon //========================================================================= pub fn gweather_phenomenon_get_type() -> GType; //========================================================================= // GWeatherConditionQualifier //========================================================================= pub fn gweather_qualifier_get_type() -> GType; //========================================================================= // GWeatherDistanceUnit //========================================================================= pub fn gweather_distance_unit_get_type() -> GType; //========================================================================= // GWeatherLocationLevel //========================================================================= pub fn gweather_location_level_get_type() -> GType; pub fn gweather_location_level_to_string(level: GWeatherLocationLevel) -> *const c_char; //========================================================================= // GWeatherPressureUnit //========================================================================= pub fn gweather_pressure_unit_get_type() -> GType; //========================================================================= // GWeatherSky //========================================================================= pub fn gweather_sky_get_type() -> GType; pub fn gweather_sky_to_string(sky: GWeatherSky) -> *const c_char; pub fn gweather_sky_to_string_full( sky: GWeatherSky, options: GWeatherFormatOptions, ) -> *const c_char; //========================================================================= // GWeatherSpeedUnit //========================================================================= pub fn gweather_speed_unit_get_type() -> GType; pub fn gweather_speed_unit_to_string(unit: GWeatherSpeedUnit) -> *const c_char; //========================================================================= // GWeatherTemperatureUnit //========================================================================= pub fn gweather_temperature_unit_get_type() -> GType; pub fn gweather_temperature_unit_to_real( unit: GWeatherTemperatureUnit, ) -> GWeatherTemperatureUnit; //========================================================================= // GWeatherWindDirection //========================================================================= pub fn gweather_wind_direction_get_type() -> GType; pub fn gweather_wind_direction_to_string(wind: GWeatherWindDirection) -> *const c_char; pub fn gweather_wind_direction_to_string_full( wind: GWeatherWindDirection, options: GWeatherFormatOptions, ) -> *const c_char; //========================================================================= // GWeatherFormatOptions //========================================================================= pub fn gweather_format_options_get_type() -> GType; //========================================================================= // GWeatherProvider //========================================================================= pub fn gweather_provider_get_type() -> GType; //========================================================================= // GWeatherConditions //========================================================================= pub fn gweather_conditions_to_string(conditions: *mut GWeatherConditions) -> *const c_char; pub fn gweather_conditions_to_string_full( conditions: *mut GWeatherConditions, options: GWeatherFormatOptions, ) -> *const c_char; //========================================================================= // GWeatherInfo //========================================================================= pub fn gweather_info_get_type() -> GType; pub fn gweather_info_new(location: *mut GWeatherLocation) -> *mut GWeatherInfo; pub fn gweather_info_store_cache(); pub fn gweather_info_abort(info: *mut GWeatherInfo); pub fn gweather_info_get_apparent(info: *mut GWeatherInfo) -> *mut c_char; pub fn gweather_info_get_application_id(info: *mut GWeatherInfo) -> *const c_char; pub fn gweather_info_get_attribution(info: *mut GWeatherInfo) -> *const c_char; pub fn gweather_info_get_conditions(info: *mut GWeatherInfo) -> *mut c_char; pub fn gweather_info_get_contact_info(info: *mut GWeatherInfo) -> *const c_char; pub fn gweather_info_get_dew(info: *mut GWeatherInfo) -> *mut c_char; pub fn gweather_info_get_enabled_providers(info: *mut GWeatherInfo) -> GWeatherProvider; pub fn gweather_info_get_forecast_list(info: *mut GWeatherInfo) -> *mut glib::GSList; pub fn gweather_info_get_humidity(info: *mut GWeatherInfo) -> *mut c_char; pub fn gweather_info_get_icon_name(info: *mut GWeatherInfo) -> *const c_char; pub fn gweather_info_get_location(info: *mut GWeatherInfo) -> *const GWeatherLocation; pub fn gweather_info_get_location_name(info: *mut GWeatherInfo) -> *mut c_char; pub fn gweather_info_get_pressure(info: *mut GWeatherInfo) -> *mut c_char; pub fn gweather_info_get_sky(info: *mut GWeatherInfo) -> *mut c_char; pub fn gweather_info_get_sunrise(info: *mut GWeatherInfo) -> *mut c_char; pub fn gweather_info_get_sunset(info: *mut GWeatherInfo) -> *mut c_char; pub fn gweather_info_get_symbolic_icon_name(info: *mut GWeatherInfo) -> *const c_char; pub fn gweather_info_get_temp(info: *mut GWeatherInfo) -> *mut c_char; pub fn gweather_info_get_temp_max(info: *mut GWeatherInfo) -> *mut c_char; pub fn gweather_info_get_temp_min(info: *mut GWeatherInfo) -> *mut c_char; pub fn gweather_info_get_temp_summary(info: *mut GWeatherInfo) -> *mut c_char; pub fn gweather_info_get_upcoming_moonphases( info: *mut GWeatherInfo, phases: *mut time_t, ) -> gboolean; pub fn gweather_info_get_update(info: *mut GWeatherInfo) -> *mut c_char; pub fn gweather_info_get_value_apparent( info: *mut GWeatherInfo, unit: GWeatherTemperatureUnit, value: *mut c_double, ) -> gboolean; pub fn gweather_info_get_value_conditions( info: *mut GWeatherInfo, phenomenon: *mut GWeatherConditionPhenomenon, qualifier: *mut GWeatherConditionQualifier, ) -> gboolean; pub fn gweather_info_get_value_dew( info: *mut GWeatherInfo, unit: GWeatherTemperatureUnit, value: *mut c_double, ) -> gboolean; pub fn gweather_info_get_value_moonphase( info: *mut GWeatherInfo, value: *mut GWeatherMoonPhase, lat: *mut GWeatherMoonLatitude, ) -> gboolean; pub fn gweather_info_get_value_pressure( info: *mut GWeatherInfo, unit: GWeatherPressureUnit, value: *mut c_double, ) -> gboolean; pub fn gweather_info_get_value_sky(info: *mut GWeatherInfo, sky: *mut GWeatherSky) -> gboolean; pub fn gweather_info_get_value_sunrise( info: *mut GWeatherInfo, value: *mut c_ulong, ) -> gboolean; pub fn gweather_info_get_value_sunset(info: *mut GWeatherInfo, value: *mut c_ulong) -> gboolean; pub fn gweather_info_get_value_temp( info: *mut GWeatherInfo, unit: GWeatherTemperatureUnit, value: *mut c_double, ) -> gboolean; pub fn gweather_info_get_value_temp_max( info: *mut GWeatherInfo, unit: GWeatherTemperatureUnit, value: *mut c_double, ) -> gboolean; pub fn gweather_info_get_value_temp_min( info: *mut GWeatherInfo, unit: GWeatherTemperatureUnit, value: *mut c_double, ) -> gboolean; pub fn gweather_info_get_value_update(info: *mut GWeatherInfo, value: *mut c_long) -> gboolean; pub fn gweather_info_get_value_visibility( info: *mut GWeatherInfo, unit: GWeatherDistanceUnit, value: *mut c_double, ) -> gboolean; pub fn gweather_info_get_value_wind( info: *mut GWeatherInfo, unit: GWeatherSpeedUnit, speed: *mut c_double, direction: *mut GWeatherWindDirection, ) -> gboolean; pub fn gweather_info_get_visibility(info: *mut GWeatherInfo) -> *mut c_char; pub fn gweather_info_get_weather_summary(info: *mut GWeatherInfo) -> *mut c_char; pub fn gweather_info_get_wind(info: *mut GWeatherInfo) -> *mut c_char; pub fn gweather_info_is_daytime(info: *mut GWeatherInfo) -> gboolean; pub fn gweather_info_is_valid(info: *mut GWeatherInfo) -> gboolean; pub fn gweather_info_network_error(info: *mut GWeatherInfo) -> gboolean; pub fn gweather_info_next_sun_event(info: *mut GWeatherInfo) -> c_int; pub fn gweather_info_set_application_id(info: *mut GWeatherInfo, application_id: *const c_char); pub fn gweather_info_set_contact_info(info: *mut GWeatherInfo, contact_info: *const c_char); pub fn gweather_info_set_enabled_providers( info: *mut GWeatherInfo, providers: GWeatherProvider, ); pub fn gweather_info_set_location(info: *mut GWeatherInfo, location: *mut GWeatherLocation); pub fn gweather_info_update(info: *mut GWeatherInfo); //========================================================================= // GWeatherLocation //========================================================================= pub fn gweather_location_get_type() -> GType; pub fn gweather_location_new_detached( name: *const c_char, icao: *const c_char, latitude: c_double, longitude: c_double, ) -> *mut GWeatherLocation; pub fn gweather_location_detect_nearest_city_finish( result: *mut gio::GAsyncResult, error: *mut *mut glib::GError, ) -> *mut GWeatherLocation; pub fn gweather_location_get_world() -> *mut GWeatherLocation; pub fn gweather_location_deserialize( world: *mut GWeatherLocation, serialized: *mut glib::GVariant, ) -> *mut GWeatherLocation; pub fn gweather_location_detect_nearest_city( loc: *mut GWeatherLocation, lat: c_double, lon: c_double, cancellable: *mut gio::GCancellable, callback: gio::GAsyncReadyCallback, user_data: gpointer, ); pub fn gweather_location_equal( one: *mut GWeatherLocation, two: *mut GWeatherLocation, ) -> gboolean; pub fn gweather_location_find_by_country_code( world: *mut GWeatherLocation, country_code: *const c_char, ) -> *mut GWeatherLocation; pub fn gweather_location_find_by_station_code( world: *mut GWeatherLocation, station_code: *const c_char, ) -> *mut GWeatherLocation; pub fn gweather_location_find_nearest_city( loc: *mut GWeatherLocation, lat: c_double, lon: c_double, ) -> *mut GWeatherLocation; pub fn gweather_location_find_nearest_city_full( loc: *mut GWeatherLocation, lat: c_double, lon: c_double, func: GWeatherFilterFunc, user_data: gpointer, destroy: glib::GDestroyNotify, ) -> *mut GWeatherLocation; pub fn gweather_location_free_timezones( loc: *mut GWeatherLocation, zones: *mut *mut glib::GTimeZone, ); pub fn gweather_location_get_city_name(loc: *mut GWeatherLocation) -> *mut c_char; pub fn gweather_location_get_code(loc: *mut GWeatherLocation) -> *const c_char; pub fn gweather_location_get_coords( loc: *mut GWeatherLocation, latitude: *mut c_double, longitude: *mut c_double, ); pub fn gweather_location_get_country(loc: *mut GWeatherLocation) -> *const c_char; pub fn gweather_location_get_country_name(loc: *mut GWeatherLocation) -> *mut c_char; pub fn gweather_location_get_distance( loc: *mut GWeatherLocation, loc2: *mut GWeatherLocation, ) -> c_double; pub fn gweather_location_get_english_name(loc: *mut GWeatherLocation) -> *const c_char; pub fn gweather_location_get_english_sort_name(loc: *mut GWeatherLocation) -> *const c_char; pub fn gweather_location_get_level(loc: *mut GWeatherLocation) -> GWeatherLocationLevel; pub fn gweather_location_get_name(loc: *mut GWeatherLocation) -> *const c_char; pub fn gweather_location_get_parent(loc: *mut GWeatherLocation) -> *mut GWeatherLocation; pub fn gweather_location_get_sort_name(loc: *mut GWeatherLocation) -> *const c_char; pub fn gweather_location_get_timezone(loc: *mut GWeatherLocation) -> *mut glib::GTimeZone; pub fn gweather_location_get_timezone_str(loc: *mut GWeatherLocation) -> *const c_char; pub fn gweather_location_get_timezones(loc: *mut GWeatherLocation) -> *mut *mut glib::GTimeZone; pub fn gweather_location_has_coords(loc: *mut GWeatherLocation) -> gboolean; pub fn gweather_location_has_timezone(loc: *mut GWeatherLocation) -> gboolean; pub fn gweather_location_next_child( loc: *mut GWeatherLocation, child: *mut GWeatherLocation, ) -> *mut GWeatherLocation; pub fn gweather_location_serialize(loc: *mut GWeatherLocation) -> *mut glib::GVariant; } gweather-sys-4.5.0/tests/abi.rs000064400000000000000000000341151046102023000145230ustar 00000000000000// Generated by gir (https://github.com/gtk-rs/gir @ 727e064a9792) // from // from gir-files (https://github.com/gtk-rs/gir-files.git @ 4d1189172a70) // DO NOT EDIT #![cfg(unix)] use gweather_sys::*; use std::env; use std::error::Error; use std::ffi::OsString; use std::mem::{align_of, size_of}; use std::path::Path; use std::process::{Command, Stdio}; use std::str; use tempfile::Builder; static PACKAGES: &[&str] = &["gweather4"]; #[derive(Clone, Debug)] struct Compiler { pub args: Vec, } impl Compiler { pub fn new() -> Result> { let mut args = get_var("CC", "cc")?; args.push("-Wno-deprecated-declarations".to_owned()); // For _Generic args.push("-std=c11".to_owned()); // For %z support in printf when using MinGW. args.push("-D__USE_MINGW_ANSI_STDIO".to_owned()); args.extend(get_var("CFLAGS", "")?); args.extend(get_var("CPPFLAGS", "")?); args.extend(pkg_config_cflags(PACKAGES)?); Ok(Self { args }) } pub fn compile(&self, src: &Path, out: &Path) -> Result<(), Box> { let mut cmd = self.to_command(); cmd.arg(src); cmd.arg("-o"); cmd.arg(out); let status = cmd.spawn()?.wait()?; if !status.success() { return Err(format!("compilation command {cmd:?} failed, {status}").into()); } Ok(()) } fn to_command(&self) -> Command { let mut cmd = Command::new(&self.args[0]); cmd.args(&self.args[1..]); cmd } } fn get_var(name: &str, default: &str) -> Result, Box> { match env::var(name) { Ok(value) => Ok(shell_words::split(&value)?), Err(env::VarError::NotPresent) => Ok(shell_words::split(default)?), Err(err) => Err(format!("{name} {err}").into()), } } fn pkg_config_cflags(packages: &[&str]) -> Result, Box> { if packages.is_empty() { return Ok(Vec::new()); } let pkg_config = env::var_os("PKG_CONFIG").unwrap_or_else(|| OsString::from("pkg-config")); let mut cmd = Command::new(pkg_config); cmd.arg("--cflags"); cmd.args(packages); cmd.stderr(Stdio::inherit()); let out = cmd.output()?; if !out.status.success() { let (status, stdout) = (out.status, String::from_utf8_lossy(&out.stdout)); return Err(format!("command {cmd:?} failed, {status:?}\nstdout: {stdout}").into()); } let stdout = str::from_utf8(&out.stdout)?; Ok(shell_words::split(stdout.trim())?) } #[derive(Copy, Clone, Debug, Eq, PartialEq)] struct Layout { size: usize, alignment: usize, } #[derive(Copy, Clone, Debug, Default, Eq, PartialEq)] struct Results { /// Number of successfully completed tests. passed: usize, /// Total number of failed tests (including those that failed to compile). failed: usize, } impl Results { fn record_passed(&mut self) { self.passed += 1; } fn record_failed(&mut self) { self.failed += 1; } fn summary(&self) -> String { format!("{} passed; {} failed", self.passed, self.failed) } fn expect_total_success(&self) { if self.failed == 0 { println!("OK: {}", self.summary()); } else { panic!("FAILED: {}", self.summary()); }; } } #[test] fn cross_validate_constants_with_c() { let mut c_constants: Vec<(String, String)> = Vec::new(); for l in get_c_output("constant").unwrap().lines() { let (name, value) = l.split_once(';').expect("Missing ';' separator"); c_constants.push((name.to_owned(), value.to_owned())); } let mut results = Results::default(); for ((rust_name, rust_value), (c_name, c_value)) in RUST_CONSTANTS.iter().zip(c_constants.iter()) { if rust_name != c_name { results.record_failed(); eprintln!("Name mismatch:\nRust: {rust_name:?}\nC: {c_name:?}"); continue; } if rust_value != c_value { results.record_failed(); eprintln!( "Constant value mismatch for {rust_name}\nRust: {rust_value:?}\nC: {c_value:?}", ); continue; } results.record_passed(); } results.expect_total_success(); } #[test] fn cross_validate_layout_with_c() { let mut c_layouts = Vec::new(); for l in get_c_output("layout").unwrap().lines() { let (name, value) = l.split_once(';').expect("Missing first ';' separator"); let (size, alignment) = value.split_once(';').expect("Missing second ';' separator"); let size = size.parse().expect("Failed to parse size"); let alignment = alignment.parse().expect("Failed to parse alignment"); c_layouts.push((name.to_owned(), Layout { size, alignment })); } let mut results = Results::default(); for ((rust_name, rust_layout), (c_name, c_layout)) in RUST_LAYOUTS.iter().zip(c_layouts.iter()) { if rust_name != c_name { results.record_failed(); eprintln!("Name mismatch:\nRust: {rust_name:?}\nC: {c_name:?}"); continue; } if rust_layout != c_layout { results.record_failed(); eprintln!("Layout mismatch for {rust_name}\nRust: {rust_layout:?}\nC: {c_layout:?}",); continue; } results.record_passed(); } results.expect_total_success(); } fn get_c_output(name: &str) -> Result> { let tmpdir = Builder::new().prefix("abi").tempdir()?; let exe = tmpdir.path().join(name); let c_file = Path::new("tests").join(name).with_extension("c"); let cc = Compiler::new().expect("configured compiler"); cc.compile(&c_file, &exe)?; let mut cmd = Command::new(exe); cmd.stderr(Stdio::inherit()); let out = cmd.output()?; if !out.status.success() { let (status, stdout) = (out.status, String::from_utf8_lossy(&out.stdout)); return Err(format!("command {cmd:?} failed, {status:?}\nstdout: {stdout}").into()); } Ok(String::from_utf8(out.stdout)?) } const RUST_LAYOUTS: &[(&str, Layout)] = &[ ( "GWeatherConditionPhenomenon", Layout { size: size_of::(), alignment: align_of::(), }, ), ( "GWeatherConditionQualifier", Layout { size: size_of::(), alignment: align_of::(), }, ), ( "GWeatherConditions", Layout { size: size_of::(), alignment: align_of::(), }, ), ( "GWeatherDistanceUnit", Layout { size: size_of::(), alignment: align_of::(), }, ), ( "GWeatherFormatOptions", Layout { size: size_of::(), alignment: align_of::(), }, ), ( "GWeatherInfoClass", Layout { size: size_of::(), alignment: align_of::(), }, ), ( "GWeatherLocationClass", Layout { size: size_of::(), alignment: align_of::(), }, ), ( "GWeatherLocationLevel", Layout { size: size_of::(), alignment: align_of::(), }, ), ( "GWeatherMoonLatitude", Layout { size: size_of::(), alignment: align_of::(), }, ), ( "GWeatherMoonPhase", Layout { size: size_of::(), alignment: align_of::(), }, ), ( "GWeatherPressureUnit", Layout { size: size_of::(), alignment: align_of::(), }, ), ( "GWeatherProvider", Layout { size: size_of::(), alignment: align_of::(), }, ), ( "GWeatherSky", Layout { size: size_of::(), alignment: align_of::(), }, ), ( "GWeatherSpeedUnit", Layout { size: size_of::(), alignment: align_of::(), }, ), ( "GWeatherTemperatureUnit", Layout { size: size_of::(), alignment: align_of::(), }, ), ( "GWeatherWindDirection", Layout { size: size_of::(), alignment: align_of::(), }, ), ]; const RUST_CONSTANTS: &[(&str, &str)] = &[ ("(gint) GWEATHER_DISTANCE_UNIT_DEFAULT", "1"), ("(gint) GWEATHER_DISTANCE_UNIT_INVALID", "0"), ("(gint) GWEATHER_DISTANCE_UNIT_KM", "3"), ("(gint) GWEATHER_DISTANCE_UNIT_METERS", "2"), ("(gint) GWEATHER_DISTANCE_UNIT_MILES", "4"), ("(guint) GWEATHER_FORMAT_OPTION_DEFAULT", "0"), ("(guint) GWEATHER_FORMAT_OPTION_NO_CAPITALIZATION", "2"), ( "(guint) GWEATHER_FORMAT_OPTION_SENTENCE_CAPITALIZATION", "1", ), ("(gint) GWEATHER_LOCATION_ADM1", "3"), ("(gint) GWEATHER_LOCATION_CITY", "4"), ("(gint) GWEATHER_LOCATION_COUNTRY", "2"), ("(gint) GWEATHER_LOCATION_DETACHED", "6"), ("(gint) GWEATHER_LOCATION_NAMED_TIMEZONE", "7"), ("(gint) GWEATHER_LOCATION_REGION", "1"), ("(gint) GWEATHER_LOCATION_WEATHER_STATION", "5"), ("(gint) GWEATHER_LOCATION_WORLD", "0"), ("(gint) GWEATHER_PHENOMENON_DRIZZLE", "1"), ("(gint) GWEATHER_PHENOMENON_DUST", "17"), ("(gint) GWEATHER_PHENOMENON_DUSTSTORM", "20"), ("(gint) GWEATHER_PHENOMENON_DUST_WHIRLS", "23"), ("(gint) GWEATHER_PHENOMENON_FOG", "11"), ("(gint) GWEATHER_PHENOMENON_FUNNEL_CLOUD", "21"), ("(gint) GWEATHER_PHENOMENON_HAIL", "7"), ("(gint) GWEATHER_PHENOMENON_HAZE", "15"), ("(gint) GWEATHER_PHENOMENON_ICE_CRYSTALS", "5"), ("(gint) GWEATHER_PHENOMENON_ICE_PELLETS", "6"), ("(gint) GWEATHER_PHENOMENON_INVALID", "-1"), ("(gint) GWEATHER_PHENOMENON_LAST", "24"), ("(gint) GWEATHER_PHENOMENON_MIST", "10"), ("(gint) GWEATHER_PHENOMENON_NONE", "0"), ("(gint) GWEATHER_PHENOMENON_RAIN", "2"), ("(gint) GWEATHER_PHENOMENON_SAND", "14"), ("(gint) GWEATHER_PHENOMENON_SANDSTORM", "19"), ("(gint) GWEATHER_PHENOMENON_SMALL_HAIL", "8"), ("(gint) GWEATHER_PHENOMENON_SMOKE", "12"), ("(gint) GWEATHER_PHENOMENON_SNOW", "3"), ("(gint) GWEATHER_PHENOMENON_SNOW_GRAINS", "4"), ("(gint) GWEATHER_PHENOMENON_SPRAY", "16"), ("(gint) GWEATHER_PHENOMENON_SQUALL", "18"), ("(gint) GWEATHER_PHENOMENON_TORNADO", "22"), ("(gint) GWEATHER_PHENOMENON_UNKNOWN_PRECIPITATION", "9"), ("(gint) GWEATHER_PHENOMENON_VOLCANIC_ASH", "13"), ("(gint) GWEATHER_PRESSURE_UNIT_ATM", "7"), ("(gint) GWEATHER_PRESSURE_UNIT_DEFAULT", "1"), ("(gint) GWEATHER_PRESSURE_UNIT_HPA", "3"), ("(gint) GWEATHER_PRESSURE_UNIT_INCH_HG", "6"), ("(gint) GWEATHER_PRESSURE_UNIT_INVALID", "0"), ("(gint) GWEATHER_PRESSURE_UNIT_KPA", "2"), ("(gint) GWEATHER_PRESSURE_UNIT_MB", "4"), ("(gint) GWEATHER_PRESSURE_UNIT_MM_HG", "5"), ("(guint) GWEATHER_PROVIDER_ALL", "61"), ("(guint) GWEATHER_PROVIDER_IWIN", "4"), ("(guint) GWEATHER_PROVIDER_METAR", "1"), ("(guint) GWEATHER_PROVIDER_MET_NO", "8"), ("(guint) GWEATHER_PROVIDER_NONE", "0"), ("(guint) GWEATHER_PROVIDER_NWS", "32"), ("(guint) GWEATHER_PROVIDER_OWM", "16"), ("(gint) GWEATHER_QUALIFIER_BLOWING", "9"), ("(gint) GWEATHER_QUALIFIER_DRIFTING", "11"), ("(gint) GWEATHER_QUALIFIER_FREEZING", "12"), ("(gint) GWEATHER_QUALIFIER_HEAVY", "4"), ("(gint) GWEATHER_QUALIFIER_INVALID", "-1"), ("(gint) GWEATHER_QUALIFIER_LAST", "13"), ("(gint) GWEATHER_QUALIFIER_LIGHT", "2"), ("(gint) GWEATHER_QUALIFIER_MODERATE", "3"), ("(gint) GWEATHER_QUALIFIER_NONE", "0"), ("(gint) GWEATHER_QUALIFIER_PARTIAL", "7"), ("(gint) GWEATHER_QUALIFIER_PATCHES", "6"), ("(gint) GWEATHER_QUALIFIER_SHALLOW", "5"), ("(gint) GWEATHER_QUALIFIER_SHOWERS", "10"), ("(gint) GWEATHER_QUALIFIER_THUNDERSTORM", "8"), ("(gint) GWEATHER_QUALIFIER_VICINITY", "1"), ("(gint) GWEATHER_SKY_BROKEN", "1"), ("(gint) GWEATHER_SKY_CLEAR", "0"), ("(gint) GWEATHER_SKY_FEW", "3"), ("(gint) GWEATHER_SKY_INVALID", "-1"), ("(gint) GWEATHER_SKY_LAST", "5"), ("(gint) GWEATHER_SKY_OVERCAST", "4"), ("(gint) GWEATHER_SKY_SCATTERED", "2"), ("(gint) GWEATHER_SPEED_UNIT_BFT", "6"), ("(gint) GWEATHER_SPEED_UNIT_DEFAULT", "1"), ("(gint) GWEATHER_SPEED_UNIT_INVALID", "0"), ("(gint) GWEATHER_SPEED_UNIT_KNOTS", "5"), ("(gint) GWEATHER_SPEED_UNIT_KPH", "3"), ("(gint) GWEATHER_SPEED_UNIT_MPH", "4"), ("(gint) GWEATHER_SPEED_UNIT_MS", "2"), ("(gint) GWEATHER_TEMP_UNIT_CENTIGRADE", "3"), ("(gint) GWEATHER_TEMP_UNIT_DEFAULT", "1"), ("(gint) GWEATHER_TEMP_UNIT_FAHRENHEIT", "4"), ("(gint) GWEATHER_TEMP_UNIT_INVALID", "0"), ("(gint) GWEATHER_TEMP_UNIT_KELVIN", "2"), ("(gint) GWEATHER_WIND_E", "5"), ("(gint) GWEATHER_WIND_ENE", "4"), ("(gint) GWEATHER_WIND_ESE", "6"), ("(gint) GWEATHER_WIND_INVALID", "-1"), ("(gint) GWEATHER_WIND_LAST", "17"), ("(gint) GWEATHER_WIND_N", "1"), ("(gint) GWEATHER_WIND_NE", "3"), ("(gint) GWEATHER_WIND_NNE", "2"), ("(gint) GWEATHER_WIND_NNW", "16"), ("(gint) GWEATHER_WIND_NW", "15"), ("(gint) GWEATHER_WIND_S", "9"), ("(gint) GWEATHER_WIND_SE", "7"), ("(gint) GWEATHER_WIND_SSE", "8"), ("(gint) GWEATHER_WIND_SSW", "10"), ("(gint) GWEATHER_WIND_SW", "11"), ("(gint) GWEATHER_WIND_VARIABLE", "0"), ("(gint) GWEATHER_WIND_W", "13"), ("(gint) GWEATHER_WIND_WNW", "14"), ("(gint) GWEATHER_WIND_WSW", "12"), ]; gweather-sys-4.5.0/tests/constant.c000064400000000000000000000154461046102023000154250ustar 00000000000000// Generated by gir (https://github.com/gtk-rs/gir @ 727e064a9792) // from // from gir-files (https://github.com/gtk-rs/gir-files.git @ 4d1189172a70) // DO NOT EDIT #include "manual.h" #include #define PRINT_CONSTANT(CONSTANT_NAME) \ printf("%s;", #CONSTANT_NAME); \ printf(_Generic((CONSTANT_NAME), \ char *: "%s", \ const char *: "%s", \ char: "%c", \ signed char: "%hhd", \ unsigned char: "%hhu", \ short int: "%hd", \ unsigned short int: "%hu", \ int: "%d", \ unsigned int: "%u", \ long: "%ld", \ unsigned long: "%lu", \ long long: "%lld", \ unsigned long long: "%llu", \ float: "%f", \ double: "%f", \ long double: "%ld"), \ CONSTANT_NAME); \ printf("\n"); int main() { PRINT_CONSTANT((gint) GWEATHER_DISTANCE_UNIT_DEFAULT); PRINT_CONSTANT((gint) GWEATHER_DISTANCE_UNIT_INVALID); PRINT_CONSTANT((gint) GWEATHER_DISTANCE_UNIT_KM); PRINT_CONSTANT((gint) GWEATHER_DISTANCE_UNIT_METERS); PRINT_CONSTANT((gint) GWEATHER_DISTANCE_UNIT_MILES); PRINT_CONSTANT((guint) GWEATHER_FORMAT_OPTION_DEFAULT); PRINT_CONSTANT((guint) GWEATHER_FORMAT_OPTION_NO_CAPITALIZATION); PRINT_CONSTANT((guint) GWEATHER_FORMAT_OPTION_SENTENCE_CAPITALIZATION); PRINT_CONSTANT((gint) GWEATHER_LOCATION_ADM1); PRINT_CONSTANT((gint) GWEATHER_LOCATION_CITY); PRINT_CONSTANT((gint) GWEATHER_LOCATION_COUNTRY); PRINT_CONSTANT((gint) GWEATHER_LOCATION_DETACHED); PRINT_CONSTANT((gint) GWEATHER_LOCATION_NAMED_TIMEZONE); PRINT_CONSTANT((gint) GWEATHER_LOCATION_REGION); PRINT_CONSTANT((gint) GWEATHER_LOCATION_WEATHER_STATION); PRINT_CONSTANT((gint) GWEATHER_LOCATION_WORLD); PRINT_CONSTANT((gint) GWEATHER_PHENOMENON_DRIZZLE); PRINT_CONSTANT((gint) GWEATHER_PHENOMENON_DUST); PRINT_CONSTANT((gint) GWEATHER_PHENOMENON_DUSTSTORM); PRINT_CONSTANT((gint) GWEATHER_PHENOMENON_DUST_WHIRLS); PRINT_CONSTANT((gint) GWEATHER_PHENOMENON_FOG); PRINT_CONSTANT((gint) GWEATHER_PHENOMENON_FUNNEL_CLOUD); PRINT_CONSTANT((gint) GWEATHER_PHENOMENON_HAIL); PRINT_CONSTANT((gint) GWEATHER_PHENOMENON_HAZE); PRINT_CONSTANT((gint) GWEATHER_PHENOMENON_ICE_CRYSTALS); PRINT_CONSTANT((gint) GWEATHER_PHENOMENON_ICE_PELLETS); PRINT_CONSTANT((gint) GWEATHER_PHENOMENON_INVALID); PRINT_CONSTANT((gint) GWEATHER_PHENOMENON_LAST); PRINT_CONSTANT((gint) GWEATHER_PHENOMENON_MIST); PRINT_CONSTANT((gint) GWEATHER_PHENOMENON_NONE); PRINT_CONSTANT((gint) GWEATHER_PHENOMENON_RAIN); PRINT_CONSTANT((gint) GWEATHER_PHENOMENON_SAND); PRINT_CONSTANT((gint) GWEATHER_PHENOMENON_SANDSTORM); PRINT_CONSTANT((gint) GWEATHER_PHENOMENON_SMALL_HAIL); PRINT_CONSTANT((gint) GWEATHER_PHENOMENON_SMOKE); PRINT_CONSTANT((gint) GWEATHER_PHENOMENON_SNOW); PRINT_CONSTANT((gint) GWEATHER_PHENOMENON_SNOW_GRAINS); PRINT_CONSTANT((gint) GWEATHER_PHENOMENON_SPRAY); PRINT_CONSTANT((gint) GWEATHER_PHENOMENON_SQUALL); PRINT_CONSTANT((gint) GWEATHER_PHENOMENON_TORNADO); PRINT_CONSTANT((gint) GWEATHER_PHENOMENON_UNKNOWN_PRECIPITATION); PRINT_CONSTANT((gint) GWEATHER_PHENOMENON_VOLCANIC_ASH); PRINT_CONSTANT((gint) GWEATHER_PRESSURE_UNIT_ATM); PRINT_CONSTANT((gint) GWEATHER_PRESSURE_UNIT_DEFAULT); PRINT_CONSTANT((gint) GWEATHER_PRESSURE_UNIT_HPA); PRINT_CONSTANT((gint) GWEATHER_PRESSURE_UNIT_INCH_HG); PRINT_CONSTANT((gint) GWEATHER_PRESSURE_UNIT_INVALID); PRINT_CONSTANT((gint) GWEATHER_PRESSURE_UNIT_KPA); PRINT_CONSTANT((gint) GWEATHER_PRESSURE_UNIT_MB); PRINT_CONSTANT((gint) GWEATHER_PRESSURE_UNIT_MM_HG); PRINT_CONSTANT((guint) GWEATHER_PROVIDER_ALL); PRINT_CONSTANT((guint) GWEATHER_PROVIDER_IWIN); PRINT_CONSTANT((guint) GWEATHER_PROVIDER_METAR); PRINT_CONSTANT((guint) GWEATHER_PROVIDER_MET_NO); PRINT_CONSTANT((guint) GWEATHER_PROVIDER_NONE); PRINT_CONSTANT((guint) GWEATHER_PROVIDER_NWS); PRINT_CONSTANT((guint) GWEATHER_PROVIDER_OWM); PRINT_CONSTANT((gint) GWEATHER_QUALIFIER_BLOWING); PRINT_CONSTANT((gint) GWEATHER_QUALIFIER_DRIFTING); PRINT_CONSTANT((gint) GWEATHER_QUALIFIER_FREEZING); PRINT_CONSTANT((gint) GWEATHER_QUALIFIER_HEAVY); PRINT_CONSTANT((gint) GWEATHER_QUALIFIER_INVALID); PRINT_CONSTANT((gint) GWEATHER_QUALIFIER_LAST); PRINT_CONSTANT((gint) GWEATHER_QUALIFIER_LIGHT); PRINT_CONSTANT((gint) GWEATHER_QUALIFIER_MODERATE); PRINT_CONSTANT((gint) GWEATHER_QUALIFIER_NONE); PRINT_CONSTANT((gint) GWEATHER_QUALIFIER_PARTIAL); PRINT_CONSTANT((gint) GWEATHER_QUALIFIER_PATCHES); PRINT_CONSTANT((gint) GWEATHER_QUALIFIER_SHALLOW); PRINT_CONSTANT((gint) GWEATHER_QUALIFIER_SHOWERS); PRINT_CONSTANT((gint) GWEATHER_QUALIFIER_THUNDERSTORM); PRINT_CONSTANT((gint) GWEATHER_QUALIFIER_VICINITY); PRINT_CONSTANT((gint) GWEATHER_SKY_BROKEN); PRINT_CONSTANT((gint) GWEATHER_SKY_CLEAR); PRINT_CONSTANT((gint) GWEATHER_SKY_FEW); PRINT_CONSTANT((gint) GWEATHER_SKY_INVALID); PRINT_CONSTANT((gint) GWEATHER_SKY_LAST); PRINT_CONSTANT((gint) GWEATHER_SKY_OVERCAST); PRINT_CONSTANT((gint) GWEATHER_SKY_SCATTERED); PRINT_CONSTANT((gint) GWEATHER_SPEED_UNIT_BFT); PRINT_CONSTANT((gint) GWEATHER_SPEED_UNIT_DEFAULT); PRINT_CONSTANT((gint) GWEATHER_SPEED_UNIT_INVALID); PRINT_CONSTANT((gint) GWEATHER_SPEED_UNIT_KNOTS); PRINT_CONSTANT((gint) GWEATHER_SPEED_UNIT_KPH); PRINT_CONSTANT((gint) GWEATHER_SPEED_UNIT_MPH); PRINT_CONSTANT((gint) GWEATHER_SPEED_UNIT_MS); PRINT_CONSTANT((gint) GWEATHER_TEMP_UNIT_CENTIGRADE); PRINT_CONSTANT((gint) GWEATHER_TEMP_UNIT_DEFAULT); PRINT_CONSTANT((gint) GWEATHER_TEMP_UNIT_FAHRENHEIT); PRINT_CONSTANT((gint) GWEATHER_TEMP_UNIT_INVALID); PRINT_CONSTANT((gint) GWEATHER_TEMP_UNIT_KELVIN); PRINT_CONSTANT((gint) GWEATHER_WIND_E); PRINT_CONSTANT((gint) GWEATHER_WIND_ENE); PRINT_CONSTANT((gint) GWEATHER_WIND_ESE); PRINT_CONSTANT((gint) GWEATHER_WIND_INVALID); PRINT_CONSTANT((gint) GWEATHER_WIND_LAST); PRINT_CONSTANT((gint) GWEATHER_WIND_N); PRINT_CONSTANT((gint) GWEATHER_WIND_NE); PRINT_CONSTANT((gint) GWEATHER_WIND_NNE); PRINT_CONSTANT((gint) GWEATHER_WIND_NNW); PRINT_CONSTANT((gint) GWEATHER_WIND_NW); PRINT_CONSTANT((gint) GWEATHER_WIND_S); PRINT_CONSTANT((gint) GWEATHER_WIND_SE); PRINT_CONSTANT((gint) GWEATHER_WIND_SSE); PRINT_CONSTANT((gint) GWEATHER_WIND_SSW); PRINT_CONSTANT((gint) GWEATHER_WIND_SW); PRINT_CONSTANT((gint) GWEATHER_WIND_VARIABLE); PRINT_CONSTANT((gint) GWEATHER_WIND_W); PRINT_CONSTANT((gint) GWEATHER_WIND_WNW); PRINT_CONSTANT((gint) GWEATHER_WIND_WSW); return 0; } gweather-sys-4.5.0/tests/layout.c000064400000000000000000000040061046102023000150770ustar 00000000000000// Generated by gir (https://github.com/gtk-rs/gir @ 727e064a9792) // from // from gir-files (https://github.com/gtk-rs/gir-files.git @ 4d1189172a70) // DO NOT EDIT #include "manual.h" #include #include int main() { printf("%s;%zu;%zu\n", "GWeatherConditionPhenomenon", sizeof(GWeatherConditionPhenomenon), alignof(GWeatherConditionPhenomenon)); printf("%s;%zu;%zu\n", "GWeatherConditionQualifier", sizeof(GWeatherConditionQualifier), alignof(GWeatherConditionQualifier)); printf("%s;%zu;%zu\n", "GWeatherConditions", sizeof(GWeatherConditions), alignof(GWeatherConditions)); printf("%s;%zu;%zu\n", "GWeatherDistanceUnit", sizeof(GWeatherDistanceUnit), alignof(GWeatherDistanceUnit)); printf("%s;%zu;%zu\n", "GWeatherFormatOptions", sizeof(GWeatherFormatOptions), alignof(GWeatherFormatOptions)); printf("%s;%zu;%zu\n", "GWeatherInfoClass", sizeof(GWeatherInfoClass), alignof(GWeatherInfoClass)); printf("%s;%zu;%zu\n", "GWeatherLocationClass", sizeof(GWeatherLocationClass), alignof(GWeatherLocationClass)); printf("%s;%zu;%zu\n", "GWeatherLocationLevel", sizeof(GWeatherLocationLevel), alignof(GWeatherLocationLevel)); printf("%s;%zu;%zu\n", "GWeatherMoonLatitude", sizeof(GWeatherMoonLatitude), alignof(GWeatherMoonLatitude)); printf("%s;%zu;%zu\n", "GWeatherMoonPhase", sizeof(GWeatherMoonPhase), alignof(GWeatherMoonPhase)); printf("%s;%zu;%zu\n", "GWeatherPressureUnit", sizeof(GWeatherPressureUnit), alignof(GWeatherPressureUnit)); printf("%s;%zu;%zu\n", "GWeatherProvider", sizeof(GWeatherProvider), alignof(GWeatherProvider)); printf("%s;%zu;%zu\n", "GWeatherSky", sizeof(GWeatherSky), alignof(GWeatherSky)); printf("%s;%zu;%zu\n", "GWeatherSpeedUnit", sizeof(GWeatherSpeedUnit), alignof(GWeatherSpeedUnit)); printf("%s;%zu;%zu\n", "GWeatherTemperatureUnit", sizeof(GWeatherTemperatureUnit), alignof(GWeatherTemperatureUnit)); printf("%s;%zu;%zu\n", "GWeatherWindDirection", sizeof(GWeatherWindDirection), alignof(GWeatherWindDirection)); return 0; } gweather-sys-4.5.0/tests/manual.h000064400000000000000000000001741046102023000150460ustar 00000000000000// Feel free to edit this file, it won't be regenerated by gir generator unless removed. #include