diff options
author | Matthias Clasen <mclasen@redhat.com> | 2019-02-23 13:56:51 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2019-02-23 14:13:57 -0500 |
commit | e16cdb141c8c5239b0970d3419f2fb52e7582f67 (patch) | |
tree | aa004106e03b9eb223166838b48223b8a24aea69 | |
parent | 08badd23cdc4caba971713e5cd3652030a3cfd66 (diff) | |
download | gtk+-e16cdb141c8c5239b0970d3419f2fb52e7582f67.tar.gz |
Drop gdk_event_handler_set
This is no longer used by GTK.
-rw-r--r-- | docs/reference/gdk/gdk4-sections.txt | 3 | ||||
-rw-r--r-- | gdk/gdkevents.c | 37 | ||||
-rw-r--r-- | gdk/gdkevents.h | 17 |
3 files changed, 1 insertions, 56 deletions
diff --git a/docs/reference/gdk/gdk4-sections.txt b/docs/reference/gdk/gdk4-sections.txt index 671982e3d8..80fa982dcd 100644 --- a/docs/reference/gdk/gdk4-sections.txt +++ b/docs/reference/gdk/gdk4-sections.txt @@ -662,9 +662,6 @@ gdk_event_get_touchpad_gesture_n_fingers gdk_event_get_touchpad_gesture_phase gdk_event_get_touchpad_scale gdk_event_is_sent -<SUBSECTION> -gdk_event_handler_set -GdkEventFunc <SUBSECTION> gdk_get_show_events diff --git a/gdk/gdkevents.c b/gdk/gdkevents.c index bbdf0305ed..352ec44919 100644 --- a/gdk/gdkevents.c +++ b/gdk/gdkevents.c @@ -67,10 +67,6 @@ /* Private variable declarations */ -static GdkEventFunc _gdk_event_func = NULL; /* Callback for events */ -static gpointer _gdk_event_data = NULL; -static GDestroyNotify _gdk_event_notify = NULL; - static void gdk_event_constructed (GObject *object); static void gdk_event_finalize (GObject *object); @@ -156,11 +152,7 @@ _gdk_event_emit (GdkEvent *event) if (gdk_drag_handle_source_event (event)) return; - if (gdk_surface_handle_event (event)) - return; - - if (_gdk_event_func) - (*_gdk_event_func) (event, _gdk_event_data); + gdk_surface_handle_event (event); } /********************************************* @@ -416,33 +408,6 @@ _gdk_event_queue_flush (GdkDisplay *display) } /** - * gdk_event_handler_set: - * @func: the function to call to handle events from GDK. - * @data: user data to pass to the function. - * @notify: the function to call when the handler function is removed, i.e. when - * gdk_event_handler_set() is called with another event handler. - * - * Sets the function to call to handle all events from GDK. - * - * Note that GTK+ uses this to install its own event handler, so it is - * usually not useful for GTK+ applications. (Although an application - * can call this function then call gtk_main_do_event() to pass - * events to GTK+.) - **/ -void -gdk_event_handler_set (GdkEventFunc func, - gpointer data, - GDestroyNotify notify) -{ - if (_gdk_event_notify) - (*_gdk_event_notify) (_gdk_event_data); - - _gdk_event_func = func; - _gdk_event_data = data; - _gdk_event_notify = notify; -} - -/** * gdk_event_new: * @type: a #GdkEventType * diff --git a/gdk/gdkevents.h b/gdk/gdkevents.h index f904d8b2de..73aef44431 100644 --- a/gdk/gdkevents.h +++ b/gdk/gdkevents.h @@ -126,18 +126,6 @@ typedef struct _GdkEventSequence GdkEventSequence; typedef union _GdkEvent GdkEvent; /** - * GdkEventFunc: - * @event: the #GdkEvent to process. - * @data: (closure): user data set when the event handler was installed with - * gdk_event_handler_set(). - * - * Specifies the type of function passed to gdk_event_handler_set() to - * handle all GDK events. - */ -typedef void (*GdkEventFunc) (GdkEvent *event, - gpointer data); - -/** * GdkEventType: * @GDK_NOTHING: a special code to indicate a null event. * @GDK_DELETE: the window manager has requested that the toplevel surface be @@ -447,11 +435,6 @@ gboolean gdk_events_get_center (GdkEvent *event1, gdouble *y); GDK_AVAILABLE_IN_ALL -void gdk_event_handler_set (GdkEventFunc func, - gpointer data, - GDestroyNotify notify); - -GDK_AVAILABLE_IN_ALL void gdk_event_set_display (GdkEvent *event, GdkDisplay *display); GDK_AVAILABLE_IN_ALL |