changeset 7451:8cd193121334

RT-37865 [Monocle] Show absolute axis bounds in GetEvent
author Daniel Blaukopf <daniel.blaukopf@oracle.com>
date Wed, 09 Jul 2014 15:59:40 +0300
parents a3c363c701c8
children acc06f0a5691
files modules/graphics/src/main/java/com/sun/glass/ui/monocle/GetEvent.java
diffstat 1 files changed, 19 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/modules/graphics/src/main/java/com/sun/glass/ui/monocle/GetEvent.java	Wed Jul 09 08:49:46 2014 -0400
+++ b/modules/graphics/src/main/java/com/sun/glass/ui/monocle/GetEvent.java	Wed Jul 09 15:59:40 2014 +0300
@@ -80,6 +80,25 @@
                     System.out.println("  5-way=" + device.is5Way());
                     System.out.println("  fullKeyboard=" + device.isFullKeyboard());
                     System.out.println("  PRODUCT=" + device.getProduct());
+                    for (short axis = 0; axis < LinuxInput.ABS_MAX; axis++) {
+                        LinuxAbsoluteInputCapabilities caps =
+                                device.getAbsoluteInputCapabilities(axis);
+                        if (caps != null) {
+                            String axisName = LinuxInput.codeToString("EV_ABS", axis);
+                            System.out.format("  ABSVAL %s %d\n",
+                                              axisName, caps.getValue());
+                            System.out.format("  ABSMIN %s %d\n",
+                                              axisName, caps.getMinimum());
+                            System.out.format("  ABSMAX %s %d\n",
+                                              axisName, caps.getMaximum());
+                            System.out.format("  ABSFUZZ %s %d\n",
+                                              axisName, caps.getFuzz());
+                            System.out.format("  ABSFLAT %s %d\n",
+                                              axisName, caps.getFlat());
+                            System.out.format("  ABSRES %s %d\n",
+                                              axisName, caps.getResolution());
+                        }
+                    }
                     devices.add(sysPath);
                 } else if (action.equals("remove")) {
                     devices.remove(devPath);