tizen beta release
[framework/web/webkit-efl.git] / Source / WebCore / bindings / scripts / test / ObjC / DOMTestObj.h
1 /*
2  * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
3  * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  * 1. Redistributions of source code must retain the above copyright
9  *    notice, this list of conditions and the following disclaimer.
10  * 2. Redistributions in binary form must reproduce the above copyright
11  *    notice, this list of conditions and the following disclaimer in the
12  *    documentation and/or other materials provided with the distribution.
13  *
14  * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
15  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
18  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
20  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
21  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
22  * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
24  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
25  */
26
27 #import <WebCore/DOMObject.h>
28
29 #if WEBKIT_VERSION_MAX_ALLOWED >= WEBKIT_VERSION_LATEST
30
31 @class DOMIDBKey;
32 @class DOMOptionsObject;
33 @class DOMTestObj;
34 @class DOMTestObjectAConstructor;
35 @class DOMTestObjectBConstructor;
36 @class DOMTestObjectCConstructor;
37 @class DOMlog;
38 @class NSString;
39 @protocol DOMEventListener;
40
41 enum {
42 #if ENABLE(Condition1)
43     DOM_CONDITIONAL_CONST = 0,
44 #endif
45     DOM_CONST_VALUE_0 = 0,
46     DOM_CONST_VALUE_1 = 1,
47     DOM_CONST_VALUE_2 = 2,
48     DOM_CONST_VALUE_4 = 4,
49     DOM_CONST_VALUE_8 = 8,
50     DOM_CONST_VALUE_9 = -1,
51     DOM_CONST_VALUE_10 = "my constant string",
52     DOM_CONST_VALUE_11 = 0xffffffff,
53     DOM_CONST_VALUE_12 = 0x01,
54     DOM_CONST_VALUE_13 = 0X20,
55     DOM_CONST_VALUE_14 = 0x1abc,
56     DOM_CONST_JAVASCRIPT = 15
57 };
58
59 @interface DOMTestObj : DOMObject
60 - (int)readOnlyIntAttr;
61 - (NSString *)readOnlyStringAttr;
62 - (DOMTestObj *)readOnlyTestObjAttr;
63 - (short)shortAttr;
64 - (void)setShortAttr:(short)newShortAttr;
65 - (unsigned short)unsignedShortAttr;
66 - (void)setUnsignedShortAttr:(unsigned short)newUnsignedShortAttr;
67 - (int)intAttr;
68 - (void)setIntAttr:(int)newIntAttr;
69 - (long long)longLongAttr;
70 - (void)setLongLongAttr:(long long)newLongLongAttr;
71 - (unsigned long long)unsignedLongLongAttr;
72 - (void)setUnsignedLongLongAttr:(unsigned long long)newUnsignedLongLongAttr;
73 - (NSString *)stringAttr;
74 - (void)setStringAttr:(NSString *)newStringAttr;
75 - (DOMTestObj *)testObjAttr;
76 - (void)setTestObjAttr:(DOMTestObj *)newTestObjAttr;
77 - (DOMTestObj *)XMLObjAttr;
78 - (void)setXMLObjAttr:(DOMTestObj *)newXMLObjAttr;
79 - (BOOL)create;
80 - (void)setCreate:(BOOL)newCreate;
81 - (NSString *)reflectedStringAttr;
82 - (void)setReflectedStringAttr:(NSString *)newReflectedStringAttr;
83 - (int)reflectedIntegralAttr;
84 - (void)setReflectedIntegralAttr:(int)newReflectedIntegralAttr;
85 - (unsigned)reflectedUnsignedIntegralAttr;
86 - (void)setReflectedUnsignedIntegralAttr:(unsigned)newReflectedUnsignedIntegralAttr;
87 - (BOOL)reflectedBooleanAttr;
88 - (void)setReflectedBooleanAttr:(BOOL)newReflectedBooleanAttr;
89 - (NSString *)reflectedURLAttr;
90 - (void)setReflectedURLAttr:(NSString *)newReflectedURLAttr;
91 - (NSString *)reflectedNonEmptyURLAttr;
92 - (void)setReflectedNonEmptyURLAttr:(NSString *)newReflectedNonEmptyURLAttr;
93 - (NSString *)reflectedStringAttr;
94 - (void)setReflectedStringAttr:(NSString *)newReflectedStringAttr;
95 - (int)reflectedCustomIntegralAttr;
96 - (void)setReflectedCustomIntegralAttr:(int)newReflectedCustomIntegralAttr;
97 - (BOOL)reflectedCustomBooleanAttr;
98 - (void)setReflectedCustomBooleanAttr:(BOOL)newReflectedCustomBooleanAttr;
99 - (NSString *)reflectedCustomURLAttr;
100 - (void)setReflectedCustomURLAttr:(NSString *)newReflectedCustomURLAttr;
101 - (NSString *)reflectedCustomNonEmptyURLAttr;
102 - (void)setReflectedCustomNonEmptyURLAttr:(NSString *)newReflectedCustomNonEmptyURLAttr;
103 - (int)attrWithGetterException;
104 - (void)setAttrWithGetterException:(int)newAttrWithGetterException;
105 - (int)attrWithSetterException;
106 - (void)setAttrWithSetterException:(int)newAttrWithSetterException;
107 - (NSString *)stringAttrWithGetterException;
108 - (void)setStringAttrWithGetterException:(NSString *)newStringAttrWithGetterException;
109 - (NSString *)stringAttrWithSetterException;
110 - (void)setStringAttrWithSetterException:(NSString *)newStringAttrWithSetterException;
111 - (int)customAttr;
112 - (void)setCustomAttr:(int)newCustomAttr;
113 - (NSString *)scriptStringAttr;
114 #if ENABLE(Condition1)
115 - (int)conditionalAttr1;
116 - (void)setConditionalAttr1:(int)newConditionalAttr1;
117 #endif
118 #if ENABLE(Condition1) && ENABLE(Condition2)
119 - (int)conditionalAttr2;
120 - (void)setConditionalAttr2:(int)newConditionalAttr2;
121 #endif
122 #if ENABLE(Condition1) || ENABLE(Condition2)
123 - (int)conditionalAttr3;
124 - (void)setConditionalAttr3:(int)newConditionalAttr3;
125 #endif
126 #if ENABLE(Condition1)
127 - (DOMTestObjectAConstructor *)conditionalAttr4;
128 - (void)setConditionalAttr4:(DOMTestObjectAConstructor *)newConditionalAttr4;
129 #endif
130 #if ENABLE(Condition1) && ENABLE(Condition2)
131 - (DOMTestObjectBConstructor *)conditionalAttr5;
132 - (void)setConditionalAttr5:(DOMTestObjectBConstructor *)newConditionalAttr5;
133 #endif
134 #if ENABLE(Condition1) || ENABLE(Condition2)
135 - (DOMTestObjectCConstructor *)conditionalAttr6;
136 - (void)setConditionalAttr6:(DOMTestObjectCConstructor *)newConditionalAttr6;
137 #endif
138 - (int)descriptionName;
139 - (int)idName;
140 - (void)setIdName:(int)newIdName;
141 - (NSString *)hashName;
142 - (void)voidMethod;
143 - (void)voidMethodWithArgs:(int)intArg strArg:(NSString *)strArg objArg:(DOMTestObj *)objArg;
144 - (int)intMethod;
145 - (int)intMethodWithArgs:(int)intArg strArg:(NSString *)strArg objArg:(DOMTestObj *)objArg;
146 - (DOMTestObj *)objMethod;
147 - (DOMTestObj *)objMethodWithArgs:(int)intArg strArg:(NSString *)strArg objArg:(DOMTestObj *)objArg;
148 - (DOMTestObj *)methodThatRequiresAllArgsAndThrows:(NSString *)strArg objArg:(DOMTestObj *)objArg;
149 - (void)serializedValue:(NSString *)serializedArg;
150 - (void)idbKey:(DOMIDBKey *)key;
151 - (void)optionsObject:(DOMOptionsObject *)oo ooo:(DOMOptionsObject *)ooo;
152 - (void)methodWithException;
153 - (void)customMethod;
154 - (void)customMethodWithArgs:(int)intArg strArg:(NSString *)strArg objArg:(DOMTestObj *)objArg;
155 - (void)customArgsAndException:(DOMlog *)intArg;
156 - (void)addEventListener:(NSString *)type listener:(id <DOMEventListener>)listener useCapture:(BOOL)useCapture;
157 - (void)removeEventListener:(NSString *)type listener:(id <DOMEventListener>)listener useCapture:(BOOL)useCapture;
158 - (void)withDynamicFrame;
159 - (void)withDynamicFrameAndArg:(int)intArg;
160 - (void)withDynamicFrameAndOptionalArg:(int)intArg optionalArg:(int)optionalArg;
161 - (void)withDynamicFrameAndUserGesture:(int)intArg;
162 - (void)withDynamicFrameAndUserGestureASAD:(int)intArg optionalArg:(int)optionalArg;
163 - (void)withScriptStateVoid;
164 - (DOMTestObj *)withScriptStateObj;
165 - (void)withScriptStateVoidException;
166 - (DOMTestObj *)withScriptStateObjException;
167 - (void)withScriptExecutionContext;
168 - (void)methodWithOptionalArg:(int)opt;
169 - (void)methodWithNonOptionalArgAndOptionalArg:(int)nonOpt opt:(int)opt;
170 - (void)methodWithNonOptionalArgAndTwoOptionalArgs:(int)nonOpt opt1:(int)opt1 opt2:(int)opt2;
171 - (NSString *)conditionalMethod1;
172 - (void)conditionalMethod2;
173 - (void)conditionalMethod3;
174 - (void)classMethod;
175 - (int)classMethodWithOptional:(int)arg;
176 @end
177
178 #endif