Variant.this
- this(GVariant* gVariant, bool ownedRef)
- this(VariantType childType, Variant[] children)
- this(bool value)
- this(ubyte value)
- this(Variant key, Variant value)
- this(double value)
- this(VariantType elementType, void* elements, size_t nElements, size_t elementSize)
- this(VariantType type, Bytes bytes, bool trusted)
- this(VariantType type, ubyte[] data, bool trusted, GDestroyNotify notify, void* userData)
- this(short value)
- this(int value)
- this(long value)
- this(VariantType childType, Variant child)
- this(string format, void** app)
- this(string string_)
- this(string[] strv)
- this(Variant[] children)
- this(ushort value)
- this(uint value)
- this(ulong value)
- this(string formatString, string[] endptr, void** app)
- this(Variant value)
glib Variant Variant
constructorsfunctionsstatic functionsvariables
Parses format and returns the result.
This is the version of Variant.newParsed intended to be used from libraries.
The return value will be floating if it was a newly created GVariant instance. In the case that format simply specified the collection of a glib.Variant pointer (eg: format was "%*") then the collected glib.Variant pointer will be returned unmodified, without adding any additional references.
Note that the arguments in app must be of the correct width for their types specified in format when collected into the va_list See the [GVariant varargs documentation][gvariant-varargs].
In order to behave correctly in all cases it is necessary for the calling function to Variant.refSink the return result before returning control to the user that originally provided the pointer. At this point, the caller will have their own full reference to the result. This can also be done by adding the result to a container, or by passing it to another Variant.new call.