## GIEnumInfo GIEnumInfo — Structs representing an enumeration and its values |

## Functions

#define | GI_IS_ENUM_INFO()
#define | GI_IS_VALUE_INFO()
gint | g_enum_info_get_n_values ()
GIValueInfo * | g_enum_info_get_value ()
gint | g_enum_info_get_n_methods ()
GIFunctionInfo * | g_enum_info_get_method ()
GITypeTag | g_enum_info_get_storage_type ()
const gchar * | g_enum_info_get_error_domain ()
gint64 | g_value_info_get_value ()

## Types and Values

typedef | GIEnumInfo

## Description

A GIEnumInfo represents an enumeration and a GIValueInfo struct represents a value of an enumeration. The GIEnumInfo contains a set of values and a type The GIValueInfo is fetched by calling `g_enum_info_get_value()` on a GIEnumInfo.

## Struct hierarchy

      GIBaseInfo
       +----GIRegisteredTypeInfo
             +----GIEnumInfo

## Functions

### GI_IS_ENUM_INFO()

    #define             GI_IS_ENUM_INFO(info)

Checks if `info` is a GIEnumInfo.

#### Parameters

info | an info structure |

### GI_IS_VALUE_INFO()

    #define             GI_IS_VALUE_INFO(info)

Checks if `info` is a GIValueInfo.

#### Parameters

info | an info structure |

### g_enum_info_get_n_values ()

    gint
    g_enum_info_get_n_values (GIEnumInfo *info);

Obtain the number of values this enumeration contains.

#### Parameters

info | a GIEnumInfo |

#### Returns

the number of enumeration values

### g_enum_info_get_value ()

    GIValueInfo *
    g_enum_info_get_value (GIEnumInfo *info,
                           gint n);

Obtain a value for this enumeration.

#### Parameters

info | a GIEnumInfo |
n | index of value to fetch |

#### Returns

the enumeration value or `NULL` if type tag is wrong, free the struct with `g_base_info_unref()` when done.

[transfer full]

### g_enum_info_get_n_methods ()

    gint
    g_enum_info_get_n_methods (GIEnumInfo *info);

Obtain the number of methods that this enum type has.

#### Parameters

info | a GIEnumInfo |

#### Returns

number of methods

Since: 1.29.17

### g_enum_info_get_method ()

    GIFunctionInfo *
    g_enum_info_get_method (GIEnumInfo *info,
                            gint n);

Obtain an enum type method at index `n` .

#### Parameters

info | a GIEnumInfo |
n | index of method to get |

#### Returns

the GIFunctionInfo. Free the struct by calling `g_base_info_unref()` when done.

[transfer full]

Since: 1.29.17

### g_enum_info_get_storage_type ()

    GITypeTag
    g_enum_info_get_storage_type (GIEnumInfo *info);

Obtain the tag of the type used for the enum in the C ABI. This will will be a signed or unsigned integral type.

Note that in the current implementation the width of the type is computed correctly, but the signed or unsigned nature of the type may not match the sign of the type used by the C compiler.

#### Parameters

info | a GIEnumInfo |

#### Returns

the storage type for the enumeration

### g_enum_info_get_error_domain ()

    const gchar *
    g_enum_info_get_error_domain (GIEnumInfo *info);

Obtain the string form of the quark for the error domain associated with this enum, if any.

#### Parameters

info | a GIEnumInfo |

#### Returns

the string form of the error domain associated with this enum, or `NULL`.

[transfer none]

Since: 1.29.17

### g_value_info_get_value ()

    gint64
    g_value_info_get_value (GIValueInfo *info);

Obtain the enumeration value of the GIValueInfo.

#### Parameters

info | a GIValueInfo |

#### Returns

the enumeration value. This will always be representable as a 32-bit signed or unsigned value. The use of gint64 as the return type is to allow both.

## Types and Values

### GIEnumInfo

    typedef GIBaseInfo GIEnumInfo;

Represents an enum or a flag.