widget: Add a hook for resizes
It's private, no APIs, we don't talk about it. But we will start using it very soon, so we can do size request caching in columns and avoid sizegroups...
This commit is contained in:
committed by
Matthias Clasen
parent
8af3e407c2
commit
34c6ef5332
@@ -3555,6 +3555,9 @@ gtk_widget_queue_resize_internal (GtkWidget *widget)
|
||||
priv->resize_needed = TRUE;
|
||||
gtk_widget_set_alloc_needed (widget);
|
||||
|
||||
if (priv->resize_func)
|
||||
priv->resize_func (widget);
|
||||
|
||||
groups = _gtk_widget_get_sizegroups (widget);
|
||||
|
||||
for (l = groups; l; l = l->next)
|
||||
|
||||
@@ -122,6 +122,7 @@ struct _GtkWidgetPrivate
|
||||
|
||||
int width_request;
|
||||
int height_request;
|
||||
void (* resize_func) (GtkWidget *);
|
||||
GtkBorder margin;
|
||||
|
||||
/* Animations and other things to update on clock ticks */
|
||||
|
||||
Reference in New Issue
Block a user