tizen beta release
[framework/web/webkit-efl.git] / Source / WebCore / bindings / scripts / test / ObjC / DOMTestObj.mm
1 /*
2  * This file is part of the WebKit open source project.
3  * This file has been generated by generate-bindings.pl. DO NOT MODIFY!
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 "config.h"
28 #import "DOMInternal.h"
29
30 #import "DOMTestObj.h"
31
32 #import "DOMBlobInternal.h"
33 #import "DOMCSSRuleInternal.h"
34 #import "DOMCSSValueInternal.h"
35 #import "DOMEventInternal.h"
36 #import "DOMIDBKeyInternal.h"
37 #import "DOMNodeInternal.h"
38 #import "DOMOptionsObjectInternal.h"
39 #import "DOMStyleSheetInternal.h"
40 #import "DOMTestObjInternal.h"
41 #import "DOMTestObjectAConstructorInternal.h"
42 #import "DOMTestObjectBConstructorInternal.h"
43 #import "DOMTestObjectCConstructorInternal.h"
44 #import "DOMlogInternal.h"
45 #import "EventListener.h"
46 #import "ExceptionHandlers.h"
47 #import "HTMLNames.h"
48 #import "IDBKey.h"
49 #import "JSMainThreadExecState.h"
50 #import "KURL.h"
51 #import "ObjCEventListener.h"
52 #import "OptionsObject.h"
53 #import "SerializedScriptValue.h"
54 #import "TestObj.h"
55 #import "TestObjectAConstructor.h"
56 #import "TestObjectBConstructor.h"
57 #import "TestObjectCConstructor.h"
58 #import "ThreadCheck.h"
59 #import "WebCoreObjCExtras.h"
60 #import "WebScriptObjectPrivate.h"
61 #import "log.h"
62 #import <wtf/GetPtr.h>
63
64 #define IMPL reinterpret_cast<WebCore::TestObj*>(_internal)
65
66 @implementation DOMTestObj
67
68 - (void)dealloc
69 {
70     if (WebCoreObjCScheduleDeallocateOnMainThread([DOMTestObj class], self))
71         return;
72
73     if (_internal)
74         IMPL->deref();
75     [super dealloc];
76 }
77
78 - (void)finalize
79 {
80     if (_internal)
81         IMPL->deref();
82     [super finalize];
83 }
84
85 - (int)readOnlyIntAttr
86 {
87     WebCore::JSMainThreadNullState state;
88     return IMPL->readOnlyIntAttr();
89 }
90
91 - (NSString *)readOnlyStringAttr
92 {
93     WebCore::JSMainThreadNullState state;
94     return IMPL->readOnlyStringAttr();
95 }
96
97 - (DOMTestObj *)readOnlyTestObjAttr
98 {
99     WebCore::JSMainThreadNullState state;
100     return kit(WTF::getPtr(IMPL->readOnlyTestObjAttr()));
101 }
102
103 - (short)shortAttr
104 {
105     WebCore::JSMainThreadNullState state;
106     return IMPL->shortAttr();
107 }
108
109 - (void)setShortAttr:(short)newShortAttr
110 {
111     WebCore::JSMainThreadNullState state;
112     IMPL->setShortAttr(newShortAttr);
113 }
114
115 - (unsigned short)unsignedShortAttr
116 {
117     WebCore::JSMainThreadNullState state;
118     return IMPL->unsignedShortAttr();
119 }
120
121 - (void)setUnsignedShortAttr:(unsigned short)newUnsignedShortAttr
122 {
123     WebCore::JSMainThreadNullState state;
124     IMPL->setUnsignedShortAttr(newUnsignedShortAttr);
125 }
126
127 - (int)intAttr
128 {
129     WebCore::JSMainThreadNullState state;
130     return IMPL->intAttr();
131 }
132
133 - (void)setIntAttr:(int)newIntAttr
134 {
135     WebCore::JSMainThreadNullState state;
136     IMPL->setIntAttr(newIntAttr);
137 }
138
139 - (long long)longLongAttr
140 {
141     WebCore::JSMainThreadNullState state;
142     return IMPL->longLongAttr();
143 }
144
145 - (void)setLongLongAttr:(long long)newLongLongAttr
146 {
147     WebCore::JSMainThreadNullState state;
148     IMPL->setLongLongAttr(newLongLongAttr);
149 }
150
151 - (unsigned long long)unsignedLongLongAttr
152 {
153     WebCore::JSMainThreadNullState state;
154     return IMPL->unsignedLongLongAttr();
155 }
156
157 - (void)setUnsignedLongLongAttr:(unsigned long long)newUnsignedLongLongAttr
158 {
159     WebCore::JSMainThreadNullState state;
160     IMPL->setUnsignedLongLongAttr(newUnsignedLongLongAttr);
161 }
162
163 - (NSString *)stringAttr
164 {
165     WebCore::JSMainThreadNullState state;
166     return IMPL->stringAttr();
167 }
168
169 - (void)setStringAttr:(NSString *)newStringAttr
170 {
171     WebCore::JSMainThreadNullState state;
172     IMPL->setStringAttr(newStringAttr);
173 }
174
175 - (DOMTestObj *)testObjAttr
176 {
177     WebCore::JSMainThreadNullState state;
178     return kit(WTF::getPtr(IMPL->testObjAttr()));
179 }
180
181 - (void)setTestObjAttr:(DOMTestObj *)newTestObjAttr
182 {
183     WebCore::JSMainThreadNullState state;
184     ASSERT(newTestObjAttr);
185
186     IMPL->setTestObjAttr(core(newTestObjAttr));
187 }
188
189 - (DOMTestObj *)XMLObjAttr
190 {
191     WebCore::JSMainThreadNullState state;
192     return kit(WTF::getPtr(IMPL->xmlObjAttr()));
193 }
194
195 - (void)setXMLObjAttr:(DOMTestObj *)newXMLObjAttr
196 {
197     WebCore::JSMainThreadNullState state;
198     ASSERT(newXMLObjAttr);
199
200     IMPL->setXMLObjAttr(core(newXMLObjAttr));
201 }
202
203 - (BOOL)create
204 {
205     WebCore::JSMainThreadNullState state;
206     return IMPL->isCreate();
207 }
208
209 - (void)setCreate:(BOOL)newCreate
210 {
211     WebCore::JSMainThreadNullState state;
212     IMPL->setCreate(newCreate);
213 }
214
215 - (NSString *)reflectedStringAttr
216 {
217     WebCore::JSMainThreadNullState state;
218     return IMPL->getAttribute(WebCore::HTMLNames::reflectedstringattrAttr);
219 }
220
221 - (void)setReflectedStringAttr:(NSString *)newReflectedStringAttr
222 {
223     WebCore::JSMainThreadNullState state;
224     IMPL->setAttribute(WebCore::HTMLNames::reflectedstringattrAttr, newReflectedStringAttr);
225 }
226
227 - (int)reflectedIntegralAttr
228 {
229     WebCore::JSMainThreadNullState state;
230     return IMPL->getIntegralAttribute(WebCore::HTMLNames::reflectedintegralattrAttr);
231 }
232
233 - (void)setReflectedIntegralAttr:(int)newReflectedIntegralAttr
234 {
235     WebCore::JSMainThreadNullState state;
236     IMPL->setIntegralAttribute(WebCore::HTMLNames::reflectedintegralattrAttr, newReflectedIntegralAttr);
237 }
238
239 - (unsigned)reflectedUnsignedIntegralAttr
240 {
241     WebCore::JSMainThreadNullState state;
242     return IMPL->getUnsignedIntegralAttribute(WebCore::HTMLNames::reflectedunsignedintegralattrAttr);
243 }
244
245 - (void)setReflectedUnsignedIntegralAttr:(unsigned)newReflectedUnsignedIntegralAttr
246 {
247     WebCore::JSMainThreadNullState state;
248     IMPL->setUnsignedIntegralAttribute(WebCore::HTMLNames::reflectedunsignedintegralattrAttr, newReflectedUnsignedIntegralAttr);
249 }
250
251 - (BOOL)reflectedBooleanAttr
252 {
253     WebCore::JSMainThreadNullState state;
254     return IMPL->hasAttribute(WebCore::HTMLNames::reflectedbooleanattrAttr);
255 }
256
257 - (void)setReflectedBooleanAttr:(BOOL)newReflectedBooleanAttr
258 {
259     WebCore::JSMainThreadNullState state;
260     IMPL->setBooleanAttribute(WebCore::HTMLNames::reflectedbooleanattrAttr, newReflectedBooleanAttr);
261 }
262
263 - (NSString *)reflectedURLAttr
264 {
265     WebCore::JSMainThreadNullState state;
266     return IMPL->getURLAttribute(WebCore::HTMLNames::reflectedurlattrAttr);
267 }
268
269 - (void)setReflectedURLAttr:(NSString *)newReflectedURLAttr
270 {
271     WebCore::JSMainThreadNullState state;
272     IMPL->setAttribute(WebCore::HTMLNames::reflectedurlattrAttr, newReflectedURLAttr);
273 }
274
275 - (NSString *)reflectedNonEmptyURLAttr
276 {
277     WebCore::JSMainThreadNullState state;
278     return IMPL->getNonEmptyURLAttribute(WebCore::HTMLNames::reflectednonemptyurlattrAttr);
279 }
280
281 - (void)setReflectedNonEmptyURLAttr:(NSString *)newReflectedNonEmptyURLAttr
282 {
283     WebCore::JSMainThreadNullState state;
284     IMPL->setAttribute(WebCore::HTMLNames::reflectednonemptyurlattrAttr, newReflectedNonEmptyURLAttr);
285 }
286
287 - (NSString *)reflectedStringAttr
288 {
289     WebCore::JSMainThreadNullState state;
290     return IMPL->getAttribute(WebCore::HTMLNames::customContentStringAttrAttr);
291 }
292
293 - (void)setReflectedStringAttr:(NSString *)newReflectedStringAttr
294 {
295     WebCore::JSMainThreadNullState state;
296     IMPL->setAttribute(WebCore::HTMLNames::customContentStringAttrAttr, newReflectedStringAttr);
297 }
298
299 - (int)reflectedCustomIntegralAttr
300 {
301     WebCore::JSMainThreadNullState state;
302     return IMPL->getIntegralAttribute(WebCore::HTMLNames::customContentIntegralAttrAttr);
303 }
304
305 - (void)setReflectedCustomIntegralAttr:(int)newReflectedCustomIntegralAttr
306 {
307     WebCore::JSMainThreadNullState state;
308     IMPL->setIntegralAttribute(WebCore::HTMLNames::customContentIntegralAttrAttr, newReflectedCustomIntegralAttr);
309 }
310
311 - (BOOL)reflectedCustomBooleanAttr
312 {
313     WebCore::JSMainThreadNullState state;
314     return IMPL->hasAttribute(WebCore::HTMLNames::customContentBooleanAttrAttr);
315 }
316
317 - (void)setReflectedCustomBooleanAttr:(BOOL)newReflectedCustomBooleanAttr
318 {
319     WebCore::JSMainThreadNullState state;
320     IMPL->setBooleanAttribute(WebCore::HTMLNames::customContentBooleanAttrAttr, newReflectedCustomBooleanAttr);
321 }
322
323 - (NSString *)reflectedCustomURLAttr
324 {
325     WebCore::JSMainThreadNullState state;
326     return IMPL->getURLAttribute(WebCore::HTMLNames::customContentURLAttrAttr);
327 }
328
329 - (void)setReflectedCustomURLAttr:(NSString *)newReflectedCustomURLAttr
330 {
331     WebCore::JSMainThreadNullState state;
332     IMPL->setAttribute(WebCore::HTMLNames::customContentURLAttrAttr, newReflectedCustomURLAttr);
333 }
334
335 - (NSString *)reflectedCustomNonEmptyURLAttr
336 {
337     WebCore::JSMainThreadNullState state;
338     return IMPL->getNonEmptyURLAttribute(WebCore::HTMLNames::customContentNonEmptyURLAttrAttr);
339 }
340
341 - (void)setReflectedCustomNonEmptyURLAttr:(NSString *)newReflectedCustomNonEmptyURLAttr
342 {
343     WebCore::JSMainThreadNullState state;
344     IMPL->setAttribute(WebCore::HTMLNames::customContentNonEmptyURLAttrAttr, newReflectedCustomNonEmptyURLAttr);
345 }
346
347 - (int)attrWithGetterException
348 {
349     WebCore::JSMainThreadNullState state;
350     WebCore::ExceptionCode ec = 0;
351     int result = IMPL->attrWithGetterException(ec);
352     WebCore::raiseOnDOMError(ec);
353     return result;
354 }
355
356 - (void)setAttrWithGetterException:(int)newAttrWithGetterException
357 {
358     WebCore::JSMainThreadNullState state;
359     WebCore::ExceptionCode ec = 0;
360     IMPL->setAttrWithGetterException(newAttrWithGetterException, ec);
361     WebCore::raiseOnDOMError(ec);
362 }
363
364 - (int)attrWithSetterException
365 {
366     WebCore::JSMainThreadNullState state;
367     return IMPL->attrWithSetterException();
368 }
369
370 - (void)setAttrWithSetterException:(int)newAttrWithSetterException
371 {
372     WebCore::JSMainThreadNullState state;
373     WebCore::ExceptionCode ec = 0;
374     IMPL->setAttrWithSetterException(newAttrWithSetterException, ec);
375     WebCore::raiseOnDOMError(ec);
376 }
377
378 - (NSString *)stringAttrWithGetterException
379 {
380     WebCore::JSMainThreadNullState state;
381     WebCore::ExceptionCode ec = 0;
382     NSString *result = IMPL->stringAttrWithGetterException(ec);
383     WebCore::raiseOnDOMError(ec);
384     return result;
385 }
386
387 - (void)setStringAttrWithGetterException:(NSString *)newStringAttrWithGetterException
388 {
389     WebCore::JSMainThreadNullState state;
390     WebCore::ExceptionCode ec = 0;
391     IMPL->setStringAttrWithGetterException(newStringAttrWithGetterException, ec);
392     WebCore::raiseOnDOMError(ec);
393 }
394
395 - (NSString *)stringAttrWithSetterException
396 {
397     WebCore::JSMainThreadNullState state;
398     return IMPL->stringAttrWithSetterException();
399 }
400
401 - (void)setStringAttrWithSetterException:(NSString *)newStringAttrWithSetterException
402 {
403     WebCore::JSMainThreadNullState state;
404     WebCore::ExceptionCode ec = 0;
405     IMPL->setStringAttrWithSetterException(newStringAttrWithSetterException, ec);
406     WebCore::raiseOnDOMError(ec);
407 }
408
409 - (int)customAttr
410 {
411     WebCore::JSMainThreadNullState state;
412     return IMPL->customAttr();
413 }
414
415 - (void)setCustomAttr:(int)newCustomAttr
416 {
417     WebCore::JSMainThreadNullState state;
418     IMPL->setCustomAttr(newCustomAttr);
419 }
420
421 - (NSString *)scriptStringAttr
422 {
423     WebCore::JSMainThreadNullState state;
424     return IMPL->scriptStringAttr();
425 }
426
427 #if ENABLE(Condition1)
428 - (int)conditionalAttr1
429 {
430     WebCore::JSMainThreadNullState state;
431     return IMPL->conditionalAttr1();
432 }
433
434 - (void)setConditionalAttr1:(int)newConditionalAttr1
435 {
436     WebCore::JSMainThreadNullState state;
437     IMPL->setConditionalAttr1(newConditionalAttr1);
438 }
439 #endif
440
441 #if ENABLE(Condition1) && ENABLE(Condition2)
442 - (int)conditionalAttr2
443 {
444     WebCore::JSMainThreadNullState state;
445     return IMPL->conditionalAttr2();
446 }
447
448 - (void)setConditionalAttr2:(int)newConditionalAttr2
449 {
450     WebCore::JSMainThreadNullState state;
451     IMPL->setConditionalAttr2(newConditionalAttr2);
452 }
453 #endif
454
455 #if ENABLE(Condition1) || ENABLE(Condition2)
456 - (int)conditionalAttr3
457 {
458     WebCore::JSMainThreadNullState state;
459     return IMPL->conditionalAttr3();
460 }
461
462 - (void)setConditionalAttr3:(int)newConditionalAttr3
463 {
464     WebCore::JSMainThreadNullState state;
465     IMPL->setConditionalAttr3(newConditionalAttr3);
466 }
467 #endif
468
469 #if ENABLE(Condition1)
470 - (DOMTestObjectAConstructor *)conditionalAttr4
471 {
472     WebCore::JSMainThreadNullState state;
473     return kit(WTF::getPtr(IMPL->conditionalAttr4()));
474 }
475
476 - (void)setConditionalAttr4:(DOMTestObjectAConstructor *)newConditionalAttr4
477 {
478     WebCore::JSMainThreadNullState state;
479     ASSERT(newConditionalAttr4);
480
481     IMPL->setConditionalAttr4(core(newConditionalAttr4));
482 }
483 #endif
484
485 #if ENABLE(Condition1) && ENABLE(Condition2)
486 - (DOMTestObjectBConstructor *)conditionalAttr5
487 {
488     WebCore::JSMainThreadNullState state;
489     return kit(WTF::getPtr(IMPL->conditionalAttr5()));
490 }
491
492 - (void)setConditionalAttr5:(DOMTestObjectBConstructor *)newConditionalAttr5
493 {
494     WebCore::JSMainThreadNullState state;
495     ASSERT(newConditionalAttr5);
496
497     IMPL->setConditionalAttr5(core(newConditionalAttr5));
498 }
499 #endif
500
501 #if ENABLE(Condition1) || ENABLE(Condition2)
502 - (DOMTestObjectCConstructor *)conditionalAttr6
503 {
504     WebCore::JSMainThreadNullState state;
505     return kit(WTF::getPtr(IMPL->conditionalAttr6()));
506 }
507
508 - (void)setConditionalAttr6:(DOMTestObjectCConstructor *)newConditionalAttr6
509 {
510     WebCore::JSMainThreadNullState state;
511     ASSERT(newConditionalAttr6);
512
513     IMPL->setConditionalAttr6(core(newConditionalAttr6));
514 }
515 #endif
516
517 - (int)descriptionName
518 {
519     WebCore::JSMainThreadNullState state;
520     return IMPL->description();
521 }
522
523 - (int)idName
524 {
525     WebCore::JSMainThreadNullState state;
526     return IMPL->id();
527 }
528
529 - (void)setIdName:(int)newIdName
530 {
531     WebCore::JSMainThreadNullState state;
532     IMPL->setId(newIdName);
533 }
534
535 - (NSString *)hashName
536 {
537     WebCore::JSMainThreadNullState state;
538     return IMPL->hash();
539 }
540
541 - (void)voidMethod
542 {
543     WebCore::JSMainThreadNullState state;
544     IMPL->voidMethod();
545 }
546
547 - (void)voidMethodWithArgs:(int)intArg strArg:(NSString *)strArg objArg:(DOMTestObj *)objArg
548 {
549     WebCore::JSMainThreadNullState state;
550     IMPL->voidMethodWithArgs(intArg, strArg, core(objArg));
551 }
552
553 - (int)intMethod
554 {
555     WebCore::JSMainThreadNullState state;
556     return IMPL->intMethod();
557 }
558
559 - (int)intMethodWithArgs:(int)intArg strArg:(NSString *)strArg objArg:(DOMTestObj *)objArg
560 {
561     WebCore::JSMainThreadNullState state;
562     return IMPL->intMethodWithArgs(intArg, strArg, core(objArg));
563 }
564
565 - (DOMTestObj *)objMethod
566 {
567     WebCore::JSMainThreadNullState state;
568     return kit(WTF::getPtr(IMPL->objMethod()));
569 }
570
571 - (DOMTestObj *)objMethodWithArgs:(int)intArg strArg:(NSString *)strArg objArg:(DOMTestObj *)objArg
572 {
573     WebCore::JSMainThreadNullState state;
574     return kit(WTF::getPtr(IMPL->objMethodWithArgs(intArg, strArg, core(objArg))));
575 }
576
577 - (DOMTestObj *)methodThatRequiresAllArgsAndThrows:(NSString *)strArg objArg:(DOMTestObj *)objArg
578 {
579     WebCore::JSMainThreadNullState state;
580     WebCore::ExceptionCode ec = 0;
581     DOMTestObj *result = kit(WTF::getPtr(IMPL->methodThatRequiresAllArgsAndThrows(strArg, core(objArg), ec)));
582     WebCore::raiseOnDOMError(ec);
583     return result;
584 }
585
586 - (void)serializedValue:(NSString *)serializedArg
587 {
588     WebCore::JSMainThreadNullState state;
589     IMPL->serializedValue(WebCore::SerializedScriptValue::create(WTF::String(serializedArg)));
590 }
591
592 - (void)idbKey:(DOMIDBKey *)key
593 {
594     WebCore::JSMainThreadNullState state;
595     IMPL->idbKey(core(key));
596 }
597
598 - (void)optionsObject:(DOMOptionsObject *)oo ooo:(DOMOptionsObject *)ooo
599 {
600     WebCore::JSMainThreadNullState state;
601     IMPL->optionsObject(core(oo), core(ooo));
602 }
603
604 - (void)methodWithException
605 {
606     WebCore::JSMainThreadNullState state;
607     WebCore::ExceptionCode ec = 0;
608     IMPL->methodWithException(ec);
609     WebCore::raiseOnDOMError(ec);
610 }
611
612 - (void)customMethod
613 {
614     WebCore::JSMainThreadNullState state;
615     IMPL->customMethod();
616 }
617
618 - (void)customMethodWithArgs:(int)intArg strArg:(NSString *)strArg objArg:(DOMTestObj *)objArg
619 {
620     WebCore::JSMainThreadNullState state;
621     IMPL->customMethodWithArgs(intArg, strArg, core(objArg));
622 }
623
624 - (void)customArgsAndException:(DOMlog *)intArg
625 {
626     WebCore::JSMainThreadNullState state;
627     WebCore::ExceptionCode ec = 0;
628     IMPL->customArgsAndException(core(intArg), ec);
629     WebCore::raiseOnDOMError(ec);
630 }
631
632 - (void)addEventListener:(NSString *)type listener:(id <DOMEventListener>)listener useCapture:(BOOL)useCapture
633 {
634     WebCore::JSMainThreadNullState state;
635     RefPtr<WebCore::EventListener> nativeEventListener = WebCore::ObjCEventListener::wrap(listener);
636     IMPL->addEventListener(type, WTF::getPtr(nativeEventListener), useCapture);
637 }
638
639 - (void)removeEventListener:(NSString *)type listener:(id <DOMEventListener>)listener useCapture:(BOOL)useCapture
640 {
641     WebCore::JSMainThreadNullState state;
642     RefPtr<WebCore::EventListener> nativeEventListener = WebCore::ObjCEventListener::wrap(listener);
643     IMPL->removeEventListener(type, WTF::getPtr(nativeEventListener), useCapture);
644 }
645
646 - (void)withDynamicFrame
647 {
648     WebCore::JSMainThreadNullState state;
649     IMPL->withDynamicFrame();
650 }
651
652 - (void)withDynamicFrameAndArg:(int)intArg
653 {
654     WebCore::JSMainThreadNullState state;
655     IMPL->withDynamicFrameAndArg(intArg);
656 }
657
658 - (void)withDynamicFrameAndOptionalArg:(int)intArg optionalArg:(int)optionalArg
659 {
660     WebCore::JSMainThreadNullState state;
661     IMPL->withDynamicFrameAndOptionalArg(intArg, optionalArg);
662 }
663
664 - (void)withDynamicFrameAndUserGesture:(int)intArg
665 {
666     WebCore::JSMainThreadNullState state;
667     IMPL->withDynamicFrameAndUserGesture(intArg);
668 }
669
670 - (void)withDynamicFrameAndUserGestureASAD:(int)intArg optionalArg:(int)optionalArg
671 {
672     WebCore::JSMainThreadNullState state;
673     IMPL->withDynamicFrameAndUserGestureASAD(intArg, optionalArg);
674 }
675
676 - (void)withScriptStateVoid
677 {
678     WebCore::JSMainThreadNullState state;
679     IMPL->withScriptStateVoid();
680 }
681
682 - (DOMTestObj *)withScriptStateObj
683 {
684     WebCore::JSMainThreadNullState state;
685     return kit(WTF::getPtr(IMPL->withScriptStateObj()));
686 }
687
688 - (void)withScriptStateVoidException
689 {
690     WebCore::JSMainThreadNullState state;
691     WebCore::ExceptionCode ec = 0;
692     IMPL->withScriptStateVoidException(ec);
693     WebCore::raiseOnDOMError(ec);
694 }
695
696 - (DOMTestObj *)withScriptStateObjException
697 {
698     WebCore::JSMainThreadNullState state;
699     WebCore::ExceptionCode ec = 0;
700     DOMTestObj *result = kit(WTF::getPtr(IMPL->withScriptStateObjException(ec)));
701     WebCore::raiseOnDOMError(ec);
702     return result;
703 }
704
705 - (void)withScriptExecutionContext
706 {
707     WebCore::JSMainThreadNullState state;
708     IMPL->withScriptExecutionContext();
709 }
710
711 - (void)methodWithOptionalArg:(int)opt
712 {
713     WebCore::JSMainThreadNullState state;
714     IMPL->methodWithOptionalArg(opt);
715 }
716
717 - (void)methodWithNonOptionalArgAndOptionalArg:(int)nonOpt opt:(int)opt
718 {
719     WebCore::JSMainThreadNullState state;
720     IMPL->methodWithNonOptionalArgAndOptionalArg(nonOpt, opt);
721 }
722
723 - (void)methodWithNonOptionalArgAndTwoOptionalArgs:(int)nonOpt opt1:(int)opt1 opt2:(int)opt2
724 {
725     WebCore::JSMainThreadNullState state;
726     IMPL->methodWithNonOptionalArgAndTwoOptionalArgs(nonOpt, opt1, opt2);
727 }
728
729
730 #if ENABLE(Condition1)
731 - (NSString *)conditionalMethod1
732 {
733     WebCore::JSMainThreadNullState state;
734     return IMPL->conditionalMethod1();
735 }
736
737 #endif
738
739
740 #if ENABLE(Condition1) && ENABLE(Condition2)
741 - (void)conditionalMethod2
742 {
743     WebCore::JSMainThreadNullState state;
744     IMPL->conditionalMethod2();
745 }
746
747 #endif
748
749
750 #if ENABLE(Condition1) || ENABLE(Condition2)
751 - (void)conditionalMethod3
752 {
753     WebCore::JSMainThreadNullState state;
754     IMPL->conditionalMethod3();
755 }
756
757 #endif
758
759 - (void)classMethod
760 {
761     WebCore::JSMainThreadNullState state;
762     IMPL->classMethod();
763 }
764
765 - (int)classMethodWithOptional:(int)arg
766 {
767     WebCore::JSMainThreadNullState state;
768     return IMPL->classMethodWithOptional(arg);
769 }
770
771 @end
772
773 WebCore::TestObj* core(DOMTestObj *wrapper)
774 {
775     return wrapper ? reinterpret_cast<WebCore::TestObj*>(wrapper->_internal) : 0;
776 }
777
778 DOMTestObj *kit(WebCore::TestObj* value)
779 {
780     { DOM_ASSERT_MAIN_THREAD(); WebCoreThreadViolationCheckRoundOne(); };
781     if (!value)
782         return nil;
783     if (DOMTestObj *wrapper = getDOMWrapper(value))
784         return [[wrapper retain] autorelease];
785     DOMTestObj *wrapper = [[DOMTestObj alloc] _init];
786     wrapper->_internal = reinterpret_cast<DOMObjectInternal*>(value);
787     value->ref();
788     addDOMWrapper(wrapper, value);
789     return [wrapper autorelease];
790 }