diff options
author | Daniel Silverstone <dsilvers@digital-scurf.org> | 2012-07-07 22:21:26 +0100 |
---|---|---|
committer | Daniel Silverstone <dsilvers@digital-scurf.org> | 2012-07-07 22:21:26 +0100 |
commit | 146bda077e00e3feffc3748af681f10494fc9c5c (patch) | |
tree | 43d10c947692a85d7b40973ae77bd0f0c968cff4 /src/html/html_button_element.h | |
parent | 50d83f430d109472dee45910851275fe189b0fdb (diff) | |
download | libdom-146bda077e00e3feffc3748af681f10494fc9c5c.tar.gz libdom-146bda077e00e3feffc3748af681f10494fc9c5c.tar.bz2 |
HTML{{,Button,Select,Form}Element,Document,Element,{,Options}Collection}: Make buttons work and forms contain their correct buttons
Diffstat (limited to 'src/html/html_button_element.h')
-rw-r--r-- | src/html/html_button_element.h | 54 |
1 files changed, 53 insertions, 1 deletions
diff --git a/src/html/html_button_element.h b/src/html/html_button_element.h index 2e182d5..18d0250 100644 --- a/src/html/html_button_element.h +++ b/src/html/html_button_element.h @@ -2,6 +2,58 @@ * 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> + * Copyright 2012 Daniel Silverstone <dsilvers@netsurf-browser.org> */ +#ifndef dom_internal_html_button_element_h_ +#define dom_internal_html_button_element_h_ + +#include <dom/html/html_button_element.h> + +#include "html/html_element.h" + +struct dom_html_button_element { + struct dom_html_element base; + /**< The base class */ + struct dom_html_form_element *form; + /**< The form associated with the button */ +}; + +/* Create a dom_html_button_element object */ +dom_exception _dom_html_button_element_create(struct dom_html_document *doc, + dom_string *namespace, dom_string *prefix, + struct dom_html_button_element **ele); + +/* Initialise a dom_html_button_element object */ +dom_exception _dom_html_button_element_initialise(struct dom_html_document *doc, + dom_string *namespace, dom_string *prefix, + struct dom_html_button_element *ele); + +/* Finalise a dom_html_button_element object */ +void _dom_html_button_element_finalise(struct dom_html_button_element *ele); + +/* Destroy a dom_html_button_element object */ +void _dom_html_button_element_destroy(struct dom_html_button_element *ele); + +/* The protected virtual functions */ +dom_exception _dom_html_button_element_parse_attribute(dom_element *ele, + dom_string *name, dom_string *value, + dom_string **parsed); +void _dom_virtual_html_button_element_destroy(dom_node_internal *node); +dom_exception _dom_html_button_element_copy(dom_node_internal *old, + dom_node_internal **copy); + +#define DOM_HTML_BUTTON_ELEMENT_PROTECT_VTABLE \ + _dom_html_button_element_parse_attribute + +#define DOM_NODE_PROTECT_VTABLE_HTML_BUTTON_ELEMENT \ + _dom_virtual_html_button_element_destroy, \ + _dom_html_button_element_copy + +/* Internal function for bindings */ + +dom_exception _dom_html_button_element_set_form( + dom_html_button_element *button, dom_html_form_element *form); + +#endif + |