cssnode: Remove unused widget path vfuncs

This commit is contained in:
Benjamin Otte 2020-01-21 03:03:46 +01:00
parent 563ad2db1b
commit 6a1adf6f1a
5 changed files with 0 additions and 146 deletions

View File

@ -495,18 +495,6 @@ gtk_css_node_real_init_matcher (GtkCssNode *cssnode,
return TRUE; return TRUE;
} }
static GtkWidgetPath *
gtk_css_node_real_create_widget_path (GtkCssNode *cssnode)
{
return gtk_widget_path_new ();
}
static const GtkWidgetPath *
gtk_css_node_real_get_widget_path (GtkCssNode *cssnode)
{
return NULL;
}
static GtkStyleProvider * static GtkStyleProvider *
gtk_css_node_real_get_style_provider (GtkCssNode *cssnode) gtk_css_node_real_get_style_provider (GtkCssNode *cssnode)
{ {
@ -587,8 +575,6 @@ gtk_css_node_class_init (GtkCssNodeClass *klass)
klass->queue_validate = gtk_css_node_real_queue_validate; klass->queue_validate = gtk_css_node_real_queue_validate;
klass->dequeue_validate = gtk_css_node_real_dequeue_validate; klass->dequeue_validate = gtk_css_node_real_dequeue_validate;
klass->init_matcher = gtk_css_node_real_init_matcher; klass->init_matcher = gtk_css_node_real_init_matcher;
klass->create_widget_path = gtk_css_node_real_create_widget_path;
klass->get_widget_path = gtk_css_node_real_get_widget_path;
klass->get_style_provider = gtk_css_node_real_get_style_provider; klass->get_style_provider = gtk_css_node_real_get_style_provider;
klass->get_frame_clock = gtk_css_node_real_get_frame_clock; klass->get_frame_clock = gtk_css_node_real_get_frame_clock;
@ -1392,18 +1378,6 @@ gtk_css_node_init_matcher (GtkCssNode *cssnode,
return GTK_CSS_NODE_GET_CLASS (cssnode)->init_matcher (cssnode, matcher); return GTK_CSS_NODE_GET_CLASS (cssnode)->init_matcher (cssnode, matcher);
} }
GtkWidgetPath *
gtk_css_node_create_widget_path (GtkCssNode *cssnode)
{
return GTK_CSS_NODE_GET_CLASS (cssnode)->create_widget_path (cssnode);
}
const GtkWidgetPath *
gtk_css_node_get_widget_path (GtkCssNode *cssnode)
{
return GTK_CSS_NODE_GET_CLASS (cssnode)->get_widget_path (cssnode);
}
GtkStyleProvider * GtkStyleProvider *
gtk_css_node_get_style_provider (GtkCssNode *cssnode) gtk_css_node_get_style_provider (GtkCssNode *cssnode)
{ {

View File

@ -78,8 +78,6 @@ struct _GtkCssNodeClass
gboolean (* init_matcher) (GtkCssNode *cssnode, gboolean (* init_matcher) (GtkCssNode *cssnode,
GtkCssMatcher *matcher); GtkCssMatcher *matcher);
GtkWidgetPath * (* create_widget_path) (GtkCssNode *cssnode);
const GtkWidgetPath * (* get_widget_path) (GtkCssNode *cssnode);
/* get style provider to use or NULL to use parent's */ /* get style provider to use or NULL to use parent's */
GtkStyleProvider * (* get_style_provider) (GtkCssNode *cssnode); GtkStyleProvider * (* get_style_provider) (GtkCssNode *cssnode);
/* get frame clock or NULL (only relevant for root node) */ /* get frame clock or NULL (only relevant for root node) */
@ -157,8 +155,6 @@ void gtk_css_node_validate (GtkCssNode *
gboolean gtk_css_node_init_matcher (GtkCssNode *cssnode, gboolean gtk_css_node_init_matcher (GtkCssNode *cssnode,
GtkCssMatcher *matcher); GtkCssMatcher *matcher);
GtkWidgetPath * gtk_css_node_create_widget_path (GtkCssNode *cssnode);
const GtkWidgetPath * gtk_css_node_get_widget_path (GtkCssNode *cssnode) G_GNUC_PURE;
GtkStyleProvider * gtk_css_node_get_style_provider (GtkCssNode *cssnode) G_GNUC_PURE; GtkStyleProvider * gtk_css_node_get_style_provider (GtkCssNode *cssnode) G_GNUC_PURE;
void gtk_css_node_print (GtkCssNode *cssnode, void gtk_css_node_print (GtkCssNode *cssnode,

View File

@ -59,37 +59,6 @@ gtk_css_path_node_real_init_matcher (GtkCssNode *node,
gtk_css_node_get_declaration (node)); gtk_css_node_get_declaration (node));
} }
static GtkWidgetPath *
gtk_css_path_node_real_create_widget_path (GtkCssNode *node)
{
GtkCssPathNode *path_node = GTK_CSS_PATH_NODE (node);
GtkWidgetPath *path;
guint length;
if (path_node->path == NULL)
path = gtk_widget_path_new ();
else
path = gtk_widget_path_copy (path_node->path);
length = gtk_widget_path_length (path);
if (length > 0)
{
gtk_css_node_declaration_add_to_widget_path (gtk_css_node_get_declaration (node),
path,
length - 1);
}
return path;
}
static const GtkWidgetPath *
gtk_css_path_node_real_get_widget_path (GtkCssNode *node)
{
GtkCssPathNode *path_node = GTK_CSS_PATH_NODE (node);
return path_node->path;
}
static GtkCssStyle * static GtkCssStyle *
gtk_css_path_node_update_style (GtkCssNode *cssnode, gtk_css_path_node_update_style (GtkCssNode *cssnode,
GtkCssChange change, GtkCssChange change,
@ -122,8 +91,6 @@ gtk_css_path_node_class_init (GtkCssPathNodeClass *klass)
node_class->invalidate = gtk_css_path_node_invalidate; node_class->invalidate = gtk_css_path_node_invalidate;
node_class->update_style = gtk_css_path_node_update_style; node_class->update_style = gtk_css_path_node_update_style;
node_class->init_matcher = gtk_css_path_node_real_init_matcher; node_class->init_matcher = gtk_css_path_node_real_init_matcher;
node_class->create_widget_path = gtk_css_path_node_real_create_widget_path;
node_class->get_widget_path = gtk_css_path_node_real_get_widget_path;
node_class->get_style_provider = gtk_css_path_node_get_style_provider; node_class->get_style_provider = gtk_css_path_node_get_style_provider;
} }

View File

@ -22,36 +22,6 @@
G_DEFINE_TYPE (GtkCssTransientNode, gtk_css_transient_node, GTK_TYPE_CSS_NODE) G_DEFINE_TYPE (GtkCssTransientNode, gtk_css_transient_node, GTK_TYPE_CSS_NODE)
static GtkWidgetPath *
gtk_css_transient_node_create_widget_path (GtkCssNode *node)
{
GtkWidgetPath *result;
GtkCssNode *parent;
parent = gtk_css_node_get_parent (node);
if (parent == NULL)
result = gtk_widget_path_new ();
else
result = gtk_css_node_create_widget_path (parent);
gtk_widget_path_append_type (result, gtk_css_node_get_widget_type (node));
gtk_css_node_declaration_add_to_widget_path (gtk_css_node_get_declaration (node), result, -1);
return result;
}
static const GtkWidgetPath *
gtk_css_transient_node_get_widget_path (GtkCssNode *node)
{
GtkCssNode *parent;
parent = gtk_css_node_get_parent (node);
if (parent == NULL)
return NULL;
return gtk_css_node_get_widget_path (parent);
}
static GtkCssStyle * static GtkCssStyle *
gtk_css_transient_node_update_style (GtkCssNode *cssnode, gtk_css_transient_node_update_style (GtkCssNode *cssnode,
GtkCssChange change, GtkCssChange change,
@ -67,8 +37,6 @@ gtk_css_transient_node_class_init (GtkCssTransientNodeClass *klass)
{ {
GtkCssNodeClass *node_class = GTK_CSS_NODE_CLASS (klass); GtkCssNodeClass *node_class = GTK_CSS_NODE_CLASS (klass);
node_class->create_widget_path = gtk_css_transient_node_create_widget_path;
node_class->get_widget_path = gtk_css_transient_node_get_widget_path;
node_class->update_style = gtk_css_transient_node_update_style; node_class->update_style = gtk_css_transient_node_update_style;
} }

View File

@ -38,20 +38,6 @@ gtk_css_widget_node_finalize (GObject *object)
G_OBJECT_CLASS (gtk_css_widget_node_parent_class)->finalize (object); G_OBJECT_CLASS (gtk_css_widget_node_parent_class)->finalize (object);
} }
static void
gtk_css_widget_node_style_changed (GtkCssNode *cssnode,
GtkCssStyleChange *change)
{
GtkCssWidgetNode *node;
node = GTK_CSS_WIDGET_NODE (cssnode);
if (node->widget)
gtk_widget_clear_path (node->widget);
GTK_CSS_NODE_CLASS (gtk_css_widget_node_parent_class)->style_changed (cssnode, change);
}
static gboolean static gboolean
gtk_css_widget_node_queue_callback (GtkWidget *widget, gtk_css_widget_node_queue_callback (GtkWidget *widget,
GdkFrameClock *frame_clock, GdkFrameClock *frame_clock,
@ -133,40 +119,6 @@ gtk_css_widget_node_init_matcher (GtkCssNode *node,
return GTK_CSS_NODE_CLASS (gtk_css_widget_node_parent_class)->init_matcher (node, matcher); return GTK_CSS_NODE_CLASS (gtk_css_widget_node_parent_class)->init_matcher (node, matcher);
} }
static GtkWidgetPath *
gtk_css_widget_node_create_widget_path (GtkCssNode *node)
{
GtkCssWidgetNode *widget_node = GTK_CSS_WIDGET_NODE (node);
GtkWidgetPath *path;
guint length;
if (widget_node->widget == NULL)
path = gtk_widget_path_new ();
else
path = _gtk_widget_create_path (widget_node->widget);
length = gtk_widget_path_length (path);
if (length > 0)
{
gtk_css_node_declaration_add_to_widget_path (gtk_css_node_get_declaration (node),
path,
length - 1);
}
return path;
}
static const GtkWidgetPath *
gtk_css_widget_node_get_widget_path (GtkCssNode *node)
{
GtkCssWidgetNode *widget_node = GTK_CSS_WIDGET_NODE (node);
if (widget_node->widget == NULL)
return NULL;
return gtk_widget_get_path (widget_node->widget);
}
static GtkStyleProvider * static GtkStyleProvider *
gtk_css_widget_node_get_style_provider (GtkCssNode *node) gtk_css_widget_node_get_style_provider (GtkCssNode *node)
{ {
@ -211,11 +163,8 @@ gtk_css_widget_node_class_init (GtkCssWidgetNodeClass *klass)
node_class->queue_validate = gtk_css_widget_node_queue_validate; node_class->queue_validate = gtk_css_widget_node_queue_validate;
node_class->dequeue_validate = gtk_css_widget_node_dequeue_validate; node_class->dequeue_validate = gtk_css_widget_node_dequeue_validate;
node_class->init_matcher = gtk_css_widget_node_init_matcher; node_class->init_matcher = gtk_css_widget_node_init_matcher;
node_class->create_widget_path = gtk_css_widget_node_create_widget_path;
node_class->get_widget_path = gtk_css_widget_node_get_widget_path;
node_class->get_style_provider = gtk_css_widget_node_get_style_provider; node_class->get_style_provider = gtk_css_widget_node_get_style_provider;
node_class->get_frame_clock = gtk_css_widget_node_get_frame_clock; node_class->get_frame_clock = gtk_css_widget_node_get_frame_clock;
node_class->style_changed = gtk_css_widget_node_style_changed;
} }
static void static void