GNOME Python API

References

  • PyGObject Docs
  • GNOME Developer Documentation

Libraries

  • Adw
  • DBus
  • DBusGLib
  • Flatpak
  • GLib
  • GModule
  • GObject
  • Gcr
  • Gdk
  • GdkPixbuf
  • GdkPixdata
  • GdkWayland
  • GdkX11
  • Gio
    • Classes
      • AppInfoMonitor
      • AppLaunchContext
      • Application
      • ApplicationCommandLine
      • BufferedInputStream
      • BufferedOutputStream
      • BytesIcon
      • Cancellable
      • CharsetConverter
      • ConverterInputStream
      • ConverterOutputStream
      • Credentials
      • DBusActionGroup
      • DBusAuthObserver
      • DBusConnection
      • DBusInterfaceSkeleton
      • DBusMenuModel
      • DBusMessage
      • DBusMethodInvocation
      • DBusObjectManagerClient
      • DBusObjectManagerServer
      • DBusObjectProxy
      • DBusObjectSkeleton
      • DBusProxy
      • DBusServer
      • DataInputStream
      • DataOutputStream
      • DebugControllerDBus
      • DesktopAppInfo
      • Emblem
      • EmblemedIcon
      • FileEnumerator
      • FileIOStream
      • FileIcon
      • FileInfo
      • FileInputStream
      • FileMonitor
      • FileOutputStream
      • FilenameCompleter
      • FilterInputStream
      • FilterOutputStream
      • IOModule
      • IOStream
      • InetAddress
      • InetAddressMask
      • InetSocketAddress
      • InputStream
      • ListStore
      • MemoryInputStream
      • MemoryOutputStream
      • Menu
      • MenuAttributeIter
      • MenuItem
      • MenuLinkIter
      • MenuModel
      • MountOperation
      • NativeSocketAddress
      • NativeVolumeMonitor
      • NetworkAddress
      • NetworkService
      • Notification
      • OutputStream
      • Permission
      • PropertyAction
      • ProxyAddress
      • ProxyAddressEnumerator
      • Resolver
      • Settings
      • SettingsBackend
      • SimpleAction
      • SimpleActionGroup
      • SimpleAsyncResult
      • SimpleIOStream
      • SimplePermission
      • SimpleProxyResolver
      • Socket
      • SocketAddress
      • SocketAddressEnumerator
      • SocketClient
      • SocketConnection
      • SocketControlMessage
      • SocketListener
      • SocketService
      • Subprocess
      • SubprocessLauncher
      • Task
      • TcpConnection
      • TcpWrapperConnection
      • TestDBus
      • ThemedIcon
      • ThreadedResolver
      • ThreadedSocketService
      • TlsCertificate
      • TlsConnection
      • TlsDatabase
      • TlsInteraction
      • TlsPassword
      • UnixConnection
      • UnixCredentialsMessage
      • UnixFDList
      • UnixFDMessage
      • UnixInputStream
      • UnixMountMonitor
      • UnixOutputStream
      • UnixSocketAddress
      • Vfs
      • VolumeMonitor
      • ZlibCompressor
      • ZlibDecompressor
    • Interfaces
    • Structures
    • Enums
    • Functions
    • Constants
    • Dependencies
  • Graphene
  • Gsk
  • Gst
  • GstBase
  • GstCheck
  • GstController
  • GstNet
  • Gtk
  • GtkSource
  • HarfBuzz
  • Pango
  • PangoCairo
  • PangoFT2
  • PangoFc
  • PangoOT
  • PangoXft
  • Shumate
  • Soup
  • Vte
  • WebKit
  • WebKitWebProcessExtension
  • Xdp
  • XdpGtk4
  • pycairo
GNOME Python API
  • Gio
  • Classes
  • MenuLinkIter
  • View page source

MenuLinkIter

Added in version 2.32.

class MenuLinkIter(**properties: Any)

Superclasses: Object

Constructors:

MenuLinkIter(**properties)

Methods

class MenuLinkIter
get_name() → str

Gets the name of the link at the current iterator position.

The iterator is not advanced.

Added in version 2.32.

get_next() → tuple[bool, str, MenuModel]

This function combines next() with get_name() and 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 MenuModel of the link that has just been advanced to. At this point, get_name() and 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 unref() when it is no longer in use.

Added in version 2.32.

get_value() → MenuModel

Gets the linked MenuModel at the current iterator position.

The iterator is not advanced.

Added in version 2.32.

next() → bool

Attempts to advance the iterator to the next (possibly first) link.

True is returned on success, or False 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).

Added in version 2.32.

Virtual Methods

class MenuLinkIter
do_get_next() → tuple[bool, str, MenuModel]

This function combines next() with get_name() and 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 MenuModel of the link that has just been advanced to. At this point, get_name() and 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 unref() when it is no longer in use.

Added in version 2.32.

Fields

class MenuLinkIter
parent_instance
priv

Built with Sphinx using a theme provided by Read the Docs.
  • MenuLinkIter
    • Methods
      • MenuLinkIter.get_name()
      • MenuLinkIter.get_next()
      • MenuLinkIter.get_value()
      • MenuLinkIter.next()
    • Virtual Methods
      • MenuLinkIter.do_get_next()
    • Fields
      • MenuLinkIter.parent_instance
      • MenuLinkIter.priv