* sale, use or other dealings in this Software without prior written *
* authorization. *
****************************************************************************
- * @Id: curs_mouse.3x,v 1.92 2024/02/24 19:54:30 tom Exp @
+ * @Id: curs_mouse.3x,v 1.98 2024/04/20 19:02:07 tom Exp @
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="generator" content="Manpage converted by man2html - see https://invisible-island.net/scripts/readme.html#others_scripts">
-<TITLE>curs_mouse 3x 2024-02-24 ncurses 6.4 Library calls</TITLE>
+<TITLE>curs_mouse 3x 2024-04-20 ncurses 6.4 Library calls</TITLE>
<link rel="author" href="mailto:bug-ncurses@gnu.org">
</HEAD>
<BODY>
-<H1 class="no-header">curs_mouse 3x 2024-02-24 ncurses 6.4 Library calls</H1>
+<H1 class="no-header">curs_mouse 3x 2024-04-20 ncurses 6.4 Library calls</H1>
<PRE>
<STRONG><A HREF="curs_mouse.3x.html">curs_mouse(3x)</A></STRONG> Library calls <STRONG><A HREF="curs_mouse.3x.html">curs_mouse(3x)</A></STRONG>
<STRONG>bool</STRONG> <STRONG>has_mouse(void);</STRONG>
+ <STRONG>mmask_t</STRONG> <STRONG>mousemask(mmask_t</STRONG> <EM>newmask</EM><STRONG>,</STRONG> <STRONG>mmask_t</STRONG> <STRONG>*</STRONG><EM>oldmask</EM><STRONG>);</STRONG>
+
<STRONG>int</STRONG> <STRONG>getmouse(MEVENT</STRONG> <STRONG>*</STRONG><EM>event</EM><STRONG>);</STRONG>
<STRONG>int</STRONG> <STRONG>ungetmouse(MEVENT</STRONG> <STRONG>*</STRONG><EM>event</EM><STRONG>);</STRONG>
- <STRONG>mmask_t</STRONG> <STRONG>mousemask(mmask_t</STRONG> <EM>newmask</EM><STRONG>,</STRONG> <STRONG>mmask_t</STRONG> <STRONG>*</STRONG><EM>oldmask</EM><STRONG>);</STRONG>
-
<STRONG>bool</STRONG> <STRONG>wenclose(const</STRONG> <STRONG>WINDOW</STRONG> <STRONG>*</STRONG><EM>win</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <EM>y</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <EM>x</EM><STRONG>);</STRONG>
<STRONG>bool</STRONG> <STRONG>mouse_trafo(int*</STRONG> <EM>pY</EM><STRONG>,</STRONG> <STRONG>int*</STRONG> <EM>pX</EM><STRONG>,</STRONG> <STRONG>bool</STRONG> <EM>to</EM><STRONG>_</STRONG><EM>screen</EM><STRONG>);</STRONG>
<STRONG><A HREF="curs_getch.3x.html">wgetch(3x)</A></STRONG> input stream.
+</PRE><H3><a name="h3-has_mouse">has_mouse</a></H3><PRE>
+ The <STRONG>has_mouse</STRONG> function returns <STRONG>TRUE</STRONG> if the mouse driver has been
+ successfully initialized, and <STRONG>FALSE</STRONG> 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 <STRONG>getstr</STRONG> that expects a linefeed for input-loop
+ termination.
+
+
</PRE><H3><a name="h3-mousemask">mousemask</a></H3><PRE>
To make mouse events visible, use the <STRONG>mousemask</STRONG> function. This sets
the mouse events to be reported. By default, no mouse events are
<STRONG>BUTTON1_PRESSED</STRONG> mouse button 1 down
<STRONG>BUTTON1_RELEASED</STRONG> mouse button 1 up
<STRONG>BUTTON1_CLICKED</STRONG> mouse button 1 clicked
-
<STRONG>BUTTON1_DOUBLE_CLICKED</STRONG> mouse button 1 double clicked
<STRONG>BUTTON1_TRIPLE_CLICKED</STRONG> mouse button 1 triple clicked
------------------------------------------------------------------------
</PRE><H3><a name="h3-mouseinterval">mouseinterval</a></H3><PRE>
The <STRONG>mouseinterval</STRONG> 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 <EM>click.</EM> An application might interpret button press and
+ resolved as a <EM>click</EM>. 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".
<STRONG><A HREF="curs_terminfo.3x.html">setupterm(3x)</A></STRONG>.
-</PRE><H3><a name="h3-has_mouse">has_mouse</a></H3><PRE>
- The <STRONG>has_mouse</STRONG> function returns <STRONG>TRUE</STRONG> if the mouse driver has been
- successfully initialized, and <STRONG>FALSE</STRONG> 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 <STRONG>getstr</STRONG> that expects a linefeed for input-loop
- termination.
-
-
</PRE><H2><a name="h2-RETURN-VALUE">RETURN VALUE</a></H2><PRE>
<STRONG>has_mouse</STRONG>, <STRONG>wenclose</STRONG>, <STRONG>mouse_trafo</STRONG>, and <STRONG>wmouse_trafo</STRONG> return <STRONG>TRUE</STRONG> or <STRONG>FALSE</STRONG>
as noted above.
The order of the <STRONG>MEVENT</STRONG> structure members is not guaranteed.
Additional fields may be added to the structure in the future.
- Under <EM>ncurses,</EM> these calls are implemented using either <EM>xterm</EM>'s built-
+ Under <EM>ncurses</EM>, these calls are implemented using either <EM>xterm</EM>'s built-
in mouse-tracking API or platform-specific drivers including
<STRONG>o</STRONG> Alessandro Rubini's gpm server
or with 3D-mice/trackballs/power gloves.
The <STRONG>ALL_MOUSE_EVENTS</STRONG> class does not include <STRONG>REPORT_MOUSE_POSITION</STRONG>.
- They are distinct. For example, in <EM>xterm,</EM> wheel/scrolling mice send
+ They are distinct. For example, in <EM>xterm</EM>, wheel/scrolling mice send
position reports as a sequence of presses of buttons 4 or 5 without
matching button-releases.
capability.
Those features required a terminal program that had been modified
- to work with SVr4 <EM>curses.</EM> They were not part of the X Consortium's
- <EM>xterm.</EM>
+ to work with SVr4 <EM>curses</EM>. They were not part of the X Consortium's
+ <EM>xterm</EM>.
When developing the <EM>xterm</EM> mouse support for <EM>ncurses</EM> 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 <EM>PDCurses</EM> 2.3 using the SVr4 interface. <EM>PDCurses,</EM> however, does not
+ in <EM>PDCurses</EM> 2.3 using the SVr4 interface. <EM>PDCurses</EM>, however, does not
use video terminals, making it unnecessary to be concerned about
compatibility with the escape sequences.
-ncurses 6.4 2024-02-24 <STRONG><A HREF="curs_mouse.3x.html">curs_mouse(3x)</A></STRONG>
+ncurses 6.4 2024-04-20 <STRONG><A HREF="curs_mouse.3x.html">curs_mouse(3x)</A></STRONG>
</PRE>
<div class="nav">
<ul>
<li><a href="#h2-SYNOPSIS">SYNOPSIS</a></li>
<li><a href="#h2-DESCRIPTION">DESCRIPTION</a>
<ul>
+<li><a href="#h3-has_mouse">has_mouse</a></li>
<li><a href="#h3-mousemask">mousemask</a></li>
<li><a href="#h3-Mouse-Events">Mouse Events</a></li>
<li><a href="#h3-getmouse">getmouse</a></li>
<li><a href="#h3-wmouse_trafo">wmouse_trafo</a></li>
<li><a href="#h3-mouse_trafo">mouse_trafo</a></li>
<li><a href="#h3-mouseinterval">mouseinterval</a></li>
-<li><a href="#h3-has_mouse">has_mouse</a></li>
</ul>
</li>
<li><a href="#h2-RETURN-VALUE">RETURN VALUE</a></li>