Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Blame | Last modification | View Log | Download | RSS feed

  1. /*
  2.  * This file is part of libdom.
  3.  * Licensed under the MIT License,
  4.  *                http://www.opensource.org/licenses/mit-license.php
  5.  * Copyright 2012 John-Mark Bell <jmb@netsurf-browser.org>
  6.  */
  7.  
  8. #ifndef dom_internal_html_option_element_h_
  9. #define dom_internal_html_option_element_h_
  10.  
  11. #include <dom/html/html_option_element.h>
  12.  
  13. #include "html/html_element.h"
  14.  
  15. struct dom_html_option_element {
  16.         struct dom_html_element base;
  17.                         /**< The base class */
  18.         bool default_selected; /**< Initial selected value */
  19.         bool default_selected_set; /**< Whether default_selected has been set */
  20. };
  21.  
  22. /* Create a dom_html_option_element object */
  23. dom_exception _dom_html_option_element_create(struct dom_html_document *doc,
  24.                 dom_string *namespace, dom_string *prefix,
  25.                 struct dom_html_option_element **ele);
  26.  
  27. /* Initialise a dom_html_option_element object */
  28. dom_exception _dom_html_option_element_initialise(struct dom_html_document *doc,
  29.                 dom_string *namespace, dom_string *prefix,
  30.                 struct dom_html_option_element *ele);
  31.  
  32. /* Finalise a dom_html_option_element object */
  33. void _dom_html_option_element_finalise(struct dom_html_option_element *ele);
  34.  
  35. /* Destroy a dom_html_option_element object */
  36. void _dom_html_option_element_destroy(struct dom_html_option_element *ele);
  37.  
  38. /* The protected virtual functions */
  39. dom_exception _dom_html_option_element_parse_attribute(dom_element *ele,
  40.                 dom_string *name, dom_string *value,
  41.                 dom_string **parsed);
  42. void _dom_virtual_html_option_element_destroy(dom_node_internal *node);
  43. dom_exception _dom_html_option_element_copy(dom_node_internal *old,
  44.                 dom_node_internal **copy);
  45.  
  46. #define DOM_HTML_OPTION_ELEMENT_PROTECT_VTABLE \
  47.         _dom_html_option_element_parse_attribute
  48.  
  49. #define DOM_NODE_PROTECT_VTABLE_HTML_OPTION_ELEMENT \
  50.         _dom_virtual_html_option_element_destroy, \
  51.         _dom_html_option_element_copy
  52.  
  53. #endif
  54.  
  55.