GLib.EnumClass – gobject-2.0 Reference Manual
Packages
gobject-2.0
GLib
EnumClass
complete_type_info
register_static
to_string
get_value
get_value_by_name
get_value_by_nick
maximum
minimum
n_values
values
EnumClass
Object Hierarchy:
Description:
[
CCode
( has_type_id =
false
, lower_case_csuffix =
"enum"
) ]
public
class
EnumClass
:
TypeClass
The class of an enumeration type holds information about its possible values.
Namespace:
GLib
Package:
gobject-2.0
Content:
Static methods:
public
static
void
complete_type_info
(
Type
g_enum_type,
out
TypeInfo
info,
EnumValue
[] const_values)
This function is meant to be called from the `complete_type_info` function of a
TypePlugin
implementation, as in the following example:
public
static
Type
register_static
(
string
name,
EnumValue
[] const_static_values)
Registers a new static enumeration type with the name
name
.
public
static
string
to_string
(
Type
g_enum_type,
int
value)
Methods:
public
unowned
EnumValue
?
get_value
(
int
value)
Returns the
EnumValue
for a value.
public
unowned
EnumValue
?
get_value_by_name
(
string
name)
Looks up a
EnumValue
by name.
public
unowned
EnumValue
?
get_value_by_nick
(
string
nick)
Looks up a
EnumValue
by nickname.
Fields:
public
int
maximum
public
int
minimum
public
uint
n_values
public
unowned
EnumValue
[]
values
Inherited Members:
All known members inherited from class GLib.TypeClass
add_private
adjust_private_offset
get_instance_private_offset
get_type
peek
peek_parent