2 * Hic Est Leo -- MapCSS Stylesheets
4 * (c) 2014--2015 Martin Mares <mj@ucw.cz>
18 /* For parsing for single properties by css_parse_prop */
20 struct style_prop *parsed_prop;
24 cnode n; // In the list of rules
25 clist selectors; // Alternative selectors
31 clist path; // Element path
34 enum css_object_type {
35 CSS_TYPE_ANY = OSM_TYPE_INVALID,
36 CSS_TYPE_NODE = OSM_TYPE_NODE,
37 CSS_TYPE_WAY = OSM_TYPE_WAY,
38 CSS_TYPE_RELATION = OSM_TYPE_RELATION,
45 enum osm_object_type type; // Object type or OSM_TYPE_ANY
46 clist conditions; // Attribute conditions
47 layer_t layer; // STYLE_LAYER_xxx or more
52 enum css_path_modifier {
53 PATH_MOD_NEVER = 1, // Unknown modifier, never match
69 struct css_condition {
78 struct style_prop prop;
83 extern struct css_sheet *css_this;
85 struct css_sheet *css_load(char *filename);
86 struct style_prop *css_parse_prop(struct mempool *mp, char *objname, const char *key_str, const char *value_str);
90 void css_error(char *err, ...);
92 void css_lex_open(void);
93 void css_lex_close(void);
94 void css_lex_string(const char *str);
96 color_t css_rgb_to_color(const char *rgb);
100 void css_dump(struct css_sheet *ss);
101 void css_dump_rule(struct css_rule *r);
102 void css_dump_selector(struct css_selector *s);
103 void css_dump_action(struct css_action *a);
105 void css_apply(struct css_sheet *ss, struct style_results *r);