Home | History | Annotate | Download | only in GObject
      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 "ExceptionCode.h"
     28 #include "HTMLNames.h"
     29 #include "JSMainThreadExecState.h"
     30 #include "TestObj.h"
     31 #include "WebKitDOMBinding.h"
     32 #include "gobject/ConvertToUTF8String.h"
     33 #include "webkit/WebKitDOMIDBKey.h"
     34 #include "webkit/WebKitDOMIDBKeyPrivate.h"
     35 #include "webkit/WebKitDOMOptionsObject.h"
     36 #include "webkit/WebKitDOMOptionsObjectPrivate.h"
     37 #include "webkit/WebKitDOMSerializedScriptValue.h"
     38 #include "webkit/WebKitDOMSerializedScriptValuePrivate.h"
     39 #include "webkit/WebKitDOMTestObj.h"
     40 #include "webkit/WebKitDOMTestObjPrivate.h"
     41 #include "webkitdefines.h"
     42 #include "webkitglobalsprivate.h"
     43 #include "webkitmarshal.h"
     44 
     45 namespace WebKit {
     46 
     47 WebKitDOMTestObj* kit(WebCore::TestObj* obj)
     48 {
     49     g_return_val_if_fail(obj, 0);
     50 
     51     if (gpointer ret = DOMObjectCache::get(obj))
     52         return static_cast<WebKitDOMTestObj*>(ret);
     53 
     54     return static_cast<WebKitDOMTestObj*>(DOMObjectCache::put(obj, WebKit::wrapTestObj(obj)));
     55 }
     56 
     57 } // namespace WebKit //
     58 
     59 void
     60 webkit_dom_test_obj_void_method(WebKitDOMTestObj* self)
     61 {
     62     g_return_if_fail(self);
     63     WebCore::JSMainThreadNullState state;
     64     WebCore::TestObj * item = WebKit::core(self);
     65     item->voidMethod();
     66 }
     67 
     68 void
     69 webkit_dom_test_obj_void_method_with_args(WebKitDOMTestObj* self, glong int_arg, const gchar* str_arg, WebKitDOMTestObj* obj_arg)
     70 {
     71     g_return_if_fail(self);
     72     WebCore::JSMainThreadNullState state;
     73     WebCore::TestObj * item = WebKit::core(self);
     74     g_return_if_fail(str_arg);
     75     g_return_if_fail(obj_arg);
     76     WTF::String converted_str_arg = WTF::String::fromUTF8(str_arg);
     77     WebCore::TestObj * converted_obj_arg = NULL;
     78     if (obj_arg != NULL) {
     79         converted_obj_arg = WebKit::core(obj_arg);
     80         g_return_if_fail(converted_obj_arg);
     81     }
     82     item->voidMethodWithArgs(int_arg, converted_str_arg, converted_obj_arg);
     83 }
     84 
     85 glong
     86 webkit_dom_test_obj_int_method(WebKitDOMTestObj* self)
     87 {
     88     g_return_val_if_fail(self, 0);
     89     WebCore::JSMainThreadNullState state;
     90     WebCore::TestObj * item = WebKit::core(self);
     91     glong res = item->intMethod();
     92     return res;
     93 }
     94 
     95 glong
     96 webkit_dom_test_obj_int_method_with_args(WebKitDOMTestObj* self, glong int_arg, const gchar* str_arg, WebKitDOMTestObj* obj_arg)
     97 {
     98     g_return_val_if_fail(self, 0);
     99     WebCore::JSMainThreadNullState state;
    100     WebCore::TestObj * item = WebKit::core(self);
    101     g_return_val_if_fail(str_arg, 0);
    102     g_return_val_if_fail(obj_arg, 0);
    103     WTF::String converted_str_arg = WTF::String::fromUTF8(str_arg);
    104     WebCore::TestObj * converted_obj_arg = NULL;
    105     if (obj_arg != NULL) {
    106         converted_obj_arg = WebKit::core(obj_arg);
    107         g_return_val_if_fail(converted_obj_arg, 0);
    108     }
    109     glong res = item->intMethodWithArgs(int_arg, converted_str_arg, converted_obj_arg);
    110     return res;
    111 }
    112 
    113 WebKitDOMTestObj*
    114 webkit_dom_test_obj_obj_method(WebKitDOMTestObj* self)
    115 {
    116     g_return_val_if_fail(self, 0);
    117     WebCore::JSMainThreadNullState state;
    118     WebCore::TestObj * item = WebKit::core(self);
    119     PassRefPtr<WebCore::TestObj> g_res = WTF::getPtr(item->objMethod());
    120     WebKitDOMTestObj* res = WebKit::kit(g_res.get());
    121     return res;
    122 }
    123 
    124 WebKitDOMTestObj*
    125 webkit_dom_test_obj_obj_method_with_args(WebKitDOMTestObj* self, glong int_arg, const gchar* str_arg, WebKitDOMTestObj* obj_arg)
    126 {
    127     g_return_val_if_fail(self, 0);
    128     WebCore::JSMainThreadNullState state;
    129     WebCore::TestObj * item = WebKit::core(self);
    130     g_return_val_if_fail(str_arg, 0);
    131     g_return_val_if_fail(obj_arg, 0);
    132     WTF::String converted_str_arg = WTF::String::fromUTF8(str_arg);
    133     WebCore::TestObj * converted_obj_arg = NULL;
    134     if (obj_arg != NULL) {
    135         converted_obj_arg = WebKit::core(obj_arg);
    136         g_return_val_if_fail(converted_obj_arg, 0);
    137     }
    138     PassRefPtr<WebCore::TestObj> g_res = WTF::getPtr(item->objMethodWithArgs(int_arg, converted_str_arg, converted_obj_arg));
    139     WebKitDOMTestObj* res = WebKit::kit(g_res.get());
    140     return res;
    141 }
    142 
    143 WebKitDOMTestObj*
    144 webkit_dom_test_obj_method_that_requires_all_args(WebKitDOMTestObj* self, const gchar* str_arg, WebKitDOMTestObj* obj_arg)
    145 {
    146     g_return_val_if_fail(self, 0);
    147     WebCore::JSMainThreadNullState state;
    148     WebCore::TestObj * item = WebKit::core(self);
    149     g_return_val_if_fail(str_arg, 0);
    150     g_return_val_if_fail(obj_arg, 0);
    151     WTF::String converted_str_arg = WTF::String::fromUTF8(str_arg);
    152     WebCore::TestObj * converted_obj_arg = NULL;
    153     if (obj_arg != NULL) {
    154         converted_obj_arg = WebKit::core(obj_arg);
    155         g_return_val_if_fail(converted_obj_arg, 0);
    156     }
    157     PassRefPtr<WebCore::TestObj> g_res = WTF::getPtr(item->methodThatRequiresAllArgs(converted_str_arg, converted_obj_arg));
    158     WebKitDOMTestObj* res = WebKit::kit(g_res.get());
    159     return res;
    160 }
    161 
    162 WebKitDOMTestObj*
    163 webkit_dom_test_obj_method_that_requires_all_args_and_throws(WebKitDOMTestObj* self, const gchar* str_arg, WebKitDOMTestObj* obj_arg, GError **error)
    164 {
    165     g_return_val_if_fail(self, 0);
    166     WebCore::JSMainThreadNullState state;
    167     WebCore::TestObj * item = WebKit::core(self);
    168     g_return_val_if_fail(str_arg, 0);
    169     g_return_val_if_fail(obj_arg, 0);
    170     WTF::String converted_str_arg = WTF::String::fromUTF8(str_arg);
    171     WebCore::TestObj * converted_obj_arg = NULL;
    172     if (obj_arg != NULL) {
    173         converted_obj_arg = WebKit::core(obj_arg);
    174         g_return_val_if_fail(converted_obj_arg, 0);
    175     }
    176     WebCore::ExceptionCode ec = 0;
    177     PassRefPtr<WebCore::TestObj> g_res = WTF::getPtr(item->methodThatRequiresAllArgsAndThrows(converted_str_arg, converted_obj_arg, ec));
    178     if (ec) {
    179         WebCore::ExceptionCodeDescription ecdesc;
    180         WebCore::getExceptionCodeDescription(ec, ecdesc);
    181         g_set_error_literal(error, g_quark_from_string("WEBKIT_DOM"), ecdesc.code, ecdesc.name);
    182     }
    183     WebKitDOMTestObj* res = WebKit::kit(g_res.get());
    184     return res;
    185 }
    186 
    187 void
    188 webkit_dom_test_obj_serialized_value(WebKitDOMTestObj* self, WebKitDOMSerializedScriptValue* serialized_arg)
    189 {
    190     g_return_if_fail(self);
    191     WebCore::JSMainThreadNullState state;
    192     WebCore::TestObj * item = WebKit::core(self);
    193     g_return_if_fail(serialized_arg);
    194     WebCore::SerializedScriptValue * converted_serialized_arg = NULL;
    195     if (serialized_arg != NULL) {
    196         converted_serialized_arg = WebKit::core(serialized_arg);
    197         g_return_if_fail(converted_serialized_arg);
    198     }
    199     item->serializedValue(converted_serialized_arg);
    200 }
    201 
    202 void
    203 webkit_dom_test_obj_idb_key(WebKitDOMTestObj* self, WebKitDOMIDBKey* key)
    204 {
    205     g_return_if_fail(self);
    206     WebCore::JSMainThreadNullState state;
    207     WebCore::TestObj * item = WebKit::core(self);
    208     g_return_if_fail(key);
    209     WebCore::IDBKey * converted_key = NULL;
    210     if (key != NULL) {
    211         converted_key = WebKit::core(key);
    212         g_return_if_fail(converted_key);
    213     }
    214     item->idbKey(converted_key);
    215 }
    216 
    217 void
    218 webkit_dom_test_obj_options_object(WebKitDOMTestObj* self, WebKitDOMOptionsObject* oo, WebKitDOMOptionsObject* ooo)
    219 {
    220     g_return_if_fail(self);
    221     WebCore::JSMainThreadNullState state;
    222     WebCore::TestObj * item = WebKit::core(self);
    223     g_return_if_fail(oo);
    224     g_return_if_fail(ooo);
    225     WebCore::OptionsObject * converted_oo = NULL;
    226     if (oo != NULL) {
    227         converted_oo = WebKit::core(oo);
    228         g_return_if_fail(converted_oo);
    229     }
    230     WebCore::OptionsObject * converted_ooo = NULL;
    231     if (ooo != NULL) {
    232         converted_ooo = WebKit::core(ooo);
    233         g_return_if_fail(converted_ooo);
    234     }
    235     item->optionsObject(converted_oo, converted_ooo);
    236 }
    237 
    238 void
    239 webkit_dom_test_obj_method_with_exception(WebKitDOMTestObj* self, GError **error)
    240 {
    241     g_return_if_fail(self);
    242     WebCore::JSMainThreadNullState state;
    243     WebCore::TestObj * item = WebKit::core(self);
    244     WebCore::ExceptionCode ec = 0;
    245     item->methodWithException(ec);
    246     if (ec) {
    247         WebCore::ExceptionCodeDescription ecdesc;
    248         WebCore::getExceptionCodeDescription(ec, ecdesc);
    249         g_set_error_literal(error, g_quark_from_string("WEBKIT_DOM"), ecdesc.code, ecdesc.name);
    250     }
    251 }
    252 
    253 void
    254 webkit_dom_test_obj_with_dynamic_frame(WebKitDOMTestObj* self)
    255 {
    256     g_return_if_fail(self);
    257     WebCore::JSMainThreadNullState state;
    258     WebCore::TestObj * item = WebKit::core(self);
    259     item->withDynamicFrame();
    260 }
    261 
    262 void
    263 webkit_dom_test_obj_with_dynamic_frame_and_arg(WebKitDOMTestObj* self, glong int_arg)
    264 {
    265     g_return_if_fail(self);
    266     WebCore::JSMainThreadNullState state;
    267     WebCore::TestObj * item = WebKit::core(self);
    268     item->withDynamicFrameAndArg(int_arg);
    269 }
    270 
    271 void
    272 webkit_dom_test_obj_with_dynamic_frame_and_optional_arg(WebKitDOMTestObj* self, glong int_arg, glong optional_arg)
    273 {
    274     g_return_if_fail(self);
    275     WebCore::JSMainThreadNullState state;
    276     WebCore::TestObj * item = WebKit::core(self);
    277     item->withDynamicFrameAndOptionalArg(int_arg, optional_arg);
    278 }
    279 
    280 void
    281 webkit_dom_test_obj_with_dynamic_frame_and_user_gesture(WebKitDOMTestObj* self, glong int_arg, gboolean isUserGesture)
    282 {
    283     g_return_if_fail(self);
    284     WebCore::JSMainThreadNullState state;
    285     WebCore::TestObj * item = WebKit::core(self);
    286     item->withDynamicFrameAndUserGesture(int_arg, false);
    287 }
    288 
    289 void
    290 webkit_dom_test_obj_with_dynamic_frame_and_user_gesture_asad(WebKitDOMTestObj* self, glong int_arg, glong optional_arg, gboolean isUserGesture)
    291 {
    292     g_return_if_fail(self);
    293     WebCore::JSMainThreadNullState state;
    294     WebCore::TestObj * item = WebKit::core(self);
    295     item->withDynamicFrameAndUserGestureASAD(int_arg, optional_arg, false);
    296 }
    297 
    298 void
    299 webkit_dom_test_obj_with_script_state_void(WebKitDOMTestObj* self)
    300 {
    301     g_return_if_fail(self);
    302     WebCore::JSMainThreadNullState state;
    303     WebCore::TestObj * item = WebKit::core(self);
    304     item->withScriptStateVoid();
    305 }
    306 
    307 WebKitDOMTestObj*
    308 webkit_dom_test_obj_with_script_state_obj(WebKitDOMTestObj* self)
    309 {
    310     g_return_val_if_fail(self, 0);
    311     WebCore::JSMainThreadNullState state;
    312     WebCore::TestObj * item = WebKit::core(self);
    313     PassRefPtr<WebCore::TestObj> g_res = WTF::getPtr(item->withScriptStateObj());
    314     WebKitDOMTestObj* res = WebKit::kit(g_res.get());
    315     return res;
    316 }
    317 
    318 void
    319 webkit_dom_test_obj_with_script_state_void_exception(WebKitDOMTestObj* self, GError **error)
    320 {
    321     g_return_if_fail(self);
    322     WebCore::JSMainThreadNullState state;
    323     WebCore::TestObj * item = WebKit::core(self);
    324     WebCore::ExceptionCode ec = 0;
    325     item->withScriptStateVoidException(ec);
    326     if (ec) {
    327         WebCore::ExceptionCodeDescription ecdesc;
    328         WebCore::getExceptionCodeDescription(ec, ecdesc);
    329         g_set_error_literal(error, g_quark_from_string("WEBKIT_DOM"), ecdesc.code, ecdesc.name);
    330     }
    331 }
    332 
    333 WebKitDOMTestObj*
    334 webkit_dom_test_obj_with_script_state_obj_exception(WebKitDOMTestObj* self, GError **error)
    335 {
    336     g_return_val_if_fail(self, 0);
    337     WebCore::JSMainThreadNullState state;
    338     WebCore::TestObj * item = WebKit::core(self);
    339     WebCore::ExceptionCode ec = 0;
    340     PassRefPtr<WebCore::TestObj> g_res = WTF::getPtr(item->withScriptStateObjException(ec));
    341     if (ec) {
    342         WebCore::ExceptionCodeDescription ecdesc;
    343         WebCore::getExceptionCodeDescription(ec, ecdesc);
    344         g_set_error_literal(error, g_quark_from_string("WEBKIT_DOM"), ecdesc.code, ecdesc.name);
    345     }
    346     WebKitDOMTestObj* res = WebKit::kit(g_res.get());
    347     return res;
    348 }
    349 
    350 void
    351 webkit_dom_test_obj_with_script_execution_context(WebKitDOMTestObj* self)
    352 {
    353     g_return_if_fail(self);
    354     WebCore::JSMainThreadNullState state;
    355     WebCore::TestObj * item = WebKit::core(self);
    356     item->withScriptExecutionContext();
    357 }
    358 
    359 void
    360 webkit_dom_test_obj_method_with_optional_arg(WebKitDOMTestObj* self, glong opt)
    361 {
    362     g_return_if_fail(self);
    363     WebCore::JSMainThreadNullState state;
    364     WebCore::TestObj * item = WebKit::core(self);
    365     item->methodWithOptionalArg(opt);
    366 }
    367 
    368 void
    369 webkit_dom_test_obj_method_with_non_optional_arg_and_optional_arg(WebKitDOMTestObj* self, glong non_opt, glong opt)
    370 {
    371     g_return_if_fail(self);
    372     WebCore::JSMainThreadNullState state;
    373     WebCore::TestObj * item = WebKit::core(self);
    374     item->methodWithNonOptionalArgAndOptionalArg(non_opt, opt);
    375 }
    376 
    377 void
    378 webkit_dom_test_obj_method_with_non_optional_arg_and_two_optional_args(WebKitDOMTestObj* self, glong non_opt, glong opt1, glong opt2)
    379 {
    380     g_return_if_fail(self);
    381     WebCore::JSMainThreadNullState state;
    382     WebCore::TestObj * item = WebKit::core(self);
    383     item->methodWithNonOptionalArgAndTwoOptionalArgs(non_opt, opt1, opt2);
    384 }
    385 
    386 void
    387 webkit_dom_test_obj_class_method(WebKitDOMTestObj* self)
    388 {
    389     g_return_if_fail(self);
    390     WebCore::JSMainThreadNullState state;
    391     WebCore::TestObj * item = WebKit::core(self);
    392     item->classMethod();
    393 }
    394 
    395 glong
    396 webkit_dom_test_obj_class_method_with_optional(WebKitDOMTestObj* self, glong arg)
    397 {
    398     g_return_val_if_fail(self, 0);
    399     WebCore::JSMainThreadNullState state;
    400     WebCore::TestObj * item = WebKit::core(self);
    401     glong res = item->classMethodWithOptional(arg);
    402     return res;
    403 }
    404 
    405 glong
    406 webkit_dom_test_obj_get_read_only_int_attr(WebKitDOMTestObj* self)
    407 {
    408     g_return_val_if_fail(self, 0);
    409     WebCore::JSMainThreadNullState state;
    410     WebCore::TestObj * item = WebKit::core(self);
    411     glong res = item->readOnlyIntAttr();
    412     return res;
    413 }
    414 
    415 gchar*
    416 webkit_dom_test_obj_get_read_only_string_attr(WebKitDOMTestObj* self)
    417 {
    418     g_return_val_if_fail(self, 0);
    419     WebCore::JSMainThreadNullState state;
    420     WebCore::TestObj * item = WebKit::core(self);
    421     gchar* res = convertToUTF8String(item->readOnlyStringAttr());
    422     return res;
    423 }
    424 
    425 WebKitDOMTestObj*
    426 webkit_dom_test_obj_get_read_only_test_obj_attr(WebKitDOMTestObj* self)
    427 {
    428     g_return_val_if_fail(self, 0);
    429     WebCore::JSMainThreadNullState state;
    430     WebCore::TestObj * item = WebKit::core(self);
    431     PassRefPtr<WebCore::TestObj> g_res = WTF::getPtr(item->readOnlyTestObjAttr());
    432     WebKitDOMTestObj* res = WebKit::kit(g_res.get());
    433     return res;
    434 }
    435 
    436 gshort
    437 webkit_dom_test_obj_get_short_attr(WebKitDOMTestObj* self)
    438 {
    439     g_return_val_if_fail(self, 0);
    440     WebCore::JSMainThreadNullState state;
    441     WebCore::TestObj * item = WebKit::core(self);
    442     gshort res = item->shortAttr();
    443     return res;
    444 }
    445 
    446 void
    447 webkit_dom_test_obj_set_short_attr(WebKitDOMTestObj* self, gshort value)
    448 {
    449     g_return_if_fail(self);
    450     WebCore::JSMainThreadNullState state;
    451     WebCore::TestObj * item = WebKit::core(self);
    452     item->setShortAttr(value);
    453 }
    454 
    455 gushort
    456 webkit_dom_test_obj_get_unsigned_short_attr(WebKitDOMTestObj* self)
    457 {
    458     g_return_val_if_fail(self, 0);
    459     WebCore::JSMainThreadNullState state;
    460     WebCore::TestObj * item = WebKit::core(self);
    461     gushort res = item->unsignedShortAttr();
    462     return res;
    463 }
    464 
    465 void
    466 webkit_dom_test_obj_set_unsigned_short_attr(WebKitDOMTestObj* self, gushort value)
    467 {
    468     g_return_if_fail(self);
    469     WebCore::JSMainThreadNullState state;
    470     WebCore::TestObj * item = WebKit::core(self);
    471     item->setUnsignedShortAttr(value);
    472 }
    473 
    474 glong
    475 webkit_dom_test_obj_get_int_attr(WebKitDOMTestObj* self)
    476 {
    477     g_return_val_if_fail(self, 0);
    478     WebCore::JSMainThreadNullState state;
    479     WebCore::TestObj * item = WebKit::core(self);
    480     glong res = item->intAttr();
    481     return res;
    482 }
    483 
    484 void
    485 webkit_dom_test_obj_set_int_attr(WebKitDOMTestObj* self, glong value)
    486 {
    487     g_return_if_fail(self);
    488     WebCore::JSMainThreadNullState state;
    489     WebCore::TestObj * item = WebKit::core(self);
    490     item->setIntAttr(value);
    491 }
    492 
    493 gint64
    494 webkit_dom_test_obj_get_long_long_attr(WebKitDOMTestObj* self)
    495 {
    496     g_return_val_if_fail(self, 0);
    497     WebCore::JSMainThreadNullState state;
    498     WebCore::TestObj * item = WebKit::core(self);
    499     gint64 res = item->longLongAttr();
    500     return res;
    501 }
    502 
    503 void
    504 webkit_dom_test_obj_set_long_long_attr(WebKitDOMTestObj* self, gint64 value)
    505 {
    506     g_return_if_fail(self);
    507     WebCore::JSMainThreadNullState state;
    508     WebCore::TestObj * item = WebKit::core(self);
    509     item->setLongLongAttr(value);
    510 }
    511 
    512 guint64
    513 webkit_dom_test_obj_get_unsigned_long_long_attr(WebKitDOMTestObj* self)
    514 {
    515     g_return_val_if_fail(self, 0);
    516     WebCore::JSMainThreadNullState state;
    517     WebCore::TestObj * item = WebKit::core(self);
    518     guint64 res = item->unsignedLongLongAttr();
    519     return res;
    520 }
    521 
    522 void
    523 webkit_dom_test_obj_set_unsigned_long_long_attr(WebKitDOMTestObj* self, guint64 value)
    524 {
    525     g_return_if_fail(self);
    526     WebCore::JSMainThreadNullState state;
    527     WebCore::TestObj * item = WebKit::core(self);
    528     item->setUnsignedLongLongAttr(value);
    529 }
    530 
    531 gchar*
    532 webkit_dom_test_obj_get_string_attr(WebKitDOMTestObj* self)
    533 {
    534     g_return_val_if_fail(self, 0);
    535     WebCore::JSMainThreadNullState state;
    536     WebCore::TestObj * item = WebKit::core(self);
    537     gchar* res = convertToUTF8String(item->stringAttr());
    538     return res;
    539 }
    540 
    541 void
    542 webkit_dom_test_obj_set_string_attr(WebKitDOMTestObj* self, const gchar* value)
    543 {
    544     g_return_if_fail(self);
    545     WebCore::JSMainThreadNullState state;
    546     WebCore::TestObj * item = WebKit::core(self);
    547     g_return_if_fail(value);
    548     WTF::String converted_value = WTF::String::fromUTF8(value);
    549     item->setStringAttr(converted_value);
    550 }
    551 
    552 WebKitDOMTestObj*
    553 webkit_dom_test_obj_get_test_obj_attr(WebKitDOMTestObj* self)
    554 {
    555     g_return_val_if_fail(self, 0);
    556     WebCore::JSMainThreadNullState state;
    557     WebCore::TestObj * item = WebKit::core(self);
    558     PassRefPtr<WebCore::TestObj> g_res = WTF::getPtr(item->testObjAttr());
    559     WebKitDOMTestObj* res = WebKit::kit(g_res.get());
    560     return res;
    561 }
    562 
    563 void
    564 webkit_dom_test_obj_set_test_obj_attr(WebKitDOMTestObj* self, WebKitDOMTestObj* value)
    565 {
    566     g_return_if_fail(self);
    567     WebCore::JSMainThreadNullState state;
    568     WebCore::TestObj * item = WebKit::core(self);
    569     g_return_if_fail(value);
    570     WebCore::TestObj * converted_value = NULL;
    571     if (value != NULL) {
    572         converted_value = WebKit::core(value);
    573         g_return_if_fail(converted_value);
    574     }
    575     item->setTestObjAttr(converted_value);
    576 }
    577 
    578 WebKitDOMTestObj*
    579 webkit_dom_test_obj_get_xml_obj_attr(WebKitDOMTestObj* self)
    580 {
    581     g_return_val_if_fail(self, 0);
    582     WebCore::JSMainThreadNullState state;
    583     WebCore::TestObj * item = WebKit::core(self);
    584     PassRefPtr<WebCore::TestObj> g_res = WTF::getPtr(item->xmlObjAttr());
    585     WebKitDOMTestObj* res = WebKit::kit(g_res.get());
    586     return res;
    587 }
    588 
    589 void
    590 webkit_dom_test_obj_set_xml_obj_attr(WebKitDOMTestObj* self, WebKitDOMTestObj* value)
    591 {
    592     g_return_if_fail(self);
    593     WebCore::JSMainThreadNullState state;
    594     WebCore::TestObj * item = WebKit::core(self);
    595     g_return_if_fail(value);
    596     WebCore::TestObj * converted_value = NULL;
    597     if (value != NULL) {
    598         converted_value = WebKit::core(value);
    599         g_return_if_fail(converted_value);
    600     }
    601     item->setXMLObjAttr(converted_value);
    602 }
    603 
    604 gboolean
    605 webkit_dom_test_obj_get_create(WebKitDOMTestObj* self)
    606 {
    607     g_return_val_if_fail(self, 0);
    608     WebCore::JSMainThreadNullState state;
    609     WebCore::TestObj * item = WebKit::core(self);
    610     gboolean res = item->isCreate();
    611     return res;
    612 }
    613 
    614 void
    615 webkit_dom_test_obj_set_create(WebKitDOMTestObj* self, gboolean value)
    616 {
    617     g_return_if_fail(self);
    618     WebCore::JSMainThreadNullState state;
    619     WebCore::TestObj * item = WebKit::core(self);
    620     item->setCreate(value);
    621 }
    622 
    623 gchar*
    624 webkit_dom_test_obj_get_reflected_string_attr(WebKitDOMTestObj* self)
    625 {
    626     g_return_val_if_fail(self, 0);
    627     WebCore::JSMainThreadNullState state;
    628     WebCore::TestObj * item = WebKit::core(self);
    629     gchar* res = convertToUTF8String(item->getAttribute(WebCore::HTMLNames::reflectedstringattrAttr));
    630     return res;
    631 }
    632 
    633 void
    634 webkit_dom_test_obj_set_reflected_string_attr(WebKitDOMTestObj* self, const gchar* value)
    635 {
    636     g_return_if_fail(self);
    637     WebCore::JSMainThreadNullState state;
    638     WebCore::TestObj * item = WebKit::core(self);
    639     g_return_if_fail(value);
    640     WTF::String converted_value = WTF::String::fromUTF8(value);
    641     item->setAttribute(WebCore::HTMLNames::reflectedstringattrAttr, converted_value);
    642 }
    643 
    644 glong
    645 webkit_dom_test_obj_get_reflected_integral_attr(WebKitDOMTestObj* self)
    646 {
    647     g_return_val_if_fail(self, 0);
    648     WebCore::JSMainThreadNullState state;
    649     WebCore::TestObj * item = WebKit::core(self);
    650     glong res = item->getIntegralAttribute(WebCore::HTMLNames::reflectedintegralattrAttr);
    651     return res;
    652 }
    653 
    654 void
    655 webkit_dom_test_obj_set_reflected_integral_attr(WebKitDOMTestObj* self, glong value)
    656 {
    657     g_return_if_fail(self);
    658     WebCore::JSMainThreadNullState state;
    659     WebCore::TestObj * item = WebKit::core(self);
    660     item->setIntegralAttribute(WebCore::HTMLNames::reflectedintegralattrAttr, value);
    661 }
    662 
    663 gulong
    664 webkit_dom_test_obj_get_reflected_unsigned_integral_attr(WebKitDOMTestObj* self)
    665 {
    666     g_return_val_if_fail(self, 0);
    667     WebCore::JSMainThreadNullState state;
    668     WebCore::TestObj * item = WebKit::core(self);
    669     gulong res = item->getUnsignedIntegralAttribute(WebCore::HTMLNames::reflectedunsignedintegralattrAttr);
    670     return res;
    671 }
    672 
    673 void
    674 webkit_dom_test_obj_set_reflected_unsigned_integral_attr(WebKitDOMTestObj* self, gulong value)
    675 {
    676     g_return_if_fail(self);
    677     WebCore::JSMainThreadNullState state;
    678     WebCore::TestObj * item = WebKit::core(self);
    679     item->setUnsignedIntegralAttribute(WebCore::HTMLNames::reflectedunsignedintegralattrAttr, value);
    680 }
    681 
    682 gboolean
    683 webkit_dom_test_obj_get_reflected_boolean_attr(WebKitDOMTestObj* self)
    684 {
    685     g_return_val_if_fail(self, 0);
    686     WebCore::JSMainThreadNullState state;
    687     WebCore::TestObj * item = WebKit::core(self);
    688     gboolean res = item->hasAttribute(WebCore::HTMLNames::reflectedbooleanattrAttr);
    689     return res;
    690 }
    691 
    692 void
    693 webkit_dom_test_obj_set_reflected_boolean_attr(WebKitDOMTestObj* self, gboolean value)
    694 {
    695     g_return_if_fail(self);
    696     WebCore::JSMainThreadNullState state;
    697     WebCore::TestObj * item = WebKit::core(self);
    698     item->setBooleanAttribute(WebCore::HTMLNames::reflectedbooleanattrAttr, value);
    699 }
    700 
    701 gchar*
    702 webkit_dom_test_obj_get_reflected_url_attr(WebKitDOMTestObj* self)
    703 {
    704     g_return_val_if_fail(self, 0);
    705     WebCore::JSMainThreadNullState state;
    706     WebCore::TestObj * item = WebKit::core(self);
    707     gchar* res = convertToUTF8String(item->getURLAttribute(WebCore::HTMLNames::reflectedurlattrAttr));
    708     return res;
    709 }
    710 
    711 void
    712 webkit_dom_test_obj_set_reflected_url_attr(WebKitDOMTestObj* self, const gchar* value)
    713 {
    714     g_return_if_fail(self);
    715     WebCore::JSMainThreadNullState state;
    716     WebCore::TestObj * item = WebKit::core(self);
    717     g_return_if_fail(value);
    718     WTF::String converted_value = WTF::String::fromUTF8(value);
    719     item->setAttribute(WebCore::HTMLNames::reflectedurlattrAttr, converted_value);
    720 }
    721 
    722 gchar*
    723 webkit_dom_test_obj_get_reflected_non_empty_url_attr(WebKitDOMTestObj* self)
    724 {
    725     g_return_val_if_fail(self, 0);
    726     WebCore::JSMainThreadNullState state;
    727     WebCore::TestObj * item = WebKit::core(self);
    728     gchar* res = convertToUTF8String(item->getNonEmptyURLAttribute(WebCore::HTMLNames::reflectednonemptyurlattrAttr));
    729     return res;
    730 }
    731 
    732 void
    733 webkit_dom_test_obj_set_reflected_non_empty_url_attr(WebKitDOMTestObj* self, const gchar* value)
    734 {
    735     g_return_if_fail(self);
    736     WebCore::JSMainThreadNullState state;
    737     WebCore::TestObj * item = WebKit::core(self);
    738     g_return_if_fail(value);
    739     WTF::String converted_value = WTF::String::fromUTF8(value);
    740     item->setAttribute(WebCore::HTMLNames::reflectednonemptyurlattrAttr, converted_value);
    741 }
    742 
    743 gchar*
    744 webkit_dom_test_obj_get_reflected_string_attr(WebKitDOMTestObj* self)
    745 {
    746     g_return_val_if_fail(self, 0);
    747     WebCore::JSMainThreadNullState state;
    748     WebCore::TestObj * item = WebKit::core(self);
    749     gchar* res = convertToUTF8String(item->getAttribute(WebCore::HTMLNames::customContentStringAttrAttr));
    750     return res;
    751 }
    752 
    753 void
    754 webkit_dom_test_obj_set_reflected_string_attr(WebKitDOMTestObj* self, const gchar* value)
    755 {
    756     g_return_if_fail(self);
    757     WebCore::JSMainThreadNullState state;
    758     WebCore::TestObj * item = WebKit::core(self);
    759     g_return_if_fail(value);
    760     WTF::String converted_value = WTF::String::fromUTF8(value);
    761     item->setAttribute(WebCore::HTMLNames::customContentStringAttrAttr, converted_value);
    762 }
    763 
    764 glong
    765 webkit_dom_test_obj_get_reflected_custom_integral_attr(WebKitDOMTestObj* self)
    766 {
    767     g_return_val_if_fail(self, 0);
    768     WebCore::JSMainThreadNullState state;
    769     WebCore::TestObj * item = WebKit::core(self);
    770     glong res = item->getIntegralAttribute(WebCore::HTMLNames::customContentIntegralAttrAttr);
    771     return res;
    772 }
    773 
    774 void
    775 webkit_dom_test_obj_set_reflected_custom_integral_attr(WebKitDOMTestObj* self, glong value)
    776 {
    777     g_return_if_fail(self);
    778     WebCore::JSMainThreadNullState state;
    779     WebCore::TestObj * item = WebKit::core(self);
    780     item->setIntegralAttribute(WebCore::HTMLNames::customContentIntegralAttrAttr, value);
    781 }
    782 
    783 gboolean
    784 webkit_dom_test_obj_get_reflected_custom_boolean_attr(WebKitDOMTestObj* self)
    785 {
    786     g_return_val_if_fail(self, 0);
    787     WebCore::JSMainThreadNullState state;
    788     WebCore::TestObj * item = WebKit::core(self);
    789     gboolean res = item->hasAttribute(WebCore::HTMLNames::customContentBooleanAttrAttr);
    790     return res;
    791 }
    792 
    793 void
    794 webkit_dom_test_obj_set_reflected_custom_boolean_attr(WebKitDOMTestObj* self, gboolean value)
    795 {
    796     g_return_if_fail(self);
    797     WebCore::JSMainThreadNullState state;
    798     WebCore::TestObj * item = WebKit::core(self);
    799     item->setBooleanAttribute(WebCore::HTMLNames::customContentBooleanAttrAttr, value);
    800 }
    801 
    802 gchar*
    803 webkit_dom_test_obj_get_reflected_custom_url_attr(WebKitDOMTestObj* self)
    804 {
    805     g_return_val_if_fail(self, 0);
    806     WebCore::JSMainThreadNullState state;
    807     WebCore::TestObj * item = WebKit::core(self);
    808     gchar* res = convertToUTF8String(item->getURLAttribute(WebCore::HTMLNames::customContentURLAttrAttr));
    809     return res;
    810 }
    811 
    812 void
    813 webkit_dom_test_obj_set_reflected_custom_url_attr(WebKitDOMTestObj* self, const gchar* value)
    814 {
    815     g_return_if_fail(self);
    816     WebCore::JSMainThreadNullState state;
    817     WebCore::TestObj * item = WebKit::core(self);
    818     g_return_if_fail(value);
    819     WTF::String converted_value = WTF::String::fromUTF8(value);
    820     item->setAttribute(WebCore::HTMLNames::customContentURLAttrAttr, converted_value);
    821 }
    822 
    823 gchar*
    824 webkit_dom_test_obj_get_reflected_custom_non_empty_url_attr(WebKitDOMTestObj* self)
    825 {
    826     g_return_val_if_fail(self, 0);
    827     WebCore::JSMainThreadNullState state;
    828     WebCore::TestObj * item = WebKit::core(self);
    829     gchar* res = convertToUTF8String(item->getNonEmptyURLAttribute(WebCore::HTMLNames::customContentNonEmptyURLAttrAttr));
    830     return res;
    831 }
    832 
    833 void
    834 webkit_dom_test_obj_set_reflected_custom_non_empty_url_attr(WebKitDOMTestObj* self, const gchar* value)
    835 {
    836     g_return_if_fail(self);
    837     WebCore::JSMainThreadNullState state;
    838     WebCore::TestObj * item = WebKit::core(self);
    839     g_return_if_fail(value);
    840     WTF::String converted_value = WTF::String::fromUTF8(value);
    841     item->setAttribute(WebCore::HTMLNames::customContentNonEmptyURLAttrAttr, converted_value);
    842 }
    843 
    844 glong
    845 webkit_dom_test_obj_get_attr_with_getter_exception(WebKitDOMTestObj* self, GError **error)
    846 {
    847     g_return_val_if_fail(self, 0);
    848     WebCore::JSMainThreadNullState state;
    849     WebCore::TestObj * item = WebKit::core(self);
    850     WebCore::ExceptionCode ec = 0;
    851     glong res = item->attrWithGetterException(ec);
    852     if (ec) {
    853         WebCore::ExceptionCodeDescription ecdesc;
    854         WebCore::getExceptionCodeDescription(ec, ecdesc);
    855         g_set_error_literal(error, g_quark_from_string("WEBKIT_DOM"), ecdesc.code, ecdesc.name);
    856     }
    857     return res;
    858 }
    859 
    860 void
    861 webkit_dom_test_obj_set_attr_with_getter_exception(WebKitDOMTestObj* self, glong value, GError **error)
    862 {
    863     g_return_if_fail(self);
    864     WebCore::JSMainThreadNullState state;
    865     WebCore::TestObj * item = WebKit::core(self);
    866     WebCore::ExceptionCode ec = 0;
    867     item->setAttrWithGetterException(value, ec);
    868     if (ec) {
    869         WebCore::ExceptionCodeDescription ecdesc;
    870         WebCore::getExceptionCodeDescription(ec, ecdesc);
    871         g_set_error_literal(error, g_quark_from_string("WEBKIT_DOM"), ecdesc.code, ecdesc.name);
    872     }
    873 }
    874 
    875 glong
    876 webkit_dom_test_obj_get_attr_with_setter_exception(WebKitDOMTestObj* self)
    877 {
    878     g_return_val_if_fail(self, 0);
    879     WebCore::JSMainThreadNullState state;
    880     WebCore::TestObj * item = WebKit::core(self);
    881     glong res = item->attrWithSetterException();
    882     return res;
    883 }
    884 
    885 void
    886 webkit_dom_test_obj_set_attr_with_setter_exception(WebKitDOMTestObj* self, glong value, GError **error)
    887 {
    888     g_return_if_fail(self);
    889     WebCore::JSMainThreadNullState state;
    890     WebCore::TestObj * item = WebKit::core(self);
    891     WebCore::ExceptionCode ec = 0;
    892     item->setAttrWithSetterException(value, ec);
    893     if (ec) {
    894         WebCore::ExceptionCodeDescription ecdesc;
    895         WebCore::getExceptionCodeDescription(ec, ecdesc);
    896         g_set_error_literal(error, g_quark_from_string("WEBKIT_DOM"), ecdesc.code, ecdesc.name);
    897     }
    898 }
    899 
    900 gchar*
    901 webkit_dom_test_obj_get_string_attr_with_getter_exception(WebKitDOMTestObj* self, GError **error)
    902 {
    903     g_return_val_if_fail(self, 0);
    904     WebCore::JSMainThreadNullState state;
    905     WebCore::TestObj * item = WebKit::core(self);
    906     WebCore::ExceptionCode ec = 0;
    907     gchar* res = convertToUTF8String(item->stringAttrWithGetterException(ec));
    908     return res;
    909 }
    910 
    911 void
    912 webkit_dom_test_obj_set_string_attr_with_getter_exception(WebKitDOMTestObj* self, const gchar* value, GError **error)
    913 {
    914     g_return_if_fail(self);
    915     WebCore::JSMainThreadNullState state;
    916     WebCore::TestObj * item = WebKit::core(self);
    917     g_return_if_fail(value);
    918     WTF::String converted_value = WTF::String::fromUTF8(value);
    919     WebCore::ExceptionCode ec = 0;
    920     item->setStringAttrWithGetterException(converted_value, ec);
    921     if (ec) {
    922         WebCore::ExceptionCodeDescription ecdesc;
    923         WebCore::getExceptionCodeDescription(ec, ecdesc);
    924         g_set_error_literal(error, g_quark_from_string("WEBKIT_DOM"), ecdesc.code, ecdesc.name);
    925     }
    926 }
    927 
    928 gchar*
    929 webkit_dom_test_obj_get_string_attr_with_setter_exception(WebKitDOMTestObj* self)
    930 {
    931     g_return_val_if_fail(self, 0);
    932     WebCore::JSMainThreadNullState state;
    933     WebCore::TestObj * item = WebKit::core(self);
    934     gchar* res = convertToUTF8String(item->stringAttrWithSetterException());
    935     return res;
    936 }
    937 
    938 void
    939 webkit_dom_test_obj_set_string_attr_with_setter_exception(WebKitDOMTestObj* self, const gchar* value, GError **error)
    940 {
    941     g_return_if_fail(self);
    942     WebCore::JSMainThreadNullState state;
    943     WebCore::TestObj * item = WebKit::core(self);
    944     g_return_if_fail(value);
    945     WTF::String converted_value = WTF::String::fromUTF8(value);
    946     WebCore::ExceptionCode ec = 0;
    947     item->setStringAttrWithSetterException(converted_value, ec);
    948     if (ec) {
    949         WebCore::ExceptionCodeDescription ecdesc;
    950         WebCore::getExceptionCodeDescription(ec, ecdesc);
    951         g_set_error_literal(error, g_quark_from_string("WEBKIT_DOM"), ecdesc.code, ecdesc.name);
    952     }
    953 }
    954 
    955 gchar*
    956 webkit_dom_test_obj_get_script_string_attr(WebKitDOMTestObj* self)
    957 {
    958     g_return_val_if_fail(self, 0);
    959     WebCore::JSMainThreadNullState state;
    960     WebCore::TestObj * item = WebKit::core(self);
    961     gchar* res = convertToUTF8String(item->scriptStringAttr());
    962     return res;
    963 }
    964 
    965 glong
    966 webkit_dom_test_obj_get_conditional_attr1(WebKitDOMTestObj* self)
    967 {
    968 #if ENABLE(Condition1)
    969     g_return_val_if_fail(self, 0);
    970     WebCore::JSMainThreadNullState state;
    971     WebCore::TestObj * item = WebKit::core(self);
    972     glong res = item->conditionalAttr1();
    973     return res;
    974 #else
    975     return static_cast<glong>(0);
    976 #endif /* ENABLE(Condition1) */
    977 }
    978 
    979 void
    980 webkit_dom_test_obj_set_conditional_attr1(WebKitDOMTestObj* self, glong value)
    981 {
    982 #if ENABLE(Condition1)
    983     g_return_if_fail(self);
    984     WebCore::JSMainThreadNullState state;
    985     WebCore::TestObj * item = WebKit::core(self);
    986     item->setConditionalAttr1(value);
    987 #endif /* ENABLE(Condition1) */
    988 }
    989 
    990 glong
    991 webkit_dom_test_obj_get_conditional_attr2(WebKitDOMTestObj* self)
    992 {
    993 #if ENABLE(Condition1) && ENABLE(Condition2)
    994     g_return_val_if_fail(self, 0);
    995     WebCore::JSMainThreadNullState state;
    996     WebCore::TestObj * item = WebKit::core(self);
    997     glong res = item->conditionalAttr2();
    998     return res;
    999 #else
   1000     return static_cast<glong>(0);
   1001 #endif /* ENABLE(Condition1) && ENABLE(Condition2) */
   1002 }
   1003 
   1004 void
   1005 webkit_dom_test_obj_set_conditional_attr2(WebKitDOMTestObj* self, glong value)
   1006 {
   1007 #if ENABLE(Condition1) && ENABLE(Condition2)
   1008     g_return_if_fail(self);
   1009     WebCore::JSMainThreadNullState state;
   1010     WebCore::TestObj * item = WebKit::core(self);
   1011     item->setConditionalAttr2(value);
   1012 #endif /* ENABLE(Condition1) && ENABLE(Condition2) */
   1013 }
   1014 
   1015 glong
   1016 webkit_dom_test_obj_get_conditional_attr3(WebKitDOMTestObj* self)
   1017 {
   1018 #if ENABLE(Condition1) || ENABLE(Condition2)
   1019     g_return_val_if_fail(self, 0);
   1020     WebCore::JSMainThreadNullState state;
   1021     WebCore::TestObj * item = WebKit::core(self);
   1022     glong res = item->conditionalAttr3();
   1023     return res;
   1024 #else
   1025     return static_cast<glong>(0);
   1026 #endif /* ENABLE(Condition1) || ENABLE(Condition2) */
   1027 }
   1028 
   1029 void
   1030 webkit_dom_test_obj_set_conditional_attr3(WebKitDOMTestObj* self, glong value)
   1031 {
   1032 #if ENABLE(Condition1) || ENABLE(Condition2)
   1033     g_return_if_fail(self);
   1034     WebCore::JSMainThreadNullState state;
   1035     WebCore::TestObj * item = WebKit::core(self);
   1036     item->setConditionalAttr3(value);
   1037 #endif /* ENABLE(Condition1) || ENABLE(Condition2) */
   1038 }
   1039 
   1040 glong
   1041 webkit_dom_test_obj_get_description(WebKitDOMTestObj* self)
   1042 {
   1043     g_return_val_if_fail(self, 0);
   1044     WebCore::JSMainThreadNullState state;
   1045     WebCore::TestObj * item = WebKit::core(self);
   1046     glong res = item->description();
   1047     return res;
   1048 }
   1049 
   1050 glong
   1051 webkit_dom_test_obj_get_id(WebKitDOMTestObj* self)
   1052 {
   1053     g_return_val_if_fail(self, 0);
   1054     WebCore::JSMainThreadNullState state;
   1055     WebCore::TestObj * item = WebKit::core(self);
   1056     glong res = item->id();
   1057     return res;
   1058 }
   1059 
   1060 void
   1061 webkit_dom_test_obj_set_id(WebKitDOMTestObj* self, glong value)
   1062 {
   1063     g_return_if_fail(self);
   1064     WebCore::JSMainThreadNullState state;
   1065     WebCore::TestObj * item = WebKit::core(self);
   1066     item->setId(value);
   1067 }
   1068 
   1069 gchar*
   1070 webkit_dom_test_obj_get_hash(WebKitDOMTestObj* self)
   1071 {
   1072     g_return_val_if_fail(self, 0);
   1073     WebCore::JSMainThreadNullState state;
   1074     WebCore::TestObj * item = WebKit::core(self);
   1075     gchar* res = convertToUTF8String(item->hash());
   1076     return res;
   1077 }
   1078 
   1079 
   1080 G_DEFINE_TYPE(WebKitDOMTestObj, webkit_dom_test_obj, WEBKIT_TYPE_DOM_OBJECT)
   1081 
   1082 namespace WebKit {
   1083 
   1084 WebCore::TestObj* core(WebKitDOMTestObj* request)
   1085 {
   1086     g_return_val_if_fail(request, 0);
   1087 
   1088     WebCore::TestObj* coreObject = static_cast<WebCore::TestObj*>(WEBKIT_DOM_OBJECT(request)->coreObject);
   1089     g_return_val_if_fail(coreObject, 0);
   1090 
   1091     return coreObject;
   1092 }
   1093 
   1094 } // namespace WebKit
   1095 enum {
   1096     PROP_0,
   1097     PROP_READ_ONLY_INT_ATTR,
   1098     PROP_READ_ONLY_STRING_ATTR,
   1099     PROP_READ_ONLY_TEST_OBJ_ATTR,
   1100     PROP_SHORT_ATTR,
   1101     PROP_UNSIGNED_SHORT_ATTR,
   1102     PROP_INT_ATTR,
   1103     PROP_LONG_LONG_ATTR,
   1104     PROP_UNSIGNED_LONG_LONG_ATTR,
   1105     PROP_STRING_ATTR,
   1106     PROP_TEST_OBJ_ATTR,
   1107     PROP_XML_OBJ_ATTR,
   1108     PROP_CREATE,
   1109     PROP_REFLECTED_STRING_ATTR,
   1110     PROP_REFLECTED_INTEGRAL_ATTR,
   1111     PROP_REFLECTED_UNSIGNED_INTEGRAL_ATTR,
   1112     PROP_REFLECTED_BOOLEAN_ATTR,
   1113     PROP_REFLECTED_URL_ATTR,
   1114     PROP_REFLECTED_NON_EMPTY_URL_ATTR,
   1115     PROP_REFLECTED_STRING_ATTR,
   1116     PROP_REFLECTED_CUSTOM_INTEGRAL_ATTR,
   1117     PROP_REFLECTED_CUSTOM_BOOLEAN_ATTR,
   1118     PROP_REFLECTED_CUSTOM_URL_ATTR,
   1119     PROP_REFLECTED_CUSTOM_NON_EMPTY_URL_ATTR,
   1120     PROP_ATTR_WITH_GETTER_EXCEPTION,
   1121     PROP_ATTR_WITH_SETTER_EXCEPTION,
   1122     PROP_STRING_ATTR_WITH_GETTER_EXCEPTION,
   1123     PROP_STRING_ATTR_WITH_SETTER_EXCEPTION,
   1124     PROP_CUSTOM_ATTR,
   1125     PROP_SCRIPT_STRING_ATTR,
   1126 #if ENABLE(Condition1)
   1127     PROP_CONDITIONAL_ATTR1,
   1128 #endif /* ENABLE(Condition1) */
   1129 #if ENABLE(Condition1) && ENABLE(Condition2)
   1130     PROP_CONDITIONAL_ATTR2,
   1131 #endif /* ENABLE(Condition1) && ENABLE(Condition2) */
   1132 #if ENABLE(Condition1) || ENABLE(Condition2)
   1133     PROP_CONDITIONAL_ATTR3,
   1134 #endif /* ENABLE(Condition1) || ENABLE(Condition2) */
   1135     PROP_DESCRIPTION,
   1136     PROP_ID,
   1137     PROP_HASH,
   1138 };
   1139 
   1140 
   1141 static void webkit_dom_test_obj_finalize(GObject* object)
   1142 {
   1143     WebKitDOMObject* dom_object = WEBKIT_DOM_OBJECT(object);
   1144 
   1145     if (dom_object->coreObject) {
   1146         WebCore::TestObj* coreObject = static_cast<WebCore::TestObj *>(dom_object->coreObject);
   1147 
   1148         WebKit::DOMObjectCache::forget(coreObject);
   1149         coreObject->deref();
   1150 
   1151         dom_object->coreObject = NULL;
   1152     }
   1153 
   1154     G_OBJECT_CLASS(webkit_dom_test_obj_parent_class)->finalize(object);
   1155 }
   1156 
   1157 static void webkit_dom_test_obj_set_property(GObject* object, guint prop_id, const GValue* value, GParamSpec* pspec)
   1158 {
   1159     WebCore::JSMainThreadNullState state;
   1160     WebKitDOMTestObj* self = WEBKIT_DOM_TEST_OBJ(object);
   1161     WebCore::TestObj* coreSelf = WebKit::core(self);
   1162     switch (prop_id) {
   1163     case PROP_UNSIGNED_SHORT_ATTR:
   1164     {
   1165         coreSelf->setUnsignedShortAttr((g_value_get_ushort(value)));
   1166         break;
   1167     }
   1168     case PROP_INT_ATTR:
   1169     {
   1170         coreSelf->setIntAttr((g_value_get_long(value)));
   1171         break;
   1172     }
   1173     case PROP_UNSIGNED_LONG_LONG_ATTR:
   1174     {
   1175         coreSelf->setUnsignedLongLongAttr((g_value_get_uint64(value)));
   1176         break;
   1177     }
   1178     case PROP_STRING_ATTR:
   1179     {
   1180         coreSelf->setStringAttr(WTF::String::fromUTF8(g_value_get_string(value)));
   1181         break;
   1182     }
   1183     case PROP_CREATE:
   1184     {
   1185         coreSelf->setCreate((g_value_get_boolean(value)));
   1186         break;
   1187     }
   1188     case PROP_REFLECTED_STRING_ATTR:
   1189     {
   1190         coreSelf->setAttribute(WebCore::HTMLNames::reflectedstringattrAttr, WTF::String::fromUTF8(g_value_get_string(value)));
   1191         break;
   1192     }
   1193     case PROP_REFLECTED_INTEGRAL_ATTR:
   1194     {
   1195         coreSelf->setIntegralAttribute(WebCore::HTMLNames::reflectedintegralattrAttr, (g_value_get_long(value)));
   1196         break;
   1197     }
   1198     case PROP_REFLECTED_UNSIGNED_INTEGRAL_ATTR:
   1199     {
   1200         coreSelf->setUnsignedIntegralAttribute(WebCore::HTMLNames::reflectedunsignedintegralattrAttr, (g_value_get_ulong(value)));
   1201         break;
   1202     }
   1203     case PROP_REFLECTED_BOOLEAN_ATTR:
   1204     {
   1205         coreSelf->setBooleanAttribute(WebCore::HTMLNames::reflectedbooleanattrAttr, (g_value_get_boolean(value)));
   1206         break;
   1207     }
   1208     case PROP_REFLECTED_URL_ATTR:
   1209     {
   1210         coreSelf->setAttribute(WebCore::HTMLNames::reflectedurlattrAttr, WTF::String::fromUTF8(g_value_get_string(value)));
   1211         break;
   1212     }
   1213     case PROP_REFLECTED_NON_EMPTY_URL_ATTR:
   1214     {
   1215         coreSelf->setAttribute(WebCore::HTMLNames::reflectednonemptyurlattrAttr, WTF::String::fromUTF8(g_value_get_string(value)));
   1216         break;
   1217     }
   1218     case PROP_REFLECTED_STRING_ATTR:
   1219     {
   1220         coreSelf->setAttribute(WebCore::HTMLNames::customContentStringAttrAttr, WTF::String::fromUTF8(g_value_get_string(value)));
   1221         break;
   1222     }
   1223     case PROP_REFLECTED_CUSTOM_INTEGRAL_ATTR:
   1224     {
   1225         coreSelf->setIntegralAttribute(WebCore::HTMLNames::customContentIntegralAttrAttr, (g_value_get_long(value)));
   1226         break;
   1227     }
   1228     case PROP_REFLECTED_CUSTOM_BOOLEAN_ATTR:
   1229     {
   1230         coreSelf->setBooleanAttribute(WebCore::HTMLNames::customContentBooleanAttrAttr, (g_value_get_boolean(value)));
   1231         break;
   1232     }
   1233     case PROP_REFLECTED_CUSTOM_URL_ATTR:
   1234     {
   1235         coreSelf->setAttribute(WebCore::HTMLNames::customContentURLAttrAttr, WTF::String::fromUTF8(g_value_get_string(value)));
   1236         break;
   1237     }
   1238     case PROP_REFLECTED_CUSTOM_NON_EMPTY_URL_ATTR:
   1239     {
   1240         coreSelf->setAttribute(WebCore::HTMLNames::customContentNonEmptyURLAttrAttr, WTF::String::fromUTF8(g_value_get_string(value)));
   1241         break;
   1242     }
   1243     case PROP_ATTR_WITH_GETTER_EXCEPTION:
   1244     {
   1245         WebCore::ExceptionCode ec = 0;
   1246         coreSelf->setAttrWithGetterException((g_value_get_long(value)), ec);
   1247         break;
   1248     }
   1249     case PROP_ATTR_WITH_SETTER_EXCEPTION:
   1250     {
   1251         WebCore::ExceptionCode ec = 0;
   1252         coreSelf->setAttrWithSetterException((g_value_get_long(value)), ec);
   1253         break;
   1254     }
   1255     case PROP_STRING_ATTR_WITH_GETTER_EXCEPTION:
   1256     {
   1257         WebCore::ExceptionCode ec = 0;
   1258         coreSelf->setStringAttrWithGetterException(WTF::String::fromUTF8(g_value_get_string(value)), ec);
   1259         break;
   1260     }
   1261     case PROP_STRING_ATTR_WITH_SETTER_EXCEPTION:
   1262     {
   1263         WebCore::ExceptionCode ec = 0;
   1264         coreSelf->setStringAttrWithSetterException(WTF::String::fromUTF8(g_value_get_string(value)), ec);
   1265         break;
   1266     }
   1267 #if ENABLE(Condition1)
   1268     case PROP_CONDITIONAL_ATTR1:
   1269     {
   1270         coreSelf->setConditionalAttr1((g_value_get_long(value)));
   1271         break;
   1272     }
   1273 #endif /* ENABLE(Condition1) */
   1274 #if ENABLE(Condition1) && ENABLE(Condition2)
   1275     case PROP_CONDITIONAL_ATTR2:
   1276     {
   1277         coreSelf->setConditionalAttr2((g_value_get_long(value)));
   1278         break;
   1279     }
   1280 #endif /* ENABLE(Condition1) && ENABLE(Condition2) */
   1281 #if ENABLE(Condition1) || ENABLE(Condition2)
   1282     case PROP_CONDITIONAL_ATTR3:
   1283     {
   1284         coreSelf->setConditionalAttr3((g_value_get_long(value)));
   1285         break;
   1286     }
   1287 #endif /* ENABLE(Condition1) || ENABLE(Condition2) */
   1288     case PROP_ID:
   1289     {
   1290         coreSelf->setId((g_value_get_long(value)));
   1291         break;
   1292     }
   1293     default:
   1294         G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
   1295         break;
   1296     }
   1297 }
   1298 
   1299 
   1300 static void webkit_dom_test_obj_get_property(GObject* object, guint prop_id, GValue* value, GParamSpec* pspec)
   1301 {
   1302     WebCore::JSMainThreadNullState state;
   1303     WebKitDOMTestObj* self = WEBKIT_DOM_TEST_OBJ(object);
   1304     WebCore::TestObj* coreSelf = WebKit::core(self);
   1305     switch (prop_id) {
   1306     case PROP_READ_ONLY_INT_ATTR:
   1307     {
   1308         g_value_set_long(value, coreSelf->readOnlyIntAttr());
   1309         break;
   1310     }
   1311     case PROP_READ_ONLY_STRING_ATTR:
   1312     {
   1313         g_value_take_string(value, convertToUTF8String(coreSelf->readOnlyStringAttr()));
   1314         break;
   1315     }
   1316     case PROP_READ_ONLY_TEST_OBJ_ATTR:
   1317     {
   1318         RefPtr<WebCore::TestObj> ptr = coreSelf->readOnlyTestObjAttr();
   1319         g_value_set_object(value, WebKit::kit(ptr.get()));
   1320         break;
   1321     }
   1322     case PROP_SHORT_ATTR:
   1323     {
   1324         g_value_set_int(value, coreSelf->shortAttr());
   1325         break;
   1326     }
   1327     case PROP_UNSIGNED_SHORT_ATTR:
   1328     {
   1329         g_value_set_uint(value, coreSelf->unsignedShortAttr());
   1330         break;
   1331     }
   1332     case PROP_INT_ATTR:
   1333     {
   1334         g_value_set_long(value, coreSelf->intAttr());
   1335         break;
   1336     }
   1337     case PROP_LONG_LONG_ATTR:
   1338     {
   1339         g_value_set_int64(value, coreSelf->longLongAttr());
   1340         break;
   1341     }
   1342     case PROP_UNSIGNED_LONG_LONG_ATTR:
   1343     {
   1344         g_value_set_uint64(value, coreSelf->unsignedLongLongAttr());
   1345         break;
   1346     }
   1347     case PROP_STRING_ATTR:
   1348     {
   1349         g_value_take_string(value, convertToUTF8String(coreSelf->stringAttr()));
   1350         break;
   1351     }
   1352     case PROP_TEST_OBJ_ATTR:
   1353     {
   1354         RefPtr<WebCore::TestObj> ptr = coreSelf->testObjAttr();
   1355         g_value_set_object(value, WebKit::kit(ptr.get()));
   1356         break;
   1357     }
   1358     case PROP_XML_OBJ_ATTR:
   1359     {
   1360         RefPtr<WebCore::TestObj> ptr = coreSelf->xmlObjAttr();
   1361         g_value_set_object(value, WebKit::kit(ptr.get()));
   1362         break;
   1363     }
   1364     case PROP_CREATE:
   1365     {
   1366         g_value_set_boolean(value, coreSelf->isCreate());
   1367         break;
   1368     }
   1369     case PROP_REFLECTED_STRING_ATTR:
   1370     {
   1371         g_value_take_string(value, convertToUTF8String(coreSelf->getAttribute(WebCore::HTMLNames::reflectedstringattrAttr)));
   1372         break;
   1373     }
   1374     case PROP_REFLECTED_INTEGRAL_ATTR:
   1375     {
   1376         g_value_set_long(value, coreSelf->getIntegralAttribute(WebCore::HTMLNames::reflectedintegralattrAttr));
   1377         break;
   1378     }
   1379     case PROP_REFLECTED_UNSIGNED_INTEGRAL_ATTR:
   1380     {
   1381         g_value_set_ulong(value, coreSelf->getUnsignedIntegralAttribute(WebCore::HTMLNames::reflectedunsignedintegralattrAttr));
   1382         break;
   1383     }
   1384     case PROP_REFLECTED_BOOLEAN_ATTR:
   1385     {
   1386         g_value_set_boolean(value, coreSelf->hasAttribute(WebCore::HTMLNames::reflectedbooleanattrAttr));
   1387         break;
   1388     }
   1389     case PROP_REFLECTED_URL_ATTR:
   1390     {
   1391         g_value_take_string(value, convertToUTF8String(coreSelf->getURLAttribute(WebCore::HTMLNames::reflectedurlattrAttr)));
   1392         break;
   1393     }
   1394     case PROP_REFLECTED_NON_EMPTY_URL_ATTR:
   1395     {
   1396         g_value_take_string(value, convertToUTF8String(coreSelf->getNonEmptyURLAttribute(WebCore::HTMLNames::reflectednonemptyurlattrAttr)));
   1397         break;
   1398     }
   1399     case PROP_REFLECTED_STRING_ATTR:
   1400     {
   1401         g_value_take_string(value, convertToUTF8String(coreSelf->getAttribute(WebCore::HTMLNames::customContentStringAttrAttr)));
   1402         break;
   1403     }
   1404     case PROP_REFLECTED_CUSTOM_INTEGRAL_ATTR:
   1405     {
   1406         g_value_set_long(value, coreSelf->getIntegralAttribute(WebCore::HTMLNames::customContentIntegralAttrAttr));
   1407         break;
   1408     }
   1409     case PROP_REFLECTED_CUSTOM_BOOLEAN_ATTR:
   1410     {
   1411         g_value_set_boolean(value, coreSelf->hasAttribute(WebCore::HTMLNames::customContentBooleanAttrAttr));
   1412         break;
   1413     }
   1414     case PROP_REFLECTED_CUSTOM_URL_ATTR:
   1415     {
   1416         g_value_take_string(value, convertToUTF8String(coreSelf->getURLAttribute(WebCore::HTMLNames::customContentURLAttrAttr)));
   1417         break;
   1418     }
   1419     case PROP_REFLECTED_CUSTOM_NON_EMPTY_URL_ATTR:
   1420     {
   1421         g_value_take_string(value, convertToUTF8String(coreSelf->getNonEmptyURLAttribute(WebCore::HTMLNames::customContentNonEmptyURLAttrAttr)));
   1422         break;
   1423     }
   1424     case PROP_ATTR_WITH_GETTER_EXCEPTION:
   1425     {
   1426         WebCore::ExceptionCode ec = 0;
   1427         g_value_set_long(value, coreSelf->attrWithGetterException(ec));
   1428         break;
   1429     }
   1430     case PROP_ATTR_WITH_SETTER_EXCEPTION:
   1431     {
   1432         g_value_set_long(value, coreSelf->attrWithSetterException());
   1433         break;
   1434     }
   1435     case PROP_STRING_ATTR_WITH_GETTER_EXCEPTION:
   1436     {
   1437         WebCore::ExceptionCode ec = 0;
   1438         g_value_take_string(value, convertToUTF8String(coreSelf->stringAttrWithGetterException(ec)));
   1439         break;
   1440     }
   1441     case PROP_STRING_ATTR_WITH_SETTER_EXCEPTION:
   1442     {
   1443         g_value_take_string(value, convertToUTF8String(coreSelf->stringAttrWithSetterException()));
   1444         break;
   1445     }
   1446     case PROP_SCRIPT_STRING_ATTR:
   1447     {
   1448         g_value_take_string(value, convertToUTF8String(coreSelf->scriptStringAttr()));
   1449         break;
   1450     }
   1451 #if ENABLE(Condition1)
   1452     case PROP_CONDITIONAL_ATTR1:
   1453     {
   1454         g_value_set_long(value, coreSelf->conditionalAttr1());
   1455         break;
   1456     }
   1457 #endif /* ENABLE(Condition1) */
   1458 #if ENABLE(Condition1) && ENABLE(Condition2)
   1459     case PROP_CONDITIONAL_ATTR2:
   1460     {
   1461         g_value_set_long(value, coreSelf->conditionalAttr2());
   1462         break;
   1463     }
   1464 #endif /* ENABLE(Condition1) && ENABLE(Condition2) */
   1465 #if ENABLE(Condition1) || ENABLE(Condition2)
   1466     case PROP_CONDITIONAL_ATTR3:
   1467     {
   1468         g_value_set_long(value, coreSelf->conditionalAttr3());
   1469         break;
   1470     }
   1471 #endif /* ENABLE(Condition1) || ENABLE(Condition2) */
   1472     case PROP_DESCRIPTION:
   1473     {
   1474         g_value_set_long(value, coreSelf->description());
   1475         break;
   1476     }
   1477     case PROP_ID:
   1478     {
   1479         g_value_set_long(value, coreSelf->id());
   1480         break;
   1481     }
   1482     case PROP_HASH:
   1483     {
   1484         g_value_take_string(value, convertToUTF8String(coreSelf->hash()));
   1485         break;
   1486     }
   1487     default:
   1488         G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
   1489         break;
   1490     }
   1491 }
   1492 
   1493 
   1494 static void webkit_dom_test_obj_constructed(GObject* object)
   1495 {
   1496 
   1497     if (G_OBJECT_CLASS(webkit_dom_test_obj_parent_class)->constructed)
   1498         G_OBJECT_CLASS(webkit_dom_test_obj_parent_class)->constructed(object);
   1499 }
   1500 
   1501 static void webkit_dom_test_obj_class_init(WebKitDOMTestObjClass* requestClass)
   1502 {
   1503     GObjectClass *gobjectClass = G_OBJECT_CLASS(requestClass);
   1504     gobjectClass->finalize = webkit_dom_test_obj_finalize;
   1505     gobjectClass->set_property = webkit_dom_test_obj_set_property;
   1506     gobjectClass->get_property = webkit_dom_test_obj_get_property;
   1507     gobjectClass->constructed = webkit_dom_test_obj_constructed;
   1508 
   1509     g_object_class_install_property(gobjectClass,
   1510                                     PROP_READ_ONLY_INT_ATTR,
   1511                                     g_param_spec_long("read-only-int-attr", /* name */
   1512                                                            "test_obj_read-only-int-attr", /* short description */
   1513                                                            "read-only  glong TestObj.read-only-int-attr", /* longer - could do with some extra doc stuff here */
   1514                                                            G_MINLONG, /* min */
   1515 G_MAXLONG, /* max */
   1516 0, /* default */
   1517                                                            WEBKIT_PARAM_READABLE));
   1518     g_object_class_install_property(gobjectClass,
   1519                                     PROP_READ_ONLY_STRING_ATTR,
   1520                                     g_param_spec_string("read-only-string-attr", /* name */
   1521                                                            "test_obj_read-only-string-attr", /* short description */
   1522                                                            "read-only  gchar* TestObj.read-only-string-attr", /* longer - could do with some extra doc stuff here */
   1523                                                            "", /* default */
   1524                                                            WEBKIT_PARAM_READABLE));
   1525     g_object_class_install_property(gobjectClass,
   1526                                     PROP_READ_ONLY_TEST_OBJ_ATTR,
   1527                                     g_param_spec_object("read-only-test-obj-attr", /* name */
   1528                                                            "test_obj_read-only-test-obj-attr", /* short description */
   1529                                                            "read-only  WebKitDOMTestObj* TestObj.read-only-test-obj-attr", /* longer - could do with some extra doc stuff here */
   1530                                                            WEBKIT_TYPE_DOM_TEST_OBJ, /* gobject type */
   1531                                                            WEBKIT_PARAM_READABLE));
   1532     g_object_class_install_property(gobjectClass,
   1533                                     PROP_SHORT_ATTR,
   1534                                     g_param_spec_int("short-attr", /* name */
   1535                                                            "test_obj_short-attr", /* short description */
   1536                                                            "read-write  gshort TestObj.short-attr", /* longer - could do with some extra doc stuff here */
   1537                                                            G_MININT, /* min */
   1538 G_MAXINT, /* max */
   1539 0, /* default */
   1540                                                            WEBKIT_PARAM_READWRITE));
   1541     g_object_class_install_property(gobjectClass,
   1542                                     PROP_UNSIGNED_SHORT_ATTR,
   1543                                     g_param_spec_uint("unsigned-short-attr", /* name */
   1544                                                            "test_obj_unsigned-short-attr", /* short description */
   1545                                                            "read-write  gushort TestObj.unsigned-short-attr", /* longer - could do with some extra doc stuff here */
   1546                                                            0, /* min */
   1547 G_MAXUINT16, /* max */
   1548 0, /* default */
   1549                                                            WEBKIT_PARAM_READWRITE));
   1550     g_object_class_install_property(gobjectClass,
   1551                                     PROP_INT_ATTR,
   1552                                     g_param_spec_long("int-attr", /* name */
   1553                                                            "test_obj_int-attr", /* short description */
   1554                                                            "read-write  glong TestObj.int-attr", /* longer - could do with some extra doc stuff here */
   1555                                                            G_MINLONG, /* min */
   1556 G_MAXLONG, /* max */
   1557 0, /* default */
   1558                                                            WEBKIT_PARAM_READWRITE));
   1559     g_object_class_install_property(gobjectClass,
   1560                                     PROP_LONG_LONG_ATTR,
   1561                                     g_param_spec_int64("long-long-attr", /* name */
   1562                                                            "test_obj_long-long-attr", /* short description */
   1563                                                            "read-write  gint64 TestObj.long-long-attr", /* longer - could do with some extra doc stuff here */
   1564                                                            G_MININT64, /* min */
   1565 G_MAXINT64, /* max */
   1566 0, /* default */
   1567                                                            WEBKIT_PARAM_READWRITE));
   1568     g_object_class_install_property(gobjectClass,
   1569                                     PROP_UNSIGNED_LONG_LONG_ATTR,
   1570                                     g_param_spec_uint64("unsigned-long-long-attr", /* name */
   1571                                                            "test_obj_unsigned-long-long-attr", /* short description */
   1572                                                            "read-write  guint64 TestObj.unsigned-long-long-attr", /* longer - could do with some extra doc stuff here */
   1573                                                            0, /* min */
   1574 G_MAXUINT64, /* min */
   1575 0, /* default */
   1576                                                            WEBKIT_PARAM_READWRITE));
   1577     g_object_class_install_property(gobjectClass,
   1578                                     PROP_STRING_ATTR,
   1579                                     g_param_spec_string("string-attr", /* name */
   1580                                                            "test_obj_string-attr", /* short description */
   1581                                                            "read-write  gchar* TestObj.string-attr", /* longer - could do with some extra doc stuff here */
   1582                                                            "", /* default */
   1583                                                            WEBKIT_PARAM_READWRITE));
   1584     g_object_class_install_property(gobjectClass,
   1585                                     PROP_TEST_OBJ_ATTR,
   1586                                     g_param_spec_object("test-obj-attr", /* name */
   1587                                                            "test_obj_test-obj-attr", /* short description */
   1588                                                            "read-write  WebKitDOMTestObj* TestObj.test-obj-attr", /* longer - could do with some extra doc stuff here */
   1589                                                            WEBKIT_TYPE_DOM_TEST_OBJ, /* gobject type */
   1590                                                            WEBKIT_PARAM_READWRITE));
   1591     g_object_class_install_property(gobjectClass,
   1592                                     PROP_XML_OBJ_ATTR,
   1593                                     g_param_spec_object("xml-obj-attr", /* name */
   1594                                                            "test_obj_xml-obj-attr", /* short description */
   1595                                                            "read-write  WebKitDOMTestObj* TestObj.xml-obj-attr", /* longer - could do with some extra doc stuff here */
   1596                                                            WEBKIT_TYPE_DOM_TEST_OBJ, /* gobject type */
   1597                                                            WEBKIT_PARAM_READWRITE));
   1598     g_object_class_install_property(gobjectClass,
   1599                                     PROP_CREATE,
   1600                                     g_param_spec_boolean("create", /* name */
   1601                                                            "test_obj_create", /* short description */
   1602                                                            "read-write  gboolean TestObj.create", /* longer - could do with some extra doc stuff here */
   1603                                                            FALSE, /* default */
   1604                                                            WEBKIT_PARAM_READWRITE));
   1605     g_object_class_install_property(gobjectClass,
   1606                                     PROP_REFLECTED_STRING_ATTR,
   1607                                     g_param_spec_string("reflected-string-attr", /* name */
   1608                                                            "test_obj_reflected-string-attr", /* short description */
   1609                                                            "read-write  gchar* TestObj.reflected-string-attr", /* longer - could do with some extra doc stuff here */
   1610                                                            "", /* default */
   1611                                                            WEBKIT_PARAM_READWRITE));
   1612     g_object_class_install_property(gobjectClass,
   1613                                     PROP_REFLECTED_INTEGRAL_ATTR,
   1614                                     g_param_spec_long("reflected-integral-attr", /* name */
   1615                                                            "test_obj_reflected-integral-attr", /* short description */
   1616                                                            "read-write  glong TestObj.reflected-integral-attr", /* longer - could do with some extra doc stuff here */
   1617                                                            G_MINLONG, /* min */
   1618 G_MAXLONG, /* max */
   1619 0, /* default */
   1620                                                            WEBKIT_PARAM_READWRITE));
   1621     g_object_class_install_property(gobjectClass,
   1622                                     PROP_REFLECTED_UNSIGNED_INTEGRAL_ATTR,
   1623                                     g_param_spec_ulong("reflected-unsigned-integral-attr", /* name */
   1624                                                            "test_obj_reflected-unsigned-integral-attr", /* short description */
   1625                                                            "read-write  gulong TestObj.reflected-unsigned-integral-attr", /* longer - could do with some extra doc stuff here */
   1626                                                            0, /* min */
   1627 G_MAXULONG, /* max */
   1628 0, /* default */
   1629                                                            WEBKIT_PARAM_READWRITE));
   1630     g_object_class_install_property(gobjectClass,
   1631                                     PROP_REFLECTED_BOOLEAN_ATTR,
   1632                                     g_param_spec_boolean("reflected-boolean-attr", /* name */
   1633                                                            "test_obj_reflected-boolean-attr", /* short description */
   1634                                                            "read-write  gboolean TestObj.reflected-boolean-attr", /* longer - could do with some extra doc stuff here */
   1635                                                            FALSE, /* default */
   1636                                                            WEBKIT_PARAM_READWRITE));
   1637     g_object_class_install_property(gobjectClass,
   1638                                     PROP_REFLECTED_URL_ATTR,
   1639                                     g_param_spec_string("reflected-url-attr", /* name */
   1640                                                            "test_obj_reflected-url-attr", /* short description */
   1641                                                            "read-write  gchar* TestObj.reflected-url-attr", /* longer - could do with some extra doc stuff here */
   1642                                                            "", /* default */
   1643                                                            WEBKIT_PARAM_READWRITE));
   1644     g_object_class_install_property(gobjectClass,
   1645                                     PROP_REFLECTED_NON_EMPTY_URL_ATTR,
   1646                                     g_param_spec_string("reflected-non-empty-url-attr", /* name */
   1647                                                            "test_obj_reflected-non-empty-url-attr", /* short description */
   1648                                                            "read-write  gchar* TestObj.reflected-non-empty-url-attr", /* longer - could do with some extra doc stuff here */
   1649                                                            "", /* default */
   1650                                                            WEBKIT_PARAM_READWRITE));
   1651     g_object_class_install_property(gobjectClass,
   1652                                     PROP_REFLECTED_STRING_ATTR,
   1653                                     g_param_spec_string("reflected-string-attr", /* name */
   1654                                                            "test_obj_reflected-string-attr", /* short description */
   1655                                                            "read-write  gchar* TestObj.reflected-string-attr", /* longer - could do with some extra doc stuff here */
   1656                                                            "", /* default */
   1657                                                            WEBKIT_PARAM_READWRITE));
   1658     g_object_class_install_property(gobjectClass,
   1659                                     PROP_REFLECTED_CUSTOM_INTEGRAL_ATTR,
   1660                                     g_param_spec_long("reflected-custom-integral-attr", /* name */
   1661                                                            "test_obj_reflected-custom-integral-attr", /* short description */
   1662                                                            "read-write  glong TestObj.reflected-custom-integral-attr", /* longer - could do with some extra doc stuff here */
   1663                                                            G_MINLONG, /* min */
   1664 G_MAXLONG, /* max */
   1665 0, /* default */
   1666                                                            WEBKIT_PARAM_READWRITE));
   1667     g_object_class_install_property(gobjectClass,
   1668                                     PROP_REFLECTED_CUSTOM_BOOLEAN_ATTR,
   1669                                     g_param_spec_boolean("reflected-custom-boolean-attr", /* name */
   1670                                                            "test_obj_reflected-custom-boolean-attr", /* short description */
   1671                                                            "read-write  gboolean TestObj.reflected-custom-boolean-attr", /* longer - could do with some extra doc stuff here */
   1672                                                            FALSE, /* default */
   1673                                                            WEBKIT_PARAM_READWRITE));
   1674     g_object_class_install_property(gobjectClass,
   1675                                     PROP_REFLECTED_CUSTOM_URL_ATTR,
   1676                                     g_param_spec_string("reflected-custom-url-attr", /* name */
   1677                                                            "test_obj_reflected-custom-url-attr", /* short description */
   1678                                                            "read-write  gchar* TestObj.reflected-custom-url-attr", /* longer - could do with some extra doc stuff here */
   1679                                                            "", /* default */
   1680                                                            WEBKIT_PARAM_READWRITE));
   1681     g_object_class_install_property(gobjectClass,
   1682                                     PROP_REFLECTED_CUSTOM_NON_EMPTY_URL_ATTR,
   1683                                     g_param_spec_string("reflected-custom-non-empty-url-attr", /* name */
   1684                                                            "test_obj_reflected-custom-non-empty-url-attr", /* short description */
   1685                                                            "read-write  gchar* TestObj.reflected-custom-non-empty-url-attr", /* longer - could do with some extra doc stuff here */
   1686                                                            "", /* default */
   1687                                                            WEBKIT_PARAM_READWRITE));
   1688     g_object_class_install_property(gobjectClass,
   1689                                     PROP_ATTR_WITH_GETTER_EXCEPTION,
   1690                                     g_param_spec_long("attr-with-getter-exception", /* name */
   1691                                                            "test_obj_attr-with-getter-exception", /* short description */
   1692                                                            "read-write  glong TestObj.attr-with-getter-exception", /* longer - could do with some extra doc stuff here */
   1693                                                            G_MINLONG, /* min */
   1694 G_MAXLONG, /* max */
   1695 0, /* default */
   1696                                                            WEBKIT_PARAM_READWRITE));
   1697     g_object_class_install_property(gobjectClass,
   1698                                     PROP_ATTR_WITH_SETTER_EXCEPTION,
   1699                                     g_param_spec_long("attr-with-setter-exception", /* name */
   1700                                                            "test_obj_attr-with-setter-exception", /* short description */
   1701                                                            "read-write  glong TestObj.attr-with-setter-exception", /* longer - could do with some extra doc stuff here */
   1702                                                            G_MINLONG, /* min */
   1703 G_MAXLONG, /* max */
   1704 0, /* default */
   1705                                                            WEBKIT_PARAM_READWRITE));
   1706     g_object_class_install_property(gobjectClass,
   1707                                     PROP_STRING_ATTR_WITH_GETTER_EXCEPTION,
   1708                                     g_param_spec_string("string-attr-with-getter-exception", /* name */
   1709                                                            "test_obj_string-attr-with-getter-exception", /* short description */
   1710                                                            "read-write  gchar* TestObj.string-attr-with-getter-exception", /* longer - could do with some extra doc stuff here */
   1711                                                            "", /* default */
   1712                                                            WEBKIT_PARAM_READWRITE));
   1713     g_object_class_install_property(gobjectClass,
   1714                                     PROP_STRING_ATTR_WITH_SETTER_EXCEPTION,
   1715                                     g_param_spec_string("string-attr-with-setter-exception", /* name */
   1716                                                            "test_obj_string-attr-with-setter-exception", /* short description */
   1717                                                            "read-write  gchar* TestObj.string-attr-with-setter-exception", /* longer - could do with some extra doc stuff here */
   1718                                                            "", /* default */
   1719                                                            WEBKIT_PARAM_READWRITE));
   1720     g_object_class_install_property(gobjectClass,
   1721                                     PROP_SCRIPT_STRING_ATTR,
   1722                                     g_param_spec_string("script-string-attr", /* name */
   1723                                                            "test_obj_script-string-attr", /* short description */
   1724                                                            "read-only  gchar* TestObj.script-string-attr", /* longer - could do with some extra doc stuff here */
   1725                                                            "", /* default */
   1726                                                            WEBKIT_PARAM_READABLE));
   1727 #if ENABLE(Condition1)
   1728     g_object_class_install_property(gobjectClass,
   1729                                     PROP_CONDITIONAL_ATTR1,
   1730                                     g_param_spec_long("conditional-attr1", /* name */
   1731                                                            "test_obj_conditional-attr1", /* short description */
   1732                                                            "read-write  glong TestObj.conditional-attr1", /* longer - could do with some extra doc stuff here */
   1733                                                            G_MINLONG, /* min */
   1734 G_MAXLONG, /* max */
   1735 0, /* default */
   1736                                                            WEBKIT_PARAM_READWRITE));
   1737 #endif /* ENABLE(Condition1) */
   1738 #if ENABLE(Condition1) && ENABLE(Condition2)
   1739     g_object_class_install_property(gobjectClass,
   1740                                     PROP_CONDITIONAL_ATTR2,
   1741                                     g_param_spec_long("conditional-attr2", /* name */
   1742                                                            "test_obj_conditional-attr2", /* short description */
   1743                                                            "read-write  glong TestObj.conditional-attr2", /* longer - could do with some extra doc stuff here */
   1744                                                            G_MINLONG, /* min */
   1745 G_MAXLONG, /* max */
   1746 0, /* default */
   1747                                                            WEBKIT_PARAM_READWRITE));
   1748 #endif /* ENABLE(Condition1) && ENABLE(Condition2) */
   1749 #if ENABLE(Condition1) || ENABLE(Condition2)
   1750     g_object_class_install_property(gobjectClass,
   1751                                     PROP_CONDITIONAL_ATTR3,
   1752                                     g_param_spec_long("conditional-attr3", /* name */
   1753                                                            "test_obj_conditional-attr3", /* short description */
   1754                                                            "read-write  glong TestObj.conditional-attr3", /* longer - could do with some extra doc stuff here */
   1755                                                            G_MINLONG, /* min */
   1756 G_MAXLONG, /* max */
   1757 0, /* default */
   1758                                                            WEBKIT_PARAM_READWRITE));
   1759 #endif /* ENABLE(Condition1) || ENABLE(Condition2) */
   1760     g_object_class_install_property(gobjectClass,
   1761                                     PROP_DESCRIPTION,
   1762                                     g_param_spec_long("description", /* name */
   1763                                                            "test_obj_description", /* short description */
   1764                                                            "read-only  glong TestObj.description", /* longer - could do with some extra doc stuff here */
   1765                                                            G_MINLONG, /* min */
   1766 G_MAXLONG, /* max */
   1767 0, /* default */
   1768                                                            WEBKIT_PARAM_READABLE));
   1769     g_object_class_install_property(gobjectClass,
   1770                                     PROP_ID,
   1771                                     g_param_spec_long("id", /* name */
   1772                                                            "test_obj_id", /* short description */
   1773                                                            "read-write  glong TestObj.id", /* longer - could do with some extra doc stuff here */
   1774                                                            G_MINLONG, /* min */
   1775 G_MAXLONG, /* max */
   1776 0, /* default */
   1777                                                            WEBKIT_PARAM_READWRITE));
   1778     g_object_class_install_property(gobjectClass,
   1779                                     PROP_HASH,
   1780                                     g_param_spec_string("hash", /* name */
   1781                                                            "test_obj_hash", /* short description */
   1782                                                            "read-only  gchar* TestObj.hash", /* longer - could do with some extra doc stuff here */
   1783                                                            "", /* default */
   1784                                                            WEBKIT_PARAM_READABLE));
   1785 
   1786 
   1787 }
   1788 
   1789 static void webkit_dom_test_obj_init(WebKitDOMTestObj* request)
   1790 {
   1791 }
   1792 
   1793 namespace WebKit {
   1794 WebKitDOMTestObj* wrapTestObj(WebCore::TestObj* coreObject)
   1795 {
   1796     g_return_val_if_fail(coreObject, 0);
   1797 
   1798     /* We call ref() rather than using a C++ smart pointer because we can't store a C++ object
   1799      * in a C-allocated GObject structure.  See the finalize() code for the
   1800      * matching deref().
   1801      */
   1802     coreObject->ref();
   1803 
   1804     return  WEBKIT_DOM_TEST_OBJ(g_object_new(WEBKIT_TYPE_DOM_TEST_OBJ,
   1805                                                "core-object", coreObject, NULL));
   1806 }
   1807 } // namespace WebKit
   1808