summaryrefslogtreecommitdiff
path: root/XI2.h
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2011-08-15 12:33:04 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2011-09-02 14:53:01 +1000
commit7d5a303cd8976a7eac1b96897c70d5d25c57ecf1 (patch)
tree99ff6c9c2896ed0c7a2bbce6257de333178e8ec7 /XI2.h
parent186aa20619d1720bde49fd92d2834c8f9eadf49b (diff)
Move scroll information into a new class.
Using labels only to mark smooth scrolling axes disallows scrolling from hardware events (e.g. a mouse wheel). If those axes are marked as scrolling axes instead, the clients lose information which hardware axis this event corresponds to. For example, on Wacom devices, the client can benefit from smooth scrolling on the strip or wheel event but may still require the knowledge whether the axis is a vertical strip (e.g. Intuos3) or a absolute scrolling wheel (e.g. Intuos4). Thus, add a new class to XIQueryDevice that represents scrolling information on a valuator. One of these ScrollClass may exist for each ValuatorClass if that valuator is a scrolling valuator. The increment field of this class removes the requirement for 1.0 == 1 unit of scrolling. This isn't true in most cases, especially where physical scroll axes are involved. Wacom Intuos4 scroll rings have a unit size of 3.0 and the driver historically sent one scroll event per 3.0 increment or decrement. Mapping one scroll event to 1.0 makes the ring mostly unusable through legacy button events. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'XI2.h')
-rw-r--r--XI2.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/XI2.h b/XI2.h
index 29ffdd1..18dd172 100644
--- a/XI2.h
+++ b/XI2.h
@@ -141,6 +141,15 @@
#define XIKeyClass 0
#define XIButtonClass 1
#define XIValuatorClass 2
+#define XIScrollClass 3
+
+/* Scroll class types */
+#define XIScrollTypeVertical 1
+#define XIScrollTypeHorizontal 2
+
+/* Scroll class flags */
+#define XIScrollFlagNoEmulation (1 << 0)
+#define XIScrollFlagPreferred (1 << 1)
/* Device event flags (common) */
/* Device event flags (key events only) */