summaryrefslogtreecommitdiff
path: root/src/select/hash.h
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2009-01-25 14:02:45 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2009-01-25 14:02:45 +0000
commit1c23bae15b2bb019c39af68b1c0cfc5bb40ba2a7 (patch)
tree0d5426e92b6ea7dbadd2f3558be67ef4595e106d /src/select/hash.h
parentd0bb179f15f58958bc7d52bb36c1148b2ea79880 (diff)
downloadlibcss-1c23bae15b2bb019c39af68b1c0cfc5bb40ba2a7.tar.gz
libcss-1c23bae15b2bb019c39af68b1c0cfc5bb40ba2a7.tar.bz2
Selector hash.
svn path=/trunk/libcss/; revision=6263
Diffstat (limited to 'src/select/hash.h')
-rw-r--r--src/select/hash.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/select/hash.h b/src/select/hash.h
new file mode 100644
index 0000000..155ed69
--- /dev/null
+++ b/src/select/hash.h
@@ -0,0 +1,36 @@
+/*
+ * This file is part of LibCSS
+ * Licensed under the MIT License,
+ * http://www.opensource.org/licenses/mit-license.php
+ * Copyright 2009 John-Mark Bell <jmb@netsurf-browser.org>
+ */
+
+#ifndef css_select_hash_h_
+#define css_select_hash_h_
+
+#include <parserutils/utils/hash.h>
+
+#include <libcss/errors.h>
+#include <libcss/functypes.h>
+
+/* Ugh. We need this to avoid circular includes. Happy! */
+struct css_selector;
+
+typedef struct css_selector_hash css_selector_hash;
+
+css_error css_selector_hash_create(css_alloc alloc, void *pw,
+ css_selector_hash **hash);
+css_error css_selector_hash_destroy(css_selector_hash *hash);
+
+css_error css_selector_hash_insert(css_selector_hash *hash,
+ const struct css_selector *selector);
+
+css_error css_selector_hash_find(css_selector_hash *hash,
+ const parserutils_hash_entry *name,
+ const struct css_selector ***matched);
+css_error css_selector_hash_iterate(css_selector_hash *hash,
+ const struct css_selector **current,
+ const struct css_selector ***next);
+
+#endif
+