### Class

# St TextureCache

since: 14

#### Description

    class St.TextureCache : GObject.Object
    {
      priv: StTextureCachePrivate*
    }

No description available.

Available since: 14

#### Ancestors

- GObject

#### Functions

###### st_texture_cache_get_default

No description available.

since: 14

#### Instance methods

###### st_texture_cache_load

Load an arbitrary texture, caching it. The string chosen for `key` should be of the form “type-prefix:type-uuid”. For example, “url:file:///usr/share/icons/hicolor/48x48/apps/firefox.png”, or “stock-icon:gtk-ok”.

since: 14

###### st_texture_cache_load_cairo_surface_to_gicon

Create a `GIcon` from `surface`.

since: 14

###### st_texture_cache_load_file_async

Asynchronously load an image. Initially, the returned texture will have a natural size of zero. At some later point, either the image will be loaded successfully and at that point size will be negotiated, or upon an error, no image will be set.

since: 14

###### st_texture_cache_load_file_to_cairo_surface

This function synchronously loads the given file path into a cairo surface. On error, a warning is emitted and `NULL` is returned.

since: 14

###### st_texture_cache_load_file_to_cogl_texture

This function synchronously loads the given file path into a COGL texture. On error, a warning is emitted and `NULL` is returned.

since: 14

###### st_texture_cache_load_gicon

This method returns a new `ClutterActor` for a given `GIcon`. If the icon isn’t loaded already, the texture will be filled asynchronously.

since: 14

###### st_texture_cache_load_sliced_image

This function reads a single image file which contains multiple images internally. The image file will be divided using `grid_width` and `grid_height`; note that the dimensions of the image loaded from `path` should be a multiple of the specified grid dimensions.

since: 14

###### st_texture_cache_rescan_icon_theme

Rescan the current icon theme, if necessary.

since: 14

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

Please see GObject for a full list of methods.

#### Signals

###### St.TextureCache::icon-theme-changed

Emitted when the icon theme is changed.

since: 14

###### St.TextureCache::texture-file-changed

Emitted when the source file of a texture is changed.

since: 14

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

since: 2.0

#### Class structure

    struct StTextureCacheClass {
      GObjectClass parent_class;

    }

No description available.

###### Class members

`parent_class: GObjectClass`
  No description available.