summaryrefslogtreecommitdiff
path: root/include/dom/html
diff options
context:
space:
mode:
Diffstat (limited to 'include/dom/html')
-rw-r--r--include/dom/html/html_anchor_element.h7
-rw-r--r--include/dom/html/html_applet_element.h7
-rw-r--r--include/dom/html/html_area_element.h7
-rw-r--r--include/dom/html/html_base_element.h14
-rw-r--r--include/dom/html/html_basefont_element.h7
-rw-r--r--include/dom/html/html_body_element.h14
-rw-r--r--include/dom/html/html_br_element.h7
-rw-r--r--include/dom/html/html_button_element.h7
-rw-r--r--include/dom/html/html_collection.h29
-rw-r--r--include/dom/html/html_directory_element.h7
-rw-r--r--include/dom/html/html_div_element.h7
-rw-r--r--include/dom/html/html_dlist_element.h7
-rw-r--r--include/dom/html/html_document.h97
-rw-r--r--include/dom/html/html_element.h26
-rw-r--r--include/dom/html/html_fieldset_element.h7
-rw-r--r--include/dom/html/html_font_element.h7
-rw-r--r--include/dom/html/html_form_element.h25
-rw-r--r--include/dom/html/html_frame_element.h7
-rw-r--r--include/dom/html/html_frameset_element.h7
-rw-r--r--include/dom/html/html_head_element.h14
-rw-r--r--include/dom/html/html_heading_element.h7
-rw-r--r--include/dom/html/html_hr_element.h7
-rw-r--r--include/dom/html/html_html_element.h14
-rw-r--r--include/dom/html/html_iframe_element.h7
-rw-r--r--include/dom/html/html_image_element.h7
-rw-r--r--include/dom/html/html_input_element.h7
-rw-r--r--include/dom/html/html_isindex_element.h26
-rw-r--r--include/dom/html/html_label_element.h7
-rw-r--r--include/dom/html/html_legend_element.h7
-rw-r--r--include/dom/html/html_li_element.h7
-rw-r--r--include/dom/html/html_link_element.h23
-rw-r--r--include/dom/html/html_map_element.h7
-rw-r--r--include/dom/html/html_menu_element.h7
-rw-r--r--include/dom/html/html_meta_element.h14
-rw-r--r--include/dom/html/html_mod_element.h7
-rw-r--r--include/dom/html/html_object_element.h7
-rw-r--r--include/dom/html/html_olist_element.h7
-rw-r--r--include/dom/html/html_optgroup_element.h7
-rw-r--r--include/dom/html/html_option_element.h7
-rw-r--r--include/dom/html/html_options_collection.h33
-rw-r--r--include/dom/html/html_paragraph_element.h7
-rw-r--r--include/dom/html/html_param_element.h7
-rw-r--r--include/dom/html/html_pre_element.h7
-rw-r--r--include/dom/html/html_quote_element.h7
-rw-r--r--include/dom/html/html_script_element.h7
-rw-r--r--include/dom/html/html_select_element.h55
-rw-r--r--include/dom/html/html_style_element.h23
-rw-r--r--include/dom/html/html_table_element.h7
-rw-r--r--include/dom/html/html_tablecaption_element.h7
-rw-r--r--include/dom/html/html_tablecell_element.h7
-rw-r--r--include/dom/html/html_tablecol_element.h7
-rw-r--r--include/dom/html/html_tablerow_element.h7
-rw-r--r--include/dom/html/html_tablesection_element.h7
-rw-r--r--include/dom/html/html_textarea_element.h7
-rw-r--r--include/dom/html/html_title_element.h24
-rw-r--r--include/dom/html/html_ulist_element.h7
56 files changed, 718 insertions, 0 deletions
diff --git a/include/dom/html/html_anchor_element.h b/include/dom/html/html_anchor_element.h
new file mode 100644
index 0000000..2e182d5
--- /dev/null
+++ b/include/dom/html/html_anchor_element.h
@@ -0,0 +1,7 @@
+/*
+ * This file is part of libdom.
+ * Licensed under the MIT License,
+ * http://www.opensource.org/licenses/mit-license.php
+ * Copyright 2009 Bo Yang <struggleyb.nku@gmail.com>
+ */
+
diff --git a/include/dom/html/html_applet_element.h b/include/dom/html/html_applet_element.h
new file mode 100644
index 0000000..2e182d5
--- /dev/null
+++ b/include/dom/html/html_applet_element.h
@@ -0,0 +1,7 @@
+/*
+ * This file is part of libdom.
+ * Licensed under the MIT License,
+ * http://www.opensource.org/licenses/mit-license.php
+ * Copyright 2009 Bo Yang <struggleyb.nku@gmail.com>
+ */
+
diff --git a/include/dom/html/html_area_element.h b/include/dom/html/html_area_element.h
new file mode 100644
index 0000000..2e182d5
--- /dev/null
+++ b/include/dom/html/html_area_element.h
@@ -0,0 +1,7 @@
+/*
+ * This file is part of libdom.
+ * Licensed under the MIT License,
+ * http://www.opensource.org/licenses/mit-license.php
+ * Copyright 2009 Bo Yang <struggleyb.nku@gmail.com>
+ */
+
diff --git a/include/dom/html/html_base_element.h b/include/dom/html/html_base_element.h
new file mode 100644
index 0000000..5ff28ee
--- /dev/null
+++ b/include/dom/html/html_base_element.h
@@ -0,0 +1,14 @@
+/*
+ * This file is part of libdom.
+ * Licensed under the MIT License,
+ * http://www.opensource.org/licenses/mit-license.php
+ * Copyright 2009 Bo Yang <struggleyb.nku.com>
+ */
+
+#ifndef dom_html_base_element_h_
+#define dom_html_base_element_h_
+
+typedef struct dom_html_base_element dom_html_base_element;
+
+#endif
+
diff --git a/include/dom/html/html_basefont_element.h b/include/dom/html/html_basefont_element.h
new file mode 100644
index 0000000..2e182d5
--- /dev/null
+++ b/include/dom/html/html_basefont_element.h
@@ -0,0 +1,7 @@
+/*
+ * This file is part of libdom.
+ * Licensed under the MIT License,
+ * http://www.opensource.org/licenses/mit-license.php
+ * Copyright 2009 Bo Yang <struggleyb.nku@gmail.com>
+ */
+
diff --git a/include/dom/html/html_body_element.h b/include/dom/html/html_body_element.h
new file mode 100644
index 0000000..4df4ead
--- /dev/null
+++ b/include/dom/html/html_body_element.h
@@ -0,0 +1,14 @@
+/*
+ * This file is part of libdom.
+ * Licensed under the MIT License,
+ * http://www.opensource.org/licenses/mit-license.php
+ * Copyright 2009 Bo Yang <struggleyb.nku.com>
+ */
+
+#ifndef dom_html_body_element_h_
+#define dom_html_body_element_h_
+
+typedef struct dom_html_body_element dom_html_body_element;
+
+#endif
+
diff --git a/include/dom/html/html_br_element.h b/include/dom/html/html_br_element.h
new file mode 100644
index 0000000..2e182d5
--- /dev/null
+++ b/include/dom/html/html_br_element.h
@@ -0,0 +1,7 @@
+/*
+ * This file is part of libdom.
+ * Licensed under the MIT License,
+ * http://www.opensource.org/licenses/mit-license.php
+ * Copyright 2009 Bo Yang <struggleyb.nku@gmail.com>
+ */
+
diff --git a/include/dom/html/html_button_element.h b/include/dom/html/html_button_element.h
new file mode 100644
index 0000000..2e182d5
--- /dev/null
+++ b/include/dom/html/html_button_element.h
@@ -0,0 +1,7 @@
+/*
+ * This file is part of libdom.
+ * Licensed under the MIT License,
+ * http://www.opensource.org/licenses/mit-license.php
+ * Copyright 2009 Bo Yang <struggleyb.nku@gmail.com>
+ */
+
diff --git a/include/dom/html/html_collection.h b/include/dom/html/html_collection.h
new file mode 100644
index 0000000..09cf6ed
--- /dev/null
+++ b/include/dom/html/html_collection.h
@@ -0,0 +1,29 @@
+/*
+ * This file is part of libdom.
+ * Licensed under the MIT License,
+ * http://www.opensource.org/licenses/mit-license.php
+ * Copyright 2009 Bo Yang <struggleyb.nku@gmail.com>
+ */
+
+#ifndef dom_html_collection_h_
+#define dom_html_collection_h_
+
+#include <dom/core/exceptions.h>
+
+struct dom_node;
+struct dom_string;
+
+typedef struct dom_html_collection dom_html_collection;
+
+dom_exception dom_html_collection_get_length(dom_html_collection *col,
+ unsigned long *len);
+dom_exception dom_html_collection_item(dom_html_collection *col,
+ unsigned long index, struct dom_node **node);
+dom_exception dom_html_collection_named_item(dom_html_collection *col,
+ struct dom_string *name, struct dom_node **node);
+
+void dom_html_collection_ref(dom_html_collection *col);
+void dom_html_collection_unref(dom_html_collection *col);
+
+#endif
+
diff --git a/include/dom/html/html_directory_element.h b/include/dom/html/html_directory_element.h
new file mode 100644
index 0000000..2e182d5
--- /dev/null
+++ b/include/dom/html/html_directory_element.h
@@ -0,0 +1,7 @@
+/*
+ * This file is part of libdom.
+ * Licensed under the MIT License,
+ * http://www.opensource.org/licenses/mit-license.php
+ * Copyright 2009 Bo Yang <struggleyb.nku@gmail.com>
+ */
+
diff --git a/include/dom/html/html_div_element.h b/include/dom/html/html_div_element.h
new file mode 100644
index 0000000..2e182d5
--- /dev/null
+++ b/include/dom/html/html_div_element.h
@@ -0,0 +1,7 @@
+/*
+ * This file is part of libdom.
+ * Licensed under the MIT License,
+ * http://www.opensource.org/licenses/mit-license.php
+ * Copyright 2009 Bo Yang <struggleyb.nku@gmail.com>
+ */
+
diff --git a/include/dom/html/html_dlist_element.h b/include/dom/html/html_dlist_element.h
new file mode 100644
index 0000000..2e182d5
--- /dev/null
+++ b/include/dom/html/html_dlist_element.h
@@ -0,0 +1,7 @@
+/*
+ * This file is part of libdom.
+ * Licensed under the MIT License,
+ * http://www.opensource.org/licenses/mit-license.php
+ * Copyright 2009 Bo Yang <struggleyb.nku@gmail.com>
+ */
+
diff --git a/include/dom/html/html_document.h b/include/dom/html/html_document.h
new file mode 100644
index 0000000..00a355e
--- /dev/null
+++ b/include/dom/html/html_document.h
@@ -0,0 +1,97 @@
+/*
+ * This file is part of libdom.
+ * Licensed under the MIT License,
+ * http://www.opensource.org/licenses/mit-license.php
+ * Copyright 2009 Bo Yang <struggleyb.nku@gmail.com>
+ */
+
+#ifndef dom_html_document_h_
+#define dom_html_document_h_
+
+#include <dom/core/exceptions.h>
+#include <dom/functypes.h>
+#include <dom/events/document_event.h>
+
+struct dom_element;
+struct dom_html_collection;
+struct dom_html_element;
+struct dom_nodelist;
+
+typedef struct dom_html_document dom_html_document;
+
+typedef enum {
+ DOM_HTML_PARSER = 0,
+ DOM_XML_PARSER = 1
+} dom_parser_type;
+
+/**
+ * Callbacks for UI related function calls
+ */
+struct dom_ui_handler {
+ dom_exception (*element_focus)(struct dom_element *element);
+ /* Callback for a focus DOM call */
+ dom_exception (*element_select)(struct dom_element *element);
+ /* Callback for a select DOM call */
+ dom_exception (*element_blur)(struct dom_element *element);
+ /* Callback for a blur DOM call */
+ dom_exception (*element_enable)(struct dom_element *element,
+ bool enable);
+ /* Callback for enable/disable an element */
+};
+typedef struct dom_ui_handler dom_ui_handler;
+
+/* Create a HTMLDocument */
+dom_exception dom_html_document_create(dom_alloc alloc, void *pw, dom_msg msg,
+ void *msg_pw,
+ dom_events_default_action_fetcher daf, dom_ui_handler ui,
+ dom_parser_type pt, dom_html_document **doc);
+
+/* Parse a data chunk into the HTMLDocument */
+dom_exception dom_html_document_write_data(uint8_t *data, size_t len);
+
+/* Notify the HTMLDocument that it is completed */
+dom_exception dom_html_document_complete(void);
+
+/*-----------------------------------------------------------------------*/
+/* The DOM spec public API */
+
+dom_exception dom_html_document_get_title(dom_html_document *doc,
+ struct dom_string **title);
+dom_exception dom_html_document_set_title(dom_html_document *doc,
+ struct dom_string *title);
+dom_exception dom_html_document_get_referer(dom_html_document *doc,
+ struct dom_string **referer);
+dom_exception dom_html_document_get_domain(dom_html_document *doc,
+ struct dom_string **domain);
+dom_exception dom_html_document_get_url(dom_html_document *doc,
+ struct dom_string **url);
+dom_exception dom_html_document_get_body(dom_html_document *doc,
+ struct dom_html_element **body);
+dom_exception dom_html_document_set_body(dom_html_document *doc,
+ struct dom_html_element *body);
+dom_exception dom_html_document_get_images(dom_html_document *doc,
+ struct dom_html_collection **col);
+dom_exception dom_html_document_get_applets(dom_html_document *doc,
+ struct dom_html_collection **col);
+dom_exception dom_html_document_get_links(dom_html_document *doc,
+ struct dom_html_collection **col);
+dom_exception dom_html_document_get_forms(dom_html_document *doc,
+ struct dom_html_collection **col);
+dom_exception dom_html_document_get_anchors(dom_html_document *doc,
+ struct dom_html_collection **col);
+dom_exception dom_html_document_get_cookie(dom_html_document *doc,
+ struct dom_string **cookie);
+dom_exception dom_html_document_set_cookie(dom_html_document *doc,
+ struct dom_string *cookie);
+
+dom_exception dom_html_document_open(dom_html_document *doc);
+dom_exception dom_html_document_close(dom_html_document *doc);
+dom_exception dom_html_document_write(dom_html_document *doc,
+ struct dom_string *text);
+dom_exception dom_html_document_writeln(dom_html_document *doc,
+ struct dom_string *text);
+dom_exception dom_html_document_get_elements_by_name(dom_html_document *doc,
+ struct dom_string *name, struct dom_nodelist **list);
+
+#endif
+
diff --git a/include/dom/html/html_element.h b/include/dom/html/html_element.h
new file mode 100644
index 0000000..8c41664
--- /dev/null
+++ b/include/dom/html/html_element.h
@@ -0,0 +1,26 @@
+/*
+ * This file is part of libdom.
+ * Licensed under the MIT License,
+ * http://www.opensource.org/licenses/mit-license.php
+ * Copyright 2009 Bo Yang <struggleyb.nku@gmail.com>
+ */
+
+#ifndef dom_html_element_h_
+#define dom_html_element_h_
+
+typedef struct dom_html_element dom_html_element;
+
+/**
+ * Note: DOM HTML spec is used to provide a more convenient way to
+ * access Element's attribute through property. But, for implementation like
+ * C, such propery provide no more convenience than Element.get(set)Attribute
+ * function, so we ignore all the propety whose type is DOMString in this
+ * implementation, clients can always access these property through
+ * get(set)Attribute methods.
+ *
+ * For the readonly property, an readonly Attr node should be created, so once
+ * these Attr nodes are created, they can not be changed any more.
+ */
+
+#endif
+
diff --git a/include/dom/html/html_fieldset_element.h b/include/dom/html/html_fieldset_element.h
new file mode 100644
index 0000000..2e182d5
--- /dev/null
+++ b/include/dom/html/html_fieldset_element.h
@@ -0,0 +1,7 @@
+/*
+ * This file is part of libdom.
+ * Licensed under the MIT License,
+ * http://www.opensource.org/licenses/mit-license.php
+ * Copyright 2009 Bo Yang <struggleyb.nku@gmail.com>
+ */
+
diff --git a/include/dom/html/html_font_element.h b/include/dom/html/html_font_element.h
new file mode 100644
index 0000000..2e182d5
--- /dev/null
+++ b/include/dom/html/html_font_element.h
@@ -0,0 +1,7 @@
+/*
+ * This file is part of libdom.
+ * Licensed under the MIT License,
+ * http://www.opensource.org/licenses/mit-license.php
+ * Copyright 2009 Bo Yang <struggleyb.nku@gmail.com>
+ */
+
diff --git a/include/dom/html/html_form_element.h b/include/dom/html/html_form_element.h
new file mode 100644
index 0000000..230846c
--- /dev/null
+++ b/include/dom/html/html_form_element.h
@@ -0,0 +1,25 @@
+/*
+ * This file is part of libdom.
+ * Licensed under the MIT License,
+ * http://www.opensource.org/licenses/mit-license.php
+ * Copyright 2009 Bo Yang <struggleyb.nku.com>
+ */
+
+#ifndef dom_html_form_element_h_
+#define dom_html_form_element_h_
+
+#include <dom/core/exceptions.h>
+
+struct dom_html_collection;
+
+typedef struct dom_html_form_element dom_html_form_element;
+
+dom_exception dom_html_form_element_get_elements(dom_html_form_element *ele,
+ struct dom_html_collection **col);
+dom_exception dom_html_form_element_get_length(dom_html_form_element *ele,
+ unsigned long *len);
+dom_exception dom_html_form_element_submit(dom_html_form_element *ele);
+dom_exception dom_html_form_element_reset(dom_html_form_element *ele);
+
+#endif
+
diff --git a/include/dom/html/html_frame_element.h b/include/dom/html/html_frame_element.h
new file mode 100644
index 0000000..2e182d5
--- /dev/null
+++ b/include/dom/html/html_frame_element.h
@@ -0,0 +1,7 @@
+/*
+ * This file is part of libdom.
+ * Licensed under the MIT License,
+ * http://www.opensource.org/licenses/mit-license.php
+ * Copyright 2009 Bo Yang <struggleyb.nku@gmail.com>
+ */
+
diff --git a/include/dom/html/html_frameset_element.h b/include/dom/html/html_frameset_element.h
new file mode 100644
index 0000000..2e182d5
--- /dev/null
+++ b/include/dom/html/html_frameset_element.h
@@ -0,0 +1,7 @@
+/*
+ * This file is part of libdom.
+ * Licensed under the MIT License,
+ * http://www.opensource.org/licenses/mit-license.php
+ * Copyright 2009 Bo Yang <struggleyb.nku@gmail.com>
+ */
+
diff --git a/include/dom/html/html_head_element.h b/include/dom/html/html_head_element.h
new file mode 100644
index 0000000..e00fc19
--- /dev/null
+++ b/include/dom/html/html_head_element.h
@@ -0,0 +1,14 @@
+/*
+ * This file is part of libdom.
+ * Licensed under the MIT License,
+ * http://www.opensource.org/licenses/mit-license.php
+ * Copyright 2009 Bo Yang <struggleyb.nku.com>
+ */
+
+#ifndef dom_html_head_element_h_
+#define dom_html_head_element_h_
+
+typedef struct dom_html_head_element dom_html_head_element;
+
+#endif
+
diff --git a/include/dom/html/html_heading_element.h b/include/dom/html/html_heading_element.h
new file mode 100644
index 0000000..2e182d5
--- /dev/null
+++ b/include/dom/html/html_heading_element.h
@@ -0,0 +1,7 @@
+/*
+ * This file is part of libdom.
+ * Licensed under the MIT License,
+ * http://www.opensource.org/licenses/mit-license.php
+ * Copyright 2009 Bo Yang <struggleyb.nku@gmail.com>
+ */
+
diff --git a/include/dom/html/html_hr_element.h b/include/dom/html/html_hr_element.h
new file mode 100644
index 0000000..2e182d5
--- /dev/null
+++ b/include/dom/html/html_hr_element.h
@@ -0,0 +1,7 @@
+/*
+ * This file is part of libdom.
+ * Licensed under the MIT License,
+ * http://www.opensource.org/licenses/mit-license.php
+ * Copyright 2009 Bo Yang <struggleyb.nku@gmail.com>
+ */
+
diff --git a/include/dom/html/html_html_element.h b/include/dom/html/html_html_element.h
new file mode 100644
index 0000000..80ef6af
--- /dev/null
+++ b/include/dom/html/html_html_element.h
@@ -0,0 +1,14 @@
+/*
+ * This file is part of libdom.
+ * Licensed under the MIT License,
+ * http://www.opensource.org/licenses/mit-license.php
+ * Copyright 2009 Bo Yang <struggleyb.nku.com>
+ */
+
+#ifndef dom_html_html_element_h_
+#define dom_html_html_element_h_
+
+typedef struct dom_html_html_element dom_html_html_element;
+
+#endif
+
diff --git a/include/dom/html/html_iframe_element.h b/include/dom/html/html_iframe_element.h
new file mode 100644
index 0000000..2e182d5
--- /dev/null
+++ b/include/dom/html/html_iframe_element.h
@@ -0,0 +1,7 @@
+/*
+ * This file is part of libdom.
+ * Licensed under the MIT License,
+ * http://www.opensource.org/licenses/mit-license.php
+ * Copyright 2009 Bo Yang <struggleyb.nku@gmail.com>
+ */
+
diff --git a/include/dom/html/html_image_element.h b/include/dom/html/html_image_element.h
new file mode 100644
index 0000000..2e182d5
--- /dev/null
+++ b/include/dom/html/html_image_element.h
@@ -0,0 +1,7 @@
+/*
+ * This file is part of libdom.
+ * Licensed under the MIT License,
+ * http://www.opensource.org/licenses/mit-license.php
+ * Copyright 2009 Bo Yang <struggleyb.nku@gmail.com>
+ */
+
diff --git a/include/dom/html/html_input_element.h b/include/dom/html/html_input_element.h
new file mode 100644
index 0000000..2e182d5
--- /dev/null
+++ b/include/dom/html/html_input_element.h
@@ -0,0 +1,7 @@
+/*
+ * This file is part of libdom.
+ * Licensed under the MIT License,
+ * http://www.opensource.org/licenses/mit-license.php
+ * Copyright 2009 Bo Yang <struggleyb.nku@gmail.com>
+ */
+
diff --git a/include/dom/html/html_isindex_element.h b/include/dom/html/html_isindex_element.h
new file mode 100644
index 0000000..4961ccc
--- /dev/null
+++ b/include/dom/html/html_isindex_element.h
@@ -0,0 +1,26 @@
+/*
+ * This file is part of libdom.
+ * Licensed under the MIT License,
+ * http://www.opensource.org/licenses/mit-license.php
+ * Copyright 2009 Bo Yang <struggleyb.nku.com>
+ */
+
+#ifndef dom_html_isindex_element_h_
+#define dom_html_isindex_element_h_
+
+#include <dom/core/exceptions.h>
+
+struct dom_html_form_element;
+
+/**
+ * Note: the HTML 4.01 spec said: this element is deprecated, use
+ * <INPUT> element instead.
+ */
+
+typedef struct dom_html_isindex_element dom_html_isindex_element;
+
+dom_exception dom_html_isindex_element_get_form(dom_html_isindex_element *ele,
+ struct dom_html_form_element **form);
+
+#endif
+
diff --git a/include/dom/html/html_label_element.h b/include/dom/html/html_label_element.h
new file mode 100644
index 0000000..2e182d5
--- /dev/null
+++ b/include/dom/html/html_label_element.h
@@ -0,0 +1,7 @@
+/*
+ * This file is part of libdom.
+ * Licensed under the MIT License,
+ * http://www.opensource.org/licenses/mit-license.php
+ * Copyright 2009 Bo Yang <struggleyb.nku@gmail.com>
+ */
+
diff --git a/include/dom/html/html_legend_element.h b/include/dom/html/html_legend_element.h
new file mode 100644
index 0000000..2e182d5
--- /dev/null
+++ b/include/dom/html/html_legend_element.h
@@ -0,0 +1,7 @@
+/*
+ * This file is part of libdom.
+ * Licensed under the MIT License,
+ * http://www.opensource.org/licenses/mit-license.php
+ * Copyright 2009 Bo Yang <struggleyb.nku@gmail.com>
+ */
+
diff --git a/include/dom/html/html_li_element.h b/include/dom/html/html_li_element.h
new file mode 100644
index 0000000..2e182d5
--- /dev/null
+++ b/include/dom/html/html_li_element.h
@@ -0,0 +1,7 @@
+/*
+ * This file is part of libdom.
+ * Licensed under the MIT License,
+ * http://www.opensource.org/licenses/mit-license.php
+ * Copyright 2009 Bo Yang <struggleyb.nku@gmail.com>
+ */
+
diff --git a/include/dom/html/html_link_element.h b/include/dom/html/html_link_element.h
new file mode 100644
index 0000000..c96d020
--- /dev/null
+++ b/include/dom/html/html_link_element.h
@@ -0,0 +1,23 @@
+/*
+ * This file is part of libdom.
+ * Licensed under the MIT License,
+ * http://www.opensource.org/licenses/mit-license.php
+ * Copyright 2009 Bo Yang <struggleyb.nku.com>
+ */
+
+#ifndef dom_html_link_element_h_
+#define dom_html_link_element_h_
+
+#include <stdbool.h>
+#include <dom/core/exceptions.h>
+
+typedef struct dom_html_link_element dom_html_link_element;
+
+dom_exception dom_html_link_element_get_disabled(dom_html_link_element *ele,
+ bool *disabled);
+
+dom_exception dom_html_link_element_set_disabled(dom_html_link_element *ele,
+ bool disabled);
+
+#endif
+
diff --git a/include/dom/html/html_map_element.h b/include/dom/html/html_map_element.h
new file mode 100644
index 0000000..2e182d5
--- /dev/null
+++ b/include/dom/html/html_map_element.h
@@ -0,0 +1,7 @@
+/*
+ * This file is part of libdom.
+ * Licensed under the MIT License,
+ * http://www.opensource.org/licenses/mit-license.php
+ * Copyright 2009 Bo Yang <struggleyb.nku@gmail.com>
+ */
+
diff --git a/include/dom/html/html_menu_element.h b/include/dom/html/html_menu_element.h
new file mode 100644
index 0000000..2e182d5
--- /dev/null
+++ b/include/dom/html/html_menu_element.h
@@ -0,0 +1,7 @@
+/*
+ * This file is part of libdom.
+ * Licensed under the MIT License,
+ * http://www.opensource.org/licenses/mit-license.php
+ * Copyright 2009 Bo Yang <struggleyb.nku@gmail.com>
+ */
+
diff --git a/include/dom/html/html_meta_element.h b/include/dom/html/html_meta_element.h
new file mode 100644
index 0000000..8ceb459
--- /dev/null
+++ b/include/dom/html/html_meta_element.h
@@ -0,0 +1,14 @@
+/*
+ * This file is part of libdom.
+ * Licensed under the MIT License,
+ * http://www.opensource.org/licenses/mit-license.php
+ * Copyright 2009 Bo Yang <struggleyb.nku.com>
+ */
+
+#ifndef dom_html_meta_element_h_
+#define dom_html_meta_element_h_
+
+typedef struct dom_html_meta_element dom_html_meta_element;
+
+#endif
+
diff --git a/include/dom/html/html_mod_element.h b/include/dom/html/html_mod_element.h
new file mode 100644
index 0000000..2e182d5
--- /dev/null
+++ b/include/dom/html/html_mod_element.h
@@ -0,0 +1,7 @@
+/*
+ * This file is part of libdom.
+ * Licensed under the MIT License,
+ * http://www.opensource.org/licenses/mit-license.php
+ * Copyright 2009 Bo Yang <struggleyb.nku@gmail.com>
+ */
+
diff --git a/include/dom/html/html_object_element.h b/include/dom/html/html_object_element.h
new file mode 100644
index 0000000..2e182d5
--- /dev/null
+++ b/include/dom/html/html_object_element.h
@@ -0,0 +1,7 @@
+/*
+ * This file is part of libdom.
+ * Licensed under the MIT License,
+ * http://www.opensource.org/licenses/mit-license.php
+ * Copyright 2009 Bo Yang <struggleyb.nku@gmail.com>
+ */
+
diff --git a/include/dom/html/html_olist_element.h b/include/dom/html/html_olist_element.h
new file mode 100644
index 0000000..2e182d5
--- /dev/null
+++ b/include/dom/html/html_olist_element.h
@@ -0,0 +1,7 @@
+/*
+ * This file is part of libdom.
+ * Licensed under the MIT License,
+ * http://www.opensource.org/licenses/mit-license.php
+ * Copyright 2009 Bo Yang <struggleyb.nku@gmail.com>
+ */
+
diff --git a/include/dom/html/html_optgroup_element.h b/include/dom/html/html_optgroup_element.h
new file mode 100644
index 0000000..2e182d5
--- /dev/null
+++ b/include/dom/html/html_optgroup_element.h
@@ -0,0 +1,7 @@
+/*
+ * This file is part of libdom.
+ * Licensed under the MIT License,
+ * http://www.opensource.org/licenses/mit-license.php
+ * Copyright 2009 Bo Yang <struggleyb.nku@gmail.com>
+ */
+
diff --git a/include/dom/html/html_option_element.h b/include/dom/html/html_option_element.h
new file mode 100644
index 0000000..2e182d5
--- /dev/null
+++ b/include/dom/html/html_option_element.h
@@ -0,0 +1,7 @@
+/*
+ * This file is part of libdom.
+ * Licensed under the MIT License,
+ * http://www.opensource.org/licenses/mit-license.php
+ * Copyright 2009 Bo Yang <struggleyb.nku@gmail.com>
+ */
+
diff --git a/include/dom/html/html_options_collection.h b/include/dom/html/html_options_collection.h
new file mode 100644
index 0000000..ad8e6aa
--- /dev/null
+++ b/include/dom/html/html_options_collection.h
@@ -0,0 +1,33 @@
+/*
+ * This file is part of libdom.
+ * Licensed under the MIT License,
+ * http://www.opensource.org/licenses/mit-license.php
+ * Copyright 2009 Bo Yang <struggleyb.nku@gmail.com>
+ */
+
+#ifndef dom_html_options_collection_h_
+#define dom_html_options_collection_h_
+
+#include <dom/core/exceptions.h>
+
+struct dom_node;
+struct dom_string;
+
+typedef struct dom_html_options_collection dom_html_options_collection;
+
+dom_exception dom_html_options_collection_get_length(
+ dom_html_options_collection *col, unsigned long *len);
+dom_exception dom_html_options_collection_set_length(
+ dom_html_options_collection *col, unsigned long len);
+dom_exception dom_html_options_collection_item(
+ dom_html_options_collection *col, unsigned long index,
+ struct dom_node **node);
+dom_exception dom_html_options_collection_named_item(
+ dom_html_options_collection *col, struct dom_string *name,
+ struct dom_node **node);
+
+void dom_html_options_collection_ref(dom_html_options_collection *col);
+void dom_html_options_collection_unref(dom_html_options_collection *col);
+
+#endif
+
diff --git a/include/dom/html/html_paragraph_element.h b/include/dom/html/html_paragraph_element.h
new file mode 100644
index 0000000..2e182d5
--- /dev/null
+++ b/include/dom/html/html_paragraph_element.h
@@ -0,0 +1,7 @@
+/*
+ * This file is part of libdom.
+ * Licensed under the MIT License,
+ * http://www.opensource.org/licenses/mit-license.php
+ * Copyright 2009 Bo Yang <struggleyb.nku@gmail.com>
+ */
+
diff --git a/include/dom/html/html_param_element.h b/include/dom/html/html_param_element.h
new file mode 100644
index 0000000..2e182d5
--- /dev/null
+++ b/include/dom/html/html_param_element.h
@@ -0,0 +1,7 @@
+/*
+ * This file is part of libdom.
+ * Licensed under the MIT License,
+ * http://www.opensource.org/licenses/mit-license.php
+ * Copyright 2009 Bo Yang <struggleyb.nku@gmail.com>
+ */
+
diff --git a/include/dom/html/html_pre_element.h b/include/dom/html/html_pre_element.h
new file mode 100644
index 0000000..2e182d5
--- /dev/null
+++ b/include/dom/html/html_pre_element.h
@@ -0,0 +1,7 @@
+/*
+ * This file is part of libdom.
+ * Licensed under the MIT License,
+ * http://www.opensource.org/licenses/mit-license.php
+ * Copyright 2009 Bo Yang <struggleyb.nku@gmail.com>
+ */
+
diff --git a/include/dom/html/html_quote_element.h b/include/dom/html/html_quote_element.h
new file mode 100644
index 0000000..2e182d5
--- /dev/null
+++ b/include/dom/html/html_quote_element.h
@@ -0,0 +1,7 @@
+/*
+ * This file is part of libdom.
+ * Licensed under the MIT License,
+ * http://www.opensource.org/licenses/mit-license.php
+ * Copyright 2009 Bo Yang <struggleyb.nku@gmail.com>
+ */
+
diff --git a/include/dom/html/html_script_element.h b/include/dom/html/html_script_element.h
new file mode 100644
index 0000000..2e182d5
--- /dev/null
+++ b/include/dom/html/html_script_element.h
@@ -0,0 +1,7 @@
+/*
+ * This file is part of libdom.
+ * Licensed under the MIT License,
+ * http://www.opensource.org/licenses/mit-license.php
+ * Copyright 2009 Bo Yang <struggleyb.nku@gmail.com>
+ */
+
diff --git a/include/dom/html/html_select_element.h b/include/dom/html/html_select_element.h
new file mode 100644
index 0000000..10c002a
--- /dev/null
+++ b/include/dom/html/html_select_element.h
@@ -0,0 +1,55 @@
+/*
+ * This file is part of libdom.
+ * Licensed under the MIT License,
+ * http://www.opensource.org/licenses/mit-license.php
+ * Copyright 2009 Bo Yang <struggleyb.nku@gmail.com>
+ */
+
+#ifndef dom_html_select_element_h_
+#define dom_html_select_element_h_
+
+#include <stdbool.h>
+
+#include <dom/core/exceptions.h>
+
+typedef struct dom_html_select_element dom_html_select_element;
+
+struct dom_html_options_collection;
+struct dom_html_element;
+
+dom_exception dom_html_select_element_get_selected_index(
+ dom_html_select_element *ele, unsigned long *index);
+dom_exception dom_html_select_element_set_selected_index(
+ dom_html_select_element *ele, unsigned long index);
+dom_exception dom_html_select_element_get_length(
+ dom_html_select_element *ele, unsigned long *len);
+dom_exception dom_html_select_element_set_length(
+ dom_html_select_element *ele, unsigned long len);
+dom_exception dom_html_select_element_get_options(
+ dom_html_select_element *ele,
+ struct dom_html_options_collection **col);
+dom_exception dom_html_select_element_get_disabled(
+ dom_html_select_element *ele, bool *disabled);
+dom_exception dom_html_select_element_set_disabled(
+ dom_html_select_element *ele, bool disabled);
+dom_exception dom_html_select_element_get_multiple(
+ dom_html_select_element *ele, bool *multiple);
+dom_exception dom_html_select_element_set_multiple(
+ dom_html_select_element *ele, bool multiple);
+dom_exception dom_html_select_element_get_size(
+ dom_html_select_element *ele, unsigned long *size);
+dom_exception dom_html_select_element_set_size(
+ dom_html_select_element *ele, unsigned long size);
+dom_exception dom_html_select_element_get_tab_index(
+ dom_html_select_element *ele, unsigned long *tab_index);
+dom_exception dom_html_select_element_set_tab_index(
+ dom_html_select_element *ele, unsigned long tab_index);
+
+/* Functions */
+dom_exception dom_html_select_element_add(struct dom_html_element *ele,
+ struct dom_html_element *before);
+dom_exception dom_html_element_blur(struct dom_html_select_element *ele);
+dom_exception dom_html_element_focus(struct dom_html_select_element *ele);
+
+#endif
+
diff --git a/include/dom/html/html_style_element.h b/include/dom/html/html_style_element.h
new file mode 100644
index 0000000..868a043
--- /dev/null
+++ b/include/dom/html/html_style_element.h
@@ -0,0 +1,23 @@
+/*
+ * This file is part of libdom.
+ * Licensed under the MIT License,
+ * http://www.opensource.org/licenses/mit-license.php
+ * Copyright 2009 Bo Yang <struggleyb.nku.com>
+ */
+
+#ifndef dom_html_style_element_h_
+#define dom_html_style_element_h_
+
+#include <stdbool.h>
+#include <dom/core/exceptions.h>
+
+typedef struct dom_html_style_element dom_html_style_element;
+
+dom_exception dom_html_style_element_get_disabled(dom_html_style_element *ele,
+ bool *disabled);
+
+dom_exception dom_html_style_element_set_disabled(dom_html_style_element *ele,
+ bool disabled);
+
+#endif
+
diff --git a/include/dom/html/html_table_element.h b/include/dom/html/html_table_element.h
new file mode 100644
index 0000000..2e182d5
--- /dev/null
+++ b/include/dom/html/html_table_element.h
@@ -0,0 +1,7 @@
+/*
+ * This file is part of libdom.
+ * Licensed under the MIT License,
+ * http://www.opensource.org/licenses/mit-license.php
+ * Copyright 2009 Bo Yang <struggleyb.nku@gmail.com>
+ */
+
diff --git a/include/dom/html/html_tablecaption_element.h b/include/dom/html/html_tablecaption_element.h
new file mode 100644
index 0000000..2e182d5
--- /dev/null
+++ b/include/dom/html/html_tablecaption_element.h
@@ -0,0 +1,7 @@
+/*
+ * This file is part of libdom.
+ * Licensed under the MIT License,
+ * http://www.opensource.org/licenses/mit-license.php
+ * Copyright 2009 Bo Yang <struggleyb.nku@gmail.com>
+ */
+
diff --git a/include/dom/html/html_tablecell_element.h b/include/dom/html/html_tablecell_element.h
new file mode 100644
index 0000000..2e182d5
--- /dev/null
+++ b/include/dom/html/html_tablecell_element.h
@@ -0,0 +1,7 @@
+/*
+ * This file is part of libdom.
+ * Licensed under the MIT License,
+ * http://www.opensource.org/licenses/mit-license.php
+ * Copyright 2009 Bo Yang <struggleyb.nku@gmail.com>
+ */
+
diff --git a/include/dom/html/html_tablecol_element.h b/include/dom/html/html_tablecol_element.h
new file mode 100644
index 0000000..2e182d5
--- /dev/null
+++ b/include/dom/html/html_tablecol_element.h
@@ -0,0 +1,7 @@
+/*
+ * This file is part of libdom.
+ * Licensed under the MIT License,
+ * http://www.opensource.org/licenses/mit-license.php
+ * Copyright 2009 Bo Yang <struggleyb.nku@gmail.com>
+ */
+
diff --git a/include/dom/html/html_tablerow_element.h b/include/dom/html/html_tablerow_element.h
new file mode 100644
index 0000000..2e182d5
--- /dev/null
+++ b/include/dom/html/html_tablerow_element.h
@@ -0,0 +1,7 @@
+/*
+ * This file is part of libdom.
+ * Licensed under the MIT License,
+ * http://www.opensource.org/licenses/mit-license.php
+ * Copyright 2009 Bo Yang <struggleyb.nku@gmail.com>
+ */
+
diff --git a/include/dom/html/html_tablesection_element.h b/include/dom/html/html_tablesection_element.h
new file mode 100644
index 0000000..2e182d5
--- /dev/null
+++ b/include/dom/html/html_tablesection_element.h
@@ -0,0 +1,7 @@
+/*
+ * This file is part of libdom.
+ * Licensed under the MIT License,
+ * http://www.opensource.org/licenses/mit-license.php
+ * Copyright 2009 Bo Yang <struggleyb.nku@gmail.com>
+ */
+
diff --git a/include/dom/html/html_textarea_element.h b/include/dom/html/html_textarea_element.h
new file mode 100644
index 0000000..2e182d5
--- /dev/null
+++ b/include/dom/html/html_textarea_element.h
@@ -0,0 +1,7 @@
+/*
+ * This file is part of libdom.
+ * Licensed under the MIT License,
+ * http://www.opensource.org/licenses/mit-license.php
+ * Copyright 2009 Bo Yang <struggleyb.nku@gmail.com>
+ */
+
diff --git a/include/dom/html/html_title_element.h b/include/dom/html/html_title_element.h
new file mode 100644
index 0000000..5da766a
--- /dev/null
+++ b/include/dom/html/html_title_element.h
@@ -0,0 +1,24 @@
+/*
+ * This file is part of libdom.
+ * Licensed under the MIT License,
+ * http://www.opensource.org/licenses/mit-license.php
+ * Copyright 2009 Bo Yang <struggleyb.nku.com>
+ */
+
+#ifndef dom_html_title_element_h_
+#define dom_html_title_element_h_
+
+#include <dom/core/exceptions.h>
+
+struct dom_string;
+
+typedef struct dom_html_title_element dom_html_title_element;
+
+dom_exception dom_html_title_element_get_text(dom_html_title_element *ele,
+ struct dom_string **text);
+
+dom_exception dom_html_title_element_set_text(dom_html_title_element *ele,
+ struct dom_string *text);
+
+#endif
+
diff --git a/include/dom/html/html_ulist_element.h b/include/dom/html/html_ulist_element.h
new file mode 100644
index 0000000..2e182d5
--- /dev/null
+++ b/include/dom/html/html_ulist_element.h
@@ -0,0 +1,7 @@
+/*
+ * This file is part of libdom.
+ * Licensed under the MIT License,
+ * http://www.opensource.org/licenses/mit-license.php
+ * Copyright 2009 Bo Yang <struggleyb.nku@gmail.com>
+ */
+