GLib.VariantType.first

### Method

# GLib VariantTypefirst

#### Declaration [src]

    const GVariantType*
    g_variant_type_first (
      const GVariantType* type
    )

#### Description [src]

Determines the first item type of a tuple or dictionary entry type.

This function may only be used with tuple or dictionary entry types, but must not be used with the generic tuple type `G_VARIANT_TYPE_TUPLE`.

In the case of a dictionary entry type, this returns the type of the key.

`NULL` is returned in case of `type` being `G_VARIANT_TYPE_UNIT`.

This call, together with `g_variant_type_next()` provides an iterator interface over tuple and dictionary entry types.

#### Return value

Type: `GVariantType`

The first item type of `type`, or `NULL` if the type has no item types Since 2.24.

The returned data is owned by the instance.
The return value can be `NULL`.