[gtk+/wip/events: 5/11] API: gdk: Add GdkAxisUse entries for relative axes
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/events: 5/11] API: gdk: Add GdkAxisUse entries for relative axes
- Date: Fri, 9 Mar 2012 03:44:53 +0000 (UTC)
commit d29b77ee6f89cc3268afa0e456107f4b30c8aedd
Author: Benjamin Otte <otte redhat com>
Date: Mon Mar 5 14:38:44 2012 +0100
API: gdk: Add GdkAxisUse entries for relative axes
Those are necessary for touchpads.
gdk/gdkdevice.h | 6 ++++++
gdk/x11/gdkdevicemanager-xi2.c | 2 ++
2 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/gdk/gdkdevice.h b/gdk/gdkdevice.h
index ea215f3..3efa027 100644
--- a/gdk/gdkdevice.h
+++ b/gdk/gdkdevice.h
@@ -88,6 +88,10 @@ typedef enum
* @GDK_AXIS_XTILT: the axis is used for x tilt information.
* @GDK_AXIS_YTILT: the axis is used for y tilt information.
* @GDK_AXIS_WHEEL: the axis is used for wheel information.
+ * @GDK_AXIS_X_RELATIVE: the axis used to describe relative movement along
+ * the x axis. Useful for tracking movement on %GDK_SOURCE_TOUCHPAD devices.
+ * @GDK_AXIS_Y_RELATIVE: the axis used to describe relative movement along
+ * the y axis. Useful for tracking movement on %GDK_SOURCE_TOUCHPAD devices.
* @GDK_AXIS_LAST: a constant equal to the numerically highest axis value.
*
* An enumeration describing the way in which a device
@@ -103,6 +107,8 @@ typedef enum
GDK_AXIS_XTILT,
GDK_AXIS_YTILT,
GDK_AXIS_WHEEL,
+ GDK_AXIS_X_RELATIVE,
+ GDK_AXIS_Y_RELATIVE,
GDK_AXIS_LAST
} GdkAxisUse;
diff --git a/gdk/x11/gdkdevicemanager-xi2.c b/gdk/x11/gdkdevicemanager-xi2.c
index eee1da7..95fdf89 100644
--- a/gdk/x11/gdkdevicemanager-xi2.c
+++ b/gdk/x11/gdkdevicemanager-xi2.c
@@ -180,6 +180,8 @@ translate_valuator_class (GdkDisplay *display,
label_atoms [GDK_AXIS_XTILT] = gdk_x11_get_xatom_by_name_for_display (display, "Abs Tilt X");
label_atoms [GDK_AXIS_YTILT] = gdk_x11_get_xatom_by_name_for_display (display, "Abs Tilt Y");
label_atoms [GDK_AXIS_WHEEL] = gdk_x11_get_xatom_by_name_for_display (display, "Abs Wheel");
+ label_atoms [GDK_AXIS_X_RELATIVE] = gdk_x11_get_xatom_by_name_for_display (display, "Rel X");
+ label_atoms [GDK_AXIS_Y_RELATIVE] = gdk_x11_get_xatom_by_name_for_display (display, "Rel Y");
initialized = TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]