forked from AuroraMiddleware/gtk
cssnode: Avoid style context api
Duplicate the print flags in gtkcssnodeprivate.h, so we don't rely on gtkstylecontext.h here.
This commit is contained in:
parent
ac3177ce95
commit
f42fe500c9
@ -976,7 +976,7 @@ gtk_style_context_to_string (GtkStyleContext *context,
|
||||
|
||||
string = g_string_new ("");
|
||||
|
||||
gtk_css_node_print (priv->cssnode, flags, string, 0);
|
||||
gtk_css_node_print (priv->cssnode, (GtkCssNodePrintFlags)flags, string, 0);
|
||||
|
||||
return g_string_free (string, FALSE);
|
||||
}
|
||||
|
@ -1388,10 +1388,10 @@ gtk_css_node_get_style_provider (GtkCssNode *cssnode)
|
||||
}
|
||||
|
||||
void
|
||||
gtk_css_node_print (GtkCssNode *cssnode,
|
||||
GtkStyleContextPrintFlags flags,
|
||||
GString *string,
|
||||
guint indent)
|
||||
gtk_css_node_print (GtkCssNode *cssnode,
|
||||
GtkCssNodePrintFlags flags,
|
||||
GString *string,
|
||||
guint indent)
|
||||
{
|
||||
gboolean need_newline = FALSE;
|
||||
|
||||
@ -1405,7 +1405,7 @@ gtk_css_node_print (GtkCssNode *cssnode,
|
||||
if (!cssnode->visible)
|
||||
g_string_append_c (string, ']');
|
||||
|
||||
if (flags & GTK_STYLE_CONTEXT_PRINT_SHOW_CHANGE)
|
||||
if (flags & GTK_CSS_NODE_PRINT_SHOW_CHANGE)
|
||||
{
|
||||
GtkCssStyle *style = gtk_css_node_get_style (cssnode);
|
||||
GtkCssChange change;
|
||||
@ -1417,10 +1417,10 @@ gtk_css_node_print (GtkCssNode *cssnode,
|
||||
|
||||
g_string_append_c (string, '\n');
|
||||
|
||||
if (flags & GTK_STYLE_CONTEXT_PRINT_SHOW_STYLE)
|
||||
if (flags & GTK_CSS_NODE_PRINT_SHOW_STYLE)
|
||||
need_newline = gtk_css_style_print (gtk_css_node_get_style (cssnode), string, indent + 2, TRUE);
|
||||
|
||||
if (flags & GTK_STYLE_CONTEXT_PRINT_RECURSE)
|
||||
if (flags & GTK_CSS_NODE_PRINT_RECURSE)
|
||||
{
|
||||
GtkCssNode *node;
|
||||
|
||||
|
@ -24,7 +24,6 @@
|
||||
#include "gtkcssstylechangeprivate.h"
|
||||
#include "gtkbitmaskprivate.h"
|
||||
#include "gtkcsstypesprivate.h"
|
||||
#include "deprecated/gtkstylecontext.h"
|
||||
#include "gtklistlistmodelprivate.h"
|
||||
|
||||
G_BEGIN_DECLS
|
||||
@ -155,10 +154,17 @@ void gtk_css_node_validate (GtkCssNode *
|
||||
|
||||
GtkStyleProvider * gtk_css_node_get_style_provider (GtkCssNode *cssnode) G_GNUC_PURE;
|
||||
|
||||
void gtk_css_node_print (GtkCssNode *cssnode,
|
||||
GtkStyleContextPrintFlags flags,
|
||||
GString *string,
|
||||
guint indent);
|
||||
typedef enum {
|
||||
GTK_CSS_NODE_PRINT_NONE = 0,
|
||||
GTK_CSS_NODE_PRINT_RECURSE = 1 << 0,
|
||||
GTK_CSS_NODE_PRINT_SHOW_STYLE = 1 << 1,
|
||||
GTK_CSS_NODE_PRINT_SHOW_CHANGE = 1 << 2
|
||||
} GtkCssNodePrintFlags;
|
||||
|
||||
void gtk_css_node_print (GtkCssNode *cssnode,
|
||||
GtkCssNodePrintFlags flags,
|
||||
GString *string,
|
||||
guint indent);
|
||||
|
||||
GListModel * gtk_css_node_observe_children (GtkCssNode *cssnode);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user