X-Git-Url: https://hackdaworld.org/gitweb/?p=physik%2Fnlsop.git;a=blobdiff_plain;f=dfbapi.h;h=e5333cb037553b7f0f6ab06fe2754467d22981fa;hp=54ab56b3210cad1f840bc4ac5175f73963619798;hb=5a71cbde820d64c0bca211edcdc0b6af4498e727;hpb=ac3628afff01679dfa9da69cf010764970e40be7 diff --git a/dfbapi.h b/dfbapi.h index 54ab56b..e5333cb 100644 --- a/dfbapi.h +++ b/dfbapi.h @@ -5,13 +5,19 @@ * */ +#ifndef DFBAPI_H +#define DFBAPI_H + +#ifdef USE_DFB_API #include +#endif /* two dimensional lattice */ #define X_GAP 5 #define Y_GAP X_GAP #define RED 1 +#define MAX_EXTRA 20 typedef struct __d2_lattice { @@ -24,11 +30,15 @@ typedef struct __d2_lattice unsigned char *status; /* status&1 -> red, else blue */ int *extra; /* store extra values */ void *v_ptr; /* void ptr, for any use */ +#ifdef USE_DFB_API IDirectFB *dfb; IDirectFBSurface *p_surface; IDirectFBFont *font; IDirectFBInputDevice *keyboard; IDirectFBEventBuffer *k_buffer; +#else + char *foo1,*foo2,*foo3,*foo4,*foo5; +#endif } d2_lattice; typedef struct __d3_lattice @@ -42,19 +52,27 @@ typedef struct __d3_lattice unsigned char *status; /* status&1 -> red, else blue */ int *extra; /* store extra values */ void *v_ptr; /* void ptr, for any use */ +#ifdef USE_DFB_API IDirectFB *dfb; IDirectFBSurface *p_surface; IDirectFBFont *font; IDirectFBInputDevice *keyboard; IDirectFBEventBuffer *k_buffer; +#else + char *foo1,*foo2,*foo3,*foo4,*foo5; +#endif } d3_lattice; /* function prototypes */ -int d2_lattice_init(int *argc,char **argv,d2_lattice *d2_l,int x,int y); +int d2_lattice_init(int *argc,char **argv,d2_lattice *d2_l); int d2_lattice_release(d2_lattice *d2_l); -int d2_lattice_draw(d2_lattice *d2_l,int x,int y,int arg_c,char **arg_v); -int d3_lattice_init(int *argc,char **argv,d3_lattice *d3_l,int x,int y,int z); +int d2_lattice_draw(d2_lattice *d2_l,int x,int y,int arg_c,char **arg_v,unsigned char mode); +int d3_lattice_init(int *argc,char **argv,d3_lattice *d3_l); int d3_lattice_release(d3_lattice *d3_l); -int d3_lattice_draw(d3_lattice *d3_l,int x,int y,int z,int arg_c,char **arg_v); -int dx_lattice_get_color(unsigned char *status,unsigned char *r,unsigned char *g,unsigned char *b); +int d3_lattice_draw(d3_lattice *d3_l,int x,int y,int z,int arg_c,char **arg_v,unsigned char mode); +int d2_event_init(d2_lattice *d2_l); +int d3_event_init(d3_lattice *d3_l); +int scan_event(d3_lattice *d3_l,int *x,int *y,int *z,int *q,int *esc,int *switchmode); +int dx_lattice_get_color(unsigned char *status,unsigned char *r,unsigned char *g,unsigned char *b,unsigned char mode); +#endif /* DFBAPI_H */