Gio.MenuAttributeIter¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
|
Properties¶
None
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent_instance |
r |
Class Details¶
- class Gio.MenuAttributeIter(**kwargs)¶
- Bases:
- Abstract:
Yes
- Structure:
Gio.MenuAttributeIter
is an opaque structure type. You must access it using the functions below.New in version 2.32.
- get_name()[source]¶
- Returns:
the name of the attribute
- Return type:
Gets the name of the attribute at the current iterator position, as a string.
The iterator is not advanced.
New in version 2.32.
- get_next()[source]¶
- Returns:
True
on success, orFalse
if there is no additional attribute- out_name:
the type of the attribute
- value:
the attribute value
- Return type:
(
bool
, out_name:str
, value:GLib.Variant
)
This function combines
Gio.MenuAttributeIter.next
() withGio.MenuAttributeIter.get_name
() andGio.MenuAttributeIter.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 and value are set to the name and value of the attribute that has just been advanced to. At this point,
Gio.MenuAttributeIter.get_name
() andGio.MenuAttributeIter.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 in value must be unreffed using
GLib.Variant.unref
() when it is no longer in use.New in version 2.32.
- get_value()[source]¶
- Returns:
the value of the current attribute
- Return type:
Gets the value of the attribute at the current iterator position.
The iterator is not advanced.
New in version 2.32.
- next()[source]¶
-
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).
New in version 2.32.
- do_get_next() virtual¶
- Returns:
True
on success, orFalse
if there is no additional attribute- out_name:
the type of the attribute
- value:
the attribute value
- Return type:
(
bool
, out_name:str
, value:GLib.Variant
)
This function combines
Gio.MenuAttributeIter.next
() withGio.MenuAttributeIter.get_name
() andGio.MenuAttributeIter.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 and value are set to the name and value of the attribute that has just been advanced to. At this point,
Gio.MenuAttributeIter.get_name
() andGio.MenuAttributeIter.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 in value must be unreffed using
GLib.Variant.unref
() when it is no longer in use.New in version 2.32.