aboutsummaryrefslogtreecommitdiff
path: root/src/cssparser.hh
blob: 7fd3b5d0c61f87a36fc353ff6134375de4b6bc11 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#ifndef __CSSPARSER_HH__
#define __CSSPARSER_HH__

#include "css.hh"

/* The last three ones are never parsed. */
#define CSS_NUM_INTERNAL_PROPERTIES 3
#define CSS_NUM_PARSED_PROPERTIES \
   (CSS_PROPERTY_LAST - CSS_NUM_INTERNAL_PROPERTIES)



typedef enum {
   CSS_ORIGIN_USER_AGENT,
   CSS_ORIGIN_USER,
   CSS_ORIGIN_AUTHOR,
} CssOrigin;

typedef struct {
   const char *symbol;
   const CssValueType type[3];
   const char *const *enum_symbols;
} CssPropertyInfo;

void        a_Css_parse                       (CssContext *context,
                                               const char *buf,
                                               int buflen,
                                               CssOrigin origin);

CssPropertyList *a_Css_parse_declaration(const char *buf, int buflen);

extern const CssPropertyInfo Css_property_info[CSS_PROPERTY_LAST];

#endif // __CSS_H__