From 8205c7032a66c85a302e0b27ad44bdeed535e374 Mon Sep 17 00:00:00 2001
From: Matthias Clasen <mclasen@redhat.com>
Date: Fri, 28 Apr 2023 15:03:30 -0400
Subject: [PATCH] Deprecate gtk_widget_get_allocation

---
 gtk/gtkwidget.c | 2 ++
 gtk/gtkwidget.h | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 3c7c961db5..20bb2eba25 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -10092,6 +10092,8 @@ gtk_widget_get_has_tooltip (GtkWidget *widget)
  * So a layout container is guaranteed that its children stay inside
  * the assigned bounds, but not that they have exactly the bounds the
  * container assigned.
+ *
+ * Deprecated: 4.12: Use [method@Gtk.Widget.compute_bounds] or [method@Gtk.Widget.get_width] instead
  */
 void
 gtk_widget_get_allocation (GtkWidget     *widget,
diff --git a/gtk/gtkwidget.h b/gtk/gtkwidget.h
index 350dc7b573..7b39d83901 100644
--- a/gtk/gtkwidget.h
+++ b/gtk/gtkwidget.h
@@ -476,7 +476,7 @@ int                   gtk_widget_get_allocated_height   (GtkWidget     *widget);
 GDK_AVAILABLE_IN_ALL
 int                   gtk_widget_get_allocated_baseline (GtkWidget     *widget);
 
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_4_12_FOR(gtk_widget_compute_bounds)
 void                  gtk_widget_get_allocation         (GtkWidget     *widget,
                                                          GtkAllocation *allocation);
 GDK_AVAILABLE_IN_ALL