summaryrefslogtreecommitdiff
path: root/ccss/ccss-grammar.c
AgeCommit message (Collapse)AuthorFilesLines
2009-09-01[function] Make function objects dynamically creatable and ref-counted.Robert Staudinger1-4/+29
2009-08-31[function] Deprecate struct fields.Robert Staudinger1-0/+1
2009-08-31No more expose libcroco in the headers.Robert Staudinger1-1/+2
Move functions to "unstable" headers that can be used at own risk by those wanting to implement custom properties.
2009-08-07[stylesheet] Clean up if parsing fails.Robert Staudinger1-6/+6
Unload stale CSS part using the new descriptor infrastructure.
2009-08-07[stylesheet] Implement ccss_stylesheet_unload() to unload css parts.Robert Staudinger1-6/+23
Every selector now stores a descriptor of the CSS file or buffer it originates from. For unloading a file or buffer the internal stylesheet representation is iterated and all selectors and blocks with matching descriptors are destroyed. This also requires an update to ccss_node_get_style(), the descriptor for the inline style is passed to the callback, which the consumer must store in order to unload the inline style later on. The above change in turn obsoletes ccss_stylesheet_invalidate_node() since all unloading now uses a consistent API. Also fix a related memory leak, selectors and -groups would be left over when destroying a stylesheet.
2009-08-04[ccss-gtk] Add 'dump' option to 'ccss-stylesheet-to-gtkrc'.Robert Staudinger1-0/+19
Also add ability to load stylesheets with 'user-agent', 'user' or 'author' precedence. This requires a new function ccss_grammar_create_stylesheet() for creating an empty stylesheet.
2009-05-07[ccss] Update documentation.Robert Staudinger1-1/+2
2009-04-09Intenal renamings for better consistency.Robert Staudinger1-7/+7
2009-04-07Implement the CSS "padding" property.Robert Staudinger1-0/+2
Add "example-6" as showcase and test.
2009-04-03Move property interpretation code back to ccss.Robert Staudinger1-2/+32
The 'background', 'border', 'border-image' and 'color' properties can now be queried in interpreted format without depending on cairo. Also implement a cache for loaded images (cairo surfaces). Cache key is the image file's uri.
2009-04-02Use vim modelines.Robert Staudinger1-0/+2
2008-12-11* ccss/ccss-grammar.c (ccss_grammar_add_properties): don't warn when theRobert Staudinger1-2/+4
default property handler is overwritten.
2008-12-04* ccss-doc/ccss-sections.txt:Robert Staudinger1-0/+38
* ccss-doc/tmpl/grammar.sgml: * ccss-gtk/Makefile.am: * ccss-gtk/ccss-gtk-properties.c: * ccss-gtk/ccss-gtk-properties.h: * ccss/ccss-grammar.c (ccss_grammar_lookup_property), (ccss_grammar_lookup_function): * ccss/ccss-grammar.h: * ccss/ccss.sym: API to query property- and function-handlers.
2008-12-02* HACKING:Robert Staudinger1-8/+10
* ccss-cairo/ccss-image.c (load_image): * ccss-doc/ccss-sections.txt: * ccss-doc/tmpl/stylesheet.sgml: * ccss/ccss-grammar.c (ccss_grammar_create_stylesheet_from_buffer), (ccss_grammar_create_stylesheet_from_file): * ccss/ccss-style-priv.h: * ccss/ccss-style.c (ccss_style_destroy): * ccss/ccss-stylesheet-priv.h: * ccss/ccss-stylesheet.c (ccss_stylesheet_create), (ccss_stylesheet_add_from_file), (ccss_stylesheet_destroy), (ccss_stylesheet_reference), (ccss_stylesheet_get_reference_count), (ccss_stylesheet_query_type), (ccss_stylesheet_query): * ccss/ccss-stylesheet.h: * ccss/ccss.sym: Reference counting for `ccss_stylesheet_t'.
2008-12-01* ccss-cairo/ccss-background-parser.c (bg_image_parse),Robert Staudinger1-4/+9
(background_factory), (background_attachment_create), (background_image_create), (background_position_create), (background_repeat_create), (background_size_create): * ccss-cairo/ccss-border-image-parser.c (border_image_create): * ccss-cairo/ccss-border-parser.c (border_color_factory), (border_style_factory), (border_width_factory), (border_factory_impl), (border_factory), (border_left_factory), (border_top_factory), (border_right_factory), (border_bottom_factory), (border_radius_create), (border_radius_factory), (border_style_create), (border_width_create): * ccss-cairo/ccss-color.c (ccss_color_parse), (ccss_color_create): * ccss-cairo/ccss-color.h: * ccss-cairo/ccss-image.c (ccss_image_parse): * ccss-cairo/ccss-image.h: * ccss-doc/tmpl/grammar.sgml: * ccss-doc/tmpl/node.sgml: * ccss-doc/tmpl/property.sgml: * ccss-doc/tmpl/stylesheet.sgml: * ccss/ccss-grammar-function.c (ccss_grammar_invoke_function): * ccss/ccss-grammar-parse.c (property_cb), (ccss_grammar_parse_file), (ccss_grammar_parse_buffer), (ccss_grammar_parse_inline): * ccss/ccss-grammar-priv.h: * ccss/ccss-grammar.c (ccss_grammar_create_stylesheet_from_buffer), (ccss_grammar_create_stylesheet_from_file): * ccss/ccss-grammar.h: * ccss/ccss-property-generic.c (property_create): * ccss/ccss-property.h: * ccss/ccss-stylesheet.c (ccss_stylesheet_add_from_file), (query_node): * ccss/ccss-stylesheet.h: * examples/example-1.c (main): * examples/example-2.c (main): * examples/example-3.c (main): * examples/example-4.c (main): * examples/example-5.c (main): Pass user-data to property- and function-handlers.
2008-12-01* ccss/ccss-block-priv.h:Robert Staudinger1-1/+1
* ccss/ccss-block.c: * ccss/ccss-block.h: * ccss/ccss-function.h: * ccss/ccss-grammar-function.c: * ccss/ccss-grammar-parse.c: * ccss/ccss-grammar-priv.h: * ccss/ccss-grammar.c: * ccss/ccss-grammar.h: * ccss/ccss-macros.h: * ccss/ccss-node-priv.h: * ccss/ccss-node.c: * ccss/ccss-node.h: * ccss/ccss-priv.h: * ccss/ccss-property-generic.c: * ccss/ccss-property-generic.h: * ccss/ccss-property.c: * ccss/ccss-property.h: * ccss/ccss-selector-group.c: * ccss/ccss-selector-group.h: * ccss/ccss-selector.c: * ccss/ccss-selector.h: * ccss/ccss-style-priv.h: * ccss/ccss-style.c: * ccss/ccss-style.h: * ccss/ccss-stylesheet-priv.h: * ccss/ccss-stylesheet.c: * ccss/ccss-stylesheet.h: * ccss/ccss.c: * ccss/ccss.h: Tweak license header.
2008-12-01* ccss/ccss-grammar-parse.c (ccss_grammar_parse_file),Robert Staudinger1-2/+2
(ccss_grammar_parse_buffer), (ccss_grammar_parse_inline): * ccss/ccss-grammar-priv.h: * ccss/ccss-grammar.c (ccss_grammar_create_stylesheet_from_buffer), (ccss_grammar_create_stylesheet_from_file): * ccss/ccss-stylesheet.c (ccss_stylesheet_add_from_file), (query_node): Improve internal naming consistency.
2008-12-01* ccss-cairo-doc/ccss-cairo-docs.sgml:Robert Staudinger1-3/+3
* ccss-cairo-doc/ccss-cairo-sections.txt: * ccss-cairo-doc/tmpl/grammar.sgml: * ccss-doc/ccss-docs.sgml: * ccss-doc/ccss-sections.txt: * ccss-doc/tmpl/ccss-unused.sgml: * ccss-doc/tmpl/ccss.sgml: * ccss-doc/tmpl/grammar.sgml: * ccss-doc/tmpl/node.sgml: * ccss-doc/tmpl/property.sgml: * ccss-doc/tmpl/stylesheet.sgml: * ccss/ccss-grammar-priv.h: * ccss/ccss-grammar.c: Update docs.
2008-12-01* ccss/Makefile.am:Robert Staudinger1-0/+215
* ccss/ccss-function-priv.h: * ccss/ccss-function.c: * ccss/ccss-function.h: * ccss/ccss-grammar-function.c (parse_args_r), (ccss_grammar_invoke_function): * ccss/ccss-grammar-parse.c (map_attribute_selector_match), (calculate_importance), (walk_additional_selector), (walk_simple_selector_r), (walk_selector), (start_selector_cb), (property_cb), (end_selector_cb), (ccss_parser_parse_file), (ccss_parser_parse_buffer), (ccss_parser_parse_inline): * ccss/ccss-grammar-priv.h: * ccss/ccss-grammar.c (ccss_grammar_create), (ccss_grammar_destroy), (ccss_grammar_reference), (ccss_grammar_get_reference_count), (ccss_grammar_add_properties), (ccss_grammar_add_functions), (ccss_grammar_create_stylesheet_from_buffer), (ccss_grammar_create_stylesheet_from_file): * ccss/ccss-grammar.h: * ccss/ccss-parser.c: * ccss/ccss-parser.h: * ccss/ccss-stylesheet-priv.h: * ccss/ccss-stylesheet.c (ccss_stylesheet_fix_dangling_selectors), (ccss_stylesheet_add_from_file), (ccss_stylesheet_destroy), (query_node): * ccss/ccss-stylesheet.h: * ccss/ccss.c (ccss_init), (ccss_shutdown): * ccss/ccss.h: * ccss/ccss.sym: Introduce `ccss_grammar_t' to move away from global properties and functions.