aboutsummaryrefslogtreecommitdiff
path: root/tests/webidl/test.idl
blob: 8ee82b767e729ce975d10d16656f1807e41c1710 (plain)
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
// Part 1

interface Parent {
  void Parent(long val);
  long getVal();
  void mulVal(long mul);
  void parentFunc();
  [Const] Parent getAsConst();
};

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();
  void virtualFunc();
  void virtualFunc2();
  void virtualFunc3(long x);
  void virtualFunc4(long x);
  static void runVirtualFunc(Child2 self);
};

Child2 implements Parent;

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

// Part 2

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

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();
};

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