From b6a634fe38fd95b349e944387d485ffa5a169a82 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 24 Nov 2017 21:20:52 -0500 Subject: [PATCH] Drop the list_devices vfunc We no longer have api that uses this. --- gdk/gdkdevicemanagerprivate.h | 2 -- gdk/quartz/gdkdevicemanager-core-quartz.c | 20 ------------- gdk/wayland/gdkdevice-wayland.c | 19 ------------ gdk/win32/gdkdevicemanager-win32.c | 35 ----------------------- gdk/x11/gdkdevicemanager-core-x11.c | 20 ------------- gdk/x11/gdkdevicemanager-xi2.c | 23 --------------- 6 files changed, 119 deletions(-) diff --git a/gdk/gdkdevicemanagerprivate.h b/gdk/gdkdevicemanagerprivate.h index 61ef9c408a..e6c37520df 100644 --- a/gdk/gdkdevicemanagerprivate.h +++ b/gdk/gdkdevicemanagerprivate.h @@ -43,8 +43,6 @@ struct _GdkDeviceManagerClass GObjectClass parent_class; /* VMethods */ - GList * (* list_devices) (GdkDeviceManager *device_manager, - GdkDeviceType type); GdkDevice * (* get_client_pointer) (GdkDeviceManager *device_manager); }; diff --git a/gdk/quartz/gdkdevicemanager-core-quartz.c b/gdk/quartz/gdkdevicemanager-core-quartz.c index 932528aae1..7620735de7 100644 --- a/gdk/quartz/gdkdevicemanager-core-quartz.c +++ b/gdk/quartz/gdkdevicemanager-core-quartz.c @@ -34,8 +34,6 @@ static void gdk_quartz_device_manager_core_finalize (GObject *object); static void gdk_quartz_device_manager_core_constructed (GObject *object); -static GList * gdk_quartz_device_manager_core_list_devices (GdkDeviceManager *device_manager, - GdkDeviceType type); static GdkDevice * gdk_quartz_device_manager_core_get_client_pointer (GdkDeviceManager *device_manager); @@ -49,7 +47,6 @@ gdk_quartz_device_manager_core_class_init (GdkQuartzDeviceManagerCoreClass *klas object_class->finalize = gdk_quartz_device_manager_core_finalize; object_class->constructed = gdk_quartz_device_manager_core_constructed; - device_manager_class->list_devices = gdk_quartz_device_manager_core_list_devices; device_manager_class->get_client_pointer = gdk_quartz_device_manager_core_get_client_pointer; } @@ -122,23 +119,6 @@ gdk_quartz_device_manager_core_constructed (GObject *object) g_object_unref (seat); } -static GList * -gdk_quartz_device_manager_core_list_devices (GdkDeviceManager *device_manager, - GdkDeviceType type) -{ - GdkQuartzDeviceManagerCore *quartz_device_manager_core; - GList *devices = NULL; - - if (type == GDK_DEVICE_TYPE_MASTER) - { - quartz_device_manager_core = (GdkQuartzDeviceManagerCore *) device_manager; - devices = g_list_prepend (devices, quartz_device_manager_core->core_keyboard); - devices = g_list_prepend (devices, quartz_device_manager_core->core_pointer); - } - - return devices; -} - static GdkDevice * gdk_quartz_device_manager_core_get_client_pointer (GdkDeviceManager *device_manager) { diff --git a/gdk/wayland/gdkdevice-wayland.c b/gdk/wayland/gdkdevice-wayland.c index 46f4db9fcf..cd4e4a7d5b 100644 --- a/gdk/wayland/gdkdevice-wayland.c +++ b/gdk/wayland/gdkdevice-wayland.c @@ -5001,24 +5001,6 @@ gdk_wayland_device_manager_finalize (GObject *object) G_OBJECT_CLASS (gdk_wayland_device_manager_parent_class)->finalize (object); } -static GList * -gdk_wayland_device_manager_list_devices (GdkDeviceManager *device_manager, - GdkDeviceType type) -{ - GdkWaylandDeviceManager *wayland_device_manager; - GList *devices = NULL, *l; - - wayland_device_manager = GDK_WAYLAND_DEVICE_MANAGER (device_manager); - - for (l = wayland_device_manager->devices; l; l = l->next) - { - if (gdk_device_get_device_type (l->data) == type) - devices = g_list_prepend (devices, l->data); - } - - return devices; -} - static GdkDevice * gdk_wayland_device_manager_get_client_pointer (GdkDeviceManager *device_manager) { @@ -5042,7 +5024,6 @@ gdk_wayland_device_manager_class_init (GdkWaylandDeviceManagerClass *klass) GObjectClass *object_class = G_OBJECT_CLASS (klass); object_class->finalize = gdk_wayland_device_manager_finalize; - device_manager_class->list_devices = gdk_wayland_device_manager_list_devices; device_manager_class->get_client_pointer = gdk_wayland_device_manager_get_client_pointer; } diff --git a/gdk/win32/gdkdevicemanager-win32.c b/gdk/win32/gdkdevicemanager-win32.c index a8962ec9d7..9260f65553 100644 --- a/gdk/win32/gdkdevicemanager-win32.c +++ b/gdk/win32/gdkdevicemanager-win32.c @@ -754,40 +754,6 @@ gdk_device_manager_win32_constructed (GObject *object) NULL); } -static GList * -gdk_device_manager_win32_list_devices (GdkDeviceManager *device_manager, - GdkDeviceType type) -{ - GdkDeviceManagerWin32 *device_manager_win32; - GList *devices = NULL, *l; - - device_manager_win32 = (GdkDeviceManagerWin32 *) device_manager; - - if (type == GDK_DEVICE_TYPE_MASTER) - { - devices = g_list_prepend (devices, device_manager_win32->core_keyboard); - devices = g_list_prepend (devices, device_manager_win32->core_pointer); - } - else - { - if (type == GDK_DEVICE_TYPE_SLAVE) - { - devices = g_list_prepend (devices, device_manager_win32->system_keyboard); - devices = g_list_prepend (devices, device_manager_win32->system_pointer); - } - - for (l = device_manager_win32->wintab_devices; l != NULL; l = l->next) - { - GdkDevice *device = l->data; - - if (gdk_device_get_device_type (device) == type) - devices = g_list_prepend (devices, device); - } - } - - return g_list_reverse (devices); -} - static GdkDevice * gdk_device_manager_win32_get_client_pointer (GdkDeviceManager *device_manager) { @@ -805,7 +771,6 @@ gdk_device_manager_win32_class_init (GdkDeviceManagerWin32Class *klass) object_class->finalize = gdk_device_manager_win32_finalize; object_class->constructed = gdk_device_manager_win32_constructed; - device_manager_class->list_devices = gdk_device_manager_win32_list_devices; device_manager_class->get_client_pointer = gdk_device_manager_win32_get_client_pointer; } diff --git a/gdk/x11/gdkdevicemanager-core-x11.c b/gdk/x11/gdkdevicemanager-core-x11.c index d487bb7cbf..5a40dab411 100644 --- a/gdk/x11/gdkdevicemanager-core-x11.c +++ b/gdk/x11/gdkdevicemanager-core-x11.c @@ -35,8 +35,6 @@ static void gdk_x11_device_manager_core_finalize (GObject *object); static void gdk_x11_device_manager_core_constructed (GObject *object); -static GList * gdk_x11_device_manager_core_list_devices (GdkDeviceManager *device_manager, - GdkDeviceType type); static GdkDevice * gdk_x11_device_manager_core_get_client_pointer (GdkDeviceManager *device_manager); static void gdk_x11_device_manager_event_translator_init (GdkEventTranslatorIface *iface); @@ -59,7 +57,6 @@ gdk_x11_device_manager_core_class_init (GdkX11DeviceManagerCoreClass *klass) object_class->finalize = gdk_x11_device_manager_core_finalize; object_class->constructed = gdk_x11_device_manager_core_constructed; - device_manager_class->list_devices = gdk_x11_device_manager_core_list_devices; device_manager_class->get_client_pointer = gdk_x11_device_manager_core_get_client_pointer; } @@ -683,23 +680,6 @@ gdk_x11_device_manager_core_translate_event (GdkEventTranslator *translator, return return_val; } -static GList * -gdk_x11_device_manager_core_list_devices (GdkDeviceManager *device_manager, - GdkDeviceType type) -{ - GdkX11DeviceManagerCore *device_manager_core; - GList *devices = NULL; - - if (type == GDK_DEVICE_TYPE_MASTER) - { - device_manager_core = (GdkX11DeviceManagerCore *) device_manager; - devices = g_list_prepend (devices, device_manager_core->core_keyboard); - devices = g_list_prepend (devices, device_manager_core->core_pointer); - } - - return devices; -} - static GdkDevice * gdk_x11_device_manager_core_get_client_pointer (GdkDeviceManager *device_manager) { diff --git a/gdk/x11/gdkdevicemanager-xi2.c b/gdk/x11/gdkdevicemanager-xi2.c index beff7bea7b..688780b8a6 100644 --- a/gdk/x11/gdkdevicemanager-xi2.c +++ b/gdk/x11/gdkdevicemanager-xi2.c @@ -73,8 +73,6 @@ static void gdk_x11_device_manager_xi2_get_property (GObject *object, GValue *value, GParamSpec *pspec); -static GList * gdk_x11_device_manager_xi2_list_devices (GdkDeviceManager *device_manager, - GdkDeviceType type); static GdkDevice * gdk_x11_device_manager_xi2_get_client_pointer (GdkDeviceManager *device_manager); static gboolean gdk_x11_device_manager_xi2_translate_event (GdkEventTranslator *translator, @@ -106,7 +104,6 @@ gdk_x11_device_manager_xi2_class_init (GdkX11DeviceManagerXI2Class *klass) object_class->set_property = gdk_x11_device_manager_xi2_set_property; object_class->get_property = gdk_x11_device_manager_xi2_get_property; - device_manager_class->list_devices = gdk_x11_device_manager_xi2_list_devices; device_manager_class->get_client_pointer = gdk_x11_device_manager_xi2_get_client_pointer; g_object_class_install_property (object_class, @@ -766,26 +763,6 @@ gdk_x11_device_manager_xi2_dispose (GObject *object) G_OBJECT_CLASS (gdk_x11_device_manager_xi2_parent_class)->dispose (object); } -static GList * -gdk_x11_device_manager_xi2_list_devices (GdkDeviceManager *device_manager, - GdkDeviceType type) -{ - GdkX11DeviceManagerXI2 *device_manager_xi2; - GList *cur, *list = NULL; - - device_manager_xi2 = GDK_X11_DEVICE_MANAGER_XI2 (device_manager); - - for (cur = device_manager_xi2->devices; cur; cur = cur->next) - { - GdkDevice *dev = cur->data; - - if (type == gdk_device_get_device_type (dev)) - list = g_list_prepend (list, dev); - } - - return list; -} - static GdkDevice * gdk_x11_device_manager_xi2_get_client_pointer (GdkDeviceManager *device_manager) {