Back to index

gcompris  8.2.2
anim.h
Go to the documentation of this file.
00001 /* gcompris - anim.h
00002  *
00003  * Time-stamp: <2005/02/13 11:59:55 joe>
00004  *
00005  * Copyright (C) 2000 Joe Neeman
00006  *
00007  *   This program is free software; you can redistribute it and/or modify
00008  *   it under the terms of the GNU General Public License as published by
00009  *   the Free Software Foundation; either version 2 of the License, or
00010  *   (at your option) any later version.
00011  *
00012  *   This program is distributed in the hope that it will be useful,
00013  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015  *   GNU General Public License for more details.
00016  *
00017  *   You should have received a copy of the GNU General Public License
00018  *   along with this program; if not, write to the Free Software
00019  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00020  */
00021 
00022 #ifndef GCOMPRISANIM_H
00023 #define GCOMPRISANIM_H
00024 
00025 #include "gcompris.h"
00026 
00030 typedef struct {
00031   GdkPixbufAnimation **anim;
00032   int numstates;
00033 } GcomprisAnimation;
00034 
00035 typedef struct {
00036   GnomeCanvasPixbuf *canvas;
00037   GcomprisAnimation *anim;
00038   GdkPixbufAnimationIter *iter;
00039   int state;
00040 } GcomprisAnimCanvasItem;
00041 
00042 GcomprisAnimation *gc_anim_load(char *filename);
00043 
00044 GcomprisAnimCanvasItem *gc_anim_activate(GnomeCanvasGroup *parent,
00045                                                     GcomprisAnimation*);
00046 void gc_anim_set_state(GcomprisAnimCanvasItem*, int);
00047 void gc_anim_deactivate(GcomprisAnimCanvasItem*);
00048 void gc_anim_free(GcomprisAnimation*);
00049 void gc_anim_swap(GcomprisAnimCanvasItem *item, GcomprisAnimation *new_anim);
00050 
00051 #endif