VariantBuilder

class VariantBuilder(pointer: <Error class: unknown class><<Error class: unknown class>>) : ProxyInstance

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.

Skipped during bindings generation

  • method add: Varargs parameter is not supported

  • method add_parsed: Varargs parameter is not supported

  • field x: guintptr

  • field y: guintptr

Constructors

Link copied to clipboard
constructor(pointer: <Error class: unknown class><<Error class: unknown class>>)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val glibVariantBuilderPointer: <Error class: unknown class><<Error class: unknown class>>
Link copied to clipboard
open override val handle: <Error class: unknown class>?
Link copied to clipboard
var partialMagic: <Error class: unknown class>
Link copied to clipboard

Functions

Link copied to clipboard
fun addValue(value: Variant)

Adds @value to @builder.

Link copied to clipboard
fun clear()

Releases all memory associated with a #GVariantBuilder without freeing the #GVariantBuilder structure itself.

Link copied to clipboard
fun close()

Closes the subcontainer inside the given @builder that was opened by the most recent call to g_variant_builder_open().

Link copied to clipboard
fun end(): Variant

Ends the builder process and returns the constructed value.

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean

Compare two proxy instances for equality. This will compare both the type of the instances, and their memory addresses.

Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
fun init(type: VariantType)

Initialises a #GVariantBuilder structure.

Link copied to clipboard
fun open(type: VariantType)

Opens a subcontainer inside the given @builder. When done adding items to the subcontainer, g_variant_builder_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.

Link copied to clipboard

Increases the reference count on @builder.

Link copied to clipboard
open override fun toString(): String
Link copied to clipboard
fun unref()

Decreases the reference count on @builder.