]> git.imager.perl.org - imager.git/blob - ext.h
eliminate use vars
[imager.git] / ext.h
1 #include "imdatatypes.h"
2
3 #ifndef IMAGER_EXT_H
4 #define IMAGER_EXT_H
5
6 /* structures for passing data between Imager-plugin and the Imager-module */
7
8 typedef struct {
9   char *name;
10   void (*iptr)(void* ptr);
11   char *pcode;
12 } func_ptr;
13
14
15 typedef struct {
16   int (*getstr)(void *hv_t,char* key,char **store);
17   int (*getint)(void *hv_t,char *key,int *store);
18   int (*getdouble)(void *hv_t,char* key,double *store);
19   int (*getvoid)(void *hv_t,char* key,void **store);
20   int (*getobj)(void *hv_t,char* key,char* type,void **store);
21 } UTIL_table_t;
22
23 typedef struct {
24   undef_int (*i_has_format)(char *frmt);
25   i_color*(*ICL_set)(i_color *cl,unsigned char r,unsigned char g,unsigned char b,unsigned char a);
26   void (*ICL_info)(const i_color *cl);
27
28   im_context_t (*im_get_context_f)(void);
29   i_img*(*im_img_empty_ch_f)(im_context_t, i_img *im,i_img_dim x,i_img_dim y,int ch);
30   void(*i_img_exorcise_f)(i_img *im);
31
32   void(*i_img_info_f)(i_img *im,i_img_dim *info);
33   
34   void(*i_img_setmask_f)(i_img *im,int ch_mask);
35   int (*i_img_getmask_f)(i_img *im);
36   
37   /*
38   int (*i_ppix)(i_img *im,i_img_dim x,i_img_dim y,i_color *val);
39   int (*i_gpix)(i_img *im,i_img_dim x,i_img_dim y,i_color *val);
40   */
41   void(*i_box)(i_img *im,i_img_dim x1,i_img_dim y1,i_img_dim x2,i_img_dim y2,const i_color *val);
42   void(*i_line)(i_img *im,i_img_dim x1,i_img_dim y1,i_img_dim x2,i_img_dim y2,const i_color *val,int endp);
43   void(*i_arc)(i_img *im,i_img_dim x,i_img_dim y,double rad,double d1,double d2,const i_color *val);
44   void(*i_copyto)(i_img *im,i_img *src,i_img_dim x1,i_img_dim y1,i_img_dim x2,i_img_dim y2,i_img_dim tx,i_img_dim ty);
45   void(*i_copyto_trans)(i_img *im,i_img *src,i_img_dim x1,i_img_dim y1,i_img_dim x2,i_img_dim y2,i_img_dim tx,i_img_dim ty,const i_color *trans);
46   int(*i_rubthru)(i_img *im,i_img *src,i_img_dim tx,i_img_dim ty, i_img_dim src_minx, i_img_dim src_miny, i_img_dim src_maxx, i_img_dim src_maxy);
47
48 } symbol_table_t;
49
50 #endif