2
* Copyright (C) Research In Motion Limited 2010. All rights reserved.
3
* Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
4
* Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
5
* Copyright (C) Research In Motion Limited 2010. All rights reserved.
7
* This library is free software; you can redistribute it and/or
8
* modify it under the terms of the GNU Library General Public
9
* License as published by the Free Software Foundation; either
10
* version 2 of the License, or (at your option) any later version.
12
* This library is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15
* Library General Public License for more details.
17
* You should have received a copy of the GNU Library General Public License
18
* along with this library; see the file COPYING.LIB. If not, write to
19
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20
* Boston, MA 02110-1301, USA.
23
#ifndef WebDOMTestObj_h
24
#define WebDOMTestObj_h
26
#include <WebDOMObject.h>
27
#include <WebDOMString.h>
33
class WebDOMDictionary;
35
class WebDOMEventListener;
48
class WebDOMTestObj : public WebDOMObject {
51
explicit WebDOMTestObj(WebCore::TestObj*);
52
WebDOMTestObj(const WebDOMTestObj&);
53
WebDOMTestObj& operator=(const WebDOMTestObj&);
54
virtual ~WebDOMTestObj();
57
#if ENABLE(Condition1)
58
WEBDOM_CONDITIONAL_CONST = 0,
60
WEBDOM_CONST_VALUE_0 = 0,
61
WEBDOM_CONST_VALUE_1 = 1,
62
WEBDOM_CONST_VALUE_2 = 2,
63
WEBDOM_CONST_VALUE_4 = 4,
64
WEBDOM_CONST_VALUE_8 = 8,
65
WEBDOM_CONST_VALUE_9 = -1,
66
WEBDOM_CONST_VALUE_10 = "my constant string",
67
WEBDOM_CONST_VALUE_11 = 0xffffffff,
68
WEBDOM_CONST_VALUE_12 = 0x01,
69
WEBDOM_CONST_VALUE_13 = 0X20,
70
WEBDOM_CONST_VALUE_14 = 0x1abc,
71
WEBDOM_CONST_JAVASCRIPT = 15
74
int readOnlyLongAttr() const;
75
WebDOMString readOnlyStringAttr() const;
76
WebDOMTestObj readOnlyTestObjAttr() const;
77
short shortAttr() const;
78
void setShortAttr(short);
79
unsigned short unsignedShortAttr() const;
80
void setUnsignedShortAttr(unsigned short);
82
void setLongAttr(int);
83
long long longLongAttr() const;
84
void setLongLongAttr(long long);
85
unsigned long long unsignedLongLongAttr() const;
86
void setUnsignedLongLongAttr(unsigned long long);
87
WebDOMString stringAttr() const;
88
void setStringAttr(const WebDOMString&);
89
WebDOMTestObj testObjAttr() const;
90
void setTestObjAttr(const WebDOMTestObj&);
91
WebDOMTestObj XMLObjAttr() const;
92
void setXMLObjAttr(const WebDOMTestObj&);
95
WebDOMString reflectedStringAttr() const;
96
void setReflectedStringAttr(const WebDOMString&);
97
int reflectedIntegralAttr() const;
98
void setReflectedIntegralAttr(int);
99
unsigned reflectedUnsignedIntegralAttr() const;
100
void setReflectedUnsignedIntegralAttr(unsigned);
101
bool reflectedBooleanAttr() const;
102
void setReflectedBooleanAttr(bool);
103
WebDOMString reflectedURLAttr() const;
104
void setReflectedURLAttr(const WebDOMString&);
105
WebDOMString reflectedStringAttr() const;
106
void setReflectedStringAttr(const WebDOMString&);
107
int reflectedCustomIntegralAttr() const;
108
void setReflectedCustomIntegralAttr(int);
109
bool reflectedCustomBooleanAttr() const;
110
void setReflectedCustomBooleanAttr(bool);
111
WebDOMString reflectedCustomURLAttr() const;
112
void setReflectedCustomURLAttr(const WebDOMString&);
113
int attrWithGetterException() const;
114
void setAttrWithGetterException(int);
115
int attrWithSetterException() const;
116
void setAttrWithSetterException(int);
117
WebDOMString stringAttrWithGetterException() const;
118
void setStringAttrWithGetterException(const WebDOMString&);
119
WebDOMString stringAttrWithSetterException() const;
120
void setStringAttrWithSetterException(const WebDOMString&);
121
#if ENABLE(Condition1)
122
int conditionalAttr1() const;
123
void setConditionalAttr1(int);
125
#if ENABLE(Condition1) && ENABLE(Condition2)
126
int conditionalAttr2() const;
127
void setConditionalAttr2(int);
129
#if ENABLE(Condition1) || ENABLE(Condition2)
130
int conditionalAttr3() const;
131
void setConditionalAttr3(int);
133
WebDOMany anyAttribute() const;
134
void setAnyAttribute(const WebDOMany&);
135
WebDOMDocument contentDocument() const;
136
WebDOMSVGPoint mutablePoint() const;
137
void setMutablePoint(const WebDOMSVGPoint&);
138
WebDOMSVGPoint immutablePoint() const;
139
void setImmutablePoint(const WebDOMSVGPoint&);
140
int strawberry() const;
141
void setStrawberry(int);
142
float strictFloat() const;
143
void setStrictFloat(float);
144
int description() const;
147
WebDOMString hash() const;
148
int replaceableAttribute() const;
151
void voidMethodWithArgs(int longArg, const WebDOMString& strArg, const WebDOMTestObj& objArg);
153
int longMethodWithArgs(int longArg, const WebDOMString& strArg, const WebDOMTestObj& objArg);
154
WebDOMTestObj objMethod();
155
WebDOMTestObj objMethodWithArgs(int longArg, const WebDOMString& strArg, const WebDOMTestObj& objArg);
156
WebDOMTestObj methodThatRequiresAllArgsAndThrows(const WebDOMString& strArg, const WebDOMTestObj& objArg);
157
void serializedValue(const WebDOMString& serializedArg);
158
void idbKey(const WebDOMIDBKey& key);
159
void optionsObject(const WebDOMDictionary& oo, const WebDOMDictionary& ooo);
160
void methodWithException();
161
void addEventListener(const WebDOMString& type, const WebDOMEventListener& listener, bool useCapture);
162
void removeEventListener(const WebDOMString& type, const WebDOMEventListener& listener, bool useCapture);
163
void methodWithOptionalArg(int opt);
164
void methodWithNonOptionalArgAndOptionalArg(int nonOpt, int opt);
165
void methodWithNonOptionalArgAndTwoOptionalArgs(int nonOpt, int opt1, int opt2);
166
void methodWithOptionalString(const WebDOMString& str);
167
void methodWithOptionalStringIsUndefined(const WebDOMString& str);
168
void methodWithOptionalStringIsNullString(const WebDOMString& str);
169
#if ENABLE(Condition1)
170
WebDOMString conditionalMethod1();
172
#if ENABLE(Condition1) && ENABLE(Condition2)
173
void conditionalMethod2();
175
#if ENABLE(Condition1) || ENABLE(Condition2)
176
void conditionalMethod3();
179
int classMethodWithOptional(int arg);
180
#if ENABLE(Condition1)
181
void overloadedMethod1(int arg);
183
#if ENABLE(Condition1)
184
void overloadedMethod1(const WebDOMString& type);
186
void convert1(const WebDOMa& value);
187
void convert2(const WebDOMb& value);
188
void convert4(const WebDOMd& value);
189
void convert5(const WebDOMe& value);
190
WebDOMSVGPoint mutablePointFunction();
191
WebDOMSVGPoint immutablePointFunction();
193
WebDOMbool strictFunction(const WebDOMString& str, float a, int b);
194
void variadicStringMethod(const WebDOMString& head, const WebDOMString& tail);
195
void variadicDoubleMethod(double head, double tail);
196
void variadicNodeMethod(const WebDOMNode& head, const WebDOMNode& tail);
198
WebCore::TestObj* impl() const;
201
struct WebDOMTestObjPrivate;
202
WebDOMTestObjPrivate* m_impl;
205
WebCore::TestObj* toWebCore(const WebDOMTestObj&);
206
WebDOMTestObj toWebKit(WebCore::TestObj*);