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