[gtk/wip/baedert/transforms5: 270/272] widget: Remove gtk_widget_intersect



commit bfa67371ecbcff144819618004b9f914a1431d42
Author: Timm Bäder <mail baedert org>
Date:   Sat Aug 18 17:33:31 2018 +0200

    widget: Remove gtk_widget_intersect
    
    It's unused inside gtk and as far as I can see also outside of it. And
    it's been broken for a while now and nobody noticed.

 docs/reference/gtk/gtk4-sections.txt |  1 -
 gtk/gtkwidget.c                      | 45 ------------------------------------
 gtk/gtkwidget.h                      |  6 -----
 3 files changed, 52 deletions(-)
---
diff --git a/docs/reference/gtk/gtk4-sections.txt b/docs/reference/gtk/gtk4-sections.txt
index 7f1ed1c8fa..99e6e49289 100644
--- a/docs/reference/gtk/gtk4-sections.txt
+++ b/docs/reference/gtk/gtk4-sections.txt
@@ -4421,7 +4421,6 @@ gtk_widget_list_accel_closures
 gtk_widget_can_activate_accel
 gtk_widget_event
 gtk_widget_activate
-gtk_widget_intersect
 gtk_widget_is_focus
 gtk_widget_grab_focus
 gtk_widget_grab_default
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index ee4cc73881..138b9eb3ad 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -5267,51 +5267,6 @@ gtk_widget_activate (GtkWidget *widget)
     return FALSE;
 }
 
-/**
- * gtk_widget_intersect:
- * @widget: a #GtkWidget
- * @area: a rectangle
- * @intersection: (out caller-allocates) (optional): rectangle to store
- *   intersection of @widget and @area
- *
- * Computes the intersection of a @widget’s area and @area, storing
- * the intersection in @intersection, and returns %TRUE if there was
- * an intersection.  @intersection may be %NULL if you’re only
- * interested in whether there was an intersection.
- *
- * Returns: %TRUE if there was an intersection
- **/
-gboolean
-gtk_widget_intersect (GtkWidget                 *widget,
-                     const GdkRectangle *area,
-                     GdkRectangle       *intersection)
-{
-  GtkAllocation allocation;
-  GdkRectangle *dest;
-  GdkRectangle tmp;
-  gint return_val;
-
-  g_return_val_if_fail (GTK_IS_WIDGET (widget), FALSE);
-  g_return_val_if_fail (area != NULL, FALSE);
-
-  if (intersection)
-    dest = intersection;
-  else
-    dest = &tmp;
-
-  gtk_widget_get_allocation (widget, &allocation);
-
-  return_val = gdk_rectangle_intersect (&allocation, area, dest);
-
-  if (return_val && intersection && _gtk_widget_get_has_surface (widget))
-    {
-      intersection->x -= allocation.x;
-      intersection->y -= allocation.y;
-    }
-
-  return return_val;
-}
-
 /**
  * _gtk_widget_grab_notify:
  * @widget: a #GtkWidget
diff --git a/gtk/gtkwidget.h b/gtk/gtkwidget.h
index 450913e6dc..52ccefe7fe 100644
--- a/gtk/gtkwidget.h
+++ b/gtk/gtkwidget.h
@@ -463,12 +463,6 @@ gboolean   gtk_widget_send_focus_change   (GtkWidget           *widget,
 
 GDK_AVAILABLE_IN_ALL
 gboolean   gtk_widget_activate               (GtkWidget        *widget);
-
-GDK_AVAILABLE_IN_ALL
-gboolean   gtk_widget_intersect           (GtkWidget           *widget,
-                                           const GdkRectangle  *area,
-                                           GdkRectangle        *intersection);
-
 GDK_AVAILABLE_IN_ALL
 void    gtk_widget_freeze_child_notify    (GtkWidget           *widget);
 GDK_AVAILABLE_IN_ALL


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]