Mercurial > MadButterfly
view nodejs/mbfly_njs.h @ 561:a3c13c2a4792 Android_Skia
Function template on runtime object for xnjsmb_coord_new()
author | Thinker K.F. Li <thinker@branda.to> |
---|---|
date | Mon, 07 Jun 2010 12:12:03 +0800 |
parents | ef078d7c57b4 |
children | 1b6402f07cd4 |
line wrap: on
line source
#ifndef __MBFLY_NJS_H_ #define __MBFLY_NJS_H_ #include <v8.h> extern "C" { #include <mb.h> } #define THROW(x) \ do { \ v8::Handle<v8::Value> exc; \ exc = v8::Exception::Error(v8::String::New(x)); \ return v8::ThrowException(exc); \ } while(0) #define UNWRAP(o) v8::External::Unwrap((o)->GetInternalField(0)) #define WRAP(o, v) (o)->SetInternalField(0, v8::External::Wrap(v)) #define SET(o, n, v) (o)->Set(v8::String::New(n), v) #define GET(o, n) (o)->Get(v8::String::New(n)) redraw_man_t *xnjsmb_rt_rdman(v8::Handle<v8::Object> mbrt); v8::Handle<v8::Value> xnjsmb_coord_new(const v8::Arguments &args); #endif /* __MBFLY_NJS_H_ */