diff options
author | Robert Staudinger <robsta@gnome.org> | 2009-07-03 18:15:08 +0200 |
---|---|---|
committer | Robert Staudinger <robsta@gnome.org> | 2009-07-03 18:15:08 +0200 |
commit | 5862cf3c8da5045e557187f5092d668c5668c9c9 (patch) | |
tree | 66bbb9b0b1bba5babf97dfa4a663978d0e77ac78 /ccss-gtk | |
parent | 992e2ffdf84cef5073fc52876319d1c0f4b5d83b (diff) |
[feature] Support for multiple pseudo-classes per node.
Diffstat (limited to 'ccss-gtk')
-rw-r--r-- | ccss-gtk/ccss-gtk-stylesheet.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/ccss-gtk/ccss-gtk-stylesheet.c b/ccss-gtk/ccss-gtk-stylesheet.c index 419f1cb..d67af3b 100644 --- a/ccss-gtk/ccss-gtk-stylesheet.c +++ b/ccss-gtk/ccss-gtk-stylesheet.c @@ -32,7 +32,7 @@ typedef struct { ccss_node_t parent; char const *type_name; char const *id; - char const *pseudo_class; + char const *pseudo_classes[2]; } Node; static char const * @@ -47,10 +47,10 @@ get_id (Node const *self) return self->id; } -static char const * -get_pseudo_class (Node const *self) +static char const ** +get_pseudo_classes (Node const *self) { - return self->pseudo_class; + return (char const **) self->pseudo_classes; } static ccss_node_class_t _node_class = { @@ -60,7 +60,7 @@ static ccss_node_class_t _node_class = { .get_id = (ccss_node_get_id_f) get_id, .get_type = (ccss_node_get_type_f) get_type, .get_class = NULL, - .get_pseudo_class = (ccss_node_get_pseudo_class_f) get_pseudo_class, + .get_pseudo_classes = (ccss_node_get_pseudo_classes_f) get_pseudo_classes, .get_attribute = NULL, .get_viewport = NULL, .release = NULL @@ -214,7 +214,8 @@ accumulate_state (ccss_stylesheet_t *stylesheet, ccss_node_init (&node.parent, &_node_class); node.type_name = type_name; node.id = NULL; - node.pseudo_class = state_name; + node.pseudo_classes[0] = state_name; + node.pseudo_classes[1] = NULL; style = ccss_stylesheet_query (stylesheet, &node.parent); if (!style) { |