FreeWRL / FreeX3D 4.3.0
JScript.h
1/*
2
3
4???
5
6*/
7
8/****************************************************************************
9 This file is part of the FreeWRL/FreeX3D Distribution.
10
11 Copyright 2009 CRC Canada. (http://www.crc.gc.ca)
12
13 FreeWRL/FreeX3D is free software: you can redistribute it and/or modify
14 it under the terms of the GNU Lesser Public License as published by
15 the Free Software Foundation, either version 3 of the License, or
16 (at your option) any later version.
17
18 FreeWRL/FreeX3D is distributed in the hope that it will be useful,
19 but WITHOUT ANY WARRANTY; without even the implied warranty of
20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 GNU General Public License for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with FreeWRL/FreeX3D. If not, see <http://www.gnu.org/licenses/>.
25****************************************************************************/
26
27
28#ifndef __FREEWRL_JS_JSCRIPT_H__
29#define __FREEWRL_JS_JSCRIPT_H__
30
31
32#include "vrml_parser/CParseParser.h"
33
34void kill_javascript(void);
35void JSInit(struct Shader_Script *script); /* int num); */
36void SaveScriptText(int num, const char *text);
37void process_eventsProcessed();
38void js_cleanup_script_context(int counter);
39int jsActualrunScript(int num, char *script);
40void JSInitializeScriptAndFields (int num);
41void JSCreateScriptContext(int num);
42void SaveScriptField (int num, indexT kind, indexT type, const char* field, union anyVrml value);
43
44//void SaveScriptField (int num, indexT kind, indexT type, const char* field, union anyVrml value);
45void js_setField_javascriptEventOut_B(union anyVrml* any, int fieldType, unsigned len, int extraData, int actualscript);
46void js_setField_javascriptEventOut(struct X3D_Node *tn,unsigned int tptr, int fieldType, unsigned len, int extraData, int actualscript);
47
48void setScriptECMAtype(int num);
49int get_valueChanged_flag (int fptr, int actualscript);
50void resetScriptTouchedFlag(int actualscript, int fptr);
51void set_one_ECMAtype (int tonode, int toname, int dataType, void *Data, int datalen);
52void set_one_MultiElementType (int tonode, int tnfield, void *Data, int dataLen);
53void set_one_MFElementType(int tonode, int toname, int dataType, void *Data, int datalen);
54
55int jsIsRunning();
56void jsShutdown();
57void JSDeleteScriptContext(int num);
58void InitScriptField(int num, indexT kind, indexT type, const char* field, union anyVrml value);
59void jsClearScriptControlEntries(int num); //struct CRscriptStruct *ScriptControl);
60int runQueuedDirectOutputs();
61int SM_method();
62#endif /* __FREEWRL_JS_JSCRIPT_H__ */