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 2007 John-Mark Bell <jmb@netsurf-browser.org>
  6.  */
  7.  
  8. #ifndef dom_core_implementation_h_
  9. #define dom_core_implementation_h_
  10.  
  11. #include <stdbool.h>
  12.  
  13. #include <dom/core/exceptions.h>
  14. #include <dom/events/document_event.h>
  15. #include <dom/functypes.h>
  16.  
  17. struct dom_document;
  18. struct dom_document_type;
  19.  
  20. typedef const char dom_implementation;
  21.  
  22. typedef enum dom_implementation_type {
  23.         DOM_IMPLEMENTATION_CORE = 0,
  24.         DOM_IMPLEMENTATION_XML  = (1 << 0),     /* not implemented */
  25.         DOM_IMPLEMENTATION_HTML = (1 << 1),
  26.  
  27.         DOM_IMPLEMENTATION_ALL  = DOM_IMPLEMENTATION_CORE |
  28.                                   DOM_IMPLEMENTATION_XML  |
  29.                                   DOM_IMPLEMENTATION_HTML
  30. } dom_implementation_type;
  31.  
  32. dom_exception dom_implementation_has_feature(
  33.                 const char *feature, const char *version,
  34.                 bool *result);
  35.  
  36. dom_exception dom_implementation_create_document_type(
  37.                 const char *qname,
  38.                 const char *public_id, const char *system_id,
  39.                 struct dom_document_type **doctype);
  40.  
  41. dom_exception dom_implementation_create_document(
  42.                 uint32_t impl_type,
  43.                 const char *namespace, const char *qname,
  44.                 struct dom_document_type *doctype,
  45.                 dom_events_default_action_fetcher daf,
  46.                 void *daf_ctx,
  47.                 struct dom_document **doc);
  48.  
  49. dom_exception dom_implementation_get_feature(
  50.                 const char *feature, const char *version,
  51.                 void **object);
  52.  
  53. #endif
  54.