On Fri, Feb 19, 2016 at 08:03:52PM +0530, PrasannaKumar Muralidharan wrote: > > right. the approach we used for this was to have an API that exports the > > value in degrees and an API for get_value_discrete() or similarly named. > > Look up the libinput_event_pointer*axis* API to get an idea. > > For several devices (example dimmers used for controlling lamps) value > in degrees is not useful. Exported value depends on device.
remember that libinput is a low-level library and doesn't know about how a specific device is being used by the layers above it. Hence a value in degrees isn't any less useful than a value in miscellaneous units which is what the _discrete() API bit is for. If the caller cares about units, it uses discrete steps, if it cares about number of rotations, it uses degrees. The only requirement in libinput is that you have a units -> physical degrees mapping which is something we used the hwdb for (in the case of mouse wheels anyway). Cheers, Peter _______________________________________________ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel