Intial commit
[profile/ivi/w3m.git] / w3mimg / w3mimg.h
1 /* $Id: w3mimg.h,v 1.8 2003/07/13 16:19:10 ukai Exp $ */
2 #include "config.h"
3
4 #ifdef USE_W3MIMG_FB
5 #include "w3mimg/fb/fb.h"
6 #include "w3mimg/fb/fb_img.h"
7 #endif
8
9 typedef struct {
10     void *pixmap;               /* driver specific */
11     int width;
12     int height;
13 } W3MImage;
14
15 typedef struct _w3mimg_op {
16     void *priv;                 /* driver specific data */
17     int width, height;          /* window width, height */
18     int offset_x, offset_y;     /* offset */
19     int clear_margin;
20     int max_anim;
21
22     int (*init) (struct _w3mimg_op * self);
23     int (*finish) (struct _w3mimg_op * self);
24     int (*active) (struct _w3mimg_op * self);
25     void (*set_background) (struct _w3mimg_op * self, char *background);
26     void (*sync) (struct _w3mimg_op * self);
27     void (*close) (struct _w3mimg_op * self);
28
29     int (*load_image) (struct _w3mimg_op * self, W3MImage * img, char *fname,
30                        int w, int h);
31     int (*show_image) (struct _w3mimg_op * self, W3MImage * img,
32                        int sx, int sy, int sw, int sh, int x, int y);
33     void (*free_image) (struct _w3mimg_op * self, W3MImage * img);
34     int (*get_image_size) (struct _w3mimg_op * self, W3MImage * img,
35                            char *fname, int *w, int *h);
36     int (*clear) (struct _w3mimg_op * self, int x, int y, int w, int h);
37 } w3mimg_op;
38
39 #ifdef USE_W3MIMG_X11
40 extern w3mimg_op *w3mimg_x11open();
41 #endif
42 #ifdef USE_W3MIMG_FB
43 extern w3mimg_op *w3mimg_fbopen();
44 #endif
45
46 extern w3mimg_op *w3mimg_open();