static void webkit_dom_test_interface_get_property(GObject* object, guint prop_id, GValue* value, GParamSpec* pspec) { WebCore::JSMainThreadNullState state; WebKitDOMTestInterface* self = WEBKIT_DOM_TEST_INTERFACE(object); WebCore::TestInterface* coreSelf = WebKit::core(self); switch (prop_id) { #if ENABLE(Condition11) || ENABLE(Condition12) case PROP_SUPPLEMENTAL_STR1: { g_value_take_string(value, convertToUTF8String(WebCore::TestSupplemental::supplementalStr1(coreSelf))); break; } #endif /* ENABLE(Condition11) || ENABLE(Condition12) */ #if ENABLE(Condition11) || ENABLE(Condition12) case PROP_SUPPLEMENTAL_STR2: { g_value_take_string(value, convertToUTF8String(WebCore::TestSupplemental::supplementalStr2(coreSelf))); break; } #endif /* ENABLE(Condition11) || ENABLE(Condition12) */ #if ENABLE(Condition11) || ENABLE(Condition12) case PROP_SUPPLEMENTAL_NODE: { RefPtr<WebCore::Node> ptr = WebCore::TestSupplemental::supplementalNode(coreSelf); g_value_set_object(value, WebKit::kit(ptr.get())); break; } #endif /* ENABLE(Condition11) || ENABLE(Condition12) */ default: G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec); break; } }
WebKitDOMTestInterface* wrapTestInterface(WebCore::TestInterface* coreObject) { g_return_val_if_fail(coreObject, 0); /* We call ref() rather than using a C++ smart pointer because we can't store a C++ object * in a C-allocated GObject structure. See the finalize() code for the * matching deref(). */ coreObject->ref(); return WEBKIT_DOM_TEST_INTERFACE(g_object_new(WEBKIT_TYPE_DOM_TEST_INTERFACE, "core-object", coreObject, NULL)); }
static void webkit_dom_test_interface_set_property(GObject* object, guint prop_id, const GValue* value, GParamSpec* pspec) { WebCore::JSMainThreadNullState state; WebKitDOMTestInterface* self = WEBKIT_DOM_TEST_INTERFACE(object); WebCore::TestInterface* coreSelf = WebKit::core(self); switch (prop_id) { #if ENABLE(Condition11) || ENABLE(Condition12) case PROP_SUPPLEMENTAL_STR2: { WebCore::TestSupplemental::setSupplementalStr2(coreSelf, WTF::String::fromUTF8(g_value_get_string(value))); break; } #endif /* ENABLE(Condition11) || ENABLE(Condition12) */ default: G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec); break; } }