Subversion Repositories Kolibri OS

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
4973 right-hear 1
#ifndef __LIBMGFX_H
2
#define __LIBMGFX_H
3
 
4
#include
5
#include
6
#include
7
/* #include */
8
 
9
typedef unsigned char byte;
10
 
11
typedef struct {
12
 int width,height;
13
 int bpp;
14
 byte * the_image;
15
 byte * pal;
16
 struct mgfx_image_format * fmt;
17
} mgfx_image_t;
18
 
19
struct mgfx_image_format {
20
 char * format_name;
21
 char * fmt_ext;
22
 int (* load_fn)(FILE * f,mgfx_image_t *);
23
 struct mgfx_image_format * next;
24
};
25
 
26
void register_image_format(struct mgfx_image_format * fmt);
27
struct mgfx_image_format * get_image_format(char * fname);
28
 
29
#define _PIC_OK			 0
30
#define _PICERR_NOFILE		-1
31
#define _PICERR_NOMEM		-2
32
#define _PICERR_BADMAGIC	-3
33
#define _PICERR_NOCOLOURMAP	-4
34
#define _PICERR_NOIMAGE		-5
35
#define _PICERR_UNSUPPORTED	-6
36
#define _PICERR_CORRUPT		-7
37
#define _PICERR_SHOWN_ALREADY	-8
38
#define _PICERR_ISRLE		-9
39
 
40
int load_image(char * fname,mgfx_image_t ** the_img);
41
void free_image(mgfx_image_t * img);
42
void paint_image(int x,int y,mgfx_image_t * img);
43
 
44
void mgfx_register_jpeg(void);
45
 
46
void init_mgfx_library(void);
47
 
48
#endif