Fix typo in the Gentoo initscript.
[fbsplash.git] / core / src / mng_splash.h
blob41668e87109170284d2ed19ba8756fd24270ce6e
1 #ifndef _FBANIM_MNG_H_
2 #define _FBANIM_MNG_H_
4 #include <stdarg.h>
5 #include <stdio.h>
6 #include <sys/time.h>
7 #include <libmng.h>
9 typedef struct {
10 void *data;
11 int len, ptr, open;
13 char *canvas;
14 int canvas_h, canvas_w, canvas_bytes_pp;
16 int wait_msecs;
17 struct timeval start_time;
18 int displayed_first;
19 int num_frames;
20 } mng_anim;
22 struct anim;
24 /* mng_render.c */
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);
33 /* mng_callbacks.c */
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, ...)
44 va_list ap;
46 mng_int8 severity;
47 mng_chunkid chunkname;
48 mng_uint32 chunkseq;
49 mng_int32 extra1, extra2;
50 mng_pchar err_text;
51 mng_getlasterror(mngh, &severity, &chunkname, &chunkseq,
52 &extra1, &extra2, &err_text);
53 va_start(ap, s);
54 vfprintf(stderr, s, ap);
55 va_end(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); \
60 } while (0)
62 #endif /* _FBANIM_MNG_H_ */