Update bindings to cope with improved nsgenbind syntax

This commit is contained in:
Vincent Sanders 2015-09-28 08:56:23 +01:00
parent 51c2dd70e2
commit 4bdd4cf7b6
9 changed files with 117 additions and 115 deletions

View File

@ -10,7 +10,7 @@
*/
class Console {
private "unsigned int" group;
private unsigned int group;
prologue %{
#include <nsutils/time.h>
@ -38,7 +38,7 @@ write_log_entry(duk_context *ctx, unsigned int group, char logtype)
}
%};
}
};
init Console ()
%{
@ -174,4 +174,4 @@ method Console::trace ()
duk_set_top(ctx, 1);
write_log_entry(ctx, priv->group, 'S');
return 0;
%}
%}

View File

@ -14,9 +14,9 @@ class Document {
#include "render/html_internal.h"
#include "utils/libdom.h"
%};
}
};
init Document("struct dom_document *" document::node);
init Document(struct dom_document *document::node);
method Document::write()
%{

View File

@ -11,9 +11,9 @@
class Element {
prologue %{
%};
}
};
init Element("struct dom_element *" element::node);
init Element(struct dom_element *element::node);
getter Element::firstElementChild()
%{

View File

@ -9,10 +9,10 @@
*/
class HTMLCollection {
private "struct dom_html_collection *" coll;
}
private struct dom_html_collection *coll;
};
init HTMLCollection("struct dom_html_collection *" coll)
init HTMLCollection(struct dom_html_collection *coll)
%{
priv->coll = coll;
dom_html_collection_ref(coll);

View File

@ -10,13 +10,15 @@
*/
class Location {
private "nsurl *" url;
prologue %{
#include "desktop/browser.h"
%};
}
private nsurl *url;
};
init Location("nsurl *" url)
prologue Location()
%{
#include "desktop/browser.h"
%}
init Location(nsurl *url)
%{
priv->url = url;
nsurl_ref(url);

View File

@ -9,10 +9,10 @@
*/
class Node {
private "dom_node *" node;
}
private dom_node *node;
};
init Node("struct dom_node *" node)
init Node(struct dom_node *node)
%{
priv->node = node;
dom_node_ref(node);

View File

@ -9,10 +9,10 @@
*/
class NodeList {
private "struct dom_nodelist *" nodes;
}
private struct dom_nodelist *nodes;
};
init NodeList("struct dom_nodelist *" nodes)
init NodeList(struct dom_nodelist *nodes)
%{
priv->nodes = nodes;
dom_nodelist_ref(nodes);

View File

@ -9,17 +9,17 @@
*/
class Window {
private "struct browser_window *" win;
private "struct html_content *" htmlc;
private struct browser_window * win;
private struct html_content * htmlc;
prologue %{
#include "utils/nsurl.h"
#include "desktop/browser.h"
#include "render/html.h"
#include "render/html_internal.h"
%};
}
};
init Window("struct browser_window *" win, "struct html_content *" htmlc)
init Window(struct browser_window *win, struct html_content *htmlc)
%{
/* element window */
priv->win = win;

View File

@ -50,7 +50,7 @@ struct dom_html_br_element;
#include "javascript/dukky.h"
%};
}
};
#include "Console.bnd"
#include "Window.bnd"
@ -62,103 +62,103 @@ struct dom_html_br_element;
#include "Location.bnd"
/* specialisations of html_element */
init HTMLUnknownElement("struct dom_html_element *" html_unknown_element::html_element);
init HTMLFontElement("struct dom_html_element *" html_font_element::html_element);
init HTMLDirectoryElement("struct dom_html_element *" html_directory_element::html_element);
init HTMLFrameElement("struct dom_html_element *" html_frame_element::html_element);
init HTMLFrameSetElement("struct dom_html_element *" html_frame_set_element::html_element);
init HTMLMarqueeElement("struct dom_html_element *" html_marquee_element::html_element);
init HTMLAppletElement("struct dom_html_element *" html_applet_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 HTMLScriptElement("struct dom_html_element *" html_script_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 HTMLMenuElement("struct dom_html_element *" html_menu_element::html_element);
init HTMLDetailsElement("struct dom_html_element *" html_details_element::html_element);
init HTMLLegendElement("struct dom_html_element *" html_legend_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 HTMLTextAreaElement("struct dom_html_element *" html_text_area_element::html_element);
init HTMLOptionElement("struct dom_html_element *" html_option_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 HTMLSelectElement("struct dom_html_element *" html_select_element::html_element);
init HTMLButtonElement("struct dom_html_element *" html_button_element::html_element);
init HTMLInputElement("struct dom_html_element *" html_input_element::html_element);
init HTMLLabelElement("struct dom_html_element *" html_label_element::html_element);
init HTMLFormElement("struct dom_html_element *" html_form_element::html_element);
init HTMLTableCellElement("struct dom_html_element *" html_table_cell_element::html_element);
init HTMLTableRowElement("struct dom_html_element *" html_table_row_element::html_element);
init HTMLTableSectionElement("struct dom_html_element *" html_table_section_element::html_element);
init HTMLTableColElement("struct dom_html_element *" html_table_col_element::html_element);
init HTMLTableCaptionElement("struct dom_html_element *" html_table_caption_element::html_element);
init HTMLTableElement("struct dom_html_element *" html_table_element::html_element);
init HTMLAreaElement("struct dom_html_element *" html_area_element::html_element);
init HTMLMapElement("struct dom_html_element *" html_map_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 HTMLParamElement("struct dom_html_element *" html_param_element::html_element);
init HTMLObjectElement("struct dom_html_element *" html_object_element::html_element);
init HTMLEmbedElement("struct dom_html_element *" html_embed_element::html_element);
init HTMLIFrameElement("struct dom_html_element *" html_i_frame_element::html_element);
init HTMLImageElement("struct dom_html_element *" html_image_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 HTMLBRElement("struct dom_html_element *" html_br_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 HTMLAnchorElement("struct dom_html_element *" html_anchor_element::html_element);
init HTMLDivElement("struct dom_html_element *" html_div_element::html_element);
init HTMLDListElement("struct dom_html_element *" html_d_list_element::html_element);
init HTMLLIElement("struct dom_html_element *" html_li_element::html_element);
init HTMLUListElement("struct dom_html_element *" html_u_list_element::html_element);
init HTMLOListElement("struct dom_html_element *" html_o_list_element::html_element);
init HTMLQuoteElement("struct dom_html_element *" html_quote_element::html_element);
init HTMLPreElement("struct dom_html_element *" html_pre_element::html_element);
init HTMLHRElement("struct dom_html_element *" html_hr_element::html_element);
init HTMLParagraphElement("struct dom_html_element *" html_paragraph_element::html_element);
init HTMLHeadingElement("struct dom_html_element *" html_heading_element::html_element);
init HTMLBodyElement("struct dom_html_element *" html_body_element::html_element);
init HTMLStyleElement("struct dom_html_element *" html_style_element::html_element);
init HTMLMetaElement("struct dom_html_element *" html_meta_element::html_element);
init HTMLLinkElement("struct dom_html_element *" html_link_element::html_element);
init HTMLBaseElement("struct dom_html_element *" html_base_element::html_element);
init HTMLTitleElement("struct dom_html_element *" html_title_element::html_element);
init HTMLHeadElement("struct dom_html_element *" html_head_element::html_element);
init HTMLHtmlElement("struct dom_html_element *" html_html_element::html_element);
init HTMLUnknownElement(struct dom_html_element *html_unknown_element::html_element);
init HTMLFontElement(struct dom_html_element *html_font_element::html_element);
init HTMLDirectoryElement(struct dom_html_element *html_directory_element::html_element);
init HTMLFrameElement(struct dom_html_element *html_frame_element::html_element);
init HTMLFrameSetElement(struct dom_html_element *html_frame_set_element::html_element);
init HTMLMarqueeElement(struct dom_html_element *html_marquee_element::html_element);
init HTMLAppletElement(struct dom_html_element *html_applet_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 HTMLScriptElement(struct dom_html_element *html_script_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 HTMLMenuElement(struct dom_html_element *html_menu_element::html_element);
init HTMLDetailsElement(struct dom_html_element *html_details_element::html_element);
init HTMLLegendElement(struct dom_html_element *html_legend_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 HTMLTextAreaElement(struct dom_html_element *html_text_area_element::html_element);
init HTMLOptionElement(struct dom_html_element *html_option_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 HTMLSelectElement(struct dom_html_element *html_select_element::html_element);
init HTMLButtonElement(struct dom_html_element *html_button_element::html_element);
init HTMLInputElement(struct dom_html_element *html_input_element::html_element);
init HTMLLabelElement(struct dom_html_element *html_label_element::html_element);
init HTMLFormElement(struct dom_html_element *html_form_element::html_element);
init HTMLTableCellElement(struct dom_html_element *html_table_cell_element::html_element);
init HTMLTableRowElement(struct dom_html_element *html_table_row_element::html_element);
init HTMLTableSectionElement(struct dom_html_element *html_table_section_element::html_element);
init HTMLTableColElement(struct dom_html_element *html_table_col_element::html_element);
init HTMLTableCaptionElement(struct dom_html_element *html_table_caption_element::html_element);
init HTMLTableElement(struct dom_html_element *html_table_element::html_element);
init HTMLAreaElement(struct dom_html_element *html_area_element::html_element);
init HTMLMapElement(struct dom_html_element *html_map_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 HTMLParamElement(struct dom_html_element *html_param_element::html_element);
init HTMLObjectElement(struct dom_html_element *html_object_element::html_element);
init HTMLEmbedElement(struct dom_html_element *html_embed_element::html_element);
init HTMLIFrameElement(struct dom_html_element *html_i_frame_element::html_element);
init HTMLImageElement(struct dom_html_element *html_image_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 HTMLBRElement(struct dom_html_element *html_br_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 HTMLAnchorElement(struct dom_html_element *html_anchor_element::html_element);
init HTMLDivElement(struct dom_html_element *html_div_element::html_element);
init HTMLDListElement(struct dom_html_element *html_d_list_element::html_element);
init HTMLLIElement(struct dom_html_element *html_li_element::html_element);
init HTMLUListElement(struct dom_html_element *html_u_list_element::html_element);
init HTMLOListElement(struct dom_html_element *html_o_list_element::html_element);
init HTMLQuoteElement(struct dom_html_element *html_quote_element::html_element);
init HTMLPreElement(struct dom_html_element *html_pre_element::html_element);
init HTMLHRElement(struct dom_html_element *html_hr_element::html_element);
init HTMLParagraphElement(struct dom_html_element *html_paragraph_element::html_element);
init HTMLHeadingElement(struct dom_html_element *html_heading_element::html_element);
init HTMLBodyElement(struct dom_html_element *html_body_element::html_element);
init HTMLStyleElement(struct dom_html_element *html_style_element::html_element);
init HTMLMetaElement(struct dom_html_element *html_meta_element::html_element);
init HTMLLinkElement(struct dom_html_element *html_link_element::html_element);
init HTMLBaseElement(struct dom_html_element *html_base_element::html_element);
init HTMLTitleElement(struct dom_html_element *html_title_element::html_element);
init HTMLHeadElement(struct dom_html_element *html_head_element::html_element);
init HTMLHtmlElement(struct dom_html_element *html_html_element::html_element);
/* specialisations of HTMLTableCellElement */
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);
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);
/* specialisations of html_media_element */
init HTMLAudioElement("struct dom_html_element *" html_audio_element::html_media_element);
init HTMLVideoElement("struct dom_html_element *" html_video_element::html_media_element);
init HTMLAudioElement(struct dom_html_element *html_audio_element::html_media_element);
init HTMLVideoElement(struct dom_html_element *html_video_element::html_media_element);
init HTMLElement("struct dom_html_element *" html_element::element);
init HTMLElement(struct dom_html_element *html_element::element);
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);
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);
init XMLDocument("struct dom_document *" document);
init XMLDocument(struct dom_document *document);
init CharacterData("struct dom_node_character_data *" character_data::node);
init DocumentFragment("struct dom_document *" document::node);
init DocumentType("struct dom_document *" document::node);
init CharacterData(struct dom_node_character_data *character_data::node);
init DocumentFragment(struct dom_document *document::node);
init DocumentType(struct dom_document *document::node);
init PropertyNodeList("struct dom_nodelist *" nodes);
init RadioNodeList("struct dom_nodelist *" nodes);
init PropertyNodeList(struct dom_nodelist *nodes);
init RadioNodeList(struct dom_nodelist *nodes);
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);
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);