summaryrefslogtreecommitdiff
path: root/html/download/cdxx.c
diff options
context:
space:
mode:
authorscuri <scuri>2008-10-17 06:10:33 +0000
committerscuri <scuri>2008-10-17 06:10:33 +0000
commit7b52cc13af4e85f1ca2deb6b6c77de9c95ea0dcf (patch)
treed0857278bde2eff784227c57dcaf930346ceb7ac /html/download/cdxx.c
First commit - moving from LuaForge to SourceForge
Diffstat (limited to 'html/download/cdxx.c')
-rw-r--r--html/download/cdxx.c49
1 files changed, 49 insertions, 0 deletions
diff --git a/html/download/cdxx.c b/html/download/cdxx.c
new file mode 100644
index 0000000..ff6a132
--- /dev/null
+++ b/html/download/cdxx.c
@@ -0,0 +1,49 @@
+/*
+ Canvas Draw - CD_XX Driver
+*/
+
+#include "cd.h"
+#include "cdxx.h"
+#include "cd_private.h"
+#include <stdlib.h>
+#include <stdio.h>
+#include <memory.h>
+
+
+struct _cdCtxCanvas
+{
+ cdCanvas* canvas;
+};
+
+
+static void cdkillcanvas(cdCtxCanvas *ctxcanvas)
+{
+ free(ctxcanvas);
+}
+
+static void cdcreatecanvas(cdCanvas *canvas, void *data)
+{
+ cdCtxCanvas* ctxcanvas = (cdCtxCanvas *)malloc(sizeof(cdCtxCanvas));
+
+ ctxcanvas->canvas = canvas;
+ canvas->ctxcanvas = ctxcanvas;
+}
+
+static void cdinittable(cdCanvas* canvas)
+{
+ canvas->KillCanvas = cdkillcanvas;
+}
+
+static cdContext cdXXContext =
+{
+ 0,
+ cdcreatecanvas,
+ cdinittable,
+ NULL,
+ NULL,
+};
+
+cdContext* cdContextXX(void)
+{
+ return &cdXXContext;
+}