initial checkin of ising
[physik/ising.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  unsigned char *status; /* status&1 -> red, else blue */
24  IDirectFB *dfb;
25  IDirectFBSurface *p_surface;
26  IDirectFBFont *font;
27  IDirectFBInputDevice *keyboard;
28  IDirectFBEventBuffer *k_buffer;
29 } d2_lattice;
30
31 /* function prototypes */
32 int d2_lattice_init(int *argc,char **argv,d2_lattice *d2_l,int x,int y);
33 int d2_lattice_release(d2_lattice *d2_l);
34 int d2_lattice_get_color(unsigned char *status,unsigned char *r,unsigned char *g,unsigned char *b);
35 int d2_lattice_draw(d2_lattice *d2_l,int x,int y,int arg_c,char **arg_v);
36