https://bugs.webkit.org/show_bug.cgi?id=81761
[WebKit-https.git] / Source / WebCore / bindings / scripts / test / GObject / WebKitDOMTestObj.cpp
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     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.
9
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.
14
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.
19 */
20
21 #include <glib-object.h>
22 #include "config.h"
23
24 #include <wtf/GetPtr.h>
25 #include <wtf/RefPtr.h>
26 #include "DOMObjectCache.h"
27 #include "Document.h"
28 #include "ExceptionCode.h"
29 #include "HTMLNames.h"
30 #include "JSMainThreadExecState.h"
31 #include "SVGPoint.h"
32 #include "TestObj.h"
33 #include "WebKitDOMBinding.h"
34 #include "bool.h"
35 #include "gobject/ConvertToUTF8String.h"
36 #include "webkit/WebKitDOMDictionary.h"
37 #include "webkit/WebKitDOMDictionaryPrivate.h"
38 #include "webkit/WebKitDOMDocument.h"
39 #include "webkit/WebKitDOMDocumentPrivate.h"
40 #include "webkit/WebKitDOMIDBKey.h"
41 #include "webkit/WebKitDOMIDBKeyPrivate.h"
42 #include "webkit/WebKitDOMSVGPoint.h"
43 #include "webkit/WebKitDOMSVGPointPrivate.h"
44 #include "webkit/WebKitDOMSerializedScriptValue.h"
45 #include "webkit/WebKitDOMSerializedScriptValuePrivate.h"
46 #include "webkit/WebKitDOMTestObj.h"
47 #include "webkit/WebKitDOMTestObjPrivate.h"
48 #include "webkit/WebKitDOMa.h"
49 #include "webkit/WebKitDOMaPrivate.h"
50 #include "webkit/WebKitDOMb.h"
51 #include "webkit/WebKitDOMbPrivate.h"
52 #include "webkit/WebKitDOMbool.h"
53 #include "webkit/WebKitDOMboolPrivate.h"
54 #include "webkit/WebKitDOMc.h"
55 #include "webkit/WebKitDOMcPrivate.h"
56 #include "webkit/WebKitDOMd.h"
57 #include "webkit/WebKitDOMdPrivate.h"
58 #include "webkit/WebKitDOMe.h"
59 #include "webkit/WebKitDOMePrivate.h"
60 #include "webkit/WebKitDOMsequence.h"
61 #include "webkit/WebKitDOMsequencePrivate.h"
62 #include "webkitdefines.h"
63 #include "webkitglobalsprivate.h"
64 #include "webkitmarshal.h"
65
66 namespace WebKit {
67     
68 WebKitDOMTestObj* kit(WebCore::TestObj* obj)
69 {
70     g_return_val_if_fail(obj, 0);
71
72     if (gpointer ret = DOMObjectCache::get(obj))
73         return static_cast<WebKitDOMTestObj*>(ret);
74
75     return static_cast<WebKitDOMTestObj*>(DOMObjectCache::put(obj, WebKit::wrapTestObj(obj)));
76 }
77     
78 } // namespace WebKit //
79
80 void
81 webkit_dom_test_obj_void_method(WebKitDOMTestObj* self)
82 {
83     g_return_if_fail(self);
84     WebCore::JSMainThreadNullState state;
85     WebCore::TestObj * item = WebKit::core(self);
86     item->voidMethod();
87 }
88
89 void
90 webkit_dom_test_obj_void_method_with_args(WebKitDOMTestObj* self, glong int_arg, const gchar* str_arg, WebKitDOMTestObj* obj_arg)
91 {
92     g_return_if_fail(self);
93     WebCore::JSMainThreadNullState state;
94     WebCore::TestObj * item = WebKit::core(self);
95     g_return_if_fail(str_arg);
96     g_return_if_fail(obj_arg);
97     WTF::String converted_str_arg = WTF::String::fromUTF8(str_arg);
98     WebCore::TestObj * converted_obj_arg = NULL;
99     if (obj_arg != NULL) {
100         converted_obj_arg = WebKit::core(obj_arg);
101         g_return_if_fail(converted_obj_arg);
102     }
103     item->voidMethodWithArgs(int_arg, converted_str_arg, converted_obj_arg);
104 }
105
106 glong
107 webkit_dom_test_obj_int_method(WebKitDOMTestObj* self)
108 {
109     g_return_val_if_fail(self, 0);
110     WebCore::JSMainThreadNullState state;
111     WebCore::TestObj * item = WebKit::core(self);
112     glong res = item->intMethod();
113     return res;
114 }
115
116 glong
117 webkit_dom_test_obj_int_method_with_args(WebKitDOMTestObj* self, glong int_arg, const gchar* str_arg, WebKitDOMTestObj* obj_arg)
118 {
119     g_return_val_if_fail(self, 0);
120     WebCore::JSMainThreadNullState state;
121     WebCore::TestObj * item = WebKit::core(self);
122     g_return_val_if_fail(str_arg, 0);
123     g_return_val_if_fail(obj_arg, 0);
124     WTF::String converted_str_arg = WTF::String::fromUTF8(str_arg);
125     WebCore::TestObj * converted_obj_arg = NULL;
126     if (obj_arg != NULL) {
127         converted_obj_arg = WebKit::core(obj_arg);
128         g_return_val_if_fail(converted_obj_arg, 0);
129     }
130     glong res = item->intMethodWithArgs(int_arg, converted_str_arg, converted_obj_arg);
131     return res;
132 }
133
134 WebKitDOMTestObj*
135 webkit_dom_test_obj_obj_method(WebKitDOMTestObj* self)
136 {
137     g_return_val_if_fail(self, 0);
138     WebCore::JSMainThreadNullState state;
139     WebCore::TestObj * item = WebKit::core(self);
140     PassRefPtr<WebCore::TestObj> g_res = WTF::getPtr(item->objMethod());
141     WebKitDOMTestObj* res = WebKit::kit(g_res.get());
142     return res;
143 }
144
145 WebKitDOMTestObj*
146 webkit_dom_test_obj_obj_method_with_args(WebKitDOMTestObj* self, glong int_arg, const gchar* str_arg, WebKitDOMTestObj* obj_arg)
147 {
148     g_return_val_if_fail(self, 0);
149     WebCore::JSMainThreadNullState state;
150     WebCore::TestObj * item = WebKit::core(self);
151     g_return_val_if_fail(str_arg, 0);
152     g_return_val_if_fail(obj_arg, 0);
153     WTF::String converted_str_arg = WTF::String::fromUTF8(str_arg);
154     WebCore::TestObj * converted_obj_arg = NULL;
155     if (obj_arg != NULL) {
156         converted_obj_arg = WebKit::core(obj_arg);
157         g_return_val_if_fail(converted_obj_arg, 0);
158     }
159     PassRefPtr<WebCore::TestObj> g_res = WTF::getPtr(item->objMethodWithArgs(int_arg, converted_str_arg, converted_obj_arg));
160     WebKitDOMTestObj* res = WebKit::kit(g_res.get());
161     return res;
162 }
163
164 void
165 webkit_dom_test_obj_method_with_sequence_arg(WebKitDOMTestObj* self, WebKitDOMsequence* )
166 {
167     g_return_if_fail(self);
168     WebCore::JSMainThreadNullState state;
169     WebCore::TestObj * item = WebKit::core(self);
170     g_return_if_fail();
171     WebCore::sequence * converted_ = NULL;
172     if ( != NULL) {
173         converted_ = WebKit::core();
174         g_return_if_fail(converted_);
175     }
176     item->methodWithSequenceArg(converted_);
177 }
178
179 WebKitDOMTestObj*
180 webkit_dom_test_obj_method_that_requires_all_args_and_throws(WebKitDOMTestObj* self, const gchar* str_arg, WebKitDOMTestObj* obj_arg, GError **error)
181 {
182     g_return_val_if_fail(self, 0);
183     WebCore::JSMainThreadNullState state;
184     WebCore::TestObj * item = WebKit::core(self);
185     g_return_val_if_fail(str_arg, 0);
186     g_return_val_if_fail(obj_arg, 0);
187     WTF::String converted_str_arg = WTF::String::fromUTF8(str_arg);
188     WebCore::TestObj * converted_obj_arg = NULL;
189     if (obj_arg != NULL) {
190         converted_obj_arg = WebKit::core(obj_arg);
191         g_return_val_if_fail(converted_obj_arg, 0);
192     }
193     WebCore::ExceptionCode ec = 0;
194     PassRefPtr<WebCore::TestObj> g_res = WTF::getPtr(item->methodThatRequiresAllArgsAndThrows(converted_str_arg, converted_obj_arg, ec));
195     if (ec) {
196         WebCore::ExceptionCodeDescription ecdesc(ec);
197         g_set_error_literal(error, g_quark_from_string("WEBKIT_DOM"), ecdesc.code, ecdesc.name);
198     }
199     WebKitDOMTestObj* res = WebKit::kit(g_res.get());
200     return res;
201 }
202
203 void
204 webkit_dom_test_obj_serialized_value(WebKitDOMTestObj* self, WebKitDOMSerializedScriptValue* serialized_arg)
205 {
206     g_return_if_fail(self);
207     WebCore::JSMainThreadNullState state;
208     WebCore::TestObj * item = WebKit::core(self);
209     g_return_if_fail(serialized_arg);
210     WebCore::SerializedScriptValue * converted_serialized_arg = NULL;
211     if (serialized_arg != NULL) {
212         converted_serialized_arg = WebKit::core(serialized_arg);
213         g_return_if_fail(converted_serialized_arg);
214     }
215     item->serializedValue(converted_serialized_arg);
216 }
217
218 void
219 webkit_dom_test_obj_idb_key(WebKitDOMTestObj* self, WebKitDOMIDBKey* key)
220 {
221     g_return_if_fail(self);
222     WebCore::JSMainThreadNullState state;
223     WebCore::TestObj * item = WebKit::core(self);
224     g_return_if_fail(key);
225     WebCore::IDBKey * converted_key = NULL;
226     if (key != NULL) {
227         converted_key = WebKit::core(key);
228         g_return_if_fail(converted_key);
229     }
230     item->idbKey(converted_key);
231 }
232
233 void
234 webkit_dom_test_obj_options_object(WebKitDOMTestObj* self, WebKitDOMDictionary* oo, WebKitDOMDictionary* ooo)
235 {
236     g_return_if_fail(self);
237     WebCore::JSMainThreadNullState state;
238     WebCore::TestObj * item = WebKit::core(self);
239     g_return_if_fail(oo);
240     g_return_if_fail(ooo);
241     WebCore::Dictionary * converted_oo = NULL;
242     if (oo != NULL) {
243         converted_oo = WebKit::core(oo);
244         g_return_if_fail(converted_oo);
245     }
246     WebCore::Dictionary * converted_ooo = NULL;
247     if (ooo != NULL) {
248         converted_ooo = WebKit::core(ooo);
249         g_return_if_fail(converted_ooo);
250     }
251     item->optionsObject(converted_oo, converted_ooo);
252 }
253
254 void
255 webkit_dom_test_obj_method_with_exception(WebKitDOMTestObj* self, GError **error)
256 {
257     g_return_if_fail(self);
258     WebCore::JSMainThreadNullState state;
259     WebCore::TestObj * item = WebKit::core(self);
260     WebCore::ExceptionCode ec = 0;
261     item->methodWithException(ec);
262     if (ec) {
263         WebCore::ExceptionCodeDescription ecdesc(ec);
264         g_set_error_literal(error, g_quark_from_string("WEBKIT_DOM"), ecdesc.code, ecdesc.name);
265     }
266 }
267
268 void
269 webkit_dom_test_obj_with_script_state_void(WebKitDOMTestObj* self)
270 {
271     g_return_if_fail(self);
272     WebCore::JSMainThreadNullState state;
273     WebCore::TestObj * item = WebKit::core(self);
274     item->withScriptStateVoid();
275 }
276
277 WebKitDOMTestObj*
278 webkit_dom_test_obj_with_script_state_obj(WebKitDOMTestObj* self)
279 {
280     g_return_val_if_fail(self, 0);
281     WebCore::JSMainThreadNullState state;
282     WebCore::TestObj * item = WebKit::core(self);
283     PassRefPtr<WebCore::TestObj> g_res = WTF::getPtr(item->withScriptStateObj());
284     WebKitDOMTestObj* res = WebKit::kit(g_res.get());
285     return res;
286 }
287
288 void
289 webkit_dom_test_obj_with_script_state_void_exception(WebKitDOMTestObj* self, GError **error)
290 {
291     g_return_if_fail(self);
292     WebCore::JSMainThreadNullState state;
293     WebCore::TestObj * item = WebKit::core(self);
294     WebCore::ExceptionCode ec = 0;
295     item->withScriptStateVoidException(ec);
296     if (ec) {
297         WebCore::ExceptionCodeDescription ecdesc(ec);
298         g_set_error_literal(error, g_quark_from_string("WEBKIT_DOM"), ecdesc.code, ecdesc.name);
299     }
300 }
301
302 WebKitDOMTestObj*
303 webkit_dom_test_obj_with_script_state_obj_exception(WebKitDOMTestObj* self, GError **error)
304 {
305     g_return_val_if_fail(self, 0);
306     WebCore::JSMainThreadNullState state;
307     WebCore::TestObj * item = WebKit::core(self);
308     WebCore::ExceptionCode ec = 0;
309     PassRefPtr<WebCore::TestObj> g_res = WTF::getPtr(item->withScriptStateObjException(ec));
310     if (ec) {
311         WebCore::ExceptionCodeDescription ecdesc(ec);
312         g_set_error_literal(error, g_quark_from_string("WEBKIT_DOM"), ecdesc.code, ecdesc.name);
313     }
314     WebKitDOMTestObj* res = WebKit::kit(g_res.get());
315     return res;
316 }
317
318 void
319 webkit_dom_test_obj_with_script_execution_context(WebKitDOMTestObj* self)
320 {
321     g_return_if_fail(self);
322     WebCore::JSMainThreadNullState state;
323     WebCore::TestObj * item = WebKit::core(self);
324     item->withScriptExecutionContext();
325 }
326
327 void
328 webkit_dom_test_obj_with_script_execution_context_and_script_state(WebKitDOMTestObj* self)
329 {
330     g_return_if_fail(self);
331     WebCore::JSMainThreadNullState state;
332     WebCore::TestObj * item = WebKit::core(self);
333     item->withScriptExecutionContextAndScriptState();
334 }
335
336 WebKitDOMTestObj*
337 webkit_dom_test_obj_with_script_execution_context_and_script_state_obj_exception(WebKitDOMTestObj* self, GError **error)
338 {
339     g_return_val_if_fail(self, 0);
340     WebCore::JSMainThreadNullState state;
341     WebCore::TestObj * item = WebKit::core(self);
342     WebCore::ExceptionCode ec = 0;
343     PassRefPtr<WebCore::TestObj> g_res = WTF::getPtr(item->withScriptExecutionContextAndScriptStateObjException(ec));
344     if (ec) {
345         WebCore::ExceptionCodeDescription ecdesc(ec);
346         g_set_error_literal(error, g_quark_from_string("WEBKIT_DOM"), ecdesc.code, ecdesc.name);
347     }
348     WebKitDOMTestObj* res = WebKit::kit(g_res.get());
349     return res;
350 }
351
352 WebKitDOMTestObj*
353 webkit_dom_test_obj_with_script_execution_context_and_script_state_with_spaces(WebKitDOMTestObj* self)
354 {
355     g_return_val_if_fail(self, 0);
356     WebCore::JSMainThreadNullState state;
357     WebCore::TestObj * item = WebKit::core(self);
358     PassRefPtr<WebCore::TestObj> g_res = WTF::getPtr(item->withScriptExecutionContextAndScriptStateWithSpaces());
359     WebKitDOMTestObj* res = WebKit::kit(g_res.get());
360     return res;
361 }
362
363 void
364 webkit_dom_test_obj_method_with_optional_arg(WebKitDOMTestObj* self, glong opt)
365 {
366     g_return_if_fail(self);
367     WebCore::JSMainThreadNullState state;
368     WebCore::TestObj * item = WebKit::core(self);
369     item->methodWithOptionalArg(opt);
370 }
371
372 void
373 webkit_dom_test_obj_method_with_non_optional_arg_and_optional_arg(WebKitDOMTestObj* self, glong non_opt, glong opt)
374 {
375     g_return_if_fail(self);
376     WebCore::JSMainThreadNullState state;
377     WebCore::TestObj * item = WebKit::core(self);
378     item->methodWithNonOptionalArgAndOptionalArg(non_opt, opt);
379 }
380
381 void
382 webkit_dom_test_obj_method_with_non_optional_arg_and_two_optional_args(WebKitDOMTestObj* self, glong non_opt, glong opt1, glong opt2)
383 {
384     g_return_if_fail(self);
385     WebCore::JSMainThreadNullState state;
386     WebCore::TestObj * item = WebKit::core(self);
387     item->methodWithNonOptionalArgAndTwoOptionalArgs(non_opt, opt1, opt2);
388 }
389
390 void
391 webkit_dom_test_obj_method_with_optional_string(WebKitDOMTestObj* self, const gchar* str)
392 {
393     g_return_if_fail(self);
394     WebCore::JSMainThreadNullState state;
395     WebCore::TestObj * item = WebKit::core(self);
396     g_return_if_fail(str);
397     WTF::String converted_str = WTF::String::fromUTF8(str);
398     item->methodWithOptionalString(converted_str);
399 }
400
401 void
402 webkit_dom_test_obj_method_with_optional_string_is_undefined(WebKitDOMTestObj* self, const gchar* str)
403 {
404     g_return_if_fail(self);
405     WebCore::JSMainThreadNullState state;
406     WebCore::TestObj * item = WebKit::core(self);
407     g_return_if_fail(str);
408     WTF::String converted_str = WTF::String::fromUTF8(str);
409     item->methodWithOptionalStringIsUndefined(converted_str);
410 }
411
412 void
413 webkit_dom_test_obj_method_with_optional_string_is_null_string(WebKitDOMTestObj* self, const gchar* str)
414 {
415     g_return_if_fail(self);
416     WebCore::JSMainThreadNullState state;
417     WebCore::TestObj * item = WebKit::core(self);
418     g_return_if_fail(str);
419     WTF::String converted_str = WTF::String::fromUTF8(str);
420     item->methodWithOptionalStringIsNullString(converted_str);
421 }
422
423 gchar*
424 webkit_dom_test_obj_conditional_method1(WebKitDOMTestObj* self)
425 {
426 #if ENABLE(Condition1)
427     g_return_val_if_fail(self, 0);
428     WebCore::JSMainThreadNullState state;
429     WebCore::TestObj * item = WebKit::core(self);
430     gchar* res = convertToUTF8String(item->conditionalMethod1());
431     return res;
432 #else
433     return NULL;
434 #endif /* ENABLE(Condition1) */
435 }
436
437 void
438 webkit_dom_test_obj_conditional_method2(WebKitDOMTestObj* self)
439 {
440 #if ENABLE(Condition1) && ENABLE(Condition2)
441     g_return_if_fail(self);
442     WebCore::JSMainThreadNullState state;
443     WebCore::TestObj * item = WebKit::core(self);
444     item->conditionalMethod2();
445 #endif /* ENABLE(Condition1) && ENABLE(Condition2) */
446 }
447
448 void
449 webkit_dom_test_obj_conditional_method3(WebKitDOMTestObj* self)
450 {
451 #if ENABLE(Condition1) || ENABLE(Condition2)
452     g_return_if_fail(self);
453     WebCore::JSMainThreadNullState state;
454     WebCore::TestObj * item = WebKit::core(self);
455     item->conditionalMethod3();
456 #endif /* ENABLE(Condition1) || ENABLE(Condition2) */
457 }
458
459 void
460 webkit_dom_test_obj_class_method(WebKitDOMTestObj* self)
461 {
462     g_return_if_fail(self);
463     WebCore::JSMainThreadNullState state;
464     WebCore::TestObj * item = WebKit::core(self);
465     item->classMethod();
466 }
467
468 glong
469 webkit_dom_test_obj_class_method_with_optional(WebKitDOMTestObj* self, glong arg)
470 {
471     g_return_val_if_fail(self, 0);
472     WebCore::JSMainThreadNullState state;
473     WebCore::TestObj * item = WebKit::core(self);
474     glong res = item->classMethodWithOptional(arg);
475     return res;
476 }
477
478 void
479 webkit_dom_test_obj_overloaded_method1(WebKitDOMTestObj* self, glong arg)
480 {
481 #if ENABLE(Condition1)
482     g_return_if_fail(self);
483     WebCore::JSMainThreadNullState state;
484     WebCore::TestObj * item = WebKit::core(self);
485     item->overloadedMethod1(arg);
486 #endif /* ENABLE(Condition1) */
487 }
488
489 void
490 webkit_dom_test_obj_overloaded_method1(WebKitDOMTestObj* self, const gchar* type)
491 {
492 #if ENABLE(Condition1)
493     g_return_if_fail(self);
494     WebCore::JSMainThreadNullState state;
495     WebCore::TestObj * item = WebKit::core(self);
496     g_return_if_fail(type);
497     WTF::String converted_type = WTF::String::fromUTF8(type);
498     item->overloadedMethod1(converted_type);
499 #endif /* ENABLE(Condition1) */
500 }
501
502 void
503 webkit_dom_test_obj_convert1(WebKitDOMTestObj* self, WebKitDOMa* )
504 {
505     g_return_if_fail(self);
506     WebCore::JSMainThreadNullState state;
507     WebCore::TestObj * item = WebKit::core(self);
508     g_return_if_fail();
509     WebCore::a * converted_ = NULL;
510     if ( != NULL) {
511         converted_ = WebKit::core();
512         g_return_if_fail(converted_);
513     }
514     item->convert1(converted_);
515 }
516
517 void
518 webkit_dom_test_obj_convert2(WebKitDOMTestObj* self, WebKitDOMb* )
519 {
520     g_return_if_fail(self);
521     WebCore::JSMainThreadNullState state;
522     WebCore::TestObj * item = WebKit::core(self);
523     g_return_if_fail();
524     WebCore::b * converted_ = NULL;
525     if ( != NULL) {
526         converted_ = WebKit::core();
527         g_return_if_fail(converted_);
528     }
529     item->convert2(converted_);
530 }
531
532 void
533 webkit_dom_test_obj_convert3(WebKitDOMTestObj* self, WebKitDOMc* )
534 {
535     g_return_if_fail(self);
536     WebCore::JSMainThreadNullState state;
537     WebCore::TestObj * item = WebKit::core(self);
538     g_return_if_fail();
539     WebCore::c * converted_ = NULL;
540     if ( != NULL) {
541         converted_ = WebKit::core();
542         g_return_if_fail(converted_);
543     }
544     item->convert3(converted_);
545 }
546
547 void
548 webkit_dom_test_obj_convert4(WebKitDOMTestObj* self, WebKitDOMd* )
549 {
550     g_return_if_fail(self);
551     WebCore::JSMainThreadNullState state;
552     WebCore::TestObj * item = WebKit::core(self);
553     g_return_if_fail();
554     WebCore::d * converted_ = NULL;
555     if ( != NULL) {
556         converted_ = WebKit::core();
557         g_return_if_fail(converted_);
558     }
559     item->convert4(converted_);
560 }
561
562 void
563 webkit_dom_test_obj_convert5(WebKitDOMTestObj* self, WebKitDOMe* )
564 {
565     g_return_if_fail(self);
566     WebCore::JSMainThreadNullState state;
567     WebCore::TestObj * item = WebKit::core(self);
568     g_return_if_fail();
569     WebCore::e * converted_ = NULL;
570     if ( != NULL) {
571         converted_ = WebKit::core();
572         g_return_if_fail(converted_);
573     }
574     item->convert5(converted_);
575 }
576
577 WebKitDOMSVGPoint*
578 webkit_dom_test_obj_mutable_point_function(WebKitDOMTestObj* self)
579 {
580     g_return_val_if_fail(self, 0);
581     WebCore::JSMainThreadNullState state;
582     WebCore::TestObj * item = WebKit::core(self);
583     PassRefPtr<WebCore::SVGPoint> g_res = WTF::getPtr(item->mutablePointFunction());
584     WebKitDOMSVGPoint* res = WebKit::kit(g_res.get());
585     return res;
586 }
587
588 WebKitDOMSVGPoint*
589 webkit_dom_test_obj_immutable_point_function(WebKitDOMTestObj* self)
590 {
591     g_return_val_if_fail(self, 0);
592     WebCore::JSMainThreadNullState state;
593     WebCore::TestObj * item = WebKit::core(self);
594     PassRefPtr<WebCore::SVGPoint> g_res = WTF::getPtr(item->immutablePointFunction());
595     WebKitDOMSVGPoint* res = WebKit::kit(g_res.get());
596     return res;
597 }
598
599 void
600 webkit_dom_test_obj_orange(WebKitDOMTestObj* self)
601 {
602     g_return_if_fail(self);
603     WebCore::JSMainThreadNullState state;
604     WebCore::TestObj * item = WebKit::core(self);
605     item->orange();
606 }
607
608 WebKitDOMbool*
609 webkit_dom_test_obj_strict_function(WebKitDOMTestObj* self, const gchar* str, gfloat a, gint b, GError **error)
610 {
611     g_return_val_if_fail(self, 0);
612     WebCore::JSMainThreadNullState state;
613     WebCore::TestObj * item = WebKit::core(self);
614     g_return_val_if_fail(str, 0);
615     WTF::String converted_str = WTF::String::fromUTF8(str);
616     WebCore::ExceptionCode ec = 0;
617     PassRefPtr<WebCore::bool> g_res = WTF::getPtr(item->strictFunction(converted_str, a, b, ec));
618     if (ec) {
619         WebCore::ExceptionCodeDescription ecdesc(ec);
620         g_set_error_literal(error, g_quark_from_string("WEBKIT_DOM"), ecdesc.code, ecdesc.name);
621     }
622     WebKitDOMbool* res = WebKit::kit(g_res.get());
623     return res;
624 }
625
626 glong
627 webkit_dom_test_obj_get_read_only_int_attr(WebKitDOMTestObj* self)
628 {
629     g_return_val_if_fail(self, 0);
630     WebCore::JSMainThreadNullState state;
631     WebCore::TestObj * item = WebKit::core(self);
632     glong res = item->readOnlyIntAttr();
633     return res;
634 }
635
636 gchar*
637 webkit_dom_test_obj_get_read_only_string_attr(WebKitDOMTestObj* self)
638 {
639     g_return_val_if_fail(self, 0);
640     WebCore::JSMainThreadNullState state;
641     WebCore::TestObj * item = WebKit::core(self);
642     gchar* res = convertToUTF8String(item->readOnlyStringAttr());
643     return res;
644 }
645
646 WebKitDOMTestObj*
647 webkit_dom_test_obj_get_read_only_test_obj_attr(WebKitDOMTestObj* self)
648 {
649     g_return_val_if_fail(self, 0);
650     WebCore::JSMainThreadNullState state;
651     WebCore::TestObj * item = WebKit::core(self);
652     PassRefPtr<WebCore::TestObj> g_res = WTF::getPtr(item->readOnlyTestObjAttr());
653     WebKitDOMTestObj* res = WebKit::kit(g_res.get());
654     return res;
655 }
656
657 gshort
658 webkit_dom_test_obj_get_short_attr(WebKitDOMTestObj* self)
659 {
660     g_return_val_if_fail(self, 0);
661     WebCore::JSMainThreadNullState state;
662     WebCore::TestObj * item = WebKit::core(self);
663     gshort res = item->shortAttr();
664     return res;
665 }
666
667 void
668 webkit_dom_test_obj_set_short_attr(WebKitDOMTestObj* self, gshort value)
669 {
670     g_return_if_fail(self);
671     WebCore::JSMainThreadNullState state;
672     WebCore::TestObj * item = WebKit::core(self);
673     item->setShortAttr(value);
674 }
675
676 gushort
677 webkit_dom_test_obj_get_unsigned_short_attr(WebKitDOMTestObj* self)
678 {
679     g_return_val_if_fail(self, 0);
680     WebCore::JSMainThreadNullState state;
681     WebCore::TestObj * item = WebKit::core(self);
682     gushort res = item->unsignedShortAttr();
683     return res;
684 }
685
686 void
687 webkit_dom_test_obj_set_unsigned_short_attr(WebKitDOMTestObj* self, gushort value)
688 {
689     g_return_if_fail(self);
690     WebCore::JSMainThreadNullState state;
691     WebCore::TestObj * item = WebKit::core(self);
692     item->setUnsignedShortAttr(value);
693 }
694
695 glong
696 webkit_dom_test_obj_get_int_attr(WebKitDOMTestObj* self)
697 {
698     g_return_val_if_fail(self, 0);
699     WebCore::JSMainThreadNullState state;
700     WebCore::TestObj * item = WebKit::core(self);
701     glong res = item->intAttr();
702     return res;
703 }
704
705 void
706 webkit_dom_test_obj_set_int_attr(WebKitDOMTestObj* self, glong value)
707 {
708     g_return_if_fail(self);
709     WebCore::JSMainThreadNullState state;
710     WebCore::TestObj * item = WebKit::core(self);
711     item->setIntAttr(value);
712 }
713
714 gint64
715 webkit_dom_test_obj_get_long_long_attr(WebKitDOMTestObj* self)
716 {
717     g_return_val_if_fail(self, 0);
718     WebCore::JSMainThreadNullState state;
719     WebCore::TestObj * item = WebKit::core(self);
720     gint64 res = item->longLongAttr();
721     return res;
722 }
723
724 void
725 webkit_dom_test_obj_set_long_long_attr(WebKitDOMTestObj* self, gint64 value)
726 {
727     g_return_if_fail(self);
728     WebCore::JSMainThreadNullState state;
729     WebCore::TestObj * item = WebKit::core(self);
730     item->setLongLongAttr(value);
731 }
732
733 guint64
734 webkit_dom_test_obj_get_unsigned_long_long_attr(WebKitDOMTestObj* self)
735 {
736     g_return_val_if_fail(self, 0);
737     WebCore::JSMainThreadNullState state;
738     WebCore::TestObj * item = WebKit::core(self);
739     guint64 res = item->unsignedLongLongAttr();
740     return res;
741 }
742
743 void
744 webkit_dom_test_obj_set_unsigned_long_long_attr(WebKitDOMTestObj* self, guint64 value)
745 {
746     g_return_if_fail(self);
747     WebCore::JSMainThreadNullState state;
748     WebCore::TestObj * item = WebKit::core(self);
749     item->setUnsignedLongLongAttr(value);
750 }
751
752 gchar*
753 webkit_dom_test_obj_get_string_attr(WebKitDOMTestObj* self)
754 {
755     g_return_val_if_fail(self, 0);
756     WebCore::JSMainThreadNullState state;
757     WebCore::TestObj * item = WebKit::core(self);
758     gchar* res = convertToUTF8String(item->stringAttr());
759     return res;
760 }
761
762 void
763 webkit_dom_test_obj_set_string_attr(WebKitDOMTestObj* self, const gchar* value)
764 {
765     g_return_if_fail(self);
766     WebCore::JSMainThreadNullState state;
767     WebCore::TestObj * item = WebKit::core(self);
768     g_return_if_fail(value);
769     WTF::String converted_value = WTF::String::fromUTF8(value);
770     item->setStringAttr(converted_value);
771 }
772
773 WebKitDOMTestObj*
774 webkit_dom_test_obj_get_test_obj_attr(WebKitDOMTestObj* self)
775 {
776     g_return_val_if_fail(self, 0);
777     WebCore::JSMainThreadNullState state;
778     WebCore::TestObj * item = WebKit::core(self);
779     PassRefPtr<WebCore::TestObj> g_res = WTF::getPtr(item->testObjAttr());
780     WebKitDOMTestObj* res = WebKit::kit(g_res.get());
781     return res;
782 }
783
784 void
785 webkit_dom_test_obj_set_test_obj_attr(WebKitDOMTestObj* self, WebKitDOMTestObj* value)
786 {
787     g_return_if_fail(self);
788     WebCore::JSMainThreadNullState state;
789     WebCore::TestObj * item = WebKit::core(self);
790     g_return_if_fail(value);
791     WebCore::TestObj * converted_value = NULL;
792     if (value != NULL) {
793         converted_value = WebKit::core(value);
794         g_return_if_fail(converted_value);
795     }
796     item->setTestObjAttr(converted_value);
797 }
798
799 WebKitDOMTestObj*
800 webkit_dom_test_obj_get_xml_obj_attr(WebKitDOMTestObj* self)
801 {
802     g_return_val_if_fail(self, 0);
803     WebCore::JSMainThreadNullState state;
804     WebCore::TestObj * item = WebKit::core(self);
805     PassRefPtr<WebCore::TestObj> g_res = WTF::getPtr(item->xmlObjAttr());
806     WebKitDOMTestObj* res = WebKit::kit(g_res.get());
807     return res;
808 }
809
810 void
811 webkit_dom_test_obj_set_xml_obj_attr(WebKitDOMTestObj* self, WebKitDOMTestObj* value)
812 {
813     g_return_if_fail(self);
814     WebCore::JSMainThreadNullState state;
815     WebCore::TestObj * item = WebKit::core(self);
816     g_return_if_fail(value);
817     WebCore::TestObj * converted_value = NULL;
818     if (value != NULL) {
819         converted_value = WebKit::core(value);
820         g_return_if_fail(converted_value);
821     }
822     item->setXMLObjAttr(converted_value);
823 }
824
825 gboolean
826 webkit_dom_test_obj_get_create(WebKitDOMTestObj* self)
827 {
828     g_return_val_if_fail(self, 0);
829     WebCore::JSMainThreadNullState state;
830     WebCore::TestObj * item = WebKit::core(self);
831     gboolean res = item->isCreate();
832     return res;
833 }
834
835 void
836 webkit_dom_test_obj_set_create(WebKitDOMTestObj* self, gboolean value)
837 {
838     g_return_if_fail(self);
839     WebCore::JSMainThreadNullState state;
840     WebCore::TestObj * item = WebKit::core(self);
841     item->setCreate(value);
842 }
843
844 gchar*
845 webkit_dom_test_obj_get_reflected_string_attr(WebKitDOMTestObj* self)
846 {
847     g_return_val_if_fail(self, 0);
848     WebCore::JSMainThreadNullState state;
849     WebCore::TestObj * item = WebKit::core(self);
850     gchar* res = convertToUTF8String(item->getAttribute(WebCore::HTMLNames::reflectedstringattrAttr));
851     return res;
852 }
853
854 void
855 webkit_dom_test_obj_set_reflected_string_attr(WebKitDOMTestObj* self, const gchar* value)
856 {
857     g_return_if_fail(self);
858     WebCore::JSMainThreadNullState state;
859     WebCore::TestObj * item = WebKit::core(self);
860     g_return_if_fail(value);
861     WTF::String converted_value = WTF::String::fromUTF8(value);
862     item->setAttribute(WebCore::HTMLNames::reflectedstringattrAttr, converted_value);
863 }
864
865 glong
866 webkit_dom_test_obj_get_reflected_integral_attr(WebKitDOMTestObj* self)
867 {
868     g_return_val_if_fail(self, 0);
869     WebCore::JSMainThreadNullState state;
870     WebCore::TestObj * item = WebKit::core(self);
871     glong res = item->getIntegralAttribute(WebCore::HTMLNames::reflectedintegralattrAttr);
872     return res;
873 }
874
875 void
876 webkit_dom_test_obj_set_reflected_integral_attr(WebKitDOMTestObj* self, glong value)
877 {
878     g_return_if_fail(self);
879     WebCore::JSMainThreadNullState state;
880     WebCore::TestObj * item = WebKit::core(self);
881     item->setIntegralAttribute(WebCore::HTMLNames::reflectedintegralattrAttr, value);
882 }
883
884 gulong
885 webkit_dom_test_obj_get_reflected_unsigned_integral_attr(WebKitDOMTestObj* self)
886 {
887     g_return_val_if_fail(self, 0);
888     WebCore::JSMainThreadNullState state;
889     WebCore::TestObj * item = WebKit::core(self);
890     gulong res = item->getUnsignedIntegralAttribute(WebCore::HTMLNames::reflectedunsignedintegralattrAttr);
891     return res;
892 }
893
894 void
895 webkit_dom_test_obj_set_reflected_unsigned_integral_attr(WebKitDOMTestObj* self, gulong value)
896 {
897     g_return_if_fail(self);
898     WebCore::JSMainThreadNullState state;
899     WebCore::TestObj * item = WebKit::core(self);
900     item->setUnsignedIntegralAttribute(WebCore::HTMLNames::reflectedunsignedintegralattrAttr, value);
901 }
902
903 gboolean
904 webkit_dom_test_obj_get_reflected_boolean_attr(WebKitDOMTestObj* self)
905 {
906     g_return_val_if_fail(self, 0);
907     WebCore::JSMainThreadNullState state;
908     WebCore::TestObj * item = WebKit::core(self);
909     gboolean res = item->hasAttribute(WebCore::HTMLNames::reflectedbooleanattrAttr);
910     return res;
911 }
912
913 void
914 webkit_dom_test_obj_set_reflected_boolean_attr(WebKitDOMTestObj* self, gboolean value)
915 {
916     g_return_if_fail(self);
917     WebCore::JSMainThreadNullState state;
918     WebCore::TestObj * item = WebKit::core(self);
919     item->setBooleanAttribute(WebCore::HTMLNames::reflectedbooleanattrAttr, value);
920 }
921
922 gchar*
923 webkit_dom_test_obj_get_reflected_url_attr(WebKitDOMTestObj* self)
924 {
925     g_return_val_if_fail(self, 0);
926     WebCore::JSMainThreadNullState state;
927     WebCore::TestObj * item = WebKit::core(self);
928     gchar* res = convertToUTF8String(item->getURLAttribute(WebCore::HTMLNames::reflectedurlattrAttr));
929     return res;
930 }
931
932 void
933 webkit_dom_test_obj_set_reflected_url_attr(WebKitDOMTestObj* self, const gchar* value)
934 {
935     g_return_if_fail(self);
936     WebCore::JSMainThreadNullState state;
937     WebCore::TestObj * item = WebKit::core(self);
938     g_return_if_fail(value);
939     WTF::String converted_value = WTF::String::fromUTF8(value);
940     item->setAttribute(WebCore::HTMLNames::reflectedurlattrAttr, converted_value);
941 }
942
943 gchar*
944 webkit_dom_test_obj_get_reflected_string_attr(WebKitDOMTestObj* self)
945 {
946     g_return_val_if_fail(self, 0);
947     WebCore::JSMainThreadNullState state;
948     WebCore::TestObj * item = WebKit::core(self);
949     gchar* res = convertToUTF8String(item->getAttribute(WebCore::HTMLNames::customContentStringAttrAttr));
950     return res;
951 }
952
953 void
954 webkit_dom_test_obj_set_reflected_string_attr(WebKitDOMTestObj* self, const gchar* value)
955 {
956     g_return_if_fail(self);
957     WebCore::JSMainThreadNullState state;
958     WebCore::TestObj * item = WebKit::core(self);
959     g_return_if_fail(value);
960     WTF::String converted_value = WTF::String::fromUTF8(value);
961     item->setAttribute(WebCore::HTMLNames::customContentStringAttrAttr, converted_value);
962 }
963
964 glong
965 webkit_dom_test_obj_get_reflected_custom_integral_attr(WebKitDOMTestObj* self)
966 {
967     g_return_val_if_fail(self, 0);
968     WebCore::JSMainThreadNullState state;
969     WebCore::TestObj * item = WebKit::core(self);
970     glong res = item->getIntegralAttribute(WebCore::HTMLNames::customContentIntegralAttrAttr);
971     return res;
972 }
973
974 void
975 webkit_dom_test_obj_set_reflected_custom_integral_attr(WebKitDOMTestObj* self, glong value)
976 {
977     g_return_if_fail(self);
978     WebCore::JSMainThreadNullState state;
979     WebCore::TestObj * item = WebKit::core(self);
980     item->setIntegralAttribute(WebCore::HTMLNames::customContentIntegralAttrAttr, value);
981 }
982
983 gboolean
984 webkit_dom_test_obj_get_reflected_custom_boolean_attr(WebKitDOMTestObj* self)
985 {
986     g_return_val_if_fail(self, 0);
987     WebCore::JSMainThreadNullState state;
988     WebCore::TestObj * item = WebKit::core(self);
989     gboolean res = item->hasAttribute(WebCore::HTMLNames::customContentBooleanAttrAttr);
990     return res;
991 }
992
993 void
994 webkit_dom_test_obj_set_reflected_custom_boolean_attr(WebKitDOMTestObj* self, gboolean value)
995 {
996     g_return_if_fail(self);
997     WebCore::JSMainThreadNullState state;
998     WebCore::TestObj * item = WebKit::core(self);
999     item->setBooleanAttribute(WebCore::HTMLNames::customContentBooleanAttrAttr, value);
1000 }
1001
1002 gchar*
1003 webkit_dom_test_obj_get_reflected_custom_url_attr(WebKitDOMTestObj* self)
1004 {
1005     g_return_val_if_fail(self, 0);
1006     WebCore::JSMainThreadNullState state;
1007     WebCore::TestObj * item = WebKit::core(self);
1008     gchar* res = convertToUTF8String(item->getURLAttribute(WebCore::HTMLNames::customContentURLAttrAttr));
1009     return res;
1010 }
1011
1012 void
1013 webkit_dom_test_obj_set_reflected_custom_url_attr(WebKitDOMTestObj* self, const gchar* value)
1014 {
1015     g_return_if_fail(self);
1016     WebCore::JSMainThreadNullState state;
1017     WebCore::TestObj * item = WebKit::core(self);
1018     g_return_if_fail(value);
1019     WTF::String converted_value = WTF::String::fromUTF8(value);
1020     item->setAttribute(WebCore::HTMLNames::customContentURLAttrAttr, converted_value);
1021 }
1022
1023 glong
1024 webkit_dom_test_obj_get_attr_with_getter_exception(WebKitDOMTestObj* self, GError **error)
1025 {
1026     g_return_val_if_fail(self, 0);
1027     WebCore::JSMainThreadNullState state;
1028     WebCore::TestObj * item = WebKit::core(self);
1029     WebCore::ExceptionCode ec = 0;
1030     glong res = item->attrWithGetterException(ec);
1031     if (ec) {
1032         WebCore::ExceptionCodeDescription ecdesc(ec);
1033         g_set_error_literal(error, g_quark_from_string("WEBKIT_DOM"), ecdesc.code, ecdesc.name);
1034     }
1035     return res;
1036 }
1037
1038 void
1039 webkit_dom_test_obj_set_attr_with_getter_exception(WebKitDOMTestObj* self, glong value, GError **error)
1040 {
1041     g_return_if_fail(self);
1042     WebCore::JSMainThreadNullState state;
1043     WebCore::TestObj * item = WebKit::core(self);
1044     WebCore::ExceptionCode ec = 0;
1045     item->setAttrWithGetterException(value, ec);
1046     if (ec) {
1047         WebCore::ExceptionCodeDescription ecdesc(ec);
1048         g_set_error_literal(error, g_quark_from_string("WEBKIT_DOM"), ecdesc.code, ecdesc.name);
1049     }
1050 }
1051
1052 glong
1053 webkit_dom_test_obj_get_attr_with_setter_exception(WebKitDOMTestObj* self)
1054 {
1055     g_return_val_if_fail(self, 0);
1056     WebCore::JSMainThreadNullState state;
1057     WebCore::TestObj * item = WebKit::core(self);
1058     glong res = item->attrWithSetterException();
1059     return res;
1060 }
1061
1062 void
1063 webkit_dom_test_obj_set_attr_with_setter_exception(WebKitDOMTestObj* self, glong value, GError **error)
1064 {
1065     g_return_if_fail(self);
1066     WebCore::JSMainThreadNullState state;
1067     WebCore::TestObj * item = WebKit::core(self);
1068     WebCore::ExceptionCode ec = 0;
1069     item->setAttrWithSetterException(value, ec);
1070     if (ec) {
1071         WebCore::ExceptionCodeDescription ecdesc(ec);
1072         g_set_error_literal(error, g_quark_from_string("WEBKIT_DOM"), ecdesc.code, ecdesc.name);
1073     }
1074 }
1075
1076 gchar*
1077 webkit_dom_test_obj_get_string_attr_with_getter_exception(WebKitDOMTestObj* self, GError **error)
1078 {
1079     g_return_val_if_fail(self, 0);
1080     WebCore::JSMainThreadNullState state;
1081     WebCore::TestObj * item = WebKit::core(self);
1082     WebCore::ExceptionCode ec = 0;
1083     gchar* res = convertToUTF8String(item->stringAttrWithGetterException(ec));
1084     return res;
1085 }
1086
1087 void
1088 webkit_dom_test_obj_set_string_attr_with_getter_exception(WebKitDOMTestObj* self, const gchar* value, GError **error)
1089 {
1090     g_return_if_fail(self);
1091     WebCore::JSMainThreadNullState state;
1092     WebCore::TestObj * item = WebKit::core(self);
1093     g_return_if_fail(value);
1094     WTF::String converted_value = WTF::String::fromUTF8(value);
1095     WebCore::ExceptionCode ec = 0;
1096     item->setStringAttrWithGetterException(converted_value, ec);
1097     if (ec) {
1098         WebCore::ExceptionCodeDescription ecdesc(ec);
1099         g_set_error_literal(error, g_quark_from_string("WEBKIT_DOM"), ecdesc.code, ecdesc.name);
1100     }
1101 }
1102
1103 gchar*
1104 webkit_dom_test_obj_get_string_attr_with_setter_exception(WebKitDOMTestObj* self)
1105 {
1106     g_return_val_if_fail(self, 0);
1107     WebCore::JSMainThreadNullState state;
1108     WebCore::TestObj * item = WebKit::core(self);
1109     gchar* res = convertToUTF8String(item->stringAttrWithSetterException());
1110     return res;
1111 }
1112
1113 void
1114 webkit_dom_test_obj_set_string_attr_with_setter_exception(WebKitDOMTestObj* self, const gchar* value, GError **error)
1115 {
1116     g_return_if_fail(self);
1117     WebCore::JSMainThreadNullState state;
1118     WebCore::TestObj * item = WebKit::core(self);
1119     g_return_if_fail(value);
1120     WTF::String converted_value = WTF::String::fromUTF8(value);
1121     WebCore::ExceptionCode ec = 0;
1122     item->setStringAttrWithSetterException(converted_value, ec);
1123     if (ec) {
1124         WebCore::ExceptionCodeDescription ecdesc(ec);
1125         g_set_error_literal(error, g_quark_from_string("WEBKIT_DOM"), ecdesc.code, ecdesc.name);
1126     }
1127 }
1128
1129 glong
1130 webkit_dom_test_obj_get_with_script_state_attribute(WebKitDOMTestObj* self)
1131 {
1132     g_return_val_if_fail(self, 0);
1133     WebCore::JSMainThreadNullState state;
1134     WebCore::TestObj * item = WebKit::core(self);
1135     glong res = item->withScriptStateAttribute();
1136     return res;
1137 }
1138
1139 void
1140 webkit_dom_test_obj_set_with_script_state_attribute(WebKitDOMTestObj* self, glong value)
1141 {
1142     g_return_if_fail(self);
1143     WebCore::JSMainThreadNullState state;
1144     WebCore::TestObj * item = WebKit::core(self);
1145     item->setWithScriptStateAttribute(value);
1146 }
1147
1148 WebKitDOMTestObj*
1149 webkit_dom_test_obj_get_with_script_execution_context_attribute(WebKitDOMTestObj* self)
1150 {
1151     g_return_val_if_fail(self, 0);
1152     WebCore::JSMainThreadNullState state;
1153     WebCore::TestObj * item = WebKit::core(self);
1154     PassRefPtr<WebCore::TestObj> g_res = WTF::getPtr(item->withScriptExecutionContextAttribute());
1155     WebKitDOMTestObj* res = WebKit::kit(g_res.get());
1156     return res;
1157 }
1158
1159 void
1160 webkit_dom_test_obj_set_with_script_execution_context_attribute(WebKitDOMTestObj* self, WebKitDOMTestObj* value)
1161 {
1162     g_return_if_fail(self);
1163     WebCore::JSMainThreadNullState state;
1164     WebCore::TestObj * item = WebKit::core(self);
1165     g_return_if_fail(value);
1166     WebCore::TestObj * converted_value = NULL;
1167     if (value != NULL) {
1168         converted_value = WebKit::core(value);
1169         g_return_if_fail(converted_value);
1170     }
1171     item->setWithScriptExecutionContextAttribute(converted_value);
1172 }
1173
1174 WebKitDOMTestObj*
1175 webkit_dom_test_obj_get_with_script_state_attribute_raises(WebKitDOMTestObj* self, GError **error)
1176 {
1177     g_return_val_if_fail(self, 0);
1178     WebCore::JSMainThreadNullState state;
1179     WebCore::TestObj * item = WebKit::core(self);
1180     WebCore::ExceptionCode ec = 0;
1181     PassRefPtr<WebCore::TestObj> g_res = WTF::getPtr(item->withScriptStateAttributeRaises(ec));
1182     if (ec) {
1183         WebCore::ExceptionCodeDescription ecdesc(ec);
1184         g_set_error_literal(error, g_quark_from_string("WEBKIT_DOM"), ecdesc.code, ecdesc.name);
1185     }
1186     WebKitDOMTestObj* res = WebKit::kit(g_res.get());
1187     return res;
1188 }
1189
1190 void
1191 webkit_dom_test_obj_set_with_script_state_attribute_raises(WebKitDOMTestObj* self, WebKitDOMTestObj* value, GError **error)
1192 {
1193     g_return_if_fail(self);
1194     WebCore::JSMainThreadNullState state;
1195     WebCore::TestObj * item = WebKit::core(self);
1196     g_return_if_fail(value);
1197     WebCore::TestObj * converted_value = NULL;
1198     if (value != NULL) {
1199         converted_value = WebKit::core(value);
1200         g_return_if_fail(converted_value);
1201     }
1202     WebCore::ExceptionCode ec = 0;
1203     item->setWithScriptStateAttributeRaises(converted_value, ec);
1204     if (ec) {
1205         WebCore::ExceptionCodeDescription ecdesc(ec);
1206         g_set_error_literal(error, g_quark_from_string("WEBKIT_DOM"), ecdesc.code, ecdesc.name);
1207     }
1208 }
1209
1210 WebKitDOMTestObj*
1211 webkit_dom_test_obj_get_with_script_execution_context_attribute_raises(WebKitDOMTestObj* self, GError **error)
1212 {
1213     g_return_val_if_fail(self, 0);
1214     WebCore::JSMainThreadNullState state;
1215     WebCore::TestObj * item = WebKit::core(self);
1216     WebCore::ExceptionCode ec = 0;
1217     PassRefPtr<WebCore::TestObj> g_res = WTF::getPtr(item->withScriptExecutionContextAttributeRaises(ec));
1218     if (ec) {
1219         WebCore::ExceptionCodeDescription ecdesc(ec);
1220         g_set_error_literal(error, g_quark_from_string("WEBKIT_DOM"), ecdesc.code, ecdesc.name);
1221     }
1222     WebKitDOMTestObj* res = WebKit::kit(g_res.get());
1223     return res;
1224 }
1225
1226 void
1227 webkit_dom_test_obj_set_with_script_execution_context_attribute_raises(WebKitDOMTestObj* self, WebKitDOMTestObj* value, GError **error)
1228 {
1229     g_return_if_fail(self);
1230     WebCore::JSMainThreadNullState state;
1231     WebCore::TestObj * item = WebKit::core(self);
1232     g_return_if_fail(value);
1233     WebCore::TestObj * converted_value = NULL;
1234     if (value != NULL) {
1235         converted_value = WebKit::core(value);
1236         g_return_if_fail(converted_value);
1237     }
1238     WebCore::ExceptionCode ec = 0;
1239     item->setWithScriptExecutionContextAttributeRaises(converted_value, ec);
1240     if (ec) {
1241         WebCore::ExceptionCodeDescription ecdesc(ec);
1242         g_set_error_literal(error, g_quark_from_string("WEBKIT_DOM"), ecdesc.code, ecdesc.name);
1243     }
1244 }
1245
1246 WebKitDOMTestObj*
1247 webkit_dom_test_obj_get_with_script_execution_context_and_script_state_attribute(WebKitDOMTestObj* self)
1248 {
1249     g_return_val_if_fail(self, 0);
1250     WebCore::JSMainThreadNullState state;
1251     WebCore::TestObj * item = WebKit::core(self);
1252     PassRefPtr<WebCore::TestObj> g_res = WTF::getPtr(item->withScriptExecutionContextAndScriptStateAttribute());
1253     WebKitDOMTestObj* res = WebKit::kit(g_res.get());
1254     return res;
1255 }
1256
1257 void
1258 webkit_dom_test_obj_set_with_script_execution_context_and_script_state_attribute(WebKitDOMTestObj* self, WebKitDOMTestObj* value)
1259 {
1260     g_return_if_fail(self);
1261     WebCore::JSMainThreadNullState state;
1262     WebCore::TestObj * item = WebKit::core(self);
1263     g_return_if_fail(value);
1264     WebCore::TestObj * converted_value = NULL;
1265     if (value != NULL) {
1266         converted_value = WebKit::core(value);
1267         g_return_if_fail(converted_value);
1268     }
1269     item->setWithScriptExecutionContextAndScriptStateAttribute(converted_value);
1270 }
1271
1272 WebKitDOMTestObj*
1273 webkit_dom_test_obj_get_with_script_execution_context_and_script_state_attribute_raises(WebKitDOMTestObj* self, GError **error)
1274 {
1275     g_return_val_if_fail(self, 0);
1276     WebCore::JSMainThreadNullState state;
1277     WebCore::TestObj * item = WebKit::core(self);
1278     WebCore::ExceptionCode ec = 0;
1279     PassRefPtr<WebCore::TestObj> g_res = WTF::getPtr(item->withScriptExecutionContextAndScriptStateAttributeRaises(ec));
1280     if (ec) {
1281         WebCore::ExceptionCodeDescription ecdesc(ec);
1282         g_set_error_literal(error, g_quark_from_string("WEBKIT_DOM"), ecdesc.code, ecdesc.name);
1283     }
1284     WebKitDOMTestObj* res = WebKit::kit(g_res.get());
1285     return res;
1286 }
1287
1288 void
1289 webkit_dom_test_obj_set_with_script_execution_context_and_script_state_attribute_raises(WebKitDOMTestObj* self, WebKitDOMTestObj* value, GError **error)
1290 {
1291     g_return_if_fail(self);
1292     WebCore::JSMainThreadNullState state;
1293     WebCore::TestObj * item = WebKit::core(self);
1294     g_return_if_fail(value);
1295     WebCore::TestObj * converted_value = NULL;
1296     if (value != NULL) {
1297         converted_value = WebKit::core(value);
1298         g_return_if_fail(converted_value);
1299     }
1300     WebCore::ExceptionCode ec = 0;
1301     item->setWithScriptExecutionContextAndScriptStateAttributeRaises(converted_value, ec);
1302     if (ec) {
1303         WebCore::ExceptionCodeDescription ecdesc(ec);
1304         g_set_error_literal(error, g_quark_from_string("WEBKIT_DOM"), ecdesc.code, ecdesc.name);
1305     }
1306 }
1307
1308 WebKitDOMTestObj*
1309 webkit_dom_test_obj_get_with_script_execution_context_and_script_state_with_spaces_attribute(WebKitDOMTestObj* self)
1310 {
1311     g_return_val_if_fail(self, 0);
1312     WebCore::JSMainThreadNullState state;
1313     WebCore::TestObj * item = WebKit::core(self);
1314     PassRefPtr<WebCore::TestObj> g_res = WTF::getPtr(item->withScriptExecutionContextAndScriptStateWithSpacesAttribute());
1315     WebKitDOMTestObj* res = WebKit::kit(g_res.get());
1316     return res;
1317 }
1318
1319 void
1320 webkit_dom_test_obj_set_with_script_execution_context_and_script_state_with_spaces_attribute(WebKitDOMTestObj* self, WebKitDOMTestObj* value)
1321 {
1322     g_return_if_fail(self);
1323     WebCore::JSMainThreadNullState state;
1324     WebCore::TestObj * item = WebKit::core(self);
1325     g_return_if_fail(value);
1326     WebCore::TestObj * converted_value = NULL;
1327     if (value != NULL) {
1328         converted_value = WebKit::core(value);
1329         g_return_if_fail(converted_value);
1330     }
1331     item->setWithScriptExecutionContextAndScriptStateWithSpacesAttribute(converted_value);
1332 }
1333
1334 glong
1335 webkit_dom_test_obj_get_conditional_attr1(WebKitDOMTestObj* self)
1336 {
1337 #if ENABLE(Condition1)
1338     g_return_val_if_fail(self, 0);
1339     WebCore::JSMainThreadNullState state;
1340     WebCore::TestObj * item = WebKit::core(self);
1341     glong res = item->conditionalAttr1();
1342     return res;
1343 #else
1344     return static_cast<glong>(0);
1345 #endif /* ENABLE(Condition1) */
1346 }
1347
1348 void
1349 webkit_dom_test_obj_set_conditional_attr1(WebKitDOMTestObj* self, glong value)
1350 {
1351 #if ENABLE(Condition1)
1352     g_return_if_fail(self);
1353     WebCore::JSMainThreadNullState state;
1354     WebCore::TestObj * item = WebKit::core(self);
1355     item->setConditionalAttr1(value);
1356 #endif /* ENABLE(Condition1) */
1357 }
1358
1359 glong
1360 webkit_dom_test_obj_get_conditional_attr2(WebKitDOMTestObj* self)
1361 {
1362 #if ENABLE(Condition1) && ENABLE(Condition2)
1363     g_return_val_if_fail(self, 0);
1364     WebCore::JSMainThreadNullState state;
1365     WebCore::TestObj * item = WebKit::core(self);
1366     glong res = item->conditionalAttr2();
1367     return res;
1368 #else
1369     return static_cast<glong>(0);
1370 #endif /* ENABLE(Condition1) && ENABLE(Condition2) */
1371 }
1372
1373 void
1374 webkit_dom_test_obj_set_conditional_attr2(WebKitDOMTestObj* self, glong value)
1375 {
1376 #if ENABLE(Condition1) && ENABLE(Condition2)
1377     g_return_if_fail(self);
1378     WebCore::JSMainThreadNullState state;
1379     WebCore::TestObj * item = WebKit::core(self);
1380     item->setConditionalAttr2(value);
1381 #endif /* ENABLE(Condition1) && ENABLE(Condition2) */
1382 }
1383
1384 glong
1385 webkit_dom_test_obj_get_conditional_attr3(WebKitDOMTestObj* self)
1386 {
1387 #if ENABLE(Condition1) || ENABLE(Condition2)
1388     g_return_val_if_fail(self, 0);
1389     WebCore::JSMainThreadNullState state;
1390     WebCore::TestObj * item = WebKit::core(self);
1391     glong res = item->conditionalAttr3();
1392     return res;
1393 #else
1394     return static_cast<glong>(0);
1395 #endif /* ENABLE(Condition1) || ENABLE(Condition2) */
1396 }
1397
1398 void
1399 webkit_dom_test_obj_set_conditional_attr3(WebKitDOMTestObj* self, glong value)
1400 {
1401 #if ENABLE(Condition1) || ENABLE(Condition2)
1402     g_return_if_fail(self);
1403     WebCore::JSMainThreadNullState state;
1404     WebCore::TestObj * item = WebKit::core(self);
1405     item->setConditionalAttr3(value);
1406 #endif /* ENABLE(Condition1) || ENABLE(Condition2) */
1407 }
1408
1409 WebKitDOMDocument*
1410 webkit_dom_test_obj_get_content_document(WebKitDOMTestObj* self)
1411 {
1412     g_return_val_if_fail(self, 0);
1413     WebCore::JSMainThreadNullState state;
1414     WebCore::TestObj * item = WebKit::core(self);
1415     PassRefPtr<WebCore::Document> g_res = WTF::getPtr(item->contentDocument());
1416     WebKitDOMDocument* res = WebKit::kit(g_res.get());
1417     return res;
1418 }
1419
1420 WebKitDOMSVGPoint*
1421 webkit_dom_test_obj_get_mutable_point(WebKitDOMTestObj* self)
1422 {
1423     g_return_val_if_fail(self, 0);
1424     WebCore::JSMainThreadNullState state;
1425     WebCore::TestObj * item = WebKit::core(self);
1426     PassRefPtr<WebCore::SVGPoint> g_res = WTF::getPtr(item->mutablePoint());
1427     WebKitDOMSVGPoint* res = WebKit::kit(g_res.get());
1428     return res;
1429 }
1430
1431 void
1432 webkit_dom_test_obj_set_mutable_point(WebKitDOMTestObj* self, WebKitDOMSVGPoint* value)
1433 {
1434     g_return_if_fail(self);
1435     WebCore::JSMainThreadNullState state;
1436     WebCore::TestObj * item = WebKit::core(self);
1437     g_return_if_fail(value);
1438     WebCore::SVGPoint * converted_value = NULL;
1439     if (value != NULL) {
1440         converted_value = WebKit::core(value);
1441         g_return_if_fail(converted_value);
1442     }
1443     item->setMutablePoint(converted_value);
1444 }
1445
1446 WebKitDOMSVGPoint*
1447 webkit_dom_test_obj_get_immutable_point(WebKitDOMTestObj* self)
1448 {
1449     g_return_val_if_fail(self, 0);
1450     WebCore::JSMainThreadNullState state;
1451     WebCore::TestObj * item = WebKit::core(self);
1452     PassRefPtr<WebCore::SVGPoint> g_res = WTF::getPtr(item->immutablePoint());
1453     WebKitDOMSVGPoint* res = WebKit::kit(g_res.get());
1454     return res;
1455 }
1456
1457 void
1458 webkit_dom_test_obj_set_immutable_point(WebKitDOMTestObj* self, WebKitDOMSVGPoint* value)
1459 {
1460     g_return_if_fail(self);
1461     WebCore::JSMainThreadNullState state;
1462     WebCore::TestObj * item = WebKit::core(self);
1463     g_return_if_fail(value);
1464     WebCore::SVGPoint * converted_value = NULL;
1465     if (value != NULL) {
1466         converted_value = WebKit::core(value);
1467         g_return_if_fail(converted_value);
1468     }
1469     item->setImmutablePoint(converted_value);
1470 }
1471
1472 gfloat
1473 webkit_dom_test_obj_get_strict_float(WebKitDOMTestObj* self)
1474 {
1475     g_return_val_if_fail(self, 0);
1476     WebCore::JSMainThreadNullState state;
1477     WebCore::TestObj * item = WebKit::core(self);
1478     gfloat res = item->strictFloat();
1479     return res;
1480 }
1481
1482 void
1483 webkit_dom_test_obj_set_strict_float(WebKitDOMTestObj* self, gfloat value)
1484 {
1485     g_return_if_fail(self);
1486     WebCore::JSMainThreadNullState state;
1487     WebCore::TestObj * item = WebKit::core(self);
1488     item->setStrictFloat(value);
1489 }
1490
1491 glong
1492 webkit_dom_test_obj_get_description(WebKitDOMTestObj* self)
1493 {
1494     g_return_val_if_fail(self, 0);
1495     WebCore::JSMainThreadNullState state;
1496     WebCore::TestObj * item = WebKit::core(self);
1497     glong res = item->description();
1498     return res;
1499 }
1500
1501 glong
1502 webkit_dom_test_obj_get_id(WebKitDOMTestObj* self)
1503 {
1504     g_return_val_if_fail(self, 0);
1505     WebCore::JSMainThreadNullState state;
1506     WebCore::TestObj * item = WebKit::core(self);
1507     glong res = item->id();
1508     return res;
1509 }
1510
1511 void
1512 webkit_dom_test_obj_set_id(WebKitDOMTestObj* self, glong value)
1513 {
1514     g_return_if_fail(self);
1515     WebCore::JSMainThreadNullState state;
1516     WebCore::TestObj * item = WebKit::core(self);
1517     item->setId(value);
1518 }
1519
1520 gchar*
1521 webkit_dom_test_obj_get_hash(WebKitDOMTestObj* self)
1522 {
1523     g_return_val_if_fail(self, 0);
1524     WebCore::JSMainThreadNullState state;
1525     WebCore::TestObj * item = WebKit::core(self);
1526     gchar* res = convertToUTF8String(item->hash());
1527     return res;
1528 }
1529
1530
1531 G_DEFINE_TYPE(WebKitDOMTestObj, webkit_dom_test_obj, WEBKIT_TYPE_DOM_OBJECT)
1532
1533 namespace WebKit {
1534
1535 WebCore::TestObj* core(WebKitDOMTestObj* request)
1536 {
1537     g_return_val_if_fail(request, 0);
1538
1539     WebCore::TestObj* coreObject = static_cast<WebCore::TestObj*>(WEBKIT_DOM_OBJECT(request)->coreObject);
1540     g_return_val_if_fail(coreObject, 0);
1541
1542     return coreObject;
1543 }
1544
1545 } // namespace WebKit
1546 enum {
1547     PROP_0,
1548     PROP_READ_ONLY_INT_ATTR,
1549     PROP_READ_ONLY_STRING_ATTR,
1550     PROP_READ_ONLY_TEST_OBJ_ATTR,
1551     PROP_SHORT_ATTR,
1552     PROP_UNSIGNED_SHORT_ATTR,
1553     PROP_INT_ATTR,
1554     PROP_LONG_LONG_ATTR,
1555     PROP_UNSIGNED_LONG_LONG_ATTR,
1556     PROP_STRING_ATTR,
1557     PROP_TEST_OBJ_ATTR,
1558     PROP_XML_OBJ_ATTR,
1559     PROP_CREATE,
1560     PROP_REFLECTED_STRING_ATTR,
1561     PROP_REFLECTED_INTEGRAL_ATTR,
1562     PROP_REFLECTED_UNSIGNED_INTEGRAL_ATTR,
1563     PROP_REFLECTED_BOOLEAN_ATTR,
1564     PROP_REFLECTED_URL_ATTR,
1565     PROP_REFLECTED_STRING_ATTR,
1566     PROP_REFLECTED_CUSTOM_INTEGRAL_ATTR,
1567     PROP_REFLECTED_CUSTOM_BOOLEAN_ATTR,
1568     PROP_REFLECTED_CUSTOM_URL_ATTR,
1569     PROP_ATTR_WITH_GETTER_EXCEPTION,
1570     PROP_ATTR_WITH_SETTER_EXCEPTION,
1571     PROP_STRING_ATTR_WITH_GETTER_EXCEPTION,
1572     PROP_STRING_ATTR_WITH_SETTER_EXCEPTION,
1573     PROP_WITH_SCRIPT_STATE_ATTRIBUTE,
1574     PROP_WITH_SCRIPT_EXECUTION_CONTEXT_ATTRIBUTE,
1575     PROP_WITH_SCRIPT_STATE_ATTRIBUTE_RAISES,
1576     PROP_WITH_SCRIPT_EXECUTION_CONTEXT_ATTRIBUTE_RAISES,
1577     PROP_WITH_SCRIPT_EXECUTION_CONTEXT_AND_SCRIPT_STATE_ATTRIBUTE,
1578     PROP_WITH_SCRIPT_EXECUTION_CONTEXT_AND_SCRIPT_STATE_ATTRIBUTE_RAISES,
1579     PROP_WITH_SCRIPT_EXECUTION_CONTEXT_AND_SCRIPT_STATE_WITH_SPACES_ATTRIBUTE,
1580     PROP_WITH_SCRIPT_ARGUMENTS_AND_CALL_STACK_ATTRIBUTE,
1581 #if ENABLE(Condition1)
1582     PROP_CONDITIONAL_ATTR1,
1583 #endif /* ENABLE(Condition1) */
1584 #if ENABLE(Condition1) && ENABLE(Condition2)
1585     PROP_CONDITIONAL_ATTR2,
1586 #endif /* ENABLE(Condition1) && ENABLE(Condition2) */
1587 #if ENABLE(Condition1) || ENABLE(Condition2)
1588     PROP_CONDITIONAL_ATTR3,
1589 #endif /* ENABLE(Condition1) || ENABLE(Condition2) */
1590     PROP_CONTENT_DOCUMENT,
1591     PROP_MUTABLE_POINT,
1592     PROP_IMMUTABLE_POINT,
1593     PROP_STRICT_FLOAT,
1594     PROP_DESCRIPTION,
1595     PROP_ID,
1596     PROP_HASH,
1597 };
1598
1599
1600 static void webkit_dom_test_obj_finalize(GObject* object)
1601 {
1602     WebKitDOMObject* dom_object = WEBKIT_DOM_OBJECT(object);
1603     
1604     if (dom_object->coreObject) {
1605         WebCore::TestObj* coreObject = static_cast<WebCore::TestObj *>(dom_object->coreObject);
1606
1607         WebKit::DOMObjectCache::forget(coreObject);
1608         coreObject->deref();
1609
1610         dom_object->coreObject = NULL;
1611     }
1612
1613     G_OBJECT_CLASS(webkit_dom_test_obj_parent_class)->finalize(object);
1614 }
1615
1616 static void webkit_dom_test_obj_set_property(GObject* object, guint prop_id, const GValue* value, GParamSpec* pspec)
1617 {
1618     WebCore::JSMainThreadNullState state;
1619     WebKitDOMTestObj* self = WEBKIT_DOM_TEST_OBJ(object);
1620     WebCore::TestObj* coreSelf = WebKit::core(self);
1621     switch (prop_id) {
1622     case PROP_UNSIGNED_SHORT_ATTR:
1623     {
1624         coreSelf->setUnsignedShortAttr((g_value_get_uint(value)));
1625         break;
1626     }
1627     case PROP_INT_ATTR:
1628     {
1629         coreSelf->setIntAttr((g_value_get_long(value)));
1630         break;
1631     }
1632     case PROP_UNSIGNED_LONG_LONG_ATTR:
1633     {
1634         coreSelf->setUnsignedLongLongAttr((g_value_get_uint64(value)));
1635         break;
1636     }
1637     case PROP_STRING_ATTR:
1638     {
1639         coreSelf->setStringAttr(WTF::String::fromUTF8(g_value_get_string(value)));
1640         break;
1641     }
1642     case PROP_CREATE:
1643     {
1644         coreSelf->setCreate((g_value_get_boolean(value)));
1645         break;
1646     }
1647     case PROP_REFLECTED_STRING_ATTR:
1648     {
1649         coreSelf->setAttribute(WebCore::HTMLNames::reflectedstringattrAttr, WTF::String::fromUTF8(g_value_get_string(value)));
1650         break;
1651     }
1652     case PROP_REFLECTED_INTEGRAL_ATTR:
1653     {
1654         coreSelf->setIntegralAttribute(WebCore::HTMLNames::reflectedintegralattrAttr, (g_value_get_long(value)));
1655         break;
1656     }
1657     case PROP_REFLECTED_UNSIGNED_INTEGRAL_ATTR:
1658     {
1659         coreSelf->setUnsignedIntegralAttribute(WebCore::HTMLNames::reflectedunsignedintegralattrAttr, (g_value_get_ulong(value)));
1660         break;
1661     }
1662     case PROP_REFLECTED_BOOLEAN_ATTR:
1663     {
1664         coreSelf->setBooleanAttribute(WebCore::HTMLNames::reflectedbooleanattrAttr, (g_value_get_boolean(value)));
1665         break;
1666     }
1667     case PROP_REFLECTED_URL_ATTR:
1668     {
1669         coreSelf->setAttribute(WebCore::HTMLNames::reflectedurlattrAttr, WTF::String::fromUTF8(g_value_get_string(value)));
1670         break;
1671     }
1672     case PROP_REFLECTED_STRING_ATTR:
1673     {
1674         coreSelf->setAttribute(WebCore::HTMLNames::customContentStringAttrAttr, WTF::String::fromUTF8(g_value_get_string(value)));
1675         break;
1676     }
1677     case PROP_REFLECTED_CUSTOM_INTEGRAL_ATTR:
1678     {
1679         coreSelf->setIntegralAttribute(WebCore::HTMLNames::customContentIntegralAttrAttr, (g_value_get_long(value)));
1680         break;
1681     }
1682     case PROP_REFLECTED_CUSTOM_BOOLEAN_ATTR:
1683     {
1684         coreSelf->setBooleanAttribute(WebCore::HTMLNames::customContentBooleanAttrAttr, (g_value_get_boolean(value)));
1685         break;
1686     }
1687     case PROP_REFLECTED_CUSTOM_URL_ATTR:
1688     {
1689         coreSelf->setAttribute(WebCore::HTMLNames::customContentURLAttrAttr, WTF::String::fromUTF8(g_value_get_string(value)));
1690         break;
1691     }
1692     case PROP_ATTR_WITH_GETTER_EXCEPTION:
1693     {
1694         WebCore::ExceptionCode ec = 0;
1695         coreSelf->setAttrWithGetterException((g_value_get_long(value)), ec);
1696         break;
1697     }
1698     case PROP_ATTR_WITH_SETTER_EXCEPTION:
1699     {
1700         WebCore::ExceptionCode ec = 0;
1701         coreSelf->setAttrWithSetterException((g_value_get_long(value)), ec);
1702         break;
1703     }
1704     case PROP_STRING_ATTR_WITH_GETTER_EXCEPTION:
1705     {
1706         WebCore::ExceptionCode ec = 0;
1707         coreSelf->setStringAttrWithGetterException(WTF::String::fromUTF8(g_value_get_string(value)), ec);
1708         break;
1709     }
1710     case PROP_STRING_ATTR_WITH_SETTER_EXCEPTION:
1711     {
1712         WebCore::ExceptionCode ec = 0;
1713         coreSelf->setStringAttrWithSetterException(WTF::String::fromUTF8(g_value_get_string(value)), ec);
1714         break;
1715     }
1716     case PROP_WITH_SCRIPT_STATE_ATTRIBUTE:
1717     {
1718         coreSelf->setWithScriptStateAttribute((g_value_get_long(value)));
1719         break;
1720     }
1721 #if ENABLE(Condition1)
1722     case PROP_CONDITIONAL_ATTR1:
1723     {
1724         coreSelf->setConditionalAttr1((g_value_get_long(value)));
1725         break;
1726     }
1727 #endif /* ENABLE(Condition1) */
1728 #if ENABLE(Condition1) && ENABLE(Condition2)
1729     case PROP_CONDITIONAL_ATTR2:
1730     {
1731         coreSelf->setConditionalAttr2((g_value_get_long(value)));
1732         break;
1733     }
1734 #endif /* ENABLE(Condition1) && ENABLE(Condition2) */
1735 #if ENABLE(Condition1) || ENABLE(Condition2)
1736     case PROP_CONDITIONAL_ATTR3:
1737     {
1738         coreSelf->setConditionalAttr3((g_value_get_long(value)));
1739         break;
1740     }
1741 #endif /* ENABLE(Condition1) || ENABLE(Condition2) */
1742     case PROP_STRICT_FLOAT:
1743     {
1744         coreSelf->setStrictFloat((g_value_get_float(value)));
1745         break;
1746     }
1747     case PROP_ID:
1748     {
1749         coreSelf->setId((g_value_get_long(value)));
1750         break;
1751     }
1752     default:
1753         G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
1754         break;
1755     }
1756 }
1757
1758
1759 static void webkit_dom_test_obj_get_property(GObject* object, guint prop_id, GValue* value, GParamSpec* pspec)
1760 {
1761     WebCore::JSMainThreadNullState state;
1762     WebKitDOMTestObj* self = WEBKIT_DOM_TEST_OBJ(object);
1763     WebCore::TestObj* coreSelf = WebKit::core(self);
1764     switch (prop_id) {
1765     case PROP_READ_ONLY_INT_ATTR:
1766     {
1767         g_value_set_long(value, coreSelf->readOnlyIntAttr());
1768         break;
1769     }
1770     case PROP_READ_ONLY_STRING_ATTR:
1771     {
1772         g_value_take_string(value, convertToUTF8String(coreSelf->readOnlyStringAttr()));
1773         break;
1774     }
1775     case PROP_READ_ONLY_TEST_OBJ_ATTR:
1776     {
1777         RefPtr<WebCore::TestObj> ptr = coreSelf->readOnlyTestObjAttr();
1778         g_value_set_object(value, WebKit::kit(ptr.get()));
1779         break;
1780     }
1781     case PROP_SHORT_ATTR:
1782     {
1783         g_value_set_int(value, coreSelf->shortAttr());
1784         break;
1785     }
1786     case PROP_UNSIGNED_SHORT_ATTR:
1787     {
1788         g_value_set_uint(value, coreSelf->unsignedShortAttr());
1789         break;
1790     }
1791     case PROP_INT_ATTR:
1792     {
1793         g_value_set_long(value, coreSelf->intAttr());
1794         break;
1795     }
1796     case PROP_LONG_LONG_ATTR:
1797     {
1798         g_value_set_int64(value, coreSelf->longLongAttr());
1799         break;
1800     }
1801     case PROP_UNSIGNED_LONG_LONG_ATTR:
1802     {
1803         g_value_set_uint64(value, coreSelf->unsignedLongLongAttr());
1804         break;
1805     }
1806     case PROP_STRING_ATTR:
1807     {
1808         g_value_take_string(value, convertToUTF8String(coreSelf->stringAttr()));
1809         break;
1810     }
1811     case PROP_TEST_OBJ_ATTR:
1812     {
1813         RefPtr<WebCore::TestObj> ptr = coreSelf->testObjAttr();
1814         g_value_set_object(value, WebKit::kit(ptr.get()));
1815         break;
1816     }
1817     case PROP_XML_OBJ_ATTR:
1818     {
1819         RefPtr<WebCore::TestObj> ptr = coreSelf->xmlObjAttr();
1820         g_value_set_object(value, WebKit::kit(ptr.get()));
1821         break;
1822     }
1823     case PROP_CREATE:
1824     {
1825         g_value_set_boolean(value, coreSelf->isCreate());
1826         break;
1827     }
1828     case PROP_REFLECTED_STRING_ATTR:
1829     {
1830         g_value_take_string(value, convertToUTF8String(coreSelf->getAttribute(WebCore::HTMLNames::reflectedstringattrAttr)));
1831         break;
1832     }
1833     case PROP_REFLECTED_INTEGRAL_ATTR:
1834     {
1835         g_value_set_long(value, coreSelf->getIntegralAttribute(WebCore::HTMLNames::reflectedintegralattrAttr));
1836         break;
1837     }
1838     case PROP_REFLECTED_UNSIGNED_INTEGRAL_ATTR:
1839     {
1840         g_value_set_ulong(value, coreSelf->getUnsignedIntegralAttribute(WebCore::HTMLNames::reflectedunsignedintegralattrAttr));
1841         break;
1842     }
1843     case PROP_REFLECTED_BOOLEAN_ATTR:
1844     {
1845         g_value_set_boolean(value, coreSelf->hasAttribute(WebCore::HTMLNames::reflectedbooleanattrAttr));
1846         break;
1847     }
1848     case PROP_REFLECTED_URL_ATTR:
1849     {
1850         g_value_take_string(value, convertToUTF8String(coreSelf->getURLAttribute(WebCore::HTMLNames::reflectedurlattrAttr)));
1851         break;
1852     }
1853     case PROP_REFLECTED_STRING_ATTR:
1854     {
1855         g_value_take_string(value, convertToUTF8String(coreSelf->getAttribute(WebCore::HTMLNames::customContentStringAttrAttr)));
1856         break;
1857     }
1858     case PROP_REFLECTED_CUSTOM_INTEGRAL_ATTR:
1859     {
1860         g_value_set_long(value, coreSelf->getIntegralAttribute(WebCore::HTMLNames::customContentIntegralAttrAttr));
1861         break;
1862     }
1863     case PROP_REFLECTED_CUSTOM_BOOLEAN_ATTR:
1864     {
1865         g_value_set_boolean(value, coreSelf->hasAttribute(WebCore::HTMLNames::customContentBooleanAttrAttr));
1866         break;
1867     }
1868     case PROP_REFLECTED_CUSTOM_URL_ATTR:
1869     {
1870         g_value_take_string(value, convertToUTF8String(coreSelf->getURLAttribute(WebCore::HTMLNames::customContentURLAttrAttr)));
1871         break;
1872     }
1873     case PROP_ATTR_WITH_GETTER_EXCEPTION:
1874     {
1875         WebCore::ExceptionCode ec = 0;
1876         g_value_set_long(value, coreSelf->attrWithGetterException(ec));
1877         break;
1878     }
1879     case PROP_ATTR_WITH_SETTER_EXCEPTION:
1880     {
1881         g_value_set_long(value, coreSelf->attrWithSetterException());
1882         break;
1883     }
1884     case PROP_STRING_ATTR_WITH_GETTER_EXCEPTION:
1885     {
1886         WebCore::ExceptionCode ec = 0;
1887         g_value_take_string(value, convertToUTF8String(coreSelf->stringAttrWithGetterException(ec)));
1888         break;
1889     }
1890     case PROP_STRING_ATTR_WITH_SETTER_EXCEPTION:
1891     {
1892         g_value_take_string(value, convertToUTF8String(coreSelf->stringAttrWithSetterException()));
1893         break;
1894     }
1895     case PROP_WITH_SCRIPT_STATE_ATTRIBUTE:
1896     {
1897         g_value_set_long(value, coreSelf->withScriptStateAttribute());
1898         break;
1899     }
1900     case PROP_WITH_SCRIPT_EXECUTION_CONTEXT_ATTRIBUTE:
1901     {
1902         RefPtr<WebCore::TestObj> ptr = coreSelf->withScriptExecutionContextAttribute();
1903         g_value_set_object(value, WebKit::kit(ptr.get()));
1904         break;
1905     }
1906     case PROP_WITH_SCRIPT_STATE_ATTRIBUTE_RAISES:
1907     {
1908         WebCore::ExceptionCode ec = 0;
1909         RefPtr<WebCore::TestObj> ptr = coreSelf->withScriptStateAttributeRaises(ec);
1910         g_value_set_object(value, WebKit::kit(ptr.get()));
1911         break;
1912     }
1913     case PROP_WITH_SCRIPT_EXECUTION_CONTEXT_ATTRIBUTE_RAISES:
1914     {
1915         WebCore::ExceptionCode ec = 0;
1916         RefPtr<WebCore::TestObj> ptr = coreSelf->withScriptExecutionContextAttributeRaises(ec);
1917         g_value_set_object(value, WebKit::kit(ptr.get()));
1918         break;
1919     }
1920     case PROP_WITH_SCRIPT_EXECUTION_CONTEXT_AND_SCRIPT_STATE_ATTRIBUTE:
1921     {
1922         RefPtr<WebCore::TestObj> ptr = coreSelf->withScriptExecutionContextAndScriptStateAttribute();
1923         g_value_set_object(value, WebKit::kit(ptr.get()));
1924         break;
1925     }
1926     case PROP_WITH_SCRIPT_EXECUTION_CONTEXT_AND_SCRIPT_STATE_ATTRIBUTE_RAISES:
1927     {
1928         WebCore::ExceptionCode ec = 0;
1929         RefPtr<WebCore::TestObj> ptr = coreSelf->withScriptExecutionContextAndScriptStateAttributeRaises(ec);
1930         g_value_set_object(value, WebKit::kit(ptr.get()));
1931         break;
1932     }
1933     case PROP_WITH_SCRIPT_EXECUTION_CONTEXT_AND_SCRIPT_STATE_WITH_SPACES_ATTRIBUTE:
1934     {
1935         RefPtr<WebCore::TestObj> ptr = coreSelf->withScriptExecutionContextAndScriptStateWithSpacesAttribute();
1936         g_value_set_object(value, WebKit::kit(ptr.get()));
1937         break;
1938     }
1939     case PROP_WITH_SCRIPT_ARGUMENTS_AND_CALL_STACK_ATTRIBUTE:
1940     {
1941         RefPtr<WebCore::TestObj> ptr = coreSelf->withScriptArgumentsAndCallStackAttribute();
1942         g_value_set_object(value, WebKit::kit(ptr.get()));
1943         break;
1944     }
1945 #if ENABLE(Condition1)
1946     case PROP_CONDITIONAL_ATTR1:
1947     {
1948         g_value_set_long(value, coreSelf->conditionalAttr1());
1949         break;
1950     }
1951 #endif /* ENABLE(Condition1) */
1952 #if ENABLE(Condition1) && ENABLE(Condition2)
1953     case PROP_CONDITIONAL_ATTR2:
1954     {
1955         g_value_set_long(value, coreSelf->conditionalAttr2());
1956         break;
1957     }
1958 #endif /* ENABLE(Condition1) && ENABLE(Condition2) */
1959 #if ENABLE(Condition1) || ENABLE(Condition2)
1960     case PROP_CONDITIONAL_ATTR3:
1961     {
1962         g_value_set_long(value, coreSelf->conditionalAttr3());
1963         break;
1964     }
1965 #endif /* ENABLE(Condition1) || ENABLE(Condition2) */
1966     case PROP_CONTENT_DOCUMENT:
1967     {
1968         RefPtr<WebCore::Document> ptr = coreSelf->contentDocument();
1969         g_value_set_object(value, WebKit::kit(ptr.get()));
1970         break;
1971     }
1972     case PROP_MUTABLE_POINT:
1973     {
1974         RefPtr<WebCore::SVGPoint> ptr = coreSelf->mutablePoint();
1975         g_value_set_object(value, WebKit::kit(ptr.get()));
1976         break;
1977     }
1978     case PROP_IMMUTABLE_POINT:
1979     {
1980         RefPtr<WebCore::SVGPoint> ptr = coreSelf->immutablePoint();
1981         g_value_set_object(value, WebKit::kit(ptr.get()));
1982         break;
1983     }
1984     case PROP_STRICT_FLOAT:
1985     {
1986         g_value_set_float(value, coreSelf->strictFloat());
1987         break;
1988     }
1989     case PROP_DESCRIPTION:
1990     {
1991         g_value_set_long(value, coreSelf->description());
1992         break;
1993     }
1994     case PROP_ID:
1995     {
1996         g_value_set_long(value, coreSelf->id());
1997         break;
1998     }
1999     case PROP_HASH:
2000     {
2001         g_value_take_string(value, convertToUTF8String(coreSelf->hash()));
2002         break;
2003     }
2004     default:
2005         G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
2006         break;
2007     }
2008 }
2009
2010
2011 static void webkit_dom_test_obj_constructed(GObject* object)
2012 {
2013
2014     if (G_OBJECT_CLASS(webkit_dom_test_obj_parent_class)->constructed)
2015         G_OBJECT_CLASS(webkit_dom_test_obj_parent_class)->constructed(object);
2016 }
2017
2018 static void webkit_dom_test_obj_class_init(WebKitDOMTestObjClass* requestClass)
2019 {
2020     GObjectClass *gobjectClass = G_OBJECT_CLASS(requestClass);
2021     gobjectClass->finalize = webkit_dom_test_obj_finalize;
2022     gobjectClass->set_property = webkit_dom_test_obj_set_property;
2023     gobjectClass->get_property = webkit_dom_test_obj_get_property;
2024     gobjectClass->constructed = webkit_dom_test_obj_constructed;
2025
2026     g_object_class_install_property(gobjectClass,
2027                                     PROP_READ_ONLY_INT_ATTR,
2028                                     g_param_spec_long("read-only-int-attr", /* name */
2029                                                            "test_obj_read-only-int-attr", /* short description */
2030                                                            "read-only  glong TestObj.read-only-int-attr", /* longer - could do with some extra doc stuff here */
2031                                                            G_MINLONG, /* min */
2032 G_MAXLONG, /* max */
2033 0, /* default */
2034                                                            WEBKIT_PARAM_READABLE));
2035     g_object_class_install_property(gobjectClass,
2036                                     PROP_READ_ONLY_STRING_ATTR,
2037                                     g_param_spec_string("read-only-string-attr", /* name */
2038                                                            "test_obj_read-only-string-attr", /* short description */
2039                                                            "read-only  gchar* TestObj.read-only-string-attr", /* longer - could do with some extra doc stuff here */
2040                                                            "", /* default */
2041                                                            WEBKIT_PARAM_READABLE));
2042     g_object_class_install_property(gobjectClass,
2043                                     PROP_READ_ONLY_TEST_OBJ_ATTR,
2044                                     g_param_spec_object("read-only-test-obj-attr", /* name */
2045                                                            "test_obj_read-only-test-obj-attr", /* short description */
2046                                                            "read-only  WebKitDOMTestObj* TestObj.read-only-test-obj-attr", /* longer - could do with some extra doc stuff here */
2047                                                            WEBKIT_TYPE_DOM_TEST_OBJ, /* gobject type */
2048                                                            WEBKIT_PARAM_READABLE));
2049     g_object_class_install_property(gobjectClass,
2050                                     PROP_SHORT_ATTR,
2051                                     g_param_spec_int("short-attr", /* name */
2052                                                            "test_obj_short-attr", /* short description */
2053                                                            "read-write  gshort TestObj.short-attr", /* longer - could do with some extra doc stuff here */
2054                                                            G_MININT, /* min */
2055 G_MAXINT, /* max */
2056 0, /* default */
2057                                                            WEBKIT_PARAM_READWRITE));
2058     g_object_class_install_property(gobjectClass,
2059                                     PROP_UNSIGNED_SHORT_ATTR,
2060                                     g_param_spec_uint("unsigned-short-attr", /* name */
2061                                                            "test_obj_unsigned-short-attr", /* short description */
2062                                                            "read-write  gushort TestObj.unsigned-short-attr", /* longer - could do with some extra doc stuff here */
2063                                                            0, /* min */
2064 G_MAXUINT, /* max */
2065 0, /* default */
2066                                                            WEBKIT_PARAM_READWRITE));
2067     g_object_class_install_property(gobjectClass,
2068                                     PROP_INT_ATTR,
2069                                     g_param_spec_long("int-attr", /* name */
2070                                                            "test_obj_int-attr", /* short description */
2071                                                            "read-write  glong TestObj.int-attr", /* longer - could do with some extra doc stuff here */
2072                                                            G_MINLONG, /* min */
2073 G_MAXLONG, /* max */
2074 0, /* default */
2075                                                            WEBKIT_PARAM_READWRITE));
2076     g_object_class_install_property(gobjectClass,
2077                                     PROP_LONG_LONG_ATTR,
2078                                     g_param_spec_int64("long-long-attr", /* name */
2079                                                            "test_obj_long-long-attr", /* short description */
2080                                                            "read-write  gint64 TestObj.long-long-attr", /* longer - could do with some extra doc stuff here */
2081                                                            G_MININT64, /* min */
2082 G_MAXINT64, /* max */
2083 0, /* default */
2084                                                            WEBKIT_PARAM_READWRITE));
2085     g_object_class_install_property(gobjectClass,
2086                                     PROP_UNSIGNED_LONG_LONG_ATTR,
2087                                     g_param_spec_uint64("unsigned-long-long-attr", /* name */
2088                                                            "test_obj_unsigned-long-long-attr", /* short description */
2089                                                            "read-write  guint64 TestObj.unsigned-long-long-attr", /* longer - could do with some extra doc stuff here */
2090                                                            0, /* min */
2091 G_MAXUINT64, /* min */
2092 0, /* default */
2093                                                            WEBKIT_PARAM_READWRITE));
2094     g_object_class_install_property(gobjectClass,
2095                                     PROP_STRING_ATTR,
2096                                     g_param_spec_string("string-attr", /* name */
2097                                                            "test_obj_string-attr", /* short description */
2098                                                            "read-write  gchar* TestObj.string-attr", /* longer - could do with some extra doc stuff here */
2099                                                            "", /* default */
2100                                                            WEBKIT_PARAM_READWRITE));
2101     g_object_class_install_property(gobjectClass,
2102                                     PROP_TEST_OBJ_ATTR,
2103                                     g_param_spec_object("test-obj-attr", /* name */
2104                                                            "test_obj_test-obj-attr", /* short description */
2105                                                            "read-write  WebKitDOMTestObj* TestObj.test-obj-attr", /* longer - could do with some extra doc stuff here */
2106                                                            WEBKIT_TYPE_DOM_TEST_OBJ, /* gobject type */
2107                                                            WEBKIT_PARAM_READWRITE));
2108     g_object_class_install_property(gobjectClass,
2109                                     PROP_XML_OBJ_ATTR,
2110                                     g_param_spec_object("xml-obj-attr", /* name */
2111                                                            "test_obj_xml-obj-attr", /* short description */
2112                                                            "read-write  WebKitDOMTestObj* TestObj.xml-obj-attr", /* longer - could do with some extra doc stuff here */
2113                                                            WEBKIT_TYPE_DOM_TEST_OBJ, /* gobject type */
2114                                                            WEBKIT_PARAM_READWRITE));
2115     g_object_class_install_property(gobjectClass,
2116                                     PROP_CREATE,
2117                                     g_param_spec_boolean("create", /* name */
2118                                                            "test_obj_create", /* short description */
2119                                                            "read-write  gboolean TestObj.create", /* longer - could do with some extra doc stuff here */
2120                                                            FALSE, /* default */
2121                                                            WEBKIT_PARAM_READWRITE));
2122     g_object_class_install_property(gobjectClass,
2123                                     PROP_REFLECTED_STRING_ATTR,
2124                                     g_param_spec_string("reflected-string-attr", /* name */
2125                                                            "test_obj_reflected-string-attr", /* short description */
2126                                                            "read-write  gchar* TestObj.reflected-string-attr", /* longer - could do with some extra doc stuff here */
2127                                                            "", /* default */
2128                                                            WEBKIT_PARAM_READWRITE));
2129     g_object_class_install_property(gobjectClass,
2130                                     PROP_REFLECTED_INTEGRAL_ATTR,
2131                                     g_param_spec_long("reflected-integral-attr", /* name */
2132                                                            "test_obj_reflected-integral-attr", /* short description */
2133                                                            "read-write  glong TestObj.reflected-integral-attr", /* longer - could do with some extra doc stuff here */
2134                                                            G_MINLONG, /* min */
2135 G_MAXLONG, /* max */
2136 0, /* default */
2137                                                            WEBKIT_PARAM_READWRITE));
2138     g_object_class_install_property(gobjectClass,
2139                                     PROP_REFLECTED_UNSIGNED_INTEGRAL_ATTR,
2140                                     g_param_spec_ulong("reflected-unsigned-integral-attr", /* name */
2141                                                            "test_obj_reflected-unsigned-integral-attr", /* short description */
2142                                                            "read-write  gulong TestObj.reflected-unsigned-integral-attr", /* longer - could do with some extra doc stuff here */
2143                                                            0, /* min */
2144 G_MAXULONG, /* max */
2145 0, /* default */
2146                                                            WEBKIT_PARAM_READWRITE));
2147     g_object_class_install_property(gobjectClass,
2148                                     PROP_REFLECTED_BOOLEAN_ATTR,
2149                                     g_param_spec_boolean("reflected-boolean-attr", /* name */
2150                                                            "test_obj_reflected-boolean-attr", /* short description */
2151                                                            "read-write  gboolean TestObj.reflected-boolean-attr", /* longer - could do with some extra doc stuff here */
2152                                                            FALSE, /* default */
2153                                                            WEBKIT_PARAM_READWRITE));
2154     g_object_class_install_property(gobjectClass,
2155                                     PROP_REFLECTED_URL_ATTR,
2156                                     g_param_spec_string("reflected-url-attr", /* name */
2157                                                            "test_obj_reflected-url-attr", /* short description */
2158                                                            "read-write  gchar* TestObj.reflected-url-attr", /* longer - could do with some extra doc stuff here */
2159                                                            "", /* default */
2160                                                            WEBKIT_PARAM_READWRITE));
2161     g_object_class_install_property(gobjectClass,
2162                                     PROP_REFLECTED_STRING_ATTR,
2163                                     g_param_spec_string("reflected-string-attr", /* name */
2164                                                            "test_obj_reflected-string-attr", /* short description */
2165                                                            "read-write  gchar* TestObj.reflected-string-attr", /* longer - could do with some extra doc stuff here */
2166                                                            "", /* default */
2167                                                            WEBKIT_PARAM_READWRITE));
2168     g_object_class_install_property(gobjectClass,
2169                                     PROP_REFLECTED_CUSTOM_INTEGRAL_ATTR,
2170                                     g_param_spec_long("reflected-custom-integral-attr", /* name */
2171                                                            "test_obj_reflected-custom-integral-attr", /* short description */
2172                                                            "read-write  glong TestObj.reflected-custom-integral-attr", /* longer - could do with some extra doc stuff here */
2173                                                            G_MINLONG, /* min */
2174 G_MAXLONG, /* max */
2175 0, /* default */
2176                                                            WEBKIT_PARAM_READWRITE));
2177     g_object_class_install_property(gobjectClass,
2178                                     PROP_REFLECTED_CUSTOM_BOOLEAN_ATTR,
2179                                     g_param_spec_boolean("reflected-custom-boolean-attr", /* name */
2180                                                            "test_obj_reflected-custom-boolean-attr", /* short description */
2181                                                            "read-write  gboolean TestObj.reflected-custom-boolean-attr", /* longer - could do with some extra doc stuff here */
2182                                                            FALSE, /* default */
2183                                                            WEBKIT_PARAM_READWRITE));
2184     g_object_class_install_property(gobjectClass,
2185                                     PROP_REFLECTED_CUSTOM_URL_ATTR,
2186                                     g_param_spec_string("reflected-custom-url-attr", /* name */
2187                                                            "test_obj_reflected-custom-url-attr", /* short description */
2188                                                            "read-write  gchar* TestObj.reflected-custom-url-attr", /* longer - could do with some extra doc stuff here */
2189                                                            "", /* default */
2190                                                            WEBKIT_PARAM_READWRITE));
2191     g_object_class_install_property(gobjectClass,
2192                                     PROP_ATTR_WITH_GETTER_EXCEPTION,
2193                                     g_param_spec_long("attr-with-getter-exception", /* name */
2194                                                            "test_obj_attr-with-getter-exception", /* short description */
2195                                                            "read-write  glong TestObj.attr-with-getter-exception", /* longer - could do with some extra doc stuff here */
2196                                                            G_MINLONG, /* min */
2197 G_MAXLONG, /* max */
2198 0, /* default */
2199                                                            WEBKIT_PARAM_READWRITE));
2200     g_object_class_install_property(gobjectClass,
2201                                     PROP_ATTR_WITH_SETTER_EXCEPTION,
2202                                     g_param_spec_long("attr-with-setter-exception", /* name */
2203                                                            "test_obj_attr-with-setter-exception", /* short description */
2204                                                            "read-write  glong TestObj.attr-with-setter-exception", /* longer - could do with some extra doc stuff here */
2205                                                            G_MINLONG, /* min */
2206 G_MAXLONG, /* max */
2207 0, /* default */
2208                                                            WEBKIT_PARAM_READWRITE));
2209     g_object_class_install_property(gobjectClass,
2210                                     PROP_STRING_ATTR_WITH_GETTER_EXCEPTION,
2211                                     g_param_spec_string("string-attr-with-getter-exception", /* name */
2212                                                            "test_obj_string-attr-with-getter-exception", /* short description */
2213                                                            "read-write  gchar* TestObj.string-attr-with-getter-exception", /* longer - could do with some extra doc stuff here */
2214                                                            "", /* default */
2215                                                            WEBKIT_PARAM_READWRITE));
2216     g_object_class_install_property(gobjectClass,
2217                                     PROP_STRING_ATTR_WITH_SETTER_EXCEPTION,
2218                                     g_param_spec_string("string-attr-with-setter-exception", /* name */
2219                                                            "test_obj_string-attr-with-setter-exception", /* short description */
2220                                                            "read-write  gchar* TestObj.string-attr-with-setter-exception", /* longer - could do with some extra doc stuff here */
2221                                                            "", /* default */
2222                                                            WEBKIT_PARAM_READWRITE));
2223     g_object_class_install_property(gobjectClass,
2224                                     PROP_WITH_SCRIPT_STATE_ATTRIBUTE,
2225                                     g_param_spec_long("with-script-state-attribute", /* name */
2226                                                            "test_obj_with-script-state-attribute", /* short description */
2227                                                            "read-write  glong TestObj.with-script-state-attribute", /* longer - could do with some extra doc stuff here */
2228                                                            G_MINLONG, /* min */
2229 G_MAXLONG, /* max */
2230 0, /* default */
2231                                                            WEBKIT_PARAM_READWRITE));
2232     g_object_class_install_property(gobjectClass,
2233                                     PROP_WITH_SCRIPT_EXECUTION_CONTEXT_ATTRIBUTE,
2234                                     g_param_spec_object("with-script-execution-context-attribute", /* name */
2235                                                            "test_obj_with-script-execution-context-attribute", /* short description */
2236                                                            "read-write  WebKitDOMTestObj* TestObj.with-script-execution-context-attribute", /* longer - could do with some extra doc stuff here */
2237                                                            WEBKIT_TYPE_DOM_TEST_OBJ, /* gobject type */
2238                                                            WEBKIT_PARAM_READWRITE));
2239     g_object_class_install_property(gobjectClass,
2240                                     PROP_WITH_SCRIPT_STATE_ATTRIBUTE_RAISES,
2241                                     g_param_spec_object("with-script-state-attribute-raises", /* name */
2242                                                            "test_obj_with-script-state-attribute-raises", /* short description */
2243                                                            "read-write  WebKitDOMTestObj* TestObj.with-script-state-attribute-raises", /* longer - could do with some extra doc stuff here */
2244                                                            WEBKIT_TYPE_DOM_TEST_OBJ, /* gobject type */
2245                                                            WEBKIT_PARAM_READWRITE));
2246     g_object_class_install_property(gobjectClass,
2247                                     PROP_WITH_SCRIPT_EXECUTION_CONTEXT_ATTRIBUTE_RAISES,
2248                                     g_param_spec_object("with-script-execution-context-attribute-raises", /* name */
2249                                                            "test_obj_with-script-execution-context-attribute-raises", /* short description */
2250                                                            "read-write  WebKitDOMTestObj* TestObj.with-script-execution-context-attribute-raises", /* longer - could do with some extra doc stuff here */
2251                                                            WEBKIT_TYPE_DOM_TEST_OBJ, /* gobject type */
2252                                                            WEBKIT_PARAM_READWRITE));
2253     g_object_class_install_property(gobjectClass,
2254                                     PROP_WITH_SCRIPT_EXECUTION_CONTEXT_AND_SCRIPT_STATE_ATTRIBUTE,
2255                                     g_param_spec_object("with-script-execution-context-and-script-state-attribute", /* name */
2256                                                            "test_obj_with-script-execution-context-and-script-state-attribute", /* short description */
2257                                                            "read-write  WebKitDOMTestObj* TestObj.with-script-execution-context-and-script-state-attribute", /* longer - could do with some extra doc stuff here */
2258                                                            WEBKIT_TYPE_DOM_TEST_OBJ, /* gobject type */
2259                                                            WEBKIT_PARAM_READWRITE));
2260     g_object_class_install_property(gobjectClass,
2261                                     PROP_WITH_SCRIPT_EXECUTION_CONTEXT_AND_SCRIPT_STATE_ATTRIBUTE_RAISES,
2262                                     g_param_spec_object("with-script-execution-context-and-script-state-attribute-raises", /* name */
2263                                                            "test_obj_with-script-execution-context-and-script-state-attribute-raises", /* short description */
2264                                                            "read-write  WebKitDOMTestObj* TestObj.with-script-execution-context-and-script-state-attribute-raises", /* longer - could do with some extra doc stuff here */
2265                                                            WEBKIT_TYPE_DOM_TEST_OBJ, /* gobject type */
2266                                                            WEBKIT_PARAM_READWRITE));
2267     g_object_class_install_property(gobjectClass,
2268                                     PROP_WITH_SCRIPT_EXECUTION_CONTEXT_AND_SCRIPT_STATE_WITH_SPACES_ATTRIBUTE,
2269                                     g_param_spec_object("with-script-execution-context-and-script-state-with-spaces-attribute", /* name */
2270                                                            "test_obj_with-script-execution-context-and-script-state-with-spaces-attribute", /* short description */
2271                                                            "read-write  WebKitDOMTestObj* TestObj.with-script-execution-context-and-script-state-with-spaces-attribute", /* longer - could do with some extra doc stuff here */
2272                                                            WEBKIT_TYPE_DOM_TEST_OBJ, /* gobject type */
2273                                                            WEBKIT_PARAM_READWRITE));
2274     g_object_class_install_property(gobjectClass,
2275                                     PROP_WITH_SCRIPT_ARGUMENTS_AND_CALL_STACK_ATTRIBUTE,
2276                                     g_param_spec_object("with-script-arguments-and-call-stack-attribute", /* name */
2277                                                            "test_obj_with-script-arguments-and-call-stack-attribute", /* short description */
2278                                                            "read-write  WebKitDOMTestObj* TestObj.with-script-arguments-and-call-stack-attribute", /* longer - could do with some extra doc stuff here */
2279                                                            WEBKIT_TYPE_DOM_TEST_OBJ, /* gobject type */
2280                                                            WEBKIT_PARAM_READWRITE));
2281 #if ENABLE(Condition1)
2282     g_object_class_install_property(gobjectClass,
2283                                     PROP_CONDITIONAL_ATTR1,
2284                                     g_param_spec_long("conditional-attr1", /* name */
2285                                                            "test_obj_conditional-attr1", /* short description */
2286                                                            "read-write  glong TestObj.conditional-attr1", /* longer - could do with some extra doc stuff here */
2287                                                            G_MINLONG, /* min */
2288 G_MAXLONG, /* max */
2289 0, /* default */
2290                                                            WEBKIT_PARAM_READWRITE));
2291 #endif /* ENABLE(Condition1) */
2292 #if ENABLE(Condition1) && ENABLE(Condition2)
2293     g_object_class_install_property(gobjectClass,
2294                                     PROP_CONDITIONAL_ATTR2,
2295                                     g_param_spec_long("conditional-attr2", /* name */
2296                                                            "test_obj_conditional-attr2", /* short description */
2297                                                            "read-write  glong TestObj.conditional-attr2", /* longer - could do with some extra doc stuff here */
2298                                                            G_MINLONG, /* min */
2299 G_MAXLONG, /* max */
2300 0, /* default */
2301                                                            WEBKIT_PARAM_READWRITE));
2302 #endif /* ENABLE(Condition1) && ENABLE(Condition2) */
2303 #if ENABLE(Condition1) || ENABLE(Condition2)
2304     g_object_class_install_property(gobjectClass,
2305                                     PROP_CONDITIONAL_ATTR3,
2306                                     g_param_spec_long("conditional-attr3", /* name */
2307                                                            "test_obj_conditional-attr3", /* short description */
2308                                                            "read-write  glong TestObj.conditional-attr3", /* longer - could do with some extra doc stuff here */
2309                                                            G_MINLONG, /* min */
2310 G_MAXLONG, /* max */
2311 0, /* default */
2312                                                            WEBKIT_PARAM_READWRITE));
2313 #endif /* ENABLE(Condition1) || ENABLE(Condition2) */
2314     g_object_class_install_property(gobjectClass,
2315                                     PROP_CONTENT_DOCUMENT,
2316                                     g_param_spec_object("content-document", /* name */
2317                                                            "test_obj_content-document", /* short description */
2318                                                            "read-only  WebKitDOMDocument* TestObj.content-document", /* longer - could do with some extra doc stuff here */
2319                                                            WEBKIT_TYPE_DOM_DOCUMENT, /* gobject type */
2320                                                            WEBKIT_PARAM_READABLE));
2321     g_object_class_install_property(gobjectClass,
2322                                     PROP_MUTABLE_POINT,
2323                                     g_param_spec_object("mutable-point", /* name */
2324                                                            "test_obj_mutable-point", /* short description */
2325                                                            "read-write  WebKitDOMSVGPoint* TestObj.mutable-point", /* longer - could do with some extra doc stuff here */
2326                                                            WEBKIT_TYPE_DOM_SVG_POINT, /* gobject type */
2327                                                            WEBKIT_PARAM_READWRITE));
2328     g_object_class_install_property(gobjectClass,
2329                                     PROP_IMMUTABLE_POINT,
2330                                     g_param_spec_object("immutable-point", /* name */
2331                                                            "test_obj_immutable-point", /* short description */
2332                                                            "read-write  WebKitDOMSVGPoint* TestObj.immutable-point", /* longer - could do with some extra doc stuff here */
2333                                                            WEBKIT_TYPE_DOM_SVG_POINT, /* gobject type */
2334                                                            WEBKIT_PARAM_READWRITE));
2335     g_object_class_install_property(gobjectClass,
2336                                     PROP_STRICT_FLOAT,
2337                                     g_param_spec_float("strict-float", /* name */
2338                                                            "test_obj_strict-float", /* short description */
2339                                                            "read-write  gfloat TestObj.strict-float", /* longer - could do with some extra doc stuff here */
2340                                                            -G_MAXFLOAT, /* min */
2341 G_MAXFLOAT, /* max */
2342 0.0, /* default */
2343                                                            WEBKIT_PARAM_READWRITE));
2344     g_object_class_install_property(gobjectClass,
2345                                     PROP_DESCRIPTION,
2346                                     g_param_spec_long("description", /* name */
2347                                                            "test_obj_description", /* short description */
2348                                                            "read-only  glong TestObj.description", /* longer - could do with some extra doc stuff here */
2349                                                            G_MINLONG, /* min */
2350 G_MAXLONG, /* max */
2351 0, /* default */
2352                                                            WEBKIT_PARAM_READABLE));
2353     g_object_class_install_property(gobjectClass,
2354                                     PROP_ID,
2355                                     g_param_spec_long("id", /* name */
2356                                                            "test_obj_id", /* short description */
2357                                                            "read-write  glong TestObj.id", /* longer - could do with some extra doc stuff here */
2358                                                            G_MINLONG, /* min */
2359 G_MAXLONG, /* max */
2360 0, /* default */
2361                                                            WEBKIT_PARAM_READWRITE));
2362     g_object_class_install_property(gobjectClass,
2363                                     PROP_HASH,
2364                                     g_param_spec_string("hash", /* name */
2365                                                            "test_obj_hash", /* short description */
2366                                                            "read-only  gchar* TestObj.hash", /* longer - could do with some extra doc stuff here */
2367                                                            "", /* default */
2368                                                            WEBKIT_PARAM_READABLE));
2369
2370
2371 }
2372
2373 static void webkit_dom_test_obj_init(WebKitDOMTestObj* request)
2374 {
2375 }
2376
2377 namespace WebKit {
2378 WebKitDOMTestObj* wrapTestObj(WebCore::TestObj* coreObject)
2379 {
2380     g_return_val_if_fail(coreObject, 0);
2381
2382     /* We call ref() rather than using a C++ smart pointer because we can't store a C++ object
2383      * in a C-allocated GObject structure.  See the finalize() code for the
2384      * matching deref().
2385      */
2386     coreObject->ref();
2387
2388     return  WEBKIT_DOM_TEST_OBJ(g_object_new(WEBKIT_TYPE_DOM_TEST_OBJ,
2389                                                "core-object", coreObject, NULL));
2390 }
2391 } // namespace WebKit