File: test.idl

package info (click to toggle)
emscripten 3.1.69%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 121,872 kB
  • sloc: ansic: 636,110; cpp: 425,974; javascript: 78,401; python: 58,404; sh: 49,154; pascal: 5,237; makefile: 3,365; asm: 2,415; lisp: 1,869
file content (211 lines) | stat: -rw-r--r-- 4,355 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211

// Part 1

interface Parent {
  void Parent(long val);
  long getVal();
  void mulVal(long mul);
  void parentFunc();
  [Const] Parent getAsConst();
  VoidPtr voidStar(VoidPtr something);
  boolean getBoolean();
  attribute long attr;
  readonly attribute long immutableAttr;
};

interface Child1 {
  void Child1(optional long val);
  long getValSqr(optional long more);
  long getValTimes(optional long times=1);
  void parentFunc(long x); // redefinition, name collides with parent
};

Child1 implements Parent;

interface Child2 {
  void Child2();
  long getValCube();
  static void printStatic(long arg0);
  void virtualFunc();
  void virtualFunc2();
  void virtualFunc3(long x);
  void virtualFunc4(long x);
  static void runVirtualFunc(Child2 myself);
  static void runVirtualFunc3(Child2 myself, long x);
};

Child2 implements Parent;

[JSImplementation="Child2"]
interface Child2JS {
  void Child2JS();
  void virtualFunc();
  void virtualFunc2();
  void virtualFunc3(long x);
  void virtualFunc4(long x);
};

interface VirtualBase {
  void func();
  void constFunc();
};

[JSImplementation="VirtualBase"]
interface ConcreteJS {
  void ConcreteJS();
  void func();
  [Const] void constFunc();
};

// Part 2

interface StringUser {
  void StringUser();
  void StringUser(DOMString str, long i);
  void Print(long anotherInteger, DOMString anotherString);
  void PrintFloat(float f);
  [Const] DOMString returnAString();
};

interface RefUser {
  void RefUser();
  void RefUser(long value);
  long getValue([Ref] RefUser b);
  [Ref] RefUser getMe();
  [Value] RefUser getCopy(); // must have zero-arg constructor
  [Value] StringUser getAnother();
};

interface VoidPointerUser {
  void VoidPointerUser();

  any GetVoidPointer();
  void SetVoidPointer(any ptr);
};

[Prefix="Space::"]
interface Inner {
  void Inner();
  long get();
  [Operator="*=", Ref] Inner mul(float x);
  [Operator="[]"] long getAsArray(long x);
  [Operator="+="] void incInPlace([Const, Ref] Inner i);
};

[Prefix = "Space::"]
interface InnerUserBase {
};

[JSImplementation = "InnerUserBase"]
interface InnerUser {
  void InnerUser();
  void Callback(Inner inner);
};

enum AnEnum {
  "enum_value1",
  "enum_value2"
};

enum EnumClass_EnumWithinClass {
  "EnumClass::e_val"
};

enum EnumNamespace_EnumInNamespace {
  "EnumNamespace::e_namespace_val"
};

interface EnumClass {
  void EnumClass();

  EnumClass_EnumWithinClass GetEnum();

  EnumNamespace_EnumInNamespace GetEnumFromNameSpace();
};

interface TypeTestClass {
  void TypeTestClass();

  byte ReturnCharMethod();
  void AcceptCharMethod(byte x);

  octet ReturnUnsignedCharMethod();
  void AcceptUnsignedCharMethod(octet x);

  unsigned short ReturnUnsignedShortMethod();
  void AcceptUnsignedShortMethod(unsigned short x);

  unsigned long ReturnUnsignedLongMethod();
  void AcceptUnsignedLongMethod(unsigned long x);
};

interface StructInArray {
  void StructInArray(long attr1, long attr2);
  attribute long attr1;
  attribute long attr2;
};

interface ArrayClass {
  void ArrayClass();
  [BoundsChecked] attribute long[] int_array;
  [Value] attribute StructInArray[] struct_array;
  attribute StructInArray[] struct_ptr_array;
};

interface ReceiveArrays {
  void ReceiveArrays();

  void giveMeArrays(float[] vertices, long[] triangles, long num);
};

interface StoreArray {
  void StoreArray();

  void setArray([Const] long[] array);
  long getArrayValue(long index);
};

interface LongLongTypes {
  readonly attribute unsigned long long[] lluArray;
  attribute long long ll;
};

[NoDelete]
interface ISmallObject {
  long getID(long number);
};

[JSImplementation="ISmallObject"]
interface JSSmallObject {
  void JSSmallObject();
  long getID(long number);
};

[NoDelete]
interface IObjectProvider {
  ISmallObject getObject();
};

[JSImplementation="IObjectProvider"]
interface JSObjectProvider {
  void JSObjectProvider();
  JSSmallObject getObject();
};

interface ObjectFactory {
  void ObjectFactory();
  IObjectProvider getProvider();
};

interface ArrayArgumentTest {
  void ArrayArgumentTest();
  boolean byteArrayTest([Const] byte[] arg);
  boolean domStringTest([Const] DOMString arg);
};

[JSImplementation = "ArrayArgumentTest"] 
interface JSArrayArgumentTest {
  void JSArrayArgumentTest();
  boolean byteArrayTest([Const] byte[] arg);
  boolean domStringTest([Const] DOMString arg);
};