Mercurial > MadButterfly
view nodejs/njs_mb_supp.h @ 1161:a7faab54e8f8
Fix broken of running animation
- Running animation is stop automatically after a certain time.
- It is 300ms according MBScene._updateUI().
- It is caused by notification of changing DOM tree. The
notification handlers would call MBScene.updateUI() to update
framelines and buttons.
- MBScene.updateUI() would call MBScene.show() after 300ms,
MBScene.show() calls MBScene.parseScene() in turn.
- MBScene.parseScene() would remove duplicate group that is using
by code of running animation, MBScene.doRunNext(). It make
running animation stop.
- fixed by setting MBScene.lockui when a running animation is started
or stoped.
author | Thinker K.F. Li <thinker@codemud.net> |
---|---|
date | Tue, 28 Dec 2010 13:35:34 +0800 |
parents | e415c55b4a0d |
children |
line wrap: on
line source
// -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 4; -*- // vim: sw=4:ts=8:sts=4 #ifndef __NJS_MB_SUPP_H_ #define __NJS_MB_SUPP_H_ #include <ev.h> #include <mb_backend.h> typedef struct _njs_runtime { mb_rt_t *mb_rt; } njs_runtime_t; extern void njs_mb_reg_timer_man(void); extern void njs_mb_reg_IO_man(void); /* extern void njs_mb_init_handle_connection(njs_runtime_t *rt); */ extern void njs_mb_free(njs_runtime_t *rt); extern njs_runtime_t *njs_mb_new(char *display_name, int w, int h); extern void njs_mb_free_keep_win(njs_runtime_t *rt); extern njs_runtime_t *njs_mb_new_with_win(void *display, long win); extern int njs_mb_flush(njs_runtime_t *rt); extern void njs_mb_handle_single_event(njs_runtime_t *rt, void *evt); extern void njs_mb_no_more_event(njs_runtime_t *rt); extern mb_rt_t *_njs_mb_get_runtime(njs_runtime_t *rt); #define njs_mb_kbevents(rt) mb_runtime_kbevents((rt)->mb_rt) #define njs_mb_rdman(rt) mb_runtime_rdman((rt)->mb_rt) #define njs_mb_timer_man(rt) mb_runtime_timer_man((rt)->mb_rt) #define njs_mb_observer_factory(rt) mb_runtime_observer_factory((rt)->mb_rt) #define njs_mb_img_ldr(rt) mb_runtime_img_ldr((rt)->mb_rt) #endif /* __NJS_MB_SUPP_H_ */