summaryrefslogtreecommitdiff
path: root/include/libcss/stylesheet.h
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2009-02-14 17:20:19 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2009-02-14 17:20:19 +0000
commit1d8b0aad719898be0f1b8a862be41c2b51075c80 (patch)
tree1efac87b00dba4be396a3aa9ef1c45e023272ff0 /include/libcss/stylesheet.h
parent03c0b36fdb90960b4a4c1e6f86084c850463195b (diff)
downloadlibcss-1d8b0aad719898be0f1b8a862be41c2b51075c80.tar.gz
libcss-1d8b0aad719898be0f1b8a862be41c2b51075c80.tar.bz2
Rework handling of imported stylesheets.
No longer is the client called back mid-parse. Instead, they must acquire details of and process imported stylesheets after css_stylesheet_data_done() has been called on the parent sheet. The return code of css_stylesheet_data_done() informs the client of the need to process imported sheets. svn path=/trunk/libcss/; revision=6504
Diffstat (limited to 'include/libcss/stylesheet.h')
-rw-r--r--include/libcss/stylesheet.h17
1 files changed, 9 insertions, 8 deletions
diff --git a/include/libcss/stylesheet.h b/include/libcss/stylesheet.h
index 6a89372..eb14ad3 100644
--- a/include/libcss/stylesheet.h
+++ b/include/libcss/stylesheet.h
@@ -11,23 +11,24 @@
#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_error css_stylesheet_create(css_language_level level,
const char *charset, const char *url, const char *title,
css_origin origin, uint64_t media,
- css_import_handler import_callback, void *import_pw,
- css_allocator_fn alloc, void *alloc_pw, css_stylesheet **stylesheet);
+ css_allocator_fn alloc, void *alloc_pw,
+ css_stylesheet **stylesheet);
css_error 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_next_pending_import(css_stylesheet *parent,
+ css_string *url, uint64_t *media);
+css_error css_stylesheet_register_import(css_stylesheet *parent,
+ css_stylesheet *child);
+
+css_error css_stylesheet_get_language_level(css_stylesheet *sheet,
+ css_language_level *level);
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);