![]() |
http://www.sim.no/ http://www.coin3d.org/ |
00001 #ifndef COIN_GLUE_SPIDERMONKEY_H 00002 #define COIN_GLUE_SPIDERMONKEY_H 00003 00004 /**************************************************************************\ 00005 * 00006 * This file is part of the Coin 3D visualization library. 00007 * Copyright (C) by Kongsberg Oil & Gas Technologies. 00008 * 00009 * This library is free software; you can redistribute it and/or 00010 * modify it under the terms of the GNU General Public License 00011 * ("GPL") version 2 as published by the Free Software Foundation. 00012 * See the file LICENSE.GPL at the root directory of this source 00013 * distribution for additional information about the GNU GPL. 00014 * 00015 * For using Coin with software that can not be combined with the GNU 00016 * GPL, and for taking advantage of the additional benefits of our 00017 * support services, please contact Kongsberg Oil & Gas Technologies 00018 * about acquiring a Coin Professional Edition License. 00019 * 00020 * See http://www.coin3d.org/ for more information. 00021 * 00022 * Kongsberg Oil & Gas Technologies, Bygdoy Alle 5, 0257 Oslo, NORWAY. 00023 * http://www.sim.no/ sales@sim.no coin-support@coin3d.org 00024 * 00025 \**************************************************************************/ 00026 00027 #include <Inventor/C/basic.h> 00028 00029 #ifdef __cplusplus 00030 extern "C" { 00031 #endif /* __cplusplus */ 00032 00033 #if 0 /* to get proper auto-indentation in emacs */ 00034 } 00035 #endif /* emacs indentation */ 00036 00037 00038 /* 00039 This is used to detect whether the 'jsapi.h' was included by the 00040 user or not. The JSVERSION_IS_ECMA is defined in the 'jspubtd.h' 00041 file in the SpiderMonkey header directory. 00042 */ 00043 #ifndef JSVERSION_IS_ECMA 00044 00045 00046 /* 00047 Structs and defines. 00048 */ 00049 typedef int JSBool; 00050 typedef long jsword; 00051 typedef jsword jsval; 00052 typedef jsword jsid; 00053 typedef int intN; 00054 typedef unsigned int uintN; 00055 typedef uint16_t jschar; 00056 00057 typedef int32_t jsrefcount; 00058 typedef uint8_t jsbytecode; 00059 typedef uint32_t JSHashNumber; 00060 typedef uint32_t jsatomid; 00061 00062 typedef enum JSType { 00063 JSTYPE_VOID, 00064 JSTYPE_OBJECT, 00065 JSTYPE_FUNCTION, 00066 JSTYPE_STRING, 00067 JSTYPE_NUMBER, 00068 JSTYPE_BOOLEAN, 00069 JSTYPE_LIMIT 00070 } JSType; 00071 00072 typedef enum JSAccessMode { 00073 JSACC_PROTO = 0, 00074 JSACC_PARENT = 1, 00075 JSACC_IMPORT = 2, 00076 JSACC_WATCH = 3, 00077 JSACC_READ = 4, 00078 JSACC_WRITE = 8, 00079 JSACC_LIMIT 00080 } JSAccessMode; 00081 00082 typedef enum JSGCStatus { 00083 JSGC_BEGIN, 00084 JSGC_END, 00085 JSGC_MARK_END, 00086 JSGC_FINALIZE_END 00087 } JSGCStatus; 00088 00089 struct JSIdArray { 00090 int32_t length; 00091 jsid vector[1]; 00092 }; 00093 00094 typedef void JSRuntime; 00095 typedef void JSContext; 00096 typedef void JSObject; 00097 typedef void JSObjectOps; 00098 typedef void JSXDRState; 00099 typedef void JSString; 00100 typedef struct JSClass JSClass; 00101 typedef struct JSPropertySpec JSPropertySpec; 00102 typedef int JSVersion; 00103 typedef void JSFunction; 00104 typedef struct JSFunctionSpec JSFunctionSpec; 00105 typedef struct JSErrorReport JSErrorReport; 00106 typedef void JSScript; 00107 00108 #define JS_DLL_CALLBACK /* FIXME: set up this define properly. 20050601 mortene. */ 00109 00110 typedef JSBool (* JS_DLL_CALLBACK JSPropertyOp)(JSContext *, JSObject *, jsval, jsval *); 00111 typedef JSBool (* JS_DLL_CALLBACK JSEnumerateOp)(JSContext *, JSObject *); 00112 typedef JSBool (* JS_DLL_CALLBACK JSResolveOp)(JSContext *, JSObject *, jsval); 00113 typedef JSBool (* JS_DLL_CALLBACK JSConvertOp)(JSContext *, JSObject *, JSType, jsval *); 00114 typedef void (* JS_DLL_CALLBACK JSFinalizeOp)(JSContext *, JSObject *); 00115 typedef JSObjectOps * (* JS_DLL_CALLBACK JSGetObjectOps)(JSContext *, JSClass *); 00116 typedef JSBool (* JS_DLL_CALLBACK JSCheckAccessOp)(JSContext *, JSObject *, jsval, JSAccessMode, jsval *); 00117 typedef JSBool (* JS_DLL_CALLBACK JSNative)(JSContext *, JSObject *, uintN, jsval *, jsval *); 00118 typedef JSBool (* JS_DLL_CALLBACK JSXDRObjectOp)(JSXDRState *, JSObject **); 00119 typedef JSBool (* JS_DLL_CALLBACK JSHasInstanceOp)(JSContext *, JSObject *, jsval, JSBool *); 00120 typedef uint32_t (* JS_DLL_CALLBACK JSMarkOp)(JSContext *, JSObject *, void *); 00121 00122 struct JSClass { 00123 const char * name; 00124 uint32_t flags; 00125 JSPropertyOp addProperty; 00126 JSPropertyOp delProperty; 00127 JSPropertyOp getProperty; 00128 JSPropertyOp setProperty; 00129 JSEnumerateOp enumerate; 00130 JSResolveOp resolve; 00131 JSConvertOp convert; 00132 JSFinalizeOp finalize; 00133 JSGetObjectOps getObjectOps; 00134 JSCheckAccessOp checkAccess; 00135 JSNative call; 00136 JSNative construct; 00137 JSXDRObjectOp xdrObject; 00138 JSHasInstanceOp hasInstance; 00139 JSMarkOp mark; 00140 jsword spare; 00141 }; 00142 00143 struct JSPropertySpec { 00144 const char * name; 00145 int8_t tinyid; 00146 uint8_t flags; 00147 JSPropertyOp getter; 00148 JSPropertyOp setter; 00149 }; 00150 00151 struct JSFunctionSpec { 00152 const char *name; 00153 JSNative call; 00154 uint8_t nargs; 00155 uint8_t flags; 00156 uint16_t extra; 00157 }; 00158 00159 struct JSErrorReport { 00160 const char * filename; 00161 uintN lineno; 00162 const char * linebuf; 00163 const char * tokenptr; 00164 const jschar * uclinebuf; 00165 const jschar * uctokenptr; 00166 uintN flags; 00167 uintN errorNumber; 00168 const jschar * ucmessage; 00169 const jschar ** messageArgs; 00170 }; 00171 00172 00173 /* Defines and macros. ************************************************** */ 00174 00175 #define JSVAL_OBJECT 0x0 00176 #define JSVAL_INT 0x1 00177 #define JSVAL_DOUBLE 0x2 00178 #define JSVAL_STRING 0x4 00179 #define JSVAL_BOOLEAN 0x6 00180 00181 #define JS_BIT(n) ((uint32_t)1 << (n)) 00182 #define JS_BITMASK(n) (JS_BIT(n) - 1) 00183 00184 #define JSVAL_TAGBITS 3 00185 #define JSVAL_TAGMASK JS_BITMASK(JSVAL_TAGBITS) 00186 #define JSVAL_TAG(v) ((v) & JSVAL_TAGMASK) 00187 #define JSVAL_SETTAG(v,t) ((v) | (t)) 00188 #define JSVAL_CLRTAG(v) ((v) & ~(jsval)JSVAL_TAGMASK) 00189 00190 #define JSVAL_IS_PRIMITIVE(v) (!JSVAL_IS_OBJECT(v) || JSVAL_IS_NULL(v)) 00191 #define JSVAL_IS_OBJECT(v) (JSVAL_TAG(v) == JSVAL_OBJECT) 00192 #define JSVAL_IS_NUMBER(v) (JSVAL_IS_INT(v) || JSVAL_IS_DOUBLE(v)) 00193 #define JSVAL_IS_INT(v) (((v) & JSVAL_INT) && (v) != JSVAL_VOID) 00194 #define JSVAL_IS_DOUBLE(v) (JSVAL_TAG(v) == JSVAL_DOUBLE) 00195 #define JSVAL_IS_STRING(v) (JSVAL_TAG(v) == JSVAL_STRING) 00196 #define JSVAL_IS_BOOLEAN(v) (JSVAL_TAG(v) == JSVAL_BOOLEAN) 00197 #define JSVAL_IS_NULL(v) ((v) == JSVAL_NULL) 00198 #define JSVAL_IS_VOID(v) ((v) == JSVAL_VOID) 00199 00200 #define BOOLEAN_TO_JSVAL(b) JSVAL_SETTAG((jsval)(b) << JSVAL_TAGBITS, JSVAL_BOOLEAN) 00201 #define JSVAL_TO_BOOLEAN(v) ((JSBool)((v) >> JSVAL_TAGBITS)) 00202 00203 #define JSVAL_INT_BITS 31 00204 #define JSVAL_INT_POW2(n) ((jsval)1 << (n)) 00205 #define JSVAL_INT_MIN ((jsval)1 - JSVAL_INT_POW2(30)) 00206 #define JSVAL_INT_MAX (JSVAL_INT_POW2(30) - 1) 00207 #define INT_FITS_IN_JSVAL(i) ((uint32_t)((i)+JSVAL_INT_MAX) <= 2*JSVAL_INT_MAX) 00208 #define JSVAL_TO_INT(v) ((int32_t)(v) >> 1) 00209 #define INT_TO_JSVAL(i) (((jsval)(i) << 1) | JSVAL_INT) 00210 00211 #define JSVAL_TO_GCTHING(v) ((void *)JSVAL_CLRTAG(v)) 00212 #define JSVAL_TO_OBJECT(v) ((JSObject *)JSVAL_TO_GCTHING(v)) 00213 #define JSVAL_TO_DOUBLE(v) ((double *)JSVAL_TO_GCTHING(v)) 00214 #define JSVAL_TO_STRING(v) ((JSString *)JSVAL_TO_GCTHING(v)) 00215 #define OBJECT_TO_JSVAL(obj) ((jsval)(obj)) 00216 #define DOUBLE_TO_JSVAL(dp) JSVAL_SETTAG((jsval)(dp), JSVAL_DOUBLE) 00217 #define STRING_TO_JSVAL(str) JSVAL_SETTAG((jsval)(str), JSVAL_STRING) 00218 #define JSVAL_TO_PRIVATE(v) ((void *)((v) & ~JSVAL_INT)) 00219 #define PRIVATE_TO_JSVAL(p) ((jsval)(p) | JSVAL_INT) 00220 00221 #define JSPROP_ENUMERATE 0x01 00222 #define JSPROP_READONLY 0x02 00223 #define JSPROP_PERMANENT 0x04 00224 #define JSPROP_EXPORTED 0x08 00225 #define JSPROP_GETTER 0x10 00226 #define JSPROP_SETTER 0x20 00227 #define JSPROP_SHARED 0x40 00228 #define JSPROP_INDEX 0x80 00229 00230 #define JS_FALSE (int)0 00231 #define JS_TRUE (int)1 00232 00233 #define JSVAL_VOID INT_TO_JSVAL(0 - JSVAL_INT_POW2(30)) 00234 #define JSVAL_NULL OBJECT_TO_JSVAL(0) 00235 #define JSVAL_ZERO INT_TO_JSVAL(0) 00236 #define JSVAL_ONE INT_TO_JSVAL(1) 00237 #define JSVAL_FALSE BOOLEAN_TO_JSVAL(JS_FALSE) 00238 #define JSVAL_TRUE BOOLEAN_TO_JSVAL(JS_TRUE) 00239 00240 #define JSCLASS_HAS_PRIVATE (1<<0) 00241 #define JSCLASS_NEW_ENUMERATE (1<<1) 00242 #define JSCLASS_NEW_RESOLVE (1<<2) 00243 #define JSCLASS_PRIVATE_IS_NSISUPPORTS (1<<3) 00244 #define JSCLASS_SHARE_ALL_PROPERTIES (1<<4) 00245 #define JSCLASS_NEW_RESOLVE_GETS_START (1<<5) 00246 00247 #define JSFUN_BOUND_METHOD 0x40 00248 00249 #define JSOPTION_STRICT JS_BIT(0) 00250 #define JSOPTION_WERROR JS_BIT(1) 00251 #define JSOPTION_VAROBJFIX JS_BIT(2) 00252 #define JSOPTION_PRIVATE_IS_NSISUPPORTS JS_BIT(3) 00253 #define JSOPTION_COMPILE_N_GO JS_BIT(4) 00254 00255 00256 /* Function typedefs. *************************************************** */ 00257 00258 typedef void (* JS_DLL_CALLBACK JSErrorReporter)(JSContext *, const char *, JSErrorReport *); 00259 typedef JSBool (* JS_DLL_CALLBACK JSGCCallback)(JSContext *, JSGCStatus); 00260 00261 #endif /* !JSVERSION_IS_ECMA */ 00262 00263 typedef JSBool (* JS_EvaluateScript_t)(JSContext *, JSObject *, const char *, uintN, const char *, uintN, jsval *); 00264 typedef JSString * (* JS_ValueToString_t)(JSContext *, jsval); 00265 typedef char * (* JS_GetStringBytes_t)(JSString *); 00266 typedef JSBool (* JS_SetProperty_t)(JSContext *, JSObject *, const char *, jsval *); 00267 typedef JSBool (* JS_GetProperty_t)(JSContext *, JSObject *, const char *, jsval *); 00268 typedef JSBool (* JS_CallFunctionName_t)(JSContext *, JSObject *, const char *, uintN, jsval *, jsval *); 00269 typedef JSBool (* JS_CallFunctionValue_t)(JSContext *, JSObject *, jsval, uintN, jsval *, jsval *); 00270 typedef JSObject * (* JS_ConstructObjectWithArguments_t)(JSContext *, JSClass *, JSObject *, JSObject *, uintN, jsval *); 00271 typedef JSRuntime * (* JS_NewRuntime_t)(uint32_t); 00272 typedef void (* JS_DestroyRuntime_t)(JSRuntime *); 00273 typedef JSContext * (* JS_NewContext_t)(JSRuntime *, size_t); 00274 typedef void (* JS_DestroyContext_t)(JSContext *); 00275 typedef void (* JS_ShutDown_t)(void); 00276 typedef JSObject * (* JS_NewObject_t)(JSContext *, JSClass *, JSObject *, JSObject *); 00277 typedef JSBool (* JS_InitStandardClasses_t)(JSContext *, JSObject *); 00278 typedef JSErrorReporter (* JS_SetErrorReporter_t)(JSContext *, JSErrorReporter); 00279 typedef JSBool (* JS_PropertyStub_t)(JSContext *, JSObject *, jsval, jsval *); 00280 typedef JSBool (* JS_EnumerateStub_t)(JSContext *, JSObject *); 00281 typedef JSBool (* JS_ResolveStub_t)(JSContext *, JSObject *, jsval); 00282 typedef JSBool (* JS_ConvertStub_t)(JSContext *, JSObject *, JSType, jsval *); 00283 typedef void (* JS_FinalizeStub_t)(JSContext *, JSObject *); 00284 typedef const char * (* JS_GetImplementationVersion_t)(void); 00285 typedef void * (* JS_GetPrivate_t)(JSContext *, JSObject *); 00286 typedef JSBool (* JS_SetPrivate_t)(JSContext *, JSObject *, void *); 00287 typedef JSFunction * (* JS_NewFunction_t)(JSContext *, JSNative, uintN, uintN flags, JSObject *, const char *); 00288 typedef JSObject * (* JS_GetFunctionObject_t)(JSFunction *); 00289 typedef JSObject * (* JS_DefineObject_t)(JSContext *, JSObject *, const char *, JSClass *, JSObject *, uintN); 00290 typedef JSBool (* JS_DefineProperties_t)(JSContext *, JSObject *, JSPropertySpec *); 00291 typedef JSObject * (* JS_GetParent_t)(JSContext *, JSObject *); 00292 typedef JSBool (* JS_SetParent_t)(JSContext *, JSObject *, JSObject *); 00293 typedef JSBool (* JS_DefineFunctions_t)(JSContext *, JSObject *, JSFunctionSpec *); 00294 typedef JSString * (* JS_NewStringCopyZ_t)(JSContext *, const char *); 00295 typedef JSType (* JS_TypeOfValue_t)(JSContext *, jsval); 00296 typedef const char * (* JS_GetTypeName_t)(JSContext *, JSType); 00297 typedef JSBool (* JS_InstanceOf_t)(JSContext *, JSObject *, JSClass *, jsval *); 00298 typedef JSObject * (* JS_InitClass_t)(JSContext *, JSObject *, JSObject *, JSClass *, 00299 JSNative, uintN, JSPropertySpec *, JSFunctionSpec *, 00300 JSPropertySpec *, JSFunctionSpec *); 00301 typedef JSBool (* JS_NewDoubleValue_t)(JSContext *, double, jsval *); 00302 typedef void * (* JS_GetContextPrivate_t)(JSContext *); 00303 typedef void (* JS_SetContextPrivate_t)(JSContext *, void *); 00304 typedef JSBool (* JS_ValueToBoolean_t)(JSContext *, jsval, JSBool *); 00305 typedef JSBool (* JS_ValueToNumber_t)(JSContext *, jsval, double *); 00306 typedef JSObject * (* JS_NewArrayObject_t)(JSContext *, int32_t, jsval *); 00307 typedef JSBool (* JS_GetArrayLength_t)(JSContext *, JSObject *, uint32_t *); 00308 typedef JSBool (* JS_SetArrayLength_t)(JSContext *, JSObject *, uint32_t); 00309 typedef JSBool (* JS_HasArrayLength_t)(JSContext *, JSObject *, uint32_t *); 00310 typedef JSBool (* JS_GetElement_t)(JSContext *, JSObject *, int32_t, jsval *); 00311 typedef JSBool (* JS_SetElement_t)(JSContext *, JSObject *, int32_t, jsval *); 00312 typedef JSBool (* JS_AddRoot_t)(JSContext *, void *); 00313 typedef JSBool (* JS_RemoveRoot_t)(JSContext *, void *); 00314 typedef size_t (* JS_GetStringLength_t)(JSString *); 00315 typedef JSBool (* JS_LookupProperty_t)(JSContext *, JSObject *, const char *, jsval *); 00316 typedef JSBool (* JS_DefineProperty_t)(JSContext *, JSObject *, const char *, jsval, JSPropertyOp, JSPropertyOp, uintN); 00317 typedef JSScript * (* JS_CompileFile_t)(JSContext *, JSObject *, const char *); 00318 typedef JSBool (* JS_ValueToObject_t)(JSContext *, jsval, JSObject **); 00319 typedef JSBool (* JS_ExecuteScript_t)(JSContext *, JSObject *, JSScript *, jsval *); 00320 typedef JSBool (* JS_IsExceptionPending_t)(JSContext *); 00321 typedef JSBool (* JS_GetPendingException_t)(JSContext *, jsval *); 00322 typedef void (* JS_SetPendingException_t)(JSContext *, jsval); 00323 typedef void (* JS_ClearPendingException_t)(JSContext *); 00324 typedef double * (* JS_NewDouble_t)(JSContext *, double); 00325 typedef JSBool (* JS_CallFunction_t)(JSContext *, JSObject *, JSFunction *, uintN, jsval *, jsval *); 00326 typedef JSFunction * (* JS_ValueToFunction_t)(JSContext *, jsval); 00327 typedef void (* JS_ReportError_t)(JSContext *, const char *, ...); 00328 typedef JSBool (* JS_IsArrayObject_t)(JSContext *, JSObject *); 00329 typedef JSBool (* JS_ObjectIsFunction_t)(JSContext *, JSObject *); 00330 typedef JSBool (* JS_ValueToECMAInt32_t)(JSContext *, jsval, int32_t *); 00331 typedef JSFunction * (* JS_DefineFunction_t)(JSContext *, JSObject *, const char *, JSNative, uintN, uintN); 00332 typedef JSObject * (* JS_GetGlobalObject_t)(JSContext *); 00333 typedef JSGCCallback (* JS_SetGCCallback_t)(JSContext *, JSGCCallback); 00334 typedef void (* JS_GC_t)(JSContext *); 00335 typedef void (* JS_MaybeGC_t)(JSContext *); 00336 typedef JSBool (* JS_IsRunning_t)(JSContext *); 00337 typedef JSBool (* JS_DeleteProperty_t)(JSContext *, JSObject *, const char *); 00338 typedef JSScript * (* JS_CompileScript_t)(JSContext *, JSObject *, 00339 const char *, size_t, 00340 const char *, uintN); 00341 typedef jsval (* JS_GetNaNValue_t)(JSContext *); 00342 typedef jsval (* JS_GetNegativeInfinityValue_t)(JSContext *); 00343 typedef jsval (* JS_GetPositiveInfinityValue_t)(JSContext *); 00344 typedef jsval (* JS_GetEmptyStringValue_t)(JSContext *); 00345 typedef JSBool (* JS_SetPropertyAttributes_t)(JSContext *, JSObject *, const char *, uintN, JSBool *); 00346 typedef JSBool (* JS_GetPropertyAttributes_t)(JSContext *, JSObject *, const char *, uintN *, JSBool *); 00347 typedef JSClass * (* JS_GetClass_t)(JSObject *); 00348 typedef JSObject * (* JS_GetPrototype_t)(JSContext *, JSObject *); 00349 typedef JSObject * (* JS_SetPrototype_t)(JSContext *, JSObject *, JSObject *); 00350 typedef intN (* JS_CompareStrings_t)(JSString *, JSString *); 00351 typedef uint32_t (* JS_GetOptions_t)(JSContext *); 00352 typedef uint32_t (* JS_SetOptions_t)(JSContext *, uint32_t); 00353 typedef uint32_t (* JS_ToggleOptions_t)(JSContext *, uint32_t); 00354 typedef struct JSIdArray * (* JS_Enumerate_t)(JSContext *, JSObject *); 00355 typedef JSBool (* JS_IdToValue_t)(JSContext *, jsid, jsval *); 00356 typedef const char * (* JS_GetFunctionName_t)(JSFunction *); 00357 typedef JSObject * (* JS_GetConstructor_t)(JSContext *, JSObject *); 00358 typedef void (* JS_DestroyIdArray_t)(JSContext *, struct JSIdArray *); 00359 00360 00361 /* Access interface. **************************************************** */ 00362 00363 typedef struct { 00364 int available; 00365 00366 JS_CallFunctionName_t JS_CallFunctionName; 00367 JS_CallFunctionValue_t JS_CallFunctionValue; 00368 JS_ConstructObjectWithArguments_t JS_ConstructObjectWithArguments; 00369 JS_ConvertStub_t JS_ConvertStub; 00370 JS_DestroyContext_t JS_DestroyContext; 00371 JS_DestroyRuntime_t JS_DestroyRuntime; 00372 JS_EnumerateStub_t JS_EnumerateStub; 00373 JS_EvaluateScript_t JS_EvaluateScript; 00374 JS_FinalizeStub_t JS_FinalizeStub; 00375 JS_GetClass_t JS_GetClass; 00376 JS_GetImplementationVersion_t JS_GetImplementationVersion; 00377 JS_GetProperty_t JS_GetProperty; 00378 JS_GetStringBytes_t JS_GetStringBytes; 00379 JS_InitStandardClasses_t JS_InitStandardClasses; 00380 JS_NewContext_t JS_NewContext; 00381 JS_NewObject_t JS_NewObject; 00382 JS_NewRuntime_t JS_NewRuntime; 00383 JS_PropertyStub_t JS_PropertyStub; 00384 JS_ResolveStub_t JS_ResolveStub; 00385 JS_SetErrorReporter_t JS_SetErrorReporter; 00386 JS_SetProperty_t JS_SetProperty; 00387 JS_ShutDown_t JS_ShutDown; 00388 JS_ValueToString_t JS_ValueToString; 00389 JS_DefineObject_t JS_DefineObject; 00390 JS_DefineProperties_t JS_DefineProperties; 00391 JS_GetPrivate_t JS_GetPrivate; 00392 JS_SetPrivate_t JS_SetPrivate; 00393 JS_NewFunction_t JS_NewFunction; 00394 JS_GetFunctionObject_t JS_GetFunctionObject; 00395 JS_GetParent_t JS_GetParent; 00396 JS_SetParent_t JS_SetParent; 00397 JS_DefineFunctions_t JS_DefineFunctions; 00398 JS_NewStringCopyZ_t JS_NewStringCopyZ; 00399 JS_TypeOfValue_t JS_TypeOfValue; 00400 JS_GetTypeName_t JS_GetTypeName; 00401 JS_InstanceOf_t JS_InstanceOf; 00402 JS_InitClass_t JS_InitClass; 00403 JS_NewDoubleValue_t JS_NewDoubleValue; 00404 JS_GetContextPrivate_t JS_GetContextPrivate; 00405 JS_SetContextPrivate_t JS_SetContextPrivate; 00406 JS_ValueToBoolean_t JS_ValueToBoolean; 00407 JS_ValueToNumber_t JS_ValueToNumber; 00408 JS_NewArrayObject_t JS_NewArrayObject; 00409 JS_GetArrayLength_t JS_GetArrayLength; 00410 JS_SetArrayLength_t JS_SetArrayLength; 00411 JS_HasArrayLength_t JS_HasArrayLength; 00412 JS_GetElement_t JS_GetElement; 00413 JS_SetElement_t JS_SetElement; 00414 JS_AddRoot_t JS_AddRoot; 00415 JS_RemoveRoot_t JS_RemoveRoot; 00416 JS_GetStringLength_t JS_GetStringLength; 00417 JS_LookupProperty_t JS_LookupProperty; 00418 JS_DefineProperty_t JS_DefineProperty; 00419 JS_CompileFile_t JS_CompileFile; 00420 JS_ValueToObject_t JS_ValueToObject; 00421 JS_ExecuteScript_t JS_ExecuteScript; 00422 JS_IsExceptionPending_t JS_IsExceptionPending; 00423 JS_GetPendingException_t JS_GetPendingException; 00424 JS_SetPendingException_t JS_SetPendingException; 00425 JS_ClearPendingException_t JS_ClearPendingException; 00426 JS_NewDouble_t JS_NewDouble; 00427 JS_CallFunction_t JS_CallFunction; 00428 JS_ValueToFunction_t JS_ValueToFunction; 00429 JS_ReportError_t JS_ReportError; 00430 JS_IsArrayObject_t JS_IsArrayObject; 00431 JS_ObjectIsFunction_t JS_ObjectIsFunction; 00432 // Note: We use this function instead of JS_ValueToInt32() since the 00433 // latter is buggy in versions of SpiderMonkey older than 2005-09-29, 00434 // see Mozilla bug #284032. 00435 JS_ValueToECMAInt32_t JS_ValueToECMAInt32; 00436 JS_DefineFunction_t JS_DefineFunction; 00437 JS_GetGlobalObject_t JS_GetGlobalObject; 00438 JS_SetGCCallback_t JS_SetGCCallback; 00439 JS_GC_t JS_GC; 00440 JS_MaybeGC_t JS_MaybeGC; 00441 JS_IsRunning_t JS_IsRunning; 00442 JS_DeleteProperty_t JS_DeleteProperty; 00443 JS_CompileScript_t JS_CompileScript; 00444 JS_GetNaNValue_t JS_GetNaNValue; 00445 JS_GetNegativeInfinityValue_t JS_GetNegativeInfinityValue; 00446 JS_GetPositiveInfinityValue_t JS_GetPositiveInfinityValue; 00447 JS_GetEmptyStringValue_t JS_GetEmptyStringValue; 00448 JS_SetPropertyAttributes_t JS_SetPropertyAttributes; 00449 JS_GetPropertyAttributes_t JS_GetPropertyAttributes; 00450 JS_GetPrototype_t JS_GetPrototype; 00451 JS_SetPrototype_t JS_SetPrototype; 00452 JS_CompareStrings_t JS_CompareStrings; 00453 JS_GetOptions_t JS_GetOptions; 00454 JS_SetOptions_t JS_SetOptions; 00455 JS_ToggleOptions_t JS_ToggleOptions; 00456 JS_Enumerate_t JS_Enumerate; 00457 JS_IdToValue_t JS_IdToValue; 00458 JS_GetFunctionName_t JS_GetFunctionName; 00459 JS_GetConstructor_t JS_GetConstructor; 00460 JS_DestroyIdArray_t JS_DestroyIdArray; 00461 00462 } SpiderMonkey_t; 00463 00464 COIN_DLL_API const SpiderMonkey_t * spidermonkey(void); 00465 00466 #ifdef __cplusplus 00467 } 00468 #endif /* __cplusplus */ 00469 00470 #endif /* !COIN_GLUE_SPIDERMONKEY_H */
Copyright © 1998-2010 by Kongsberg Oil & Gas Technologies. All rights reserved.
Generated for Coin by Doxygen 1.7.5.1.