[gtk+] gdkdisplay: Provide a default event_data_copy / event_data_free



commit 887b7356c369e58a959b99d88246df8303e34531
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Mon Oct 27 21:47:58 2014 -0700

    gdkdisplay: Provide a default event_data_copy / event_data_free
    
    Every single implementation but Quartz is a no-op for this, so just
    provide it once rather than in every backend.

 gdk/broadway/gdkdisplay-broadway.c |   15 ---------------
 gdk/gdkdisplay.c                   |   15 +++++++++++++++
 gdk/mir/gdkmirdisplay.c            |   17 -----------------
 gdk/wayland/gdkdisplay-wayland.c   |   15 ---------------
 gdk/win32/gdkdisplay-win32.c       |   15 ---------------
 gdk/x11/gdkdisplay-x11.c           |   15 ---------------
 6 files changed, 15 insertions(+), 77 deletions(-)
---
diff --git a/gdk/broadway/gdkdisplay-broadway.c b/gdk/broadway/gdkdisplay-broadway.c
index 53c675d..307728f 100644
--- a/gdk/broadway/gdkdisplay-broadway.c
+++ b/gdk/broadway/gdkdisplay-broadway.c
@@ -330,19 +330,6 @@ gdk_broadway_display_get_next_serial (GdkDisplay *display)
   return _gdk_broadway_server_get_next_serial (broadway_display->server);
 }
 
-static void
-gdk_broadway_display_event_data_copy (GdkDisplay    *display,
-                                     const GdkEvent *src,
-                                     GdkEvent       *dst)
-{
-}
-
-static void
-gdk_broadway_display_event_data_free (GdkDisplay    *display,
-                                     GdkEvent *event)
-{
-}
-
 void
 gdk_broadway_display_show_keyboard (GdkBroadwayDisplay *display)
 {
@@ -398,8 +385,6 @@ gdk_broadway_display_class_init (GdkBroadwayDisplayClass * class)
   display_class->after_process_all_updates = _gdk_broadway_display_after_process_all_updates;
   display_class->get_next_serial = gdk_broadway_display_get_next_serial;
   display_class->notify_startup_complete = gdk_broadway_display_notify_startup_complete;
-  display_class->event_data_copy = gdk_broadway_display_event_data_copy;
-  display_class->event_data_free = gdk_broadway_display_event_data_free;
   display_class->create_window_impl = _gdk_broadway_display_create_window_impl;
   display_class->get_keymap = _gdk_broadway_display_get_keymap;
   display_class->get_selection_owner = _gdk_broadway_display_get_selection_owner;
diff --git a/gdk/gdkdisplay.c b/gdk/gdkdisplay.c
index d6fd187..acbf66f 100644
--- a/gdk/gdkdisplay.c
+++ b/gdk/gdkdisplay.c
@@ -111,6 +111,19 @@ gdk_display_real_opened (GdkDisplay *display)
 }
 
 static void
+gdk_display_real_event_data_copy (GdkDisplay     *display,
+                                  const GdkEvent *src,
+                                  GdkEvent       *dst)
+{
+}
+
+static void
+gdk_display_real_event_data_free (GdkDisplay     *display,
+                                  GdkEvent       *dst)
+{
+}
+
+static void
 gdk_display_class_init (GdkDisplayClass *class)
 {
   GObjectClass *object_class = G_OBJECT_CLASS (class);
@@ -123,6 +136,8 @@ gdk_display_class_init (GdkDisplayClass *class)
 
   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;
 
   /**
    * GdkDisplay::opened:
diff --git a/gdk/mir/gdkmirdisplay.c b/gdk/mir/gdkmirdisplay.c
index 92dfcee..d450837 100644
--- a/gdk/mir/gdkmirdisplay.c
+++ b/gdk/mir/gdkmirdisplay.c
@@ -383,21 +383,6 @@ gdk_mir_display_notify_startup_complete (GdkDisplay  *display,
 }
 
 static void
-gdk_mir_display_event_data_copy (GdkDisplay     *display,
-                                 const GdkEvent *src,
-                                 GdkEvent       *dst)
-{
-  //g_printerr ("gdk_mir_display_event_data_copy\n");
-}
-
-static void
-gdk_mir_display_event_data_free (GdkDisplay *display,
-                                 GdkEvent   *event)
-{
-  //g_printerr ("gdk_mir_display_event_data_free\n");
-}
-
-static void
 gdk_mir_display_create_window_impl (GdkDisplay    *display,
                                     GdkWindow     *window,
                                     GdkWindow     *real_parent,
@@ -556,8 +541,6 @@ gdk_mir_display_class_init (GdkMirDisplayClass *klass)
   display_class->after_process_all_updates = gdk_mir_display_after_process_all_updates;
   display_class->get_next_serial = gdk_mir_display_get_next_serial;
   display_class->notify_startup_complete = gdk_mir_display_notify_startup_complete;
-  display_class->event_data_copy = gdk_mir_display_event_data_copy;
-  display_class->event_data_free = gdk_mir_display_event_data_free;
   display_class->create_window_impl = gdk_mir_display_create_window_impl;
   display_class->get_keymap = gdk_mir_display_get_keymap;
   display_class->push_error_trap = gdk_mir_display_push_error_trap;
diff --git a/gdk/wayland/gdkdisplay-wayland.c b/gdk/wayland/gdkdisplay-wayland.c
index d9fffe4..0f367ec 100644
--- a/gdk/wayland/gdkdisplay-wayland.c
+++ b/gdk/wayland/gdkdisplay-wayland.c
@@ -432,19 +432,6 @@ gdk_wayland_display_notify_startup_complete (GdkDisplay  *display,
 {
 }
 
-static void
-gdk_wayland_display_event_data_copy (GdkDisplay     *display,
-                                    const GdkEvent *src,
-                                    GdkEvent       *dst)
-{
-}
-
-static void
-gdk_wayland_display_event_data_free (GdkDisplay *display,
-                                    GdkEvent   *event)
-{
-}
-
 static GdkKeymap *
 _gdk_wayland_display_get_keymap (GdkDisplay *display)
 {
@@ -535,8 +522,6 @@ gdk_wayland_display_class_init (GdkWaylandDisplayClass * class)
   display_class->after_process_all_updates = gdk_wayland_display_after_process_all_updates;
   display_class->get_next_serial = gdk_wayland_display_get_next_serial;
   display_class->notify_startup_complete = gdk_wayland_display_notify_startup_complete;
-  display_class->event_data_copy = gdk_wayland_display_event_data_copy;
-  display_class->event_data_free = gdk_wayland_display_event_data_free;
   display_class->create_window_impl = _gdk_wayland_display_create_window_impl;
   display_class->get_keymap = _gdk_wayland_display_get_keymap;
   display_class->push_error_trap = gdk_wayland_display_push_error_trap;
diff --git a/gdk/win32/gdkdisplay-win32.c b/gdk/win32/gdkdisplay-win32.c
index 2d73c30..97d0e3e 100644
--- a/gdk/win32/gdkdisplay-win32.c
+++ b/gdk/win32/gdkdisplay-win32.c
@@ -600,19 +600,6 @@ gdk_win32_display_notify_startup_complete (GdkDisplay  *display,
   /* nothing */
 }
 static void
-gdk_win32_display_event_data_copy (GdkDisplay    *display,
-                                   const GdkEvent *src,
-                                   GdkEvent       *dst)
-{
-  /* nothing */
-}
-static void
-gdk_win32_display_event_data_free (GdkDisplay *display,
-                                   GdkEvent *event)
-{
-  /* nothing */
-}
-static void
 gdk_win32_display_push_error_trap (GdkDisplay *display)
 {
   /* nothing */
@@ -665,8 +652,6 @@ gdk_win32_display_class_init (GdkWin32DisplayClass *klass)
   display_class->after_process_all_updates = gdk_win32_display_after_process_all_updates;
   display_class->get_next_serial = gdk_win32_display_get_next_serial;
   display_class->notify_startup_complete = gdk_win32_display_notify_startup_complete;
-  display_class->event_data_copy = gdk_win32_display_event_data_copy;
-  display_class->event_data_free = gdk_win32_display_event_data_free;
   display_class->create_window_impl = _gdk_win32_display_create_window_impl;
 
   display_class->get_keymap = _gdk_win32_display_get_keymap;
diff --git a/gdk/x11/gdkdisplay-x11.c b/gdk/x11/gdkdisplay-x11.c
index a964e2a..be3ec71 100644
--- a/gdk/x11/gdkdisplay-x11.c
+++ b/gdk/x11/gdkdisplay-x11.c
@@ -2810,19 +2810,6 @@ gdk_x11_set_sm_client_id (const gchar *sm_client_id)
   g_slist_free (displays);
 }
 
-static void
-gdk_x11_display_event_data_copy (GdkDisplay    *display,
-                                const GdkEvent *src,
-                                GdkEvent       *dst)
-{
-}
-
-static void
-gdk_x11_display_event_data_free (GdkDisplay *display,
-                                 GdkEvent *event)
-{
-}
-
 static gint
 pop_error_trap (GdkDisplay *display,
                 gboolean    ignored)
@@ -2894,8 +2881,6 @@ gdk_x11_display_class_init (GdkX11DisplayClass * class)
   display_class->after_process_all_updates = _gdk_x11_display_after_process_all_updates;
   display_class->get_next_serial = gdk_x11_display_get_next_serial;
   display_class->notify_startup_complete = gdk_x11_display_notify_startup_complete;
-  display_class->event_data_copy = gdk_x11_display_event_data_copy;
-  display_class->event_data_free = gdk_x11_display_event_data_free;
   display_class->create_window_impl = _gdk_x11_display_create_window_impl;
   display_class->get_keymap = gdk_x11_display_get_keymap;
   display_class->push_error_trap = gdk_x11_display_error_trap_push;


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