mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-15 14:50:06 +00:00
stylecontext: Export gtk_style_context_get_root()
.. in the private header. This avoids tiny wrapper functions.
This commit is contained in:
parent
55e68bc2ea
commit
8e1017db35
@ -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.
|
||||
|
@ -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,
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user