git: 9front

Download patch

ref: ed5d56cdf99a63ce2e820df3f845de79f2c55b81
parent: 534525b7e75c37e7c7096e6f5ef0f309d4ce89b1
author: Ori Bernstein <ori@eigenstate.org>
date: Fri Oct 17 18:57:18 EDT 2025

frame(2): document f->scroll (thanks akw)

--- a/sys/man/2/frame
+++ b/sys/man/2/frame
@@ -95,6 +95,7 @@
 	Image	*cols[NCOL];	/* text and background colors */
 	Rectangle	r;		/* in which text appears */
 	Rectangle	entire;		/* of full frame */
+	void	(*scroll)(Frame*, int);
 	Frbox	*box;
 	ulong	p0, p1;		/* selection */
 	ushort	nbox, nalloc;
@@ -311,6 +312,17 @@
 and
 .IB f ->p1
 to the selected range of text.
+If
+.IB f ->scroll
+is non-nil, and the mouse is above (below)
+.IB f ->r ,
+then
+.B frselect
+will repeatedly call
+.IB f ->scroll
+with its integer argument alternating between the negative (positive)
+number of lines to scroll up (down) by, and the value of zero so the
+application may delay in order to throttle the scrolling speeds.
 .PP
 Programs that wish to manage the selection themselves have several routines to help.
 They involve the maintenance of the `tick', the vertical line indicating a null selection
--