[gtk/matthiasc/for-master: 1/6] gdk: Drop some unused private api
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/matthiasc/for-master: 1/6] gdk: Drop some unused private api
- Date: Thu, 8 Oct 2020 01:22:30 +0000 (UTC)
commit ba108f261fbb0c19669aa202a997232ba0818c65
Author: Matthias Clasen <mclasen redhat com>
Date: Wed Oct 7 19:36:07 2020 -0400
gdk: Drop some unused private api
No users of gdk_display_peek_event, gdk_display_has_pending
_gdk_display_event_data_copy or _gdk_display_event_data_free,
so drop all of these, and related vfuncs.
gdk/gdkdisplay.c | 80 ++-----------------------------------------------
gdk/gdkdisplayprivate.h | 12 --------
gdk/gdkevents.c | 4 ---
3 files changed, 3 insertions(+), 93 deletions(-)
---
diff --git a/gdk/gdkdisplay.c b/gdk/gdkdisplay.c
index 279827fc86..8fccd2a521 100644
--- a/gdk/gdkdisplay.c
+++ b/gdk/gdkdisplay.c
@@ -131,19 +131,6 @@ gdk_display_real_opened (GdkDisplay *display)
_gdk_display_manager_add_display (gdk_display_manager_get (), display);
}
-static void
-gdk_display_real_event_data_copy (GdkDisplay *display,
- GdkEvent *src,
- GdkEvent *dst)
-{
-}
-
-static void
-gdk_display_real_event_data_free (GdkDisplay *display,
- GdkEvent *dst)
-{
-}
-
static GdkSeat *
gdk_display_real_get_default_seat (GdkDisplay *display)
{
@@ -165,8 +152,6 @@ gdk_display_class_init (GdkDisplayClass *class)
class->get_app_launch_context = gdk_display_real_get_app_launch_context;
class->opened = gdk_display_real_opened;
class->make_default = gdk_display_real_make_default;
- class->event_data_copy = gdk_display_real_event_data_copy;
- class->event_data_free = gdk_display_real_event_data_free;
class->get_default_seat = gdk_display_real_get_default_seat;
/**
@@ -408,13 +393,13 @@ gdk_display_is_closed (GdkDisplay *display)
return display->closed;
}
-/**
+/*<private>
* gdk_display_get_event:
* @display: a #GdkDisplay
- *
+ *
* Gets the next #GdkEvent to be processed for @display, fetching events from the
* windowing system if necessary.
- *
+ *
* Returns: (nullable) (transfer full): the next #GdkEvent to be processed,
* or %NULL if no events are pending
*/
@@ -429,33 +414,6 @@ gdk_display_get_event (GdkDisplay *display)
return _gdk_event_unqueue (display);
}
-/**
- * gdk_display_peek_event:
- * @display: a #GdkDisplay
- *
- * Gets a copy of the first #GdkEvent in the @display’s event queue, without
- * removing the event from the queue. (Note that this function will
- * not get more events from the windowing system. It only checks the events
- * that have already been moved to the GDK event queue.)
- *
- * Returns: (nullable) (transfer full): the first #GdkEvent on the
- * event queue
- **/
-GdkEvent *
-gdk_display_peek_event (GdkDisplay *display)
-{
- GList *tmp_list;
-
- g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
-
- tmp_list = _gdk_event_queue_find_first (display);
-
- if (tmp_list != NULL)
- return gdk_event_ref (tmp_list->data);
-
- return NULL;
-}
-
/**
* gdk_display_put_event:
* @display: a #GdkDisplay
@@ -1113,23 +1071,6 @@ gdk_display_open (const char *display_name)
display_name);
}
-/**
- * gdk_display_has_pending:
- * @display: a #GdkDisplay
- *
- * Returns whether the display has events that are waiting
- * to be processed.
- *
- * Returns: %TRUE if there are events ready to be processed.
- */
-gboolean
-gdk_display_has_pending (GdkDisplay *display)
-{
- g_return_val_if_fail (GDK_IS_DISPLAY (display), FALSE);
-
- return GDK_DISPLAY_GET_CLASS (display)->has_pending (display);
-}
-
gulong
_gdk_display_get_next_serial (GdkDisplay *display)
{
@@ -1193,21 +1134,6 @@ _gdk_display_unpause_events (GdkDisplay *display)
display->event_pause_count--;
}
-void
-_gdk_display_event_data_copy (GdkDisplay *display,
- GdkEvent *event,
- GdkEvent *new_event)
-{
- GDK_DISPLAY_GET_CLASS (display)->event_data_copy (display, event, new_event);
-}
-
-void
-_gdk_display_event_data_free (GdkDisplay *display,
- GdkEvent *event)
-{
- GDK_DISPLAY_GET_CLASS (display)->event_data_free (display, event);
-}
-
GdkSurface *
gdk_display_create_surface (GdkDisplay *display,
GdkSurfaceType surface_type,
diff --git a/gdk/gdkdisplayprivate.h b/gdk/gdkdisplayprivate.h
index 3add2aa31f..be4a0901ca 100644
--- a/gdk/gdkdisplayprivate.h
+++ b/gdk/gdkdisplayprivate.h
@@ -135,11 +135,6 @@ struct _GdkDisplayClass
const char *startup_id);
const char * (*get_startup_notification_id) (GdkDisplay *display);
- void (*event_data_copy) (GdkDisplay *display,
- GdkEvent *event,
- GdkEvent *new_event);
- void (*event_data_free) (GdkDisplay *display,
- GdkEvent *event);
GdkSurface * (*create_surface) (GdkDisplay *display,
GdkSurfaceType surface_type,
GdkSurface *parent,
@@ -208,11 +203,6 @@ void _gdk_display_pointer_info_foreach (GdkDisplay *display
gulong _gdk_display_get_next_serial (GdkDisplay *display);
void _gdk_display_pause_events (GdkDisplay *display);
void _gdk_display_unpause_events (GdkDisplay *display);
-void _gdk_display_event_data_copy (GdkDisplay *display,
- GdkEvent *event,
- GdkEvent *new_event);
-void _gdk_display_event_data_free (GdkDisplay *display,
- GdkEvent *event);
GdkSurface * gdk_display_create_surface (GdkDisplay *display,
GdkSurfaceType surface_type,
GdkSurface *parent,
@@ -241,8 +231,6 @@ void gdk_display_setting_changed (GdkDisplay *display
const char *name);
GdkEvent * gdk_display_get_event (GdkDisplay *display);
-GdkEvent * gdk_display_peek_event (GdkDisplay *display);
-gboolean gdk_display_has_pending (GdkDisplay *display);
GdkKeymap * gdk_display_get_keymap (GdkDisplay *display);
diff --git a/gdk/gdkevents.c b/gdk/gdkevents.c
index e1b78a3de9..c768d22f23 100644
--- a/gdk/gdkevents.c
+++ b/gdk/gdkevents.c
@@ -147,10 +147,6 @@ value_event_lcopy_value (const GValue *value,
static void
gdk_event_finalize (GdkEvent *self)
{
- GdkDisplay *display = gdk_event_get_display (self);
- if (display != NULL)
- _gdk_display_event_data_free (display, self);
-
g_clear_object (&self->surface);
g_clear_object (&self->device);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]