Class: Gio::MenuLinkIter

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

Instance Method Summary collapse

Instance Method Details

#get_next(out_link, value) ⇒ TrueClass

This function combines g_menu_link_iter_next() with g_menu_link_iter_get_name() and g_menu_link_iter_get_value().

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

If successful, out_link and value are set to the name and GMenu::Model of the link that has just been advanced to. At this point, g_menu_link_iter_get_name() and g_menu_link_iter_get_value() will return the same values again.

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

Parameters:

  • out_link (String)

    the name of the link

  • value (Gio::MenuModel)

    the linked GMenu::Model

Returns:

  • (TrueClass)

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

#nameString

Gets the name of the link at the current iterator position.

The iterator is not advanced.

Returns:

  • (String)

    the type of the link

#nextTrueClass

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

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

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

Returns:

  • (TrueClass)

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

#valueGio::MenuModel

Gets the linked GMenu::Model at the current iterator position.

The iterator is not advanced.

Returns: