FreeWRL / FreeX3D 4.3.0
jsVRMLBrowser.h
1/*
2
3
4*/
5
6/****************************************************************************
7 This file is part of the FreeWRL/FreeX3D Distribution.
8
9 Copyright 2009 CRC Canada. (http://www.crc.gc.ca)
10
11 FreeWRL/FreeX3D is free software: you can redistribute it and/or modify
12 it under the terms of the GNU Lesser Public License as published by
13 the Free Software Foundation, either version 3 of the License, or
14 (at your option) any later version.
15
16 FreeWRL/FreeX3D is distributed in the hope that it will be useful,
17 but WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 GNU General Public License for more details.
20
21 You should have received a copy of the GNU General Public License
22 along with FreeWRL/FreeX3D. If not, see <http://www.gnu.org/licenses/>.
23****************************************************************************/
24
25
26#ifndef __FREEWRL_JS_VRML_BROWSER_H__
27#define __FREEWRL_JS_VRML_BROWSER_H__
28
29
30#ifndef UNUSED
31#define UNUSED(v) ((void) v)
32#endif
33
34extern char *BrowserName; /* defined in VRMLC.pm */
35extern double BrowserFPS; /* defined in VRMLC.pm */
36
37#define BROWMAGIC 12345
38
39JSBool VrmlBrowserInit(JSContext *context, JSObject *globalObj, BrowserNative *brow);
40
41
42#if JS_VERSION < 185
43JSBool VrmlBrowserGetName(JSContext *cx,
44 JSObject *obj,
45 uintN argc,
46 jsval *argv,
47 jsval *rval);
48
49
50JSBool VrmlBrowserGetVersion(JSContext *cx,
51 JSObject *obj,
52 uintN argc,
53 jsval *argv,
54 jsval *rval);
55
56
57JSBool VrmlBrowserGetCurrentSpeed(JSContext *cx,
58 JSObject *obj,
59 uintN argc,
60 jsval *argv,
61 jsval *rval);
62
63
64JSBool VrmlBrowserGetCurrentFrameRate(JSContext *cx,
65 JSObject *obj,
66 uintN argc,
67 jsval *argv,
68 jsval *rval);
69
70
71JSBool VrmlBrowserGetWorldURL(JSContext *cx,
72 JSObject *obj,
73 uintN argc,
74 jsval *argv,
75 jsval *rval);
76
77
78JSBool VrmlBrowserReplaceWorld(JSContext *cx,
79 JSObject *obj,
80 uintN argc,
81 jsval *argv,
82 jsval *rval);
83
84
85JSBool VrmlBrowserLoadURL(JSContext *cx,
86 JSObject *obj,
87 uintN argc,
88 jsval *argv,
89 jsval *rval);
90
91
92JSBool VrmlBrowserSetDescription(JSContext *cx,
93 JSObject *obj,
94 uintN argc,
95 jsval *argv,
96 jsval *rval);
97
98
99JSBool VrmlBrowserCreateVrmlFromString(JSContext *cx,
100 JSObject *obj,
101 uintN argc,
102 jsval *argv,
103 jsval *rval);
104
105
106JSBool VrmlBrowserCreateVrmlFromURL(JSContext *cx,
107 JSObject *obj,
108 uintN argc,
109 jsval *argv,
110 jsval *rval);
111
112
113JSBool VrmlBrowserAddRoute(JSContext *cx,
114 JSObject *obj,
115 uintN argc,
116 jsval *argv,
117 jsval *rval);
118
119
120JSBool VrmlBrowserPrint(JSContext *cx,
121 JSObject *obj,
122 uintN argc,
123 jsval *argv,
124 jsval *rval);
125
126JSBool VrmlBrowserPrintln(JSContext *cx,
127 JSObject *obj,
128 uintN argc,
129 jsval *argv,
130 jsval *rval);
131
132JSBool VrmlBrowserDeleteRoute(JSContext *cx,
133 JSObject *obj,
134 uintN argc,
135 jsval *argv,
136 jsval *rval);
137
138#else
139JSBool VrmlBrowserGetName(JSContext *cx, uintN argc, jsval *vp);
140JSBool VrmlBrowserGetVersion(JSContext *cx, uintN argc, jsval *vp);
141JSBool VrmlBrowserGetCurrentSpeed(JSContext *cx, uintN argc, jsval *vp);
142JSBool VrmlBrowserGetCurrentFrameRate(JSContext *cx, uintN argc, jsval *vp);
143JSBool VrmlBrowserGetWorldURL(JSContext *cx, uintN argc, jsval *vp);
144JSBool VrmlBrowserReplaceWorld(JSContext *cx, uintN argc, jsval *vp);
145JSBool VrmlBrowserLoadURL(JSContext *cx, uintN argc, jsval *vp);
146JSBool VrmlBrowserSetDescription(JSContext *cx, uintN argc, jsval *vp);
147JSBool VrmlBrowserCreateVrmlFromString(JSContext *cx, uintN argc, jsval *vp);
148JSBool VrmlBrowserCreateVrmlFromURL(JSContext *cx, uintN argc, jsval *vp);
149JSBool VrmlBrowserCreateX3DFromString(JSContext *cx, uintN argc, jsval *vp);
150JSBool VrmlBrowserAddRoute(JSContext *cx, uintN argc, jsval *vp);
151JSBool VrmlBrowserPrint(JSContext *cx, uintN argc, jsval *vp);
152JSBool VrmlBrowserPrintln(JSContext *cx, uintN argc, jsval *vp);
153JSBool VrmlBrowserDeleteRoute(JSContext *cx, uintN argc, jsval *vp);
154
155#endif
156
157#endif /* __FREEWRL_JS_VRML_BROWSER_H__ */