## MateWeatherLocationEntry

MateWeatherLocationEntry

## Functions

GtkWidget * | mateweather_location_entry_new ()
void | mateweather_location_entry_set_location ()
MateWeatherLocation * | mateweather_location_entry_get_location ()
gboolean | mateweather_location_entry_set_city ()

## Properties

gpointer | location | Read / Write
gpointer | top | Write / Construct Only

## Types and Values

| MateWeatherLocationEntry

## Object Hierarchy

        GObject
        ╰── GInitiallyUnowned
            ╰── GtkWidget
                ╰── GtkEntry
                    ╰── MateWeatherLocationEntry

## Implemented Interfaces

MateWeatherLocationEntry implements AtkImplementorIface, GtkBuildable, GtkEditable and GtkCellEditable.

## Description

A subclass of GtkEntry that provides autocompletion on MateWeatherLocations

## Functions

### mateweather_location_entry_new ()

    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.

#### Parameters

top | the top-level location for the entry. |

#### Returns

the new MateWeatherLocationEntry

### mateweather_location_entry_set_location ()

    void
    mateweather_location_entry_set_location
                                   (MateWeatherLocationEntry *entry,
                                    MateWeatherLocation *loc);

Sets `entry` 's location to `loc` , and updates the text of the entry accordingly.

#### Parameters

entry | a MateWeatherLocationEntry |
loc | a MateWeatherLocation in `entry` , or `NULL` to clear `entry` . | [allow-none]

### mateweather_location_entry_get_location ()

    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.

#### Parameters

entry | a MateWeatherLocationEntry |

#### Returns

the selected location (which you must unref when you are done with it), or `NULL` if no location is selected.

[transfer full][allow-none]

### mateweather_location_entry_set_city ()

    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`.

#### Parameters

entry | a MateWeatherLocationEntry |
city_name | the city name, or `NULL`. | [allow-none]
code | the METAR station code |

#### Returns

`TRUE` if `entry` 's location could be set to a matching city, `FALSE` otherwise.

## Types and Values

### MateWeatherLocationEntry

    typedef struct _MateWeatherLocationEntry MateWeatherLocationEntry;

## Property Details

### The `“location”` property

      “location”                 gpointer

The selected MateWeatherLocation.

Flags: Read / Write

### The `“top”` property

      “top”                      gpointer

The MateWeatherLocation whose children will be used to fill in the entry.

Flags: Write / Construct Only