2 * This file is part of the WebKit open source project.
3 * This file has been generated by generate-bindings.pl. DO NOT MODIFY!
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details.
15 * You should have received a copy of the GNU Library General Public License
16 * along with this library; see the file COPYING.LIB. If not, write to
17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 * Boston, MA 02110-1301, USA.
22 #include "WebDOMTestObj.h"
24 #include "Dictionary.h"
26 #include "HTMLNames.h"
30 #include "SerializedScriptValue.h"
32 #include "WebDOMDictionary.h"
33 #include "WebDOMDocument.h"
34 #include "WebDOMIDBKey.h"
35 #include "WebDOMSVGPoint.h"
36 #include "WebDOMString.h"
39 #include "WebDOMbool.h"
43 #include "WebExceptionHandler.h"
44 #include "WebNativeEventListener.h"
51 #include "wtf/text/AtomicString.h"
52 #include <wtf/GetPtr.h>
53 #include <wtf/RefPtr.h>
55 struct WebDOMTestObj::WebDOMTestObjPrivate {
56 WebDOMTestObjPrivate(WebCore::TestObj* object = 0)
61 RefPtr<WebCore::TestObj> impl;
64 WebDOMTestObj::WebDOMTestObj()
70 WebDOMTestObj::WebDOMTestObj(WebCore::TestObj* impl)
72 , m_impl(new WebDOMTestObjPrivate(impl))
76 WebDOMTestObj::WebDOMTestObj(const WebDOMTestObj& copy)
79 m_impl = copy.impl() ? new WebDOMTestObjPrivate(copy.impl()) : 0;
82 WebDOMTestObj& WebDOMTestObj::operator=(const WebDOMTestObj& copy)
85 m_impl = copy.impl() ? new WebDOMTestObjPrivate(copy.impl()) : 0;
89 WebCore::TestObj* WebDOMTestObj::impl() const
91 return m_impl ? WTF::getPtr(m_impl->impl) : 0;
94 WebDOMTestObj::~WebDOMTestObj()
100 int WebDOMTestObj::readOnlyIntAttr() const
105 return impl()->readOnlyIntAttr();
108 WebDOMString WebDOMTestObj::readOnlyStringAttr() const
111 return WebDOMString();
113 return static_cast<const WTF::String&>(impl()->readOnlyStringAttr());
116 WebDOMTestObj WebDOMTestObj::readOnlyTestObjAttr() const
119 return WebDOMTestObj();
121 return toWebKit(WTF::getPtr(impl()->readOnlyTestObjAttr()));
124 short WebDOMTestObj::shortAttr() const
129 return impl()->shortAttr();
132 void WebDOMTestObj::setShortAttr(short newShortAttr)
137 impl()->setShortAttr(newShortAttr);
140 unsigned short WebDOMTestObj::unsignedShortAttr() const
145 return impl()->unsignedShortAttr();
148 void WebDOMTestObj::setUnsignedShortAttr(unsigned short newUnsignedShortAttr)
153 impl()->setUnsignedShortAttr(newUnsignedShortAttr);
156 int WebDOMTestObj::intAttr() const
161 return impl()->intAttr();
164 void WebDOMTestObj::setIntAttr(int newIntAttr)
169 impl()->setIntAttr(newIntAttr);
172 long long WebDOMTestObj::longLongAttr() const
177 return impl()->longLongAttr();
180 void WebDOMTestObj::setLongLongAttr(long long newLongLongAttr)
185 impl()->setLongLongAttr(newLongLongAttr);
188 unsigned long long WebDOMTestObj::unsignedLongLongAttr() const
193 return impl()->unsignedLongLongAttr();
196 void WebDOMTestObj::setUnsignedLongLongAttr(unsigned long long newUnsignedLongLongAttr)
201 impl()->setUnsignedLongLongAttr(newUnsignedLongLongAttr);
204 WebDOMString WebDOMTestObj::stringAttr() const
207 return WebDOMString();
209 return static_cast<const WTF::String&>(impl()->stringAttr());
212 void WebDOMTestObj::setStringAttr(const WebDOMString& newStringAttr)
217 impl()->setStringAttr(newStringAttr);
220 WebDOMTestObj WebDOMTestObj::testObjAttr() const
223 return WebDOMTestObj();
225 return toWebKit(WTF::getPtr(impl()->testObjAttr()));
228 void WebDOMTestObj::setTestObjAttr(const WebDOMTestObj& newTestObjAttr)
233 impl()->setTestObjAttr(toWebCore(newTestObjAttr));
236 WebDOMTestObj WebDOMTestObj::XMLObjAttr() const
239 return WebDOMTestObj();
241 return toWebKit(WTF::getPtr(impl()->xmlObjAttr()));
244 void WebDOMTestObj::setXMLObjAttr(const WebDOMTestObj& newXMLObjAttr)
249 impl()->setXMLObjAttr(toWebCore(newXMLObjAttr));
252 bool WebDOMTestObj::create() const
257 return impl()->isCreate();
260 void WebDOMTestObj::setCreate(bool newCreate)
265 impl()->setCreate(newCreate);
268 WebDOMString WebDOMTestObj::reflectedStringAttr() const
271 return WebDOMString();
273 return static_cast<const WTF::String&>(impl()->getAttribute(WebCore::HTMLNames::reflectedstringattrAttr));
276 void WebDOMTestObj::setReflectedStringAttr(const WebDOMString& newReflectedStringAttr)
281 impl()->setAttribute(WebCore::HTMLNames::reflectedstringattrAttr, newReflectedStringAttr);
284 int WebDOMTestObj::reflectedIntegralAttr() const
289 return impl()->getIntegralAttribute(WebCore::HTMLNames::reflectedintegralattrAttr);
292 void WebDOMTestObj::setReflectedIntegralAttr(int newReflectedIntegralAttr)
297 impl()->setIntegralAttribute(WebCore::HTMLNames::reflectedintegralattrAttr, newReflectedIntegralAttr);
300 unsigned WebDOMTestObj::reflectedUnsignedIntegralAttr() const
305 return impl()->getUnsignedIntegralAttribute(WebCore::HTMLNames::reflectedunsignedintegralattrAttr);
308 void WebDOMTestObj::setReflectedUnsignedIntegralAttr(unsigned newReflectedUnsignedIntegralAttr)
313 impl()->setUnsignedIntegralAttribute(WebCore::HTMLNames::reflectedunsignedintegralattrAttr, newReflectedUnsignedIntegralAttr);
316 bool WebDOMTestObj::reflectedBooleanAttr() const
321 return impl()->hasAttribute(WebCore::HTMLNames::reflectedbooleanattrAttr);
324 void WebDOMTestObj::setReflectedBooleanAttr(bool newReflectedBooleanAttr)
329 impl()->setBooleanAttribute(WebCore::HTMLNames::reflectedbooleanattrAttr, newReflectedBooleanAttr);
332 WebDOMString WebDOMTestObj::reflectedURLAttr() const
335 return WebDOMString();
337 return static_cast<const WTF::String&>(impl()->getURLAttribute(WebCore::HTMLNames::reflectedurlattrAttr));
340 void WebDOMTestObj::setReflectedURLAttr(const WebDOMString& newReflectedURLAttr)
345 impl()->setAttribute(WebCore::HTMLNames::reflectedurlattrAttr, newReflectedURLAttr);
348 WebDOMString WebDOMTestObj::reflectedStringAttr() const
351 return WebDOMString();
353 return static_cast<const WTF::String&>(impl()->getAttribute(WebCore::HTMLNames::customContentStringAttrAttr));
356 void WebDOMTestObj::setReflectedStringAttr(const WebDOMString& newReflectedStringAttr)
361 impl()->setAttribute(WebCore::HTMLNames::customContentStringAttrAttr, newReflectedStringAttr);
364 int WebDOMTestObj::reflectedCustomIntegralAttr() const
369 return impl()->getIntegralAttribute(WebCore::HTMLNames::customContentIntegralAttrAttr);
372 void WebDOMTestObj::setReflectedCustomIntegralAttr(int newReflectedCustomIntegralAttr)
377 impl()->setIntegralAttribute(WebCore::HTMLNames::customContentIntegralAttrAttr, newReflectedCustomIntegralAttr);
380 bool WebDOMTestObj::reflectedCustomBooleanAttr() const
385 return impl()->hasAttribute(WebCore::HTMLNames::customContentBooleanAttrAttr);
388 void WebDOMTestObj::setReflectedCustomBooleanAttr(bool newReflectedCustomBooleanAttr)
393 impl()->setBooleanAttribute(WebCore::HTMLNames::customContentBooleanAttrAttr, newReflectedCustomBooleanAttr);
396 WebDOMString WebDOMTestObj::reflectedCustomURLAttr() const
399 return WebDOMString();
401 return static_cast<const WTF::String&>(impl()->getURLAttribute(WebCore::HTMLNames::customContentURLAttrAttr));
404 void WebDOMTestObj::setReflectedCustomURLAttr(const WebDOMString& newReflectedCustomURLAttr)
409 impl()->setAttribute(WebCore::HTMLNames::customContentURLAttrAttr, newReflectedCustomURLAttr);
412 int WebDOMTestObj::attrWithGetterException() const
417 WebCore::ExceptionCode ec = 0;
418 int result = impl()->attrWithGetterException(ec);
419 webDOMRaiseError(static_cast<WebDOMExceptionCode>(ec));
423 void WebDOMTestObj::setAttrWithGetterException(int newAttrWithGetterException)
428 WebCore::ExceptionCode ec = 0;
429 impl()->setAttrWithGetterException(newAttrWithGetterException, ec);
430 webDOMRaiseError(static_cast<WebDOMExceptionCode>(ec));
433 int WebDOMTestObj::attrWithSetterException() const
438 return impl()->attrWithSetterException();
441 void WebDOMTestObj::setAttrWithSetterException(int newAttrWithSetterException)
446 WebCore::ExceptionCode ec = 0;
447 impl()->setAttrWithSetterException(newAttrWithSetterException, ec);
448 webDOMRaiseError(static_cast<WebDOMExceptionCode>(ec));
451 WebDOMString WebDOMTestObj::stringAttrWithGetterException() const
454 return WebDOMString();
456 WebCore::ExceptionCode ec = 0;
457 WebDOMString result = impl()->stringAttrWithGetterException(ec);
458 webDOMRaiseError(static_cast<WebDOMExceptionCode>(ec));
459 return static_cast<const WTF::String&>(result);
462 void WebDOMTestObj::setStringAttrWithGetterException(const WebDOMString& newStringAttrWithGetterException)
467 WebCore::ExceptionCode ec = 0;
468 impl()->setStringAttrWithGetterException(newStringAttrWithGetterException, ec);
469 webDOMRaiseError(static_cast<WebDOMExceptionCode>(ec));
472 WebDOMString WebDOMTestObj::stringAttrWithSetterException() const
475 return WebDOMString();
477 return static_cast<const WTF::String&>(impl()->stringAttrWithSetterException());
480 void WebDOMTestObj::setStringAttrWithSetterException(const WebDOMString& newStringAttrWithSetterException)
485 WebCore::ExceptionCode ec = 0;
486 impl()->setStringAttrWithSetterException(newStringAttrWithSetterException, ec);
487 webDOMRaiseError(static_cast<WebDOMExceptionCode>(ec));
490 #if ENABLE(Condition1)
491 int WebDOMTestObj::conditionalAttr1() const
496 return impl()->conditionalAttr1();
499 void WebDOMTestObj::setConditionalAttr1(int newConditionalAttr1)
504 impl()->setConditionalAttr1(newConditionalAttr1);
508 #if ENABLE(Condition1) && ENABLE(Condition2)
509 int WebDOMTestObj::conditionalAttr2() const
514 return impl()->conditionalAttr2();
517 void WebDOMTestObj::setConditionalAttr2(int newConditionalAttr2)
522 impl()->setConditionalAttr2(newConditionalAttr2);
526 #if ENABLE(Condition1) || ENABLE(Condition2)
527 int WebDOMTestObj::conditionalAttr3() const
532 return impl()->conditionalAttr3();
535 void WebDOMTestObj::setConditionalAttr3(int newConditionalAttr3)
540 impl()->setConditionalAttr3(newConditionalAttr3);
544 WebDOMDocument WebDOMTestObj::contentDocument() const
547 return WebDOMDocument();
549 return toWebKit(WTF::getPtr(impl()->contentDocument()));
552 WebDOMSVGPoint WebDOMTestObj::mutablePoint() const
555 return WebDOMSVGPoint();
557 return toWebKit(WTF::getPtr(impl()->mutablePoint()));
560 void WebDOMTestObj::setMutablePoint(const WebDOMSVGPoint& newMutablePoint)
565 impl()->setMutablePoint(toWebCore(newMutablePoint));
568 WebDOMSVGPoint WebDOMTestObj::immutablePoint() const
571 return WebDOMSVGPoint();
573 return toWebKit(WTF::getPtr(impl()->immutablePoint()));
576 void WebDOMTestObj::setImmutablePoint(const WebDOMSVGPoint& newImmutablePoint)
581 impl()->setImmutablePoint(toWebCore(newImmutablePoint));
584 float WebDOMTestObj::strictFloat() const
589 return impl()->strictFloat();
592 void WebDOMTestObj::setStrictFloat(float newStrictFloat)
597 impl()->setStrictFloat(newStrictFloat);
600 int WebDOMTestObj::description() const
605 return impl()->description();
608 int WebDOMTestObj::id() const
616 void WebDOMTestObj::setId(int newId)
621 impl()->setId(newId);
624 WebDOMString WebDOMTestObj::hash() const
627 return WebDOMString();
629 return static_cast<const WTF::String&>(impl()->hash());
632 void WebDOMTestObj::voidMethod()
637 impl()->voidMethod();
640 void WebDOMTestObj::voidMethodWithArgs(int intArg, const WebDOMString& strArg, const WebDOMTestObj& objArg)
645 impl()->voidMethodWithArgs(intArg, strArg, toWebCore(objArg));
648 int WebDOMTestObj::intMethod()
653 return impl()->intMethod();
656 int WebDOMTestObj::intMethodWithArgs(int intArg, const WebDOMString& strArg, const WebDOMTestObj& objArg)
661 return impl()->intMethodWithArgs(intArg, strArg, toWebCore(objArg));
664 WebDOMTestObj WebDOMTestObj::objMethod()
667 return WebDOMTestObj();
669 return toWebKit(WTF::getPtr(impl()->objMethod()));
672 WebDOMTestObj WebDOMTestObj::objMethodWithArgs(int intArg, const WebDOMString& strArg, const WebDOMTestObj& objArg)
675 return WebDOMTestObj();
677 return toWebKit(WTF::getPtr(impl()->objMethodWithArgs(intArg, strArg, toWebCore(objArg))));
680 WebDOMTestObj WebDOMTestObj::methodThatRequiresAllArgsAndThrows(const WebDOMString& strArg, const WebDOMTestObj& objArg)
683 return WebDOMTestObj();
685 WebCore::ExceptionCode ec = 0;
686 WebDOMTestObj result = toWebKit(WTF::getPtr(impl()->methodThatRequiresAllArgsAndThrows(strArg, toWebCore(objArg), ec)));
687 webDOMRaiseError(static_cast<WebDOMExceptionCode>(ec));
691 void WebDOMTestObj::serializedValue(const WebDOMString& serializedArg)
696 impl()->serializedValue(WebCore::SerializedScriptValue::create(WTF::String(serializedArg)));
699 void WebDOMTestObj::idbKey(const WebDOMIDBKey& key)
704 impl()->idbKey(toWebCore(key));
707 void WebDOMTestObj::optionsObject(const WebDOMDictionary& oo, const WebDOMDictionary& ooo)
712 impl()->optionsObject(toWebCore(oo), toWebCore(ooo));
715 void WebDOMTestObj::methodWithException()
720 WebCore::ExceptionCode ec = 0;
721 impl()->methodWithException(ec);
722 webDOMRaiseError(static_cast<WebDOMExceptionCode>(ec));
725 void WebDOMTestObj::addEventListener(const WebDOMString& type, const WebDOMEventListener& listener, bool useCapture)
730 impl()->addEventListener(type, toWebCore(listener), useCapture);
733 void WebDOMTestObj::removeEventListener(const WebDOMString& type, const WebDOMEventListener& listener, bool useCapture)
738 impl()->removeEventListener(type, toWebCore(listener), useCapture);
741 void WebDOMTestObj::methodWithOptionalArg(int opt)
746 impl()->methodWithOptionalArg(opt);
749 void WebDOMTestObj::methodWithNonOptionalArgAndOptionalArg(int nonOpt, int opt)
754 impl()->methodWithNonOptionalArgAndOptionalArg(nonOpt, opt);
757 void WebDOMTestObj::methodWithNonOptionalArgAndTwoOptionalArgs(int nonOpt, int opt1, int opt2)
762 impl()->methodWithNonOptionalArgAndTwoOptionalArgs(nonOpt, opt1, opt2);
765 void WebDOMTestObj::methodWithOptionalString(const WebDOMString& str)
770 impl()->methodWithOptionalString(str);
773 void WebDOMTestObj::methodWithOptionalStringIsUndefined(const WebDOMString& str)
778 impl()->methodWithOptionalStringIsUndefined(str);
781 void WebDOMTestObj::methodWithOptionalStringIsNullString(const WebDOMString& str)
786 impl()->methodWithOptionalStringIsNullString(str);
790 #if ENABLE(Condition1)
791 WebDOMString WebDOMTestObj::conditionalMethod1()
794 return WebDOMString();
796 return impl()->conditionalMethod1();
802 #if ENABLE(Condition1) && ENABLE(Condition2)
803 void WebDOMTestObj::conditionalMethod2()
808 impl()->conditionalMethod2();
814 #if ENABLE(Condition1) || ENABLE(Condition2)
815 void WebDOMTestObj::conditionalMethod3()
820 impl()->conditionalMethod3();
825 void WebDOMTestObj::classMethod()
830 impl()->classMethod();
833 int WebDOMTestObj::classMethodWithOptional(int arg)
838 return impl()->classMethodWithOptional(arg);
842 #if ENABLE(Condition1)
843 void WebDOMTestObj::overloadedMethod1(int arg)
848 impl()->overloadedMethod1(arg);
854 #if ENABLE(Condition1)
855 void WebDOMTestObj::overloadedMethod1(const WebDOMString& type)
860 impl()->overloadedMethod1(type);
865 void WebDOMTestObj::convert1(const WebDOMa& )
870 impl()->convert1(toWebCore());
873 void WebDOMTestObj::convert2(const WebDOMb& )
878 impl()->convert2(toWebCore());
881 void WebDOMTestObj::convert3(const WebDOMc& )
886 impl()->convert3(toWebCore());
889 void WebDOMTestObj::convert4(const WebDOMd& )
894 impl()->convert4(toWebCore());
897 void WebDOMTestObj::convert5(const WebDOMe& )
902 impl()->convert5(toWebCore());
905 WebDOMSVGPoint WebDOMTestObj::mutablePointFunction()
908 return WebDOMSVGPoint();
910 return toWebKit(WTF::getPtr(impl()->mutablePointFunction()));
913 WebDOMSVGPoint WebDOMTestObj::immutablePointFunction()
916 return WebDOMSVGPoint();
918 return toWebKit(WTF::getPtr(impl()->immutablePointFunction()));
921 void WebDOMTestObj::orange()
929 WebDOMbool WebDOMTestObj::strictFunction(const WebDOMString& str, float a, int b)
934 WebCore::ExceptionCode ec = 0;
935 WebDOMbool result = toWebKit(WTF::getPtr(impl()->strictFunction(str, a, b, ec)));
936 webDOMRaiseError(static_cast<WebDOMExceptionCode>(ec));
940 WebCore::TestObj* toWebCore(const WebDOMTestObj& wrapper)
942 return wrapper.impl();
945 WebDOMTestObj toWebKit(WebCore::TestObj* value)
947 return WebDOMTestObj(value);