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