Class ThemedIcon

All Implemented Interfaces:
PointerInterface

public class ThemedIcon extends Object
#GThemedIcon is an implementation of #GIcon 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 gtk_icon_theme_choose_icon() should be used to
resolve the list of names so that fallback icons work nicely with
themes that inherit other themes.

https://docs.gtk.org/gio/class.ThemedIcon.html

  • Constructor Details

    • ThemedIcon

      public ThemedIcon(PointerContainer pointer)
    • ThemedIcon

      public ThemedIcon(@Nonnull Str iconname)
      Creates a new themed icon for @iconname.
      Parameters:
      iconname - a string containing an icon name.
    • ThemedIcon

      public ThemedIcon(String iconname)
      Creates a new themed icon for @iconname.
      Parameters:
      iconname - a string containing an icon name.
  • Method Details

    • getClassHandler

      public static ClassHandler getClassHandler()
    • newFromNamesThemedIcon

      public static ThemedIcon newFromNamesThemedIcon(@Nonnull Strs iconnames, int len)
      Creates a new themed icon for @iconnames.
      Parameters:
      iconnames - an array of strings containing icon names.
      len - the length of the @iconnames array, or -1 if @iconnames is %NULL-terminated
      Returns:
      a new #GThemedIcon
    • newWithDefaultFallbacksThemedIcon

      public static ThemedIcon newWithDefaultFallbacksThemedIcon(@Nonnull Str 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:
      <!-- language="C" -->
       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");
       
      Parameters:
      iconname - a string containing an icon name
      Returns:
      a new #GThemedIcon.
    • newWithDefaultFallbacksThemedIcon

      public static ThemedIcon newWithDefaultFallbacksThemedIcon(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:
      <!-- language="C" -->
       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");
       
      Parameters:
      iconname - a string containing an icon name
      Returns:
      a new #GThemedIcon.
    • appendName

      public void appendName(@Nonnull Str 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().
      Parameters:
      iconname - name of icon to append to list of icons from within @icon.
    • appendName

      public void appendName(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().
      Parameters:
      iconname - name of icon to append to list of icons from within @icon.
    • prependName

      public void prependName(@Nonnull Str 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().
      Parameters:
      iconname - name of icon to prepend to list of icons from within @icon.
    • prependName

      public void prependName(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().
      Parameters:
      iconname - name of icon to prepend to list of icons from within @icon.
    • asIcon

      public Icon asIcon()
      Implements interface Icon. Call this to get access to interface functions.
      Returns:
      Icon
    • getTypeID

      public static long getTypeID()
    • getParentTypeID

      public static long getParentTypeID()
    • getTypeSize

      public static TypeSystem.TypeSize getTypeSize()
    • getParentTypeSize

      public static TypeSystem.TypeSize getParentTypeSize()
    • getInstanceSize

      public static int getInstanceSize()