Class MenuLinkIter
- All Implemented Interfaces:
Proxy
- Direct Known Subclasses:
MenuLinkIter.MenuLinkIterImpl
GMenuLinkIter
is an opaque structure type. You must access it using
the functions below.-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
MenuLinkIter.Builder<B extends MenuLinkIter.Builder<B>>
Inner class implementing a builder pattern to construct a GObject with properties.static class
static class
The MenuLinkIterImpl type represents a native instance of the abstract MenuLinkIter class.Nested classes/interfaces inherited from class org.gnome.gobject.GObject
GObject.NotifyCallback, GObject.ObjectClass
-
Constructor Summary
ConstructorDescriptionMenuLinkIter
(MemorySegment address) Create a MenuLinkIter proxy instance for the provided memory address. -
Method Summary
Modifier and TypeMethodDescriptionprotected MenuLinkIter
asParent()
Returns this instance as if it were its parent type.static MenuLinkIter.Builder
<? extends MenuLinkIter.Builder> builder()
AMenuLinkIter.Builder
object constructs aMenuLinkIter
with the specified properties.static MemoryLayout
The memory layout of the native struct.getName()
Gets the name of the link at the current iterator position.boolean
This function combines g_menu_link_iter_next() with g_menu_link_iter_get_name() and g_menu_link_iter_get_value().static Type
getType()
Get the GType of the MenuLinkIter classgetValue()
Gets the linkedGMenuModel
at the current iterator position.boolean
next()
Attempts to advance the iterator to the next (possibly first) link.Methods inherited from class org.gnome.gobject.GObject
addToggleRef, addWeakPointer, bindProperty, bindProperty, bindProperty, bindPropertyFull, bindPropertyFull, bindPropertyWithClosures, bindPropertyWithClosures, compatControl, connect, connect, connect, constructed, disconnect, dispatchPropertiesChanged, dispose, dupData, dupQdata, emit, emitNotify, finalize_, forceFloating, freezeNotify, get, getData, getProperty, getProperty, getProperty, getQdata, getv, interfaceFindProperty, interfaceInstallProperty, interfaceListProperties, isFloating, newInstance, newInstance, newInstance, newInstance, newv, notify_, notify_, notifyByPspec, onNotify, ref, refSink, removeToggleRef, removeWeakPointer, replaceData, replaceQdata, runDispose, set, setData, setDataFull, setProperty, setProperty, setProperty, setQdata, setQdataFull, setv, stealData, stealQdata, takeRef, thawNotify, unref, watchClosure, weakRef, weakUnref, withProperties
Methods inherited from class org.gnome.gobject.TypeInstance
callParent, callParent, getPrivate, readGClass, writeGClass
Methods inherited from class io.github.jwharm.javagi.base.ProxyInstance
equals, handle, hashCode
-
Constructor Details
-
MenuLinkIter
Create a MenuLinkIter proxy instance for the provided memory address.- Parameters:
address
- the memory address of the native object
-
-
Method Details
-
getType
-
getMemoryLayout
The memory layout of the native struct.- Returns:
- the memory layout
-
asParent
Returns this instance as if it were its parent type. This is mostly synonymous to the Javasuper
keyword, but will set the native typeclass function pointers to the parent type. When overriding a native virtual method in Java, "chaining up" withsuper.methodName()
doesn't work, because it invokes the overridden function pointer again. To chain up, callasParent().methodName()
. This will call the native function pointer of this virtual method in the typeclass of the parent type. -
getName
Gets the name of the link at the current iterator position.The iterator is not advanced.
- Returns:
- the type of the link
-
getNext
public boolean getNext(@Nullable @Nullable Out<String> outLink, @Nullable @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
andvalue
are set to the name andGMenuModel
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 invalue
must be unreffed using g_object_unref() when it is no longer in use.- Parameters:
outLink
- the name of the linkvalue
- the linkedGMenuModel
- Returns:
true
on success, orfalse
if there is no additional link
-
getValue
Gets the linkedGMenuModel
at the current iterator position.The iterator is not advanced.
- Returns:
- the
GMenuModel
that is linked to
-
next
public boolean next()Attempts to advance the iterator to the next (possibly first) link.true
is returned on success, orfalse
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, orfalse
when there are no more links
-
builder
AMenuLinkIter.Builder
object constructs aMenuLinkIter
with the specified properties. Use the variousset...()
methods to set properties, and finish construction withMenuLinkIter.Builder.build()
.
-