GIConstantInfo: libgirepository API Reference

## GIConstantInfo GIConstantInfo — Struct representing a constant |

## Functions

#define | GI_IS_CONSTANT_INFO()
void | g_constant_info_free_value ()
GITypeInfo * | g_constant_info_get_type ()
gint | g_constant_info_get_value ()

## Types and Values

typedef | GIConstantInfo

## Description

GIConstantInfo represents a constant. A constant has a type associated which can be obtained by calling `g_constant_info_get_type()` and a value, which can be obtained by calling `g_constant_info_get_value()`.

## Struct hierarchy

      GIBaseInfo
       +----GIConstantInfo

## Functions

### GI_IS_CONSTANT_INFO()

    #define             GI_IS_CONSTANT_INFO(info)

Checks if `info` is a GIConstantInfo.

#### Parameters

info | an info structure |

### g_constant_info_free_value ()

    void
    g_constant_info_free_value (GIConstantInfo *info,
                                GIArgument *value);

Free the value returned from `g_constant_info_get_value()`.

[skip]

#### Parameters

info | a GIConstantInfo |
value | the argument |

Since: 1.32

### g_constant_info_get_type ()

    GITypeInfo *
    g_constant_info_get_type (GIConstantInfo *info);

Obtain the type of the constant as a GITypeInfo.

#### Parameters

info | a GIConstantInfo |

#### Returns

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

[transfer full]

### g_constant_info_get_value ()

    gint
    g_constant_info_get_value (GIConstantInfo *info,
                               GIArgument *value);

Obtain the value associated with the GIConstantInfo and store it in the `value` parameter. `argument` needs to be allocated before passing it in. The size of the constant value stored in `argument` will be returned. Free the value with `g_constant_info_free_value()`.

[skip]

#### Parameters

info | a GIConstantInfo |
value | an argument. | [out]

#### Returns

size of the constant

## Types and Values

### GIConstantInfo

    typedef GIBaseInfo GIConstantInfo;

Represents a constant.