view src/animate.h @ 101:d6f9af55b0d0

More documentation. 1. main page 2. copyright
author Thinker K.F. Li <thinker@branda.to>
date Wed, 10 Sep 2008 13:35:56 +0800
parents ab028c9f0930
children 98c83441d7d6
line wrap: on
line source

#ifndef __ANIMATE_H_
#define __ANIMATE_H_

#include "mb_types.h"
#include "mb_timer.h"
#include "paint.h"

/*! \defgroup anim Animation
 * \brief Animation is a set of functions to make graph moving.
 * @{
 */
typedef struct _mb_progm mb_progm_t;
typedef struct _mb_word mb_word_t;
typedef struct _mb_action mb_action_t;
typedef struct _mb_progm_state mb_progm_state_t;

extern mb_progm_t *mb_progm_new(int max_words, redraw_man_t *rdman);
extern void mb_progm_free(mb_progm_t *progm);
extern mb_word_t *mb_progm_next_word(mb_progm_t *progm,
				     const mb_timeval_t *start,
				     const mb_timeval_t *playing);
extern void mb_progm_start(mb_progm_t *progm, mb_tman_t *tman,
			   mb_timeval_t *now);
extern void mb_progm_abort(mb_progm_t *progm, mb_tman_t *tman);
extern mb_action_t *mb_shift_new(co_aix x, co_aix y, coord_t *coord,
				 mb_word_t *word);
extern mb_action_t *mb_chgcolor_new(co_comp_t r, co_comp_t g,
				    co_comp_t b, co_comp_t a,
				    paint_t *paint, mb_word_t *word);

enum { VIS_VISIBLE, VIS_HIDDEN };
extern mb_action_t *mb_visibility_new(int visib, coord_t *coord,
				      mb_word_t *word);

/* @} */

#endif /* __ANIMATE_H_ */