<!--
* t
****************************************************************************
- * Copyright (c) 1998-2014,2015 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2015,2017 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
* sale, use or other dealings in this Software without prior written *
* authorization. *
****************************************************************************
- * @Id: curs_mouse.3x,v 1.42 2015/07/21 09:27:39 tom Exp @
+ * @Id: curs_mouse.3x,v 1.43 2017/01/07 19:25:15 tom Exp @
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<HTML>
-</PRE>
-<H2><a name="h2-NAME">NAME</a></H2><PRE>
+</PRE><H2><a name="h2-NAME">NAME</a></H2><PRE>
<STRONG>has_mouse</STRONG>, <STRONG>getmouse</STRONG>, <STRONG>ungetmouse</STRONG>, <STRONG>mousemask</STRONG>, <STRONG>wenclose</STRONG>,
<STRONG>mouse_trafo</STRONG>, <STRONG>wmouse_trafo</STRONG>, <STRONG>mouseinterval</STRONG> - mouse interface
through curses
-</PRE>
-<H2><a name="h2-SYNOPSIS">SYNOPSIS</a></H2><PRE>
+</PRE><H2><a name="h2-SYNOPSIS">SYNOPSIS</a></H2><PRE>
<STRONG>#include</STRONG> <STRONG><curses.h></STRONG>
<STRONG>typedef</STRONG> <STRONG>unsigned</STRONG> <STRONG>long</STRONG> <STRONG>mmask_t;</STRONG>
<STRONG>int</STRONG> <STRONG>mouseinterval(int</STRONG> <EM>erval</EM><STRONG>);</STRONG>
-</PRE>
-<H2><a name="h2-DESCRIPTION">DESCRIPTION</a></H2><PRE>
+</PRE><H2><a name="h2-DESCRIPTION">DESCRIPTION</a></H2><PRE>
These functions provide an interface to mouse events from
<STRONG><A HREF="ncurses.3x.html">ncurses(3x)</A></STRONG>. Mouse events are represented by <STRONG>KEY_MOUSE</STRONG>
- pseudo-key values in the <STRONG>wgetch</STRONG> input stream.
+ pseudo-key values in the <STRONG><A HREF="curs_getch.3x.html">wgetch(3x)</A></STRONG> input stream.
-</PRE>
-<H3><a name="h3-mousemask">mousemask</a></H3><PRE>
+</PRE><H3><a name="h3-mousemask">mousemask</a></H3><PRE>
To make mouse events visible, use the <STRONG>mousemask</STRONG> function.
This will set the mouse events to be reported. By de-
fault, no mouse events are reported. The function will
Whether this happens is device-dependent.
-</PRE>
-<H3><a name="h3-Mouse-events">Mouse events</a></H3><PRE>
+</PRE><H3><a name="h3-Mouse-events">Mouse events</a></H3><PRE>
Here are the mouse event type masks which may be defined:
<EM>Name</EM> <EM>Description</EM>
---------------------------------------------------------------------
-</PRE>
-<H3><a name="h3-getmouse">getmouse</a></H3><PRE>
+</PRE><H3><a name="h3-getmouse">getmouse</a></H3><PRE>
Once a class of mouse events has been made visible in a
window, calling the <STRONG>wgetch</STRONG> function on that window may re-
turn <STRONG>KEY_MOUSE</STRONG> as an indicator that a mouse event has been
next older item from the queue.
-</PRE>
-<H3><a name="h3-ungetmouse">ungetmouse</a></H3><PRE>
+</PRE><H3><a name="h3-ungetmouse">ungetmouse</a></H3><PRE>
The <STRONG>ungetmouse</STRONG> function behaves analogously to <STRONG>ungetch</STRONG>.
It pushes a <STRONG>KEY_MOUSE</STRONG> event onto the input queue, and as-
sociates with that event the given state data and screen-
relative character-cell coordinates.
-</PRE>
-<H3><a name="h3-wenclose">wenclose</a></H3><PRE>
+</PRE><H3><a name="h3-wenclose">wenclose</a></H3><PRE>
The <STRONG>wenclose</STRONG> function tests whether a given pair of
screen-relative character-cell coordinates is enclosed by
a given window, returning <STRONG>TRUE</STRONG> if it is and <STRONG>FALSE</STRONG> other-
screen windows enclose the location of a mouse event.
-</PRE>
-<H3><a name="h3-wmouse_trafo">wmouse_trafo</a></H3><PRE>
+</PRE><H3><a name="h3-wmouse_trafo">wmouse_trafo</a></H3><PRE>
The <STRONG>wmouse_trafo</STRONG> function transforms a given pair of coor-
dinates from stdscr-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 re-
serve lines on top or bottom of the screen for other pur-
- poses (see the <STRONG>ripoffline</STRONG> and <STRONG>slk_init</STRONG> calls, for exam-
- ple).
+ poses (see the <STRONG>ripoffline</STRONG> and <STRONG><A HREF="curs_slk.3x.html">slk_init(3x)</A></STRONG> calls, for ex-
+ ample).
<STRONG>o</STRONG> If the parameter <STRONG>to_screen</STRONG> is <STRONG>TRUE</STRONG>, the pointers <STRONG>pY,</STRONG>
<STRONG>pX</STRONG> must reference the coordinates of a location inside
nates if the transformation was successful.
-</PRE>
-<H3><a name="h3-mouse_trafo">mouse_trafo</a></H3><PRE>
+</PRE><H3><a name="h3-mouse_trafo">mouse_trafo</a></H3><PRE>
The <STRONG>mouse_trafo</STRONG> function performs the same translation as
<STRONG>wmouse_trafo</STRONG>, using stdscr for <STRONG>win</STRONG>.
-</PRE>
-<H3><a name="h3-mouseinterval">mouseinterval</a></H3><PRE>
+</PRE><H3><a name="h3-mouseinterval">mouseinterval</a></H3><PRE>
The <STRONG>mouseinterval</STRONG> function sets the maximum time (in thou-
sands of a second) that can elapse between press and re-
lease events for them to be recognized as a click. Use
default is one sixth of a second.
-</PRE>
-<H3><a name="h3-has_mouse">has_mouse</a></H3><PRE>
+</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.
<STRONG>str</STRONG> that expects a linefeed for input-loop termination.
-</PRE>
-<H2><a name="h2-RETURN-VALUE">RETURN VALUE</a></H2><PRE>
+</PRE><H2><a name="h2-RETURN-VALUE">RETURN VALUE</a></H2><PRE>
<STRONG>getmouse</STRONG> and <STRONG>ungetmouse</STRONG> return the integer <STRONG>ERR</STRONG> upon fail-
ure or <STRONG>OK</STRONG> upon successful completion:
<STRONG>TRUE</STRONG> or <STRONG>FALSE</STRONG> depending on their test result.
-</PRE>
-<H2><a name="h2-PORTABILITY">PORTABILITY</a></H2><PRE>
+</PRE><H2><a name="h2-PORTABILITY">PORTABILITY</a></H2><PRE>
These calls were designed for <STRONG><A HREF="ncurses.3x.html">ncurses(3x)</A></STRONG>, and are not
found in SVr4 curses, 4.4BSD curses, or any other previous
version of curses.
ton-releases.
-</PRE>
-<H2><a name="h2-BUGS">BUGS</a></H2><PRE>
+</PRE><H2><a name="h2-BUGS">BUGS</a></H2><PRE>
Mouse events under xterm will not in fact be ignored dur-
ing cooked mode, if they have been enabled by <STRONG>mousemask</STRONG>.
Instead, the xterm mouse report sequence will appear in
events.
-</PRE>
-<H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
+</PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
<STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="curs_kernel.3x.html">curs_kernel(3x)</A></STRONG>, <STRONG><A HREF="curs_slk.3x.html">curs_slk(3x)</A></STRONG>, <STRONG>curs_vari-</STRONG>
<STRONG><A HREF="curs_variables.3x.html">ables(3x)</A></STRONG>.