gadget: Remove gtk_css_gadget_draw()

And with it, remove the draw func from custom gadgets, that has been
NULL everywhere.

All gadgets are snapshot now.
This commit is contained in:
Benjamin Otte 2016-12-19 19:45:34 +01:00
parent 613194a246
commit 0dbdf0c428
37 changed files with 6 additions and 307 deletions

View File

@ -357,7 +357,6 @@ gtk_action_bar_init (GtkActionBar *action_bar)
GTK_WIDGET (action_bar),
gtk_action_bar_measure,
gtk_action_bar_allocate,
NULL,
gtk_action_bar_render,
NULL,
NULL);

View File

@ -263,7 +263,6 @@ gtk_button_box_init (GtkButtonBox *button_box)
GTK_WIDGET (button_box),
gtk_button_box_measure,
gtk_button_box_allocate,
NULL,
gtk_button_box_render,
NULL,
NULL);

View File

@ -1999,7 +1999,6 @@ gtk_box_init (GtkBox *box)
GTK_WIDGET (box),
gtk_box_get_content_size,
gtk_box_allocate_contents,
NULL,
gtk_box_snapshot_contents,
NULL,
NULL);

View File

@ -518,35 +518,6 @@ gtk_box_gadget_allocate (GtkCssGadget *gadget,
}
}
static gboolean
gtk_box_gadget_draw (GtkCssGadget *gadget,
cairo_t *cr,
int x,
int y,
int width,
int height)
{
GtkBoxGadgetPrivate *priv = gtk_box_gadget_get_instance_private (GTK_BOX_GADGET (gadget));
GtkWidget *owner = gtk_css_gadget_get_owner (gadget);
guint i;
for (i = 0; i < priv->children->len; i++)
{
guint draw_index = priv->draw_reverse ? priv->children->len - 1 - i : i;
GtkBoxGadgetChild *child = &g_array_index (priv->children, GtkBoxGadgetChild, draw_index);
if (GTK_IS_WIDGET (child->object))
gtk_container_propagate_draw (GTK_CONTAINER (owner), GTK_WIDGET (child->object), cr);
else
gtk_css_gadget_draw (GTK_CSS_GADGET (child->object), cr);
}
if (priv->draw_focus && gtk_widget_has_visible_focus (owner))
return TRUE;
return FALSE;
}
static gboolean
gtk_box_gadget_snapshot (GtkCssGadget *gadget,
GtkSnapshot *snapshot,
@ -596,7 +567,6 @@ gtk_box_gadget_class_init (GtkBoxGadgetClass *klass)
gadget_class->get_preferred_size = gtk_box_gadget_get_preferred_size;
gadget_class->allocate = gtk_box_gadget_allocate;
gadget_class->draw = gtk_box_gadget_draw;
gadget_class->snapshot = gtk_box_gadget_snapshot;
}

View File

@ -127,25 +127,6 @@ gtk_builtin_icon_allocate (GtkCssGadget *gadget,
gdk_rectangle_union (out_clip, &icon_clip, out_clip);
}
static gboolean
gtk_builtin_icon_draw (GtkCssGadget *gadget,
cairo_t *cr,
int x,
int y,
int width,
int height)
{
GtkBuiltinIconPrivate *priv = gtk_builtin_icon_get_instance_private (GTK_BUILTIN_ICON (gadget));
gtk_css_style_render_icon (gtk_css_gadget_get_style (gadget),
cr,
x, y,
width, height,
priv->image_type);
return FALSE;
}
static gboolean
gtk_builtin_icon_snapshot (GtkCssGadget *gadget,
GtkSnapshot *snapshot,
@ -185,7 +166,6 @@ gtk_builtin_icon_class_init (GtkBuiltinIconClass *klass)
gadget_class->get_preferred_size = gtk_builtin_icon_get_preferred_size;
gadget_class->allocate = gtk_builtin_icon_allocate;
gadget_class->draw = gtk_builtin_icon_draw;
gadget_class->snapshot = gtk_builtin_icon_snapshot;
gadget_class->style_changed = gtk_builtin_icon_style_changed;
}

View File

@ -479,7 +479,6 @@ gtk_button_init (GtkButton *button)
GTK_WIDGET (button),
gtk_button_measure,
gtk_button_allocate,
NULL,
gtk_button_render,
NULL,
NULL);

View File

@ -451,7 +451,6 @@ gtk_cell_view_init (GtkCellView *cellview)
GTK_WIDGET (cellview),
gtk_cell_view_measure,
gtk_cell_view_allocate,
NULL,
gtk_cell_view_render,
NULL,
NULL);

View File

@ -751,7 +751,6 @@ gtk_color_swatch_init (GtkColorSwatch *swatch)
GTK_WIDGET (swatch),
gtk_color_swatch_measure,
NULL,
NULL,
gtk_color_swatch_render,
NULL,
NULL);

View File

@ -1106,7 +1106,6 @@ gtk_combo_box_init (GtkComboBox *combo_box)
GTK_WIDGET (combo_box),
gtk_combo_box_measure,
gtk_combo_box_allocate,
NULL,
gtk_combo_box_render,
NULL, NULL);
}

View File

@ -79,20 +79,20 @@
* Note that @out_clip *must* be set to meaningful values. If in doubt,
* just set it to the allocation.
*
* GtkCssDrawFunc:
* GtkCssSnapshotFunc:
* @gadget: the #GtkCssCustomGadget
* @cr: the cairo context to draw on
* @snapshot: the snapshot to draw on
* @x: the x origin of the content area
* @y: the y origin of the content area
* @width: the width of the content area
* @height: the height of the content area
* @data: data provided when registering the callback
*
* The GtkCssDrawFunc is called to draw the gadgets content in
* The GtkCssSnapshotFunc is called to draw the gadgets content in
* gtk_css_gadget_draw(). It gets passed an untransformed cairo context
* and the coordinates of the area to draw the content in.
*
* Typically, GtkCssDrawFunc will draw sub-gadgets and child widgets
* Typically, GtkCssSnapshotFunc will draw sub-gadgets and child widgets
* that are placed relative to the gadget, as well as custom content
* such as icons, checkmarks, arrows or text.
*
@ -118,7 +118,6 @@ typedef struct _GtkCssCustomGadgetPrivate GtkCssCustomGadgetPrivate;
struct _GtkCssCustomGadgetPrivate {
GtkCssPreferredSizeFunc preferred_size_func;
GtkCssAllocateFunc allocate_func;
GtkCssDrawFunc draw_func;
GtkCssSnapshotFunc snapshot_func;
gpointer data;
GDestroyNotify destroy_func;
@ -163,22 +162,6 @@ gtk_css_custom_gadget_allocate (GtkCssGadget *gadget,
return GTK_CSS_GADGET_CLASS (gtk_css_custom_gadget_parent_class)->allocate (gadget, allocation, baseline, out_clip);
}
static gboolean
gtk_css_custom_gadget_draw (GtkCssGadget *gadget,
cairo_t *cr,
int x,
int y,
int width,
int height)
{
GtkCssCustomGadgetPrivate *priv = gtk_css_custom_gadget_get_instance_private (GTK_CSS_CUSTOM_GADGET (gadget));
if (priv->draw_func)
return priv->draw_func (gadget, cr, x, y, width, height, priv->data);
else
return GTK_CSS_GADGET_CLASS (gtk_css_custom_gadget_parent_class)->draw (gadget, cr, x, y, width, height);
}
static gboolean
gtk_css_custom_gadget_snapshot (GtkCssGadget *gadget,
GtkSnapshot *snapshot,
@ -191,8 +174,6 @@ gtk_css_custom_gadget_snapshot (GtkCssGadget *gadget,
if (priv->snapshot_func)
return priv->snapshot_func (gadget, snapshot, x, y, width, height, priv->data);
else if (priv->draw_func)
return GTK_CSS_GADGET_CLASS (gtk_css_custom_gadget_parent_class)->snapshot (gadget, snapshot, x, y, width, height);
else
return FALSE;
}
@ -218,7 +199,6 @@ gtk_css_custom_gadget_class_init (GtkCssCustomGadgetClass *klass)
gadget_class->get_preferred_size = gtk_css_custom_gadget_get_preferred_size;
gadget_class->allocate = gtk_css_custom_gadget_allocate;
gadget_class->draw = gtk_css_custom_gadget_draw;
gadget_class->snapshot = gtk_css_custom_gadget_snapshot;
}
@ -234,7 +214,6 @@ gtk_css_custom_gadget_init (GtkCssCustomGadget *custom_gadget)
* @owner: the widget that the gadget belongs to
* @preferred_size_func: (nullable): the GtkCssPreferredSizeFunc to use
* @allocate_func: (nullable): the GtkCssAllocateFunc to use
* @draw_func: (nullable): the GtkCssDrawFunc to use
* @snapshot_func: (nullable): the GtkCssSnapshotFunc to use
* @data: (nullable): user data to pass to the callbacks
* @destroy_func: (nullable): destroy notify for @data
@ -255,7 +234,6 @@ gtk_css_custom_gadget_new_for_node (GtkCssNode *node,
GtkWidget *owner,
GtkCssPreferredSizeFunc preferred_size_func,
GtkCssAllocateFunc allocate_func,
GtkCssDrawFunc draw_func,
GtkCssSnapshotFunc snapshot_func,
gpointer data,
GDestroyNotify destroy_func)
@ -272,7 +250,6 @@ gtk_css_custom_gadget_new_for_node (GtkCssNode *node,
priv->preferred_size_func = preferred_size_func;
priv->allocate_func = allocate_func;
priv->draw_func = draw_func;
priv->snapshot_func = snapshot_func;
priv->data = data;
priv->destroy_func = destroy_func;
@ -288,7 +265,6 @@ gtk_css_custom_gadget_new_for_node (GtkCssNode *node,
* @next_sibling: the gadget that has the sibling CSS node
* @preferred_size_func: (nullable): the GtkCssPreferredSizeFunc to use
* @allocate_func: (nullable): the GtkCssAllocateFunc to use
* @draw_func: (nullable): the GtkCssDrawFunc to use
* @snapshot_func: (nullable): the GtkCssSnapshotFunc to use
* @data: (nullable): user data to pass to the callbacks
* @destroy_func: (nullable): destroy notify for @data
@ -305,7 +281,6 @@ gtk_css_custom_gadget_new (const char *name,
GtkCssGadget *next_sibling,
GtkCssPreferredSizeFunc preferred_size_func,
GtkCssAllocateFunc allocate_func,
GtkCssDrawFunc draw_func,
GtkCssSnapshotFunc snapshot_func,
gpointer data,
GDestroyNotify destroy_func)
@ -324,7 +299,6 @@ gtk_css_custom_gadget_new (const char *name,
owner,
preferred_size_func,
allocate_func,
draw_func,
snapshot_func,
data,
destroy_func);

View File

@ -47,13 +47,6 @@ typedef void (* GtkCssAllocateFunc) (GtkCssGadget
int baseline,
GtkAllocation *out_clip,
gpointer data);
typedef gboolean (* GtkCssDrawFunc) (GtkCssGadget *gadget,
cairo_t *cr,
int x,
int y,
int width,
int height,
gpointer data);
typedef gboolean (* GtkCssSnapshotFunc) (GtkCssGadget *gadget,
GtkSnapshot *snapshot,
int x,
@ -79,7 +72,6 @@ GtkCssGadget * gtk_css_custom_gadget_new (const char
GtkCssGadget *next_sibling,
GtkCssPreferredSizeFunc get_preferred_size_func,
GtkCssAllocateFunc allocate_func,
GtkCssDrawFunc draw_func,
GtkCssSnapshotFunc snapshot_func,
gpointer data,
GDestroyNotify destroy_func);
@ -87,7 +79,6 @@ GtkCssGadget * gtk_css_custom_gadget_new_for_node (GtkCssNode
GtkWidget *owner,
GtkCssPreferredSizeFunc preferred_size_func,
GtkCssAllocateFunc allocate_func,
GtkCssDrawFunc draw_func,
GtkCssSnapshotFunc snapshot_func,
gpointer data,
GDestroyNotify destroy_func);

View File

@ -110,17 +110,6 @@ gtk_css_gadget_real_allocate (GtkCssGadget *gadget,
*out_clip = *allocation;
}
static gboolean
gtk_css_gadget_real_draw (GtkCssGadget *gadget,
cairo_t *cr,
int x,
int y,
int width,
int height)
{
return FALSE;
}
static void
gtk_css_gadget_get_clip (GtkCssGadget *gadget,
graphene_rect_t *bounds)
@ -140,18 +129,7 @@ gtk_css_gadget_real_snapshot (GtkCssGadget *gadget,
int width,
int height)
{
graphene_rect_t bounds;
gboolean result;
cairo_t *cr;
gtk_css_gadget_get_clip (gadget, &bounds);
cr = gtk_snapshot_append_cairo_node (snapshot, &bounds, "Fallback<%s>", G_OBJECT_TYPE_NAME (gadget));
result = GTK_CSS_GADGET_GET_CLASS (gadget)->draw (gadget, cr, x, y, width, height);
cairo_destroy (cr);
return result;
return FALSE;
}
static void
@ -297,7 +275,6 @@ gtk_css_gadget_class_init (GtkCssGadgetClass *klass)
klass->get_preferred_size = gtk_css_gadget_real_get_preferred_size;
klass->allocate = gtk_css_gadget_real_allocate;
klass->draw = gtk_css_gadget_real_draw;
klass->snapshot = gtk_css_gadget_real_snapshot;
klass->style_changed = gtk_css_gadget_real_style_changed;
@ -837,142 +814,6 @@ gtk_css_gadget_allocate (GtkCssGadget *gadget,
priv->clip = *out_clip;
}
/**
* gtk_css_gadget_draw:
* @gadget: The gadget to draw
* @cr: The cairo context to draw to
*
* Will draw the gadget at the position allocated via
* gtk_css_gadget_allocate(). It is your responsibility to make
* sure that those 2 coordinate systems match.
*
* The drawing virtual function will be passed an untransformed @cr.
* This is important because functions like
* gtk_container_propagate_draw() depend on that.
*/
void
gtk_css_gadget_draw (GtkCssGadget *gadget,
cairo_t *cr)
{
GtkCssGadgetPrivate *priv = gtk_css_gadget_get_instance_private (gadget);
GtkBorder margin, border, padding;
gboolean draw_focus = FALSE;
GtkCssStyle *style;
int x, y, width, height;
int contents_x, contents_y, contents_width, contents_height;
GtkAllocation margin_box;
if (!gtk_css_gadget_get_visible (gadget))
return;
gtk_css_gadget_get_margin_box (gadget, &margin_box);
x = margin_box.x;
y = margin_box.y;
width = margin_box.width;
height = margin_box.height;
if (width < 0 || height < 0)
{
g_warning ("Drawing a gadget with negative dimensions. "
"Did you forget to allocate a size? (node %s owner %s)",
gtk_css_node_get_name (gtk_css_gadget_get_node (gadget)),
G_OBJECT_TYPE_NAME (gtk_css_gadget_get_owner (gadget)));
x = 0;
y = 0;
width = gtk_widget_get_allocated_width (priv->owner);
height = gtk_widget_get_allocated_height (priv->owner);
}
style = gtk_css_gadget_get_style (gadget);
get_box_margin (style, &margin);
get_box_border (style, &border);
get_box_padding (style, &padding);
gtk_css_style_render_background (style,
cr,
x + margin.left,
y + margin.top,
width - margin.left - margin.right,
height - margin.top - margin.bottom);
gtk_css_style_render_border (style,
cr,
x + margin.left,
y + margin.top,
width - margin.left - margin.right,
height - margin.top - margin.bottom);
contents_x = x + margin.left + border.left + padding.left;
contents_y = y + margin.top + border.top + padding.top;
contents_width = width - margin.left - margin.right - border.left - border.right - padding.left - padding.right;
contents_height = height - margin.top - margin.bottom - border.top - border.bottom - padding.top - padding.bottom;
if (contents_width > 0 && contents_height > 0)
draw_focus = GTK_CSS_GADGET_GET_CLASS (gadget)->draw (gadget,
cr,
contents_x, contents_y,
contents_width, contents_height);
if (draw_focus)
gtk_css_style_render_outline (style,
cr,
x + margin.left,
y + margin.top,
width - margin.left - margin.right,
height - margin.top - margin.bottom);
#if G_ENABLE_DEBUG
{
GdkDisplay *display = gtk_widget_get_display (gtk_css_gadget_get_owner (gadget));
GtkDebugFlag flags = gtk_get_display_debug_flags (display);
if G_UNLIKELY (flags & GTK_DEBUG_LAYOUT)
{
cairo_save (cr);
cairo_new_path (cr);
cairo_rectangle (cr,
x + margin.left,
y + margin.top,
width - margin.left - margin.right,
height - margin.top - margin.bottom);
cairo_set_line_width (cr, 1.0);
cairo_set_source_rgba (cr, 0, 0, 1.0, 0.33);
cairo_stroke (cr);
cairo_rectangle (cr,
contents_x,
contents_y,
contents_width,
contents_height);
cairo_set_line_width (cr, 1.0);
cairo_set_source_rgba (cr, 1.0, 0, 1.0, 0.33);
cairo_stroke (cr);
cairo_restore (cr);
}
if G_UNLIKELY (flags & GTK_DEBUG_BASELINES)
{
int baseline = priv->allocated_baseline;
if (baseline != -1)
{
if (priv->owner && !gtk_widget_get_has_window (priv->owner))
{
GtkAllocation widget_alloc;
gtk_widget_get_allocation (priv->owner, &widget_alloc);
baseline -= widget_alloc.y;
}
cairo_save (cr);
cairo_new_path (cr);
cairo_move_to (cr, x + margin.left, baseline + 0.5);
cairo_rel_line_to (cr, width - margin.left - margin.right, 0);
cairo_set_line_width (cr, 1.0);
cairo_set_source_rgba (cr, 1.0, 0, 0.25, 0.25);
cairo_stroke (cr);
cairo_restore (cr);
}
}
}
#endif
}
/**
* gtk_css_gadget_snapshot:
* @gadget: The gadget to snapshot

View File

@ -61,12 +61,6 @@ struct _GtkCssGadgetClass
int baseline,
GtkAllocation *out_clip);
gboolean (* draw) (GtkCssGadget *gadget,
cairo_t *cr,
int x,
int y,
int width,
int height);
gboolean (* snapshot) (GtkCssGadget *gadget,
GtkSnapshot *snapshot,
int x,
@ -128,8 +122,6 @@ void gtk_css_gadget_allocate (GtkCssGadget
const GtkAllocation *allocation,
int baseline,
GtkAllocation *out_clip);
void gtk_css_gadget_draw (GtkCssGadget *gadget,
cairo_t *cr);
void gtk_css_gadget_snapshot (GtkCssGadget *gadget,
GtkSnapshot *snapshot);

View File

@ -2513,7 +2513,6 @@ gtk_entry_init (GtkEntry *entry)
GTK_WIDGET (entry),
gtk_entry_measure,
gtk_entry_allocate,
NULL,
gtk_entry_render,
NULL,
NULL);
@ -9869,7 +9868,6 @@ gtk_entry_ensure_progress_gadget (GtkEntry *entry)
NULL,
NULL,
NULL,
NULL,
NULL);
gtk_css_gadget_set_state (priv->progress_gadget,
gtk_css_node_get_state (gtk_widget_get_css_node (GTK_WIDGET (entry))));

View File

@ -603,7 +603,6 @@ gtk_flow_box_child_init (GtkFlowBoxChild *child)
GTK_WIDGET (child),
gtk_flow_box_child_measure,
gtk_flow_box_child_allocate,
NULL,
gtk_flow_box_child_render,
NULL,
NULL);
@ -4074,7 +4073,6 @@ gtk_flow_box_init (GtkFlowBox *box)
GTK_WIDGET (box),
gtk_flow_box_measure,
gtk_flow_box_allocate,
NULL,
gtk_flow_box_render,
NULL,
NULL);

View File

@ -283,7 +283,6 @@ gtk_frame_init (GtkFrame *frame)
GTK_WIDGET (frame),
gtk_frame_measure,
gtk_frame_allocate,
NULL,
gtk_frame_render,
NULL,
NULL);

View File

@ -1809,7 +1809,6 @@ gtk_grid_init (GtkGrid *grid)
GTK_WIDGET (grid),
gtk_grid_measure,
gtk_grid_allocate,
NULL,
gtk_grid_render,
NULL,
NULL);

View File

@ -2081,7 +2081,6 @@ gtk_header_bar_init (GtkHeaderBar *bar)
GTK_WIDGET (bar),
gtk_header_bar_get_content_size,
gtk_header_bar_allocate_contents,
NULL,
gtk_header_bar_render_contents,
NULL,
NULL);

View File

@ -373,7 +373,6 @@ gtk_image_init (GtkImage *image)
GTK_WIDGET (image),
gtk_image_get_content_size,
NULL,
NULL,
gtk_image_render_contents,
NULL, NULL);

View File

@ -1376,7 +1376,6 @@ gtk_label_init (GtkLabel *label)
GTK_WIDGET (label),
gtk_label_measure,
NULL,
NULL,
gtk_label_render,
NULL,
NULL);

View File

@ -592,7 +592,6 @@ update_block_nodes (GtkLevelBar *self)
GTK_WIDGET (self),
priv->trough_gadget,
NULL,
NULL,
NULL, NULL, NULL,
NULL, NULL);
gtk_css_gadget_set_state (priv->block_gadget[i], gtk_css_node_get_state (trough_node));
@ -1107,7 +1106,6 @@ gtk_level_bar_init (GtkLevelBar *self)
NULL, NULL,
gtk_level_bar_measure_trough,
gtk_level_bar_allocate_trough,
NULL,
gtk_level_bar_render_trough,
NULL, NULL);
trough_node = gtk_css_gadget_get_node (priv->trough_gadget);

View File

@ -658,7 +658,6 @@ gtk_list_box_init (GtkListBox *box)
GTK_WIDGET (box),
gtk_list_box_measure,
gtk_list_box_allocate,
NULL,
gtk_list_box_render,
NULL,
NULL);
@ -3790,7 +3789,6 @@ gtk_list_box_row_init (GtkListBoxRow *row)
GTK_WIDGET (row),
gtk_list_box_row_measure,
gtk_list_box_row_allocate,
NULL,
gtk_list_box_row_render,
NULL,
NULL);

View File

@ -246,7 +246,6 @@ gtk_menu_bar_init (GtkMenuBar *menu_bar)
widget,
gtk_menu_bar_measure,
gtk_menu_bar_allocate,
NULL,
gtk_menu_bar_render,
NULL, NULL);
}

View File

@ -781,7 +781,6 @@ gtk_menu_item_init (GtkMenuItem *menu_item)
GTK_WIDGET (menu_item),
gtk_menu_item_measure,
gtk_menu_item_allocate,
NULL,
gtk_menu_item_render,
NULL, NULL);
}

View File

@ -1155,7 +1155,6 @@ gtk_model_button_init (GtkModelButton *button)
GTK_WIDGET (button),
gtk_model_button_measure,
gtk_model_button_allocate,
NULL,
gtk_model_button_render,
NULL,
NULL);

View File

@ -1216,7 +1216,6 @@ gtk_notebook_init (GtkNotebook *notebook)
NULL,
gtk_notebook_measure_stack,
gtk_notebook_allocate_stack,
NULL,
gtk_notebook_snapshot_stack,
NULL,
NULL);
@ -1238,7 +1237,6 @@ gtk_notebook_init (GtkNotebook *notebook)
NULL,
gtk_notebook_measure_tabs,
gtk_notebook_allocate_tabs,
NULL,
gtk_notebook_snapshot_tabs,
NULL,
NULL);
@ -4639,7 +4637,6 @@ gtk_notebook_real_insert_page (GtkNotebook *notebook,
sibling,
measure_tab,
allocate_tab,
NULL,
snapshot_tab,
page,
NULL);

View File

@ -1817,7 +1817,6 @@ gtk_paned_init (GtkPaned *paned)
GTK_WIDGET (paned),
gtk_paned_measure,
gtk_paned_allocate,
NULL,
gtk_paned_render,
NULL,
NULL);
@ -1827,7 +1826,6 @@ gtk_paned_init (GtkPaned *paned)
NULL,
NULL,
NULL,
NULL,
gtk_paned_render_handle,
NULL,
NULL);

View File

@ -470,7 +470,6 @@ gtk_progress_bar_init (GtkProgressBar *pbar)
GTK_WIDGET (pbar),
gtk_progress_bar_measure,
gtk_progress_bar_allocate,
NULL,
gtk_progress_bar_render,
NULL,
NULL);
@ -481,7 +480,6 @@ gtk_progress_bar_init (GtkProgressBar *pbar)
NULL,
NULL,
gtk_progress_bar_allocate_trough,
NULL,
gtk_progress_bar_render_trough,
NULL,
NULL);
@ -494,7 +492,6 @@ gtk_progress_bar_init (GtkProgressBar *pbar)
NULL,
NULL,
NULL,
NULL,
NULL);
update_node_state (pbar);
@ -1354,7 +1351,6 @@ gtk_progress_bar_set_show_text (GtkProgressBar *pbar,
priv->trough_gadget,
gtk_progress_bar_measure_text,
NULL,
NULL,
gtk_progress_bar_render_text,
NULL,
NULL);

View File

@ -667,7 +667,6 @@ gtk_range_init (GtkRange *range)
GTK_WIDGET (range),
gtk_range_measure,
gtk_range_allocate,
NULL,
gtk_range_render,
NULL, NULL);
priv->contents_gadget = gtk_box_gadget_new ("contents",
@ -678,7 +677,6 @@ gtk_range_init (GtkRange *range)
NULL, NULL,
gtk_range_measure_trough,
gtk_range_allocate_trough,
NULL,
gtk_range_render_trough,
NULL, NULL);
gtk_css_gadget_set_state (priv->trough_gadget,
@ -1392,7 +1390,6 @@ gtk_range_set_show_fill_level (GtkRange *range,
GTK_WIDGET (range),
priv->trough_gadget, NULL,
NULL, NULL, NULL,
NULL,
NULL, NULL);
gtk_css_gadget_set_state (priv->fill_gadget,
gtk_css_node_get_state (gtk_css_gadget_get_node (priv->trough_gadget)));
@ -3609,7 +3606,7 @@ _gtk_range_set_has_origin (GtkRange *range,
priv->highlight_gadget = gtk_css_custom_gadget_new ("highlight",
GTK_WIDGET (range),
priv->trough_gadget, NULL,
NULL, NULL, NULL,
NULL, NULL,
NULL,
NULL, NULL);
gtk_css_gadget_set_state (priv->highlight_gadget,

View File

@ -1288,7 +1288,6 @@ gtk_scale_set_draw_value (GtkScale *scale,
widget, NULL, NULL,
gtk_scale_measure_value,
NULL,
NULL,
gtk_scale_render_value,
NULL, NULL);
g_signal_connect (gtk_css_gadget_get_node (priv->value_gadget), "style-changed",
@ -2167,7 +2166,6 @@ gtk_scale_add_mark (GtkScale *scale,
widget, NULL, NULL,
gtk_scale_measure_marks,
gtk_scale_allocate_marks,
NULL,
gtk_scale_render_marks,
NULL, NULL);
gtk_css_node_insert_after (widget_node,
@ -2189,7 +2187,6 @@ gtk_scale_add_mark (GtkScale *scale,
widget, NULL, NULL,
gtk_scale_measure_marks,
gtk_scale_allocate_marks,
NULL,
gtk_scale_render_marks,
NULL, NULL);
gtk_css_node_insert_before (widget_node,
@ -2208,7 +2205,6 @@ gtk_scale_add_mark (GtkScale *scale,
widget, NULL, NULL,
gtk_scale_measure_mark,
gtk_scale_allocate_mark,
NULL,
gtk_scale_render_mark,
mark, NULL);
gtk_css_gadget_set_state (mark->gadget, gtk_css_node_get_state (marks_node));
@ -2218,7 +2214,6 @@ gtk_scale_add_mark (GtkScale *scale,
widget, mark->gadget, NULL,
NULL,
NULL,
NULL,
gtk_scale_render_mark_indicator,
mark, NULL);
if (mark->markup && *mark->markup)
@ -2230,7 +2225,6 @@ gtk_scale_add_mark (GtkScale *scale,
NULL : mark->indicator_gadget,
gtk_scale_measure_mark_label,
NULL,
NULL,
gtk_scale_render_mark_label,
mark, NULL);
g_signal_connect (gtk_css_gadget_get_node (mark->label_gadget), "style-changed",

View File

@ -2058,7 +2058,6 @@ gtk_scrolled_window_init (GtkScrolledWindow *scrolled_window)
widget,
gtk_scrolled_window_measure,
gtk_scrolled_window_allocate,
NULL,
gtk_scrolled_window_render,
NULL, NULL);
for (i = 0; i < 4; i++)

View File

@ -168,7 +168,6 @@ gtk_separator_init (GtkSeparator *separator)
separator->priv->gadget = gtk_css_custom_gadget_new_for_node (widget_node,
GTK_WIDGET (separator),
NULL, NULL, NULL,
NULL,
NULL, NULL);
}

View File

@ -159,7 +159,6 @@ gtk_separator_tool_item_init (GtkSeparatorToolItem *separator_item)
gtk_css_custom_gadget_new_for_node (widget_node,
widget,
NULL, NULL, NULL,
NULL,
NULL, NULL);
}

View File

@ -2363,7 +2363,6 @@ gtk_stack_init (GtkStack *stack)
GTK_WIDGET (stack),
gtk_stack_measure,
gtk_stack_allocate,
NULL,
gtk_stack_render,
NULL,
NULL);

View File

@ -865,7 +865,6 @@ gtk_switch_init (GtkSwitch *self)
GTK_WIDGET (self),
gtk_switch_get_content_size,
gtk_switch_allocate_contents,
NULL,
gtk_switch_snapshot_trough,
NULL,
NULL);
@ -876,7 +875,6 @@ gtk_switch_init (GtkSwitch *self)
NULL,
NULL,
NULL,
NULL,
gtk_switch_snapshot_slider,
NULL,
NULL);

View File

@ -653,7 +653,6 @@ gtk_toolbar_init (GtkToolbar *toolbar)
widget,
gtk_toolbar_measure,
gtk_toolbar_allocate,
NULL,
gtk_toolbar_render,
NULL, NULL);

View File

@ -463,7 +463,6 @@ gtk_viewport_init (GtkViewport *viewport)
widget,
gtk_viewport_measure,
gtk_viewport_allocate,
NULL,
gtk_viewport_render,
NULL, NULL);