GLib.FlagsClass – gobject-2.0 Reference Manual
Packages
gobject-2.0
GLib
FlagsClass
complete_type_info
register_static
to_string
get_first_value
get_value_by_name
get_value_by_nick
mask
n_values
values
FlagsClass
Object Hierarchy:
Description:
[
CCode
( has_type_id =
false
, lower_case_csuffix =
"flags"
) ]
public
class
FlagsClass
:
TypeClass
The class of a flags type holds information about its possible values.
Namespace:
GLib
Package:
gobject-2.0
Content:
Static methods:
public
static
void
complete_type_info
(
Type
g_flags_type,
out
TypeInfo
info,
FlagsValue
[] const_values)
This function is meant to be called from the
complete_type_info
function of a
TypePlugin
implementation, see the example for
complete_type_info
above.
public
static
Type
register_static
(
string
name,
FlagsValue
[] const_static_values)
Registers a new static flags type with the name
name
.
public
static
string
to_string
(
Type
flags_type,
uint
value)
Methods:
public
unowned
FlagsValue
?
get_first_value
(
uint
value)
Returns the first
FlagsValue
which is set in
value
.
public
unowned
FlagsValue
?
get_value_by_name
(
string
name)
Looks up a
FlagsValue
by name.
public
unowned
FlagsValue
?
get_value_by_nick
(
string
nick)
Looks up a
FlagsValue
by nickname.
Fields:
public
uint
mask
public
uint
n_values
public
unowned
FlagsValue
[]
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