Class MenuLinkIter

All Implemented Interfaces:
Proxy
Direct Known Subclasses:
MenuLinkIter.MenuLinkIter$Impl

@Generated("org.javagi.JavaGI") public abstract class MenuLinkIter extends GObject
GMenuLinkIter is an opaque structure type. You must access it using the functions below.
Since:
2.32
  • Constructor Details

    • MenuLinkIter

      public MenuLinkIter(MemorySegment address)
      Create a MenuLinkIter instance for the provided memory address.
      Parameters:
      address - the memory address of the native object
    • MenuLinkIter

      public MenuLinkIter()
      Create a new MenuLinkIter.
  • Method Details

    • getType

      public static @Nullable Type getType()
      Get the GType of the MenuLinkIter class.
      Returns:
      the GType
    • getMemoryLayout

      public static MemoryLayout getMemoryLayout()
      The memory layout of the native struct.
      Returns:
      the memory layout
    • asParent

      protected MenuLinkIter asParent()
      Return this instance as if it were its parent type. Comparable to the Java super keyword, but ensures the parent typeclass is also used in native code.
      Overrides:
      asParent in class GObject
      Returns:
      the instance as if it were its parent type
    • getName

      public String getName()

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

      The iterator is not advanced.

      Returns:
      the type of the link
      Since:
      2.32
    • getNext

      public boolean getNext(@Nullable Out<String> outLink, @Nullable Out<MenuModel> value)

      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, outLink 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 outLink 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:
      outLink - the name of the link
      value - the linked GMenuModel
      Returns:
      true on success, or false if there is no additional link
      Since:
      2.32
    • getValue

      public MenuModel getValue()

      Gets the linked GMenuModel at the current iterator position.

      The iterator is not advanced.

      Returns:
      the GMenuModel that is linked to
      Since:
      2.32
    • next

      public boolean next()

      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:
      true on success, or false when there are no more links
      Since:
      2.32