summaryrefslogtreecommitdiff
path: root/src/core/text.h
diff options
context:
space:
mode:
authorBo Yang <struggleyb.nku@gmail.com>2009-08-11 11:17:23 +0000
committerBo Yang <struggleyb.nku@gmail.com>2009-08-11 11:17:23 +0000
commit399da01ae4eb5c5e3e9349bacc2063c946c3d4a1 (patch)
tree433c8bcde94fc7a6e6f2e5cbf23842a84db98146 /src/core/text.h
parenteec057c7437e19b59ca1e698ce548cb56ce37240 (diff)
downloadlibdom-399da01ae4eb5c5e3e9349bacc2063c946c3d4a1.tar.gz
libdom-399da01ae4eb5c5e3e9349bacc2063c946c3d4a1.tar.bz2
Merge the branches/struggleyb/libdom-remain back to trunk.
svn path=/trunk/dom/; revision=9191
Diffstat (limited to 'src/core/text.h')
-rw-r--r--src/core/text.h46
1 files changed, 33 insertions, 13 deletions
diff --git a/src/core/text.h b/src/core/text.h
index faf88cc..e5de56c 100644
--- a/src/core/text.h
+++ b/src/core/text.h
@@ -16,6 +16,8 @@
struct dom_document;
struct dom_string;
+struct lwc_context_s;
+struct lwc_string_s;
/**
* A DOM text node
@@ -27,7 +29,21 @@ struct dom_text {
* content whitespace */
};
-/* Vitual functions for dom_text */
+/* Constructor and Destructor */
+dom_exception _dom_text_create(struct dom_document *doc,
+ struct lwc_string_s *name, struct dom_string *value,
+ struct dom_text **result);
+
+void _dom_text_destroy(struct dom_document *doc, struct dom_text *text);
+
+dom_exception _dom_text_initialise(struct dom_text *text,
+ struct dom_document *doc, dom_node_type type,
+ struct lwc_string_s *name, struct dom_string *value);
+
+void _dom_text_finalise(struct dom_document *doc, struct dom_text *text);
+
+
+/* Virtual functions for dom_text */
dom_exception _dom_text_split_text(struct dom_text *text,
unsigned long offset, struct dom_text **result);
dom_exception _dom_text_get_is_element_content_whitespace(
@@ -37,22 +53,26 @@ dom_exception _dom_text_get_whole_text(struct dom_text *text,
dom_exception _dom_text_replace_whole_text(struct dom_text *text,
struct dom_string *content, struct dom_text **result);
-dom_exception dom_text_create(struct dom_document *doc,
- struct dom_string *name, struct dom_string *value,
- struct dom_text **result);
-
-void dom_text_destroy(struct dom_document *doc, struct dom_text *text);
-
-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);
-
-void dom_text_finalise(struct dom_document *doc, struct dom_text *text);
-
#define DOM_TEXT_VTABLE \
_dom_text_split_text, \
_dom_text_get_is_element_content_whitespace, \
_dom_text_get_whole_text, \
_dom_text_replace_whole_text
+
+/* Following comes the protected vtable */
+void __dom_text_destroy(struct dom_node_internal *node);
+dom_exception _dom_text_alloc(struct dom_document *doc,
+ struct dom_node_internal *n, struct dom_node_internal **ret);
+dom_exception _dom_text_copy(struct dom_node_internal *new,
+ struct dom_node_internal *old);
+
+#define DOM_TEXT_PROTECT_VTABLE \
+ __dom_text_destroy, \
+ _dom_text_alloc, \
+ _dom_text_copy
+
+
+extern struct dom_text_vtable text_vtable;
+
#endif