summaryrefslogtreecommitdiff
path: root/src/html/html_collection.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/html/html_collection.h')
-rw-r--r--src/html/html_collection.h50
1 files changed, 50 insertions, 0 deletions
diff --git a/src/html/html_collection.h b/src/html/html_collection.h
new file mode 100644
index 0000000..dc9e67d
--- /dev/null
+++ b/src/html/html_collection.h
@@ -0,0 +1,50 @@
+/*
+ * 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>
+ */
+
+#ifndef dom_internal_html_collection_h_
+#define dom_internal_html_collection_h_
+
+#include <dom/html/html_collection.h>
+
+struct dom_node_internal;
+
+typedef bool (*dom_callback_is_in_collection)(struct dom_node_internal *node);
+
+/**
+ * The html_collection structure
+ */
+struct dom_html_collection {
+ dom_callback_is_in_collection ic;
+ /**< The function pointer used to test
+ * whether some node is an element of
+ * this collection
+ */
+ struct dom_document *doc; /**< The document created this
+ * collection
+ */
+ struct dom_node_internal *root;
+ /**< The root node of this collection */
+ uint32_t refcnt;
+ /**< Reference counting */
+};
+
+dom_exception _dom_html_collection_create(struct dom_document *doc,
+ struct dom_node_internal *root,
+ dom_callback_is_in_collection ic,
+ struct dom_html_collection **col);
+
+dom_exception _dom_html_collection_initialise(struct dom_document *doc,
+ struct dom_html_collection *col,
+ struct dom_node_internal *root,
+ dom_callback_is_in_collection ic);
+
+void _dom_html_collection_finalise(struct dom_html_collection *col);
+
+void _dom_html_collection_destroy(struct dom_html_collection *col);
+
+#endif
+