Gjsify LogoGjsify Logo

#GVariantIter is an opaque data structure and can only be accessed using the following functions.

record

Hierarchy

  • VariantIter

Index

Constructors

Properties

Methods

Constructors

Properties

name: string

Methods

  • free(): void
  • Frees a heap-allocated #GVariantIter. Only call this function on iterators that were returned by g_variant_iter_new() or g_variant_iter_copy().

    Returns void

  • nChildren(): number
  • Queries the number of child items in the container that we are iterating over. This is the total number of items -- not the number of items remaining.

    This function might be useful for preallocation of arrays.

    Returns number

  • Gets the next item in the container. If no more items remain then %NULL is returned.

    Use g_variant_unref() to drop your reference on the return value when you no longer need it.

    Here is an example for iterating with g_variant_iter_next_value():

      // recursively iterate a container
    void
    iterate_container_recursive (GVariant *container)
    {
    GVariantIter iter;
    GVariant *child;

    g_variant_iter_init (&iter, container);
    while ((child = g_variant_iter_next_value (&iter)))
    {
    g_print ("type '%s'\n", g_variant_get_type_string (child));

    if (g_variant_is_container (child))
    iterate_container_recursive (child);

    g_variant_unref (child);
    }
    }

    Returns GLib.Variant

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method