[gtk+/xi2] GdkDeviceCore: Use _gdk_device_add_axis().



commit 09418a0e758aac31097d61dde7a6d8c55d0a2a5e
Author: Carlos Garnacho <carlos gnome org>
Date:   Sat Oct 10 12:32:03 2009 +0200

    GdkDeviceCore: Use _gdk_device_add_axis().

 gdk/x11/gdkdevice-core.c |   12 ++----------
 1 files changed, 2 insertions(+), 10 deletions(-)
---
diff --git a/gdk/x11/gdkdevice-core.c b/gdk/x11/gdkdevice-core.c
index 72840fb..fa5e640 100644
--- a/gdk/x11/gdkdevice-core.c
+++ b/gdk/x11/gdkdevice-core.c
@@ -62,11 +62,6 @@ static void      gdk_device_core_select_window_events (GdkDevice       *device,
 
 G_DEFINE_TYPE (GdkDeviceCore, gdk_device_core, GDK_TYPE_DEVICE)
 
-static GdkDeviceAxis gdk_device_core_axes[] = {
-  { GDK_AXIS_X, 0, 0 },
-  { GDK_AXIS_Y, 0, 0 }
-};
-
 static void
 gdk_device_core_class_init (GdkDeviceCoreClass *klass)
 {
@@ -89,11 +84,8 @@ gdk_device_core_init (GdkDeviceCore *device_core)
 
   device = GDK_DEVICE (device_core);
 
-  device->num_axes = G_N_ELEMENTS (gdk_device_core_axes);
-  device->axes = gdk_device_core_axes;
-
-  device->num_keys = 0;
-  device->keys = NULL;
+  _gdk_device_add_axis (device, GDK_NONE, GDK_AXIS_X, 0, 0, 1);
+  _gdk_device_add_axis (device, GDK_NONE, GDK_AXIS_Y, 0, 0, 1);
 }
 
 static void



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