-- sale, use or other dealings in this Software without prior written --
-- authorization. --
-------------------------------------------------------------------------------
--- $Id: NEWS,v 1.4078 2024/02/10 23:48:51 tom Exp $
+-- $Id: NEWS,v 1.4081 2024/02/17 22:44:28 tom Exp $
-------------------------------------------------------------------------------
This is a log of changes that ncurses has gone through since Zeyd started
Changes through 1.9.9e did not credit all contributions;
it is not possible to add this information.
+20240217
+ + add vt100+noapp, vt100+noapp+pc, xterm+app+pc, xterm+decedit from
+ xterm #389 -TD
+ + fix inconsistent description of wmouse_trafo() (Debian #1059778).
+ + modify wenclose() to handle pads (Debian #1059783).
+ + improve manpage discussion of mouseinterval() (Debian #1058560).
+
20240210
+ compiler-warning fixes, while investigating an optimizer bug in
"gcc (MacPorts gcc13 13.2.0_4+stdlib_flag) 13.2.0"
-5:0:10 6.4 20240210
+5:0:10 6.4 20240217
# use or other dealings in this Software without prior written #
# authorization. #
##############################################################################
-# $Id: dist.mk,v 1.1597 2024/02/10 12:26:54 tom Exp $
+# $Id: dist.mk,v 1.1598 2024/02/17 11:23:23 tom Exp $
# Makefile for creating ncurses distributions.
#
# This only needs to be used directly as a makefile by developers, but
# These define the major/minor/patch versions of ncurses.
NCURSES_MAJOR = 6
NCURSES_MINOR = 4
-NCURSES_PATCH = 20240210
+NCURSES_PATCH = 20240217
# We don't append the patch to the version, since this only applies to releases
VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
<!--
* t
****************************************************************************
- * Copyright 2018-2022,2023 Thomas E. Dickey *
+ * Copyright 2018-2023,2024 Thomas E. Dickey *
* Copyright 1998-2016,2017 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* sale, use or other dealings in this Software without prior written *
* authorization. *
****************************************************************************
- * @Id: curs_getch.3x,v 1.77 2023/12/23 16:36:18 tom Exp @
+ * @Id: curs_getch.3x,v 1.78 2024/02/17 19:27:03 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_getch 3x 2023-12-23 ncurses 6.4 Library calls</TITLE>
+<TITLE>curs_getch 3x 2024-02-17 ncurses 6.4 Library calls</TITLE>
<link rel="author" href="mailto:bug-ncurses@gnu.org">
</HEAD>
<BODY>
-<H1 class="no-header">curs_getch 3x 2023-12-23 ncurses 6.4 Library calls</H1>
+<H1 class="no-header">curs_getch 3x 2024-02-17 ncurses 6.4 Library calls</H1>
<PRE>
<STRONG><A HREF="curs_getch.3x.html">curs_getch(3x)</A></STRONG> Library calls <STRONG><A HREF="curs_getch.3x.html">curs_getch(3x)</A></STRONG>
returns <STRONG>ERR</STRONG> if there is no more room in the FIFO.
<STRONG>wgetch</STRONG>
- returns <STRONG>ERR</STRONG> if the window pointer is null, or if its timeout
- expires without having any data, or if the execution was
- interrupted by a signal (<STRONG>errno</STRONG> will be set to <STRONG>EINTR</STRONG>).
+ returns <STRONG>ERR</STRONG>
- Functions with a "mv" prefix first perform a cursor movement using
+ <STRONG>o</STRONG> if the window pointer is null, or
+
+ <STRONG>o</STRONG> if its timeout expires without having any data, or
+
+ <STRONG>o</STRONG> if the execution was interrupted by a signal (<STRONG>errno</STRONG> will be
+ set to <STRONG>EINTR</STRONG>).
+
+ Functions with a "mv" prefix first perform a cursor movement using
<STRONG>wmove</STRONG>, and return an error if the position is outside the window, or if
the window pointer is null.
</PRE><H2><a name="h2-NOTES">NOTES</a></H2><PRE>
- Use of the escape key by a programmer for a single character function
- is discouraged, as it will cause a delay of up to one second while the
+ Use of the escape key by a programmer for a single character function
+ is discouraged, as it will cause a delay of up to one second while the
keypad code looks for a following function-key sequence.
- Some keys may be the same as commonly used control keys, e.g.,
+ Some keys may be the same as commonly used control keys, e.g.,
<STRONG>KEY_ENTER</STRONG> versus control/M, <STRONG>KEY_BACKSPACE</STRONG> versus control/H. Some
curses implementations may differ according to whether they treat these
- control keys specially (and ignore the terminfo), or use the terminfo
- definitions. <EM>ncurses</EM> uses the terminfo definition. If it says that
- <STRONG>KEY_ENTER</STRONG> is control/M, <STRONG>getch</STRONG> will return <STRONG>KEY_ENTER</STRONG> when you press
+ control keys specially (and ignore the terminfo), or use the terminfo
+ definitions. <EM>ncurses</EM> uses the terminfo definition. If it says that
+ <STRONG>KEY_ENTER</STRONG> is control/M, <STRONG>getch</STRONG> will return <STRONG>KEY_ENTER</STRONG> when you press
control/M.
- Generally, <STRONG>KEY_ENTER</STRONG> denotes the character(s) sent by the <EM>Enter</EM> key on
+ Generally, <STRONG>KEY_ENTER</STRONG> denotes the character(s) sent by the <EM>Enter</EM> key on
the numeric keypad:
<STRONG>o</STRONG> the terminal description lists the most useful keys,
- <STRONG>o</STRONG> the <EM>Enter</EM> key on the regular keyboard is already handled by the
+ <STRONG>o</STRONG> the <EM>Enter</EM> key on the regular keyboard is already handled by the
standard ASCII characters for carriage-return and line-feed,
<STRONG>o</STRONG> depending on whether <STRONG>nl</STRONG> or <STRONG>nonl</STRONG> was called, pressing "Enter" on the
- regular keyboard may return either a carriage-return or line-feed,
+ regular keyboard may return either a carriage-return or line-feed,
and finally
<STRONG>o</STRONG> "Enter or send" is the standard description for this key.
- When using <STRONG>getch</STRONG>, <STRONG>wgetch</STRONG>, <STRONG>mvgetch</STRONG>, or <STRONG>mvwgetch</STRONG>, nocbreak mode
- (<STRONG>nocbreak</STRONG>) and echo mode (<STRONG>echo</STRONG>) should not be used at the same time.
- Depending on the state of the tty driver when each character is typed,
+ When using <STRONG>getch</STRONG>, <STRONG>wgetch</STRONG>, <STRONG>mvgetch</STRONG>, or <STRONG>mvwgetch</STRONG>, nocbreak mode
+ (<STRONG>nocbreak</STRONG>) and echo mode (<STRONG>echo</STRONG>) should not be used at the same time.
+ Depending on the state of the tty driver when each character is typed,
the program may produce undesirable results.
Note that <STRONG>getch</STRONG>, <STRONG>mvgetch</STRONG>, and <STRONG>mvwgetch</STRONG> may be macros.
- Historically, the set of keypad macros was largely defined by the
- extremely function-key-rich keyboard of the AT&T 7300, aka 3B1, aka
- Safari 4. Modern personal computers usually have only a small subset
- of these. IBM PC-style consoles typically support little more than
- <STRONG>KEY_UP</STRONG>, <STRONG>KEY_DOWN</STRONG>, <STRONG>KEY_LEFT</STRONG>, <STRONG>KEY_RIGHT</STRONG>, <STRONG>KEY_HOME</STRONG>, <STRONG>KEY_END</STRONG>, <STRONG>KEY_NPAGE</STRONG>,
- <STRONG>KEY_PPAGE</STRONG>, and function keys 1 through 12. The Ins key is usually
+ Historically, the set of keypad macros was largely defined by the
+ extremely function-key-rich keyboard of the AT&T 7300, aka 3B1, aka
+ Safari 4. Modern personal computers usually have only a small subset
+ of these. IBM PC-style consoles typically support little more than
+ <STRONG>KEY_UP</STRONG>, <STRONG>KEY_DOWN</STRONG>, <STRONG>KEY_LEFT</STRONG>, <STRONG>KEY_RIGHT</STRONG>, <STRONG>KEY_HOME</STRONG>, <STRONG>KEY_END</STRONG>, <STRONG>KEY_NPAGE</STRONG>,
+ <STRONG>KEY_PPAGE</STRONG>, and function keys 1 through 12. The Ins key is usually
mapped to <STRONG>KEY_IC</STRONG>.
</PRE><H2><a name="h2-EXTENSIONS">EXTENSIONS</a></H2><PRE>
- <STRONG>has_key</STRONG> was designed for <STRONG><A HREF="ncurses.3x.html">ncurses(3x)</A></STRONG>, and is not found in SVr4 <EM>curses</EM>,
+ <STRONG>has_key</STRONG> was designed for <STRONG><A HREF="ncurses.3x.html">ncurses(3x)</A></STRONG>, and is not found in SVr4 <EM>curses</EM>,
4.4BSD <EM>curses</EM>, or any other previous curses implementation.
Applications employing <EM>ncurses</EM> extensions should condition their use on
the visibility of the <STRONG>NCURSES_VERSION</STRONG> preprocessor macro.
- X/Open Curses, Issue 4, Version 2, describes <STRONG>getch</STRONG>, <STRONG>wgetch</STRONG>, <STRONG>mvgetch</STRONG>,
- <STRONG>mvwgetch</STRONG>, and <STRONG>ungetch</STRONG>. They read single-byte characters only. The
- standard specifies that they return <STRONG>ERR</STRONG> on failure, but describes no
+ X/Open Curses, Issue 4, Version 2, describes <STRONG>getch</STRONG>, <STRONG>wgetch</STRONG>, <STRONG>mvgetch</STRONG>,
+ <STRONG>mvwgetch</STRONG>, and <STRONG>ungetch</STRONG>. They read single-byte characters only. The
+ standard specifies that they return <STRONG>ERR</STRONG> on failure, but describes no
failure conditions.
- The echo behavior of these functions on input of <STRONG>KEY_</STRONG> or backspace
- characters was not specified in the SVr4 documentation. This
+ The echo behavior of these functions on input of <STRONG>KEY_</STRONG> or backspace
+ characters was not specified in the SVr4 documentation. This
description is adapted from X/Open Curses.
The behavior of <STRONG>getch</STRONG> and friends in the presence of signal handlers is
unspecified in the SVr4 documentation and X/Open Curses. Under
- historical curses implementations, it varied depending on whether the
- operating system's dispatch of a signal to a handler interrupts a
- <STRONG>read(2)</STRONG> call in progress or not, and also (in some implementations)
+ historical curses implementations, it varied depending on whether the
+ operating system's dispatch of a signal to a handler interrupts a
+ <STRONG>read(2)</STRONG> call in progress or not, and also (in some implementations)
whether an input timeout or non-blocking mode has been set.
<STRONG>KEY_MOUSE</STRONG> is mentioned in X/Open Curses, along with a few related <EM>term-</EM>
- <EM>info</EM> capabilities, but no higher-level functions use the feature. The
+ <EM>info</EM> capabilities, but no higher-level functions use the feature. The
implementation in <EM>ncurses</EM> is an extension.
- <STRONG>KEY_RESIZE</STRONG> is an extension first implemented for <EM>ncurses.</EM> NetBSD
+ <STRONG>KEY_RESIZE</STRONG> is an extension first implemented for <EM>ncurses.</EM> NetBSD
<EM>curses</EM> later added this extension.
- Programmers concerned about portability should be prepared for either
- of two cases: (a) signal receipt does not interrupt <STRONG>getch</STRONG>; (b) signal
- receipt interrupts <STRONG>getch</STRONG> and causes it to return <STRONG>ERR</STRONG> with <STRONG>errno</STRONG> set to
+ Programmers concerned about portability should be prepared for either
+ of two cases: (a) signal receipt does not interrupt <STRONG>getch</STRONG>; (b) signal
+ receipt interrupts <STRONG>getch</STRONG> and causes it to return <STRONG>ERR</STRONG> with <STRONG>errno</STRONG> set to
<STRONG>EINTR</STRONG>.
- The <STRONG>has_key</STRONG> function is unique to <EM>ncurses</EM>. We recommend that any code
+ The <STRONG>has_key</STRONG> function is unique to <EM>ncurses</EM>. We recommend that any code
using it be conditionalized on the <STRONG>NCURSES_VERSION</STRONG> feature macro.
<STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="curs_inopts.3x.html">curs_inopts(3x)</A></STRONG>, <STRONG><A HREF="curs_mouse.3x.html">curs_mouse(3x)</A></STRONG>, <STRONG><A HREF="curs_move.3x.html">curs_move(3x)</A></STRONG>,
<STRONG><A HREF="curs_outopts.3x.html">curs_outopts(3x)</A></STRONG>, <STRONG><A HREF="curs_refresh.3x.html">curs_refresh(3x)</A></STRONG>, <STRONG><A HREF="curs_variables.3x.html">curs_variables(3x)</A></STRONG>, <STRONG><A HREF="resizeterm.3x.html">resizeterm(3x)</A></STRONG>
- Comparable functions in the wide-character (ncursesw) library are
+ Comparable functions in the wide-character (ncursesw) library are
described in <STRONG><A HREF="curs_get_wch.3x.html">curs_get_wch(3x)</A></STRONG>.
-ncurses 6.4 2023-12-23 <STRONG><A HREF="curs_getch.3x.html">curs_getch(3x)</A></STRONG>
+ncurses 6.4 2024-02-17 <STRONG><A HREF="curs_getch.3x.html">curs_getch(3x)</A></STRONG>
</PRE>
<div class="nav">
<ul>
* sale, use or other dealings in this Software without prior written *
* authorization. *
****************************************************************************
- * @Id: curs_mouse.3x,v 1.86 2024/01/13 22:05:39 tom Exp @
+ * @Id: curs_mouse.3x,v 1.89 2024/02/17 21:43:03 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-01-13 ncurses 6.4 Library calls</TITLE>
+<TITLE>curs_mouse 3x 2024-02-17 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-01-13 ncurses 6.4 Library calls</H1>
+<H1 class="no-header">curs_mouse 3x 2024-02-17 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>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
+ 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 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><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 window-relative coordinates and returned
- through the pointers. If the conversion was successful, the
+ 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>ripoffline</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>.
- <STRONG>o</STRONG> If one of the parameters was <STRONG>NULL</STRONG> or the location is not inside the
+ 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 window-
- relative coordinates. They are converted to <STRONG>stdscr</STRONG>-relative
- coordinates if the window <EM>win</EM> encloses this point. In this case
+ <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>.
- <STRONG>o</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.
+ 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>
</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
- recognized as a click. Use <STRONG>mouseinterval(0)</STRONG> to disable click
- resolution. This function returns the previous interval value. Use
- <STRONG>mouseinterval(-1)</STRONG> to obtain the interval without altering it. The
- default is one sixth of a second.
+ resolved as a click.
+
+ Calling <STRONG>mouseinterval(0)</STRONG> 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
+ activity (which would happen with a zero interval), then no click
+ resolution will occur.
+
+ This function returns the previous interval value. Use
+ <STRONG>mouseinterval(-1)</STRONG> to obtain the interval without altering it.
+
+ The mouse interval is set to one sixth of a second when the
+ corresponding screen is initialized, e.g., in <STRONG><A HREF="curs_initscr.3x.html">initscr(3x)</A></STRONG> or
+ <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
+ The <STRONG>has_mouse</STRONG> function returns <STRONG>TRUE</STRONG> if the mouse driver has been
successfully initialized, and <STRONG>FALSE</STRONG> otherwise.
- 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>getstr</STRONG> that expects a linefeed for input-
- loop termination.
+ 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>mousemask</STRONG> returns the mask of reportable events.
- <STRONG>mouseinterval</STRONG> returns the previous interval value, unless the terminal
- was not initialized. In that case, it returns the maximum interval
+ <STRONG>mouseinterval</STRONG> returns the previous interval value, unless the terminal
+ was not initialized. In that case, it returns the maximum interval
value (166).
</PRE><H2><a name="h2-NOTES">NOTES</a></H2><PRE>
- The order of the <STRONG>MEVENT</STRONG> structure members is not guaranteed.
+ 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
If you are using an unsupported configuration, mouse events will not be
visible to <EM>ncurses</EM> (and the <STRONG>mousemask</STRONG> function will always return <STRONG>0</STRONG>).
- If the <EM>terminfo</EM> entry contains a <STRONG>XM</STRONG> string, this is used in the <EM>xterm</EM>
- mouse driver to control the way the terminal is initialized for mouse
- operation. The default, if <STRONG>XM</STRONG> is not found, corresponds to private
+ If the <EM>terminfo</EM> entry contains a <STRONG>XM</STRONG> string, this is used in the <EM>xterm</EM>
+ mouse driver to control the way the terminal is initialized for mouse
+ operation. The default, if <STRONG>XM</STRONG> is not found, corresponds to private
mode 1000 of <EM>xterm:</EM>
\E[?1000%?%p1%{1}%=%th%el%;
\E[?1006;1000%?%p1%{1}%=%th%el%;
- The <EM>z</EM> member in the event structure is not presently used. It is
- intended for use with touch screens (which may be pressure-sensitive)
+ The <EM>z</EM> member in the event structure is not presently used. It is
+ intended for use with touch screens (which may be pressure-sensitive)
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
- position reports as a sequence of presses of buttons 4 or 5 without
+ 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
+ position reports as a sequence of presses of buttons 4 or 5 without
matching button-releases.
</PRE><H2><a name="h2-EXTENSIONS">EXTENSIONS</a></H2><PRE>
- These functions were designed for <STRONG><A HREF="ncurses.3x.html">ncurses(3x)</A></STRONG>, and are not found in
- SVr4 <EM>curses</EM>, 4.4BSD <EM>curses</EM>, or any other previous curses
- implementation. (SVr4 <EM>curses</EM> did have a <EM>getmouse</EM> function, which took
+ These functions were designed for <STRONG><A HREF="ncurses.3x.html">ncurses(3x)</A></STRONG>, and are not found in
+ SVr4 <EM>curses</EM>, 4.4BSD <EM>curses</EM>, or any other previous curses
+ implementation. (SVr4 <EM>curses</EM> did have a <EM>getmouse</EM> function, which took
no argument and returned a different type.)
</PRE><H2><a name="h2-PORTABILITY">PORTABILITY</a></H2><PRE>
Applications employing the <EM>ncurses</EM> mouse extension should condition its
- use on the visibility of the <STRONG>NCURSES_MOUSE_VERSION</STRONG> preprocessor macro.
- When the interface changes, the macro's value increments. Multiple
- versions are available when <EM>ncurses</EM> is configured; see section
+ use on the visibility of the <STRONG>NCURSES_MOUSE_VERSION</STRONG> preprocessor macro.
+ When the interface changes, the macro's value increments. Multiple
+ versions are available when <EM>ncurses</EM> is configured; see section
"ALTERNATE CONFIGURATIONS" of <STRONG><A HREF="ncurses.3x.html">ncurses(3x)</A></STRONG>. The following values may be
specified.
1 has definitions for reserved events. The mask uses 28 bits.
- 2 adds definitions for button 5, removes the definitions for
+ 2 adds definitions for button 5, removes the definitions for
reserved events. The mask uses 29 bits.
- SVr4 <EM>curses</EM> had support for the mouse in a variant of <STRONG>xterm(1)</STRONG>. It is
+ SVr4 <EM>curses</EM> had support for the mouse in a variant of <STRONG>xterm(1)</STRONG>. It is
mentioned in a few places, with little supporting documentation.
- <STRONG>o</STRONG> Its "libcurses" manual page lists functions for this feature
+ <STRONG>o</STRONG> Its "libcurses" manual page lists functions for this feature
prototyped in <EM>curses.h</EM>.
extern int mouse_set(long int);
<STRONG>mouse_info</STRONG> <STRONG>minfo</STRONG> <STRONG>Mi</STRONG> Mouse status information
<STRONG>req_mouse_pos</STRONG> <STRONG>reqmp</STRONG> <STRONG>RQ</STRONG> Request mouse position report
- <STRONG>o</STRONG> The interface made assumptions (as does <EM>ncurses</EM>) about the escape
+ <STRONG>o</STRONG> The interface made assumptions (as does <EM>ncurses</EM>) about the escape
sequences sent to and received from the terminal.
For instance, the SVr4 <EM>curses</EM> library used the <STRONG>get_mouse</STRONG> capability
- to tell the terminal which mouse button events it should send,
- passing the mouse-button bit mask to the terminal. Also, it could
- ask the terminal where the mouse was using the <STRONG>req_mouse_pos</STRONG>
+ to tell the terminal which mouse button events it should send,
+ passing the mouse-button bit mask to the terminal. Also, it could
+ ask the terminal where the mouse was using the <STRONG>req_mouse_pos</STRONG>
capability.
- Those features required a terminal program that had been modified
+ 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>
- 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
+ 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
- use video terminals, making it unnecessary to be concerned about
+ 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.
</PRE><H2><a name="h2-BUGS">BUGS</a></H2><PRE>
- Mouse events from <EM>xterm</EM> are <EM>not</EM> ignored in cooked mode if they have
- been enabled by <STRONG>mousemask</STRONG>. Instead, the <EM>xterm</EM> mouse report sequence
+ Mouse events from <EM>xterm</EM> are <EM>not</EM> ignored in cooked mode if they have
+ been enabled by <STRONG>mousemask</STRONG>. Instead, the <EM>xterm</EM> mouse report sequence
appears in the string read.
- Mouse event reports from <EM>xterm</EM> 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 <EM>terminfo</EM> capability <STRONG>kmous</STRONG>
- to "\E[M" (the beginning of the response from <EM>xterm</EM> for mouse clicks).
+ Mouse event reports from <EM>xterm</EM> 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 <EM>terminfo</EM> capability <STRONG>kmous</STRONG>
+ to "\E[M" (the beginning of the response from <EM>xterm</EM> for mouse clicks).
Other values of <STRONG>kmous</STRONG> 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 <EM>xterm</EM> mouse protocol, <EM>ncurses</EM> assumes that if
+ terminals supporting the <EM>xterm</EM> mouse protocol, <EM>ncurses</EM> assumes that if
<STRONG>kmous</STRONG> is defined in the terminal description, or if the terminal type's
- primary name or aliases contain the string "xterm", then the terminal
+ primary name or aliases contain the string "xterm", then the terminal
may send mouse events. The <STRONG>kmous</STRONG> capability is checked first, allowing
use of newer <EM>xterm</EM> mouse protocols, such as its private mode 1006.
</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_inopts.3x.html">curs_inopts(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><A HREF="curs_variables.3x.html">curs_variables(3x)</A></STRONG>
+ <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="curs_inopts.3x.html">curs_inopts(3x)</A></STRONG>, <STRONG><A HREF="curs_kernel.3x.html">curs_kernel(3x)</A></STRONG>, <STRONG><A HREF="curs_pad.3x.html">curs_pad(3x)</A></STRONG>,
+ <STRONG><A HREF="curs_slk.3x.html">curs_slk(3x)</A></STRONG>, <STRONG><A HREF="curs_variables.3x.html">curs_variables(3x)</A></STRONG>
-ncurses 6.4 2024-01-13 <STRONG><A HREF="curs_mouse.3x.html">curs_mouse(3x)</A></STRONG>
+ncurses 6.4 2024-02-17 <STRONG><A HREF="curs_mouse.3x.html">curs_mouse(3x)</A></STRONG>
</PRE>
<div class="nav">
<ul>
method of updating character screens with reasonable optimization.
This implementation is "new curses" (<EM>ncurses</EM>) and is the approved
replacement for 4.4BSD classic curses, which has been discontinued.
- This describes <EM>ncurses</EM> version 6.4 (patch 20240120).
+ This describes <EM>ncurses</EM> version 6.4 (patch 20240217).
The <EM>ncurses</EM> library emulates the curses library of System V Release 4
Unix ("SVr4"), and XPG4 (X/Open Portability Guide) curses (also known
<!--
****************************************************************************
- * Copyright 2018-2021,2023 Thomas E. Dickey *
+ * Copyright 2018-2023,2024 Thomas E. Dickey *
* Copyright 2008-2016,2017 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* sale, use or other dealings in this Software without prior written *
* authorization. *
****************************************************************************
- * @Id: tabs.1,v 1.54 2024/01/20 16:54:03 tom Exp @
+ * @Id: tabs.1,v 1.55 2024/01/20 16:54:03 tom Exp @
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<HTML>
have, by specifying how to perform screen operations, and by specifying
padding requirements and initialization sequences.
- This manual describes <EM>ncurses</EM> version 6.4 (patch 20240120).
+ This manual describes <EM>ncurses</EM> version 6.4 (patch 20240217).
</PRE><H3><a name="h3-terminfo-Entry-Syntax"><EM>terminfo</EM> Entry Syntax</a></H3><PRE>
'\" t
.\"***************************************************************************
-.\" Copyright 2018-2022,2023 Thomas E. Dickey *
+.\" Copyright 2018-2023,2024 Thomas E. Dickey *
.\" Copyright 1998-2016,2017 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_getch.3x,v 1.77 2023/12/23 16:36:18 tom Exp $
-.TH curs_getch 3X 2023-12-23 "ncurses 6.4" "Library calls"
+.\" $Id: curs_getch.3x,v 1.78 2024/02/17 19:27:03 tom Exp $
+.TH curs_getch 3X 2024-02-17 "ncurses 6.4" "Library calls"
.ie \n(.g \{\
.ds `` \(lq
.ds '' \(rq
.TP
\fBwgetch\fP
returns \fBERR\fP
+.RS
+.bP
if the window pointer is null, or
+.bP
if its timeout expires without having any data, or
+.bP
if the execution was interrupted by a signal (\fBerrno\fP will be set to
\fBEINTR\fP).
.RE
+.RE
.PP
Functions with a \*(``mv\*('' prefix first perform a cursor movement using
\fBwmove\fP, and return an error if the position is outside the window,
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_mouse.3x,v 1.86 2024/01/13 22:05:39 tom Exp $
-.TH curs_mouse 3X 2024-01-13 "ncurses 6.4" "Library calls"
+.\" $Id: curs_mouse.3x,v 1.89 2024/02/17 21:43:03 tom Exp $
+.TH curs_mouse 3X 2024-02-17 "ncurses 6.4" "Library calls"
.ie \n(.g \{\
.ds `` \(lq
.ds '' \(rq
if it is and \fBFALSE\fP otherwise.
It is useful for determining what subset of
the screen windows enclose the location of a mouse event.
+.PP
+If the parameter is a pad,
+\fB\%wenclose\fP uses the most recent screen coordinates used for
+this pad in
+\fP\%prefresh\fP(3X) or
+\fP\%pnoutrefresh\fP(3X).
.SS wmouse_trafo
The \fB\%wmouse_trafo\fP function transforms a given pair of coordinates
from \fB\%stdscr\fP-relative coordinates
to coordinates relative to the given window or vice versa.
The resulting \fB\%stdscr\fP-relative coordinates are not always
-identical to window-relative coordinates due to the mechanism to reserve
+identical to screen 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
\fIpY, pX\fP must reference the coordinates of a location
inside the window \fIwin\fP.
-They are converted to window-relative coordinates and returned
+They are converted to \fB\%stdscr\fP-relative coordinates and returned
through the pointers.
If the conversion was successful, the function returns \fBTRUE\fP.
-.bP
+.IP
If one of the parameters was \fBNULL\fP or the location is
not inside the window, \fBFALSE\fP is returned.
.bP
If \fIto_screen\fP is
-\fBFALSE\fP, the pointers \fIpY, pX\fP must reference window-relative
-coordinates.
-They are converted to \fB\%stdscr\fP-relative coordinates if the
+\fBFALSE\fP, the pointers \fIpY, pX\fP must reference
+\fB\%stdscr\fP-relative coordinates.
+They are converted to window-relative coordinates if the
window \fIwin\fP encloses this point.
In this case the function returns \fBTRUE\fP.
-.bP
+.IP
If one of the parameters is \fBNULL\fP or the point is not inside the
window, \fBFALSE\fP is returned.
+.PP
The referenced coordinates
are only replaced by the converted coordinates if the transformation was
successful.
as \fB\%wmouse_trafo\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
-be recognized as a click.
-Use \fB\%mouseinterval(0)\fP to disable click resolution.
+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
+be resolved as a click.
+.PP
+Calling \fB\%mouseinterval(0)\fP 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 activity
+(which would happen with a zero interval),
+then no click resolution will occur.
+.PP
This function returns the previous interval value.
Use \fB\%mouseinterval(\-1)\fP to obtain the interval without altering it.
-The default is one sixth of a second.
+.PP
+The mouse interval is set to one sixth of a second
+when the corresponding screen is initialized,
+e.g., in \fBinitscr\fP(3X) or \fBsetupterm\fP(3X).
.SS has_mouse
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
+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 \fB\%getstr\fP that expects a linefeed for input-loop
termination.
\fB\%curses\fP(3X),
\fB\%curs_inopts\fP(3X),
\fB\%curs_kernel\fP(3X),
+\fB\%curs_pad\fP(3X),
\fB\%curs_slk\fP(3X),
\fB\%curs_variables\fP(3X)
-# $Id: manhtml.aliases,v 1.31 2023/12/31 00:46:44 tom Exp $
+# $Id: manhtml.aliases,v 1.32 2024/02/17 21:58:32 tom Exp $
#***************************************************************************
-# Copyright 2019-2022,2023 Thomas E. Dickey *
+# Copyright 2019-2023,2024 Thomas E. Dickey *
# Copyright 2013,2017 Free Software Foundation, Inc. *
# *
# Permission is hereby granted, free of charge, to any person obtaining a *
mvwin(3X) curs_window(3X)
newterm(3X) curs_initscr(3X)
newwin(3X) curs_window(3X)
+pnoutrefresh(3X) curs_pad(3X)
+prefresh(3X) curs_pad(3X)
putwin(3X) curs_util(3X)
refresh(3X) curs_refresh(3X)
reset_shell_mode(3X) curs_kernel(3X)
# Report bugs and new terminal descriptions to
# bug-ncurses@gnu.org
#
-# $Revision: 1.1137 $
-# $Date: 2024/01/27 21:52:22 $
+# $Revision: 1.1140 $
+# $Date: 2024/02/11 20:09:01 $
#
# The original header is preserved below for reference. It is noted that there
# is a "newer" version which differs in some cosmetic details (but actually
kf42=\E[63~, kf5=\E[15~, kf6=\E[17~, kf7=\E[18~,
kf8=\E[19~, kf9=\E[20~,
+vt100+noapp|fragment with cursor keys in normal mode,
+ kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A,
+ use=vt100+noapp+pc,
+
xterm+noapp|fragment with cursor keys in normal mode,
kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kend=\E[F,
khome=\E[H,
xterm+app|fragment with cursor keys in application mode,
- kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, kend=\EOF,
- khome=\EOH,
+ kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA,
+ use=xterm+app+pc,
+
+vt100+noapp+pc|fragment for noapp pc-style home/end,
+ kend=\E[F, khome=\E[H,
+
+xterm+app+pc|fragment for app pc-style home/end,
+ kend=\EOF, khome=\EOH,
#
# The "PC-style" modifier scheme was introduced in xterm patch #94 (1999/3/27)
# and revised in xterm patch #167 (2002/8/24). Some other terminal emulators
xterm+edit|fragment for 6-key editing-keypad,
use=xterm+pc+edit, use=vt220+pcedit,
+xterm+decedit|fragment for vt220 6-key editing-keypad,
+ kdch1=\E[3~, kich1=\E[2~, knp=\E[6~, kpp=\E[5~,
+ use=xterm+vt+edit,
+
xterm+pc+edit|fragment for pc-style editing keypad,
kend=\E[4~, khome=\E[1~,
# to trim -TD
# + NetBSD-related fixes for x68k and wsvt52 (patch by Thomas Klausner)
#
+# 2024-02011
+# + add vt100+noapp, vt100+noapp+pc, xterm+app+pc, xterm+decedit from
+# xterm #389 -TD
+#
######## SHANTIH! SHANTIH! SHANTIH!
/****************************************************************************
- * Copyright 2018-2022,2023 Thomas E. Dickey *
+ * Copyright 2018-2023,2024 Thomas E. Dickey *
* Copyright 1998-2016,2017 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
#define CUR SP_TERMTYPE
#endif
-MODULE_ID("$Id: lib_mouse.c,v 1.199 2023/05/27 20:13:10 tom Exp $")
+MODULE_ID("$Id: lib_mouse.c,v 1.200 2024/02/17 21:13:01 tom Exp $")
#include <tic.h>
{
bool result = FALSE;
- T((T_CALLED("_nc_mouse_init(%p)"), (void *)sp));
+ T((T_CALLED("_nc_mouse_init(%p)"), (void *) sp));
if (sp != 0) {
if (!sp->_mouse_initialized) {
if (win != 0) {
y -= win->_yoffset;
- result = ((win->_begy <= y &&
- win->_begx <= x &&
- (win->_begx + win->_maxx) >= x &&
- (win->_begy + win->_maxy) >= y) ? TRUE : FALSE);
+ if (IS_PAD(win)) {
+ if (win->_pad._pad_y >= 0 &&
+ win->_pad._pad_x >= 0 &&
+ win->_pad._pad_top >= 0 &&
+ win->_pad._pad_left >= 0 &&
+ win->_pad._pad_right >= 0 &&
+ win->_pad._pad_bottom >= 0) {
+ result = ((win->_pad._pad_top <= y &&
+ win->_pad._pad_left <= x &&
+ win->_pad._pad_right >= x &&
+ win->_pad._pad_bottom >= y) ? TRUE : FALSE);
+ }
+ } else {
+ result = ((win->_begy <= y &&
+ win->_begx <= x &&
+ (win->_begx + win->_maxx) >= x &&
+ (win->_begy + win->_maxy) >= y) ? TRUE : FALSE);
+ }
}
returnBool(result);
}
int y = *pY;
int x = *pX;
+ T(("transform input %d,%d", y, x));
if (to_screen) {
y += win->_begy + win->_yoffset;
x += win->_begx;
if (result) {
*pX = x;
*pY = y;
+ T(("output transform %d,%d", y, x));
}
}
returnBool(result);
-ncurses6 (6.4+20240210) unstable; urgency=low
+ncurses6 (6.4+20240217) unstable; urgency=low
* latest weekly patch
- -- Thomas E. Dickey <dickey@invisible-island.net> Sat, 10 Feb 2024 07:26:54 -0500
+ -- Thomas E. Dickey <dickey@invisible-island.net> Sat, 17 Feb 2024 06:23:23 -0500
ncurses6 (5.9+20131005) unstable; urgency=low
-ncurses6 (6.4+20240210) unstable; urgency=low
+ncurses6 (6.4+20240217) unstable; urgency=low
* latest weekly patch
- -- Thomas E. Dickey <dickey@invisible-island.net> Sat, 10 Feb 2024 07:26:54 -0500
+ -- Thomas E. Dickey <dickey@invisible-island.net> Sat, 17 Feb 2024 06:23:23 -0500
ncurses6 (5.9+20131005) unstable; urgency=low
-ncurses6 (6.4+20240210) unstable; urgency=low
+ncurses6 (6.4+20240217) unstable; urgency=low
* latest weekly patch
- -- Thomas E. Dickey <dickey@invisible-island.net> Sat, 10 Feb 2024 07:26:54 -0500
+ -- Thomas E. Dickey <dickey@invisible-island.net> Sat, 17 Feb 2024 06:23:23 -0500
ncurses6 (5.9+20120608) unstable; urgency=low
-; $Id: mingw-ncurses.nsi,v 1.632 2024/02/10 12:26:54 tom Exp $\r
+; $Id: mingw-ncurses.nsi,v 1.633 2024/02/17 11:23:23 tom Exp $\r
\r
; TODO add examples\r
; TODO bump ABI to 6\r
!define VERSION_MAJOR "6"\r
!define VERSION_MINOR "4"\r
!define VERSION_YYYY "2024"\r
-!define VERSION_MMDD "0210"\r
+!define VERSION_MMDD "0217"\r
!define VERSION_PATCH ${VERSION_YYYY}${VERSION_MMDD}\r
\r
!define MY_ABI "5"\r
Summary: shared libraries for terminal handling
Name: mingw32-ncurses6
Version: 6.4
-Release: 20240210
+Release: 20240217
License: X11
Group: Development/Libraries
URL: https://invisible-island.net/ncurses/
Summary: shared libraries for terminal handling
Name: ncurses6
Version: 6.4
-Release: 20240210
+Release: 20240217
License: X11
Group: Development/Libraries
URL: https://invisible-island.net/ncurses/
Summary: Curses library with POSIX thread support.
Name: ncursest6
Version: 6.4
-Release: 20240210
+Release: 20240217
License: X11
Group: Development/Libraries
Source: ncurses-%{version}-%{release}.tgz