summaryrefslogtreecommitdiff
path: root/gtk/gtkstylecontext.h
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2015-12-28 01:09:54 -0500
committerMatthias Clasen <mclasen@redhat.com>2016-01-03 09:19:30 -0500
commit68edc47f6a1585c90d8cace2f65c61a2a413b79e (patch)
tree58bf74ba106dcea1d070440e676970092beb450b /gtk/gtkstylecontext.h
parenta6624d803ece178e467230e285cd9d4561b09ca1 (diff)
downloadgtk+-68edc47f6a1585c90d8cace2f65c61a2a413b79e.tar.gz
Add a function to dump CSS nodes and styles
Add a gtk_style_context_to_string function that can serialize a CSS node or tree of nodes, optionally including CSS properties as well. This will be useful in writing tests.
Diffstat (limited to 'gtk/gtkstylecontext.h')
-rw-r--r--gtk/gtkstylecontext.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/gtk/gtkstylecontext.h b/gtk/gtkstylecontext.h
index 8428213b26..d6fe5754f7 100644
--- a/gtk/gtkstylecontext.h
+++ b/gtk/gtkstylecontext.h
@@ -1208,6 +1208,17 @@ void gtk_draw_insertion_cursor (GtkWidget *widget,
GtkTextDirection direction,
gboolean draw_arrow);
+typedef enum {
+ GTK_STYLE_CONTEXT_PRINT_NONE = 0,
+ GTK_STYLE_CONTEXT_PRINT_RECURSE = 1 << 0,
+ GTK_STYLE_CONTEXT_PRINT_SHOW_STYLE = 1 << 1,
+ GTK_STYLE_CONTEXT_PRINT_SHOW_INITIAL = 1 << 2
+} GtkStyleContextPrintFlags;
+
+GDK_AVAILABLE_IN_3_20
+char * gtk_style_context_to_string (GtkStyleContext *context,
+ GtkStyleContextPrintFlags flags);
+
G_END_DECLS
#endif /* __GTK_STYLE_CONTEXT_H__ */