Remove LegacyException support from bindings script
[WebKit-https.git] / Source / WebCore / bindings / scripts / test / TestTypedefs.idl
1 /*
2  * Copyright (C) 2013 Google Inc. All rights reserved.
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions are
6  * met:
7  *
8  *     * Redistributions of source code must retain the above copyright
9  * notice, this list of conditions and the following disclaimer.
10  *     * Redistributions in binary form must reproduce the above
11  * copyright notice, this list of conditions and the following disclaimer
12  * in the documentation and/or other materials provided with the
13  * distribution.
14  *     * Neither the name of Google Inc. nor the names of its
15  * contributors may be used to endorse or promote products derived from
16  * this software without specific prior written permission.
17  *
18  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29  */
30
31 // This IDL file is for testing the bindings code generator and for tracking
32 // changes in its output.
33
34 [
35     Constructor(STRING hello, TEST_CALLBACK_FUNCTION testCallbackFunction, TEST_CALLBACK_INTERFACE testCallbackInterface),
36 ] interface TestTypedefs {
37     attribute ULONGLONG unsignedLongLongAttr;
38
39     [Immutable] attribute SCRIPT_VALUE immutableSerializedScriptValue;
40     
41     static readonly attribute T TestSubObj;
42
43     void func(optional SEQUENCE_OF_LONGS x = []);
44
45     void setShadow(DOUBLE width, DOUBLE height, unrestricted float blur, optional STRING color, optional DOUBLE alpha);
46
47     ULONGLONG methodWithSequenceArg(sequence<SCRIPT_VALUE> sequenceArg);
48
49     void nullableSequenceArg(SEQUENCE_OF_STRINGS? sequenceArg);
50     void sequenceOfNullablesArg(sequence<STRING?> sequenceArg);
51     void nullableSequenceOfNullablesArg(SEQUENCE_OF_NULLABLE_STRINGS? sequenceArg);
52     void nullableSequenceOfUnionsArg(sequence<(STRING or SEQUENCE_OF_STRINGS)>? sequenceArg);
53
54     void unionArg(UNION_STRING_LONG unionArg);
55
56     void funcWithClamp([Clamp] ULONGLONG arg1, [Clamp] optional ULONGLONG arg2);
57
58     [Immutable] SVGPOINT immutablePointFunction();
59
60     [MayThrowException] SEQUENCE_OF_STRINGS stringSequenceFunction(SEQUENCE_OF_STRINGS values);
61     [MayThrowException] sequence<STRING> stringSequenceFunction2(sequence<STRING> values);
62
63     boolean callWithSequenceThatRequiresInclude(sequence<TestEventTarget> sequenceArg);
64
65     // Exceptions
66     [MayThrowException] void methodWithException();
67     [GetterMayThrowException] attribute long attrWithGetterException;
68     [SetterMayThrowException] attribute long attrWithSetterException;
69     [GetterMayThrowException] attribute DOMString stringAttrWithGetterException;
70     [SetterMayThrowException] attribute DOMString stringAttrWithSetterException;
71 };
72
73 typedef unrestricted float         DOUBLE;
74 typedef unsigned long long         ULONGLONG;
75 typedef SerializedScriptValue      SCRIPT_VALUE;
76 typedef sequence<long>             SEQUENCE_OF_LONGS;
77 typedef long?                      NULLABLE_LONG;
78 typedef SVGPoint                   SVGPOINT;
79 typedef DOMString                  STRING;
80 typedef sequence<DOMString>        SEQUENCE_OF_STRINGS;
81 typedef sequence<DOMString?>       SEQUENCE_OF_NULLABLE_STRINGS;
82 typedef TestCallbackFunction       TEST_CALLBACK_FUNCTION;
83 typedef TestCallbackInterface      TEST_CALLBACK_INTERFACE;
84 typedef TestSubObjConstructor      T;
85 typedef Int32Array                 ARRAY;
86 typedef DOMException               E;
87 typedef TestEventTarget            TEST_EVENT_TARGET;
88 typedef (DOMString or long)        UNION_STRING_LONG;