58 virtual SbBool executeScript(
const SbName & name,
60 virtual SbBool executeFile(
const SbName & filename)
const;
61 virtual SbBool executeFunction(
const SbName &name,
int argc,
65 virtual SbBool setScriptField(
const SbName & name,
const SoField * f)
const;
66 virtual SbBool unsetScriptField(
const SbName & name)
const;
67 virtual SbBool getScriptField(
const SbName & name,
SoField * f)
const;
68 virtual SbBool hasScriptField(
const SbName & name)
const;
74 SbBool field2jsval(
const SoField * f, jsval * v)
const;
75 SbBool jsval2field(
const jsval v,
SoField * f)
const;
76 void enableAutoNodeUnref(SbBool onoff);
77 SbBool getAutoNodeUnrefState(
void)
const;
79 static SbBool init(uint32_t maxbytes = COIN_JAVASCRIPT_RUNTIME_MAXBYTES);
80 static void shutdown(
void);
81 static SbBool debug(
void);
83 static JSRuntime * getRuntime(
void);
84 JSContext * getContext(
void)
const;
85 JSObject * getGlobal(
void)
const;
87 void addHandler(
const SoType & type, SoJSWrapperInitFunc * init,
88 SoJSfield2jsvalFunc * field2jsval,
89 SoJSjsval2field2Func * jsval2field);
92 static void setRuntime(JSRuntime * runtime);
93 void setContext(JSContext * context);
94 void setGlobal(JSObject * global);
97 class SoJavaScriptEngineP * pimpl;
98 friend class SoJavaScriptEngineP;