]> gitweb.michael.orlitzky.com - libsvgtiny.git/blobdiff - src/svgtiny_internal.h
src/svgtiny_internal.h: add CSS context to parser state
[libsvgtiny.git] / src / svgtiny_internal.h
index 158d23059c60c5ea69b01e71ad2fe58832cacbfb..7480f233539cdeb11b89aa7c319ec5d084c74dc3 100644 (file)
@@ -11,6 +11,7 @@
 #include <stdbool.h>
 
 #include <dom/dom.h>
+#include <libcss/libcss.h>
 
 #ifndef UNUSED
 #define UNUSED(x) ((void) (x))
@@ -46,7 +47,12 @@ struct svgtiny_parse_state {
                float a, b, c, d, e, f;
        } ctm;
 
-       /*struct css_style style;*/
+       /* A libcss context to hold any stylesheets that are present
+        * in the SVG document. This should be pre-populated rather
+        * than on-the-fly, because, for example, a <style> sheet at
+        * the end of the document should affect the SVG elements that
+        * precede it. */
+       css_select_ctx *select_ctx;
 
        /* paint attributes */
        svgtiny_colour fill;
@@ -102,9 +108,4 @@ void *svgtiny_list_get(struct svgtiny_list *list,
 void *svgtiny_list_push(struct svgtiny_list *list);
 void svgtiny_list_free(struct svgtiny_list *list);
 
-/* colors.gperf */
-const struct svgtiny_named_color *
-               svgtiny_color_lookup(register const char *str,
-                               register unsigned int len);
-
 #endif