[gtk/readonly-events-1: 37/49] main: Drop gtk_get_event_target



commit 36fb518a7c49cb91742017615c2a831e2e1e9f35
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat Feb 15 21:04:58 2020 -0500

    main: Drop gtk_get_event_target
    
    This is no longer used.

 gtk/gtkmain.c | 41 -----------------------------------------
 gtk/gtkmain.h |  8 --------
 2 files changed, 49 deletions(-)
---
diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c
index a98bae5ca7..d580037840 100644
--- a/gtk/gtkmain.c
+++ b/gtk/gtkmain.c
@@ -2347,47 +2347,6 @@ gtk_get_event_widget (const GdkEvent *event)
   return widget;
 }
 
-/**
- * gtk_get_event_target:
- * @event: a #GdkEvent
- *
- * If @event is %NULL or the event was not associated with any widget,
- * returns %NULL, otherwise returns the widget that is the deepmost
- * receiver of the event.
- *
- * Returns: (transfer none) (nullable): the target widget, or %NULL
- */
-GtkWidget *
-gtk_get_event_target (const GdkEvent *event)
-{
-  return GTK_WIDGET (gdk_event_get_target (event));
-}
-
-/**
- * gtk_get_event_target_with_type:
- * @event: a #GdkEvent
- * @type: the type to look for
- *
- * If @event is %NULL or the event was not associated with any widget,
- * returns %NULL, otherwise returns first widget found from the event
- * target to the toplevel that matches @type.
- *
- * Returns: (transfer none) (nullable): the widget in the target stack
- * with the given type, or %NULL
- */
-GtkWidget *
-gtk_get_event_target_with_type (GdkEvent *event,
-                                GType     type)
-{
-  GtkWidget *target;
-
-  target = gtk_get_event_target (event);
-  while (target && !g_type_is_a (G_OBJECT_TYPE (target), type))
-    target = gtk_widget_get_parent (target);
-
-  return target;
-}
-
 static gboolean
 propagate_event_up (GtkWidget *widget,
                     GdkEvent  *event,
diff --git a/gtk/gtkmain.h b/gtk/gtkmain.h
index 34bdfb5641..a71b6488ce 100644
--- a/gtk/gtkmain.h
+++ b/gtk/gtkmain.h
@@ -134,14 +134,6 @@ GdkDevice *gtk_get_current_event_device (void);
 GDK_AVAILABLE_IN_ALL
 GtkWidget *gtk_get_event_widget         (const GdkEvent  *event);
 
-GDK_AVAILABLE_IN_ALL
-GtkWidget *gtk_get_event_target         (const GdkEvent  *event);
-
-GDK_AVAILABLE_IN_ALL
-GtkWidget *gtk_get_event_target_with_type (GdkEvent *event,
-                                           GType     type);
-
-
 G_END_DECLS
 
 #endif /* __GTK_MAIN_H__ */


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