added dfb api (just starting, not yet working ...)
[my-code/api.git] / dfb / dfb.h
diff --git a/dfb/dfb.h b/dfb/dfb.h
new file mode 100644 (file)
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 <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <errno.h>
+#include <directfb.h>
+
+#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