Libpointing
An open-source cross-platform library to get raw events from pointing devices and master transfer functions.
Libpointing

Libpointing is a software toolkit that provides direct access to HID pointing devices and supports the design and evaluation of pointing transfer functions.

The toolkit

Find more information here.