14 int canvas_h
, canvas_w
, canvas_bytes_pp
;
17 struct timeval start_time
;
25 extern mng_handle
mng_load(char *filename
, int *w
, int *h
);
26 extern void mng_done(mng_handle mngh
);
27 extern mng_retcode
mng_render_next(mng_handle mngh
);
28 extern void anim_prerender(struct fbspl_theme
*theme
, struct anim
*a
, bool force
);
29 extern void anim_render_canvas(struct anim
*a
);
30 extern void anim_render(struct fbspl_theme
*theme
, struct anim
*a
, rect
*re
, u8
* tg
);
31 extern mng_retcode
mng_render_proportional(mng_handle mngh
, int progress
);
34 extern mng_ptr
fb_mng_memalloc(mng_size_t len
);
35 extern void fb_mng_memfree(mng_ptr p
, mng_size_t len
);
36 extern mng_retcode
mng_init_callbacks(mng_handle handle
);
37 extern mng_retcode
mng_display_restart(mng_handle mngh
);
39 extern int load_anims(struct fbspl_theme
*theme
);
41 /* MNG-error printing functions */
42 static inline void __print_mng_error(mng_handle mngh
, char* s
, ...)
47 mng_chunkid chunkname
;
49 mng_int32 extra1
, extra2
;
51 mng_getlasterror(mngh
, &severity
, &chunkname
, &chunkseq
,
52 &extra1
, &extra2
, &err_text
);
54 vfprintf(stderr
, s
, ap
);
56 fprintf(stderr
, ": %s\n", err_text
);
58 #define print_mng_error(mngh, s, x...) do { \
59 __print_mng_error(mngh, "%s: "s, __FUNCTION__, ## x); \
62 #endif /* _FBANIM_MNG_H_ */