summaryrefslogtreecommitdiff
path: root/src/core/text.h
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2007-07-28 14:34:59 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2007-07-28 14:34:59 +0000
commit7cbcc882de7d5747e2342f0829bbcc9f2bcca60f (patch)
treed3fe522992dec910758c2b86d0d02ec9c2d005a9 /src/core/text.h
parent6d0ecccfcf47341393d66e2379ce82cb8350a20f (diff)
downloadlibdom-7cbcc882de7d5747e2342f0829bbcc9f2bcca60f.tar.gz
libdom-7cbcc882de7d5747e2342f0829bbcc9f2bcca60f.tar.bz2
Sort out somewhat messy object construction.
We now have explicit types for all classes (rather than using the parent class for those which inherit but add no extra data content). svn path=/trunk/dom/; revision=3465
Diffstat (limited to 'src/core/text.h')
-rw-r--r--src/core/text.h21
1 files changed, 18 insertions, 3 deletions
diff --git a/src/core/text.h b/src/core/text.h
index 97ab900..be927df 100644
--- a/src/core/text.h
+++ b/src/core/text.h
@@ -8,16 +8,31 @@
#ifndef dom_internal_core_text_h_
#define dom_internal_core_text_h_
+#include <stdbool.h>
+
#include <dom/core/exceptions.h>
-#include "core/node.h"
+#include "core/characterdata.h"
struct dom_document;
struct dom_string;
-struct dom_text;
-dom_exception dom_text_create(struct dom_document *doc, dom_node_type type,
+/**
+ * A DOM text node
+ */
+struct dom_text {
+ struct dom_characterdata base; /**< Base node */
+
+ bool element_content_whitespace; /**< This node is element
+ * content whitespace */
+};
+
+dom_exception dom_text_create(struct dom_document *doc,
struct dom_string *name, struct dom_string *value,
struct dom_text **result);
+dom_exception dom_text_initialise(struct dom_text *text,
+ struct dom_document *doc, dom_node_type type,
+ struct dom_string *name, struct dom_string *value);
+
#endif