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
  • MenuAttributeIter
  • View page source

MenuAttributeIter

Added in version 2.32.

class MenuAttributeIter(**properties: Any)

Superclasses: Object

Constructors:

MenuAttributeIter(**properties)

Methods

class MenuAttributeIter
get_name() → str

Gets the name of the attribute at the current iterator position, as a string.

The iterator is not advanced.

Added in version 2.32.

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

This function combines next() with get_name() and 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, get_name() and 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 unref() when it is no longer in use.

Added in version 2.32.

get_value() → Variant

Gets the value of the attribute 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) attribute.

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

Added in version 2.32.

Virtual Methods

class MenuAttributeIter
do_get_next() → tuple[bool, str, Variant]

This function combines next() with get_name() and 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, get_name() and 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 unref() when it is no longer in use.

Added in version 2.32.

Fields

class MenuAttributeIter
parent_instance
priv

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