Gjsify LogoGjsify Logo

Hierarchy

  • IconInfo

Index

Constructors

Properties

name: string

Methods

  • free(): void
  • get_attach_points(): [boolean, Gdk.Point[]]
  • Fetches the set of attach points for an icon. An attach point is a location in the icon that can be used as anchor points for attaching emblems or overlays to the icon.

    Returns [boolean, Gdk.Point[]]

  • get_base_size(): number
  • Gets the base size for the icon. The base size is a size for the icon that was specified by the icon theme creator. This may be different than the actual size of image; an example of this is small emblem icons that can be attached to a larger icon. These icons will be given the same base size as the larger icons to which they are attached.

    Returns number

  • Gets the built-in image for this icon, if any. To allow GTK+ to use built in icon images, you must pass the %GTK_ICON_LOOKUP_USE_BUILTIN to gtk_icon_theme_lookup_icon().

    Returns Pixbuf

  • get_display_name(): string
  • Gets the display name for an icon. A display name is a string to be used in place of the icon name in a user visible context like a list of icons.

    Returns string

  • Gets the coordinates of a rectangle within the icon that can be used for display of information such as a preview of the contents of a text file. See gtk_icon_info_set_raw_coordinates() for further information about the coordinate system.

    Returns [boolean, Gdk.Rectangle]

  • get_filename(): string
  • Gets the filename for the icon. If the %GTK_ICON_LOOKUP_USE_BUILTIN flag was passed to gtk_icon_theme_lookup_icon(), there may be no filename if a builtin icon is returned; in this case, you should use gtk_icon_info_get_builtin_pixbuf().

    Returns string

  • Renders an icon previously looked up in an icon theme using gtk_icon_theme_lookup_icon(); the size will be based on the size passed to gtk_icon_theme_lookup_icon(). Note that the resulting pixbuf may not be exactly this size; an icon theme may have icons that differ slightly from their nominal sizes, and in addition GTK+ will avoid scaling icons that it considers sufficiently close to the requested size or for which the source image would have to be scaled up too far. (This maintains sharpness.). This behaviour can be changed by passing the %GTK_ICON_LOOKUP_FORCE_SIZE flag when obtaining the #GtkIconInfo. If this flag has been specified, the pixbuf returned by this function will be scaled to the exact size.

    Returns Pixbuf

  • set_raw_coordinates(raw_coordinates: boolean): void
  • Sets whether the coordinates returned by gtk_icon_info_get_embedded_rect() and gtk_icon_info_get_attach_points() should be returned in their original form as specified in the icon theme, instead of scaled appropriately for the pixbuf returned by gtk_icon_info_load_icon().

    Raw coordinates are somewhat strange; they are specified to be with respect to the unscaled pixmap for PNG and XPM icons, but for SVG icons, they are in a 1000x1000 coordinate space that is scaled to the final size of the icon. You can determine if the icon is an SVG icon by using gtk_icon_info_get_filename(), and seeing if it is non-%NULL and ends in '.svg'.

    This function is provided primarily to allow compatibility wrappers for older API's, and is not expected to be useful for applications.

    Parameters

    • raw_coordinates: boolean

      whether the coordinates of embedded rectangles and attached points should be returned in their original (unscaled) form.

    Returns void

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method