summaryrefslogtreecommitdiff
path: root/include/libcss
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2009-01-26 23:59:56 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2009-01-26 23:59:56 +0000
commit9208eb249116013db51504ff9f4be6a6afcde596 (patch)
treeaba3eac07f5936e9fdab033626f29b0c1473940b /include/libcss
parent63ad55e97d14e96bf21aaf3b3371748787d32181 (diff)
downloadlibcss-9208eb249116013db51504ff9f4be6a6afcde596.tar.gz
libcss-9208eb249116013db51504ff9f4be6a6afcde596.tar.bz2
Introduce ability to create/destroy selection contexts.
svn path=/trunk/libcss/; revision=6284
Diffstat (limited to 'include/libcss')
-rw-r--r--include/libcss/select.h36
-rw-r--r--include/libcss/types.h4
2 files changed, 40 insertions, 0 deletions
diff --git a/include/libcss/select.h b/include/libcss/select.h
new file mode 100644
index 0000000..08a9a64
--- /dev/null
+++ b/include/libcss/select.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 libcss_select_h_
+#define libcss_select_h_
+
+#include <libcss/errors.h>
+#include <libcss/functypes.h>
+#include <libcss/types.h>
+
+css_error css_select_ctx_create(css_alloc alloc, void *pw,
+ css_select_ctx **result);
+css_error css_select_ctx_destroy(css_select_ctx *ctx);
+
+css_error css_select_ctx_append_sheet(css_select_ctx *ctx,
+ const css_stylesheet *sheet);
+css_error css_select_ctx_insert_sheet(css_select_ctx *ctx,
+ const css_stylesheet *sheet, uint32_t index);
+css_error css_select_ctx_remove_sheet(css_select_ctx *ctx,
+ const css_stylesheet *sheet);
+
+css_error css_select_ctx_count_sheets(css_select_ctx *ctx, uint32_t *count);
+css_error css_select_ctx_get_sheet(css_select_ctx *ctx, uint32_t index,
+ const css_stylesheet **sheet);
+
+css_error css_select_style(css_select_ctx *ctx, void *node,
+ uint32_t pseudo_classes, uint32_t media,
+ css_computed_style **result);
+
+/* css_error css_computed_style_destroy(css_computed_style *style); */
+
+#endif
diff --git a/include/libcss/types.h b/include/libcss/types.h
index f095f1c..fddbc51 100644
--- a/include/libcss/types.h
+++ b/include/libcss/types.h
@@ -63,4 +63,8 @@ typedef struct css_string {
typedef struct css_stylesheet css_stylesheet;
+typedef struct css_select_ctx css_select_ctx;
+
+typedef struct css_computed_style css_computed_style;
+
#endif