-
Notifications
You must be signed in to change notification settings - Fork 6
/
common.h
38 lines (25 loc) · 1.57 KB
/
common.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#ifndef __V8_DIRECTFB__COMMON_H__
#define __V8_DIRECTFB__COMMON_H__
#include <v8.h>
#include <directfb.h>
#include <directfbgl.h>
#include <directfb_util.h>
//namespace DirectFB
//{
/**********************************************************************************************************************/
#define V8_DIRECTFB_INTERFACE( obj, type ) \
(static_cast<type*>( (obj)->GetPointerFromInternalField( 0 )))
#define V8_DIRECTFB_CALL( expr ) \
do { \
DFBResult ret = (DFBResult)(expr); \
\
if (ret) { \
D_DERROR( (DirectResult) ret, "V8: %s\n", #expr ); \
return v8::ThrowException( v8::String::New( DirectFBErrorString(ret) ) ); \
} \
} while (0)
/**********************************************************************************************************************/
v8::Handle<v8::Object> Construct( v8::Handle<v8::ObjectTemplate> templ, void *interface );
v8::Handle<v8::Value> IAny_release( const v8::Arguments& args );
//}
#endif