Drop gtk_widget_get_surface_allocation
authorMatthias Clasen <mclasen@redhat.com>
Sat, 25 Mar 2023 13:48:12 +0000 (09:48 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Sat, 25 Mar 2023 14:14:35 +0000 (10:14 -0400)
This private api is confusing, and no longer used.

gtk/gtkwidget.c
gtk/gtkwidgetprivate.h

index 85b2c3ba0c13d1424704e3c5cb42a41f83ca99b0..c030a43b4da3b3c7969bab198e241ec528db3e17 100644 (file)
@@ -3473,34 +3473,6 @@ gtk_widget_unrealize (GtkWidget *widget)
   g_object_unref (widget);
 }
 
-void
-gtk_widget_get_surface_allocation (GtkWidget     *widget,
-                                  GtkAllocation *allocation)
-{
-  GtkNative *native;
-  graphene_rect_t bounds;
-  double nx, ny;
-
-  native = gtk_widget_get_native (widget);
-
-  g_assert (GTK_IS_WINDOW (native) || GTK_IS_POPOVER (native));
-  gtk_native_get_surface_transform (native, &nx, &ny);
-
-  if (gtk_widget_compute_bounds (widget, GTK_WIDGET (native), &bounds))
-    {
-      *allocation = (GtkAllocation) {
-        floorf (bounds.origin.x) + nx,
-        floorf (bounds.origin.y) + ny,
-        ceilf (bounds.size.width),
-        ceilf (bounds.size.height)
-      };
-    }
-  else
-    {
-      *allocation = (GtkAllocation) { 0, 0, 0, 0 };
-    }
-}
-
 /**
  * gtk_widget_queue_draw:
  * @widget: a `GtkWidget`
index d902e7117fd6f1baca3a73ad6958f7e67643dc05..581b7db19d8c6a6eb23e66d3125d1d46670b06a7 100644 (file)
@@ -316,9 +316,6 @@ gboolean          gtk_widget_focus_move                    (GtkWidget        *wi
                                                             GtkDirectionType  direction);
 void              gtk_widget_set_has_focus                 (GtkWidget        *widget,
                                                             gboolean          has_focus);
-void              gtk_widget_get_surface_allocation         (GtkWidget *widget,
-                                                            GtkAllocation *allocation);
-
 
 GtkWidget *       gtk_widget_common_ancestor               (GtkWidget *widget_a,
                                                             GtkWidget *widget_b);