### Class

# St IconTheme

#### Description [src]

    final class St.IconTheme : GObject.Object
    {
      /* No available fields */
    }

Looking up icons by name

`StIconTheme` provides a facility for looking up icons by name and size. The main reason for using a name rather than simply providing a filename is to allow different icons to be used depending on what “icon theme” is selected by the user. The operation of icon themes on Linux and Unix follows the Icon Theme Specification There is a fallback icon theme, named `hicolor`, where applications should install their icons, but additional icon themes can be installed as operating system vendors and users choose.

In many cases, named themes are used indirectly, via `StIcon`, rather than directly, but looking up icons directly is also simple. The `StIconTheme` object acts as a database of all the icons in the current theme.

#### Ancestors

- GObject

#### Constructors

###### st_icon_theme_new

Creates a new icon theme object. Icon theme objects are used to lookup up an icon by name in a particular icon theme.

#### Instance methods

###### st_icon_theme_add_resource_path

Adds a resource path that will be looked at when looking for icons, similar to search paths.

###### st_icon_theme_append_search_path

Appends a directory to the search path. See st_icon_theme_set_search_path().

###### st_icon_theme_choose_icon

Looks up a named icon and returns a `StIconInfo` containing information such as the filename of the icon. The icon can then be rendered into a pixbuf using `st_icon_info_load_icon()`. (`st_icon_theme_load_icon()` combines these two steps if all you need is the pixbuf.).

###### st_icon_theme_choose_icon_for_scale

Looks up a named icon for a particular window scale and returns a `StIconInfo` containing information such as the filename of the icon. The icon can then be rendered into a pixbuf using `st_icon_info_load_icon()`. (`st_icon_theme_load_icon()` combines these two steps if all you need is the pixbuf.).

###### st_icon_theme_get_icon_sizes

Returns an array of integers describing the sizes at which the icon is available without scaling. A size of -1 means that the icon is available in a scalable format. The array is zero-terminated.

###### st_icon_theme_get_search_path

Gets the current search path. See st_icon_theme_set_search_path().

###### st_icon_theme_has_icon

Checks whether an icon theme includes an icon for a particular name.

###### st_icon_theme_list_contexts

Gets the list of contexts available within the current hierarchy of icon themes. See `st_icon_theme_list_icons()` for details about contexts.

###### st_icon_theme_list_icons

Lists the icons in the current icon theme. Only a subset of the icons can be listed by providing a context string. The set of values for the context string is system dependent, but will typically include such values as “Applications” and “MimeTypes”. Contexts are explained in the Icon Theme Specification. The standard contexts are listed in the Icon Naming Specification. Also see st_icon_theme_list_contexts().

###### st_icon_theme_load_icon

Looks up an icon in an icon theme, scales it to the given size and renders it into a pixbuf. This is a convenience function; if more details about the icon are needed, use `st_icon_theme_lookup_icon()` followed by `st_icon_info_load_icon()`.

###### st_icon_theme_load_icon_for_scale

Looks up an icon in an icon theme for a particular window scale, scales it to the given size and renders it into a pixbuf. This is a convenience function; if more details about the icon are needed, use `st_icon_theme_lookup_icon()` followed by `st_icon_info_load_icon()`.

###### st_icon_theme_lookup_by_gicon

Looks up an icon and returns a `StIconInfo` containing information such as the filename of the icon. The icon can then be rendered into a pixbuf using `st_icon_info_load_icon()`.

###### st_icon_theme_lookup_by_gicon_for_scale

Looks up an icon and returns a `StIconInfo` containing information such as the filename of the icon. The icon can then be rendered into a pixbuf using `st_icon_info_load_icon()`.

###### st_icon_theme_lookup_icon

Looks up a named icon and returns a `StIconInfo` containing information such as the filename of the icon. The icon can then be rendered into a pixbuf using `st_icon_info_load_icon()`. (`st_icon_theme_load_icon()` combines these two steps if all you need is the pixbuf.).

###### st_icon_theme_lookup_icon_for_scale

Looks up a named icon for a particular window scale and returns a `StIconInfo` containing information such as the filename of the icon. The icon can then be rendered into a pixbuf using `st_icon_info_load_icon()`. (`st_icon_theme_load_icon()` combines these two steps if all you need is the pixbuf.).

###### st_icon_theme_prepend_search_path

Prepends a directory to the search path. See st_icon_theme_set_search_path().

###### st_icon_theme_rescan_if_needed

Checks to see if the icon theme has changed; if it has, any currently cached information is discarded and will be reloaded next time `icon_theme` is accessed.

###### st_icon_theme_set_search_path

Sets the search path for the icon theme object. When looking for an icon theme, GTK+ will search for a subdirectory of one or more of the directories in `path` with the same name as the icon theme containing an index.theme file. (Themes from multiple of the path elements are combined to allow themes to be extended by adding icons in the user’s home directory.).

##### Methods inherited from GObject (43)

Please see GObject for a full list of methods.

#### Signals

###### St.IconTheme::changed

Emitted when the current icon theme is switched or GTK+ detects that a change has occurred in the contents of the current icon theme.

##### Signals inherited from GObject (1)

###### GObject::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

#### Class structure

    struct StIconThemeClass {
      GObjectClass parent_class;

    }

No description available.

###### Class members

`parent_class: GObjectClass`

  No description available.