bug-ncurses
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 07/42] man/curs_mouse.3x: Fix content and style nits.


From: G. Branden Robinson
Subject: [PATCH 07/42] man/curs_mouse.3x: Fix content and style nits.
Date: Sat, 16 Dec 2023 11:41:46 -0600

* Set `stdscr` symbol in bold and protect it from hyphenation.
* Explicitly document that `has_mouse()` can return `FALSE`.
* Document return values of `has_mouse()`, `wenclose()`,
  `mouse_trafo()`, and `wmouse_trafo()` in "RETURN VALUE" section.
---
 man/curs_mouse.3x | 49 +++++++++++++++++++++++++----------------------
 1 file changed, 26 insertions(+), 23 deletions(-)

diff --git a/man/curs_mouse.3x b/man/curs_mouse.3x
index 5c54ad4da..16cb1903d 100644
--- a/man/curs_mouse.3x
+++ b/man/curs_mouse.3x
@@ -180,11 +180,11 @@ .SS wenclose
 the screen windows enclose the location of a mouse event.
 .SS wmouse_trafo
 The \fB\%wmouse_trafo\fP function transforms a given pair of coordinates
-from stdscr-relative coordinates
+from \fB\%stdscr\fP-relative coordinates
 to coordinates relative to the given window or vice versa.
-The resulting stdscr-relative coordinates are not always identical
-to window-relative coordinates due to the mechanism to reserve lines on top
-or bottom of the screen for other purposes
+The resulting \fB\%stdscr\fP-relative coordinates are not always
+identical to window-relative coordinates due to the mechanism to reserve
+lines on top or bottom of the screen for other purposes
 (see the \fB\%ripoffline\fP and \fB\%slk_init\fP(3X) calls, for example).
 .bP
 If the parameter \fIto_screen\fP is \fBTRUE\fP, the pointers
@@ -200,7 +200,7 @@ .SS wmouse_trafo
 If \fIto_screen\fP is
 \fBFALSE\fP, the pointers \fIpY, pX\fP must reference window-relative
 coordinates.
-They are converted to stdscr-relative coordinates if the
+They are converted to \fB\%stdscr\fP-relative coordinates if the
 window \fIwin\fP encloses this point.
 In this case the function returns \fBTRUE\fP.
 .bP
@@ -212,7 +212,7 @@ .SS wmouse_trafo
 .SS mouse_trafo
 The \fB\%mouse_trafo\fP function performs the same translation
 as \fB\%wmouse_trafo\fP,
-using stdscr for \fIwin\fP.
+using \fB\%stdscr\fP for \fIwin\fP.
 .SS mouseinterval
 The \fB\%mouseinterval\fP function sets the maximum time (in thousands of a
 second) that can elapse between press and release events for them to
@@ -222,33 +222,36 @@ .SS mouseinterval
 Use \fB\%mouseinterval(\-1)\fP to obtain the interval without altering it.
 The default is one sixth of a second.
 .SS has_mouse
-The \fB\%has_mouse\fP function returns \fBTRUE\fP if the mouse driver has been
-successfully initialized.
+The \fB\%has_mouse\fP function returns \fBTRUE\fP if the mouse driver
+has been successfully initialized,
+and \fBFALSE\fP otherwise.
 .PP
 Note that mouse events will be ignored when input is in cooked mode, and will
 cause an error beep when cooked mode is being simulated in a window by a
 function such as \fB\%getstr\fP that expects a linefeed for input-loop
 termination.
 .SH RETURN VALUE
+\fB\%has_mouse\fP,
+\fB\%wenclose\fP,
+\fB\%mouse_trafo\fP,
+and
+\fB\%wmouse_trafo\fP
+return \fBTRUE\fP or \fBFALSE\fP as noted above.
+.PP
 \fB\%getmouse\fP and \fB\%ungetmouse\fP
-return the integer \fBERR\fP upon failure or \fBOK\fP
-upon successful completion:
-.RS 3
-.TP 5
-\fB\%getmouse\fP
-returns an error.
+return \fBERR\fP upon failure and \fBOK\fP upon success.
+.PP
+\fB\%getmouse\fP fails if:
 .bP
-If no mouse driver was initialized, or
-if the mask parameter is zero,
+no mouse driver was initialized,
 .bP
-It returns an error if a mouse event was detected which did not match the
-current \fImousemask\fP.
+the mask of reportable events is zero,
 .bP
-It also returns an error if no more events remain in the queue.
-.TP 5
-\fB\%ungetmouse\fP
-returns an error if the FIFO is full.
-.RE
+a mouse event was detected that does not match the mask,
+.bP
+or if no more events remain in the queue.
+.PP
+\fB\%ungetmouse\fP returns an error if the event queue is full.
 .PP
 \fB\%mousemask\fP
 returns the mask of reportable events.
-- 
2.30.2

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]