Method

GioMenuLinkIterget_next

since: 2.32

Declaration

gboolean
g_menu_link_iter_get_next (
  GMenuLinkIter* iter,
  const gchar** out_link,
  GMenuModel** value
)

Description

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

Available since: 2.32

Parameters

out_link

Type: const gchar**

The name of the link.

The argument will be set by the function.
The argument can be NULL.
The data is owned by the caller of the function.
The value is a NUL terminated UTF-8 string.
value

Type: GMenuModel

The linked GMenuModel.

The argument will be set by the function.
The argument can be NULL.
The instance takes ownership of the data, and is responsible for freeing it.

Return value

Type: gboolean

TRUE on success, or FALSE if there is no additional link.