Klasse IconPaintable

Alle implementierten Schnittstellen:
PointerInterface

public class IconPaintable extends PropertyHolder
Contains information found when looking up an icon in `GtkIconTheme`.

`GtkIconPaintable` implements `GdkPaintable`.

https://docs.gtk.org/gtk4/class.IconPaintable.html

  • Konstruktordetails

  • Methodendetails

    • getClassHandler

      public static ClassHandler getClassHandler()
    • newForFileIconPaintable

      public static IconPaintable newForFileIconPaintable(@Nonnull File file, int size, int scale)
      Creates a `GtkIconPaintable` for a file with a given size and scale.

      The icon can then be rendered by using it as a `GdkPaintable`.
      Parameter:
      file - a `GFile`
      size - desired icon size, in application pixels
      scale - the desired scale
      Gibt zurück:
      a `GtkIconPaintable` containing for the icon. Unref with g_object_unref()
    • getFile

      public File getFile()
      Gets the `GFile` that was used to load the icon.

      Returns %NULL if the icon was not loaded from a file.
      Gibt zurück:
      the `GFile` for the icon
    • getIconName

      public Str getIconName()
      Get the icon name being used for this icon.

      When an icon looked up in the icon theme was not available, the
      icon theme may use fallback icons - either those specified to
      gtk_icon_theme_lookup_icon() or the always-available
      "image-missing". The icon chosen is returned by this function.

      If the icon was created without an icon theme, this function
      returns %NULL.
      Gibt zurück:
      the themed icon-name for the icon, or %NULL if its not a themed icon.
    • isSymbolic

      public boolean isSymbolic()
      Checks if the icon is symbolic or not.

      This currently uses only the file name and not the file contents
      for determining this. This behaviour may change in the future.

      Note that to render a symbolic `GtkIconPaintable` properly (with
      recoloring), you have to set its icon name on a `GtkImage`.
      Gibt zurück:
      %TRUE if the icon is symbolic, %FALSE otherwise
    • asPaintable

      public Paintable asPaintable()
      Implements interface Paintable. Call this to get access to interface functions.
      Gibt zurück:
      Paintable
    • asSymbolicPaintable

      public SymbolicPaintable asSymbolicPaintable()
      Implements interface SymbolicPaintable. Call this to get access to interface functions.
      Gibt zurück:
      SymbolicPaintable
    • 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()