2 This file is part of the WebKit open source project.
3 This file has been generated by generate-bindings.pl. DO NOT MODIFY!
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.
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.
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.
21 #include <glib-object.h>
24 #include <wtf/GetPtr.h>
25 #include <wtf/RefPtr.h>
26 #include "DOMObjectCache.h"
27 #include "ExceptionCode.h"
28 #include "JSMainThreadExecState.h"
29 #include "TestMediaQueryListListener.h"
30 #include "WebKitDOMBinding.h"
31 #include "gobject/ConvertToUTF8String.h"
32 #include "webkit/WebKitDOMTestMediaQueryListListener.h"
33 #include "webkit/WebKitDOMTestMediaQueryListListenerPrivate.h"
34 #include "webkitdefines.h"
35 #include "webkitglobalsprivate.h"
36 #include "webkitmarshal.h"
40 WebKitDOMTestMediaQueryListListener* kit(WebCore::TestMediaQueryListListener* obj)
42 g_return_val_if_fail(obj, 0);
44 if (gpointer ret = DOMObjectCache::get(obj))
45 return static_cast<WebKitDOMTestMediaQueryListListener*>(ret);
47 return static_cast<WebKitDOMTestMediaQueryListListener*>(DOMObjectCache::put(obj, WebKit::wrapTestMediaQueryListListener(obj)));
50 } // namespace WebKit //
53 G_DEFINE_TYPE(WebKitDOMTestMediaQueryListListener, webkit_dom_test_media_query_list_listener, WEBKIT_TYPE_DOM_OBJECT)
57 WebCore::TestMediaQueryListListener* core(WebKitDOMTestMediaQueryListListener* request)
59 g_return_val_if_fail(request, 0);
61 WebCore::TestMediaQueryListListener* coreObject = static_cast<WebCore::TestMediaQueryListListener*>(WEBKIT_DOM_OBJECT(request)->coreObject);
62 g_return_val_if_fail(coreObject, 0);
73 static void webkit_dom_test_media_query_list_listener_finalize(GObject* object)
75 WebKitDOMObject* dom_object = WEBKIT_DOM_OBJECT(object);
77 if (dom_object->coreObject) {
78 WebCore::TestMediaQueryListListener* coreObject = static_cast<WebCore::TestMediaQueryListListener *>(dom_object->coreObject);
80 WebKit::DOMObjectCache::forget(coreObject);
83 dom_object->coreObject = NULL;
86 G_OBJECT_CLASS(webkit_dom_test_media_query_list_listener_parent_class)->finalize(object);
89 static void webkit_dom_test_media_query_list_listener_set_property(GObject* object, guint prop_id, const GValue* value, GParamSpec* pspec)
91 WebCore::JSMainThreadNullState state;
94 G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
100 static void webkit_dom_test_media_query_list_listener_get_property(GObject* object, guint prop_id, GValue* value, GParamSpec* pspec)
102 WebCore::JSMainThreadNullState state;
105 G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
111 static void webkit_dom_test_media_query_list_listener_constructed(GObject* object)
114 if (G_OBJECT_CLASS(webkit_dom_test_media_query_list_listener_parent_class)->constructed)
115 G_OBJECT_CLASS(webkit_dom_test_media_query_list_listener_parent_class)->constructed(object);
118 static void webkit_dom_test_media_query_list_listener_class_init(WebKitDOMTestMediaQueryListListenerClass* requestClass)
120 GObjectClass *gobjectClass = G_OBJECT_CLASS(requestClass);
121 gobjectClass->finalize = webkit_dom_test_media_query_list_listener_finalize;
122 gobjectClass->set_property = webkit_dom_test_media_query_list_listener_set_property;
123 gobjectClass->get_property = webkit_dom_test_media_query_list_listener_get_property;
124 gobjectClass->constructed = webkit_dom_test_media_query_list_listener_constructed;
130 static void webkit_dom_test_media_query_list_listener_init(WebKitDOMTestMediaQueryListListener* request)
135 WebKitDOMTestMediaQueryListListener* wrapTestMediaQueryListListener(WebCore::TestMediaQueryListListener* coreObject)
137 g_return_val_if_fail(coreObject, 0);
139 /* We call ref() rather than using a C++ smart pointer because we can't store a C++ object
140 * in a C-allocated GObject structure. See the finalize() code for the
145 return WEBKIT_DOM_TEST_MEDIA_QUERY_LIST_LISTENER(g_object_new(WEBKIT_TYPE_DOM_TEST_MEDIA_QUERY_LIST_LISTENER,
146 "core-object", coreObject, NULL));
148 } // namespace WebKit