From 4421b2e633179bbd8f5331d2bdc33246aa2f40d9 Mon Sep 17 00:00:00 2001 From: James Bursa Date: Fri, 4 Apr 2003 15:19:32 +0000 Subject: [project @ 2003-04-04 15:19:31 by bursa] New CSS parser. svn path=/import/netsurf/; revision=112 --- render/css.h | 103 ----------------------------------------------------------- 1 file changed, 103 deletions(-) delete mode 100644 render/css.h (limited to 'render/css.h') diff --git a/render/css.h b/render/css.h deleted file mode 100644 index 8cb5088a1..000000000 --- a/render/css.h +++ /dev/null @@ -1,103 +0,0 @@ -/** - * $Id: css.h,v 1.9 2002/12/27 20:13:18 bursa Exp $ - */ - -#ifndef _NETSURF_RENDER_CSS_H_ -#define _NETSURF_RENDER_CSS_H_ - -#include "css_enum.h" - -/** - * structures and typedefs - */ - -typedef unsigned long colour; /* 0xbbggrr */ -#define TRANSPARENT 0x1000000 -#define CSS_COLOR_INHERIT 0x2000000 - -struct css_length { - float value; - css_unit unit; -}; - -struct css_style { - colour background_color; - css_clear clear; - colour color; - css_display display; - css_float float_; - - struct { - enum { CSS_FONT_SIZE_INHERIT, - CSS_FONT_SIZE_ABSOLUTE, - CSS_FONT_SIZE_LENGTH, - CSS_FONT_SIZE_PERCENT } size; - union { - struct css_length length; - float absolute; - float percent; - } value; - } font_size; - - css_font_weight font_weight; - css_font_style font_style; - - struct { - enum { CSS_HEIGHT_INHERIT, - CSS_HEIGHT_AUTO, - CSS_HEIGHT_LENGTH } height; - struct css_length length; - } height; - - struct { - enum { CSS_LINE_HEIGHT_INHERIT, - CSS_LINE_HEIGHT_ABSOLUTE, - CSS_LINE_HEIGHT_LENGTH, - CSS_LINE_HEIGHT_PERCENT } size; - union { - float absolute; - struct css_length length; - float percent; - } value; - } line_height; - - css_text_align text_align; - - struct { - enum { CSS_WIDTH_INHERIT, - CSS_WIDTH_AUTO, - CSS_WIDTH_LENGTH, - CSS_WIDTH_PERCENT } width; - union { - struct css_length length; - float percent; - } value; - } width; -}; - -struct css_stylesheet; - -struct css_selector { - const char * element; - char * class; - char * id; -}; - -extern const struct css_style css_base_style; -extern const struct css_style css_empty_style; -extern const struct css_style css_blank_style; - -/** - * interface - */ - -struct css_stylesheet * css_new_stylesheet(void); -void css_get_style(struct css_stylesheet * stylesheet, struct css_selector * selector, - unsigned int selectors, struct css_style * style); -void css_parse_stylesheet(struct css_stylesheet * stylesheet, char * str); -void css_dump_style(const struct css_style * const style); -void css_dump_stylesheet(const struct css_stylesheet * stylesheet); -void css_cascade(struct css_style * const style, const struct css_style * const apply); -void css_parse_property_list(struct css_style * style, char * str); - -#endif -- cgit v1.2.3