[gtk/readonly-events-1: 11/35] main: Drop gtk_get_event_target
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/readonly-events-1: 11/35] main: Drop gtk_get_event_target
- Date: Tue, 18 Feb 2020 05:23:28 +0000 (UTC)
commit 51e364dc2df6ce02646a48a810f1bbd8a69c8ce5
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 26199ff85f..a4e51dd136 100644
--- a/gtk/gtkmain.c
+++ b/gtk/gtkmain.c
@@ -2348,47 +2348,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]