Mercurial > MadButterfly
diff src/animate.h @ 123:9e2316dc6ecb
Program completion events
author | Thinker K.F. Li <thinker@branda.to> |
---|---|
date | Tue, 16 Sep 2008 14:19:26 +0800 |
parents | e4e47d2cdbcd |
children | 3a4d6179e6a9 |
line wrap: on
line diff
--- a/src/animate.h Mon Sep 15 20:33:06 2008 +0800 +++ b/src/animate.h Tue Sep 16 14:19:26 2008 +0800 @@ -28,10 +28,42 @@ typedef struct _mb_word mb_word_t; typedef struct _mb_action mb_action_t; +struct _mb_progm_complete { + event_t event; + mb_progm_t *progm; +}; +typedef struct _mb_progm_complete mb_progm_complete_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 subject_t *mb_progm_get_complete(mb_progm_t *progm); + +/*! \defgroup ani_actions Animation Actions + * @{ + */ +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); +extern mb_action_t *mb_rotate_new(float angle1, float angle2, + coord_t *coord, 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); +/* @} */ + /*! \defgroup act_support Action Supports. * @{ */ -/*! \brief Basic class of nnimation actions. +/*! \brief Basic class of animation actions. * * \sa \ref def_action */ @@ -51,30 +83,6 @@ extern void mb_word_add_action(mb_word_t *word, mb_action_t *act); /* @} */ -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); -/*! \defgroup ani_actions Animation Actions - * @{ - */ -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); -extern mb_action_t *mb_rotate_new(float angle1, float angle2, - coord_t *coord, 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_ */