Mercurial > MadButterfly
comparison src/animate.c @ 122:17e97e92b76e
Encapsulate X_MB_runtime_t and support X keyboard events.
author | Thinker K.F. Li <thinker@branda.to> |
---|---|
date | Mon, 15 Sep 2008 20:33:06 +0800 |
parents | 5df7403b6fbc |
children | 9e2316dc6ecb |
comparison
equal
deleted
inserted
replaced
121:76ba6fd61c7d | 122:17e97e92b76e |
---|---|
72 #include "redraw_man.h" | 72 #include "redraw_man.h" |
73 #include "mb_timer.h" | 73 #include "mb_timer.h" |
74 #include "animate.h" | 74 #include "animate.h" |
75 | 75 |
76 | 76 |
77 #define STEP_INTERVAL 50000 | 77 #define STEP_INTERVAL 90000 |
78 #define ASSERT(x) | 78 #define ASSERT(x) |
79 | 79 |
80 /*! \brief A word is a set of concurrent actions in a program. | 80 /*! \brief A word is a set of concurrent actions in a program. |
81 */ | 81 */ |
82 struct _mb_word { | 82 struct _mb_word { |
199 act = STAILQ_NEXT(mb_action_t, next, act)) { | 199 act = STAILQ_NEXT(mb_action_t, next, act)) { |
200 act->stop(act, tmo, rdman); | 200 act->stop(act, tmo, rdman); |
201 } | 201 } |
202 } | 202 } |
203 | 203 |
204 /* | 204 /*! \brief Time stepping for a program. |
205 * | |
205 * Any two actions in concurrent words never change the same attribute. | 206 * Any two actions in concurrent words never change the same attribute. |
206 * Start time of words in a program are specified in incremental order. | 207 * Start time of words in a program are specified in incremental order. |
208 * | |
209 * \note Program will take a big step at last monent. It is because | |
210 * mb_progm_step() running mb_word_stop() if the word being stop | |
211 * between now and next_tmo. It is not obviously if time stepping | |
212 * small. | |
207 */ | 213 */ |
208 static void mb_progm_step(const mb_timeval_t *tmo, | 214 static void mb_progm_step(const mb_timeval_t *tmo, |
209 const mb_timeval_t *now, | 215 const mb_timeval_t *now, |
210 void *arg) { | 216 void *arg) { |
211 mb_progm_t *progm = (mb_progm_t *)arg; | 217 mb_progm_t *progm = (mb_progm_t *)arg; |