[gtk+/wip/events: 8/8] API: gdk: Add GdkAxisUse entries for relative axes



commit 3d50e48f77da4a6f200e298700ab71f4b29ce143
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 6d692a3..89dff85 100644
--- a/gdk/gdkdevice.h
+++ b/gdk/gdkdevice.h
@@ -105,6 +105,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 us used to describe relative movement along
+ *   the x axis.
+ * @GDK_AXIS_Y_RELATIVE: the axis us used to describe relative movement along
+ *   the y axis.
  * @GDK_AXIS_LAST: a constant equal to the numerically highest axis value.
  *
  * An enumeration describing the way in which a device
@@ -120,6 +124,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 9753c7c..94c42cd 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]