Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: ThemedIconCtors

[159:14] static extends: object

Alternate constructors for ThemedIcon. Usage: ThemedIconCtors.<name>(...). The primary constructor lives directly on ThemedIcon.

Methods

  • newFromNames (list iconnames)

    Creates a new themed icon for @iconnames.

    • @p iconnames is an array of strings containing icon names..
    • @p len is the length of the @iconnames array, or -1 if @iconnames is %NULL-terminated.
    • @r A new ThemedIcon.
  • newWithDefaultFallbacks (string iconname)

    Creates a new themed icon for @iconname, and all the names that can be created by shortening @iconname at '-' characters. In the following example, @icon1 and @icon2 are equivalent: |[ const char *names[] = { "gnome-dev-cdrom-audio", "gnome-dev-cdrom", "gnome-dev", "gnome" }; icon1 = g_themed_icon_new_from_names (names, 4); icon2 = g_themed_icon_new_with_default_fallbacks ("gnome-dev-cdrom-audio"); ]|

    • @p iconname is a string containing an icon name.
    • @r A new ThemedIcon.

class: ThemedIconMeta

[199:14] static extends: object

Generated metadata helpers for ThemedIcon class surfaces.

Methods

  • properties ()

    Returns property metadata for ThemedIcon.

    • @r A list.

class: ThemedIcon

[18:7] extends: object

GThemedIcon is an implementation of [iface@Gio.Icon] that supports icon themes. GThemedIcon contains a list of all of the icons present in an icon theme, so that icons can be looked up quickly. GThemedIcon does not provide actual pixmaps for icons, just the icon names. Ideally something like [method@Gtk.IconTheme.choose_icon] should be used to resolve the list of names so that fallback icons work nicely with themes that inherit other themes.

Members

  • handleObj
  • lib
  • retainedCallbacks
  • signalHandlerNames
  • signalSetterHandlers

Methods

  • ThemedIcon (iconname = null)

    Creates a new themed icon for @iconname.

    • @p iconname is a string containing an icon name..
  • toNativeHandle (Source)

    Normalizes a constructor argument into a raw pointer carrier. Accepts a raw NativeHandle, a raw NativeBuffer returned from fn.call(...), another generated wrapper exposing handle(), or null. Returns null when the argument carries no pointer.

    • @p Source is the raw handle, raw buffer, wrapper, or null.
    • @r A raw pointer carrier or null when no pointer is present.
  • getLib ()

    Returns the opened native library for this generated wrapper.

    • @r The opened native library.
  • handle ()

    Returns the wrapped NativeHandle.

    • @r The wrapped NativeHandle.
  • isNull ()

    Returns true when the wrapped handle is null.

    • @r A bool.
  • describe ()

    Returns a small string for debugging generated wrappers.

    • @r A string.
  • asObject ()

    Wraps this handle as Object.

    • @r A Object object.
  • asIcon ()

    Wraps this handle as Icon.

    • @r A Icon object.
  • append_name (string iconname)

    Append a name to the list of icons from within @icon. Note that doing so invalidates the hash computed by prior calls to g_icon_hash().

    • @p iconname is name of icon to append to list of icons from within
    • @icon.. ``
    • @r None.
  • get_names ()

    Gets the names of icons from within @icon.

  • prepend_name (string iconname)

    Prepend a name to the list of icons from within @icon. Note that doing so invalidates the hash computed by prior calls to g_icon_hash().

    • @p iconname is name of icon to prepend to list of icons from within
    • @icon.. ``
    • @r None.