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