- <EM>Name</EM> <EM>Description</EM>
- ---------------------------------------------------------------------
- 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
- ---------------------------------------------------------------------
- BUTTON2_PRESSED mouse button 2 down
- BUTTON2_RELEASED mouse button 2 up
- BUTTON2_CLICKED mouse button 2 clicked
- BUTTON2_DOUBLE_CLICKED mouse button 2 double clicked
- BUTTON2_TRIPLE_CLICKED mouse button 2 triple clicked
- ---------------------------------------------------------------------
- BUTTON3_PRESSED mouse button 3 down
-
- BUTTON3_RELEASED mouse button 3 up
- BUTTON3_CLICKED mouse button 3 clicked
- BUTTON3_DOUBLE_CLICKED mouse button 3 double clicked
- BUTTON3_TRIPLE_CLICKED mouse button 3 triple clicked
- ---------------------------------------------------------------------
- BUTTON4_PRESSED mouse button 4 down
- BUTTON4_RELEASED mouse button 4 up
- BUTTON4_CLICKED mouse button 4 clicked
- BUTTON4_DOUBLE_CLICKED mouse button 4 double clicked
- BUTTON4_TRIPLE_CLICKED mouse button 4 triple clicked
- ---------------------------------------------------------------------
- BUTTON5_PRESSED mouse button 5 down
- BUTTON5_RELEASED mouse button 5 up
- BUTTON5_CLICKED mouse button 5 clicked
- BUTTON5_DOUBLE_CLICKED mouse button 5 double clicked
- BUTTON5_TRIPLE_CLICKED mouse button 5 triple clicked
- ---------------------------------------------------------------------
- BUTTON_SHIFT shift was down during button state change
- BUTTON_CTRL control was down during button state change
- BUTTON_ALT alt was down during button state change
- ALL_MOUSE_EVENTS report all button state changes
- REPORT_MOUSE_POSITION report mouse movement
- ---------------------------------------------------------------------
-
- Once a class of mouse events have 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
- queued. To read the event data and pop the event off the
- queue, call <STRONG>getmouse</STRONG>. This function will return <STRONG>OK</STRONG> if a
- mouse event is actually visible in the given window, <STRONG>ERR</STRONG>
- otherwise. When <STRONG>getmouse</STRONG> returns <STRONG>OK</STRONG>, the data deposited
- as y and x in the event structure coordinates will be
- screen-relative character-cell coordinates. The returned
- state mask will have exactly one bit set to indicate the
- event type. The corresponding data in the queue is marked
- invalid. A subsequent call to <STRONG>getmouse</STRONG> will retrieve the
- next older item from the queue.
-
- 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.
-
- The <STRONG>wenclose</STRONG> function tests whether a given pair of
- screen-relative character-cell coordinates is enclosed by
- a given window, returning TRUE if it is and FALSE other-
- wise. It is useful for determining what subset of the
- screen windows enclose the location of a mouse event.
-
- 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. Please remem-
- ber, that stdscr-relative coordinates are not always iden-
- tical to window-relative coordinates due to the mechanism
- to reserve lines on top or bottom of the screen for other
- purposes (see the <STRONG>ripoffline()</STRONG> and <STRONG>slk_init</STRONG> calls, for ex-
- ample). 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
- the window <STRONG>win</STRONG>. They are converted to window-relative co-
- ordinates and returned through the pointers. If the con-
- version was successful, the function returns <STRONG>TRUE</STRONG>. If one
- of the parameters was NULL or the location is not inside
- the window, <STRONG>FALSE</STRONG> is returned. If <STRONG>to_screen</STRONG> is <STRONG>FALSE</STRONG>, the
- pointers <STRONG>pY,</STRONG> <STRONG>pX</STRONG> must reference window-relative coordi-
- nates. They are converted to stdscr-relative coordinates
- if the window <STRONG>win</STRONG> encloses this point. In this case the
- function returns <STRONG>TRUE</STRONG>. If one of the parameters is NULL
- or the point is not inside the window, <STRONG>FALSE</STRONG> is returned.
- Please notice, that the referenced coordinates are only
- replaced by the converted coordinates if the transforma-
- tion was successful.
-
- The <STRONG>mouse_trafo</STRONG> function performs the same translation as
- <STRONG>wmouse_trafo</STRONG>, using stdscr for <STRONG>win</STRONG>.
-
- 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
- <STRONG>mouseinterval(0)</STRONG> to disable click resolution. This func-
- tion returns the previous interval value. Use <STRONG>mouseinter-</STRONG>
- <STRONG>val(-1)</STRONG> to obtain the interval without altering it. The
- default is one sixth of a second.
-
- The <STRONG>has_mouse</STRONG> function returns TRUE if the mouse driver
- has been successfully initialized.
-
- 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 <STRONG>get-</STRONG>
- <STRONG>str</STRONG> that expects a linefeed for input-loop termination.
+ <STRONG>Name</STRONG> <STRONG>Description</STRONG>
+ ------------------------------------------------------------------------
+ <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
+ ------------------------------------------------------------------------
+ <STRONG>BUTTON2_PRESSED</STRONG> mouse button 2 down
+ <STRONG>BUTTON2_RELEASED</STRONG> mouse button 2 up
+ <STRONG>BUTTON2_CLICKED</STRONG> mouse button 2 clicked
+ <STRONG>BUTTON2_DOUBLE_CLICKED</STRONG> mouse button 2 double clicked
+ <STRONG>BUTTON2_TRIPLE_CLICKED</STRONG> mouse button 2 triple clicked
+ ------------------------------------------------------------------------
+ <STRONG>BUTTON3_PRESSED</STRONG> mouse button 3 down
+ <STRONG>BUTTON3_RELEASED</STRONG> mouse button 3 up
+ <STRONG>BUTTON3_CLICKED</STRONG> mouse button 3 clicked
+ <STRONG>BUTTON3_DOUBLE_CLICKED</STRONG> mouse button 3 double clicked
+ <STRONG>BUTTON3_TRIPLE_CLICKED</STRONG> mouse button 3 triple clicked
+ ------------------------------------------------------------------------
+ <STRONG>BUTTON4_PRESSED</STRONG> mouse button 4 down
+ <STRONG>BUTTON4_RELEASED</STRONG> mouse button 4 up
+ <STRONG>BUTTON4_CLICKED</STRONG> mouse button 4 clicked
+ <STRONG>BUTTON4_DOUBLE_CLICKED</STRONG> mouse button 4 double clicked
+ <STRONG>BUTTON4_TRIPLE_CLICKED</STRONG> mouse button 4 triple clicked
+ ------------------------------------------------------------------------
+ <STRONG>BUTTON5_PRESSED</STRONG> mouse button 5 down
+ <STRONG>BUTTON5_RELEASED</STRONG> mouse button 5 up
+ <STRONG>BUTTON5_CLICKED</STRONG> mouse button 5 clicked
+ <STRONG>BUTTON5_DOUBLE_CLICKED</STRONG> mouse button 5 double clicked
+ <STRONG>BUTTON5_TRIPLE_CLICKED</STRONG> mouse button 5 triple clicked
+ ------------------------------------------------------------------------
+ <STRONG>BUTTON_SHIFT</STRONG> shift was down during button state change
+ <STRONG>BUTTON_CTRL</STRONG> control was down during button state change
+ <STRONG>BUTTON_ALT</STRONG> alt was down during button state change
+ <STRONG>ALL_MOUSE_EVENTS</STRONG> report all button state changes
+ <STRONG>REPORT_MOUSE_POSITION</STRONG> report mouse movement
+ ------------------------------------------------------------------------
+
+
+</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 return <STRONG>KEY_MOUSE</STRONG> as an indicator
+ that a mouse event has been queued. To read the event data and pop the
+ event off the queue, call <STRONG>getmouse</STRONG>. This function will return <STRONG>OK</STRONG> if a
+ mouse event is actually visible in the given window, <STRONG>ERR</STRONG> otherwise.
+ When <STRONG>getmouse</STRONG> returns <STRONG>OK</STRONG>, the data deposited as y and x in the event
+ structure coordinates will be screen-relative character-cell
+ coordinates. The returned state mask will have exactly one bit set to
+ indicate the event type. The corresponding data in the queue is marked
+ invalid. A subsequent call to <STRONG>getmouse</STRONG> will retrieve the next older
+ item from the queue.
+
+
+</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 associates with that event
+ the given state data and screen-relative character-cell coordinates.
+
+
+</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> otherwise. It is useful for determining what
+ subset of the screen windows enclose the location of a mouse event.
+
+ If the parameter is a pad, <STRONG>wenclose</STRONG> uses the most recent screen
+ coordinates used for this pad in <STRONG><A HREF="curs_pad.3x.html">prefresh(3x)</A></STRONG> or <STRONG><A HREF="curs_pad.3x.html">pnoutrefresh(3x)</A></STRONG>.
+
+
+</PRE><H3><a name="h3-wmouse_trafo">wmouse_trafo</a></H3><PRE>
+ The <STRONG>wmouse_trafo</STRONG> function transforms a given pair of coordinates from
+ <STRONG>stdscr</STRONG>-relative coordinates to coordinates relative to the given window
+ or vice versa. The resulting <STRONG>stdscr</STRONG>-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
+ <STRONG><A HREF="curs_kernel.3x.html">ripoffline(3x)</A></STRONG> and <STRONG><A HREF="curs_slk.3x.html">slk_init(3x)</A></STRONG> calls, for example).
+
+ <STRONG>o</STRONG> If the parameter <EM>to</EM><STRONG>_</STRONG><EM>screen</EM> is <STRONG>TRUE</STRONG>, the pointers <EM>pY,</EM> <EM>pX</EM> must
+ reference the coordinates of a location inside the window <EM>win</EM>.
+ They are converted to <STRONG>stdscr</STRONG>-relative coordinates and returned
+ through the pointers. If the conversion was successful, the
+ function returns <STRONG>TRUE</STRONG>.
+
+ If one of the parameters was <STRONG>NULL</STRONG> or the location is not inside the
+ window, <STRONG>FALSE</STRONG> is returned.
+
+ <STRONG>o</STRONG> If <EM>to</EM><STRONG>_</STRONG><EM>screen</EM> is <STRONG>FALSE</STRONG>, the pointers <EM>pY,</EM> <EM>pX</EM> must reference
+ <STRONG>stdscr</STRONG>-relative coordinates. They are converted to window-relative
+ coordinates if the window <EM>win</EM> encloses this point. In this case
+ the function returns <STRONG>TRUE</STRONG>.
+
+ If one of the parameters is <STRONG>NULL</STRONG> or the point is not inside the
+ window, <STRONG>FALSE</STRONG> is returned.
+
+ The referenced coordinates are only replaced by the converted
+ coordinates if the transformation was successful.
+
+
+</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 <STRONG>stdscr</STRONG> for <EM>win</EM>.
+
+
+</PRE><H3><a name="h3-mouseinterval">mouseinterval</a></H3><PRE>
+ The <STRONG>mouseinterval</STRONG> function sets the maximum time (in thousandths 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
+ release events separated by more than the mouse interval as a "long
+ press", or, with motion, as a "drag".
+
+ Calling <STRONG>mouseinterval(0)</STRONG> disables click resolution. When <EM>ncurses</EM>
+ 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
+ activity (which would happen with a zero interval), then no click
+ resolution will occur.