| Top |
GObject
╰── GInitiallyUnowned
╰── GtkWidget
╰── GtkEntry
╰── GtkSearchEntry
╰── GWeatherLocationEntry
GWeatherLocationEntry implements AtkImplementorIface, GtkBuildable, GtkEditable and GtkCellEditable.
GtkWidget *
gweather_location_entry_new (GWeatherLocation *top);
Creates a new GWeatherLocationEntry.
top
will normally be the location returned from
gweather_location_get_world(), but you can create an entry that
only accepts a smaller set of locations if you want.
void gweather_location_entry_set_location (GWeatherLocationEntry *entry,GWeatherLocation *loc);
Sets entry
's location to loc
, and updates the text of the
entry accordingly.
Note that if the database contains a location that compares
equal to loc
, that will be chosen in place of loc
.
GWeatherLocation *
gweather_location_entry_get_location (GWeatherLocationEntry *entry);
Gets the location that was set by a previous call to
gweather_location_entry_set_location() or was selected by the user.
gboolean
gweather_location_entry_has_custom_text
(GWeatherLocationEntry *entry);
Checks whether or not entry
's text has been modified by the user.
Note that this does not mean that no location is associated with entry
.
gweather_location_entry_get_location() should be used for this.
gboolean gweather_location_entry_set_city (GWeatherLocationEntry *entry,const char *city_name,const char *code);
Sets entry
's location to a city with the given code
, and given
city_name
, if non-NULL. If there is no matching city, sets
entry
's location to NULL.
“location” property“location” GWeatherLocation *
The selected GWeatherLocation.
Flags: Read / Write
“top” property“top” GWeatherLocation *
The GWeatherLocation whose children will be used to fill in the entry.
Flags: Write / Construct Only