1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
// Generated by gir (https://github.com/gtk-rs/gir @ 0e476ab5c1de)
// from ../.. (@ 177c7b834f81+)
// from ../../gir-files (@ cfc0305f903b)
// 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, size_t, ssize_t, uintptr_t, FILE,
};

#[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<unsafe extern "C" fn(*mut GWeatherLocation, gpointer) -> 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 c_long,
    ) -> 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;

}