summaryrefslogtreecommitdiff
path: root/src/select/dispatch.h
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2009-02-15 10:58:36 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2009-02-15 10:58:36 +0000
commita3ec55e0f72fb0d55b2309d5688d7f8ce3194e2d (patch)
tree59cc79b15b2217c21d41a4a4ff5de080aa1389ae /src/select/dispatch.h
parent8cd57dac5b019a814f3f87accc81c94728e6229f (diff)
downloadlibcss-a3ec55e0f72fb0d55b2309d5688d7f8ce3194e2d.tar.gz
libcss-a3ec55e0f72fb0d55b2309d5688d7f8ce3194e2d.tar.bz2
Move property dispatch table out of select.c so it can be used by the computed style composition code.
svn path=/trunk/libcss/; revision=6523
Diffstat (limited to 'src/select/dispatch.h')
-rw-r--r--src/select/dispatch.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/src/select/dispatch.h b/src/select/dispatch.h
new file mode 100644
index 0000000..2c68e69
--- /dev/null
+++ b/src/select/dispatch.h
@@ -0,0 +1,39 @@
+/*
+ * 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_dispatch_h_
+#define css_select_dispatch_h_
+
+#include <stdint.h>
+
+#include <libcss/errors.h>
+#include <libcss/computed.h>
+
+#include "stylesheet.h"
+#include "bytecode/bytecode.h"
+#include "select/select.h"
+
+/**
+ * Enumeration of property groups
+ */
+enum prop_group {
+ GROUP_NORMAL = 0x0,
+ GROUP_UNCOMMON = 0x1,
+ GROUP_PAGE = 0x2,
+ GROUP_AURAL = 0x3
+};
+
+extern struct prop_table {
+ css_error (*cascade)(uint32_t opv, css_style *style,
+ css_select_state *state);
+ css_error (*initial)(css_computed_style *style);
+
+ uint32_t inherited : 1,
+ group : 2;
+} prop_dispatch[N_OPCODES];
+
+#endif