Class MenuAttributeIter
- All Implemented Interfaces:
Proxy
- Direct Known Subclasses:
MenuAttributeIter.MenuAttributeIterImpl
GMenuAttributeIter
is an opaque structure type. You must access it
using the functions below.-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
MenuAttributeIter.Builder<B extends MenuAttributeIter.Builder<B>>
Inner class implementing a builder pattern to construct a GObject with properties.static class
static class
The MenuAttributeIterImpl type represents a native instance of the abstract MenuAttributeIter class.Nested classes/interfaces inherited from class org.gnome.gobject.GObject
GObject.NotifyCallback, GObject.ObjectClass
-
Constructor Summary
ConstructorDescriptionMenuAttributeIter
(MemorySegment address) Create a MenuAttributeIter proxy instance for the provided memory address. -
Method Summary
Modifier and TypeMethodDescriptionprotected MenuAttributeIter
asParent()
Returns this instance as if it were its parent type.static MenuAttributeIter.Builder
<? extends MenuAttributeIter.Builder> builder()
AMenuAttributeIter.Builder
object constructs aMenuAttributeIter
with the specified properties.static MemoryLayout
The memory layout of the native struct.getName()
Gets the name of the attribute at the current iterator position, as a string.boolean
This function combines g_menu_attribute_iter_next() with g_menu_attribute_iter_get_name() and g_menu_attribute_iter_get_value().static Type
getType()
Get the GType of the MenuAttributeIter classgetValue()
Gets the value of the attribute at the current iterator position.boolean
next()
Attempts to advance the iterator to the next (possibly first) attribute.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
-
MenuAttributeIter
Create a MenuAttributeIter 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 attribute at the current iterator position, as a string.The iterator is not advanced.
- Returns:
- the name of the attribute
-
getNext
public boolean getNext(@Nullable @Nullable Out<String> outName, @Nullable @Nullable Out<Variant> value) This function combines g_menu_attribute_iter_next() with g_menu_attribute_iter_get_name() and g_menu_attribute_iter_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
andvalue
are set to the name and value of the attribute that has just been advanced to. At this point, g_menu_attribute_iter_get_name() and g_menu_attribute_iter_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 invalue
must be unreffed using g_variant_unref() when it is no longer in use.- Parameters:
outName
- the type of the attributevalue
- the attribute value- Returns:
true
on success, orfalse
if there is no additional attribute
-
getValue
Gets the value of the attribute at the current iterator position.The iterator is not advanced.
- Returns:
- the value of the current attribute
-
next
public boolean next()Attempts to advance the iterator to the next (possibly first) attribute.true
is returned on success, orfalse
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).
- Returns:
true
on success, orfalse
when there are no more attributes
-
builder
AMenuAttributeIter.Builder
object constructs aMenuAttributeIter
with the specified properties. Use the variousset...()
methods to set properties, and finish construction withMenuAttributeIter.Builder.build()
.
-