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 Copyright (C) 2011 Samsung Electronics
7 This library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Lesser General Public
9 License as published by the Free Software Foundation; either
10 version 2.1 of the License, or (at your option) any later version.
12 This library is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 Lesser General Public License for more details.
17 You should have received a copy of the GNU Lesser General Public
18 License along with this library; if not, write to the Free Software
19 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
23 #include "WebKitDOM_HTMLDocument.h"
24 #include "WebKitDOM_HTMLDocument_Private.h"
27 #include "HTMLCollection.h"
28 #include "HTMLDocument.h"
30 #include "WebKitDOM_Element.h"
31 #include "WebKitDOM_Element_Private.h"
32 #include "WebKitDOM_HTMLCollection.h"
33 #include "WebKitDOM_HTMLCollection_Private.h"
34 #include "WebKitDOM_String.h"
35 #include "WebKitDOM_String_Private.h"
36 #include "wtf/text/AtomicString.h"
37 #include <wtf/text/CString.h>
38 #include <wtf/GetPtr.h>
39 #include <wtf/RefPtr.h>
41 void ewk_webkitdom_htmldocument_get_embeds(WebKitDOM_HTMLDocument* self, WebKitDOM_HTMLCollection* ret)
46 WebCore::HTMLDocument* coreObj = _to_webcore_htmldocument(self);
47 RefPtr<WebCore::HTMLCollection> result = WTF::getPtr(coreObj->embeds());
48 _to_webkit_htmlcollection(result.get(), ret);
51 void ewk_webkitdom_htmldocument_get_plugins(WebKitDOM_HTMLDocument* self, WebKitDOM_HTMLCollection* ret)
56 WebCore::HTMLDocument* coreObj = _to_webcore_htmldocument(self);
57 RefPtr<WebCore::HTMLCollection> result = WTF::getPtr(coreObj->plugins());
58 _to_webkit_htmlcollection(result.get(), ret);
61 void ewk_webkitdom_htmldocument_get_scripts(WebKitDOM_HTMLDocument* self, WebKitDOM_HTMLCollection* ret)
66 WebCore::HTMLDocument* coreObj = _to_webcore_htmldocument(self);
67 RefPtr<WebCore::HTMLCollection> result = WTF::getPtr(coreObj->scripts());
68 _to_webkit_htmlcollection(result.get(), ret);
71 void ewk_webkitdom_htmldocument_get_dir(WebKitDOM_HTMLDocument* self, WebKitDOM_String* ret)
76 WebCore::HTMLDocument* coreObj = _to_webcore_htmldocument(self);
77 WTF::String result = coreObj->dir();
78 _to_webkit_string(&result, ret);
81 void ewk_webkitdom_htmldocument_set_dir(WebKitDOM_HTMLDocument* self, WebKitDOM_String* newDir)
86 WebCore::HTMLDocument* coreObj = _to_webcore_htmldocument(self);
87 coreObj->setDir(_to_webcore_string_value(newDir));
90 void ewk_webkitdom_htmldocument_get_design_mode(WebKitDOM_HTMLDocument* self, WebKitDOM_String* ret)
95 WebCore::HTMLDocument* coreObj = _to_webcore_htmldocument(self);
96 WTF::String result = coreObj->designMode();
97 _to_webkit_string(&result, ret);
100 void ewk_webkitdom_htmldocument_set_design_mode(WebKitDOM_HTMLDocument* self, WebKitDOM_String* newDesignMode)
105 WebCore::HTMLDocument* coreObj = _to_webcore_htmldocument(self);
106 coreObj->setDesignMode(_to_webcore_string_value(newDesignMode));
109 void ewk_webkitdom_htmldocument_get_compat_mode(WebKitDOM_HTMLDocument* self, WebKitDOM_String* ret)
114 WebCore::HTMLDocument* coreObj = _to_webcore_htmldocument(self);
115 WTF::String result = coreObj->compatMode();
116 _to_webkit_string(&result, ret);
119 void ewk_webkitdom_htmldocument_get_active_element(WebKitDOM_HTMLDocument* self, WebKitDOM_Element* ret)
124 WebCore::HTMLDocument* coreObj = _to_webcore_htmldocument(self);
125 RefPtr<WebCore::Element> result = WTF::getPtr(coreObj->activeElement());
126 _to_webkit_element(result.get(), ret);
129 void ewk_webkitdom_htmldocument_get_bg_color(WebKitDOM_HTMLDocument* self, WebKitDOM_String* ret)
134 WebCore::HTMLDocument* coreObj = _to_webcore_htmldocument(self);
135 WTF::String result = coreObj->bgColor();
136 _to_webkit_string(&result, ret);
139 void ewk_webkitdom_htmldocument_set_bg_color(WebKitDOM_HTMLDocument* self, WebKitDOM_String* newBgColor)
144 WebCore::HTMLDocument* coreObj = _to_webcore_htmldocument(self);
145 coreObj->setBgColor(_to_webcore_string_value(newBgColor));
148 void ewk_webkitdom_htmldocument_get_fg_color(WebKitDOM_HTMLDocument* self, WebKitDOM_String* ret)
153 WebCore::HTMLDocument* coreObj = _to_webcore_htmldocument(self);
154 WTF::String result = coreObj->fgColor();
155 _to_webkit_string(&result, ret);
158 void ewk_webkitdom_htmldocument_set_fg_color(WebKitDOM_HTMLDocument* self, WebKitDOM_String* newFgColor)
163 WebCore::HTMLDocument* coreObj = _to_webcore_htmldocument(self);
164 coreObj->setFgColor(_to_webcore_string_value(newFgColor));
167 void ewk_webkitdom_htmldocument_get_alink_color(WebKitDOM_HTMLDocument* self, WebKitDOM_String* ret)
172 WebCore::HTMLDocument* coreObj = _to_webcore_htmldocument(self);
173 WTF::String result = coreObj->alinkColor();
174 _to_webkit_string(&result, ret);
177 void ewk_webkitdom_htmldocument_set_alink_color(WebKitDOM_HTMLDocument* self, WebKitDOM_String* newAlinkColor)
182 WebCore::HTMLDocument* coreObj = _to_webcore_htmldocument(self);
183 coreObj->setAlinkColor(_to_webcore_string_value(newAlinkColor));
186 void ewk_webkitdom_htmldocument_get_link_color(WebKitDOM_HTMLDocument* self, WebKitDOM_String* ret)
191 WebCore::HTMLDocument* coreObj = _to_webcore_htmldocument(self);
192 WTF::String result = coreObj->linkColor();
193 _to_webkit_string(&result, ret);
196 void ewk_webkitdom_htmldocument_set_link_color(WebKitDOM_HTMLDocument* self, WebKitDOM_String* newLinkColor)
201 WebCore::HTMLDocument* coreObj = _to_webcore_htmldocument(self);
202 coreObj->setLinkColor(_to_webcore_string_value(newLinkColor));
205 void ewk_webkitdom_htmldocument_get_vlink_color(WebKitDOM_HTMLDocument* self, WebKitDOM_String* ret)
210 WebCore::HTMLDocument* coreObj = _to_webcore_htmldocument(self);
211 WTF::String result = coreObj->vlinkColor();
212 _to_webkit_string(&result, ret);
215 void ewk_webkitdom_htmldocument_set_vlink_color(WebKitDOM_HTMLDocument* self, WebKitDOM_String* newVlinkColor)
220 WebCore::HTMLDocument* coreObj = _to_webcore_htmldocument(self);
221 coreObj->setVlinkColor(_to_webcore_string_value(newVlinkColor));
224 void ewk_webkitdom_htmldocument_open(WebKitDOM_HTMLDocument* self)
229 WebCore::HTMLDocument* coreObj = _to_webcore_htmldocument(self);
233 void ewk_webkitdom_htmldocument_close(WebKitDOM_HTMLDocument* self)
238 WebCore::HTMLDocument* coreObj = _to_webcore_htmldocument(self);
242 void ewk_webkitdom_htmldocument_clear(WebKitDOM_HTMLDocument* self)
247 WebCore::HTMLDocument* coreObj = _to_webcore_htmldocument(self);
251 void ewk_webkitdom_htmldocument_capture_events(WebKitDOM_HTMLDocument* self)
256 WebCore::HTMLDocument* coreObj = _to_webcore_htmldocument(self);
257 coreObj->captureEvents();
260 void ewk_webkitdom_htmldocument_release_events(WebKitDOM_HTMLDocument* self)
265 WebCore::HTMLDocument* coreObj = _to_webcore_htmldocument(self);
266 coreObj->releaseEvents();
269 Eina_Bool ewk_webkitdom_htmldocument_has_focus(WebKitDOM_HTMLDocument* self)
274 WebCore::HTMLDocument* coreObj = _to_webcore_htmldocument(self);
275 return coreObj->hasFocus();
279 void ewk_webkitdom_htmldocument_deinit(const WebKitDOM_Object* objPtr)
281 if( WEBKITDOM_ISNULL(objPtr) )
283 ((WebCore::HTMLDocument*)(objPtr->p_coreObject))->deref();
284 (((WebKitDOM_Object*)(objPtr))->p_coreObject) = 0;
287 void _copy_webkit_htmldocument(WebKitDOM_HTMLDocument* kitObjSrc, WebKitDOM_HTMLDocument* ret)
289 if (WEBKITDOM_COREOBJ(kitObjSrc) == WEBKITDOM_COREOBJ(ret))
291 WebCore::HTMLDocument* tmpPtr = _to_webcore_htmldocument(ret);
294 if (!WEBKITDOM_ISNULL(kitObjSrc))
295 _to_webcore_htmldocument(kitObjSrc)->ref();
296 ((WebKitDOM_Object*)ret)->p_coreObject = WEBKITDOM_COREOBJ(kitObjSrc);
299 WebCore::HTMLDocument* _to_webcore_htmldocument(const WebKitDOM_HTMLDocument* kitObj)
301 return (WebCore::HTMLDocument*)WEBKITDOM_COREOBJ(kitObj);
304 WebKitDOM_HTMLDocument* _to_webkit_htmldocument(WebCore::HTMLDocument* coreObj, WebKitDOM_HTMLDocument* ret)
306 WebCore::HTMLDocument* tmpPtr = _to_webcore_htmldocument(ret);
307 if (tmpPtr && tmpPtr != coreObj)
311 ((WebKitDOM_Object*)ret)->p_coreObject = coreObj;