Top |
Functions
StTextureCache * | st_texture_cache_get_default () |
ClutterActor * | st_texture_cache_load_sliced_image () |
ClutterActor * | st_texture_cache_bind_cairo_surface_property () |
ClutterActor * | st_texture_cache_load_gicon () |
ClutterActor * | st_texture_cache_load_file_async () |
CoglTexture * | st_texture_cache_load_file_to_cogl_texture () |
cairo_surface_t * | st_texture_cache_load_file_to_cairo_surface () |
CoglTexture * | (*StTextureCacheLoader) () |
CoglTexture * | st_texture_cache_load () |
Types and Values
#define | ST_TYPE_TEXTURE_CACHE |
struct | StTextureCache |
enum | StTextureCachePolicy |
StTextureCachePrivate |
Functions
st_texture_cache_load_sliced_image ()
ClutterActor * st_texture_cache_load_sliced_image (StTextureCache *cache
,GFile *file
,gint grid_width
,gint grid_height
,gint scale
,GFunc load_callback
,gpointer user_data
);
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.
st_texture_cache_bind_cairo_surface_property ()
ClutterActor * st_texture_cache_bind_cairo_surface_property (StTextureCache *cache
,GObject *object
,const char *property_name
);
Create a ClutterTexture which tracks the cairo_surface_t value of a GObject property
named by property_name
. Unlike other methods in StTextureCache, the underlying
CoglTexture is not shared by default with other invocations to this method.
If the source object is destroyed, the texture will continue to show the last value of the property.
st_texture_cache_load_gicon ()
ClutterActor * st_texture_cache_load_gicon (StTextureCache *cache
,StThemeNode *theme_node
,GIcon *icon
,gint size
,gint scale
);
This method returns a new ClutterActor for a given GIcon. If the icon isn't loaded already, the texture will be filled asynchronously.
Parameters
cache |
The texture cache instance |
|
theme_node |
The StThemeNode to use for colors, or NULL if the icon must not be recolored. |
[nullable] |
icon |
the GIcon to load |
|
size |
Size of themed |
|
scale |
Scale factor of display |
st_texture_cache_load_file_async ()
ClutterActor * st_texture_cache_load_file_async (StTextureCache *cache
,GFile *file
,int available_width
,int available_height
,int scale
);
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.
st_texture_cache_load_file_to_cogl_texture ()
CoglTexture * st_texture_cache_load_file_to_cogl_texture (StTextureCache *cache
,GFile *file
,gint scale
);
This function synchronously loads the given file path
into a COGL texture. On error, a warning is emitted
and NULL
is returned.
[skip]
st_texture_cache_load_file_to_cairo_surface ()
cairo_surface_t * st_texture_cache_load_file_to_cairo_surface (StTextureCache *cache
,GFile *file
,gint scale
);
This function synchronously loads the given file path
into a cairo surface. On error, a warning is emitted
and NULL
is returned.
StTextureCacheLoader ()
CoglTexture * (*StTextureCacheLoader) (StTextureCache *cache
,const char *key
,void *data
,GError **error
);
See st_texture_cache_load()
. Implementations should return a
texture handle for the given key, or set error
.
[skip]
st_texture_cache_load ()
CoglTexture * st_texture_cache_load (StTextureCache *cache
,const char *key
,StTextureCachePolicy policy
,StTextureCacheLoader load
,void *data
,GError **error
);
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".
[skip]
Signal Details
The “icon-theme-changed”
signal
void user_function (StTextureCache *sttexturecache, gpointer user_data)
Flags: Run Last
The “texture-file-changed”
signal
void user_function (StTextureCache *sttexturecache, GFile *arg1, gpointer user_data)
Flags: Run Last