Class: Gio::MenuAttributeIter

Inherits:
Object
  • Object
show all
Defined in:
(unknown)

Instance Method Summary collapse

Instance Method Details

#get_next(out_name, value) ⇒ TrueClass

This function combines g_menu_attribute_iter_next() with g_menu_attribute_iter_get_name() and g_menu_attribute_iter_get_value().

First the iterator is advanced to the next (possibly first) attribute. If that fails, then false is returned and there are no other effects.

If successful, name and value are set to the name and value of the attribute that has just been advanced to. At this point, g_menu_attribute_iter_get_name() and g_menu_attribute_iter_get_value() will return the same values again.

The value returned in name remains valid for as long as the iterator remains at the current position. The value returned in value must be unreffed using g_variant_unref() when it is no longer in use.

Parameters:

  • out_name (String)

    the type of the attribute

  • value (GLib::Variant)

    the attribute value

Returns:

  • (TrueClass)

    true on success, or false if there is no additional attribute

#nameString

Gets the name of the attribute at the current iterator position, as a string.

The iterator is not advanced.

Returns:

  • (String)

    the name of the attribute

#nextTrueClass

Attempts to advance the iterator to the next (possibly first) attribute.

true is returned on success, or false if there are no more attributes.

You must call this function when you first acquire the iterator to advance it to the first attribute (and determine if the first attribute exists at all).

Returns:

  • (TrueClass)

    true on success, or false when there are no more attributes

#valueGLib::Variant

Gets the value of the attribute at the current iterator position.

The iterator is not advanced.

Returns:

  • (GLib::Variant)

    the value of the current attribute