Files
vectorcraft/apps
dotCooCoo ea78ee5022 Windows: the Paintbrush reads an airbrush pen's stylus wheel through Wintab
Pointer messages carry no field for an airbrush pen's finger wheel, so a
brush set to Stylus Wheel drew the half-way value on Windows. The new
windows_wintab module reads the wheel from the tablet driver's Wintab
interface as the tangential pressure of a cursor the driver reports as an
airbrush, placed within its device's DVC_TPRESSURE range.

- Wintab32.dll is loaded at run time from the system directory only
  (LoadLibraryExW with LOAD_LIBRARY_SEARCH_SYSTEM32). Without it, without
  one of its exports, or when a call fails, Windows pens read no wheel and
  draw as before.
- The context is opened from the driver's default context with packet
  messages on and CXO_SYSTEM and CXO_PEN off, so it moves no cursor and
  makes no press. It follows the top-level window the pen is over.
- WTInfoW answers are size-checked against a null-buffer call and read
  into a larger buffer; packets are read into a buffer larger than any
  packet and decoded from the fields the context asked for; a value
  outside the axis range reads as no wheel.
- Pointer messages keep the pressure, end, tilt and rotation. A pen's
  message takes the airbrush's last wheel since it came near, or, when
  several cursors were read, the one whose latest packet came within
  200 ms of the message, and none when more than one or none did. 0
  counts as no wheel until the pen reports another value, as on macOS,
  and the readings start afresh on proximity, a cursor change, the other
  end, a canceled press and leaving the window.

Docs: docs/mcp.md, docs/target-app-parity.md.
2026-11-21 02:12:15 -08:00
..