![]() |
![]() |
![]() |
libmateweather Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Implemented Interfaces | Properties |
MateWeatherLocationEntry; GtkWidget * mateweather_location_entry_new (MateWeatherLocation *top
); void mateweather_location_entry_set_location (MateWeatherLocationEntry *entry
,MateWeatherLocation *loc
); MateWeatherLocation * mateweather_location_entry_get_location (MateWeatherLocationEntry *entry
); gboolean mateweather_location_entry_set_city (MateWeatherLocationEntry *entry
,const char *city_name
,const char *code
);
GObject +----GInitiallyUnowned +----GtkObject +----GtkWidget +----GtkEntry +----MateWeatherLocationEntry
MateWeatherLocationEntry implements AtkImplementorIface, GtkBuildable, GtkEditable and GtkCellEditable.
typedef struct _MateWeatherLocationEntry MateWeatherLocationEntry;
A subclass of GtkEntry that provides autocompletion on MateWeatherLocations
GtkWidget * mateweather_location_entry_new (MateWeatherLocation *top
);
Creates a new MateWeatherLocationEntry.
top
will normally be a location returned from
mateweather_location_new_world()
, but you can create an entry that
only accepts a smaller set of locations if you want.
|
the top-level location for the entry. |
Returns : |
the new MateWeatherLocationEntry |
void mateweather_location_entry_set_location (MateWeatherLocationEntry *entry
,MateWeatherLocation *loc
);
Sets entry
's location to loc
, and updates the text of the
entry accordingly.
|
a MateWeatherLocationEntry |
|
allow-none. allow-none. |
MateWeatherLocation * mateweather_location_entry_get_location
(MateWeatherLocationEntry *entry
);
Gets the location that was set by a previous call to
mateweather_location_entry_set_location()
or was selected by the user.
|
a MateWeatherLocationEntry |
Returns : |
transfer full) (allow-none. transfer full. allow-none. |
gboolean mateweather_location_entry_set_city (MateWeatherLocationEntry *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
.
|
a MateWeatherLocationEntry |
|
the city name, or NULL . allow-none. |
|
the METAR station code |
Returns : |
TRUE if entry 's location could be set to a matching city,
FALSE otherwise.
|