[gtk+] Add _gdk_device_get_axis_info
- From: Alexander Larsson <alexl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Add _gdk_device_get_axis_info
- Date: Tue, 3 Apr 2012 09:40:13 +0000 (UTC)
commit ddd24761fd698f35671a0f649539a4b11705e9fa
Author: Alexander Larsson <alexl redhat com>
Date: Tue Apr 3 10:54:25 2012 +0200
Add _gdk_device_get_axis_info
This is needed for the win32 master/slave handling code.
gdk/gdkdevice.c | 23 +++++++++++++++++++++++
gdk/gdkdeviceprivate.h | 7 +++++++
2 files changed, 30 insertions(+), 0 deletions(-)
---
diff --git a/gdk/gdkdevice.c b/gdk/gdkdevice.c
index cd8bda2..0abfffe 100644
--- a/gdk/gdkdevice.c
+++ b/gdk/gdkdevice.c
@@ -1370,6 +1370,29 @@ _gdk_device_add_axis (GdkDevice *device,
}
void
+_gdk_device_get_axis_info (GdkDevice *device,
+ guint index_,
+ GdkAtom *label_atom,
+ GdkAxisUse *use,
+ gdouble *min_value,
+ gdouble *max_value,
+ gdouble *resolution)
+{
+ GdkAxisInfo *info;
+
+ g_return_if_fail (GDK_IS_DEVICE (device));
+ g_return_if_fail (index_ < device->axes->len);
+
+ info = &g_array_index (device->axes, GdkAxisInfo, index_);
+
+ *label_atom = info->label;
+ *use = info->use;
+ *min_value = info->min_value;
+ *max_value = info->max_value;
+ *resolution = info->resolution;
+}
+
+void
_gdk_device_set_keys (GdkDevice *device,
guint num_keys)
{
diff --git a/gdk/gdkdeviceprivate.h b/gdk/gdkdeviceprivate.h
index ff92ea4..f30dbdb 100644
--- a/gdk/gdkdeviceprivate.h
+++ b/gdk/gdkdeviceprivate.h
@@ -121,6 +121,13 @@ guint _gdk_device_add_axis (GdkDevice *device,
gdouble min_value,
gdouble max_value,
gdouble resolution);
+void _gdk_device_get_axis_info (GdkDevice *device,
+ guint index,
+ GdkAtom *label_atom,
+ GdkAxisUse *use,
+ gdouble *min_value,
+ gdouble *max_value,
+ gdouble *resolution);
void _gdk_device_set_keys (GdkDevice *device,
guint num_keys);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]