stylecontext: Export gtk_style_context_get_root()

.. in the private header. This avoids tiny wrapper functions.
This commit is contained in:
Benjamin Otte 2015-01-30 11:42:22 +01:00
parent 55e68bc2ea
commit 8e1017db35
3 changed files with 8 additions and 18 deletions

View File

@ -315,7 +315,7 @@ static void
gtk_style_context_cascade_changed (GtkStyleCascade *cascade,
GtkStyleContext *context)
{
_gtk_style_context_queue_invalidate (context, GTK_CSS_CHANGE_SOURCE);
gtk_css_node_invalidate (gtk_style_context_get_root (context), GTK_CSS_CHANGE_SOURCE);
}
static void
@ -375,7 +375,7 @@ static void
gtk_style_context_update (GdkFrameClock *clock,
GtkStyleContext *context)
{
_gtk_style_context_queue_invalidate (context, GTK_CSS_CHANGE_ANIMATE);
gtk_css_node_invalidate (gtk_style_context_get_root (context), GTK_CSS_CHANGE_ANIMATE);
}
static gboolean
@ -603,7 +603,7 @@ gtk_style_context_is_saved (GtkStyleContext *context)
return context->priv->saved_nodes != NULL;
}
static GtkCssNode *
GtkCssNode *
gtk_style_context_get_root (GtkStyleContext *context)
{
GtkStyleContextPrivate *priv;
@ -889,7 +889,7 @@ _gtk_style_context_set_widget (GtkStyleContext *context,
_gtk_style_context_update_animating (context);
_gtk_style_context_queue_invalidate (context, GTK_CSS_CHANGE_ANY_SELF);
gtk_css_node_invalidate (gtk_style_context_get_root (context), GTK_CSS_CHANGE_ANY_SELF);
}
/**
@ -1490,7 +1490,7 @@ gtk_style_context_set_parent (GtkStyleContext *context,
priv->parent = parent;
g_object_notify (G_OBJECT (context), "parent");
_gtk_style_context_queue_invalidate (context, GTK_CSS_CHANGE_ANY_PARENT | GTK_CSS_CHANGE_ANY_SIBLING);
gtk_css_node_invalidate (gtk_style_context_get_root (context), GTK_CSS_CHANGE_ANY_PARENT | GTK_CSS_CHANGE_ANY_SIBLING);
}
/**
@ -2945,16 +2945,6 @@ _gtk_style_context_validate (GtkStyleContext *context,
_gtk_bitmask_free (changes);
}
void
_gtk_style_context_queue_invalidate (GtkStyleContext *context,
GtkCssChange change)
{
g_return_if_fail (GTK_IS_STYLE_CONTEXT (context));
g_return_if_fail (change != 0);
gtk_css_node_invalidate (gtk_style_context_get_root (context), change);
}
/**
* gtk_style_context_invalidate:
* @context: a #GtkStyleContext.

View File

@ -20,6 +20,7 @@
#include "gtkstylecontext.h"
#include "gtkcssnodeprivate.h"
#include "gtkicontheme.h"
#include "gtkstyleproviderprivate.h"
#include "gtkbitmaskprivate.h"
@ -29,6 +30,7 @@ G_BEGIN_DECLS
void _gtk_style_context_set_widget (GtkStyleContext *context,
GtkWidget *widget);
GtkCssNode * gtk_style_context_get_root (GtkStyleContext *context);
void gtk_style_context_set_id (GtkStyleContext *context,
const char *id);
const char * gtk_style_context_get_id (GtkStyleContext *context);
@ -46,8 +48,6 @@ void _gtk_style_context_validate (GtkStyleContext *c
gint64 timestamp,
GtkCssChange change,
const GtkBitmask*parent_changes);
void _gtk_style_context_queue_invalidate (GtkStyleContext *context,
GtkCssChange change);
gboolean _gtk_style_context_check_region_name (const gchar *str);
gboolean _gtk_style_context_resolve_color (GtkStyleContext *context,

View File

@ -16465,7 +16465,7 @@ _gtk_widget_invalidate_style_context (GtkWidget *widget,
if (priv->context == NULL)
return;
_gtk_style_context_queue_invalidate (priv->context, change);
gtk_css_node_invalidate (gtk_style_context_get_root (priv->context), change);
}
/**