[gtk+] stylecontext: Expose a function to get at the current changes



commit e0586e3680282a4d57d6812b77c70c136902f920
Author: Benjamin Otte <otte redhat com>
Date:   Fri Nov 30 20:36:57 2012 +0100

    stylecontext: Expose a function to get at the current changes

 gtk/gtkstylecontext.c        |   20 ++++++++++++++++++++
 gtk/gtkstylecontextprivate.h |    3 +++
 2 files changed, 23 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkstylecontext.c b/gtk/gtkstylecontext.c
index a11ed5f..d8245b9 100644
--- a/gtk/gtkstylecontext.c
+++ b/gtk/gtkstylecontext.c
@@ -4512,6 +4512,26 @@ gtk_draw_insertion_cursor (GtkWidget          *widget,
                          draw_arrow);
 }
 
+/**
+ * _gtk_style_context_get_changes:
+ * @context: the context to query
+ *
+ * Queries the context for the changes for the currently executing
+ * GtkStyleContext::invalidate signal. If no signal is currently
+ * emitted, this function returns %NULL.
+ *
+ * FIXME 4.0: Make this part of the signal.
+ *
+ * Returns: %NULL or the currently invalidating changes
+ **/
+const GtkBitmask *
+_gtk_style_context_get_changes (GtkStyleContext *context)
+{
+  g_return_val_if_fail (GTK_IS_STYLE_CONTEXT (context), NULL);
+
+  return context->priv->invalidating_context;
+}
+
 static AtkAttributeSet *
 add_attribute (AtkAttributeSet  *attributes,
                AtkTextAttribute  attr,
diff --git a/gtk/gtkstylecontextprivate.h b/gtk/gtkstylecontextprivate.h
index 0fd3f6b..14d44c4 100644
--- a/gtk/gtkstylecontextprivate.h
+++ b/gtk/gtkstylecontextprivate.h
@@ -27,6 +27,9 @@ G_BEGIN_DECLS
 
 void            _gtk_style_context_set_widget                (GtkStyleContext *context,
                                                               GtkWidget       *widget);
+const GtkBitmask *
+                _gtk_style_context_get_changes               (GtkStyleContext *context);
+
 GtkCssValue   * _gtk_style_context_peek_property             (GtkStyleContext *context,
                                                               guint            property_id);
 double         _gtk_style_context_get_number                 (GtkStyleContext *context,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]