FreeWRL / FreeX3D
4.3.0
jsNative.h
1
/*
2
3
4
CProto.h - this is the object representing a PROTO definition and being
5
capable of instantiating it.
6
7
We keep a vector of pointers to all that pointers which point to "inner
8
memory" and need therefore be updated when copying. Such pointers include
9
field-destinations and parts of ROUTEs. Those pointers are then simply
10
copied, their new positions put in the new vector, and afterwards are all
11
pointers there updated.
12
13
*/
14
15
/****************************************************************************
16
This file is part of the FreeWRL/FreeX3D Distribution.
17
18
Copyright 2009 CRC Canada. (http://www.crc.gc.ca)
19
20
FreeWRL/FreeX3D is free software: you can redistribute it and/or modify
21
it under the terms of the GNU Lesser Public License as published by
22
the Free Software Foundation, either version 3 of the License, or
23
(at your option) any later version.
24
25
FreeWRL/FreeX3D is distributed in the hope that it will be useful,
26
but WITHOUT ANY WARRANTY; without even the implied warranty of
27
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28
GNU General Public License for more details.
29
30
You should have received a copy of the GNU General Public License
31
along with FreeWRL/FreeX3D. If not, see <http://www.gnu.org/licenses/>.
32
****************************************************************************/
33
34
35
#ifndef __FREEWRL_JS_NATIVE_H__
36
#define __FREEWRL_JS_NATIVE_H__
37
38
39
typedef
struct
_BrowserNative
{
40
/* int magic; does this really do anything ??? */
41
/* and, this really does nothing SV *sv_js; */
42
int
dummyEntry;
43
} BrowserNative;
44
45
typedef
struct
_AnyNative
{
46
int
type;
47
int
gc;
48
int
*valueChanged;
49
union
anyVrml
*v;
50
} AnyNative;
51
52
typedef
struct
_SFNodeNative
{
53
int
valueChanged;
54
struct
X3D_Node
*handle;
55
char
*X3DString;
56
int
fieldsExpanded;
57
} SFNodeNative;
58
59
typedef
struct
_SFRotationNative
{
60
int
valueChanged;
61
struct
SFRotation
v;
62
} SFRotationNative;
63
64
typedef
struct
_SFColorNative
{
65
int
valueChanged;
66
struct
SFColor
v;
67
} SFColorNative;
68
69
typedef
struct
_SFColorRGBANative
{
70
int
valueChanged;
71
struct
SFColorRGBA
v;
72
} SFColorRGBANative;
73
74
typedef
struct
_SFVec2fNative
{
75
int
valueChanged;
76
struct
SFVec2f
v;
77
} SFVec2fNative;
78
79
typedef
struct
_SFVec3fNative
{
80
int
valueChanged;
81
struct
SFColor
v;
82
} SFVec3fNative;
83
84
typedef
struct
_SFVec4fNative
{
85
int
valueChanged;
86
struct
SFVec4f
v;
87
} SFVec4fNative;
88
89
typedef
struct
_SFVec2dNative
{
90
int
valueChanged;
91
struct
SFVec2d
v;
92
} SFVec2dNative;
93
94
typedef
struct
_SFVec3dNative
{
95
int
valueChanged;
96
struct
SFVec3d
v;
97
} SFVec3dNative;
98
99
typedef
struct
_SFVec4dNative
{
100
int
valueChanged;
101
struct
SFVec4d
v;
102
} SFVec4dNative;
103
104
typedef
struct
_SFImageNative
{
105
int
valueChanged;
106
} SFImageNative;
107
108
109
/*
110
* Adds additional (touchable) property to instance of a native
111
* type.
112
*/
113
extern
JSBool
114
addGlobalECMANativeProperty(
void
*cx,
115
void
*glob,
116
char
*name);
117
118
extern
JSBool
119
addGlobalAssignProperty(
void
*cx,
120
void
*glob,
121
char
*name,
122
char
*str);
123
124
extern
JSBool
125
addSFNodeProperty(
void
*cx,
126
void
*glob,
127
char
*nodeName,
128
char
*name,
129
char
*str);
130
131
extern
void
*AnyNativeNew(
int
type,
union
anyVrml
* source,
int
*valueChanged);
132
extern
void
AnyNativeAssign(
void
*top,
void
*fromp);
133
134
extern
void
* SFNodeNativeNew(
void
);
135
extern
JSBool SFNodeNativeAssign(
void
*top,
void
*fromp);
136
//int SFNodeNativeAssign(void* top, void* fromp);
137
int
SFNodeNativeEquals(
void
* top,
void
* fromp);
138
139
extern
void
*SFRotationNativeNew(
void
);
140
extern
void
SFRotationNativeAssign(
void
*top,
void
*fromp);
141
extern
void
SFRotationNativeSet(
void
*p,
struct
Uni_String
*sv);
142
143
144
extern
void
* SFVec2fNativeNew(
void
);
145
extern
void
SFVec2fNativeAssign(
void
* top,
void
* fromp);
146
extern
void
SFVec2fNativeSet(
void
* p,
struct
Uni_String
* sv);
147
extern
void
*SFVec3fNativeNew(
void
);
148
extern
void
SFVec3fNativeAssign(
void
*top,
void
*fromp);
149
extern
void
SFVec3fNativeSet(
void
*p,
struct
Uni_String
*sv);
150
extern
void
* SFVec4fNativeNew(
void
);
151
extern
void
SFVec4fNativeAssign(
void
* top,
void
* fromp);
152
153
154
extern
void
* SFVec2dNativeNew(
void
);
155
extern
void
SFVec2dNativeAssign(
void
* top,
void
* fromp);
156
extern
void
SFVec2dNativeSet(
void
* p,
struct
Uni_String
* sv);
157
extern
void
* SFVec3dNativeNew(
void
);
158
extern
void
SFVec3dNativeAssign(
void
* top,
void
* fromp);
159
extern
void
* SFVec4dNativeNew(
void
);
160
extern
void
SFVec4dNativeAssign(
void
* top,
void
* fromp);
161
162
extern
void
* SFImageNativeNew(
void
);
163
extern
void
SFImageNativeAssign(
void
*top,
void
*fromp);
164
extern
void
SFImageNativeSet(
void
*p,
struct
Uni_String
*sv);
165
166
extern
void
*SFColorNativeNew(
void
);
167
extern
void
SFColorNativeAssign(
void
*top,
void
*fromp);
168
extern
void
SFColorNativeSet(
void
*p,
struct
Uni_String
*sv);
169
extern
void
* SFColorRGBANativeNew(
void
);
170
extern
void
SFColorRGBANativeAssign(
void
*top,
void
*fromp);
171
172
void
* SFImageNativeNew(
void
);
173
void
SFImageNativeAssign(
void
*top,
void
*fromp);
174
175
176
#endif
/* __FREEWRL_JS_NATIVE_H__ */
SFColorRGBA
Definition
Structs.h:3167
SFColor
Definition
Structs.h:3165
SFRotation
Definition
Structs.h:3169
SFVec2d
Definition
Structs.h:3177
SFVec2f
Definition
Structs.h:3171
SFVec3d
Definition
Structs.h:3179
SFVec4d
Definition
Structs.h:3181
SFVec4f
Definition
Structs.h:3175
Uni_String
Definition
Structs.h:54
X3D_Node
Definition
Structs.h:3210
_AnyNative
Definition
jsNative.h:45
_BrowserNative
Definition
jsNative.h:39
_SFColorNative
Definition
jsNative.h:64
_SFColorRGBANative
Definition
jsNative.h:69
_SFImageNative
Definition
jsNative.h:104
_SFNodeNative
Definition
jsNative.h:52
_SFRotationNative
Definition
jsNative.h:59
_SFVec2dNative
Definition
jsNative.h:89
_SFVec2fNative
Definition
jsNative.h:74
_SFVec3dNative
Definition
jsNative.h:94
_SFVec3fNative
Definition
jsNative.h:79
_SFVec4dNative
Definition
jsNative.h:99
_SFVec4fNative
Definition
jsNative.h:84
anyVrml
Definition
CParseGeneral.h:56
src
lib
world_script
jsNative.h
Generated by
1.13.2