Browse Source

Added closure.h

v1.x
Tj Holowaychuk 14 years ago
parent
commit
9162f4554f
  1. 14
      src/Canvas.cc
  2. 24
      src/closure.h

14
src/Canvas.cc

@ -6,6 +6,7 @@
//
#include "Canvas.h"
#include "closure.h"
#include <assert.h>
#include <stdlib.h>
#include <string.h>
@ -22,19 +23,6 @@
#define BUFFER_DATA(buf) buf->data()
#endif
/*
* PNG stream closure.
*/
typedef struct {
Persistent<Function> pfn;
Handle<Function> fn;
unsigned len;
uint8_t *data;
Canvas *canvas;
cairo_status_t status;
} closure_t;
/*
* Initialize Canvas.
*/

24
src/closure.h

@ -0,0 +1,24 @@
//
// closure.h
//
// Copyright (c) 2010 LearnBoost <tj@learnboost.com>
//
#ifndef __NODE_CLOSURE_H__
#define __NODE_CLOSURE_H__
/*
* PNG stream closure.
*/
typedef struct {
Persistent<Function> pfn;
Handle<Function> fn;
unsigned len;
uint8_t *data;
Canvas *canvas;
cairo_status_t status;
} closure_t;
#endif /* __NODE_CLOSURE_H__ */
Loading…
Cancel
Save