4
4
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
5
<title>GWeatherLocationEntry</title>
6
6
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
7
<link rel="home" href="index.html" title="libgweather Reference Manual">
7
<link rel="home" href="index.html" title="libgweather-3.0 Reference Manual">
8
8
<link rel="up" href="ch01.html" title="[Insert title here]">
9
<link rel="prev" href="libgweather-gweather-location.html" title="gweather-location">
10
<link rel="next" href="libgweather-gweather-timezone.html" title="gweather-timezone">
11
<meta name="generator" content="GTK-Doc V1.15.1 (XML mode)">
9
<link rel="prev" href="GWeatherTimezoneMenu.html" title="GWeatherTimezoneMenu">
10
<link rel="next" href="libgweather-gweather-location.html" title="gweather-location">
11
<meta name="generator" content="GTK-Doc V1.17.1 (XML mode)">
12
12
<link rel="stylesheet" href="style.css" type="text/css">
14
14
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
15
15
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
16
16
<tr valign="middle">
17
<td><a accesskey="p" href="libgweather-gweather-location.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
17
<td><a accesskey="p" href="GWeatherTimezoneMenu.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
18
18
<td><a accesskey="u" href="ch01.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
19
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 Reference Manual</th>
21
<td><a accesskey="n" href="libgweather-gweather-timezone.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
20
<th width="100%" align="center">libgweather-3.0 Reference Manual</th>
21
<td><a accesskey="n" href="libgweather-gweather-location.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
23
23
<tr><td colspan="5" class="shortcuts">
24
24
<a href="#GWeatherLocationEntry.synopsis" class="shortcut">Top</a>
44
44
<div class="refsynopsisdiv">
45
45
<a name="GWeatherLocationEntry.synopsis"></a><h2>Synopsis</h2>
46
46
<pre class="synopsis"> <a class="link" href="GWeatherLocationEntry.html#GWeatherLocationEntry-struct" title="GWeatherLocationEntry">GWeatherLocationEntry</a>;
47
<span class="returnvalue">GtkWidget</span> * <a class="link" href="GWeatherLocationEntry.html#gweather-location-entry-new" title="gweather_location_entry_new ()">gweather_location_entry_new</a> (<em class="parameter"><code><a class="link" href="libgweather-gweather-location.html#GWeatherLocation" title="GWeatherLocation"><span class="type">GWeatherLocation</span></a> *top</code></em>);
47
<a class="link" href="GWeatherLocationEntry.html#GWeatherLocationEntryClass" title="GWeatherLocationEntryClass">GWeatherLocationEntryClass</a>;
48
<a href="http://library.gnome.org/devel/gtk/GtkWidget.html"><span class="returnvalue">GtkWidget</span></a> * <a class="link" href="GWeatherLocationEntry.html#gweather-location-entry-new" title="gweather_location_entry_new ()">gweather_location_entry_new</a> (<em class="parameter"><code><a class="link" href="libgweather-gweather-location.html#GWeatherLocation" title="GWeatherLocation"><span class="type">GWeatherLocation</span></a> *top</code></em>);
48
49
<span class="returnvalue">void</span> <a class="link" href="GWeatherLocationEntry.html#gweather-location-entry-set-location" title="gweather_location_entry_set_location ()">gweather_location_entry_set_location</a>
49
50
(<em class="parameter"><code><a class="link" href="GWeatherLocationEntry.html" title="GWeatherLocationEntry"><span class="type">GWeatherLocationEntry</span></a> *entry</code></em>,
50
51
<em class="parameter"><code><a class="link" href="libgweather-gweather-location.html#GWeatherLocation" title="GWeatherLocation"><span class="type">GWeatherLocation</span></a> *loc</code></em>);
51
52
<a class="link" href="libgweather-gweather-location.html#GWeatherLocation" title="GWeatherLocation"><span class="returnvalue">GWeatherLocation</span></a> * <a class="link" href="GWeatherLocationEntry.html#gweather-location-entry-get-location" title="gweather_location_entry_get_location ()">gweather_location_entry_get_location</a>
52
53
(<em class="parameter"><code><a class="link" href="GWeatherLocationEntry.html" title="GWeatherLocationEntry"><span class="type">GWeatherLocationEntry</span></a> *entry</code></em>);
54
<span class="returnvalue">gboolean</span> <a class="link" href="GWeatherLocationEntry.html#gweather-location-entry-has-custom-text" title="gweather_location_entry_has_custom_text ()">gweather_location_entry_has_custom_text</a>
55
(<em class="parameter"><code><a class="link" href="GWeatherLocationEntry.html" title="GWeatherLocationEntry"><span class="type">GWeatherLocationEntry</span></a> *entry</code></em>);
53
56
<span class="returnvalue">gboolean</span> <a class="link" href="GWeatherLocationEntry.html#gweather-location-entry-set-city" title="gweather_location_entry_set_city ()">gweather_location_entry_set_city</a> (<em class="parameter"><code><a class="link" href="GWeatherLocationEntry.html" title="GWeatherLocationEntry"><span class="type">GWeatherLocationEntry</span></a> *entry</code></em>,
54
57
<em class="parameter"><code>const <span class="type">char</span> *city_name</code></em>,
55
58
<em class="parameter"><code>const <span class="type">char</span> *code</code></em>);
58
61
<div class="refsect1">
59
62
<a name="GWeatherLocationEntry.object-hierarchy"></a><h2>Object Hierarchy</h2>
60
63
<pre class="synopsis">
62
+----GInitiallyUnowned
64
<a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
65
+----<a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GInitiallyUnowned">GInitiallyUnowned</a>
67
+----<a href="http://library.gnome.org/devel/gtk/GtkWidget.html">GtkWidget</a>
68
+----<a href="http://library.gnome.org/devel/gtk/GtkEntry.html">GtkEntry</a>
66
69
+----GWeatherLocationEntry
70
73
<a name="GWeatherLocationEntry.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
72
75
GWeatherLocationEntry implements
73
AtkImplementorIface, GtkBuildable, GtkEditable and GtkCellEditable.</p>
76
AtkImplementorIface, <a href="http://library.gnome.org/devel/gtk/GtkBuildable.html">GtkBuildable</a>, <a href="http://library.gnome.org/devel/gtk/GtkEditable.html">GtkEditable</a> and <a href="http://library.gnome.org/devel/gtk/GtkCellEditable.html">GtkCellEditable</a>.</p>
75
78
<div class="refsect1">
76
79
<a name="GWeatherLocationEntry.properties"></a><h2>Properties</h2>
90
93
<a name="GWeatherLocationEntry-struct"></a><h3>GWeatherLocationEntry</h3>
91
94
<pre class="programlisting">typedef struct _GWeatherLocationEntry GWeatherLocationEntry;</pre>
93
A subclass of <span class="type">GtkEntry</span> that provides autocompletion on
96
A subclass of <a href="http://library.gnome.org/devel/gtk/GtkEntry.html"><span class="type">GtkEntry</span></a> that provides autocompletion on
94
97
<a class="link" href="libgweather-gweather-location.html#GWeatherLocation" title="GWeatherLocation"><span class="type">GWeatherLocation</span></a>s
98
101
<div class="refsect2">
102
<a name="GWeatherLocationEntryClass"></a><h3>GWeatherLocationEntryClass</h3>
103
<pre class="programlisting">typedef struct {
104
GtkEntryClass parent_class;
105
} GWeatherLocationEntryClass;
111
<div class="refsect2">
99
112
<a name="gweather-location-entry-new"></a><h3>gweather_location_entry_new ()</h3>
100
<pre class="programlisting"><span class="returnvalue">GtkWidget</span> * gweather_location_entry_new (<em class="parameter"><code><a class="link" href="libgweather-gweather-location.html#GWeatherLocation" title="GWeatherLocation"><span class="type">GWeatherLocation</span></a> *top</code></em>);</pre>
113
<pre class="programlisting"><a href="http://library.gnome.org/devel/gtk/GtkWidget.html"><span class="returnvalue">GtkWidget</span></a> * gweather_location_entry_new (<em class="parameter"><code><a class="link" href="libgweather-gweather-location.html#GWeatherLocation" title="GWeatherLocation"><span class="type">GWeatherLocation</span></a> *top</code></em>);</pre>
102
115
Creates a new <a class="link" href="GWeatherLocationEntry.html" title="GWeatherLocationEntry"><span class="type">GWeatherLocationEntry</span></a>.
113
126
<td><p><span class="term"><em class="parameter"><code>top</code></em> :</span></p></td>
114
<td>the top-level location for the entry.
127
<td>the top-level location for the entry.</td>
118
130
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
119
<td> the new <a class="link" href="GWeatherLocationEntry.html" title="GWeatherLocationEntry"><span class="type">GWeatherLocationEntry</span></a>
131
<td>the new <a class="link" href="GWeatherLocationEntry.html" title="GWeatherLocationEntry"><span class="type">GWeatherLocationEntry</span></a>
144
156
<td><p><span class="term"><em class="parameter"><code>loc</code></em> :</span></p></td>
145
<td> a <a class="link" href="libgweather-gweather-location.html#GWeatherLocation" title="GWeatherLocation"><span class="type">GWeatherLocation</span></a> in <em class="parameter"><code>entry</code></em>, or <a href="/gnome/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a> to
146
clear <em class="parameter"><code>entry</code></em>. <span class="annotation">[<a href="http://foldoc.org/allow-none"><span class="acronym">allow-none</span></a>]</span>
157
<td>a <a class="link" href="libgweather-gweather-location.html#GWeatherLocation" title="GWeatherLocation"><span class="type">GWeatherLocation</span></a> in <em class="parameter"><code>entry</code></em>, or <a href="/gnome/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a> to
158
clear <em class="parameter"><code>entry</code></em>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
170
182
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
171
<td> the selected location
183
<td>the selected location
172
184
(which you must unref when you are done with it), or <a href="/gnome/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a> if no
173
location is selected. <span class="annotation">[<a href="http://foldoc.org/transfer%20full"><span class="acronym">transfer full</span></a>][<a href="http://foldoc.org/allow-none"><span class="acronym">allow-none</span></a>]</span>
185
location is selected. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>][<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
192
<div class="refsect2">
193
<a name="gweather-location-entry-has-custom-text"></a><h3>gweather_location_entry_has_custom_text ()</h3>
194
<pre class="programlisting"><span class="returnvalue">gboolean</span> gweather_location_entry_has_custom_text
195
(<em class="parameter"><code><a class="link" href="GWeatherLocationEntry.html" title="GWeatherLocationEntry"><span class="type">GWeatherLocationEntry</span></a> *entry</code></em>);</pre>
197
Checks whether or not <em class="parameter"><code>entry</code></em>'s text has been modified by the user.
198
Note that this does not mean that no location is associated with <em class="parameter"><code>entry</code></em>.
199
<a class="link" href="GWeatherLocationEntry.html#gweather-location-entry-get-location" title="gweather_location_entry_get_location ()"><code class="function">gweather_location_entry_get_location()</code></a> should be used for this.
201
<div class="variablelist"><table border="0">
202
<col align="left" valign="top">
205
<td><p><span class="term"><em class="parameter"><code>entry</code></em> :</span></p></td>
206
<td>a <a class="link" href="GWeatherLocationEntry.html" title="GWeatherLocationEntry"><span class="type">GWeatherLocationEntry</span></a>
210
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
212
<code class="literal">TRUE</code> if <em class="parameter"><code>entry</code></em>'s text was modified by the user, or <code class="literal">FALSE</code> if
213
it's set to the default text of a location.</td>
199
238
<td><p><span class="term"><em class="parameter"><code>city_name</code></em> :</span></p></td>
200
<td> the city name, or <a href="/gnome/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<a href="http://foldoc.org/allow-none"><span class="acronym">allow-none</span></a>]</span>
239
<td>the city name, or <a href="/gnome/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.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>
204
243
<td><p><span class="term"><em class="parameter"><code>code</code></em> :</span></p></td>
205
<td>the METAR station code
244
<td>the METAR station code</td>
209
247
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
210
<td> <code class="literal">TRUE</code> if <em class="parameter"><code>entry</code></em>'s location could be set to a matching city,
211
<code class="literal">FALSE</code> otherwise.
249
<code class="literal">TRUE</code> if <em class="parameter"><code>entry</code></em>'s location could be set to a matching city,
250
<code class="literal">FALSE</code> otherwise.</td>