summaryrefslogtreecommitdiff
path: root/gtk/gtkwidget.h
diff options
context:
space:
mode:
authorTimm Bäder <mail@baedert.org>2017-07-11 09:58:21 +0200
committerMatthias Clasen <mclasen@redhat.com>2017-07-19 21:27:16 -0400
commit36ab70ddf5dbe993eb995bd9157f347258765922 (patch)
tree508f0ca9cf6b4fc990e88b0a5892b50f594890fe /gtk/gtkwidget.h
parent95bd58ac00ede771ca80684e143fffdc61ff2194 (diff)
downloadgtk+-36ab70ddf5dbe993eb995bd9157f347258765922.tar.gz
widget: Add baseline and out_clip parameters to size-allocate
Since setting a clip is mandatory for almost all widgets, we can as well change the size-allocate signature to include a out_clip parameter, just like GtkCssGadget did. And since we now always propagate baselines, we might as well pass that one on to size-allocate. This way we can also make sure to transform the clip returned from size-allocate to parent-coordinates, i.e. the same coordinate space priv->allocation is in.
Diffstat (limited to 'gtk/gtkwidget.h')
-rw-r--r--gtk/gtkwidget.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/gtk/gtkwidget.h b/gtk/gtkwidget.h
index 536a19c990..c677aa59ff 100644
--- a/gtk/gtkwidget.h
+++ b/gtk/gtkwidget.h
@@ -302,8 +302,10 @@ struct _GtkWidgetClass
void (* unmap) (GtkWidget *widget);
void (* realize) (GtkWidget *widget);
void (* unrealize) (GtkWidget *widget);
- void (* size_allocate) (GtkWidget *widget,
- GtkAllocation *allocation);
+ void (* size_allocate) (GtkWidget *widget,
+ const GtkAllocation *allocation,
+ int baseline,
+ GtkAllocation *out_clip);
void (* state_flags_changed) (GtkWidget *widget,
GtkStateFlags previous_state_flags);
void (* parent_set) (GtkWidget *widget,
@@ -542,12 +544,10 @@ GDK_AVAILABLE_IN_3_8
GdkFrameClock* gtk_widget_get_frame_clock (GtkWidget *widget);
GDK_AVAILABLE_IN_ALL
-void gtk_widget_size_allocate (GtkWidget *widget,
- GtkAllocation *allocation);
-GDK_AVAILABLE_IN_3_10
-void gtk_widget_size_allocate_with_baseline (GtkWidget *widget,
- GtkAllocation *allocation,
- gint baseline);
+void gtk_widget_size_allocate (GtkWidget *widget,
+ const GtkAllocation *allocation,
+ int baseline,
+ GtkAllocation *out_clip);
GDK_AVAILABLE_IN_ALL
GtkSizeRequestMode gtk_widget_get_request_mode (GtkWidget *widget);