PEG Markdown Highlight
|
Style parser public interface. More...
Go to the source code of this file.
Classes | |
struct | pmh_attr_argb_color |
Color (ARGB) attribute value. More... | |
struct | pmh_attr_font_styles |
Font style attribute value. More... | |
struct | pmh_attr_font_size |
Font size attribute value. More... | |
union | pmh_attr_value |
Style attribute value. More... | |
struct | pmh_style_attribute |
Style attribute. More... | |
struct | pmh_style_collection |
Collection of styles. More... | |
Typedefs | |
typedef struct pmh_style_attribute | pmh_style_attribute |
Style attribute. | |
Enumerations | |
enum | pmh_attr_type { pmh_attr_type_foreground_color, pmh_attr_type_background_color, pmh_attr_type_caret_color, pmh_attr_type_font_size_pt, pmh_attr_type_font_family, pmh_attr_type_font_style, pmh_attr_type_other } |
Style attribute types. More... | |
Functions | |
pmh_style_collection * | pmh_parse_styles (char *input, void(*error_callback)(char *, int, void *), void *error_callback_context) |
Parse stylesheet string, return style collection. | |
void | pmh_free_style_collection (pmh_style_collection *collection) |
Free a pmh_style_collection. | |
char * | pmh_attr_name_from_type (pmh_attr_type type) |
pmh_attr_type | pmh_attr_type_from_name (char *name) |
Style parser public interface.
enum pmh_attr_type |
Style attribute types.
void pmh_free_style_collection | ( | pmh_style_collection * | collection | ) |
Free a pmh_style_collection.
Frees a pmh_style_collection value returned by pmh_parse_styles().
[in] | collection | The collection to free. |
pmh_style_collection* pmh_parse_styles | ( | char * | input, |
void(*)(char *, int, void *) | error_callback, | ||
void * | error_callback_context | ||
) |
Parse stylesheet string, return style collection.
[in] | input | The stylesheet string to parse. |
[in] | error_callback | Callback function to be called when errors occur during parsing. The first argument to the callback function is the error message and the second one the line number in the original input where the error occurred. The last argument will always get the value you pass in for the error_callback_context argument to this function. Pass in NULL to suppress error reporting. |
[in] | error_callback_context | Arbitrary context pointer for the error callback function; will be passed in as the last argument to error_callback. |