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.MenuLinkIter
is 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:
True
on success, orFalse
if 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
False
is returned and there are no other effects.If successful, out_link and value are set to the name and
Gio.MenuModel
of 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.MenuModel
that is linked to- Return type:
Gets the linked
Gio.MenuModel
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) 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).
New in version 2.32.
- do_get_next() virtual¶
- Returns:
True
on success, orFalse
if 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
False
is returned and there are no other effects.If successful, out_link and value are set to the name and
Gio.MenuModel
of 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.