added 2 newview modes: c conc & a pressure
[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 #define MAX_EXTRA 20
21
22 typedef struct __d2_lattice
23 {
24  int max_x,max_y;
25  int s_height,s_width;
26  int fakt_x,fakt_y;
27  int info_x,info_y;
28  int info_w,info_h;
29  int font_h;
30  unsigned char *status; /* status&1 -> red, else blue */
31  int *extra; /* store extra values */
32  void *v_ptr; /* void ptr, for any use */
33 #ifdef USE_DFB_API
34  IDirectFB *dfb;
35  IDirectFBSurface *p_surface;
36  IDirectFBFont *font;
37  IDirectFBInputDevice *keyboard;
38  IDirectFBEventBuffer *k_buffer;
39 #else
40  char *foo1,*foo2,*foo3,*foo4,*foo5;
41 #endif
42 } d2_lattice;
43
44 typedef struct __d3_lattice
45 {
46  int max_x,max_y,max_z;
47  int s_height,s_width;
48  int fakt_x,fakt_y;
49  int info_x,info_y;
50  int info_w,info_h;
51  int font_h;
52  unsigned char *status; /* status&1 -> red, else blue */
53  int *extra; /* store extra values */
54  void *v_ptr; /* void ptr, for any use */
55 #ifdef USE_DFB_API
56  IDirectFB *dfb;
57  IDirectFBSurface *p_surface;
58  IDirectFBFont *font;
59  IDirectFBInputDevice *keyboard;
60  IDirectFBEventBuffer *k_buffer;
61 #else
62  char *foo1,*foo2,*foo3,*foo4,*foo5;
63 #endif
64 } d3_lattice;
65
66 /* function prototypes */
67 int d2_lattice_init(int *argc,char **argv,d2_lattice *d2_l);
68 int d2_lattice_release(d2_lattice *d2_l);
69 int d2_lattice_draw(d2_lattice *d2_l,int x,int y,int arg_c,char **arg_v,unsigned char mode);
70 int d3_lattice_init(int *argc,char **argv,d3_lattice *d3_l);
71 int d3_lattice_release(d3_lattice *d3_l);
72 int d3_lattice_draw(d3_lattice *d3_l,int x,int y,int z,int arg_c,char **arg_v,unsigned char mode);
73 int d2_event_init(d2_lattice *d2_l);
74 int d3_event_init(d3_lattice *d3_l);
75 int scan_event(d3_lattice *d3_l,int *x,int *y,int *z,int *q,int *esc,int *switchmode);
76 int dx_lattice_get_color(unsigned char *status,unsigned char *r,unsigned char *g,unsigned char *b,unsigned char mode);
77
78 #endif /* DFBAPI_H */