summaryrefslogtreecommitdiff
path: root/include/libcss/stylesheet.h
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2008-09-25 00:19:16 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2008-09-25 00:19:16 +0000
commit4793b871b96c1b64383695be117467b59bfbfaa1 (patch)
treedfad2fa0ceb4fc6cf0aef9bc7f6b183f1c7ece17 /include/libcss/stylesheet.h
parent3986ea98445d605596d94318aa0d91fabc883cc4 (diff)
downloadlibcss-4793b871b96c1b64383695be117467b59bfbfaa1.tar.gz
libcss-4793b871b96c1b64383695be117467b59bfbfaa1.tar.bz2
Public stylesheet API & stubbed out implementations.
Make public headers use libcss_ as their guard macro prefix. svn path=/trunk/libcss/; revision=5433
Diffstat (limited to 'include/libcss/stylesheet.h')
-rw-r--r--include/libcss/stylesheet.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/include/libcss/stylesheet.h b/include/libcss/stylesheet.h
new file mode 100644
index 0000000..a3ff0a6
--- /dev/null
+++ b/include/libcss/stylesheet.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 2008 John-Mark Bell <jmb@netsurf-browser.org>
+ */
+
+#ifndef libcss_stylesheet_h_
+#define libcss_stylesheet_h_
+
+#include <libcss/errors.h>
+#include <libcss/types.h>
+
+/**
+ * Type of stylesheet import handler
+ */
+typedef css_error (*css_import_handler)(void *pw, const char *url,
+ css_stylesheet *sheet);
+
+css_stylesheet *css_stylesheet_create(const char *url, const char *title,
+ css_origin origin, uint32_t media,
+ css_import_handler import_callback, void *import_pw,
+ css_alloc alloc, void *alloc_pw);
+void css_stylesheet_destroy(css_stylesheet *sheet);
+
+css_error css_stylesheet_append_data(css_stylesheet *sheet,
+ const uint8_t *data, size_t len);
+css_error css_stylesheet_data_done(css_stylesheet *sheet);
+
+css_error css_stylesheet_get_url(css_stylesheet *sheet, const char **url);
+css_error css_stylesheet_get_title(css_stylesheet *sheet, const char **title);
+css_error css_stylesheet_get_origin(css_stylesheet *sheet, css_origin *origin);
+css_error css_stylesheet_get_media(css_stylesheet *sheet, uint32_t *media);
+
+#endif
+