summaryrefslogtreecommitdiff
path: root/gtk/gtkcsswidgetnode.c
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2015-12-12 02:02:04 +0100
committerBenjamin Otte <otte@redhat.com>2015-12-12 02:16:04 +0100
commit971a277419800fbcaa9dafa8bb68fdb19d866aee (patch)
tree0ce504568b8718d82d87da6045a39ea0a497be1a /gtk/gtkcsswidgetnode.c
parent0ad259a178f5172364c3acce41f8d5cde0f571c6 (diff)
downloadgtk+-971a277419800fbcaa9dafa8bb68fdb19d866aee.tar.gz
cssnode: Change style-changed signal
Instead of having old and new style, now have a GtkCssStyleChange opaque object that will compute the changes you are interested in for you. This simplifies change signal handlers quite a bit and avoids lots of repeated computation in every signal handler.
Diffstat (limited to 'gtk/gtkcsswidgetnode.c')
-rw-r--r--gtk/gtkcsswidgetnode.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/gtk/gtkcsswidgetnode.c b/gtk/gtkcsswidgetnode.c
index 63c4b5bd1e..e6dc7019a6 100644
--- a/gtk/gtkcsswidgetnode.c
+++ b/gtk/gtkcsswidgetnode.c
@@ -45,9 +45,8 @@ gtk_css_widget_node_finalize (GObject *object)
}
static void
-gtk_css_widget_node_style_changed (GtkCssNode *cssnode,
- GtkCssStyle *old_style,
- GtkCssStyle *new_style)
+gtk_css_widget_node_style_changed (GtkCssNode *cssnode,
+ GtkCssStyleChange *change)
{
GtkCssWidgetNode *node;
@@ -56,9 +55,11 @@ gtk_css_widget_node_style_changed (GtkCssNode *cssnode,
if (node->widget)
gtk_widget_clear_path (node->widget);
- GTK_CSS_NODE_CLASS (gtk_css_widget_node_parent_class)->style_changed (cssnode, old_style, new_style);
+ GTK_CSS_NODE_CLASS (gtk_css_widget_node_parent_class)->style_changed (cssnode, change);
- node->accumulated_changes = gtk_css_style_add_difference (node->accumulated_changes, new_style, old_style);
+ node->accumulated_changes = gtk_css_style_add_difference (node->accumulated_changes,
+ gtk_css_style_change_get_new_style (change),
+ gtk_css_style_change_get_old_style (change));
}
static gboolean