1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
4
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
<title>gweather-location</title>
6
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
7
<link rel="home" href="index.html" title="libgweather-3.0 Reference Manual">
8
<link rel="up" href="ch01.html" title="[Insert title here]">
9
<link rel="prev" href="GWeatherLocationEntry.html" title="GWeatherLocationEntry">
10
<link rel="next" href="libgweather-weather.html" title="weather">
11
<meta name="generator" content="GTK-Doc V1.18 (XML mode)">
12
<link rel="stylesheet" href="style.css" type="text/css">
14
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
15
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
17
<td><a accesskey="p" href="GWeatherLocationEntry.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
18
<td><a accesskey="u" href="ch01.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
19
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
20
<th width="100%" align="center">libgweather-3.0 Reference Manual</th>
21
<td><a accesskey="n" href="libgweather-weather.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
23
<tr><td colspan="5" class="shortcuts">
24
<a href="#libgweather-gweather-location.synopsis" class="shortcut">Top</a>
26
<a href="#libgweather-gweather-location.description" class="shortcut">Description</a>
28
<a href="#libgweather-gweather-location.object-hierarchy" class="shortcut">Object Hierarchy</a>
31
<div class="refentry">
32
<a name="libgweather-gweather-location"></a><div class="titlepage"></div>
33
<div class="refnamediv"><table width="100%"><tr>
35
<h2><span class="refentrytitle"><a name="libgweather-gweather-location.top_of_page"></a>gweather-location</span></h2>
36
<p>gweather-location</p>
38
<td valign="top" align="right"></td>
40
<div class="refsynopsisdiv">
41
<a name="libgweather-gweather-location.synopsis"></a><h2>Synopsis</h2>
42
<a name="GWeatherLocation"></a><pre class="synopsis"> <a class="link" href="libgweather-gweather-location.html#GWeatherLocation-struct" title="GWeatherLocation">GWeatherLocation</a>;
43
enum <a class="link" href="libgweather-gweather-location.html#GWeatherLocationLevel" title="enum GWeatherLocationLevel">GWeatherLocationLevel</a>;
44
<a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GType"><span class="returnvalue">GType</span></a> <a class="link" href="libgweather-gweather-location.html#gweather-location-get-type" title="gweather_location_get_type ()">gweather_location_get_type</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
45
#define <a class="link" href="libgweather-gweather-location.html#GWEATHER-TYPE-LOCATION:CAPS" title="GWEATHER_TYPE_LOCATION">GWEATHER_TYPE_LOCATION</a>
46
<a class="link" href="libgweather-gweather-location.html#GWeatherLocation"><span class="returnvalue">GWeatherLocation</span></a> * <a class="link" href="libgweather-gweather-location.html#gweather-location-new-world" title="gweather_location_new_world ()">gweather_location_new_world</a> (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> use_regions</code></em>);
47
<a class="link" href="libgweather-gweather-location.html#GWeatherLocation"><span class="returnvalue">GWeatherLocation</span></a> * <a class="link" href="libgweather-gweather-location.html#gweather-location-ref" title="gweather_location_ref ()">gweather_location_ref</a> (<em class="parameter"><code><a class="link" href="libgweather-gweather-location.html#GWeatherLocation"><span class="type">GWeatherLocation</span></a> *loc</code></em>);
48
<span class="returnvalue">void</span> <a class="link" href="libgweather-gweather-location.html#gweather-location-unref" title="gweather_location_unref ()">gweather_location_unref</a> (<em class="parameter"><code><a class="link" href="libgweather-gweather-location.html#GWeatherLocation"><span class="type">GWeatherLocation</span></a> *loc</code></em>);
49
const <span class="returnvalue">char</span> * <a class="link" href="libgweather-gweather-location.html#gweather-location-get-name" title="gweather_location_get_name ()">gweather_location_get_name</a> (<em class="parameter"><code><a class="link" href="libgweather-gweather-location.html#GWeatherLocation"><span class="type">GWeatherLocation</span></a> *loc</code></em>);
50
const <span class="returnvalue">char</span> * <a class="link" href="libgweather-gweather-location.html#gweather-location-get-sort-name" title="gweather_location_get_sort_name ()">gweather_location_get_sort_name</a> (<em class="parameter"><code><a class="link" href="libgweather-gweather-location.html#GWeatherLocation"><span class="type">GWeatherLocation</span></a> *loc</code></em>);
51
<a class="link" href="libgweather-gweather-location.html#GWeatherLocationLevel" title="enum GWeatherLocationLevel"><span class="returnvalue">GWeatherLocationLevel</span></a> <a class="link" href="libgweather-gweather-location.html#gweather-location-get-level" title="gweather_location_get_level ()">gweather_location_get_level</a> (<em class="parameter"><code><a class="link" href="libgweather-gweather-location.html#GWeatherLocation"><span class="type">GWeatherLocation</span></a> *loc</code></em>);
52
<a class="link" href="libgweather-gweather-location.html#GWeatherLocation"><span class="returnvalue">GWeatherLocation</span></a> * <a class="link" href="libgweather-gweather-location.html#gweather-location-get-parent" title="gweather_location_get_parent ()">gweather_location_get_parent</a> (<em class="parameter"><code><a class="link" href="libgweather-gweather-location.html#GWeatherLocation"><span class="type">GWeatherLocation</span></a> *loc</code></em>);
53
<a class="link" href="libgweather-gweather-location.html#GWeatherLocation"><span class="returnvalue">GWeatherLocation</span></a> ** <a class="link" href="libgweather-gweather-location.html#gweather-location-get-children" title="gweather_location_get_children ()">gweather_location_get_children</a> (<em class="parameter"><code><a class="link" href="libgweather-gweather-location.html#GWeatherLocation"><span class="type">GWeatherLocation</span></a> *loc</code></em>);
54
<span class="returnvalue">void</span> <a class="link" href="libgweather-gweather-location.html#gweather-location-free-children" title="gweather_location_free_children ()">gweather_location_free_children</a> (<em class="parameter"><code><a class="link" href="libgweather-gweather-location.html#GWeatherLocation"><span class="type">GWeatherLocation</span></a> *loc</code></em>,
55
<em class="parameter"><code><a class="link" href="libgweather-gweather-location.html#GWeatherLocation"><span class="type">GWeatherLocation</span></a> **children</code></em>);
56
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="libgweather-gweather-location.html#gweather-location-has-coords" title="gweather_location_has_coords ()">gweather_location_has_coords</a> (<em class="parameter"><code><a class="link" href="libgweather-gweather-location.html#GWeatherLocation"><span class="type">GWeatherLocation</span></a> *loc</code></em>);
57
<span class="returnvalue">void</span> <a class="link" href="libgweather-gweather-location.html#gweather-location-get-coords" title="gweather_location_get_coords ()">gweather_location_get_coords</a> (<em class="parameter"><code><a class="link" href="libgweather-gweather-location.html#GWeatherLocation"><span class="type">GWeatherLocation</span></a> *loc</code></em>,
58
<em class="parameter"><code><span class="type">double</span> *latitude</code></em>,
59
<em class="parameter"><code><span class="type">double</span> *longitude</code></em>);
60
<span class="returnvalue">double</span> <a class="link" href="libgweather-gweather-location.html#gweather-location-get-distance" title="gweather_location_get_distance ()">gweather_location_get_distance</a> (<em class="parameter"><code><a class="link" href="libgweather-gweather-location.html#GWeatherLocation"><span class="type">GWeatherLocation</span></a> *loc</code></em>,
61
<em class="parameter"><code><a class="link" href="libgweather-gweather-location.html#GWeatherLocation"><span class="type">GWeatherLocation</span></a> *loc2</code></em>);
62
const <span class="returnvalue">char</span> * <a class="link" href="libgweather-gweather-location.html#gweather-location-get-country" title="gweather_location_get_country ()">gweather_location_get_country</a> (<em class="parameter"><code><a class="link" href="libgweather-gweather-location.html#GWeatherLocation"><span class="type">GWeatherLocation</span></a> *loc</code></em>);
63
<a class="link" href="libgweather-gweather-timezone.html#GWeatherTimezone"><span class="returnvalue">GWeatherTimezone</span></a> * <a class="link" href="libgweather-gweather-location.html#gweather-location-get-timezone" title="gweather_location_get_timezone ()">gweather_location_get_timezone</a> (<em class="parameter"><code><a class="link" href="libgweather-gweather-location.html#GWeatherLocation"><span class="type">GWeatherLocation</span></a> *loc</code></em>);
64
<a class="link" href="libgweather-gweather-timezone.html#GWeatherTimezone"><span class="returnvalue">GWeatherTimezone</span></a> ** <a class="link" href="libgweather-gweather-location.html#gweather-location-get-timezones" title="gweather_location_get_timezones ()">gweather_location_get_timezones</a> (<em class="parameter"><code><a class="link" href="libgweather-gweather-location.html#GWeatherLocation"><span class="type">GWeatherLocation</span></a> *loc</code></em>);
65
<span class="returnvalue">void</span> <a class="link" href="libgweather-gweather-location.html#gweather-location-free-timezones" title="gweather_location_free_timezones ()">gweather_location_free_timezones</a> (<em class="parameter"><code><a class="link" href="libgweather-gweather-location.html#GWeatherLocation"><span class="type">GWeatherLocation</span></a> *loc</code></em>,
66
<em class="parameter"><code><a class="link" href="libgweather-gweather-timezone.html#GWeatherTimezone"><span class="type">GWeatherTimezone</span></a> **zones</code></em>);
67
const <span class="returnvalue">char</span> * <a class="link" href="libgweather-gweather-location.html#gweather-location-get-code" title="gweather_location_get_code ()">gweather_location_get_code</a> (<em class="parameter"><code><a class="link" href="libgweather-gweather-location.html#GWeatherLocation"><span class="type">GWeatherLocation</span></a> *loc</code></em>);
68
<span class="returnvalue">char</span> * <a class="link" href="libgweather-gweather-location.html#gweather-location-get-city-name" title="gweather_location_get_city_name ()">gweather_location_get_city_name</a> (<em class="parameter"><code><a class="link" href="libgweather-gweather-location.html#GWeatherLocation"><span class="type">GWeatherLocation</span></a> *loc</code></em>);
69
<a class="link" href="libgweather-weather.html#WeatherInfo" title="WeatherInfo"><span class="returnvalue">WeatherInfo</span></a> * <a class="link" href="libgweather-gweather-location.html#gweather-location-get-weather" title="gweather_location_get_weather ()">gweather_location_get_weather</a> (<em class="parameter"><code><a class="link" href="libgweather-gweather-location.html#GWeatherLocation"><span class="type">GWeatherLocation</span></a> *loc</code></em>);
72
<div class="refsect1">
73
<a name="libgweather-gweather-location.object-hierarchy"></a><h2>Object Hierarchy</h2>
74
<pre class="synopsis">
79
<div class="refsect1">
80
<a name="libgweather-gweather-location.description"></a><h2>Description</h2>
84
<div class="refsect1">
85
<a name="libgweather-gweather-location.details"></a><h2>Details</h2>
86
<div class="refsect2">
87
<a name="GWeatherLocation-struct"></a><h3>GWeatherLocation</h3>
88
<pre class="programlisting">typedef struct _GWeatherLocation GWeatherLocation;</pre>
90
A <a class="link" href="libgweather-gweather-location.html#GWeatherLocation"><span class="type">GWeatherLocation</span></a> represents a "location" of some type known to
91
libgweather; anything from a single weather station to the entire
92
world. See <a class="link" href="libgweather-gweather-location.html#GWeatherLocationLevel" title="enum GWeatherLocationLevel"><span class="type">GWeatherLocationLevel</span></a> for information about how the
93
hierarchy of locations works.
97
<div class="refsect2">
98
<a name="GWeatherLocationLevel"></a><h3>enum GWeatherLocationLevel</h3>
99
<pre class="programlisting">typedef enum {
100
/*< underscore_name=gweather_location_level >*/
101
GWEATHER_LOCATION_WORLD,
102
GWEATHER_LOCATION_REGION,
103
GWEATHER_LOCATION_COUNTRY,
104
/* ADM1 = first-order administrative division = state/province, etc */
105
GWEATHER_LOCATION_ADM1,
106
/* ADM2 = second-order division = county, etc */
107
GWEATHER_LOCATION_ADM2,
108
GWEATHER_LOCATION_CITY,
109
GWEATHER_LOCATION_WEATHER_STATION
110
} GWeatherLocationLevel;
113
The size/scope of a particular <a class="link" href="libgweather-gweather-location.html#GWeatherLocation"><span class="type">GWeatherLocation</span></a>.
116
Locations form a hierarchy, with a <a class="link" href="libgweather-gweather-location.html#GWEATHER-LOCATION-WORLD:CAPS"><code class="literal">GWEATHER_LOCATION_WORLD</code></a>
117
location at the top, divided into regions or countries, and so on.
118
Countries may or may not be divided into "adm1"s, and "adm1"s may
119
or may not be divided into "adm2"s. A city will have at least one,
120
and possibly several, weather stations inside it. Weather stations
121
will never appear outside of cities.
123
<div class="variablelist"><table border="0">
124
<col align="left" valign="top">
127
<td><p><a name="GWEATHER-LOCATION-WORLD:CAPS"></a><span class="term"><code class="literal">GWEATHER_LOCATION_WORLD</code></span></p></td>
128
<td>A location representing the entire world.
132
<td><p><a name="GWEATHER-LOCATION-REGION:CAPS"></a><span class="term"><code class="literal">GWEATHER_LOCATION_REGION</code></span></p></td>
133
<td>A location representing a continent or
134
other top-level region.
138
<td><p><a name="GWEATHER-LOCATION-COUNTRY:CAPS"></a><span class="term"><code class="literal">GWEATHER_LOCATION_COUNTRY</code></span></p></td>
139
<td>A location representing a "country" (or
140
other geographic unit that has an ISO-3166 country code)
144
<td><p><a name="GWEATHER-LOCATION-ADM1:CAPS"></a><span class="term"><code class="literal">GWEATHER_LOCATION_ADM1</code></span></p></td>
145
<td>A location representing a "first-level
146
administrative division"; ie, a state, province, or similar
151
<td><p><a name="GWEATHER-LOCATION-ADM2:CAPS"></a><span class="term"><code class="literal">GWEATHER_LOCATION_ADM2</code></span></p></td>
152
<td>A location representing a subdivision of a
153
<a class="link" href="libgweather-gweather-location.html#GWEATHER-LOCATION-ADM1:CAPS"><code class="literal">GWEATHER_LOCATION_ADM1</code></a> location. (Not currently used.)
157
<td><p><a name="GWEATHER-LOCATION-CITY:CAPS"></a><span class="term"><code class="literal">GWEATHER_LOCATION_CITY</code></span></p></td>
158
<td>A location representing a city
162
<td><p><a name="GWEATHER-LOCATION-WEATHER-STATION:CAPS"></a><span class="term"><code class="literal">GWEATHER_LOCATION_WEATHER_STATION</code></span></p></td>
163
<td>A location representing a
171
<div class="refsect2">
172
<a name="gweather-location-get-type"></a><h3>gweather_location_get_type ()</h3>
173
<pre class="programlisting"><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GType"><span class="returnvalue">GType</span></a> gweather_location_get_type (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
178
<div class="refsect2">
179
<a name="GWEATHER-TYPE-LOCATION:CAPS"></a><h3>GWEATHER_TYPE_LOCATION</h3>
180
<pre class="programlisting">#define GWEATHER_TYPE_LOCATION (gweather_location_get_type ())
186
<div class="refsect2">
187
<a name="gweather-location-new-world"></a><h3>gweather_location_new_world ()</h3>
188
<pre class="programlisting"><a class="link" href="libgweather-gweather-location.html#GWeatherLocation"><span class="returnvalue">GWeatherLocation</span></a> * gweather_location_new_world (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> use_regions</code></em>);</pre>
190
Creates a new <a class="link" href="libgweather-gweather-location.html#GWeatherLocation"><span class="type">GWeatherLocation</span></a> of type <a class="link" href="libgweather-gweather-location.html#GWEATHER-LOCATION-WORLD:CAPS"><code class="literal">GWEATHER_LOCATION_WORLD</code></a>,
191
representing a hierarchy containing all of the locations from
195
If <em class="parameter"><code>use_regions</code></em> is <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>, the immediate children of the returned
196
location will be <a class="link" href="libgweather-gweather-location.html#GWEATHER-LOCATION-REGION:CAPS"><code class="literal">GWEATHER_LOCATION_REGION</code></a> nodes, representing the
197
top-level "regions" of Locations.xml (the continents and a few
198
other divisions), and the country-level nodes will be the children
199
of the regions. If <em class="parameter"><code>use_regions</code></em> is <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>, the regions will be
200
skipped, and the children of the returned location will be the
201
<a class="link" href="libgweather-gweather-location.html#GWEATHER-LOCATION-COUNTRY:CAPS"><code class="literal">GWEATHER_LOCATION_COUNTRY</code></a> nodes.
203
<div class="variablelist"><table border="0">
204
<col align="left" valign="top">
207
<td><p><span class="term"><em class="parameter"><code>use_regions</code></em> :</span></p></td>
208
<td>whether or not to divide the world into regions</td>
211
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
212
<td>a <a class="link" href="libgweather-gweather-location.html#GWEATHER-LOCATION-WORLD:CAPS"><code class="literal">GWEATHER_LOCATION_WORLD</code></a> location, or
213
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if Locations.xml could not be found or could not be parsed. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
220
<div class="refsect2">
221
<a name="gweather-location-ref"></a><h3>gweather_location_ref ()</h3>
222
<pre class="programlisting"><a class="link" href="libgweather-gweather-location.html#GWeatherLocation"><span class="returnvalue">GWeatherLocation</span></a> * gweather_location_ref (<em class="parameter"><code><a class="link" href="libgweather-gweather-location.html#GWeatherLocation"><span class="type">GWeatherLocation</span></a> *loc</code></em>);</pre>
224
Adds 1 to <em class="parameter"><code>loc</code></em>'s reference count.
226
<div class="variablelist"><table border="0">
227
<col align="left" valign="top">
230
<td><p><span class="term"><em class="parameter"><code>loc</code></em> :</span></p></td>
231
<td>a <a class="link" href="libgweather-gweather-location.html#GWeatherLocation"><span class="type">GWeatherLocation</span></a>
235
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
236
<td><em class="parameter"><code>loc</code></em></td>
242
<div class="refsect2">
243
<a name="gweather-location-unref"></a><h3>gweather_location_unref ()</h3>
244
<pre class="programlisting"><span class="returnvalue">void</span> gweather_location_unref (<em class="parameter"><code><a class="link" href="libgweather-gweather-location.html#GWeatherLocation"><span class="type">GWeatherLocation</span></a> *loc</code></em>);</pre>
246
Subtracts 1 from <em class="parameter"><code>loc</code></em>'s reference count, and frees it if the
247
reference count reaches 0.
249
<div class="variablelist"><table border="0">
250
<col align="left" valign="top">
252
<td><p><span class="term"><em class="parameter"><code>loc</code></em> :</span></p></td>
253
<td>a <a class="link" href="libgweather-gweather-location.html#GWeatherLocation"><span class="type">GWeatherLocation</span></a>
259
<div class="refsect2">
260
<a name="gweather-location-get-name"></a><h3>gweather_location_get_name ()</h3>
261
<pre class="programlisting">const <span class="returnvalue">char</span> * gweather_location_get_name (<em class="parameter"><code><a class="link" href="libgweather-gweather-location.html#GWeatherLocation"><span class="type">GWeatherLocation</span></a> *loc</code></em>);</pre>
263
Gets <em class="parameter"><code>loc</code></em>'s name, localized into the current language.
266
Note that <a class="link" href="libgweather-gweather-location.html#GWEATHER-LOCATION-WEATHER-STATION:CAPS"><code class="literal">GWEATHER_LOCATION_WEATHER_STATION</code></a> nodes are not
267
localized, and so the name returned for those nodes will always be
268
in English, and should therefore not be displayed to the user.
269
(FIXME: should we just not return a name?)
271
<div class="variablelist"><table border="0">
272
<col align="left" valign="top">
275
<td><p><span class="term"><em class="parameter"><code>loc</code></em> :</span></p></td>
276
<td>a <a class="link" href="libgweather-gweather-location.html#GWeatherLocation"><span class="type">GWeatherLocation</span></a>
280
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
282
<em class="parameter"><code>loc</code></em>'s name</td>
288
<div class="refsect2">
289
<a name="gweather-location-get-sort-name"></a><h3>gweather_location_get_sort_name ()</h3>
290
<pre class="programlisting">const <span class="returnvalue">char</span> * gweather_location_get_sort_name (<em class="parameter"><code><a class="link" href="libgweather-gweather-location.html#GWeatherLocation"><span class="type">GWeatherLocation</span></a> *loc</code></em>);</pre>
292
Gets <em class="parameter"><code>loc</code></em>'s "sort name", which is the name after having
293
<a href="http://library.gnome.org/devel/glib/unstable/glib-Unicode-Manipulation.html#g-utf8-normalize"><code class="function">g_utf8_normalize()</code></a> (with <a href="http://library.gnome.org/devel/glib/unstable/glib-Unicode-Manipulation.html#G-NORMALIZE-ALL:CAPS"><code class="literal">G_NORMALIZE_ALL</code></a>) and <a href="http://library.gnome.org/devel/glib/unstable/glib-Unicode-Manipulation.html#g-utf8-casefold"><code class="function">g_utf8_casefold()</code></a>
294
called on it. You can use this to sort locations, or to comparing
295
user input against a location name.
297
<div class="variablelist"><table border="0">
298
<col align="left" valign="top">
301
<td><p><span class="term"><em class="parameter"><code>loc</code></em> :</span></p></td>
302
<td>a <a class="link" href="libgweather-gweather-location.html#GWeatherLocation"><span class="type">GWeatherLocation</span></a>
306
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
308
<em class="parameter"><code>loc</code></em>'s sort name</td>
314
<div class="refsect2">
315
<a name="gweather-location-get-level"></a><h3>gweather_location_get_level ()</h3>
316
<pre class="programlisting"><a class="link" href="libgweather-gweather-location.html#GWeatherLocationLevel" title="enum GWeatherLocationLevel"><span class="returnvalue">GWeatherLocationLevel</span></a> gweather_location_get_level (<em class="parameter"><code><a class="link" href="libgweather-gweather-location.html#GWeatherLocation"><span class="type">GWeatherLocation</span></a> *loc</code></em>);</pre>
318
Gets <em class="parameter"><code>loc</code></em>'s level, from <a class="link" href="libgweather-gweather-location.html#GWEATHER-LOCATION-WORLD:CAPS"><code class="literal">GWEATHER_LOCATION_WORLD</code></a>, to
319
<a class="link" href="libgweather-gweather-location.html#GWEATHER-LOCATION-WEATHER-STATION:CAPS"><code class="literal">GWEATHER_LOCATION_WEATHER_STATION</code></a>.
321
<div class="variablelist"><table border="0">
322
<col align="left" valign="top">
325
<td><p><span class="term"><em class="parameter"><code>loc</code></em> :</span></p></td>
326
<td>a <a class="link" href="libgweather-gweather-location.html#GWeatherLocation"><span class="type">GWeatherLocation</span></a>
330
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
332
<em class="parameter"><code>loc</code></em>'s level</td>
338
<div class="refsect2">
339
<a name="gweather-location-get-parent"></a><h3>gweather_location_get_parent ()</h3>
340
<pre class="programlisting"><a class="link" href="libgweather-gweather-location.html#GWeatherLocation"><span class="returnvalue">GWeatherLocation</span></a> * gweather_location_get_parent (<em class="parameter"><code><a class="link" href="libgweather-gweather-location.html#GWeatherLocation"><span class="type">GWeatherLocation</span></a> *loc</code></em>);</pre>
342
Gets <em class="parameter"><code>loc</code></em>'s parent location.
344
<div class="variablelist"><table border="0">
345
<col align="left" valign="top">
348
<td><p><span class="term"><em class="parameter"><code>loc</code></em> :</span></p></td>
349
<td>a <a class="link" href="libgweather-gweather-location.html#GWeatherLocation"><span class="type">GWeatherLocation</span></a>
353
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
355
<em class="parameter"><code>loc</code></em>'s parent, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
356
if <em class="parameter"><code>loc</code></em> is a <a class="link" href="libgweather-gweather-location.html#GWEATHER-LOCATION-WORLD:CAPS"><code class="literal">GWEATHER_LOCATION_WORLD</code></a> node. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>][<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
363
<div class="refsect2">
364
<a name="gweather-location-get-children"></a><h3>gweather_location_get_children ()</h3>
365
<pre class="programlisting"><a class="link" href="libgweather-gweather-location.html#GWeatherLocation"><span class="returnvalue">GWeatherLocation</span></a> ** gweather_location_get_children (<em class="parameter"><code><a class="link" href="libgweather-gweather-location.html#GWeatherLocation"><span class="type">GWeatherLocation</span></a> *loc</code></em>);</pre>
367
Gets an array of <em class="parameter"><code>loc</code></em>'s children; this is owned by <em class="parameter"><code>loc</code></em> and will
368
not remain valid if <em class="parameter"><code>loc</code></em> is freed.
370
<div class="variablelist"><table border="0">
371
<col align="left" valign="top">
374
<td><p><span class="term"><em class="parameter"><code>loc</code></em> :</span></p></td>
375
<td>a <a class="link" href="libgweather-gweather-location.html#GWeatherLocation"><span class="type">GWeatherLocation</span></a>
379
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
381
<em class="parameter"><code>loc</code></em>'s
382
children. (May be empty, but will not be <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.). <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>][<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> zero-terminated=1]</span>
389
<div class="refsect2">
390
<a name="gweather-location-free-children"></a><h3>gweather_location_free_children ()</h3>
391
<pre class="programlisting"><span class="returnvalue">void</span> gweather_location_free_children (<em class="parameter"><code><a class="link" href="libgweather-gweather-location.html#GWeatherLocation"><span class="type">GWeatherLocation</span></a> *loc</code></em>,
392
<em class="parameter"><code><a class="link" href="libgweather-gweather-location.html#GWeatherLocation"><span class="type">GWeatherLocation</span></a> **children</code></em>);</pre>
393
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
394
<h3 class="title">Warning</h3>
395
<p><code class="literal">gweather_location_free_children</code> is deprecated and should not be used in newly-written code. This is a no-op.</p>
398
This is a no-op. Do not use it.
400
<div class="variablelist"><table border="0">
401
<col align="left" valign="top">
404
<td><p><span class="term"><em class="parameter"><code>loc</code></em> :</span></p></td>
405
<td>a <a class="link" href="libgweather-gweather-location.html#GWeatherLocation"><span class="type">GWeatherLocation</span></a>
409
<td><p><span class="term"><em class="parameter"><code>children</code></em> :</span></p></td>
410
<td>an array of <em class="parameter"><code>loc</code></em>'s children</td>
416
<div class="refsect2">
417
<a name="gweather-location-has-coords"></a><h3>gweather_location_has_coords ()</h3>
418
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> gweather_location_has_coords (<em class="parameter"><code><a class="link" href="libgweather-gweather-location.html#GWeatherLocation"><span class="type">GWeatherLocation</span></a> *loc</code></em>);</pre>
420
Checks if <em class="parameter"><code>loc</code></em> has valid latitude and longitude.
422
<div class="variablelist"><table border="0">
423
<col align="left" valign="top">
426
<td><p><span class="term"><em class="parameter"><code>loc</code></em> :</span></p></td>
427
<td>a <a class="link" href="libgweather-gweather-location.html#GWeatherLocation"><span class="type">GWeatherLocation</span></a>
431
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
433
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>loc</code></em> has valid latitude and longitude.</td>
439
<div class="refsect2">
440
<a name="gweather-location-get-coords"></a><h3>gweather_location_get_coords ()</h3>
441
<pre class="programlisting"><span class="returnvalue">void</span> gweather_location_get_coords (<em class="parameter"><code><a class="link" href="libgweather-gweather-location.html#GWeatherLocation"><span class="type">GWeatherLocation</span></a> *loc</code></em>,
442
<em class="parameter"><code><span class="type">double</span> *latitude</code></em>,
443
<em class="parameter"><code><span class="type">double</span> *longitude</code></em>);</pre>
445
Gets <em class="parameter"><code>loc</code></em>'s coordinates; you must check
446
<a class="link" href="libgweather-gweather-location.html#gweather-location-has-coords" title="gweather_location_has_coords ()"><code class="function">gweather_location_has_coords()</code></a> before calling this.
448
<div class="variablelist"><table border="0">
449
<col align="left" valign="top">
452
<td><p><span class="term"><em class="parameter"><code>loc</code></em> :</span></p></td>
453
<td>a <a class="link" href="libgweather-gweather-location.html#GWeatherLocation"><span class="type">GWeatherLocation</span></a>
457
<td><p><span class="term"><em class="parameter"><code>latitude</code></em> :</span></p></td>
458
<td>on return will contain <em class="parameter"><code>loc</code></em>'s latitude. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span>
462
<td><p><span class="term"><em class="parameter"><code>longitude</code></em> :</span></p></td>
463
<td>on return will contain <em class="parameter"><code>loc</code></em>'s longitude. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span>
470
<div class="refsect2">
471
<a name="gweather-location-get-distance"></a><h3>gweather_location_get_distance ()</h3>
472
<pre class="programlisting"><span class="returnvalue">double</span> gweather_location_get_distance (<em class="parameter"><code><a class="link" href="libgweather-gweather-location.html#GWeatherLocation"><span class="type">GWeatherLocation</span></a> *loc</code></em>,
473
<em class="parameter"><code><a class="link" href="libgweather-gweather-location.html#GWeatherLocation"><span class="type">GWeatherLocation</span></a> *loc2</code></em>);</pre>
475
Determines the distance in kilometers between <em class="parameter"><code>loc</code></em> and <em class="parameter"><code>loc2</code></em>.
477
<div class="variablelist"><table border="0">
478
<col align="left" valign="top">
481
<td><p><span class="term"><em class="parameter"><code>loc</code></em> :</span></p></td>
482
<td>a <a class="link" href="libgweather-gweather-location.html#GWeatherLocation"><span class="type">GWeatherLocation</span></a>
486
<td><p><span class="term"><em class="parameter"><code>loc2</code></em> :</span></p></td>
487
<td>a second <a class="link" href="libgweather-gweather-location.html#GWeatherLocation"><span class="type">GWeatherLocation</span></a>
491
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
492
<td>the distance between <em class="parameter"><code>loc</code></em> and <em class="parameter"><code>loc2</code></em>.</td>
498
<div class="refsect2">
499
<a name="gweather-location-get-country"></a><h3>gweather_location_get_country ()</h3>
500
<pre class="programlisting">const <span class="returnvalue">char</span> * gweather_location_get_country (<em class="parameter"><code><a class="link" href="libgweather-gweather-location.html#GWeatherLocation"><span class="type">GWeatherLocation</span></a> *loc</code></em>);</pre>
502
Gets the ISO 3166 country code of <em class="parameter"><code>loc</code></em> (or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if <em class="parameter"><code>loc</code></em> is a
503
region- or world-level location)
505
<div class="variablelist"><table border="0">
506
<col align="left" valign="top">
509
<td><p><span class="term"><em class="parameter"><code>loc</code></em> :</span></p></td>
510
<td>a <a class="link" href="libgweather-gweather-location.html#GWeatherLocation"><span class="type">GWeatherLocation</span></a>
514
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
516
<em class="parameter"><code>loc</code></em>'s country code (or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if <em class="parameter"><code>loc</code></em>
517
is a region- or world-level location). <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
524
<div class="refsect2">
525
<a name="gweather-location-get-timezone"></a><h3>gweather_location_get_timezone ()</h3>
526
<pre class="programlisting"><a class="link" href="libgweather-gweather-timezone.html#GWeatherTimezone"><span class="returnvalue">GWeatherTimezone</span></a> * gweather_location_get_timezone (<em class="parameter"><code><a class="link" href="libgweather-gweather-location.html#GWeatherLocation"><span class="type">GWeatherLocation</span></a> *loc</code></em>);</pre>
528
Gets the timezone associated with <em class="parameter"><code>loc</code></em>, if known.
531
The timezone is owned either by <em class="parameter"><code>loc</code></em> or by one of its parents.
534
<div class="variablelist"><table border="0">
535
<col align="left" valign="top">
538
<td><p><span class="term"><em class="parameter"><code>loc</code></em> :</span></p></td>
539
<td>a <a class="link" href="libgweather-gweather-location.html#GWeatherLocation"><span class="type">GWeatherLocation</span></a>
543
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
545
<em class="parameter"><code>loc</code></em>'s timezone, or
546
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>][<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
553
<div class="refsect2">
554
<a name="gweather-location-get-timezones"></a><h3>gweather_location_get_timezones ()</h3>
555
<pre class="programlisting"><a class="link" href="libgweather-gweather-timezone.html#GWeatherTimezone"><span class="returnvalue">GWeatherTimezone</span></a> ** gweather_location_get_timezones (<em class="parameter"><code><a class="link" href="libgweather-gweather-location.html#GWeatherLocation"><span class="type">GWeatherLocation</span></a> *loc</code></em>);</pre>
557
Gets an array of all timezones associated with any location under
558
<em class="parameter"><code>loc</code></em>. You can use <a class="link" href="libgweather-gweather-location.html#gweather-location-free-timezones" title="gweather_location_free_timezones ()"><code class="function">gweather_location_free_timezones()</code></a> to free this
561
<div class="variablelist"><table border="0">
562
<col align="left" valign="top">
565
<td><p><span class="term"><em class="parameter"><code>loc</code></em> :</span></p></td>
566
<td>a <a class="link" href="libgweather-gweather-location.html#GWeatherLocation"><span class="type">GWeatherLocation</span></a>
570
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
572
of timezones. May be empty but will not be <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>][<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> zero-terminated=1]</span>
579
<div class="refsect2">
580
<a name="gweather-location-free-timezones"></a><h3>gweather_location_free_timezones ()</h3>
581
<pre class="programlisting"><span class="returnvalue">void</span> gweather_location_free_timezones (<em class="parameter"><code><a class="link" href="libgweather-gweather-location.html#GWeatherLocation"><span class="type">GWeatherLocation</span></a> *loc</code></em>,
582
<em class="parameter"><code><a class="link" href="libgweather-gweather-timezone.html#GWeatherTimezone"><span class="type">GWeatherTimezone</span></a> **zones</code></em>);</pre>
584
Frees the array of timezones returned by
585
<a class="link" href="libgweather-gweather-location.html#gweather-location-get-timezones" title="gweather_location_get_timezones ()"><code class="function">gweather_location_get_timezones()</code></a>.
587
<div class="variablelist"><table border="0">
588
<col align="left" valign="top">
591
<td><p><span class="term"><em class="parameter"><code>loc</code></em> :</span></p></td>
592
<td>a <a class="link" href="libgweather-gweather-location.html#GWeatherLocation"><span class="type">GWeatherLocation</span></a>
596
<td><p><span class="term"><em class="parameter"><code>zones</code></em> :</span></p></td>
597
<td>an array returned from <a class="link" href="libgweather-gweather-location.html#gweather-location-get-timezones" title="gweather_location_get_timezones ()"><code class="function">gweather_location_get_timezones()</code></a>
604
<div class="refsect2">
605
<a name="gweather-location-get-code"></a><h3>gweather_location_get_code ()</h3>
606
<pre class="programlisting">const <span class="returnvalue">char</span> * gweather_location_get_code (<em class="parameter"><code><a class="link" href="libgweather-gweather-location.html#GWeatherLocation"><span class="type">GWeatherLocation</span></a> *loc</code></em>);</pre>
608
Gets the METAR station code associated with a
609
<a class="link" href="libgweather-gweather-location.html#GWEATHER-LOCATION-WEATHER-STATION:CAPS"><code class="literal">GWEATHER_LOCATION_WEATHER_STATION</code></a> location.
611
<div class="variablelist"><table border="0">
612
<col align="left" valign="top">
615
<td><p><span class="term"><em class="parameter"><code>loc</code></em> :</span></p></td>
616
<td>a <a class="link" href="libgweather-gweather-location.html#GWeatherLocation"><span class="type">GWeatherLocation</span></a>
620
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
622
<em class="parameter"><code>loc</code></em>'s METAR station code, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
629
<div class="refsect2">
630
<a name="gweather-location-get-city-name"></a><h3>gweather_location_get_city_name ()</h3>
631
<pre class="programlisting"><span class="returnvalue">char</span> * gweather_location_get_city_name (<em class="parameter"><code><a class="link" href="libgweather-gweather-location.html#GWeatherLocation"><span class="type">GWeatherLocation</span></a> *loc</code></em>);</pre>
633
For a <a class="link" href="libgweather-gweather-location.html#GWEATHER-LOCATION-CITY:CAPS"><code class="literal">GWEATHER_LOCATION_CITY</code></a> location, this is equivalent to
634
<a class="link" href="libgweather-gweather-location.html#gweather-location-get-name" title="gweather_location_get_name ()"><code class="function">gweather_location_get_name()</code></a>. For a
635
<a class="link" href="libgweather-gweather-location.html#GWEATHER-LOCATION-WEATHER-STATION:CAPS"><code class="literal">GWEATHER_LOCATION_WEATHER_STATION</code></a> location, it is equivalent to
636
calling <a class="link" href="libgweather-gweather-location.html#gweather-location-get-name" title="gweather_location_get_name ()"><code class="function">gweather_location_get_name()</code></a> on the location's parent. For
637
other locations it will return <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.
639
<div class="variablelist"><table border="0">
640
<col align="left" valign="top">
643
<td><p><span class="term"><em class="parameter"><code>loc</code></em> :</span></p></td>
644
<td>a <a class="link" href="libgweather-gweather-location.html#GWeatherLocation"><span class="type">GWeatherLocation</span></a>
648
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
649
<td>(allow-none) <em class="parameter"><code>loc</code></em>'s city name, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
656
<div class="refsect2">
657
<a name="gweather-location-get-weather"></a><h3>gweather_location_get_weather ()</h3>
658
<pre class="programlisting"><a class="link" href="libgweather-weather.html#WeatherInfo" title="WeatherInfo"><span class="returnvalue">WeatherInfo</span></a> * gweather_location_get_weather (<em class="parameter"><code><a class="link" href="libgweather-gweather-location.html#GWeatherLocation"><span class="type">GWeatherLocation</span></a> *loc</code></em>);</pre>
660
Creates a <a class="link" href="libgweather-weather.html#WeatherInfo" title="WeatherInfo"><span class="type">WeatherInfo</span></a> corresponding to <em class="parameter"><code>loc</code></em>; you can use
661
<a class="link" href="libgweather-weather.html#weather-info-update" title="weather_info_update()"><code class="function">weather_info_update()</code></a> to fill it in.
663
<div class="variablelist"><table border="0">
664
<col align="left" valign="top">
667
<td><p><span class="term"><em class="parameter"><code>loc</code></em> :</span></p></td>
668
<td>a <a class="link" href="libgweather-gweather-location.html#GWeatherLocation"><code class="literal">GWeatherLocation</code></a>
672
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
673
<td>a <a class="link" href="libgweather-weather.html#WeatherInfo" title="WeatherInfo"><span class="type">WeatherInfo</span></a> corresponding to
674
<em class="parameter"><code>loc</code></em>. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
684
Generated by GTK-Doc V1.18</div>
b'\\ No newline at end of file'