From: hackbard Date: Sat, 2 Jul 2005 03:53:41 +0000 (+0000) Subject: added dfb api (just starting, not yet working ...) X-Git-Url: https://hackdaworld.org/gitweb/?a=commitdiff_plain;h=3ed1ea9463c7eb66d82c5e28612a52f0f2ce72da;p=my-code%2Fapi.git added dfb api (just starting, not yet working ...) --- diff --git a/CHANGELOG b/CHANGELOG index 2aacf06..7711b59 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,8 @@ +*) 2005-07-2 + + - remembered that there is a CHANGELOG, added dfb api + (not working yet) + *) 2004-06-26 - begin list api diff --git a/dfb/dfb.c b/dfb/dfb.c new file mode 100644 index 0000000..8be3eb9 --- /dev/null +++ b/dfb/dfb.c @@ -0,0 +1,20 @@ +/* dfbt.c -- direct framebuffer stuff + * + * author: hackbard@hackdaworld.org + * + */ + +#include "dfb.h" + +int dfb_init(t_dfb *dfb,int outfd,int &arg_c,char *arg_v) { + + dprintf(outfd,"[dfb] initializing dfb system ...\n"); + + dfb->outfd=outfd; + + DFBInit(arg_c,arg_v); + + DirectFBCreate(&(dfb->iface)); + + return DFB_SUCCESS; +} diff --git a/dfb/dfb.h b/dfb/dfb.h new file mode 100644 index 0000000..bf33003 --- /dev/null +++ b/dfb/dfb.h @@ -0,0 +1,37 @@ +/* dfb.h -- dfb headers */ + +#ifndef DFB_H +#define DFB_H + +/* includes */ +#define _GNU_SOURCE +#include +#include +#include +#include +#include +#include + +#include "list.h" + +/* defines */ +#define DFB_SUCCESS 1 +#define DFB_ERROR -1 + +/* specific variables */ +typedef struct s_dfb { + int outfd; + IDirectFB *iface; + IDirectFBSurface primary; + t_list image; + t_list video; + t_list font; + int max_x; + int max_y; + unsigned char mode; +} t_dfb; + +/* function prototypes */ +int dfb_init(t_dfb *dfb,int outfd,int &arg_c,char *arg_v); + +#endif