libinput/doc/user/development.rst

54 lines
1.6 KiB
ReStructuredText
Raw Normal View History

.. _development:
==============================================================================
Information for developers
==============================================================================
Below is a list of topics of interest to developers, divided into
information for those :ref:`using_libinput_as_library` in a Wayland compositor
or other project. The :ref:`hacking_on_libinput` section applies to developers working on
libinput itself.
.. note:: If you use or work on libinput you should get in touch with the
libinput developers on the wayland-devel@lists.freedesktop.org
mailing lists
.. _using_libinput_as_library:
------------------------------------------------------------------------------
Using libinput as library
------------------------------------------------------------------------------
See :ref:`building_against` for information on how to integrate libinput
with your project's build system.
.. note:: **libinput's API documentation is available here:**
http://wayland.freedesktop.org/libinput/doc/latest/api/
Topics below explain some behaviors of libinput.
.. toctree::
:maxdepth: 1
absolute-axes.rst
absolute-coordinate-ranges.rst
normalization-of-relative-motion.rst
seats.rst
timestamps.rst
High-resolution scroll wheel support Starting with kernel v5.0 two new axes are available for high-resolution wheel scrolling: REL_WHEEL_HI_RES and REL_HWHEEL_HI_RES. Both axes send data in fractions of 120 where each multiple of 120 amounts to one logical scroll event. Fractions of 120 indicate a wheel movement less than one detent. This commit adds a new API for scroll events. Three new event types that encode the axis source in the event type name and a new API to get a normalized-to-120 value that also used by Windows and the kernel (each multiple of 120 represents a logical scroll click). This addresses a main shortcoming with the existing API - it was unreliable to calculate the click angle based on the axis value+discrete events and thus any caller using the axis value alone would be left with some ambiguity. With the v120 API it's now possible to (usually) calculate the click angle, but more importantly it provides the simplest hw-independent way of scrolling by a click or a fraction of a click. A new event type is required, the only way to integrate the v120 value otherwise was to start sending events with a discrete value of 0. This would break existing xf86-input-libinput (divide by zero, fixed in 0.28.2) and weston (general confusion). mutter, kwin are unaffected. With the new API, the old POINTER_AXIS event are deprecated - callers should use the new API where available and discard any POINTER_AXIS events. Notable: REL_WHEEL/REL_HWHEEL are emulated by the kernel but there's no guarantee that they'll come every accumulated 120 values, e.g. Logitech mice often send events that don't add up to 120 per detent. We use the kernel's wheel click emulation instead of doing our own. libinput guarantees high-resolution events even on pre-5.0 kernels. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: José Expósito <jose.exposito89@gmail.com>
2018-11-22 10:24:54 +10:00
wheel-api.rst
.. _hacking_on_libinput:
------------------------------------------------------------------------------
Hacking on libinput
------------------------------------------------------------------------------
.. toctree::
:maxdepth: 1
architecture
test-suite.rst
pointer-acceleration.rst
device-configuration-via-udev.rst