Variant
Creates a new boolean #GVariant instance -- either true or false.
Return
a floating reference to a new boolean #GVariant instance
Since
2.24
Parameters
a #gboolean value
Creates a new byte #GVariant instance.
Return
a floating reference to a new byte #GVariant instance
Since
2.24
Parameters
a #guint8 value
Constructs an array of object paths #GVariant from the given array of strings.
Each string must be a valid #GVariant object path; see g_variant_is_object_path().
If @length is -1 then @strv is null-terminated.
Return
a new floating #GVariant instance
Since
2.30
Parameters
an array of strings
the length of @strv, or -1
Creates a new dictionary entry #GVariant. @key and @value must be non-null. @key must be a value of a basic type (ie: not a container).
If the @key or @value are floating references (see g_variant_ref_sink()), the new instance takes ownership of them as if via g_variant_ref_sink().
Return
a floating reference to a new dictionary entry #GVariant
Since
2.24
Parameters
a basic #GVariant, the key
a #GVariant, the value
Creates a new double #GVariant instance.
Return
a floating reference to a new double #GVariant instance
Since
2.24
Parameters
a #gdouble floating point value
Constructs a new array #GVariant instance, where the elements are of @element_type type.
Return
a floating reference to a new array #GVariant instance
Since
2.32
Parameters
the #GVariantType of each element
a pointer to the fixed array of contiguous elements
the number of elements
the size of each element
Constructs a new serialized-mode #GVariant instance. This is the inner interface for creation of new serialized values that gets called from various functions in gvariant.c.
A reference is taken on @bytes.
The data in @bytes must be aligned appropriately for the @type being loaded. Otherwise this function will internally create a copy of the memory (since GLib 2.60) or (in older versions) fail and exit the process.
Return
a new #GVariant with a floating reference
Since
2.36
Parameters
a #GVariantType
a #GBytes
if the contents of @bytes are trusted
Creates a new int32 #GVariant instance.
Return
a floating reference to a new int32 #GVariant instance
Since
2.24
Parameters
a #gint32 value
Creates a new int16 #GVariant instance.
Return
a floating reference to a new int16 #GVariant instance
Since
2.24
Parameters
a #gint16 value
Creates a new int64 #GVariant instance.
Return
a floating reference to a new int64 #GVariant instance
Since
2.24
Parameters
a #gint64 value
Depending on if @child is null, either wraps @child inside of a maybe container or creates a Nothing instance for the given @type.
At least one of @child_type and @child must be non-null. If @child_type is non-null then it must be a definite type. If they are both non-null then @child_type must be the type of @child.
If @child is a floating reference (see g_variant_ref_sink()), the new instance takes ownership of @child.
Return
a floating reference to a new #GVariant maybe instance
Since
2.24
Parameters
the #GVariantType of the child, or null
the child value, or null
Creates a string #GVariant with the contents of @string.
Return
a floating reference to a new string #GVariant instance
Since
2.24
Parameters
a normal UTF-8 nul-terminated string
Creates a new uint16 #GVariant instance.
Return
a floating reference to a new uint16 #GVariant instance
Since
2.24
Parameters
a #guint16 value
Creates a new uint32 #GVariant instance.
Return
a floating reference to a new uint32 #GVariant instance
Since
2.24
Parameters
a #guint32 value
Creates a new uint64 #GVariant instance.
Return
a floating reference to a new uint64 #GVariant instance
Since
2.24
Parameters
a #guint64 value
Boxes @value. The result is a #GVariant instance representing a variant containing the original value.
If @child is a floating reference (see g_variant_ref_sink()), the new instance takes ownership of @child.
Return
a floating reference to a new variant #GVariant instance
Since
2.24
Parameters
a #GVariant instance