From b230fafd64ed4a23fdeb1c16a991db2f42d6c8a4 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Fri, 6 Feb 2009 14:08:50 +0000 Subject: Some property accessors. Define css_unit type. svn path=/trunk/libcss/; revision=6372 --- include/libcss/types.h | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) (limited to 'include/libcss/types.h') diff --git a/include/libcss/types.h b/include/libcss/types.h index 640ef50..9b8da8f 100644 --- a/include/libcss/types.h +++ b/include/libcss/types.h @@ -46,9 +46,9 @@ typedef enum css_media_type { * Stylesheet origin */ typedef enum css_origin { - CSS_ORIGIN_UA = 0, /**< User agent stylesheet */ - CSS_ORIGIN_USER = 1, /**< User stylesheet */ - CSS_ORIGIN_AUTHOR = 2 /**< Author stylesheet */ + CSS_ORIGIN_UA = 0, /**< User agent stylesheet */ + CSS_ORIGIN_USER = 1, /**< User stylesheet */ + CSS_ORIGIN_AUTHOR = 2 /**< Author stylesheet */ } css_origin; /** @@ -66,6 +66,30 @@ typedef uint32_t css_color; /** \todo Do we want to make utils/fp*.h public? */ typedef int32_t css_fixed; +/* CSS unit */ +typedef enum css_unit { + CSS_UNIT_PX = 0x0, + CSS_UNIT_EX = 0x1, + CSS_UNIT_EM = 0x2, + CSS_UNIT_IN = 0x3, + CSS_UNIT_CM = 0x4, + CSS_UNIT_MM = 0x5, + CSS_UNIT_PT = 0x6, + CSS_UNIT_PC = 0x7, + + CSS_UNIT_PCT = 0x8, /* Percentage */ + + CSS_UNIT_DEG = 0x9, + CSS_UNIT_GRAD = 0xa, + CSS_UNIT_RAD = 0xb, + + CSS_UNIT_MS = 0xc, + CSS_UNIT_S = 0xd, + + CSS_UNIT_HZ = 0xe, + CSS_UNIT_KHZ = 0xf +} css_unit; + typedef struct css_stylesheet css_stylesheet; typedef struct css_select_ctx css_select_ctx; -- cgit v1.2.3