diff options
author | Michael Drake <michael.drake@codethink.co.uk> | 2019-05-04 14:10:41 +0100 |
---|---|---|
committer | Michael Drake <michael.drake@codethink.co.uk> | 2019-05-04 14:10:41 +0100 |
commit | 5d1a706bfc5d25ea0fc2060772e44222ea711df5 (patch) | |
tree | 548af2617882f5be239ea188d1c964245cfc06b3 /include/libcss/select.h | |
parent | d6126aa77eb442f446d28b6dfb15a884f209a341 (diff) | |
download | libcss-5d1a706bfc5d25ea0fc2060772e44222ea711df5.tar.gz |
Media queries: Update selection API to support media queries.
The API changes are:
1. When building a selection context, stylesheets added with
`css_select_ctx_{append|insert}_sheet()` now have to have
media strings associcated with them. Previously they took
a simple bitfield for CSS media type.
2. When selecting for an element, the client needs to specify
the current media requirements. Previously it only had to
provide the bitfield for CSS media type.
3. Same for the css_select_font_faces API.
The selection handling has been updated to handle the new
API, however it is currently only looking at the media type
when performing selection.
Signed-off-by: Michael Drake <michael.drake@codethink.co.uk>
Diffstat (limited to 'include/libcss/select.h')
-rw-r--r-- | include/libcss/select.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/libcss/select.h b/include/libcss/select.h index f1de409..ca57456 100644 --- a/include/libcss/select.h +++ b/include/libcss/select.h @@ -206,10 +206,10 @@ 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_origin origin, uint64_t media); + css_origin origin, const char *media); css_error css_select_ctx_insert_sheet(css_select_ctx *ctx, const css_stylesheet *sheet, uint32_t index, - css_origin origin, uint64_t media); + css_origin origin, const char *media); css_error css_select_ctx_remove_sheet(css_select_ctx *ctx, const css_stylesheet *sheet); @@ -221,13 +221,13 @@ css_error css_select_default_style(css_select_ctx *ctx, css_select_handler *handler, void *pw, css_computed_style **style); css_error css_select_style(css_select_ctx *ctx, void *node, - uint64_t media, const css_stylesheet *inline_style, + const css_media *media, const css_stylesheet *inline_style, css_select_handler *handler, void *pw, css_select_results **result); css_error css_select_results_destroy(css_select_results *results); css_error css_select_font_faces(css_select_ctx *ctx, - uint64_t media, lwc_string *font_family, + const css_media *media, lwc_string *font_family, css_select_font_faces_results **result); css_error css_select_font_faces_results_destroy( css_select_font_faces_results *results); |