5 foo's ;)
[physik/nlsop.git] / dfbapi.h
1 /* 
2  * scientific visualization api for direct framebuffer
3  *
4  * author: hackbard@hackdaworld.dyndns.org
5  *
6  */
7
8 #ifndef DFBAPI_H
9 #define DFBAPI_H
10
11 #ifdef USE_DFB_API
12 #include <directfb.h>
13 #endif
14
15 /* two dimensional lattice */
16
17 #define X_GAP 5
18 #define Y_GAP X_GAP
19 #define RED 1
20
21 typedef struct __d2_lattice
22 {
23  int max_x,max_y;
24  int s_height,s_width;
25  int fakt_x,fakt_y;
26  int info_x,info_y;
27  int info_w,info_h;
28  int font_h;
29  unsigned char *status; /* status&1 -> red, else blue */
30  int *extra; /* store extra values */
31  void *v_ptr; /* void ptr, for any use */
32 #ifdef USE_DFB_API
33  IDirectFB *dfb;
34  IDirectFBSurface *p_surface;
35  IDirectFBFont *font;
36  IDirectFBInputDevice *keyboard;
37  IDirectFBEventBuffer *k_buffer;
38 #else
39  char *foo1,*foo2,foo3,foo4,foo5;
40 #endif
41 } d2_lattice;
42
43 typedef struct __d3_lattice
44 {
45  int max_x,max_y,max_z;
46  int s_height,s_width;
47  int fakt_x,fakt_y;
48  int info_x,info_y;
49  int info_w,info_h;
50  int font_h;
51  unsigned char *status; /* status&1 -> red, else blue */
52  int *extra; /* store extra values */
53  void *v_ptr; /* void ptr, for any use */
54 #ifdef USE_DFB_API
55  IDirectFB *dfb;
56  IDirectFBSurface *p_surface;
57  IDirectFBFont *font;
58  IDirectFBInputDevice *keyboard;
59  IDirectFBEventBuffer *k_buffer;
60 #else
61  char *foo1,*foo2,foo3,foo4,foo5;
62 #endif
63 } d3_lattice;
64
65 /* function prototypes */
66 int d2_lattice_init(int *argc,char **argv,d2_lattice *d2_l);
67 int d2_lattice_release(d2_lattice *d2_l);
68 int d2_lattice_draw(d2_lattice *d2_l,int x,int y,int arg_c,char **arg_v);
69 int d3_lattice_init(int *argc,char **argv,d3_lattice *d3_l);
70 int d3_lattice_release(d3_lattice *d3_l);
71 int d3_lattice_draw(d3_lattice *d3_l,int x,int y,int z,int arg_c,char **arg_v);
72 int d2_event_init(d2_lattice *d2_l);
73 int d3_event_init(d3_lattice *d3_l);
74 int scan_event(d3_lattice *d3_l,int *x,int *y,int *z,int *q,int *esc);
75 int dx_lattice_get_color(unsigned char *status,unsigned char *r,unsigned char *g,unsigned char *b);
76
77 #endif /* DFBAPI_H */