G_TYPE_IS_ENUM: : a GType ID.
Checks whether "is a" G_TYPE_ENUM.
Returns: TRUE if "is a" G_TYPE_ENUM.
G_TYPE_IS_FLAGS: : a GType ID.
Checks whether "is a" G_TYPE_FLAGS.
Returns: TRUE if "is a" G_TYPE_FLAGS.
typedef struct _GEnumClass | GEnumClass |
typedef struct _GFlagsClass | GFlagsClass |
typedef struct _GEnumValue | GEnumValue |
typedef struct _GFlagsValue | GFlagsValue |
IMPORT_C GEnumValue * | g_enum_get_value | ( | GEnumClass * | enum_class, |
gint | value | |||
) |
g_enum_get_value: : a GEnumClass : the value to look up
Returns the GEnumValue for a value.
Returns: the GEnumValue for , or NULL if is not a member of the enumeration
IMPORT_C GEnumValue * | g_enum_get_value_by_name | ( | GEnumClass * | enum_class, |
const gchar * | name | |||
) |
IMPORT_C GEnumValue * | g_enum_get_value_by_nick | ( | GEnumClass * | enum_class, |
const gchar * | nick | |||
) |
g_enum_get_value_by_nick: : a GEnumClass : the nickname to look up
Looks up a GEnumValue by nickname.
Returns: the GEnumValue with nickname , or NULL if the enumeration doesn't have a member with that nickname
IMPORT_C GFlagsValue * | g_flags_get_first_value | ( | GFlagsClass * | flags_class, |
guint | value | |||
) |
g_flags_get_first_value: : a GFlagsClass : the value
Returns the first GFlagsValue which is set in .
Returns: the first GFlagsValue which is set in , or NULL if none is set
IMPORT_C GFlagsValue * | g_flags_get_value_by_name | ( | GFlagsClass * | flags_class, |
const gchar * | name | |||
) |
IMPORT_C GFlagsValue * | g_flags_get_value_by_nick | ( | GFlagsClass * | flags_class, |
const gchar * | nick | |||
) |
g_flags_get_value_by_nick: : a GFlagsClass : the nickname to look up
Looks up a GFlagsValue by nickname.
Returns: the GFlagsValue with nickname , or NULL if there is no flag with that nickname
g_value_set_enum: : a valid GValue whose type is derived from G_TYPE_ENUM : enum value to be set
Set the contents of a G_TYPE_ENUM GValue to .
g_value_get_enum: : a valid GValue whose type is derived from G_TYPE_ENUM
Get the contents of a G_TYPE_ENUM GValue.
Returns: enum contents of
g_value_set_flags: : a valid GValue whose type is derived from G_TYPE_FLAGS : flags value to be set
Set the contents of a G_TYPE_FLAGS GValue to .
g_value_get_flags: : a valid GValue whose type is derived from G_TYPE_FLAGS
Get the contents of a G_TYPE_FLAGS GValue.
Returns: flags contents of
IMPORT_C GType | g_enum_register_static | ( | const gchar * | name, |
const GEnumValue * | const_static_values | |||
) |
IMPORT_C GType | g_flags_register_static | ( | const gchar * | name, |
const GFlagsValue * | const_static_values | |||
) |
IMPORT_C void | g_enum_complete_type_info | ( | GType | g_enum_type, |
GTypeInfo * | info, | |||
const GEnumValue * | const_values | |||
) |
g_enum_complete_type_info: : the type identifier of the type being completed : the GTypeInfo struct to be filled in : An array of GEnumValue structs for the possible enumeration values. The array is terminated by a struct with all members being 0.
This function is meant to be called from the complete_type_info() function of a GTypePlugin implementation, as in the following example:
|[ static void my_enum_complete_type_info (GTypePlugin *plugin, GType g_type, GTypeInfo *info, GTypeValueTable *value_table) { static const GEnumValue values[] = { { MY_ENUM_FOO, "MY_ENUM_FOO", "foo" }, { MY_ENUM_BAR, "MY_ENUM_BAR", "bar" }, { 0, NULL, NULL } };
g_enum_complete_type_info (type, info, values); } ]|
IMPORT_C void | g_flags_complete_type_info | ( | GType | g_flags_type, |
GTypeInfo * | info, | |||
const GFlagsValue * | const_values | |||
) |
g_flags_complete_type_info: : the type identifier of the type being completed : the GTypeInfo struct to be filled in : An array of GFlagsValue structs for the possible enumeration values. The array is terminated by a struct with all members being 0.
This function is meant to be called from the complete_type_info() function of a GTypePlugin implementation, see the example for g_enum_complete_type_info() above.