diff options
author | Benjamin Otte <otte@redhat.com> | 2016-11-13 21:08:34 +0100 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2016-11-15 17:48:45 +0100 |
commit | da207c9fdd1653923ce718dcb58480eaba9234cb (patch) | |
tree | f6577dbf79d01bce95bb9fe019aaead0e2d0591d | |
parent | 4e06d8f73c9eabd405ed32ec2e141715a8cca505 (diff) | |
download | gtk+-da207c9fdd1653923ce718dcb58480eaba9234cb.tar.gz |
snapshot: Add a snapshot function to GtkCssCustomGadget
-rw-r--r-- | gtk/gtkactionbar.c | 1 | ||||
-rw-r--r-- | gtk/gtkbbox.c | 1 | ||||
-rw-r--r-- | gtk/gtkbox.c | 1 | ||||
-rw-r--r-- | gtk/gtkbutton.c | 1 | ||||
-rw-r--r-- | gtk/gtkcellview.c | 1 | ||||
-rw-r--r-- | gtk/gtkcolorswatch.c | 1 | ||||
-rw-r--r-- | gtk/gtkcombobox.c | 1 | ||||
-rw-r--r-- | gtk/gtkcsscustomgadget.c | 43 | ||||
-rw-r--r-- | gtk/gtkcsscustomgadgetprivate.h | 9 | ||||
-rw-r--r-- | gtk/gtkentry.c | 2 | ||||
-rw-r--r-- | gtk/gtkflowbox.c | 2 | ||||
-rw-r--r-- | gtk/gtkframe.c | 18 | ||||
-rw-r--r-- | gtk/gtkgrid.c | 1 | ||||
-rw-r--r-- | gtk/gtkheaderbar.c | 1 | ||||
-rw-r--r-- | gtk/gtkimage.c | 1 | ||||
-rw-r--r-- | gtk/gtklabel.c | 1 | ||||
-rw-r--r-- | gtk/gtklevelbar.c | 2 | ||||
-rw-r--r-- | gtk/gtklistbox.c | 2 | ||||
-rw-r--r-- | gtk/gtkmenubar.c | 1 | ||||
-rw-r--r-- | gtk/gtkmenuitem.c | 1 | ||||
-rw-r--r-- | gtk/gtkmodelbutton.c | 1 | ||||
-rw-r--r-- | gtk/gtknotebook.c | 3 | ||||
-rw-r--r-- | gtk/gtkpaned.c | 2 | ||||
-rw-r--r-- | gtk/gtkprogressbar.c | 4 | ||||
-rw-r--r-- | gtk/gtkrange.c | 4 | ||||
-rw-r--r-- | gtk/gtkscale.c | 6 | ||||
-rw-r--r-- | gtk/gtkscrolledwindow.c | 1 | ||||
-rw-r--r-- | gtk/gtkseparator.c | 1 | ||||
-rw-r--r-- | gtk/gtkseparatortoolitem.c | 1 | ||||
-rw-r--r-- | gtk/gtkstack.c | 1 | ||||
-rw-r--r-- | gtk/gtkswitch.c | 2 | ||||
-rw-r--r-- | gtk/gtktoolbar.c | 1 | ||||
-rw-r--r-- | gtk/gtkviewport.c | 1 |
33 files changed, 111 insertions, 8 deletions
diff --git a/gtk/gtkactionbar.c b/gtk/gtkactionbar.c index 9de2de0e18..3bf456ac63 100644 --- a/gtk/gtkactionbar.c +++ b/gtk/gtkactionbar.c @@ -351,6 +351,7 @@ gtk_action_bar_init (GtkActionBar *action_bar) gtk_action_bar_allocate, NULL, NULL, + NULL, NULL); } diff --git a/gtk/gtkbbox.c b/gtk/gtkbbox.c index 111a63813d..98f8710d95 100644 --- a/gtk/gtkbbox.c +++ b/gtk/gtkbbox.c @@ -237,6 +237,7 @@ gtk_button_box_init (GtkButtonBox *button_box) gtk_button_box_allocate, NULL, NULL, + NULL, NULL); } diff --git a/gtk/gtkbox.c b/gtk/gtkbox.c index 6c1c3b75f3..4f4f395894 100644 --- a/gtk/gtkbox.c +++ b/gtk/gtkbox.c @@ -1971,6 +1971,7 @@ gtk_box_init (GtkBox *box) gtk_box_allocate_contents, NULL, NULL, + NULL, NULL); _gtk_orientable_set_style_classes (GTK_ORIENTABLE (box)); diff --git a/gtk/gtkbutton.c b/gtk/gtkbutton.c index 62b71090ca..f63a725cef 100644 --- a/gtk/gtkbutton.c +++ b/gtk/gtkbutton.c @@ -475,6 +475,7 @@ gtk_button_init (GtkButton *button) gtk_button_allocate, NULL, NULL, + NULL, NULL); } diff --git a/gtk/gtkcellview.c b/gtk/gtkcellview.c index 2ae9e93981..9e831f7402 100644 --- a/gtk/gtkcellview.c +++ b/gtk/gtkcellview.c @@ -515,6 +515,7 @@ gtk_cell_view_init (GtkCellView *cellview) gtk_cell_view_allocate, gtk_cell_view_render, NULL, + NULL, NULL); } diff --git a/gtk/gtkcolorswatch.c b/gtk/gtkcolorswatch.c index 4aedcc3630..15f6b6c73d 100644 --- a/gtk/gtkcolorswatch.c +++ b/gtk/gtkcolorswatch.c @@ -739,6 +739,7 @@ gtk_color_swatch_init (GtkColorSwatch *swatch) NULL, gtk_color_swatch_render, NULL, + NULL, NULL); gtk_css_gadget_add_class (swatch->priv->gadget, "activatable"); diff --git a/gtk/gtkcombobox.c b/gtk/gtkcombobox.c index 8706e0a612..b886409232 100644 --- a/gtk/gtkcombobox.c +++ b/gtk/gtkcombobox.c @@ -1097,6 +1097,7 @@ gtk_combo_box_init (GtkComboBox *combo_box) gtk_combo_box_measure, gtk_combo_box_allocate, NULL, + NULL, NULL, NULL); } diff --git a/gtk/gtkcsscustomgadget.c b/gtk/gtkcsscustomgadget.c index 7cf9096eed..7d54884515 100644 --- a/gtk/gtkcsscustomgadget.c +++ b/gtk/gtkcsscustomgadget.c @@ -95,6 +95,23 @@ * Typically, GtkCssDrawFunc 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. + * + * GtkCssSnapshotFunc: + * @gadget: the #GtkCssCustomGadget + * @snapshot: the snapshot to snapshot to + * @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 GtkCssSnapshotFunc is called to snapshot the gadget's content in + * gtk_css_gadget_snapshot(). It gets passed an untransformed cairo context + * and the coordinates of the area to draw the content in. + * + * 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. */ typedef struct _GtkCssCustomGadgetPrivate GtkCssCustomGadgetPrivate; @@ -102,6 +119,7 @@ struct _GtkCssCustomGadgetPrivate { GtkCssPreferredSizeFunc preferred_size_func; GtkCssAllocateFunc allocate_func; GtkCssDrawFunc draw_func; + GtkCssSnapshotFunc snapshot_func; gpointer data; GDestroyNotify destroy_func; }; @@ -162,6 +180,24 @@ gtk_css_custom_gadget_draw (GtkCssGadget *gadget, } static gboolean +gtk_css_custom_gadget_snapshot (GtkCssGadget *gadget, + GtkSnapshot *snapshot, + int x, + int y, + int width, + int height) +{ + GtkCssCustomGadgetPrivate *priv = gtk_css_custom_gadget_get_instance_private (GTK_CSS_CUSTOM_GADGET (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; +} + +static gboolean gtk_css_custom_gadget_has_content (GtkCssGadget *gadget) { GtkCssCustomGadgetPrivate *priv = gtk_css_custom_gadget_get_instance_private (GTK_CSS_CUSTOM_GADGET (gadget)); @@ -191,6 +227,7 @@ 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; gadget_class->has_content = gtk_css_custom_gadget_has_content; } @@ -207,6 +244,7 @@ gtk_css_custom_gadget_init (GtkCssCustomGadget *custom_gadget) * @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 * @@ -227,6 +265,7 @@ gtk_css_custom_gadget_new_for_node (GtkCssNode *node, GtkCssPreferredSizeFunc preferred_size_func, GtkCssAllocateFunc allocate_func, GtkCssDrawFunc draw_func, + GtkCssSnapshotFunc snapshot_func, gpointer data, GDestroyNotify destroy_func) { @@ -243,6 +282,7 @@ 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; @@ -258,6 +298,7 @@ gtk_css_custom_gadget_new_for_node (GtkCssNode *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 * @@ -274,6 +315,7 @@ gtk_css_custom_gadget_new (const char *name, GtkCssPreferredSizeFunc preferred_size_func, GtkCssAllocateFunc allocate_func, GtkCssDrawFunc draw_func, + GtkCssSnapshotFunc snapshot_func, gpointer data, GDestroyNotify destroy_func) { @@ -292,6 +334,7 @@ gtk_css_custom_gadget_new (const char *name, preferred_size_func, allocate_func, draw_func, + snapshot_func, data, destroy_func); diff --git a/gtk/gtkcsscustomgadgetprivate.h b/gtk/gtkcsscustomgadgetprivate.h index 994237a2e5..0d1d33f6b5 100644 --- a/gtk/gtkcsscustomgadgetprivate.h +++ b/gtk/gtkcsscustomgadgetprivate.h @@ -54,6 +54,13 @@ typedef gboolean (* GtkCssDrawFunc) (GtkCssGadget int width, int height, gpointer data); +typedef gboolean (* GtkCssSnapshotFunc) (GtkCssGadget *gadget, + GtkSnapshot *snapshot, + int x, + int y, + int width, + int height, + gpointer data); struct _GtkCssCustomGadget { GtkCssGadget parent; @@ -73,6 +80,7 @@ GtkCssGadget * gtk_css_custom_gadget_new (const char GtkCssPreferredSizeFunc get_preferred_size_func, GtkCssAllocateFunc allocate_func, GtkCssDrawFunc draw_func, + GtkCssSnapshotFunc snapshot_func, gpointer data, GDestroyNotify destroy_func); GtkCssGadget * gtk_css_custom_gadget_new_for_node (GtkCssNode *node, @@ -80,6 +88,7 @@ GtkCssGadget * gtk_css_custom_gadget_new_for_node (GtkCssNode GtkCssPreferredSizeFunc preferred_size_func, GtkCssAllocateFunc allocate_func, GtkCssDrawFunc draw_func, + GtkCssSnapshotFunc snapshot_func, gpointer data, GDestroyNotify destroy_func); diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c index 151de5443d..a17c0e1aa2 100644 --- a/gtk/gtkentry.c +++ b/gtk/gtkentry.c @@ -2515,6 +2515,7 @@ gtk_entry_init (GtkEntry *entry) gtk_entry_allocate, gtk_entry_render, NULL, + NULL, NULL); for (i = 0; i < 2; i++) @@ -9912,6 +9913,7 @@ 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)))); diff --git a/gtk/gtkflowbox.c b/gtk/gtkflowbox.c index bac2cfa2b7..f08a725cb7 100644 --- a/gtk/gtkflowbox.c +++ b/gtk/gtkflowbox.c @@ -599,6 +599,7 @@ gtk_flow_box_child_init (GtkFlowBoxChild *child) gtk_flow_box_child_allocate, NULL, NULL, + NULL, NULL); } @@ -4098,6 +4099,7 @@ gtk_flow_box_init (GtkFlowBox *box) gtk_flow_box_allocate, NULL, NULL, + NULL, NULL); } diff --git a/gtk/gtkframe.c b/gtk/gtkframe.c index d362de71b6..de8a0187a5 100644 --- a/gtk/gtkframe.c +++ b/gtk/gtkframe.c @@ -297,16 +297,18 @@ gtk_frame_init (GtkFrame *frame) gtk_frame_allocate, NULL, NULL, + NULL, NULL); priv->border_gadget = gtk_css_custom_gadget_new ("border", - GTK_WIDGET (frame), - priv->gadget, - NULL, - gtk_frame_measure_border, - gtk_frame_allocate_border, - NULL, - NULL, - NULL); + GTK_WIDGET (frame), + priv->gadget, + NULL, + gtk_frame_measure_border, + gtk_frame_allocate_border, + NULL, + NULL, + NULL, + NULL); gtk_css_gadget_set_state (priv->border_gadget, gtk_widget_get_state_flags (GTK_WIDGET (frame))); } diff --git a/gtk/gtkgrid.c b/gtk/gtkgrid.c index d96ce7fcdb..699409f214 100644 --- a/gtk/gtkgrid.c +++ b/gtk/gtkgrid.c @@ -1789,6 +1789,7 @@ gtk_grid_init (GtkGrid *grid) gtk_grid_allocate, NULL, NULL, + NULL, NULL); diff --git a/gtk/gtkheaderbar.c b/gtk/gtkheaderbar.c index e630432b2e..a47d72462f 100644 --- a/gtk/gtkheaderbar.c +++ b/gtk/gtkheaderbar.c @@ -2071,6 +2071,7 @@ gtk_header_bar_init (GtkHeaderBar *bar) gtk_header_bar_allocate_contents, NULL, NULL, + NULL, NULL); } diff --git a/gtk/gtkimage.c b/gtk/gtkimage.c index 612b3373f9..f7abcfcb94 100644 --- a/gtk/gtkimage.c +++ b/gtk/gtkimage.c @@ -367,6 +367,7 @@ gtk_image_init (GtkImage *image) gtk_image_get_content_size, NULL, NULL, + NULL, NULL, NULL); } diff --git a/gtk/gtklabel.c b/gtk/gtklabel.c index 16943f9ee8..5461d3fa71 100644 --- a/gtk/gtklabel.c +++ b/gtk/gtklabel.c @@ -1372,6 +1372,7 @@ gtk_label_init (GtkLabel *label) NULL, NULL, NULL, + NULL, NULL); } diff --git a/gtk/gtklevelbar.c b/gtk/gtklevelbar.c index 33bf44cd79..4d454bdcd0 100644 --- a/gtk/gtklevelbar.c +++ b/gtk/gtklevelbar.c @@ -594,6 +594,7 @@ 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)); @@ -1109,6 +1110,7 @@ gtk_level_bar_init (GtkLevelBar *self) gtk_level_bar_measure_trough, gtk_level_bar_allocate_trough, gtk_level_bar_render_trough, + NULL, NULL, NULL); trough_node = gtk_css_gadget_get_node (priv->trough_gadget); gtk_css_node_set_parent (trough_node, widget_node); diff --git a/gtk/gtklistbox.c b/gtk/gtklistbox.c index 6ceb9519fb..4fce8aacee 100644 --- a/gtk/gtklistbox.c +++ b/gtk/gtklistbox.c @@ -654,6 +654,7 @@ gtk_list_box_init (GtkListBox *box) gtk_list_box_allocate, NULL, NULL, + NULL, NULL); } @@ -3777,6 +3778,7 @@ gtk_list_box_row_init (GtkListBoxRow *row) gtk_list_box_row_allocate, NULL, NULL, + NULL, NULL); gtk_css_gadget_add_class (ROW_PRIV (row)->gadget, "activatable"); } diff --git a/gtk/gtkmenubar.c b/gtk/gtkmenubar.c index f8094ef365..fa56e09201 100644 --- a/gtk/gtkmenubar.c +++ b/gtk/gtkmenubar.c @@ -247,6 +247,7 @@ gtk_menu_bar_init (GtkMenuBar *menu_bar) gtk_menu_bar_measure, gtk_menu_bar_allocate, gtk_menu_bar_render, + NULL, NULL, NULL); } diff --git a/gtk/gtkmenuitem.c b/gtk/gtkmenuitem.c index f77ea0a1f8..fd8ce98dfc 100644 --- a/gtk/gtkmenuitem.c +++ b/gtk/gtkmenuitem.c @@ -784,6 +784,7 @@ gtk_menu_item_init (GtkMenuItem *menu_item) gtk_menu_item_measure, gtk_menu_item_allocate, gtk_menu_item_render, + NULL, NULL, NULL); } diff --git a/gtk/gtkmodelbutton.c b/gtk/gtkmodelbutton.c index 26b647c7f3..443abc1b66 100644 --- a/gtk/gtkmodelbutton.c +++ b/gtk/gtkmodelbutton.c @@ -1148,6 +1148,7 @@ gtk_model_button_init (GtkModelButton *button) gtk_model_button_allocate, NULL, NULL, + NULL, NULL); button->indicator_gadget = gtk_builtin_icon_new ("check", GTK_WIDGET (button), diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c index 53e3957a34..5f0144fdbc 100644 --- a/gtk/gtknotebook.c +++ b/gtk/gtknotebook.c @@ -1217,6 +1217,7 @@ gtk_notebook_init (GtkNotebook *notebook) gtk_notebook_allocate_stack, gtk_notebook_draw_stack, NULL, + NULL, NULL); gtk_css_gadget_set_state (priv->stack_gadget, gtk_css_node_get_state (widget_node)); gtk_box_gadget_insert_gadget (GTK_BOX_GADGET (priv->gadget), -1, priv->stack_gadget, TRUE, GTK_ALIGN_FILL); @@ -1238,6 +1239,7 @@ gtk_notebook_init (GtkNotebook *notebook) gtk_notebook_allocate_tabs, gtk_notebook_draw_tabs, NULL, + NULL, NULL); gtk_css_gadget_set_state (priv->tabs_gadget, gtk_css_node_get_state (widget_node)); gtk_box_gadget_insert_gadget (GTK_BOX_GADGET (priv->header_gadget), 0, priv->tabs_gadget, TRUE, GTK_ALIGN_FILL); @@ -4637,6 +4639,7 @@ gtk_notebook_real_insert_page (GtkNotebook *notebook, measure_tab, allocate_tab, draw_tab, + NULL, page, NULL); if (priv->tabs_reversed) diff --git a/gtk/gtkpaned.c b/gtk/gtkpaned.c index 99ce300faa..d55bfb8fbb 100644 --- a/gtk/gtkpaned.c +++ b/gtk/gtkpaned.c @@ -1753,6 +1753,7 @@ gtk_paned_init (GtkPaned *paned) gtk_paned_allocate, NULL, NULL, + NULL, NULL); priv->handle_gadget = gtk_css_custom_gadget_new ("separator", GTK_WIDGET (paned), @@ -1762,6 +1763,7 @@ gtk_paned_init (GtkPaned *paned) NULL, NULL, NULL, + NULL, NULL); update_node_state (GTK_WIDGET (paned)); } diff --git a/gtk/gtkprogressbar.c b/gtk/gtkprogressbar.c index d42f7f48e1..6a0c8e8618 100644 --- a/gtk/gtkprogressbar.c +++ b/gtk/gtkprogressbar.c @@ -441,6 +441,7 @@ gtk_progress_bar_init (GtkProgressBar *pbar) gtk_progress_bar_allocate, gtk_progress_bar_render, NULL, + NULL, NULL); priv->trough_gadget = gtk_css_custom_gadget_new ("trough", @@ -451,6 +452,7 @@ gtk_progress_bar_init (GtkProgressBar *pbar) gtk_progress_bar_allocate_trough, gtk_progress_bar_render_trough, NULL, + NULL, NULL); priv->progress_gadget = gtk_css_custom_gadget_new ("progress", @@ -461,6 +463,7 @@ gtk_progress_bar_init (GtkProgressBar *pbar) NULL, NULL, NULL, + NULL, NULL); update_node_state (pbar); @@ -1323,6 +1326,7 @@ gtk_progress_bar_set_show_text (GtkProgressBar *pbar, NULL, gtk_progress_bar_render_text, NULL, + NULL, NULL); g_signal_connect (gtk_css_gadget_get_node (priv->text_gadget), "style-changed", G_CALLBACK (gtk_progress_bar_text_style_changed), pbar); diff --git a/gtk/gtkrange.c b/gtk/gtkrange.c index 5b1f2dcb73..a7658e25b9 100644 --- a/gtk/gtkrange.c +++ b/gtk/gtkrange.c @@ -668,6 +668,7 @@ gtk_range_init (GtkRange *range) gtk_range_measure, gtk_range_allocate, gtk_range_render, + NULL, NULL, NULL); priv->contents_gadget = gtk_box_gadget_new ("contents", GTK_WIDGET (range), @@ -678,6 +679,7 @@ gtk_range_init (GtkRange *range) gtk_range_measure_trough, gtk_range_allocate_trough, gtk_range_render_trough, + NULL, NULL, NULL); gtk_css_gadget_set_state (priv->trough_gadget, gtk_css_node_get_state (widget_node)); @@ -1390,6 +1392,7 @@ 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,6 +3612,7 @@ _gtk_range_set_has_origin (GtkRange *range, GTK_WIDGET (range), priv->trough_gadget, NULL, NULL, NULL, NULL, + NULL, NULL, NULL); gtk_css_gadget_set_state (priv->highlight_gadget, gtk_css_node_get_state (gtk_css_gadget_get_node (priv->trough_gadget))); diff --git a/gtk/gtkscale.c b/gtk/gtkscale.c index f621ab40e1..82edd96ec0 100644 --- a/gtk/gtkscale.c +++ b/gtk/gtkscale.c @@ -1289,6 +1289,7 @@ gtk_scale_set_draw_value (GtkScale *scale, gtk_scale_measure_value, NULL, gtk_scale_render_value, + NULL, NULL, NULL); g_signal_connect (gtk_css_gadget_get_node (priv->value_gadget), "style-changed", G_CALLBACK (gtk_scale_value_style_changed), scale); @@ -2165,6 +2166,7 @@ gtk_scale_add_mark (GtkScale *scale, gtk_scale_measure_marks, gtk_scale_allocate_marks, gtk_scale_render_marks, + NULL, NULL, NULL); gtk_css_node_insert_after (widget_node, gtk_css_gadget_get_node (priv->top_marks_gadget), @@ -2186,6 +2188,7 @@ gtk_scale_add_mark (GtkScale *scale, gtk_scale_measure_marks, gtk_scale_allocate_marks, gtk_scale_render_marks, + NULL, NULL, NULL); gtk_css_node_insert_before (widget_node, gtk_css_gadget_get_node (priv->bottom_marks_gadget), @@ -2204,6 +2207,7 @@ gtk_scale_add_mark (GtkScale *scale, gtk_scale_measure_mark, gtk_scale_allocate_mark, gtk_scale_render_mark, + NULL, mark, NULL); gtk_css_gadget_set_state (mark->gadget, gtk_css_node_get_state (marks_node)); @@ -2213,6 +2217,7 @@ gtk_scale_add_mark (GtkScale *scale, NULL, NULL, gtk_scale_render_mark_indicator, + NULL, mark, NULL); if (mark->markup && *mark->markup) { @@ -2224,6 +2229,7 @@ gtk_scale_add_mark (GtkScale *scale, gtk_scale_measure_mark_label, NULL, gtk_scale_render_mark_label, + NULL, mark, NULL); g_signal_connect (gtk_css_gadget_get_node (mark->label_gadget), "style-changed", G_CALLBACK (gtk_scale_mark_style_changed), mark); diff --git a/gtk/gtkscrolledwindow.c b/gtk/gtkscrolledwindow.c index 0b5ec7091d..bc5f459cc9 100644 --- a/gtk/gtkscrolledwindow.c +++ b/gtk/gtkscrolledwindow.c @@ -2075,6 +2075,7 @@ gtk_scrolled_window_init (GtkScrolledWindow *scrolled_window) gtk_scrolled_window_measure, gtk_scrolled_window_allocate, gtk_scrolled_window_render, + NULL, NULL, NULL); for (i = 0; i < 4; i++) { diff --git a/gtk/gtkseparator.c b/gtk/gtkseparator.c index c3f9978eec..ef211f3b20 100644 --- a/gtk/gtkseparator.c +++ b/gtk/gtkseparator.c @@ -161,6 +161,7 @@ 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); } diff --git a/gtk/gtkseparatortoolitem.c b/gtk/gtkseparatortoolitem.c index 219955ecd2..650dd5f267 100644 --- a/gtk/gtkseparatortoolitem.c +++ b/gtk/gtkseparatortoolitem.c @@ -166,6 +166,7 @@ gtk_separator_tool_item_init (GtkSeparatorToolItem *separator_item) gtk_css_custom_gadget_new_for_node (widget_node, widget, NULL, NULL, NULL, + NULL, NULL, NULL); } diff --git a/gtk/gtkstack.c b/gtk/gtkstack.c index 22a10996ca..e79056d2bd 100644 --- a/gtk/gtkstack.c +++ b/gtk/gtkstack.c @@ -2394,6 +2394,7 @@ gtk_stack_init (GtkStack *stack) gtk_stack_allocate, gtk_stack_render, NULL, + NULL, NULL); } diff --git a/gtk/gtkswitch.c b/gtk/gtkswitch.c index 28760f152c..1ac6df57a7 100644 --- a/gtk/gtkswitch.c +++ b/gtk/gtkswitch.c @@ -879,6 +879,7 @@ gtk_switch_init (GtkSwitch *self) gtk_switch_allocate_contents, gtk_switch_render_trough, NULL, + NULL, NULL); priv->slider_gadget = gtk_css_custom_gadget_new ("slider", @@ -889,6 +890,7 @@ gtk_switch_init (GtkSwitch *self) NULL, gtk_switch_render_slider, NULL, + NULL, NULL); gesture = gtk_gesture_multi_press_new (GTK_WIDGET (self)); diff --git a/gtk/gtktoolbar.c b/gtk/gtktoolbar.c index fd2f4f1d0c..03d887ec91 100644 --- a/gtk/gtktoolbar.c +++ b/gtk/gtktoolbar.c @@ -648,6 +648,7 @@ gtk_toolbar_init (GtkToolbar *toolbar) gtk_toolbar_measure, gtk_toolbar_allocate, gtk_toolbar_render, + NULL, NULL, NULL); priv->arrow_button = gtk_toggle_button_new (); diff --git a/gtk/gtkviewport.c b/gtk/gtkviewport.c index 0a199ae501..8360dbab4d 100644 --- a/gtk/gtkviewport.c +++ b/gtk/gtkviewport.c @@ -477,6 +477,7 @@ gtk_viewport_init (GtkViewport *viewport) gtk_viewport_measure, gtk_viewport_allocate, gtk_viewport_render, + NULL, NULL, NULL); gtk_css_gadget_add_class (priv->gadget, GTK_STYLE_CLASS_FRAME); |