Gray C++ Libraries  0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
GrayJSX.h
Go to the documentation of this file.
1 //
5 //
6 #ifndef _INC_GrayJSX_H
7 #define _INC_GrayJSX_H
8 #ifndef NO_PRAGMA_ONCE
9 #pragma once
10 #endif
11 
16 
17 // #define JS_THREADSAFE // used by Open\js_1_80\src\jsapi.h
18 #define USE_JS_TAGS // allow adding new tags to objects.
19 #define USE_JS_PROTO // Make prototypes for all internal script types.
20 #define USE_JS_CUSTOM_CALL // Use a customized version of JS for JS_GetContextCallFunction
21 //#define USE_JS_CUSTOM_THUNK // Use a customized version of JS for method thunking.
22 
23 #ifndef GRAYJS_LINK
24 #if defined(_MFC_VER) || defined(GRAY_STATICLIB) // GRAY_STATICLIB or _MFC_VER can be defined to make Gray* all static lib
25 #define GRAYJS_LINK
26 #else
27 #define GRAYJS_LINK __DECL_IMPORT
28 #endif
29 #endif
30 
31 // declare exposed opaque JS stuff so we don't have to #include "jsapi.h" until later
32 struct JSPropertySpec;
33 struct JSFunctionSpec;
34 struct JSClass;
35 struct JSScript;
36 struct JSObject;
37 struct JSContext;
38 struct JSRuntime;
39 struct JSErrorReport;
40 
41 namespace GrayJS
42 {
43 #ifdef USE_64BIT
44 #if defined(__GNUC__)
45  typedef long long GRAY_jsval;
46 #else
47  typedef INT64 GRAY_jsval;
48 #endif
49 #else
50  typedef long GRAY_jsval;
51 #endif
52 
53  typedef int GRAY_JSBool;
54  typedef GRAY_JSBool(_cdecl* GRAY_JSNative)(JSContext *pjsCx, JSObject* pjsObj, UINT argc, GRAY_jsval *argv, GRAY_jsval *rval);
55  typedef unsigned int GRAY_uintN;
56 
57  using namespace Gray;
58  using namespace GrayLib;
59 };
60 
61 #endif // _INC_GrayJSX_H
Definition: cJSObject.h:36
unsigned int GRAY_uintN
Definition: GrayJSX.h:55
int GRAY_JSBool
Definition: GrayJSX.h:53
long GRAY_jsval
match this to 'jsval' so i don't have to use the "#include "jsapi.h""
Definition: GrayJSX.h:50
GRAY_JSBool(_cdecl * GRAY_JSNative)(JSContext *pjsCx, JSObject *pjsObj, UINT argc, GRAY_jsval *argv, GRAY_jsval *rval)
Definition: GrayJSX.h:54
Definition: cMesh.h:22
< The main namespace for all Core functions.
Definition: GrayCore.cpp:14
Definition: cJSObject.h:27
Definition: cJSObject.h:28
Definition: cJSObject.h:26