[gtk+/xi2] GdkDevice: Add private function to set device keys.



commit ba6955e32748e0b6637d7e6c6988e14e282ed444
Author: Carlos Garnacho <carlos gnome org>
Date:   Sun Oct 11 02:21:09 2009 +0200

    GdkDevice: Add private function to set device keys.

 gdk/gdkdevice.c        |   11 +++++++++++
 gdk/gdkdeviceprivate.h |    3 +++
 2 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/gdk/gdkdevice.c b/gdk/gdkdevice.c
index 4c1413b..df3b3fd 100644
--- a/gdk/gdkdevice.c
+++ b/gdk/gdkdevice.c
@@ -799,6 +799,17 @@ _gdk_device_add_axis (GdkDevice   *device,
   return pos;
 }
 
+void
+_gdk_device_set_keys (GdkDevice *device,
+                      guint      num_keys)
+{
+  if (device->keys)
+    g_free (device->keys);
+
+  device->num_keys = num_keys;
+  device->keys = g_new0 (GdkDeviceKey, num_keys);
+}
+
 GdkAxisInfo *
 find_axis_info (GArray     *array,
                 GdkAxisUse  use)
diff --git a/gdk/gdkdeviceprivate.h b/gdk/gdkdeviceprivate.h
index 0fb286f..a6e7547 100644
--- a/gdk/gdkdeviceprivate.h
+++ b/gdk/gdkdeviceprivate.h
@@ -98,6 +98,9 @@ guint _gdk_device_add_axis   (GdkDevice   *device,
                               gdouble      max_value,
                               gdouble      resolution);
 
+void _gdk_device_set_keys    (GdkDevice   *device,
+                              guint        num_keys);
+
 GdkAxisUse _gdk_device_get_axis_use (GdkDevice *device,
                                      guint      index);
 



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