diff options
Diffstat (limited to 'include/libcss/computed.h')
-rw-r--r-- | include/libcss/computed.h | 74 |
1 files changed, 69 insertions, 5 deletions
diff --git a/include/libcss/computed.h b/include/libcss/computed.h index e15d0b0..5d9cc7e 100644 --- a/include/libcss/computed.h +++ b/include/libcss/computed.h @@ -19,6 +19,7 @@ extern "C" #include <libcss/functypes.h> #include <libcss/properties.h> #include <libcss/types.h> +#include <libcss/unit.h> struct css_hint; struct css_select_handler; @@ -81,14 +82,34 @@ css_error css_computed_style_destroy(css_computed_style *style); css_error css_computed_style_compose( const css_computed_style *restrict parent, const css_computed_style *restrict child, - css_error (*compute_font_size)(void *pw, - const struct css_hint *parent, - struct css_hint *size), - void *pw, + const css_unit_ctx *unit_ctx, css_computed_style **restrict result); /****************************************************************************** - * Property accessors below here * + * speciality formatters * + ******************************************************************************/ + +/** + * Format a value into a text string controled by a list style + * + * \param[in] style The computed style to use for formatting + * \param[in] value The value to format + * \param[out] buffer The buffer to recive the formatted result + * \param[in] buffer_length The length of the buffer + * \param[out] format_length The complete length of the formatted result which + * may exceed buffer_length in which case the + * buffer data will not be complete. + * \return CSS_OK on success and the buffer and format_length updated + */ +css_error css_computed_format_list_style( + const css_computed_style *style, + int value, + char *buffer, + size_t buffer_length, + size_t *format_length); + +/****************************************************************************** + * Property accessors * ******************************************************************************/ uint8_t css_computed_letter_spacing( @@ -317,6 +338,14 @@ uint8_t css_computed_opacity( const css_computed_style *style, css_fixed *opacity); +uint8_t css_computed_fill_opacity( + const css_computed_style *style, + css_fixed *fill_opacity); + +uint8_t css_computed_stroke_opacity( + const css_computed_style *style, + css_fixed *stroke_opacity); + uint8_t css_computed_text_transform( const css_computed_style *style); @@ -439,6 +468,41 @@ uint8_t css_computed_widows( const css_computed_style *style, int32_t *widows); +uint8_t css_computed_align_content( + const css_computed_style *style); + +uint8_t css_computed_align_items( + const css_computed_style *style); + +uint8_t css_computed_align_self( + const css_computed_style *style); + +uint8_t css_computed_flex_basis( + const css_computed_style *style, + css_fixed *length, + css_unit *unit); + +uint8_t css_computed_flex_direction( + const css_computed_style *style); + +uint8_t css_computed_flex_grow( + const css_computed_style *style, + css_fixed *number); + +uint8_t css_computed_flex_shrink( + const css_computed_style *style, + css_fixed *number); + +uint8_t css_computed_flex_wrap( + const css_computed_style *style); + +uint8_t css_computed_justify_content( + const css_computed_style *style); + +uint8_t css_computed_order( + const css_computed_style *style, + int32_t *order); + #ifdef __cplusplus } #endif |