summaryrefslogtreecommitdiff
path: root/src/macos/pardes.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/macos/pardes.h')
-rw-r--r--src/macos/pardes.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/macos/pardes.h b/src/macos/pardes.h
index 5f1ccf77..a2d13b1f 100644
--- a/src/macos/pardes.h
+++ b/src/macos/pardes.h
@@ -377,6 +377,24 @@ void pardes_watch_changed(uint8_t pane, uint32_t generation);
void pardes_scroll(float delta_rows, float delta_cols, uint16_t col,
uint16_t row);
+// The gesture boundaries around pardes_scroll, and the whole of scroll
+// momentum. `begin` is fingers down: it catches a coast the way a hand catches
+// a spinning dial, and drops whatever the last gesture left banked. `end` is
+// fingers up: a swipe still moving when it ended becomes a fling, in
+// proportion to how hard it was thrown, on the same curve pardes_rotate_end
+// uses — momentum ramps up from zero rather than switching on at a threshold.
+//
+// A coast makes pardes_animating true and is spent by pardes_animation_tick,
+// and it stops at the end of a document instead of spinning against the edge.
+//
+// A host whose windowing system already flings for it needs no suppression:
+// the system's momentum arrives as ordinary pardes_scroll calls, every one of
+// which cancels the coast before spending its own travel, so that momentum
+// simply takes the gesture over. A host that calls neither — a discrete wheel
+// has no phases — scrolls with no momentum at all.
+void pardes_scroll_begin(void);
+void pardes_scroll_end(void);
+
// A two-finger trackpad rotation, in degrees since the last call, positive
// counterclockwise (AppKit's sign, unchanged). The core has no rotation: this
// is spent as the search-step keys, clockwise `n` and counterclockwise `N`, a