~ubuntu-branches/ubuntu/raring/qtwebkit-source/raring-proposed

« back to all changes in this revision

Viewing changes to Source/WebCore/bindings/scripts/test/CPP/WebDOMTestObj.h

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2013-02-18 14:24:18 UTC
  • Revision ID: package-import@ubuntu.com-20130218142418-eon0jmjg3nj438uy
Tags: upstream-2.3
ImportĀ upstreamĀ versionĀ 2.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
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.
 
6
 *
 
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.
 
11
 *
 
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.
 
16
 *
 
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.
 
21
 */
 
22
 
 
23
#ifndef WebDOMTestObj_h
 
24
#define WebDOMTestObj_h
 
25
 
 
26
#include <WebDOMObject.h>
 
27
#include <WebDOMString.h>
 
28
 
 
29
namespace WebCore {
 
30
class TestObj;
 
31
};
 
32
 
 
33
class WebDOMDictionary;
 
34
class WebDOMDocument;
 
35
class WebDOMEventListener;
 
36
class WebDOMIDBKey;
 
37
class WebDOMNode;
 
38
class WebDOMSVGPoint;
 
39
class WebDOMString;
 
40
class WebDOMTestObj;
 
41
class WebDOMa;
 
42
class WebDOMany;
 
43
class WebDOMb;
 
44
class WebDOMbool;
 
45
class WebDOMd;
 
46
class WebDOMe;
 
47
 
 
48
class WebDOMTestObj : public WebDOMObject {
 
49
public:
 
50
    WebDOMTestObj();
 
51
    explicit WebDOMTestObj(WebCore::TestObj*);
 
52
    WebDOMTestObj(const WebDOMTestObj&);
 
53
    WebDOMTestObj& operator=(const WebDOMTestObj&);
 
54
    virtual ~WebDOMTestObj();
 
55
 
 
56
    enum {
 
57
#if ENABLE(Condition1)
 
58
        WEBDOM_CONDITIONAL_CONST = 0,
 
59
#endif
 
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
 
72
    };
 
73
 
 
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);
 
81
    int longAttr() const;
 
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&);
 
93
    bool create() const;
 
94
    void setCreate(bool);
 
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);
 
124
#endif
 
125
#if ENABLE(Condition1) && ENABLE(Condition2)
 
126
    int conditionalAttr2() const;
 
127
    void setConditionalAttr2(int);
 
128
#endif
 
129
#if ENABLE(Condition1) || ENABLE(Condition2)
 
130
    int conditionalAttr3() const;
 
131
    void setConditionalAttr3(int);
 
132
#endif
 
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;
 
145
    int id() const;
 
146
    void setId(int);
 
147
    WebDOMString hash() const;
 
148
    int replaceableAttribute() const;
 
149
 
 
150
    void voidMethod();
 
151
    void voidMethodWithArgs(int longArg, const WebDOMString& strArg, const WebDOMTestObj& objArg);
 
152
    int longMethod();
 
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();
 
171
#endif
 
172
#if ENABLE(Condition1) && ENABLE(Condition2)
 
173
    void conditionalMethod2();
 
174
#endif
 
175
#if ENABLE(Condition1) || ENABLE(Condition2)
 
176
    void conditionalMethod3();
 
177
#endif
 
178
    void classMethod();
 
179
    int classMethodWithOptional(int arg);
 
180
#if ENABLE(Condition1)
 
181
    void overloadedMethod1(int arg);
 
182
#endif
 
183
#if ENABLE(Condition1)
 
184
    void overloadedMethod1(const WebDOMString& type);
 
185
#endif
 
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();
 
192
    void banana();
 
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);
 
197
 
 
198
    WebCore::TestObj* impl() const;
 
199
 
 
200
protected:
 
201
    struct WebDOMTestObjPrivate;
 
202
    WebDOMTestObjPrivate* m_impl;
 
203
};
 
204
 
 
205
WebCore::TestObj* toWebCore(const WebDOMTestObj&);
 
206
WebDOMTestObj toWebKit(WebCore::TestObj*);
 
207
 
 
208
#endif