VariantBuilder

constructor(type: VariantType)(source)

Allocates and initialises a new #GVariantBuilder.

You should call g_variant_builder_unref() on the return value when it is no longer needed. The memory will not be automatically freed by any other call.

In most cases it is easier to place a #GVariantBuilder directly on the stack of the calling function and initialise it with g_variant_builder_init().

Return

a #GVariantBuilder

Since

2.24

Parameters

type

a container type


constructor()(source)

Allocate a new VariantBuilder.

This instance will be allocated on the native heap and automatically freed when this class instance is garbage collected.


constructor(scope: <Error class: unknown class>)(source)

Allocate a new VariantBuilder using the provided AutofreeScope.

The AutofreeScope manages the allocation lifetime. The most common usage is with memScoped.

Parameters

scope

The AutofreeScope to allocate this structure in.


constructor(partialMagic: <Error class: unknown class>, type: VariantType?)(source)

Allocate a new VariantBuilder.

This instance will be allocated on the native heap and automatically freed when this class instance is garbage collected.

Parameters

partialMagic
type

constructor(partialMagic: <Error class: unknown class>, type: VariantType?, scope: <Error class: unknown class>)(source)

Allocate a new VariantBuilder using the provided AutofreeScope.

The AutofreeScope manages the allocation lifetime. The most common usage is with memScoped.

Parameters

partialMagic
type
scope

The AutofreeScope to allocate this structure in.


constructor(glibVariantBuilderPointer: <Error class: unknown class><<Error class: unknown class>>)(source)