summaryrefslogtreecommitdiff
path: root/include/libcss
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2008-09-25 07:56:31 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2008-09-25 07:56:31 +0000
commit1e5dee524f9fbff6c811dba66ff404882b02b900 (patch)
tree51147d8036b9307de71495bab1956230370895a8 /include/libcss
parent5af318eebe18cbac3eed9b860fcf997850ad9259 (diff)
downloadlibcss-1e5dee524f9fbff6c811dba66ff404882b02b900.tar.gz
libcss-1e5dee524f9fbff6c811dba66ff404882b02b900.tar.bz2
Mechanism for the client to select the language level.
svn path=/trunk/libcss/; revision=5436
Diffstat (limited to 'include/libcss')
-rw-r--r--include/libcss/stylesheet.h3
-rw-r--r--include/libcss/types.h25
2 files changed, 20 insertions, 8 deletions
diff --git a/include/libcss/stylesheet.h b/include/libcss/stylesheet.h
index 30be5ae..de4770e 100644
--- a/include/libcss/stylesheet.h
+++ b/include/libcss/stylesheet.h
@@ -17,7 +17,8 @@
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_stylesheet *css_stylesheet_create(css_language_level level,
+ 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);
diff --git a/include/libcss/types.h b/include/libcss/types.h
index ad5b5bf..e361052 100644
--- a/include/libcss/types.h
+++ b/include/libcss/types.h
@@ -23,14 +23,15 @@ typedef enum css_charset_source {
} css_charset_source;
/**
- * String type
+ * Stylesheet language level -- defines parsing rules and supported properties
*/
-typedef struct css_string {
- uint8_t *ptr; /**< Pointer to data */
- size_t len; /**< Byte length of string */
-} css_string;
-
-typedef struct css_stylesheet css_stylesheet;
+typedef enum css_language_level {
+ CSS_LEVEL_1 = 0, /**< CSS 1 */
+ CSS_LEVEL_2 = 1, /**< CSS 2 */
+ CSS_LEVEL_21 = 2, /**< CSS 2.1 */
+ CSS_LEVEL_3 = 3, /**< CSS 3 */
+ CSS_LEVEL_DEFAULT = CSS_LEVEL_21 /**< Default level */
+} css_language_level;
/**
* Stylesheet origin
@@ -41,4 +42,14 @@ typedef enum css_origin {
CSS_ORIGIN_AUTHOR = 2 /**< Author stylesheet */
} css_origin;
+/**
+ * String type
+ */
+typedef struct css_string {
+ uint8_t *ptr; /**< Pointer to data */
+ size_t len; /**< Byte length of string */
+} css_string;
+
+typedef struct css_stylesheet css_stylesheet;
+
#endif