diff options
Diffstat (limited to 'html/download/cdxx.c')
-rw-r--r-- | html/download/cdxx.c | 49 |
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; +} |