About my projects, examples and tutorials
Gnome::Gio::MenuAttributeIter

Gnome::Gio::MenuAttributeIter

Description§

Gnome::Gio::MenuAttributeIter is an opaque structure type. You must access it using the functions below.

Uml Diagram§

UNKNOWN image§

=for image :class<inline> :src<asset_files/images/plantuml/MenuAttributeIter.png> :width<70\%>

Class initialization§

new§

:native-object§

Create an object using a native object from an object of the same type found elsewhere. See also Gnome::N::TopLevelSupportClass.

multi method new ( N-Object() :$native-object! )
Code

Methods§

get-name§

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

The iterator is not advanced.

method get-name (--> Str )
Code

Return value; the name of the attribute.

get-next§

This function combines .next() with .get-name() and .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, .get-name() and .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.

method get-next ( Array[Str] $out-name, N-Object $value --> Bool )
Code
  • $out-name; the type of the attribute.
  • $value; (transfer ownership: full) the attribute value

Return value; True on success, or False if there is no additional attribute.

get-value§

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

The iterator is not advanced.

method get-value (--> N-Object )
Code

Return value; the value of the current attribute.

next§

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).

method next (--> Bool )
Code

Return value; True on success, or False when there are no more attributes.