package ocgtk

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Wrappers.Icon_paintable

type t = [ `icon_paintable | `object_ ] Gobject.obj
val new_for_file : Ocgtk_gio.Gio.Wrappers.File.t -> int -> int -> t

Create a new IconPaintable

val is_symbolic : t -> bool

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`.

val get_icon_name : t -> string option

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.

val get_file : t -> Ocgtk_gio.Gio.Wrappers.File.t option

Gets the `GFile` that was used to load the icon.

Returns %NULL if the icon was not loaded from a file.