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 {
76 enum css_action_type {
83 enum css_action_type type;
84 struct style_prop prop; // for CSS_ACTION_SET
89 extern struct css_sheet *css_this;
91 struct css_sheet *css_load(char *filename);
92 struct style_prop *css_parse_prop(struct mempool *mp, char *objname, const char *key_str, const char *value_str);
96 void css_error(const char *err, ...);
98 void css_lex_open(void);
99 void css_lex_close(void);
100 void css_lex_string(const char *str);
102 color_t css_rgb_to_color(const char *rgb);
106 void css_dump(struct css_sheet *ss);
107 void css_dump_rule(struct css_rule *r);
108 void css_dump_selector(struct css_selector *s);
109 void css_dump_action(struct css_action *a);
111 void css_apply(struct css_sheet *ss, struct style_results *r);