2 #ifndef EL__DOCUMENT_CSS_VALUE_H
3 #define EL__DOCUMENT_CSS_VALUE_H
5 #include "document/css/property.h"
6 #include "document/css/scanner.h"
8 /* This is interface for the value parser. It is intended to be used only
9 * internally inside of the CSS engine. */
11 /* This function takes a value of a specified type from the given scanner and
12 * converts it to a reasonable {struct css_property}-ready form. */
13 /* It returns positive integer upon success, zero upon parse error, and moves
14 * the string pointer to the byte after the value end. */
15 int css_parse_value(struct css_property_info
*propinfo
,
16 union css_property_value
*value
,
17 struct scanner
*scanner
);
20 /* Here come the css_property_value_parsers provided. */
22 /* Takes no parser_data. */
23 int css_parse_background_value(struct css_property_info
*propinfo
,
24 union css_property_value
*value
,
25 struct scanner
*scanner
);
27 /* Takes no parser_data. */
28 int css_parse_color_value(struct css_property_info
*propinfo
,
29 union css_property_value
*value
,
30 struct scanner
*scanner
);
32 /* Takes no parser_data. */
33 int css_parse_display_value(struct css_property_info
*propinfo
,
34 union css_property_value
*value
,
35 struct scanner
*scanner
);
37 /* Takes no parser_data. */
38 int css_parse_text_decoration_value(struct css_property_info
*propinfo
,
39 union css_property_value
*value
,
40 struct scanner
*scanner
);
42 /* Takes no parser_data. */
43 int css_parse_font_style_value(struct css_property_info
*propinfo
,
44 union css_property_value
*value
,
45 struct scanner
*scanner
);
47 /* Takes no parser_data. */
48 int css_parse_font_weight_value(struct css_property_info
*propinfo
,
49 union css_property_value
*value
,
50 struct scanner
*scanner
);
52 /* Takes no parser_data. */
53 int css_parse_text_align_value(struct css_property_info
*propinfo
,
54 union css_property_value
*value
,
55 struct scanner
*scanner
);
57 /* Takes no parser_data. */
58 int css_parse_white_space_value(struct css_property_info
*propinfo
,
59 union css_property_value
*value
,
60 struct scanner
*scanner
);