From 081c8b365001d9ec9df0f06ba5025dd621c8e4ec Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Sat, 4 Jul 2009 17:09:07 +0000 Subject: Add callback to make client compute the font size. Some progress towards computing absolute values. svn path=/trunk/libcss/; revision=8311 --- include/libcss/computed.h | 6 ++++++ include/libcss/select.h | 5 +++-- 2 files changed, 9 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/libcss/computed.h b/include/libcss/computed.h index 672d504..0d0350e 100644 --- a/include/libcss/computed.h +++ b/include/libcss/computed.h @@ -15,6 +15,8 @@ #include #include +struct css_hint; + enum css_computed_content_type { CSS_COMPUTED_CONTENT_NONE = 0, CSS_COMPUTED_CONTENT_STRING = 1, @@ -333,6 +335,10 @@ css_error css_computed_style_destroy(css_computed_style *style); css_error css_computed_style_compose(const css_computed_style *parent, const css_computed_style *child, + css_error (*compute_font_size)(void *pw, + const struct css_hint *parent, + struct css_hint *size), + void *pw, css_computed_style *result); /****************************************************************************** diff --git a/include/libcss/select.h b/include/libcss/select.h index 391f393..e961275 100644 --- a/include/libcss/select.h +++ b/include/libcss/select.h @@ -67,8 +67,9 @@ typedef struct css_select_handler { css_error (*ua_default_for_property)(void *pw, uint32_t property, css_hint *hint); -// css_error (*ua_font_keyword_to_size)(void *pw, uint32_t keyword, -// css_hint *hint); + + css_error (*compute_font_size)(void *pw, const css_hint *parent, + css_hint *size); } css_select_handler; css_error css_select_ctx_create(css_allocator_fn alloc, void *pw, -- cgit v1.2.3