X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=doc%2Fhtml%2Fman%2Fcurs_mouse.3x.html;h=de0d7be9bec1c8fae077bf4131476e9b3f6bc11c;hp=167ed4ff0b83b67c03b38d5b90eb7278804cfc01;hb=HEAD;hpb=a1c9e77bebcdf278d9c290a97c82961e159cd896 diff --git a/doc/html/man/curs_mouse.3x.html b/doc/html/man/curs_mouse.3x.html index 167ed4ff..1b266fd4 100644 --- a/doc/html/man/curs_mouse.3x.html +++ b/doc/html/man/curs_mouse.3x.html @@ -28,19 +28,19 @@ * sale, use or other dealings in this Software without prior written * * authorization. * **************************************************************************** - * @Id: curs_mouse.3x,v 1.89 2024/02/17 21:43:03 tom Exp @ + * @Id: curs_mouse.3x,v 1.99 2024/05/11 20:39:53 tom Exp @ -->
-curs_mouse(3x) Library calls curs_mouse(3x) @@ -65,11 +65,11 @@ bool has_mouse(void); + mmask_t mousemask(mmask_t newmask, mmask_t *oldmask); + int getmouse(MEVENT *event); int ungetmouse(MEVENT *event); - mmask_t mousemask(mmask_t newmask, mmask_t *oldmask); - bool wenclose(const WINDOW *win, int y, int x); bool mouse_trafo(int* pY, int* pX, bool to_screen); @@ -85,6 +85,16 @@ wgetch(3x) input stream. +
+ The has_mouse function returns TRUE if the mouse driver has been + successfully initialized, and FALSE otherwise. + + Mouse events are ignored when input is in cooked mode, and cause an + error beep when cooked mode is being simulated in a window by a + function such as getstr that expects a linefeed for input-loop + termination. + +
To make mouse events visible, use the mousemask function. This sets the mouse events to be reported. By default, no mouse events are @@ -99,7 +109,7 @@ o If oldmask is non-NULL, this function fills the indicated location with the previous value of the current screen's mouse event mask. - As a side effect, setting a zero mousemask may turn off the mouse + As a side effect, setting a zero mouse mask may turn off the mouse pointer; setting a nonzero mask may turn it on. Whether this happens is device-dependent. @@ -112,7 +122,6 @@ BUTTON1_PRESSED mouse button 1 down BUTTON1_RELEASED mouse button 1 up BUTTON1_CLICKED mouse button 1 clicked - BUTTON1_DOUBLE_CLICKED mouse button 1 double clicked BUTTON1_TRIPLE_CLICKED mouse button 1 triple clicked ------------------------------------------------------------------------ @@ -184,7 +193,7 @@ or vice versa. The resulting stdscr-relative coordinates are not always identical to screen coordinates due to the mechanism to reserve lines on top or bottom of the screen for other purposes (see the - ripoffline and slk_init(3x) calls, for example). + ripoffline(3x) and slk_init(3x) calls, for example). o If the parameter to_screen is TRUE, the pointers pY, pX must reference the coordinates of a location inside the window win. @@ -215,9 +224,11 @@
The mouseinterval function sets the maximum time (in thousands of a second) that can elapse between press and release events for them to be - resolved as a click. + resolved as a click. An application might interpret button press and + release events separated by more than the mouse interval as a "long + press", or, with motion, as a "drag". - Calling mouseinterval(0) disables click resolution. When ncurses + Calling mouseinterval(0) disables click resolution. When ncurses detects a mouse event, it awaits further input activity up to this interval, and then checks for a subsequent mouse event which can be combined with the first event. If the timeout expires without input @@ -232,16 +243,6 @@ setupterm(3x). -
- The has_mouse function returns TRUE if the mouse driver has been - successfully initialized, and FALSE otherwise. - - Mouse events are ignored when input is in cooked mode, and cause an - error beep when cooked mode is being simulated in a window by a - function such as getstr that expects a linefeed for input-loop - termination. - -
has_mouse, wenclose, mouse_trafo, and wmouse_trafo return TRUE or FALSE as noted above. @@ -271,7 +272,7 @@ The order of the MEVENT structure members is not guaranteed. Additional fields may be added to the structure in the future. - Under ncurses, these calls are implemented using either xterm's built- + Under ncurses, these calls are implemented using either xterm's built- in mouse-tracking API or platform-specific drivers including o Alessandro Rubini's gpm server @@ -299,7 +300,7 @@ or with 3D-mice/trackballs/power gloves. The ALL_MOUSE_EVENTS class does not include REPORT_MOUSE_POSITION. - They are distinct. For example, in xterm, wheel/scrolling mice send + They are distinct. For example, in xterm, wheel/scrolling mice send position reports as a sequence of presses of buttons 4 or 5 without matching button-releases. @@ -356,13 +357,13 @@ capability. Those features required a terminal program that had been modified - to work with SVr4 curses. They were not part of the X Consortium's - xterm. + to work with SVr4 curses. They were not part of the X Consortium's + xterm. When developing the xterm mouse support for ncurses in September 1995, Eric Raymond was uninterested in using the same interface due to its lack of documentation. Later, in 1998, Mark Hesseling provided support - in PDCurses 2.3 using the SVr4 interface. PDCurses, however, does not + in PDCurses 2.3 using the SVr4 interface. PDCurses, however, does not use video terminals, making it unnecessary to be concerned about compatibility with the escape sequences. @@ -372,12 +373,12 @@ been enabled by mousemask. Instead, the xterm mouse report sequence appears in the string read. - Mouse event reports from xterm are not detected correctly in a window - with keypad application mode disabled, since they are interpreted as a - variety of function key. Set the terminal's terminfo capability kmous - to "\E[M" (the beginning of the response from xterm for mouse clicks). - Other values of kmous are permitted under the same assumption, that is, - the report begins with that sequence. + An ncurses window must enable keypad(3x) to correctly receive mouse + event reports from xterm since they are encoded like function keys. + Set the terminal's terminfo capability kmous to "\E[M" (the beginning + of the response from xterm for mouse clicks). Other values of kmous + are permitted under the same assumption, that is, the report begins + with that sequence. Because there are no standard response sequences that serve to identify terminals supporting the xterm mouse protocol, ncurses assumes that if @@ -393,7 +394,7 @@ -ncurses 6.4 2024-02-17 curs_mouse(3x) +ncurses 6.5 2024-05-11 curs_mouse(3x)