Class MenuAttributeIter
- All Implemented Interfaces:
Proxy
- Direct Known Subclasses:
MenuAttributeIter.MenuAttributeIter$Impl
GMenuAttributeIter is an opaque structure type. You must access it
using the functions below.- Since:
- 2.32
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classMenuAttributeIter.Builder<B extends MenuAttributeIter.Builder<B>>Inner class implementing a builder pattern to construct a GObject with properties.static classThe MenuAttributeIter$Impl type represents a native instance of the abstract MenuAttributeIter class.static classNested classes/interfaces inherited from class org.gnome.gobject.GObject
GObject.NotifyCallback, GObject.ObjectClass -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new MenuAttributeIter.MenuAttributeIter(MemorySegment address) Create a MenuAttributeIter proxy instance for the provided memory address. -
Method Summary
Modifier and TypeMethodDescriptionprotected MenuAttributeIterasParent()Returns this instance as if it were its parent type.static MemoryLayoutThe memory layout of the native struct.getName()Gets the name of the attribute at the current iterator position, as a string.booleanThis function combines g_menu_attribute_iter_next() with g_menu_attribute_iter_get_name() and g_menu_attribute_iter_get_value().static @Nullable TypegetType()Get the GType of the MenuAttributeIter classgetValue()Gets the value of the attribute at the current iterator position.booleannext()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, builder, 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, 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, withPropertiesMethods inherited from class org.gnome.gobject.TypeInstance
callParent, callParent, cast, getPrivate, readGClass, writeGClassMethods inherited from class org.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
-
MenuAttributeIter
public MenuAttributeIter()Creates a new MenuAttributeIter.
-
-
Method Details
-
getType
Get the GType of the MenuAttributeIter class- Returns:
- the GType
-
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 Javasuperkeyword, 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
- Since:
- 2.32
-
getNext
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
falseis returned and there are no other effects.If successful,
nameandvalueare 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
nameremains valid for as long as the iterator remains at the current position. The value returned invaluemust be unreffed using g_variant_unref() when it is no longer in use.- Parameters:
outName- the type of the attributevalue- the attribute value- Returns:
trueon success, orfalseif there is no additional attribute- Since:
- 2.32
-
getValue
Gets the value of the attribute at the current iterator position.The iterator is not advanced.
- Returns:
- the value of the current attribute
- Since:
- 2.32
-
next
public boolean next()Attempts to advance the iterator to the next (possibly first) attribute.trueis returned on success, orfalseif 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:
trueon success, orfalsewhen there are no more attributes- Since:
- 2.32
-