GLib.Variant – glib-2.0 Reference Manual
Packages
glib-2.0
GLib
Variant
Class
is_object_path
is_signature
new_from_data
parse
Variant
Variant.array
Variant.boolean
Variant.byte
Variant.bytestring
Variant.bytestring_array
Variant.dict_entry
Variant.double
Variant.fixed_array
Variant.handle
Variant.int16
Variant.int32
Variant.int64
Variant.maybe
Variant.object_path
Variant.parsed
Variant.signature
Variant.string
Variant.strv
Variant.tuple
Variant.uint16
Variant.uint32
Variant.uint64
Variant.va
Variant.variant
@get
byteswap
classify
compare
dup_bytestring
dup_bytestring_array
dup_string
dup_strv
equal
get_boolean
get_byte
get_bytestring
get_bytestring_array
get_child
get_child_value
get_data
get_double
get_handle
get_int16
get_int32
get_int64
get_maybe
get_normal_form
get_size
get_string
get_strv
get_type
get_type_string
get_uint16
get_uint32
get_uint64
get_va
get_variant
hash
is_container
is_floating
is_normal_form
is_of_type
iterator
lookup
lookup_value
n_children
print
print_string
store
Variant
Object Hierarchy:
Description:
[
Compact
]
public
class
Variant
Namespace:
GLib
Package:
glib-2.0
Content:
Enums:
Class
-
Static methods:
public
static
bool
is_object_path
(
string
object_path)
public
static
bool
is_signature
(
string
signature)
public
static
Variant
new_from_data
<
T
> (
VariantType
type,
uchar
[] data,
bool
trusted,
owned
T
owner =
null
)
public
static
Variant
parse
(
VariantType
? type,
string
text,
char
* limit =
null
,
char
** endptr =
null
)
throws
VariantParseError
Creation methods:
public
Variant.boolean
(
bool
value)
public
Variant.byte
(
uchar
value)
public
Variant.int16
(
int16
value)
public
Variant.uint16
(
uint16
value)
public
Variant.int32
(
int32
value)
public
Variant.uint32
(
uint32
value)
public
Variant.int64
(
int64
value)
public
Variant.uint64
(
uint64
value)
public
Variant.handle
(
int32
value)
public
Variant.double
(
double
value)
public
Variant.string
(
string
value)
public
Variant.bytestring
(
string
value)
public
Variant.object_path
(
string
object_path)
public
Variant.signature
(
string
signature)
public
Variant.strv
(
string
[] value)
public
Variant.bytestring_array
(
string
[] value)
public
Variant
(
string
format, ...)
public
Variant.va
(
string
format,
char
** end_ptr,
va_list
* app)
public
Variant.variant
(
Variant
value)
public
Variant.maybe
(
VariantType
? child_type,
Variant
? child)
public
Variant.array
(
VariantType
? child_type,
Variant
[] children)
public
Variant.fixed_array
(
VariantType
? element_type,
Variant
[] elements,
size_t
element_size)
public
Variant.tuple
(
Variant
[] children)
public
Variant.dict_entry
(
Variant
key,
Variant
value)
public
Variant.parsed
(
string
format_string, ...)
Methods:
public
unowned
VariantType
get_type
()
public
unowned
string
get_type_string
()
public
bool
is_of_type
(
VariantType
type)
public
bool
is_container
()
public
bool
is_floating
()
public
Class
classify
()
public
int
compare
(
Variant
other)
public
bool
get_boolean
()
public
uint8
get_byte
()
public
int16
get_int16
()
public
uint16
get_uint16
()
public
int32
get_int32
()
public
uint32
get_uint32
()
public
int64
get_int64
()
public
uint64
get_uint64
()
public
int32
get_handle
()
public
double
get_double
()
public
unowned
string
get_string
(
out
size_t
length =
null
)
public
string
dup_string
(
out
size_t
length =
null
)
public
unowned
string
get_bytestring
()
public
string
dup_bytestring
(
out
size_t
length)
public
unowned
string
*[]
get_strv
()
public
string
[]
dup_strv
()
public
unowned
string
*[]
get_bytestring_array
()
public
string
[]
dup_bytestring_array
()
public
void
@get
(
string
format, ...)
public
void
get_va
(
string
format,
char
** end_ptr,
va_list
* app)
public
Variant
get_variant
()
public
Variant
?
get_maybe
()
public
size_t
n_children
()
public
Variant
get_child_value
(
size_t
index)
public
void
get_child
(
size_t
index,
string
format_string, ...)
public
Variant
?
lookup_value
(
string
key,
VariantType
? expected_type)
public
bool
lookup
(
string
key,
string
format_string, ...)
public
size_t
get_size
()
public
void
*
get_data
()
public
void
store
(
void
* data)
public
string
print
(
bool
type_annotate)
public
StringBuilder
print_string
(
StringBuilder
? builder,
bool
type_annotate)
public
uint
hash
()
public
bool
equal
(
Variant
other)
public
Variant
byteswap
()
public
Variant
get_normal_form
()
public
bool
is_normal_form
()
public
VariantIter
iterator
()