[gcompris-devel] skin support
bruno
bruno.coudoin at free.fr
Sun Feb 16 15:42:07 UTC 2003
It may not be that important but based on a suggestion I got at the
FOSDEM, I implemented skin support in gcompris.
To do this, now all gcompris 'skin' dependant images are in
gcompris/boards/skins/<skin name>/<image name>
There is a default skin which is where gcompris will look if an image is
not found in the user's selected skin.
It means, in order to create a skin, you can just create a directory and
put in just the images you want to change.
When started, gcompris now has a new property named skin. It can be
edited with the configuration menu or by hand in ~/.gnome2/gcompris
2 new functions are now in the API:
/*
* Given an image name, return an image name
* that includes the skin path
* eg : xx.png -> skins/default/xx.png
*
* The caller must free the returned string
*/
gchar *gcompris_image_to_skin(gchar *imagename);
/*
* Load a pixmap from the current skin directory
* If not found, try in the default skin directory
* If not found abort gcompris
*/
GdkPixbuf *gcompris_load_skin_pixmap(char *pixmapfile);
Now I created a pink skin for my daughter.
The current background is an aqua theme taken from childsplay. I am not
sure yet it is not an original mac one. I check that.
Bruno.
More information about the Gcompris-devel
mailing list