Hacker News new | ask | show | jobs
by t23414321 10 days ago
similar on Windows:

  Direct Manipulation API which supports “absolute” transformations that are independent of line / row size, as well as asynchronous rendering (Windows8 API for touch-based scrolling) .. it’s possible to register a window as a Direct Manipulation consumer and receive the pixel-precise input events without involving the rendering parts of the API (however, that requires both compatible hardware and proper application support) like:

  first, the driver tries to use Direct Manipulation API for “pixel-perfect” scrolling,

  * then, if application doesn’t support the API (very few do), the driver tries to find and manipulate application scrollbar(s) directly (by sending WM_HSCROLL and WM_VSCROLL messages, like with legacy touchscreen panning), because, unlike the mouse wheel events, scrollbars can support pixel-precise deltas (this step might not work for widget toolkits that don’t use native scrollbars), *

  finally, if there are neither the Direct Manipulation API, nor a suitable scrollbar available, the driver resorts to sending the high-resolution WM_MOUSEWHEEL messages.

  Windows supports pixel-precise scrolling only in the combination of Precision Touchpad driver and Direct Manipulation API (yet Direct Manipulation is too all-encompassing and is never meant to used just for input).
- from: https://pavelfatin.com/scrolling-with-pleasure/