summaryrefslogtreecommitdiff
path: root/include/libcss/computed.h
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2009-02-06 19:45:29 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2009-02-06 19:45:29 +0000
commit3a0c89c4cc3b688f54591377e699bb69182fd4b6 (patch)
tree06a5c77d311050a4558ef7f26fbca757b09f24fc /include/libcss/computed.h
parent098f4a78b137fed71711f6c19d2721a1d60ddf1d (diff)
downloadlibcss-3a0c89c4cc3b688f54591377e699bb69182fd4b6.tar.gz
libcss-3a0c89c4cc3b688f54591377e699bb69182fd4b6.tar.bz2
More accessors
svn path=/trunk/libcss/; revision=6385
Diffstat (limited to 'include/libcss/computed.h')
-rw-r--r--include/libcss/computed.h68
1 files changed, 68 insertions, 0 deletions
diff --git a/include/libcss/computed.h b/include/libcss/computed.h
index 2d9e672..f9b0a52 100644
--- a/include/libcss/computed.h
+++ b/include/libcss/computed.h
@@ -1761,4 +1761,72 @@ static inline uint8_t css_computed_list_style_position(
#undef LIST_STYLE_POSITION_SHIFT
#undef LIST_STYLE_POSITION_INDEX
+#define BORDER_TOP_STYLE_INDEX 29
+#define BORDER_TOP_STYLE_SHIFT 4
+#define BORDER_TOP_STYLE_MASK 0xf0
+static inline uint8_t css_computed_border_top_style(
+ const css_computed_style *style)
+{
+ uint8_t bits = style->bits[BORDER_TOP_STYLE_INDEX];
+ bits &= BORDER_TOP_STYLE_MASK;
+ bits >>= BORDER_TOP_STYLE_SHIFT;
+
+ /* 4bits: type */
+ return bits;
+}
+#undef BORDER_TOP_STYLE_MASK
+#undef BORDER_TOP_STYLE_SHIFT
+#undef BORDER_TOP_STYLE_INDEX
+
+#define BORDER_RIGHT_STYLE_INDEX 29
+#define BORDER_RIGHT_STYLE_SHIFT 0
+#define BORDER_RIGHT_STYLE_MASK 0xf
+static inline uint8_t css_computed_border_right_style(
+ const css_computed_style *style)
+{
+ uint8_t bits = style->bits[BORDER_RIGHT_STYLE_INDEX];
+ bits &= BORDER_RIGHT_STYLE_MASK;
+ bits >>= BORDER_RIGHT_STYLE_SHIFT;
+
+ /* 4bits: type */
+ return bits;
+}
+#undef BORDER_RIGHT_STYLE_MASK
+#undef BORDER_RIGHT_STYLE_SHIFT
+#undef BORDER_RIGHT_STYLE_INDEX
+
+#define BORDER_BOTTOM_STYLE_INDEX 30
+#define BORDER_BOTTOM_STYLE_SHIFT 4
+#define BORDER_BOTTOM_STYLE_MASK 0xf0
+static inline uint8_t css_computed_border_bottom_style(
+ const css_computed_style *style)
+{
+ uint8_t bits = style->bits[BORDER_BOTTOM_STYLE_INDEX];
+ bits &= BORDER_BOTTOM_STYLE_MASK;
+ bits >>= BORDER_BOTTOM_STYLE_SHIFT;
+
+ /* 4bits: type */
+ return bits;
+}
+#undef BORDER_BOTTOM_STYLE_MASK
+#undef BORDER_BOTTOM_STYLE_SHIFT
+#undef BORDER_BOTTOM_STYLE_INDEX
+
+#define BORDER_LEFT_STYLE_INDEX 30
+#define BORDER_LEFT_STYLE_SHIFT 0
+#define BORDER_LEFT_STYLE_MASK 0xf
+static inline uint8_t css_computed_border_left_style(
+ const css_computed_style *style)
+{
+ uint8_t bits = style->bits[BORDER_LEFT_STYLE_INDEX];
+ bits &= BORDER_LEFT_STYLE_MASK;
+ bits >>= BORDER_LEFT_STYLE_SHIFT;
+
+ /* 4bits: type */
+ return bits;
+}
+#undef BORDER_LEFT_STYLE_MASK
+#undef BORDER_LEFT_STYLE_SHIFT
+#undef BORDER_LEFT_STYLE_INDEX
+
#endif