Gio.MenuLinkIter¶
- 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.MenuLinkIter(**kwargs)¶
- Bases:
- Abstract:
Yes
- Structure:
Gio.MenuLinkIteris an opaque structure type. You must access it using the functions below.New in version 2.32.
- get_name()[source]¶
- Returns:
the type of the link
- Return type:
Gets the name of the link at the current iterator position.
The iterator is not advanced.
New in version 2.32.
- get_next()[source]¶
- Returns:
Trueon success, orFalseif there is no additional link- out_link:
the name of the link
- value:
the linked
Gio.MenuModel
- Return type:
(
bool, out_link:str, value:Gio.MenuModel)
This function combines
Gio.MenuLinkIter.next() withGio.MenuLinkIter.get_name() andGio.MenuLinkIter.get_value().First the iterator is advanced to the next (possibly first) link. If that fails, then
Falseis returned and there are no other effects.If successful, out_link and value are set to the name and
Gio.MenuModelof the link that has just been advanced to. At this point,Gio.MenuLinkIter.get_name() andGio.MenuLinkIter.get_value() will return the same values again.The value returned in out_link remains valid for as long as the iterator remains at the current position. The value returned in value must be unreffed using
GObject.Object.unref() when it is no longer in use.New in version 2.32.
- get_value()[source]¶
- Returns:
the
Gio.MenuModelthat is linked to- Return type:
Gets the linked
Gio.MenuModelat 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) link.
Trueis returned on success, orFalseif 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).
New in version 2.32.
- do_get_next() virtual¶
- Returns:
Trueon success, orFalseif there is no additional link- out_link:
the name of the link
- value:
the linked
Gio.MenuModel
- Return type:
(
bool, out_link:str, value:Gio.MenuModel)
This function combines
Gio.MenuLinkIter.next() withGio.MenuLinkIter.get_name() andGio.MenuLinkIter.get_value().First the iterator is advanced to the next (possibly first) link. If that fails, then
Falseis returned and there are no other effects.If successful, out_link and value are set to the name and
Gio.MenuModelof the link that has just been advanced to. At this point,Gio.MenuLinkIter.get_name() andGio.MenuLinkIter.get_value() will return the same values again.The value returned in out_link remains valid for as long as the iterator remains at the current position. The value returned in value must be unreffed using
GObject.Object.unref() when it is no longer in use.New in version 2.32.