[gtk+/wip/actor: 23/24] widget: Marshal size allocation to actor
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/actor: 23/24] widget: Marshal size allocation to actor
- Date: Sat, 5 Jan 2013 19:24:25 +0000 (UTC)
commit 3bbe53689a28a07b692ee5e0aaaaa575f6448051
Author: Benjamin Otte <otte redhat com>
Date: Mon Dec 24 16:01:25 2012 +0100
widget: Marshal size allocation to actor
gtk/actors/gtkwidgetactor.c | 17 +++++++++++++++++
gtk/actors/gtkwidgetactorprivate.h | 5 +++++
gtk/gtkwidget.c | 6 +++++-
3 files changed, 27 insertions(+), 1 deletions(-)
---
diff --git a/gtk/actors/gtkwidgetactor.c b/gtk/actors/gtkwidgetactor.c
index 54bbaab..7341c45 100644
--- a/gtk/actors/gtkwidgetactor.c
+++ b/gtk/actors/gtkwidgetactor.c
@@ -178,6 +178,23 @@ _gtk_widget_actor_get_preferred_size (GtkActor *actor,
}
void
+_gtk_widget_actor_allocate (GtkActor *actor,
+ double x,
+ double y,
+ double width,
+ double height)
+{
+ cairo_matrix_t position;
+
+ g_return_if_fail (GTK_IS_WIDGET_ACTOR (actor));
+
+ cairo_matrix_init_translate (&position, x, y);
+ GTK_ACTOR_CLASS (_gtk_widget_actor_parent_class)->allocate (actor,
+ &position,
+ width, height);
+}
+
+void
_gtk_widget_actor_screen_changed (GtkActor *actor,
GdkScreen *new_screen,
GdkScreen *old_screen)
diff --git a/gtk/actors/gtkwidgetactorprivate.h b/gtk/actors/gtkwidgetactorprivate.h
index 50d0231..043a338 100644
--- a/gtk/actors/gtkwidgetactorprivate.h
+++ b/gtk/actors/gtkwidgetactorprivate.h
@@ -61,6 +61,11 @@ void _gtk_widget_actor_get_preferred_size (GtkActo
gfloat for_size,
gfloat *min_size_p,
gfloat *natural_size_p);
+void _gtk_widget_actor_allocate (GtkActor *actor,
+ double x,
+ double y,
+ double width,
+ double height);
void _gtk_widget_actor_screen_changed (GtkActor *actor,
GdkScreen *new_screen,
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index ba65104..e74c39d 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -5151,7 +5151,7 @@ gtk_widget_real_size_allocate (GtkWidget *widget,
{
GtkWidgetPrivate *priv = widget->priv;
- priv->allocation = *allocation;
+ gtk_widget_set_allocation (widget, allocation);
if (gtk_widget_get_realized (widget) &&
gtk_widget_get_has_window (widget))
@@ -13566,6 +13566,10 @@ gtk_widget_set_allocation (GtkWidget *widget,
priv = widget->priv;
priv->allocation = *allocation;
+
+ _gtk_widget_actor_allocate (priv->actor,
+ allocation->x, allocation->y,
+ allocation->width, allocation->height);
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]