2015-08-09 14:26:41 +03:00
|
|
|
/* Binding for browser using duktape and libdom
|
|
|
|
*
|
|
|
|
* Copyright 2015 Vincent Sanders <vince@netsurf-browser.org>
|
|
|
|
*
|
|
|
|
* This file is part of NetSurf, http://www.netsurf-browser.org/
|
|
|
|
*
|
|
|
|
* Released under the terms of the MIT License,
|
|
|
|
* http://www.opensource.org/licenses/mit-license
|
|
|
|
*/
|
|
|
|
|
|
|
|
binding duk_libdom {
|
|
|
|
webidl "dom.idl";
|
|
|
|
webidl "html.idl";
|
|
|
|
webidl "uievents.idl";
|
2015-08-11 16:35:31 +03:00
|
|
|
webidl "urlutils.idl";
|
2015-08-09 14:26:41 +03:00
|
|
|
webidl "console.idl";
|
|
|
|
|
|
|
|
preface %{
|
|
|
|
/* DukTape JavaScript bindings for NetSurf browser
|
|
|
|
*
|
|
|
|
* Copyright 2015 Vincent Sanders <vince@netsurf-browser.org>
|
|
|
|
* This file is part of NetSurf, http://www.netsurf-browser.org/
|
|
|
|
* Released under the terms of the MIT License,
|
|
|
|
* http://www.opensource.org/licenses/mit-license
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <dom/dom.h>
|
|
|
|
|
|
|
|
#include "utils/log.h"
|
2015-09-07 15:52:57 +03:00
|
|
|
#include "utils/nsurl.h"
|
2015-08-09 14:26:41 +03:00
|
|
|
|
|
|
|
#include "javascript/duktape/duktape.h"
|
|
|
|
|
|
|
|
struct browser_window;
|
|
|
|
struct html_content;
|
|
|
|
struct dom_node;
|
|
|
|
struct dom_element;
|
|
|
|
struct dom_document;
|
|
|
|
struct dom_html_element;
|
|
|
|
struct dom_node_character_data;
|
|
|
|
struct dom_node_text;
|
|
|
|
struct dom_node_list;
|
|
|
|
struct dom_node_comment;
|
|
|
|
struct dom_html_collection;
|
|
|
|
struct dom_html_br_element;
|
|
|
|
|
|
|
|
%};
|
|
|
|
|
|
|
|
prologue %{
|
2015-10-12 19:40:35 +03:00
|
|
|
#include "javascript/duktape/dukky.h"
|
2015-08-09 14:26:41 +03:00
|
|
|
%};
|
|
|
|
|
2015-09-28 10:56:23 +03:00
|
|
|
};
|
2015-08-09 14:26:41 +03:00
|
|
|
|
2015-08-10 21:09:58 +03:00
|
|
|
#include "Console.bnd"
|
2015-08-09 14:26:41 +03:00
|
|
|
#include "Window.bnd"
|
|
|
|
#include "Document.bnd"
|
|
|
|
#include "Node.bnd"
|
|
|
|
#include "NodeList.bnd"
|
|
|
|
#include "Element.bnd"
|
|
|
|
#include "HTMLCollection.bnd"
|
2015-09-07 15:52:57 +03:00
|
|
|
#include "Location.bnd"
|
2015-10-05 17:46:22 +03:00
|
|
|
#include "Navigator.bnd"
|
2015-10-09 16:54:26 +03:00
|
|
|
|
2015-10-13 23:26:23 +03:00
|
|
|
#include "HTMLElement.bnd"
|
|
|
|
|
|
|
|
/* specialisations of html_element */
|
2015-10-09 16:54:26 +03:00
|
|
|
#include "HTMLAnchorElement.bnd"
|
|
|
|
#include "HTMLAppletElement.bnd"
|
2015-10-09 17:03:25 +03:00
|
|
|
#include "HTMLAreaElement.bnd"
|
2015-10-10 12:28:10 +03:00
|
|
|
#include "HTMLBaseElement.bnd"
|
2015-10-10 13:08:48 +03:00
|
|
|
#include "HTMLBodyElement.bnd"
|
|
|
|
#include "HTMLButtonElement.bnd"
|
2015-10-07 16:45:57 +03:00
|
|
|
#include "HTMLBRElement.bnd"
|
2015-10-29 14:47:53 +03:00
|
|
|
#include "HTMLDivElement.bnd"
|
2015-10-12 11:18:04 +03:00
|
|
|
#include "HTMLFontElement.bnd"
|
2015-10-12 15:29:40 +03:00
|
|
|
#include "HTMLFormElement.bnd"
|
2015-10-13 11:22:46 +03:00
|
|
|
#include "HTMLFrameElement.bnd"
|
2015-10-13 11:27:06 +03:00
|
|
|
#include "HTMLFrameSetElement.bnd"
|
2015-10-13 11:57:35 +03:00
|
|
|
#include "HTMLHeadingElement.bnd"
|
2015-10-08 18:20:18 +03:00
|
|
|
#include "HTMLHRElement.bnd"
|
2015-10-13 12:37:12 +03:00
|
|
|
#include "HTMLHTMLElement.bnd"
|
2015-10-13 18:24:22 +03:00
|
|
|
#include "HTMLIFrameElement.bnd"
|
2015-10-13 22:41:10 +03:00
|
|
|
#include "HTMLImageElement.bnd"
|
2015-10-13 22:54:54 +03:00
|
|
|
#include "HTMLInputElement.bnd"
|
2015-10-13 23:00:02 +03:00
|
|
|
#include "HTMLLabelElement.bnd"
|
2015-10-13 23:26:23 +03:00
|
|
|
#include "HTMLLegendElement.bnd"
|
2015-10-14 00:23:22 +03:00
|
|
|
#include "HTMLLIElement.bnd"
|
2015-10-14 01:17:05 +03:00
|
|
|
#include "HTMLLinkElement.bnd"
|
2015-10-14 01:20:50 +03:00
|
|
|
#include "HTMLMapElement.bnd"
|
2015-10-14 01:24:37 +03:00
|
|
|
#include "HTMLMarqueeElement.bnd"
|
2015-10-14 01:31:52 +03:00
|
|
|
#include "HTMLMenuElement.bnd"
|
|
|
|
#include "HTMLMetaElement.bnd"
|
2015-10-14 01:36:01 +03:00
|
|
|
#include "HTMLObjectElement.bnd"
|
2015-10-14 11:09:41 +03:00
|
|
|
#include "HTMLOptionElement.bnd"
|
2015-10-24 21:39:07 +03:00
|
|
|
#include "HTMLOListElement.bnd"
|
2015-10-14 11:15:59 +03:00
|
|
|
#include "HTMLParagraphElement.bnd"
|
2015-10-14 11:21:26 +03:00
|
|
|
#include "HTMLParamElement.bnd"
|
2015-10-25 22:12:12 +03:00
|
|
|
#include "HTMLPreElement.bnd"
|
2015-10-14 14:51:35 +03:00
|
|
|
#include "HTMLQuoteElement.bnd"
|
2015-10-14 15:20:28 +03:00
|
|
|
#include "HTMLScriptElement.bnd"
|
2015-10-14 15:28:19 +03:00
|
|
|
#include "HTMLSelectElement.bnd"
|
2015-10-14 16:17:30 +03:00
|
|
|
#include "HTMLStyleElement.bnd"
|
2015-10-14 16:22:56 +03:00
|
|
|
#include "HTMLTableCaptionElement.bnd"
|
2015-10-14 16:46:31 +03:00
|
|
|
#include "HTMLTableCellElement.bnd"
|
2015-10-14 17:09:16 +03:00
|
|
|
#include "HTMLTableColElement.bnd"
|
2015-10-14 17:15:42 +03:00
|
|
|
#include "HTMLTableElement.bnd"
|
2015-10-14 17:36:43 +03:00
|
|
|
#include "HTMLTableRowElement.bnd"
|
2015-10-14 17:39:45 +03:00
|
|
|
#include "HTMLTableSectionElement.bnd"
|
2015-10-14 17:48:35 +03:00
|
|
|
#include "HTMLTextAreaElement.bnd"
|
2015-10-14 17:54:22 +03:00
|
|
|
#include "HTMLTitleElement.bnd"
|
2015-08-09 14:26:41 +03:00
|
|
|
|
2015-09-28 10:56:23 +03:00
|
|
|
init HTMLUnknownElement(struct dom_html_element *html_unknown_element::html_element);
|
|
|
|
init HTMLDirectoryElement(struct dom_html_element *html_directory_element::html_element);
|
|
|
|
init HTMLCanvasElement(struct dom_html_element *html_canvas_element::html_element);
|
|
|
|
init HTMLTemplateElement(struct dom_html_element *html_template_element::html_element);
|
|
|
|
init HTMLDialogElement(struct dom_html_element *html_dialog_element::html_element);
|
|
|
|
init HTMLMenuItemElement(struct dom_html_element *html_menu_item_element::html_element);
|
|
|
|
init HTMLDetailsElement(struct dom_html_element *html_details_element::html_element);
|
|
|
|
init HTMLFieldSetElement(struct dom_html_element *html_field_set_element::html_element);
|
|
|
|
init HTMLMeterElement(struct dom_html_element *html_meter_element::html_element);
|
|
|
|
init HTMLProgressElement(struct dom_html_element *html_progress_element::html_element);
|
|
|
|
init HTMLOutputElement(struct dom_html_element *html_output_element::html_element);
|
|
|
|
init HTMLKeygenElement(struct dom_html_element *html_keygen_element::html_element);
|
|
|
|
init HTMLOptGroupElement(struct dom_html_element *html_opt_group_element::html_element);
|
|
|
|
init HTMLDataListElement(struct dom_html_element *html_data_list_element::html_element);
|
|
|
|
init HTMLMediaElement(struct dom_html_element *html_media_element::html_element);
|
|
|
|
init HTMLTrackElement(struct dom_html_element *html_track_element::html_element);
|
|
|
|
init HTMLEmbedElement(struct dom_html_element *html_embed_element::html_element);
|
|
|
|
init HTMLSourceElement(struct dom_html_element *html_source_element::html_element);
|
|
|
|
init HTMLPictureElement(struct dom_html_element *html_picture_element::html_element);
|
|
|
|
init HTMLModElement(struct dom_html_element *html_mod_element::html_element);
|
|
|
|
init HTMLSpanElement(struct dom_html_element *html_span_element::html_element);
|
|
|
|
init HTMLTimeElement(struct dom_html_element *html_time_element::html_element);
|
|
|
|
init HTMLDataElement(struct dom_html_element *html_data_element::html_element);
|
|
|
|
init HTMLDListElement(struct dom_html_element *html_d_list_element::html_element);
|
|
|
|
init HTMLUListElement(struct dom_html_element *html_u_list_element::html_element);
|
|
|
|
init HTMLHeadElement(struct dom_html_element *html_head_element::html_element);
|
2015-08-09 14:26:41 +03:00
|
|
|
|
|
|
|
/* specialisations of HTMLTableCellElement */
|
2015-09-28 10:56:23 +03:00
|
|
|
init HTMLTableHeaderCellElement(struct dom_html_element *html_table_header_cell_element::html_table_cell_element);
|
|
|
|
init HTMLTableDataCellElement(struct dom_html_element *html_table_data_cell_element::html_table_cell_element);
|
2015-08-09 14:26:41 +03:00
|
|
|
|
|
|
|
/* specialisations of html_media_element */
|
2015-09-28 10:56:23 +03:00
|
|
|
init HTMLAudioElement(struct dom_html_element *html_audio_element::html_media_element);
|
|
|
|
init HTMLVideoElement(struct dom_html_element *html_video_element::html_media_element);
|
2015-08-09 14:26:41 +03:00
|
|
|
|
2015-09-28 10:56:23 +03:00
|
|
|
init Text(struct dom_node_text *text::character_data);
|
|
|
|
init Comment(struct dom_node_comment *comment::character_data);
|
|
|
|
init ProcessingInstruction(struct dom_node_text *text::character_data);
|
2015-08-09 14:26:41 +03:00
|
|
|
|
2015-09-28 10:56:23 +03:00
|
|
|
init XMLDocument(struct dom_document *document);
|
2015-08-09 14:26:41 +03:00
|
|
|
|
2015-09-28 10:56:23 +03:00
|
|
|
init CharacterData(struct dom_node_character_data *character_data::node);
|
|
|
|
init DocumentFragment(struct dom_document *document::node);
|
|
|
|
init DocumentType(struct dom_document *document::node);
|
2015-08-09 14:26:41 +03:00
|
|
|
|
2015-09-28 10:56:23 +03:00
|
|
|
init PropertyNodeList(struct dom_nodelist *nodes);
|
|
|
|
init RadioNodeList(struct dom_nodelist *nodes);
|
2015-08-09 14:26:41 +03:00
|
|
|
|
2015-09-28 10:56:23 +03:00
|
|
|
init HTMLAllCollection(struct dom_html_collection *coll);
|
|
|
|
init HTMLFormControlsCollection(struct dom_html_collection *coll);
|
|
|
|
init HTMLOptionsCollection(struct dom_html_collection *coll);
|
|
|
|
init HTMLPropertiesCollection(struct dom_html_collection *coll);
|
2015-08-09 14:26:41 +03:00
|
|
|
|
|
|
|
|