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__ */