VariantBuilder

A utility type for constructing container-type #GVariant instances.

This is an opaque structure and may only be accessed using the following functions.

#GVariantBuilder is not threadsafe in any way. Do not attempt to access it from more than one thread.

Constructors

this
this(glib.variant_type.VariantType type)

Allocates and initialises a new #GVariantBuilder.

Members

Functions

addValue
void addValue(glib.variant.VariantG value)

Adds value to builder.

close
void close()

Closes the subcontainer inside the given builder that was opened by the most recent call to glib.variant_builder.VariantBuilder.open.

end
glib.variant.VariantG end()

Ends the builder process and returns the constructed value.

open
void open(glib.variant_type.VariantType type)

Opens a subcontainer inside the given builder. When done adding items to the subcontainer, glib.variant_builder.VariantBuilder.close must be called. type is the type of the container: so to build a tuple of several values, type must include the tuple itself.

Inherited Members

From Boxed

cInstancePtr
void* cInstancePtr;

Pointer to the C boxed value

getType
GType getType()

Get the GType of this boxed type.

gType
GType gType [@property getter]

Boxed GType property.

self
Boxed self()

Convenience method to return this cast to a type. For use in D with statements.

copy_
void* copy_()

Make a copy of the wrapped C boxed data.

boxedCopy
void* boxedCopy(void* cBoxed)

Copy a C boxed value using g_boxed_copy.

boxedFree
void boxedFree(void* cBoxed)

Free a C boxed value using g_boxed_free.