aboutsummaryrefslogtreecommitdiff
path: root/man/man3/mousescrollsize.3
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2005-01-03 06:40:20 +0000
committerrsc <devnull@localhost>2005-01-03 06:40:20 +0000
commit058b0118a52061ad57694c01fc8763b22b789c4d (patch)
tree6685f04dea5ed68edaa34998c976aed34c55fe94 /man/man3/mousescrollsize.3
parent2600337aa704efbeba8201e88147a764b4fd2b90 (diff)
downloadplan9port-058b0118a52061ad57694c01fc8763b22b789c4d.tar.gz
plan9port-058b0118a52061ad57694c01fc8763b22b789c4d.tar.bz2
plan9port-058b0118a52061ad57694c01fc8763b22b789c4d.zip
Some man pages.
Diffstat (limited to 'man/man3/mousescrollsize.3')
-rw-r--r--man/man3/mousescrollsize.362
1 files changed, 62 insertions, 0 deletions
diff --git a/man/man3/mousescrollsize.3 b/man/man3/mousescrollsize.3
new file mode 100644
index 00000000..915a6bb1
--- /dev/null
+++ b/man/man3/mousescrollsize.3
@@ -0,0 +1,62 @@
+.TH MOUSESCROLLSIZE 3
+.SH NAME
+mousescrollsize \- compute mouse scroll increment
+.SH SYNOPSIS
+.B #include <draw.h>
+.PP
+int mousescrollsize(int maxlines)
+.SH DESCRIPTION
+.I Mousescrollsize
+computes the number of lines of text that should be scrolled
+in response to a mouse scroll wheel click.
+.I Maxlines
+is the number of lines visible in the text window.
+.PP
+The default scroll increment is one line.
+This default can be overridden by setting the
+.B $mousescrollsize
+environment variable to an integer, which specifies
+a constant number of lines, or to a real number
+followed by a percent character, indicating that the
+scroll increment should be a percentage of the total
+number of lines in the window.
+For example, setting
+.B $mousescrollsize
+to
+.B 50%
+causes a half-window scroll increment.
+.PP
+.I Mousescrollsize
+is used by
+.IR 9term (1)
+and
+.IR acme (1)
+to set their scrolling behavior.
+.SH SOURCE
+.B /usr/local/plan9/src/libdraw/scroll.c
+.SH SEE ALSO
+.IR 9term (1),
+.IR acme (1)
+.SH BUGS
+.I Libdraw
+expects up and down scroll wheel events to be expressed as clicks of mouse buttons 4 and 5,
+but the XFree86 default is to ignore the scroll wheel.
+To enable the scroll wheel, change your
+.B InputDevice
+section of
+.B XF86Config-4
+to look like:
+.IP
+.EX
+Section "InputDevice"
+ Identifier "Mouse0"
+ Driver "mouse"
+ Option "Device" "/dev/psaux"
+
+ # next four lines enable scroll wheel as buttons 4 and 5
+ Option "Buttons" "5"
+ Option "Emulate3Buttons" "off"
+ Option "Protocol" "ImPS/2"
+ Option "ZAxisMapping" "4 5"
+EndSection
+.EE