From 9162f4554f0764ee0ded3e5e7af87bc501c65005 Mon Sep 17 00:00:00 2001 From: Tj Holowaychuk Date: Tue, 16 Nov 2010 17:25:55 -0800 Subject: [PATCH] Added closure.h --- src/Canvas.cc | 14 +------------- src/closure.h | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 13 deletions(-) create mode 100644 src/closure.h diff --git a/src/Canvas.cc b/src/Canvas.cc index 1d2bc8b..8fafc63 100644 --- a/src/Canvas.cc +++ b/src/Canvas.cc @@ -6,6 +6,7 @@ // #include "Canvas.h" +#include "closure.h" #include #include #include @@ -22,19 +23,6 @@ #define BUFFER_DATA(buf) buf->data() #endif -/* - * PNG stream closure. - */ - -typedef struct { - Persistent pfn; - Handle fn; - unsigned len; - uint8_t *data; - Canvas *canvas; - cairo_status_t status; -} closure_t; - /* * Initialize Canvas. */ diff --git a/src/closure.h b/src/closure.h new file mode 100644 index 0000000..2504771 --- /dev/null +++ b/src/closure.h @@ -0,0 +1,24 @@ + +// +// closure.h +// +// Copyright (c) 2010 LearnBoost +// + +#ifndef __NODE_CLOSURE_H__ +#define __NODE_CLOSURE_H__ + +/* + * PNG stream closure. + */ + +typedef struct { + Persistent pfn; + Handle fn; + unsigned len; + uint8_t *data; + Canvas *canvas; + cairo_status_t status; +} closure_t; + +#endif /* __NODE_CLOSURE_H__ */