2007-07-27 19:31:58 -04:00
|
|
|
/*! @file
|
|
|
|
* This is interface for the value parser. It is intended to be used
|
|
|
|
* only internally inside of the CSS engine. */
|
2005-09-15 09:58:31 -04:00
|
|
|
|
|
|
|
#ifndef EL__DOCUMENT_CSS_PARSER_H
|
|
|
|
#define EL__DOCUMENT_CSS_PARSER_H
|
|
|
|
|
|
|
|
#include "util/lists.h"
|
2020-10-05 14:14:55 -04:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2005-09-15 09:58:31 -04:00
|
|
|
struct scanner;
|
|
|
|
struct css_stylesheet;
|
|
|
|
struct uri;
|
|
|
|
|
2007-07-27 19:31:58 -04:00
|
|
|
/** This function takes a semicolon separated list of declarations
|
|
|
|
* from the given string, parses them to atoms, and chains the newly
|
|
|
|
* created struct css_property objects to the specified list.
|
|
|
|
* @returns positive value in case it recognized a property in the
|
|
|
|
* given string, or zero in case of an error. */
|
2007-07-26 15:39:08 -04:00
|
|
|
void css_parse_properties(LIST_OF(struct css_property) *props,
|
|
|
|
struct scanner *scanner);
|
2005-09-15 09:58:31 -04:00
|
|
|
|
|
|
|
|
2007-07-27 19:31:58 -04:00
|
|
|
/** Parses the @a string and adds any recognized selectors + properties to the
|
|
|
|
* given stylesheet @a css. If the selector is already in the stylesheet it
|
2005-09-15 09:58:31 -04:00
|
|
|
* properties are added to the that selector. */
|
|
|
|
void css_parse_stylesheet(struct css_stylesheet *css, struct uri *base_uri,
|
2021-01-02 10:20:27 -05:00
|
|
|
const char *string, const char *end);
|
2005-09-15 09:58:31 -04:00
|
|
|
|
2020-10-05 14:14:55 -04:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2005-09-15 09:58:31 -04:00
|
|
|
#endif
|