## GalagoKeyValue GalagoKeyValue — Key/value pair. |

## Synopsis

    GalagoKeyValue* galago_key_value_new        (const char *key,
                                                 GValue *value);
    void        galago_key_value_destroy        (GalagoKeyValue *key_value);
    void        galago_key_value_set_key        (GalagoKeyValue *key_value,
                                                 const char *key);
    const char* galago_key_value_get_key        (const GalagoKeyValue *key_value);
    void        galago_key_value_set_value      (GalagoKeyValue *key_value,
                                                 GValue *value);
    const GValue* galago_key_value_get_value    (const GalagoKeyValue *key_value);

## Description

GalagoKeyValue is a key/value pair, returned in some lists. It uses a string for a key and a GValue for the value type. As such, it can hold any value that has a GType.

## Details

### galago_key_value_new ()

    GalagoKeyValue* galago_key_value_new        (const char *key,
                                                 GValue *value);

Allocates a key/value pair. The GalagoKeyValue will take ownership of `value`.

`key` : | The key.
`value` : | The value.
Returns : | The new key/value pair.

### galago_key_value_destroy ()

    void        galago_key_value_destroy        (GalagoKeyValue *key_value);

Deallocates a GalagoKeyValue. This will free the contained key and value and the structure itself.

`key_value` : | The GalagoKeyValue to destroy.

### galago_key_value_set_key ()

    void        galago_key_value_set_key        (GalagoKeyValue *key_value,
                                                 const char *key);

Sets a new key on a GalagoKeyValue.

`key_value` : | The GalagoKeyValue.
`key` : | The new key.

### galago_key_value_get_key ()

    const char* galago_key_value_get_key        (const GalagoKeyValue *key_value);

Gets the key belonging to a GalagoKeyValue.

`key_value` : | The GalagoKeyValue.
Returns : | A GalagoKeyValue's key.

### galago_key_value_set_value ()

    void        galago_key_value_set_value      (GalagoKeyValue *key_value,
                                                 GValue *value);

Sets the new value on a GalagoKeyValue. This will destroy the old value set. The GalagoKeyValue will take ownership of the new value.

`key_value` : | The GalagoKeyValue.
`value` : | The new value.

### galago_key_value_get_value ()

    const GValue* galago_key_value_get_value    (const GalagoKeyValue *key_value);

Gets the value belonging to a GalagoKeyValue.

`key_value` : | The GalagoKeyValue.
Returns : | A GalagoKeyValue's value.