This repository contains implementations designed to add native Windows touchscreen and stylus support (smooth 1:1 panning, inertial flinging, click synthesis, and modal priority hit-testing) to Jetpack/JetBrains Compose for Desktop applications.
The repository is divided into two separate implementations:
1. Antigravity (Active & Fully Functional)
- Status: ✅ Production-Ready & Fully Functional
- Author: Antigravity 2.0 (using the Gemini 3.5 Flash (Hard) AI model)
- Details:
- Implements low-level Win32
WndProcsubclassing using JNA on the top-level window and child canvas HWNDs. - Supports organic momentum fling scrolling using Compose's native velocity trackers and animation curves.
- Provides tap-to-click propagation to ensure buttons, switches, and other standard controls trigger normally.
- Fixes overlap z-order depth conflicts via a priority-layered
Modifier.touchScrimandModifier.touchScrollableconfiguration (ensuring foreground modal dialogs receive touch inputs correctly while blocking underlying scroll lists). - Includes a fully automated unit test suite and a high-contrast dark-themed sandbox demonstration app.
- For configuration and publishing guides, see the Antigravity README.
- Implements low-level Win32
2. Fable (WIP & Incomplete)
- Status: ❌ Failed / Non-functional / Incomplete
- Author: Claude Code (using the Fable AI model)
- Details:
- An incomplete implementation that was left in a non-functional state.
- Stored here for reference or historical comparison.
To explore or run the active touch implementation:
- Open a terminal in the
./Antigravitydirectory. - Read the Antigravity Documentation for setup and API guidelines.
- Launch the sandbox demonstration:
./gradlew :touch-demo:run