blob: 9aaa7adf54bf535f8d6865af8231ca7023c9ae1d [file] [log] [blame]
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301'\" t
2.\"***************************************************************************
micky3879b9f5e72025-07-08 18:04:53 -04003.\" Copyright 2018-2023,2024 Thomas E. Dickey *
4.\" Copyright 1998-2015,2017 Free Software Foundation, Inc. *
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05305.\" *
6.\" Permission is hereby granted, free of charge, to any person obtaining a *
7.\" copy of this software and associated documentation files (the *
8.\" "Software"), to deal in the Software without restriction, including *
9.\" without limitation the rights to use, copy, modify, merge, publish, *
10.\" distribute, distribute with modifications, sublicense, and/or sell *
11.\" copies of the Software, and to permit persons to whom the Software is *
12.\" furnished to do so, subject to the following conditions: *
13.\" *
14.\" The above copyright notice and this permission notice shall be included *
15.\" in all copies or substantial portions of the Software. *
16.\" *
17.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
18.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
19.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
20.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
21.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
22.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
23.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
24.\" *
25.\" Except as contained in this notice, the name(s) of the above copyright *
26.\" holders shall not be used in advertising or otherwise to promote the *
27.\" sale, use or other dealings in this Software without prior written *
28.\" authorization. *
29.\"***************************************************************************
30.\"
micky3879b9f5e72025-07-08 18:04:53 -040031.\" $Id: ncurses.3x,v 1.214 2024/04/27 17:55:43 tom Exp $
32.TH ncurses 3X 2024-04-27 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls"
33.ie \n(.g \{\
34.ds `` \(lq
35.ds '' \(rq
36.\}
37.el \{\
38.ie t .ds `` ``
39.el .ds `` ""
40.ie t .ds '' ''
41.el .ds '' ""
42.\}
43.
Steve Kondikae271bc2015-11-15 02:50:53 +010044.de bP
micky3879b9f5e72025-07-08 18:04:53 -040045.ie n .IP \(bu 4
46.el .IP \(bu 2
Steve Kondikae271bc2015-11-15 02:50:53 +010047..
micky3879b9f5e72025-07-08 18:04:53 -040048.
49.\" Add supplementary paragraph tag on its own line after TP.
50.\" Adapted from TQ (which would produce mandoc warnings).
51.de tQ
52. br
53. ns
54. TP
55..
56.
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053057.ds d @TERMINFO@
58.SH NAME
micky3879b9f5e72025-07-08 18:04:53 -040059\fB\%ncurses\fP \-
60character-cell terminal interface with optimized output
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053061.SH SYNOPSIS
micky3879b9f5e72025-07-08 18:04:53 -040062.nf
63\fB#include <curses.h>
64.fi
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053065.SH DESCRIPTION
micky3879b9f5e72025-07-08 18:04:53 -040066The \*(``new curses\*('' library offers the programmer a
67terminal-independent means of reading keyboard and mouse input and
68updating character-cell terminals with output optimized to minimize
69screen updates.
70.I \%ncurses
71replaces the
72.I curses
73libraries from
74System V Release 4 Unix (\*(``SVr4\*('')
75and
764.4BSD Unix,
77the development of which ceased in the 1990s.
78This document describes
79.I \%ncurses
80version @NCURSES_MAJOR@.@NCURSES_MINOR@
81(patch @NCURSES_PATCH@).
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053082.PP
micky3879b9f5e72025-07-08 18:04:53 -040083.I \%ncurses
84permits control of the terminal screen's contents;
85abstraction and subdivision thereof with
86.I windows
87and
88.IR pads ;
89the reading of terminal input;
90control of terminal input and output options;
91environment query routines;
92color manipulation;
93the definition and use of
94.I "soft label"
95keys;
96.I \%term\%info
97capability access;
98a
99.I termcap
100compatibility interface;
101and an abstraction of the system's API for manipulating the terminal
102(such as \fI\%termios\fP(3)).
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530103.PP
micky3879b9f5e72025-07-08 18:04:53 -0400104.I \%ncurses
105implements the standard interface described by
106X/Open Curses Issue\ 7.
107In many behavioral details not standardized by X/Open,
108.I \%ncurses
109emulates the
110.I curses
111library of SVr4 and provides numerous useful extensions.
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530112.PP
micky3879b9f5e72025-07-08 18:04:53 -0400113.I \%ncurses
114man pages employ several sections to clarify matters of usage and
115interoperability with other
116.I curses
117implementations.
118.bP
119\*(``NOTES\*('' describes issues and caveats of which any user of the
120.I \%ncurses
121API should be aware,
122such as limitations on the size of an underlying integral type or the
123availability of a preprocessor macro exclusive of a function definition
124(which prevents its address from being taken).
125This section also describes implementation details that will be
126significant to the programmer but which are not standardized.
127.bP
128\*(``EXTENSIONS\*('' presents
129.I \%ncurses
130innovations beyond the X/Open Curses standard and/or the SVr4
131.I curses
132implementation.
133They are termed
134.I extensions
135to indicate that they cannot be implemented solely by using the library
136API,
137but require access to the library's internal state.
138.bP
139\*(``PORTABILITY\*('' discusses matters
140(beyond the exercise of extensions)
141that should be considered when writing to a
142.I curses
143standard,
144or for multiple implementations.
145.bP
146\*(``HISTORY\*('' examines points of detail in
147.I \%ncurses
148and other
149.I curses
150implementations over the decades of their development,
151particularly where precedent or inertia have frustrated better design
152(and,
153in a few cases,
154where such inertia has been overcome).
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530155.PP
micky3879b9f5e72025-07-08 18:04:53 -0400156A
157.I curses
158application must be linked with the library;
159use the
160.B \-lncurses
161option to your compiler or linker.
162A debugging version of the library may be available;
163if so,
164link with it using
165.BR \-lncurses_g .
166(Your system integrator may have installed these libraries such that you
167can use the options
168.B \-lcurses
169and
170.BR \-lcurses_g ,
171respectively.)
172The
173.I \%ncurses_g
174library generates trace logs
175(in a file called
176.I \%trace
177in the current directory)
178that describe
179.I \%ncurses
180actions.
181See section \*(``ALTERNATE CONFIGURATIONS\*('' below.
182.SS "Application Structure"
183A
184.I curses
185application uses information from the system locale;
186\fI\%setlocale\fP(3) prepares it for
187.I curses
188library calls.
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530189.PP
micky3879b9f5e72025-07-08 18:04:53 -0400190.RS 4
191.EX
192setlocale(LC_ALL, "");
193.EE
194.RE
195.PP
196If the locale is not thus initialized,
197the library assumes that characters are printable as in ISO\ 8859-1,
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530198to work with certain legacy programs.
micky3879b9f5e72025-07-08 18:04:53 -0400199You should initialize the locale;
200do not expect consistent behavior from the library when the locale has
201not been set up.
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530202.PP
micky3879b9f5e72025-07-08 18:04:53 -0400203\fB\%initscr\fP(3X) or \fB\%newterm\fP(3X)
204must be called to initialize
205.I curses
206before use of any functions that deal with windows and screens.
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530207.PP
micky3879b9f5e72025-07-08 18:04:53 -0400208To get character-at-a-time input without echoing\(emmost interactive,
209screen-oriented programs want this\(emuse the following sequence.
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530210.PP
micky3879b9f5e72025-07-08 18:04:53 -0400211.RS 4
212.EX
213initscr(); cbreak(); noecho();
214.EE
215.RE
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530216.PP
micky3879b9f5e72025-07-08 18:04:53 -0400217Most applications perform further setup as follows.
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530218.PP
micky3879b9f5e72025-07-08 18:04:53 -0400219.RS 4
220.EX
221intrflush(stdscr, FALSE);
222keypad(stdscr, TRUE);
223.EE
224.RE
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530225.PP
micky3879b9f5e72025-07-08 18:04:53 -0400226A
227.I curses
228program then often enters an event loop of some sort.
229Call \fB\%endwin\fP(3X) before exiting.
230.SS Overview
231A
232.I curses
233library abstracts the terminal screen by representing all or part of it
234as a
235.I \%WINDOW
236data structure.
237A
238.I window
239is a rectangular grid of character cells,
240addressed by row and column coordinates
241.RI ( y ,
242.IR x ),
243with the upper left corner as (0, 0).
244A window called
245.BR \%stdscr ,
246the same size as the terminal screen,
247is always available.
248Create others with \fB\%newwin\fP(3X).
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530249.PP
micky3879b9f5e72025-07-08 18:04:53 -0400250A
251.I curses
252library does not manage overlapping windows
253(but see below).
254You can either use
255.B \%stdscr
256to manage one screen-filling window,
257or tile the screen into non-overlapping windows and not use
258.B \%stdscr
259at all.
260Mixing the two approaches will result in unpredictable and undesired
261effects.
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530262.PP
micky3879b9f5e72025-07-08 18:04:53 -0400263Functions permit manipulation of a window and the
264.I cursor
265identifying the cell within it at which the next output operation will
266occur.
267Among those,
268the most basic are \fB\%move\fP(3X) and \fB\%addch\fP(3X):
269these place the cursor and write a character to
270.BR \%stdscr ,
271respectively.
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530272.PP
micky3879b9f5e72025-07-08 18:04:53 -0400273Frequent changes to the terminal screen can cause unpleasant flicker or
274inefficient use of the communication channel to the device,
275so the library does not generally update it automatically.
276Therefore,
277after using
278.I curses
279functions to accumulate a set of desired updates that make sense to
280present together,
281call \fB\%refresh\fP(3X) to tell the library to make the user's screen
282look like \fBstdscr\fP.
283The library
284.\" X/Open Curses Issue 7 assumes some optimization will be done, but
285.\" does not mandate it in any way.
286.I optimizes
287its output by computing a minimal number of operations to mutate the
288screen from its state at the previous refresh to the new one.
289Effective optimization demands accurate information about the terminal
290device:
291the management of such information is the province of the
292\fB\%terminfo\fP(3X) API,
293a feature of every standard
294.I curses
295implementation.
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530296.PP
micky3879b9f5e72025-07-08 18:04:53 -0400297Special windows called
298.I pads
299may also be manipulated.
300These are windows that are not constrained to the size of the terminal
301screen and whose contents need not be completely displayed.
302See \fB\%curs_pad\fP(3X).
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530303.PP
micky3879b9f5e72025-07-08 18:04:53 -0400304In addition to drawing characters on the screen,
305rendering attributes and colors may be supported,
306causing the characters to show up in such modes as underlined,
307in reverse video,
308or in color on terminals that support such display enhancements.
309See \fB\%curs_attr\fP(3X).
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530310.PP
micky3879b9f5e72025-07-08 18:04:53 -0400311.I curses
312predefines constants for a small set of forms-drawing graphics
313corresponding to the DEC Alternate Character Set (ACS),
314a feature of VT100 and other terminals.
315See \fB\%waddch\fP(3X).
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530316.PP
micky3879b9f5e72025-07-08 18:04:53 -0400317.I curses
318is implemented using the operating system's terminal driver;
319keystroke events are received not as scan codes but as byte sequences.
320Graphical keycaps
321(alphanumeric and punctuation keys,
322and the space)
323appear as-is.
324Everything else,
325including the tab,
326enter/return,
327keypad,
328arrow,
329and function keys,
330appears as a control character or a multibyte
331.I "escape sequence."
332.I curses
333translates these into unique
334.I "key codes."
335See \fB\%getch\fP(3X).
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530336.PP
micky3879b9f5e72025-07-08 18:04:53 -0400337.I \%ncurses
338provides reimplementations of the SVr4 \fBpanel\fP(3X), \fBform\fP(3X),
339and \fBmenu\fP(3X) libraries to ease construction of user interfaces
340with
341.IR curses .
342.SS "Initialization"
343The selection of an appropriate value of
344.I TERM
345in the process environment is essential to correct
346.I curses
347and
348.I \%term\%info
349library operation.
350A well-configured system selects a correct
351.I TERM
352value automatically;
353\fB\%tset\fP(1) may assist with troubleshooting exotic situations.
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530354.PP
micky3879b9f5e72025-07-08 18:04:53 -0400355If you change the terminal type,
356export the
357.I TERM
358environment variable in the shell,
359then run \fB\%tset\fP(1) or the
360.RB \*(`` "@TPUT@ init" \*(''
361command.
362See subsection \*(``Tabs and Initialization\*('' of \fB\%terminfo\fP(5).
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530363.PP
micky3879b9f5e72025-07-08 18:04:53 -0400364If the environment variables
365.I \%LINES
366and
367.I \%COLUMNS
368are set,
369or if the
370.I curses
371program is executing in a graphical windowing environment,
372the information obtained thence overrides that obtained by
373.IR \%term\%info .
374An
375.I \%ncurses
376extension supports resizable terminals;
377see \fB\%wresize\fP(3X).
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530378.PP
micky3879b9f5e72025-07-08 18:04:53 -0400379If the environment variable
380.I \%TERMINFO
381is defined,
382a
383.I curses
384program checks first for a terminal type description in the location it
385identifies.
386.I \%TERMINFO
387is useful for developing experimental type descriptions or when write
388permission to
389.I \%\*d
390is not available.
391.PP
392See section \*(``ENVIRONMENT\*('' below.
393.SS "Naming Conventions"
394.I curses
395offers many functions in variant forms using a regular set of
396alternatives to the name of an elemental one.
397Those prefixed with \*(``w\*('' require a
398.I \%WINDOW
399pointer argument;
400those with a \*(``mv\*('' prefix first perform cursor movement using
401\fB\%wmove\fP(3X);
402a \*(``mvw\*('' prefix indicates both.
403The \*(``w\*('' function is typically the elemental one;
404the removal of this prefix usually indicates operation on
405.BR \%stdscr .
406.PP
407Four functions prefixed with \*(``p\*('' require a pad argument.
408.PP
409In function synopses,
410.I \%ncurses
411man pages apply the following names to parameters.
412.PP
413.TS
414center;
415Li L.
416bf \fIbool\fP (\fBTRUE\fP or \fBFALSE\fP)
417c a \fIchar\fP or \fIint\fP
418ch a \fIchtype\fP
419wc a \fIwchar_t\fP or \fIwint_t\fP
420wch a \fIcchar_t\fP
421win pointer to a \fIWINDOW\fP
422pad pointer to a \fIWINDOW\fP that is a pad
423.TE
424.SS "Wide and Non-wide Character Configurations"
425This manual page describes functions that appear in any configuration
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530426of the library.
micky3879b9f5e72025-07-08 18:04:53 -0400427There are two common configurations;
428see section \*(``ALTERNATE CONFIGURATIONS\*('' below.
429.TP 10 \" "ncursesw" + 2n
430.I \%ncurses
431is the library in its \*(``non-wide\*('' configuration,
432handling only eight-bit characters.
433It stores a character combined with attributes in a
434.I \%chtype
435datum,
436which is often an alias of
437.IR int .
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530438.IP
micky3879b9f5e72025-07-08 18:04:53 -0400439Attributes alone
440(with no corresponding character)
441can be stored in variables of
442.I \%chtype
443or
444.I \%attr_t
445type.
446In either case,
447they are represented as an integral bit mask.
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530448.IP
micky3879b9f5e72025-07-08 18:04:53 -0400449Each cell of a
450.I \%WINDOW
451is stored as a
452.IR \%chtype .
453.TP 10
454.I \%ncursesw
455is the library in its \*(``wide\*('' configuration,
456which handles character encodings requiring a larger data type than
457.I \%char
458(a byte-sized type)
459can represent.
460It adds about one third more calls using additional data types that
461can store such
462.I multibyte
463characters.
464.RS 10 \" same as foregoing tag width
465.TP 9 \" "cchar_t" + 2n
466.I \%cchar_t
467corresponds to the non-wide configuration's
468.IR \%chtype .
469It always a structure type,
470because it stores more data than fit into a standard scalar type.
471A character code may not be representable as a
472.IR \%char ,
473and moreover more than one character may occupy a cell
474(as with accent marks and other diacritics).
475Each character is of type
476.IR \%wchar_t ;
477a complex character contains one spacing character and zero or more
478non-spacing characters
479(see below).
480Attributes and color data are stored in separate fields of the
481structure,
482not combined as in
483.IR \%chtype .
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530484.PP
micky3879b9f5e72025-07-08 18:04:53 -0400485Each cell of a
486.I \%WINDOW
487is stored as a
488.IR \%cchar_t .
489.PP
490\fB\%setcchar\fP(3X) and \fB\%getcchar\fP(3X)
491store and retrieve
492.I \%cchar_t
493data.
494The wide library API of
495.I \%ncurses
496depends on two data types standardized by ISO C95.
497.TP 9
498.I \%wchar_t
499stores a wide character.
500Like
501.IR \%chtype ,
502it may be an alias of
503.IR int .
504Depending on the character encoding,
505a wide character may be
506.IR spacing ,
507meaning that it occupies a character cell by itself and typically
508accompanies cursor advancement,
509or
510.IR non-spacing ,
511meaning that it occupies the same cell as a spacing character,
512is often regarded as a \*(``modifier\*('' of the base glyph with which
513it combines,
514and typically does not advance the cursor.
515.TP 9
516.I \%wint_t
517can store a
518.I \%wchar_t
519or the constant
520.BR \%WEOF ,
521analogously to the
522.IR int -sized
523character manipulation functions of ISO C and its constant
524.BR \%EOF .
525.RE
526.IP
527The wide library provides additional functions that complement those in
528the non-wide library where the size of the underlying character type is
529significant.
530A somewhat regular naming convention relates many of the wide variants
531to their non-wide counterparts;
532where a non-wide function name contains \*(``ch\*('' or \*(``str\*('',
533prefix it with \*(``_w\*('' to obtain the wide counterpart.
534For example,
535\fB\%waddch\fP becomes \fB\%wadd_wch\fP.
536(Exceptions that add only \*(``w\*('' comprise
537.BR \%addwstr ,
538.BR \%inwstr ,
539and their variants.)
540.IP
541This convention is inapplicable to some non-wide function names,
542so other transformations are used for the wide configuration:
543the window background management function \*(``bkgd\*('' becomes
544\*(``bkgrnd\*('';
545the window border-drawing and -clearing functions are suffixed with
546\*(``_set\*('';
547and character attribute manipulation functions like
548\*(``attron\*('' become \*(``attr_on\*(''.
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530549.\"
micky3879b9f5e72025-07-08 18:04:53 -0400550.SS "Function Name Index"
551The following table lists the
552.I curses
553functions provided in the non-wide and wide APIs and the corresponding
554man pages that describe them.
555Those flagged with \*(``*\*(''
556are
557.IR \%ncurses "-specific,"
558neither described by X/Open Curses nor present in SVr4.
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530559.PP
560.TS
561center tab(/);
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530562l l .
micky3879b9f5e72025-07-08 18:04:53 -0400563\f(BIcurses\fP Function Name/Man Page
564_
565COLOR_PAIR/\fBcurs_color\fP(3X)
566PAIR_NUMBER/\fBcurs_color\fP(3X)
567add_wch/\fBcurs_add_wch\fP(3X)
568add_wchnstr/\fBcurs_add_wchstr\fP(3X)
569add_wchstr/\fBcurs_add_wchstr\fP(3X)
570addch/\fBcurs_addch\fP(3X)
571addchnstr/\fBcurs_addchstr\fP(3X)
572addchstr/\fBcurs_addchstr\fP(3X)
573addnstr/\fBcurs_addstr\fP(3X)
574addnwstr/\fBcurs_addwstr\fP(3X)
575addstr/\fBcurs_addstr\fP(3X)
576addwstr/\fBcurs_addwstr\fP(3X)
577alloc_pair/\fBnew_pair\fP(3X)*
578assume_default_colors/\fBdefault_colors\fP(3X)*
579attr_get/\fBcurs_attr\fP(3X)
580attr_off/\fBcurs_attr\fP(3X)
581attr_on/\fBcurs_attr\fP(3X)
582attr_set/\fBcurs_attr\fP(3X)
583attroff/\fBcurs_attr\fP(3X)
584attron/\fBcurs_attr\fP(3X)
585attrset/\fBcurs_attr\fP(3X)
586baudrate/\fBcurs_termattrs\fP(3X)
587beep/\fBcurs_beep\fP(3X)
588bkgd/\fBcurs_bkgd\fP(3X)
589bkgdset/\fBcurs_bkgd\fP(3X)
590bkgrnd/\fBcurs_bkgrnd\fP(3X)
591bkgrndset/\fBcurs_bkgrnd\fP(3X)
592border/\fBcurs_border\fP(3X)
593border_set/\fBcurs_border_set\fP(3X)
594box/\fBcurs_border\fP(3X)
595box_set/\fBcurs_border_set\fP(3X)
596can_change_color/\fBcurs_color\fP(3X)
597cbreak/\fBcurs_inopts\fP(3X)
598chgat/\fBcurs_attr\fP(3X)
599clear/\fBcurs_clear\fP(3X)
600clearok/\fBcurs_outopts\fP(3X)
601clrtobot/\fBcurs_clear\fP(3X)
602clrtoeol/\fBcurs_clear\fP(3X)
603color_content/\fBcurs_color\fP(3X)
604color_set/\fBcurs_attr\fP(3X)
605copywin/\fBcurs_overlay\fP(3X)
606curs_set/\fBcurs_kernel\fP(3X)
607curses_trace/\fBcurs_trace\fP(3X)*
608curses_version/\fBcurs_extend\fP(3X)*
609def_prog_mode/\fBcurs_kernel\fP(3X)
610def_shell_mode/\fBcurs_kernel\fP(3X)
611define_key/\fBdefine_key\fP(3X)*
612del_curterm/\fBcurs_terminfo\fP(3X)
613delay_output/\fBcurs_util\fP(3X)
614delch/\fBcurs_delch\fP(3X)
615deleteln/\fBcurs_deleteln\fP(3X)
616delscreen/\fBcurs_initscr\fP(3X)
617delwin/\fBcurs_window\fP(3X)
618derwin/\fBcurs_window\fP(3X)
619doupdate/\fBcurs_refresh\fP(3X)
620dupwin/\fBcurs_window\fP(3X)
621echo/\fBcurs_inopts\fP(3X)
622echo_wchar/\fBcurs_add_wch\fP(3X)
623echochar/\fBcurs_addch\fP(3X)
624endwin/\fBcurs_initscr\fP(3X)
625erase/\fBcurs_clear\fP(3X)
626erasechar/\fBcurs_termattrs\fP(3X)
627erasewchar/\fBcurs_termattrs\fP(3X)
628exit_curses/\fBcurs_memleaks\fP(3X)*
629exit_terminfo/\fBcurs_memleaks\fP(3X)*
630extended_color_content/\fBcurs_color\fP(3X)*
631extended_pair_content/\fBcurs_color\fP(3X)*
632extended_slk_color/\fBcurs_slk\fP(3X)*
633filter/\fBcurs_util\fP(3X)
634find_pair/\fBnew_pair\fP(3X)*
635flash/\fBcurs_beep\fP(3X)
636flushinp/\fBcurs_util\fP(3X)
637free_pair/\fBnew_pair\fP(3X)*
638get_escdelay/\fBcurs_threads\fP(3X)*
639get_wch/\fBcurs_get_wch\fP(3X)
640get_wstr/\fBcurs_get_wstr\fP(3X)
641getattrs/\fBcurs_attr\fP(3X)
642getbegx/\fBcurs_legacy\fP(3X)*
643getbegy/\fBcurs_legacy\fP(3X)*
644getbegyx/\fBcurs_getyx\fP(3X)
645getbkgd/\fBcurs_bkgd\fP(3X)
646getbkgrnd/\fBcurs_bkgrnd\fP(3X)
647getcchar/\fBcurs_getcchar\fP(3X)
648getch/\fBcurs_getch\fP(3X)
649getcurx/\fBcurs_legacy\fP(3X)*
650getcury/\fBcurs_legacy\fP(3X)*
651getmaxx/\fBcurs_legacy\fP(3X)*
652getmaxy/\fBcurs_legacy\fP(3X)*
653getmaxyx/\fBcurs_getyx\fP(3X)
654getmouse/\fBcurs_mouse\fP(3X)*
655getn_wstr/\fBcurs_get_wstr\fP(3X)
656getnstr/\fBcurs_getstr\fP(3X)
657getparx/\fBcurs_legacy\fP(3X)*
658getpary/\fBcurs_legacy\fP(3X)*
659getparyx/\fBcurs_getyx\fP(3X)
660getstr/\fBcurs_getstr\fP(3X)
661getsyx/\fBcurs_kernel\fP(3X)
662getwin/\fBcurs_util\fP(3X)
663getyx/\fBcurs_getyx\fP(3X)
664halfdelay/\fBcurs_inopts\fP(3X)
665has_colors/\fBcurs_color\fP(3X)
666has_ic/\fBcurs_termattrs\fP(3X)
667has_il/\fBcurs_termattrs\fP(3X)
668has_key/\fBcurs_getch\fP(3X)*
669has_mouse/\fBcurs_mouse\fP(3X)*
670hline/\fBcurs_border\fP(3X)
671hline_set/\fBcurs_border_set\fP(3X)
672idcok/\fBcurs_outopts\fP(3X)
673idlok/\fBcurs_outopts\fP(3X)
674immedok/\fBcurs_outopts\fP(3X)
675in_wch/\fBcurs_in_wch\fP(3X)
676in_wchnstr/\fBcurs_in_wchstr\fP(3X)
677in_wchstr/\fBcurs_in_wchstr\fP(3X)
678inch/\fBcurs_inch\fP(3X)
679inchnstr/\fBcurs_inchstr\fP(3X)
680inchstr/\fBcurs_inchstr\fP(3X)
681init_color/\fBcurs_color\fP(3X)
682init_extended_color/\fBcurs_color\fP(3X)*
683init_extended_pair/\fBcurs_color\fP(3X)*
684init_pair/\fBcurs_color\fP(3X)
685initscr/\fBcurs_initscr\fP(3X)
686innstr/\fBcurs_instr\fP(3X)
687innwstr/\fBcurs_inwstr\fP(3X)
688ins_nwstr/\fBcurs_ins_wstr\fP(3X)
689ins_wch/\fBcurs_ins_wch\fP(3X)
690ins_wstr/\fBcurs_ins_wstr\fP(3X)
691insch/\fBcurs_insch\fP(3X)
692insdelln/\fBcurs_deleteln\fP(3X)
693insertln/\fBcurs_deleteln\fP(3X)
694insnstr/\fBcurs_insstr\fP(3X)
695insstr/\fBcurs_insstr\fP(3X)
696instr/\fBcurs_instr\fP(3X)
697intrflush/\fBcurs_inopts\fP(3X)
698inwstr/\fBcurs_inwstr\fP(3X)
699is_cbreak/\fBcurs_inopts\fP(3X)*
700is_cleared/\fBcurs_opaque\fP(3X)*
701is_echo/\fBcurs_inopts\fP(3X)*
702is_idcok/\fBcurs_opaque\fP(3X)*
703is_idlok/\fBcurs_opaque\fP(3X)*
704is_immedok/\fBcurs_opaque\fP(3X)*
705is_keypad/\fBcurs_opaque\fP(3X)*
706is_leaveok/\fBcurs_opaque\fP(3X)*
707is_linetouched/\fBcurs_touch\fP(3X)
708is_nl/\fBcurs_inopts\fP(3X)*
709is_nodelay/\fBcurs_opaque\fP(3X)*
710is_notimeout/\fBcurs_opaque\fP(3X)*
711is_pad/\fBcurs_opaque\fP(3X)*
712is_raw/\fBcurs_inopts\fP(3X)*
713is_scrollok/\fBcurs_opaque\fP(3X)*
714is_subwin/\fBcurs_opaque\fP(3X)*
715is_syncok/\fBcurs_opaque\fP(3X)*
716is_term_resized/\fBresizeterm\fP(3X)*
717is_wintouched/\fBcurs_touch\fP(3X)
718isendwin/\fBcurs_initscr\fP(3X)
719key_defined/\fBkey_defined\fP(3X)*
720key_name/\fBcurs_util\fP(3X)
721keybound/\fBkeybound\fP(3X)*
722keyname/\fBcurs_util\fP(3X)
723keyok/\fBkeyok\fP(3X)*
724keypad/\fBcurs_inopts\fP(3X)
725killchar/\fBcurs_termattrs\fP(3X)
726killwchar/\fBcurs_termattrs\fP(3X)
727leaveok/\fBcurs_outopts\fP(3X)
728longname/\fBcurs_termattrs\fP(3X)
729mcprint/\fBcurs_print\fP(3X)*
730meta/\fBcurs_inopts\fP(3X)
731mouse_trafo/\fBcurs_mouse\fP(3X)*
732mouseinterval/\fBcurs_mouse\fP(3X)*
733mousemask/\fBcurs_mouse\fP(3X)*
734move/\fBcurs_move\fP(3X)
735mvadd_wch/\fBcurs_add_wch\fP(3X)
736mvadd_wchnstr/\fBcurs_add_wchstr\fP(3X)
737mvadd_wchstr/\fBcurs_add_wchstr\fP(3X)
738mvaddch/\fBcurs_addch\fP(3X)
739mvaddchnstr/\fBcurs_addchstr\fP(3X)
740mvaddchstr/\fBcurs_addchstr\fP(3X)
741mvaddnstr/\fBcurs_addstr\fP(3X)
742mvaddnwstr/\fBcurs_addwstr\fP(3X)
743mvaddstr/\fBcurs_addstr\fP(3X)
744mvaddwstr/\fBcurs_addwstr\fP(3X)
745mvchgat/\fBcurs_attr\fP(3X)
746mvcur/\fBcurs_terminfo\fP(3X)
747mvdelch/\fBcurs_delch\fP(3X)
748mvderwin/\fBcurs_window\fP(3X)
749mvget_wch/\fBcurs_get_wch\fP(3X)
750mvget_wstr/\fBcurs_get_wstr\fP(3X)
751mvgetch/\fBcurs_getch\fP(3X)
752mvgetn_wstr/\fBcurs_get_wstr\fP(3X)
753mvgetnstr/\fBcurs_getstr\fP(3X)
754mvgetstr/\fBcurs_getstr\fP(3X)
755mvhline/\fBcurs_border\fP(3X)
756mvhline_set/\fBcurs_border_set\fP(3X)
757mvin_wch/\fBcurs_in_wch\fP(3X)
758mvin_wchnstr/\fBcurs_in_wchstr\fP(3X)
759mvin_wchstr/\fBcurs_in_wchstr\fP(3X)
760mvinch/\fBcurs_inch\fP(3X)
761mvinchnstr/\fBcurs_inchstr\fP(3X)
762mvinchstr/\fBcurs_inchstr\fP(3X)
763mvinnstr/\fBcurs_instr\fP(3X)
764mvinnwstr/\fBcurs_inwstr\fP(3X)
765mvins_nwstr/\fBcurs_ins_wstr\fP(3X)
766mvins_wch/\fBcurs_ins_wch\fP(3X)
767mvins_wstr/\fBcurs_ins_wstr\fP(3X)
768mvinsch/\fBcurs_insch\fP(3X)
769mvinsnstr/\fBcurs_insstr\fP(3X)
770mvinsstr/\fBcurs_insstr\fP(3X)
771mvinstr/\fBcurs_instr\fP(3X)
772mvinwstr/\fBcurs_inwstr\fP(3X)
773mvprintw/\fBcurs_printw\fP(3X)
774mvscanw/\fBcurs_scanw\fP(3X)
775mvvline/\fBcurs_border\fP(3X)
776mvvline_set/\fBcurs_border_set\fP(3X)
777mvwadd_wch/\fBcurs_add_wch\fP(3X)
778mvwadd_wchnstr/\fBcurs_add_wchstr\fP(3X)
779mvwadd_wchstr/\fBcurs_add_wchstr\fP(3X)
780mvwaddch/\fBcurs_addch\fP(3X)
781mvwaddchnstr/\fBcurs_addchstr\fP(3X)
782mvwaddchstr/\fBcurs_addchstr\fP(3X)
783mvwaddnstr/\fBcurs_addstr\fP(3X)
784mvwaddnwstr/\fBcurs_addwstr\fP(3X)
785mvwaddstr/\fBcurs_addstr\fP(3X)
786mvwaddwstr/\fBcurs_addwstr\fP(3X)
787mvwchgat/\fBcurs_attr\fP(3X)
788mvwdelch/\fBcurs_delch\fP(3X)
789mvwget_wch/\fBcurs_get_wch\fP(3X)
790mvwget_wstr/\fBcurs_get_wstr\fP(3X)
791mvwgetch/\fBcurs_getch\fP(3X)
792mvwgetn_wstr/\fBcurs_get_wstr\fP(3X)
793mvwgetnstr/\fBcurs_getstr\fP(3X)
794mvwgetstr/\fBcurs_getstr\fP(3X)
795mvwhline/\fBcurs_border\fP(3X)
796mvwhline_set/\fBcurs_border_set\fP(3X)
797mvwin/\fBcurs_window\fP(3X)
798mvwin_wch/\fBcurs_in_wch\fP(3X)
799mvwin_wchnstr/\fBcurs_in_wchstr\fP(3X)
800mvwin_wchstr/\fBcurs_in_wchstr\fP(3X)
801mvwinch/\fBcurs_inch\fP(3X)
802mvwinchnstr/\fBcurs_inchstr\fP(3X)
803mvwinchstr/\fBcurs_inchstr\fP(3X)
804mvwinnstr/\fBcurs_instr\fP(3X)
805mvwinnwstr/\fBcurs_inwstr\fP(3X)
806mvwins_nwstr/\fBcurs_ins_wstr\fP(3X)
807mvwins_wch/\fBcurs_ins_wch\fP(3X)
808mvwins_wstr/\fBcurs_ins_wstr\fP(3X)
809mvwinsch/\fBcurs_insch\fP(3X)
810mvwinsnstr/\fBcurs_insstr\fP(3X)
811mvwinsstr/\fBcurs_insstr\fP(3X)
812mvwinstr/\fBcurs_instr\fP(3X)
813mvwinwstr/\fBcurs_inwstr\fP(3X)
814mvwprintw/\fBcurs_printw\fP(3X)
815mvwscanw/\fBcurs_scanw\fP(3X)
816mvwvline/\fBcurs_border\fP(3X)
817mvwvline_set/\fBcurs_border_set\fP(3X)
818napms/\fBcurs_kernel\fP(3X)
819newpad/\fBcurs_pad\fP(3X)
820newterm/\fBcurs_initscr\fP(3X)
821newwin/\fBcurs_window\fP(3X)
822nl/\fBcurs_inopts\fP(3X)
823nocbreak/\fBcurs_inopts\fP(3X)
824nodelay/\fBcurs_inopts\fP(3X)
825noecho/\fBcurs_inopts\fP(3X)
826nofilter/\fBcurs_util\fP(3X)*
827nonl/\fBcurs_inopts\fP(3X)
828noqiflush/\fBcurs_inopts\fP(3X)
829noraw/\fBcurs_inopts\fP(3X)
830notimeout/\fBcurs_inopts\fP(3X)
831overlay/\fBcurs_overlay\fP(3X)
832overwrite/\fBcurs_overlay\fP(3X)
833pair_content/\fBcurs_color\fP(3X)
834pecho_wchar/\fBcurs_pad\fP(3X)
835pechochar/\fBcurs_pad\fP(3X)
836pnoutrefresh/\fBcurs_pad\fP(3X)
837prefresh/\fBcurs_pad\fP(3X)
838printw/\fBcurs_printw\fP(3X)
839putp/\fBcurs_terminfo\fP(3X)
840putwin/\fBcurs_util\fP(3X)
841qiflush/\fBcurs_inopts\fP(3X)
842raw/\fBcurs_inopts\fP(3X)
843redrawwin/\fBcurs_refresh\fP(3X)
844refresh/\fBcurs_refresh\fP(3X)
845reset_color_pairs/\fBcurs_color\fP(3X)*
846reset_prog_mode/\fBcurs_kernel\fP(3X)
847reset_shell_mode/\fBcurs_kernel\fP(3X)
848resetty/\fBcurs_kernel\fP(3X)
849resize_term/\fBresizeterm\fP(3X)*
850resizeterm/\fBresizeterm\fP(3X)*
851restartterm/\fBcurs_terminfo\fP(3X)
852ripoffline/\fBcurs_kernel\fP(3X)
853savetty/\fBcurs_kernel\fP(3X)
854scanw/\fBcurs_scanw\fP(3X)
855scr_dump/\fBcurs_scr_dump\fP(3X)
856scr_init/\fBcurs_scr_dump\fP(3X)
857scr_restore/\fBcurs_scr_dump\fP(3X)
858scr_set/\fBcurs_scr_dump\fP(3X)
859scrl/\fBcurs_scroll\fP(3X)
860scroll/\fBcurs_scroll\fP(3X)
861scrollok/\fBcurs_outopts\fP(3X)
862set_curterm/\fBcurs_terminfo\fP(3X)
863set_escdelay/\fBcurs_threads\fP(3X)*
864set_tabsize/\fBcurs_threads\fP(3X)*
865set_term/\fBcurs_initscr\fP(3X)
866setcchar/\fBcurs_getcchar\fP(3X)
867setscrreg/\fBcurs_outopts\fP(3X)
868setsyx/\fBcurs_kernel\fP(3X)
869setupterm/\fBcurs_terminfo\fP(3X)
870slk_attr/\fBcurs_slk\fP(3X)*
871slk_attr_off/\fBcurs_slk\fP(3X)
872slk_attr_on/\fBcurs_slk\fP(3X)
873slk_attr_set/\fBcurs_slk\fP(3X)
874slk_attroff/\fBcurs_slk\fP(3X)
875slk_attron/\fBcurs_slk\fP(3X)
876slk_attrset/\fBcurs_slk\fP(3X)
877slk_clear/\fBcurs_slk\fP(3X)
878slk_color/\fBcurs_slk\fP(3X)
879slk_init/\fBcurs_slk\fP(3X)
880slk_label/\fBcurs_slk\fP(3X)
881slk_noutrefresh/\fBcurs_slk\fP(3X)
882slk_refresh/\fBcurs_slk\fP(3X)
883slk_restore/\fBcurs_slk\fP(3X)
884slk_set/\fBcurs_slk\fP(3X)
885slk_touch/\fBcurs_slk\fP(3X)
886slk_wset/\fBcurs_slk\fP(3X)
887standend/\fBcurs_attr\fP(3X)
888standout/\fBcurs_attr\fP(3X)
889start_color/\fBcurs_color\fP(3X)
890subpad/\fBcurs_pad\fP(3X)
891subwin/\fBcurs_window\fP(3X)
892syncok/\fBcurs_window\fP(3X)
893term_attrs/\fBcurs_termattrs\fP(3X)
894termattrs/\fBcurs_termattrs\fP(3X)
895termname/\fBcurs_termattrs\fP(3X)
896tgetent/\fBcurs_termcap\fP(3X)
897tgetflag/\fBcurs_termcap\fP(3X)
898tgetnum/\fBcurs_termcap\fP(3X)
899tgetstr/\fBcurs_termcap\fP(3X)
900tgoto/\fBcurs_termcap\fP(3X)
901tigetflag/\fBcurs_terminfo\fP(3X)
902tigetnum/\fBcurs_terminfo\fP(3X)
903tigetstr/\fBcurs_terminfo\fP(3X)
904timeout/\fBcurs_inopts\fP(3X)
905tiparm/\fBcurs_terminfo\fP(3X)
906tiparm_s/\fBcurs_terminfo\fP(3X)*
907tiscan_s/\fBcurs_terminfo\fP(3X)*
908touchline/\fBcurs_touch\fP(3X)
909touchwin/\fBcurs_touch\fP(3X)
910tparm/\fBcurs_terminfo\fP(3X)
911tputs/\fBcurs_termcap\fP(3X)
912tputs/\fBcurs_terminfo\fP(3X)
913trace/\fBcurs_trace\fP(3X)*
914typeahead/\fBcurs_inopts\fP(3X)
915unctrl/\fBcurs_util\fP(3X)
916unget_wch/\fBcurs_get_wch\fP(3X)
917ungetch/\fBcurs_getch\fP(3X)
918ungetmouse/\fBcurs_mouse\fP(3X)*
919untouchwin/\fBcurs_touch\fP(3X)
920use_default_colors/\fBdefault_colors\fP(3X)*
921use_env/\fBcurs_util\fP(3X)
922use_extended_names/\fBcurs_extend\fP(3X)*
923use_legacy_coding/\fBlegacy_coding\fP(3X)*
924use_screen/\fBcurs_threads\fP(3X)*
925use_tioctl/\fBcurs_util\fP(3X)*
926use_window/\fBcurs_threads\fP(3X)*
927vid_attr/\fBcurs_terminfo\fP(3X)
928vid_puts/\fBcurs_terminfo\fP(3X)
929vidattr/\fBcurs_terminfo\fP(3X)
930vidputs/\fBcurs_terminfo\fP(3X)
931vline/\fBcurs_border\fP(3X)
932vline_set/\fBcurs_border_set\fP(3X)
933vw_printw/\fBcurs_printw\fP(3X)
934vw_scanw/\fBcurs_scanw\fP(3X)
935vwprintw/\fBcurs_printw\fP(3X)
936vwscanw/\fBcurs_scanw\fP(3X)
937wadd_wch/\fBcurs_add_wch\fP(3X)
938wadd_wchnstr/\fBcurs_add_wchstr\fP(3X)
939wadd_wchstr/\fBcurs_add_wchstr\fP(3X)
940waddch/\fBcurs_addch\fP(3X)
941waddchnstr/\fBcurs_addchstr\fP(3X)
942waddchstr/\fBcurs_addchstr\fP(3X)
943waddnstr/\fBcurs_addstr\fP(3X)
944waddnwstr/\fBcurs_addwstr\fP(3X)
945waddstr/\fBcurs_addstr\fP(3X)
946waddwstr/\fBcurs_addwstr\fP(3X)
947wattr_get/\fBcurs_attr\fP(3X)
948wattr_off/\fBcurs_attr\fP(3X)
949wattr_on/\fBcurs_attr\fP(3X)
950wattr_set/\fBcurs_attr\fP(3X)
951wattroff/\fBcurs_attr\fP(3X)
952wattron/\fBcurs_attr\fP(3X)
953wattrset/\fBcurs_attr\fP(3X)
954wbkgd/\fBcurs_bkgd\fP(3X)
955wbkgdset/\fBcurs_bkgd\fP(3X)
956wbkgrnd/\fBcurs_bkgrnd\fP(3X)
957wbkgrndset/\fBcurs_bkgrnd\fP(3X)
958wborder/\fBcurs_border\fP(3X)
959wborder_set/\fBcurs_border_set\fP(3X)
960wchgat/\fBcurs_attr\fP(3X)
961wclear/\fBcurs_clear\fP(3X)
962wclrtobot/\fBcurs_clear\fP(3X)
963wclrtoeol/\fBcurs_clear\fP(3X)
964wcolor_set/\fBcurs_attr\fP(3X)
965wcursyncup/\fBcurs_window\fP(3X)
966wdelch/\fBcurs_delch\fP(3X)
967wdeleteln/\fBcurs_deleteln\fP(3X)
968wecho_wchar/\fBcurs_add_wch\fP(3X)
969wechochar/\fBcurs_addch\fP(3X)
970wenclose/\fBcurs_mouse\fP(3X)*
971werase/\fBcurs_clear\fP(3X)
972wget_wch/\fBcurs_get_wch\fP(3X)
973wget_wstr/\fBcurs_get_wstr\fP(3X)
974wgetbkgrnd/\fBcurs_bkgrnd\fP(3X)
975wgetch/\fBcurs_getch\fP(3X)
976wgetdelay/\fBcurs_opaque\fP(3X)*
977wgetn_wstr/\fBcurs_get_wstr\fP(3X)
978wgetnstr/\fBcurs_getstr\fP(3X)
979wgetparent/\fBcurs_opaque\fP(3X)*
980wgetscrreg/\fBcurs_opaque\fP(3X)*
981wgetstr/\fBcurs_getstr\fP(3X)
982whline/\fBcurs_border\fP(3X)
983whline_set/\fBcurs_border_set\fP(3X)
984win_wch/\fBcurs_in_wch\fP(3X)
985win_wchnstr/\fBcurs_in_wchstr\fP(3X)
986win_wchstr/\fBcurs_in_wchstr\fP(3X)
987winch/\fBcurs_inch\fP(3X)
988winchnstr/\fBcurs_inchstr\fP(3X)
989winchstr/\fBcurs_inchstr\fP(3X)
990winnstr/\fBcurs_instr\fP(3X)
991winnwstr/\fBcurs_inwstr\fP(3X)
992wins_nwstr/\fBcurs_ins_wstr\fP(3X)
993wins_wch/\fBcurs_ins_wch\fP(3X)
994wins_wstr/\fBcurs_ins_wstr\fP(3X)
995winsch/\fBcurs_insch\fP(3X)
996winsdelln/\fBcurs_deleteln\fP(3X)
997winsertln/\fBcurs_deleteln\fP(3X)
998winsnstr/\fBcurs_insstr\fP(3X)
999winsstr/\fBcurs_insstr\fP(3X)
1000winstr/\fBcurs_instr\fP(3X)
1001winwstr/\fBcurs_inwstr\fP(3X)
1002wmouse_trafo/\fBcurs_mouse\fP(3X)*
1003wmove/\fBcurs_move\fP(3X)
1004wnoutrefresh/\fBcurs_refresh\fP(3X)
1005wprintw/\fBcurs_printw\fP(3X)
1006wredrawln/\fBcurs_refresh\fP(3X)
1007wrefresh/\fBcurs_refresh\fP(3X)
1008wresize/\fBwresize\fP(3X)*
1009wscanw/\fBcurs_scanw\fP(3X)
1010wscrl/\fBcurs_scroll\fP(3X)
1011wsetscrreg/\fBcurs_outopts\fP(3X)
1012wstandend/\fBcurs_attr\fP(3X)
1013wstandout/\fBcurs_attr\fP(3X)
1014wsyncdown/\fBcurs_window\fP(3X)
1015wsyncup/\fBcurs_window\fP(3X)
1016wtimeout/\fBcurs_inopts\fP(3X)
1017wtouchln/\fBcurs_touch\fP(3X)
1018wunctrl/\fBcurs_util\fP(3X)
1019wvline/\fBcurs_border\fP(3X)
1020wvline_set/\fBcurs_border_set\fP(3X)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301021.TE
micky3879b9f5e72025-07-08 18:04:53 -04001022.PP
1023.IR \%ncurses 's
1024.I "screen-pointer extension"
1025adds additional functions corresponding to many of the above,
1026each with an \*(``_sp\*('' suffix;
1027see \fBcurs_sp_funcs\fP(3X).
1028.PP
1029The availability of some extensions is configurable when
1030.I \%ncurses
1031is compiled;
1032see sections \*(``ALTERNATE CONFIGURATIONS\*('' and \*(``EXTENSIONS\*(''
1033below.
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301034.SH RETURN VALUE
micky3879b9f5e72025-07-08 18:04:53 -04001035Unless otherwise noted,
1036functions that return an integer return
1037.B OK
1038on success and
1039.B ERR
1040on failure.
1041Functions that return pointers return
1042.B NULL
1043on failure.
1044Typically,
1045.I \%ncurses
1046treats a null pointer passed as a function parameter as a failure.
1047Functions prefixed with \*(``mv\*('' first perform cursor movement and
1048fail if the position
1049.RI ( y ,
1050.IR x )
1051is outside the window boundaries.
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301052.SH ENVIRONMENT
micky3879b9f5e72025-07-08 18:04:53 -04001053The following symbols from the process environment customize the
1054runtime behavior of
1055.I \%ncurses
1056applications.
1057The library may be configured to disregard the variables
1058.IR \%TERMINFO ,
1059.IR \%TERMINFO_DIRS ,
1060.IR \%TERMPATH ,
1061and
1062.IR HOME ,
1063if the user is the superuser (root),
1064or the application uses \fI\%setuid\fP(2) or \fI\%setgid\fP(2).
1065.SS "\fIBAUDRATE\fP"
1066The debugging library checks this variable when the application has
1067redirected output to a file.
1068Its integral value is used for the baud rate.
1069If that value is absent or invalid,
1070.I \%ncurses
1071uses 9600.
1072This feature allows testers to construct repeatable test cases
1073that take into account optimization decisions that depend on baud rate.
1074.SS "\fICC\fP (command character)"
1075When set,
1076the
1077.B \%command_character
1078.RB ( \%cmdch )
1079capability value of loaded
1080.I \%term\%info
1081entries changes to the value of this variable.
1082Very few
1083.I \%term\%info
1084entries provide this feature.
Steve Kondikae271bc2015-11-15 02:50:53 +01001085.PP
1086Because this name is also used in development environments to represent
micky3879b9f5e72025-07-08 18:04:53 -04001087the C compiler's name,
1088.I \%ncurses
1089ignores its value if it is not one character in length.
1090.SS "\fICOLUMNS\fP"
1091This variable specifies the width of the screen in characters.
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301092Applications running in a windowing environment usually are able to
1093obtain the width of the window in which they are executing.
micky3879b9f5e72025-07-08 18:04:53 -04001094If
1095.I \%COLUMNS
1096is not defined and the terminal's screen size is not available from the
1097terminal driver,
1098.I \%ncurses
1099uses the size specified by the
1100.B \%columns
1101.RB ( \%cols )
1102capability of the terminal type's entry in the
1103.I \%term\%info
1104database,
1105if any.
Steve Kondikae271bc2015-11-15 02:50:53 +01001106.PP
micky3879b9f5e72025-07-08 18:04:53 -04001107It is important that your application use the correct screen size.
1108Automatic detection thereof is not always possible because an
1109application may be running on a host that does not honor NAWS
1110(Negotiations About Window Size)
1111or as a different user ID than the owner of the terminal device file.
1112Setting
1113.I \%COLUMNS
1114and/or
1115.I \%LINES
1116overrides the library's use of the screen size obtained from the
1117operating system.
Steve Kondikae271bc2015-11-15 02:50:53 +01001118.PP
micky3879b9f5e72025-07-08 18:04:53 -04001119The
1120.I \%COLUMNS
1121and
1122.I \%LINES
1123variables may be specified independently.
1124This property is useful to circumvent misfeatures of legacy terminal
1125type descriptions;
1126\fI\%xterm\fP(1) descriptions specifying 65 lines were once notorious.
1127For best results,
1128avoid specifying
1129.B cols
1130and
1131.B lines
1132capability codes in
1133.I \%term\%info
1134descriptions of terminal emulators.
Steve Kondikae271bc2015-11-15 02:50:53 +01001135.PP
micky3879b9f5e72025-07-08 18:04:53 -04001136\fBuse_env\fP(3X) can disable use of the process environment
1137in determining the screen size.
1138\fBuse_tioctl\fP(3X) can update
1139.I \%COLUMNS
1140and
1141.I \%LINES
1142to match the screen size obtained from system calls or the terminal
1143database.
1144.SS "\fIESCDELAY\fP"
1145For
1146.I curses
1147to distinguish the ESC character resulting from a user's press of the
1148\*(``Escape\*('' key on the input device from one beginning an
1149.I "escape sequence"
1150(as commonly produced by function keys),
1151it waits after receiving the escape character to see if further
1152characters are available on the input stream within a short interval.
1153A global variable
1154.B \%ESCDELAY
1155stores this interval in milliseconds.
1156The default value of 1000
1157(one second)
1158is adequate for most uses.
1159This environment variable overrides it.
Steve Kondikae271bc2015-11-15 02:50:53 +01001160.PP
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301161The most common instance where you may wish to change this value
micky3879b9f5e72025-07-08 18:04:53 -04001162is to work with a remote host over a slow communication channel.
1163If the host running a
1164.I curses
1165application does not receive the characters of an escape sequence in a
1166timely manner,
1167the library can interpret them as multiple key stroke events.
Steve Kondikae271bc2015-11-15 02:50:53 +01001168.PP
micky3879b9f5e72025-07-08 18:04:53 -04001169\fI\%xterm\fP(1) mouse events are a form of escape sequence;
1170therefore,
1171if your application makes heavy use of multiple-clicking,
1172you may wish to lengthen the default value because the delay applies
1173to the composite multi-click event as well as the individual clicks.
Steve Kondikae271bc2015-11-15 02:50:53 +01001174.PP
micky3879b9f5e72025-07-08 18:04:53 -04001175Portable applications should not rely upon the presence of
1176.B \%ESCDELAY
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301177in either form,
1178but setting the environment variable rather than the global variable
1179does not create problems when compiling an application.
Steve Kondikae271bc2015-11-15 02:50:53 +01001180.PP
micky3879b9f5e72025-07-08 18:04:53 -04001181If \fB\%keypad\fP(3X) is disabled for the
1182.I curses
1183window receiving input,
1184a program must disambiguate escape sequences itself.
1185.SS "\fIHOME\fP"
1186.I \%ncurses
1187may read and write auxiliary terminal descriptions in
1188.I \%.termcap
1189and
1190.I \%.terminfo
1191files in the user's home directory.
1192.SS "\fILINES\fP"
1193This counterpart to
1194.I \%COLUMNS
1195specifies the height of the screen in characters.
1196The corresponding
1197.I \%term\%info
1198capability and code is
1199.BR \%lines .
1200See the description of the
1201.I \%COLUMNS
1202variable above.
1203.SS "\fIMOUSE_BUTTONS_123\fP"
1204(OS/2 EMX port only)
1205OS/2 numbers a three-button mouse inconsistently with other platforms,
1206such that 1 is the left button,
12072 the right,
1208and 3 the middle.
1209This variable customizes the mouse button numbering.
1210Its value must be three digits 1\-3 in any order.
1211By default,
1212.I \%ncurses
1213assumes a numbering of \*(``132\*(''.
1214.SS "\fINCURSES_ASSUMED_COLORS\fP"
1215If set,
1216this variable overrides the
1217.I \%ncurses
1218library's compiled-in assumption that the terminal's default colors are
1219white on black;
1220see \fB\%default_colors\fP(3X).
1221Set the foreground and background color values with this environment
1222variable by assigning it two integer values separated by a comma,
1223indicating foregound and background color numbers,
1224respectively.
Steve Kondikae271bc2015-11-15 02:50:53 +01001225.PP
micky3879b9f5e72025-07-08 18:04:53 -04001226For example,
1227to tell
1228.I \%ncurses
1229not to assume anything about the colors,
1230use a value of \*(``\-1,\-1\*(''.
1231To make the default color scheme green on black,
1232use \*(``2,0\*(''.
1233.I \%ncurses
1234accepts integral values from \-1 up to the value of the
1235.I \%term\%info
1236.B \%max_colors
1237.RB ( colors )
1238capability.
1239.SS "\fINCURSES_CONSOLE2\fP"
1240(MinGW port only)
1241The
1242.I \%Console2
1243.\" https://www.hanselman.com/blog/console2-a-better-windows-command-prompt
1244program defectively handles the Microsoft Console API call
1245.IR \%Create\%Console\%Screen\%Buffer .
1246Applications that use it will hang.
1247However,
1248it is possible to simulate the action of this call by mapping
1249coordinates,
Steve Kondikae271bc2015-11-15 02:50:53 +01001250explicitly saving and restoring the original screen contents.
micky3879b9f5e72025-07-08 18:04:53 -04001251Setting the environment variable
1252.I \%NCGDB
1253has the same effect.
1254.SS "\fINCURSES_GPM_TERMS\fP"
1255(Linux only)
1256When
1257.I \%ncurses
1258is configured to use the GPM interface,
1259this variable may list one or more terminal names
1260against which the
1261.I TERM
1262variable
1263(see below)
1264is matched.
1265An empty value disables the GPM interface,
1266using
1267.IR \%ncurses 's
1268built-in support for \fIxterm\fP(1) mouse protocols instead.
1269If the variable is absent,
1270.I \%ncurses
1271attempts to open GPM if
1272.I TERM
1273contains \*(``linux\*(''.
1274.SS "\fINCURSES_NO_HARD_TABS\fP"
1275.I \%ncurses
1276may use tab characters in cursor movement optimization.
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301277In some cases,
micky3879b9f5e72025-07-08 18:04:53 -04001278your terminal driver may not handle them properly.
1279Set this environment variable to any value to disable the feature.
1280You can also adjust your \fI\%stty\fP(1) settings to avoid the problem.
1281.SS "\fINCURSES_NO_MAGIC_COOKIE\fP"
1282Many terminals store video attributes as a property of a character cell,
1283as
1284.I curses
1285does.
1286Historically,
1287some recorded changes in video attributes as data that logically
1288.I occupies
1289character cells on the display,
1290switching attributes on or off,
1291similarly to tags in a markup language;
1292these are termed \*(``magic cookies\*('',
1293and must be subsequently overprinted.
1294If the
1295.I \%term\%info
1296entry for your terminal type does not adequately describe its handling
1297of magic cookies,
1298set this variable to any value to instruct
1299.I \%ncurses
1300to disable attributes entirely.
1301.SS "\fINCURSES_NO_PADDING\fP"
1302Most terminal type descriptions in the
1303.I \%term\%info
1304database detail hardware devices.
1305Many people use
1306.IR curses -based
1307applications in terminal emulator programs that run in a windowing
1308environment.
1309These programs can duplicate all of the important features of a hardware
1310terminal,
1311but often lack their limitations.
1312Chief among these absent drawbacks is the problem of data flow
1313management;
1314that is,
1315limiting the speed of communication to what the hardware could handle.
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301316Unless a hardware terminal is interfaced into a terminal concentrator
1317(which does flow control),
micky3879b9f5e72025-07-08 18:04:53 -04001318an application must manage flow control itself to prevent overruns and
1319data loss.
Steve Kondikae271bc2015-11-15 02:50:53 +01001320.PP
micky3879b9f5e72025-07-08 18:04:53 -04001321A solution that comes at no hardware cost is for an application to pause
1322after directing a terminal to execute an operation that it performs
1323slowly,
1324such as clearing the display.
1325Many terminal type descriptions,
1326including that for the VT100,
1327embed delay specifications in capabilities.
1328You may wish to use these terminal descriptions without paying the
1329performance penalty.
1330Set
1331.I \%NCURSES_NO_PADDING
1332to any value to disable all but mandatory padding.
1333Mandatory padding is used by such terminal capabilities as
1334.B \%flash_screen
1335.RB ( flash ).
1336.SS "\fINCURSES_NO_SETBUF\fP"
1337(Obsolete)
1338Prior to internal changes developed in
1339.I \%ncurses
13405.9
1341(patches 20120825 through 20130126),
1342the library used \fI\%setbuf\fP(3) to enable fully buffered output when
1343initializing the terminal.
1344This was done,
1345as in SVr4
1346.IR curses ,
1347to increase performance.
1348For testing purposes,
1349both of
1350.I \%ncurses
1351and of certain applications,
Steve Kondikae271bc2015-11-15 02:50:53 +01001352this feature was made optional.
micky3879b9f5e72025-07-08 18:04:53 -04001353Setting this variable disabled output buffering,
1354leaving the output stream in the original
1355(usually line-buffered)
1356mode.
Steve Kondikae271bc2015-11-15 02:50:53 +01001357.PP
micky3879b9f5e72025-07-08 18:04:53 -04001358Nowadays,
1359.I \%ncurses
1360performs its own buffering and does not require this workaround;
1361it does not modify the buffering of the standard output stream.
1362This approach makes signal handling,
1363as for interrupts,
1364more robust.
1365A drawback is that certain unconventional programs mixed
1366\fI\%stdio\fP(3) calls with
1367.I \%ncurses
1368calls and (usually)
1369got the behavior they expected.
1370This is no longer the case;
1371.I \%ncurses
1372does not write to the standard output file descriptor through a
1373.IR stdio -buffered
1374stream.
Steve Kondikae271bc2015-11-15 02:50:53 +01001375.PP
micky3879b9f5e72025-07-08 18:04:53 -04001376As a special case,
1377low-level API calls such as \fB\%putp\fP(3X) still use the
1378standard output stream.
1379High-level
1380.I curses
1381calls such as \fB\%printw\fP(3X) do not.
1382.SS "\fINCURSES_NO_UTF8_ACS\fP"
1383At initialization,
1384.I \%ncurses
1385inspects the
1386.I TERM
1387environment variable for special cases where VT100 forms-drawing
1388characters
1389(and the corresponding alternate character set
1390.I \%term\%info
1391capabilities)
1392are known to be unsupported by terminal types that otherwise claim VT100
1393compatibility.
1394Specifically,
1395when running in a UTF-8 locale,
1396the Linux virtual console device and the GNU \fI\%screen\fP(1)
1397program ignore them.
1398Set this variable to a nonzero value to instruct
1399.I \%ncurses
1400that the terminal's ACS support is broken;
1401the library then outputs Unicode code points that correspond to the
1402forms-drawing
1403characters.
1404Set it to zero
1405(or a non-integer)
1406to disable the special check for terminal type names matching
1407\*(``linux\*('' or \*(``screen\*('',
1408directing
1409.I \%ncurses
1410to assume that the ACS feature works if the terminal type description
1411advertises it.
Steve Kondikae271bc2015-11-15 02:50:53 +01001412.PP
micky3879b9f5e72025-07-08 18:04:53 -04001413As an alternative to use of this variable,
1414.I \%ncurses
1415checks for an extended
1416.I \%term\%info
1417numeric capability \fBU8\fP
1418that can be compiled using
1419.RB \*(`` "@TIC@ \-x" \*(''.
1420Examples follow.
Steve Kondikae271bc2015-11-15 02:50:53 +01001421.PP
Steve Kondikae271bc2015-11-15 02:50:53 +01001422.RS 3
micky3879b9f5e72025-07-08 18:04:53 -04001423.EX
Steve Kondikae271bc2015-11-15 02:50:53 +01001424# linux console, if patched to provide working
micky3879b9f5e72025-07-08 18:04:53 -04001425# VT100 shift\-in/shift\-out, with corresponding font.
1426linux\-vt100|linux console with VT100 line\-graphics,
Steve Kondikae271bc2015-11-15 02:50:53 +01001427 U8#0, use=linux,
micky3879b9f5e72025-07-08 18:04:53 -04001428\&
Steve Kondikae271bc2015-11-15 02:50:53 +01001429# uxterm with vt100Graphics resource set to false
micky3879b9f5e72025-07-08 18:04:53 -04001430xterm\-utf8|xterm relying on UTF\-8 line\-graphics,
Steve Kondikae271bc2015-11-15 02:50:53 +01001431 U8#1, use=xterm,
micky3879b9f5e72025-07-08 18:04:53 -04001432.EE
Steve Kondikae271bc2015-11-15 02:50:53 +01001433.RE
1434.PP
micky3879b9f5e72025-07-08 18:04:53 -04001435The two-character name \*(``U8\*('' was chosen to permit its use via
1436.IR \%ncurses 's
1437.I termcap
1438interface.
1439.SS "\fINCURSES_TRACE\fP"
1440At initialization,
1441.I \%ncurses
1442(in its debugging configuration)
1443checks for this variable's presence.
1444If defined with an integral value,
1445the library calls \fB\%curses_trace\fP(3X) with that value as the
1446argument.
1447.SS "\fITERM\fP"
1448The
1449.I TERM
1450variable denotes the terminal type.
1451Each is distinct,
1452though many are similar.
1453It is commonly set by terminal emulators to help applications find a
1454workable terminal description.
1455Some choose a popular approximation such as \*(``ansi\*('',
1456\*(``vt100\*('', or \*(``xterm\*('' rather than an exact fit to their
1457capabilities.
1458Not infrequently,
1459an application will have problems with that approach;
1460for example,
1461a key stroke may not operate correctly,
1462or produce no effect but seeming garbage characters on the screen.
Steve Kondikae271bc2015-11-15 02:50:53 +01001463.PP
micky3879b9f5e72025-07-08 18:04:53 -04001464Setting
1465.I TERM
1466has no effect on hardware operation;
1467it affects the way applications communicate with the terminal.
1468Likewise,
1469as a general rule
1470(\fIxterm\fP(1) being a rare exception),
1471terminal emulators that allow you to specify
1472.I TERM
1473as a parameter or configuration value do not change their behavior to
1474match that setting.
1475.SS "\fITERMCAP\fP"
1476If
1477.I \%ncurses
1478is configured with
1479.I termcap
1480support,
1481it checks for a terminal type description in
1482.I termcap
1483format if one in
1484.I \%term\%info
1485format is not available.
1486Setting this variable directs
1487.I \%ncurses
1488to ignore the usual
1489.I termcap
1490database location,
1491.IR \%/etc/termcap ;
1492see
1493.I \%TERMPATH
1494below.
1495.I \%TERMCAP
1496should contain either a terminal description
1497(with newlines stripped out),
1498or a file name indicating where the information required by the
1499.I TERM
1500environment variable is stored.
1501.SS "\fITERMINFO\fP"
1502.I \%ncurses
1503can be configured to read terminal type description databases in various
1504locations using different formats.
1505This variable overrides the default location.
1506.bP
1507Descriptions in
1508.I \%term\%info
1509format are normally stored in a directory tree using subdirectories
1510named by the common first letters of the terminal types named therein.
1511This is the scheme used in System\ V.
1512.bP
1513If
1514.I \%ncurses
1515is configured to use hashed databases,
1516then
1517.I \%TERM\%INFO
1518may name its location,
1519such as
1520.IR \%/usr/share/terminfo.db ,
1521rather than
1522.IR \%/usr/share/terminfo/ .
Steve Kondikae271bc2015-11-15 02:50:53 +01001523.PP
micky3879b9f5e72025-07-08 18:04:53 -04001524The hashed database uses less disk space and is a little faster than the
1525directory tree.
1526However,
1527some applications assume the existence of the directory tree,
1528and read it directly
1529rather than using the
1530.I \%term\%info
1531API.
1532.bP
1533If
1534.I \%ncurses
1535is configured with
1536.I termcap
1537support,
1538this variable may contain the location of a
1539.I \%termcap
1540file.
1541.bP
1542If the value of
1543.I \%TERM\%INFO
1544begins with \*(``hex:\*('' or \*(``b64:\*('',
1545.I \%ncurses
1546uses the remainder of the value as a compiled
1547.I \%term\%info
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301548description.
micky3879b9f5e72025-07-08 18:04:53 -04001549You might produce the base64 format using \fB\%infocmp\fP(1M).
1550.RS 4
1551.IP
1552.EX
1553TERMINFO=$(infocmp \-0 \-Q2 \-q)
1554export TERMINFO
1555.EE
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301556.RE
micky3879b9f5e72025-07-08 18:04:53 -04001557.IP
1558The compiled description is used only if it corresponds to the terminal
1559type identified by
1560.IR TERM .
1561.PP
1562Setting
1563.I \%TERM\%INFO
1564is the simplest,
1565but not the only,
1566way to direct
1567.I \%ncurses
1568to a terminal database.
1569The search path is as follows.
1570.bP
1571the last terminal database to which the running
1572.I \%ncurses
1573application wrote,
1574if any
1575.bP
1576the location specified by the
1577.I \%TERM\%INFO
1578environment variable
1579.bP
1580.I $HOME/.terminfo
1581.bP
1582locations listed in the
1583.I \%TERMINFO_DIRS
1584environment variable
1585.ds td \" empty
1586.if !'@TERMINFO_DIRS@'no default value' .as td @TERMINFO_DIRS@
1587.if !'@TERMINFO@\*(td'' \{\
1588.bP
1589location(s) configured and compiled into
1590.I \%ncurses
1591.RS 3
1592.if !'\*(td'' \{\
1593.bP
1594.I \%@TERMINFO_DIRS@
1595.\}
1596.if !'@TERMINFO'' .if !'\*(td'@TERMINFO@' \{\
1597.bP
1598.I \%@TERMINFO@
1599.\}
1600.\}
Steve Kondikae271bc2015-11-15 02:50:53 +01001601.RE
micky3879b9f5e72025-07-08 18:04:53 -04001602.SS "\fITERMINFO_DIRS\fP"
1603This variable specifies a list of locations,
1604akin to
1605.IR PATH ,
1606in which
1607.I \%ncurses
1608searches for the terminal type descriptions described by
1609.I \%TERMINFO
1610above.
1611The list items are separated by colons on Unix
1612and semicolons on OS/2 EMX.
1613System\ V
1614.I \%term\%info
1615lacks a corresponding feature;
1616.I \%TERMINFO_DIRS
1617is an
1618.I \%ncurses
1619extension.
1620.SS "\fITERMPATH\fP"
1621If
1622.I \%TERMCAP
1623does not hold a terminal type description or file name,
1624then
1625.I \%ncurses
1626checks the contents of
1627.IR \%TERMPATH ,
1628a list of locations,
1629akin to
1630.IR PATH ,
1631in which it searches for
1632.I termcap
1633terminal type descriptions.
1634The list items are separated by colons on Unix
1635and semicolons on OS/2 EMX.
Steve Kondikae271bc2015-11-15 02:50:53 +01001636.PP
micky3879b9f5e72025-07-08 18:04:53 -04001637If both
1638.I \%TERMCAP
1639and
1640.I \%TERMPATH
1641are unset or invalid,
1642.I \%ncurses
1643searches for the files
1644.IR \%/etc/termcap ,
1645.IR \%/usr/share/misc/termcap ,
1646and
1647.IR \%$HOME/.termcap ,
1648in that order.
1649.SH "ALTERNATE CONFIGURATIONS"
1650Many different
1651.I \%ncurses
1652configurations are possible,
1653determined by the options given to the
1654.I \%configure
1655script when building the library.
1656Run the script with the
1657.B \-\-help
1658option to peruse them all.
1659A few are of particular significance to the application developer
1660employing
1661.IR \%ncurses .
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301662.TP 5
micky3879b9f5e72025-07-08 18:04:53 -04001663.B \-\-disable\-overwrite
1664The standard include for \fI\%ncurses\fP is as noted in \fBSYNOPSIS\fP:
1665.RS 5
1666.PP
1667.RS 4
1668.EX
1669\fB#include <curses.h>\fP
1670.EE
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301671.RE
micky3879b9f5e72025-07-08 18:04:53 -04001672.PP
1673This option is used to avoid filename conflicts when \fI\%ncurses\fP
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301674is not the main implementation of curses of the computer.
micky3879b9f5e72025-07-08 18:04:53 -04001675If \fI\%ncurses\fP is installed disabling overwrite,
1676it puts its headers in a subdirectory,
1677e.g.,
1678.PP
1679.RS 4
1680.EX
1681\fB#include <ncurses/curses.h>\fP
1682.EE
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301683.RE
micky3879b9f5e72025-07-08 18:04:53 -04001684.PP
Steve Kondikae271bc2015-11-15 02:50:53 +01001685It also omits a symbolic link which would allow you to use \fB\-lcurses\fP
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301686to build executables.
micky3879b9f5e72025-07-08 18:04:53 -04001687.RE
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301688.TP 5
micky3879b9f5e72025-07-08 18:04:53 -04001689.B \-\-enable\-widec
Steve Kondikae271bc2015-11-15 02:50:53 +01001690The configure script renames the library and
1691(if the \fB\-\-disable\-overwrite\fP option is used)
1692puts the header files in a different subdirectory.
micky3879b9f5e72025-07-08 18:04:53 -04001693All of the library names have a \*(``w\*('' appended to them,
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301694i.e., instead of
micky3879b9f5e72025-07-08 18:04:53 -04001695.RS 5
1696.PP
1697.RS 4
1698.EX
1699\fB\-lncurses\fP
1700.EE
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301701.RE
micky3879b9f5e72025-07-08 18:04:53 -04001702.PP
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301703you link with
micky3879b9f5e72025-07-08 18:04:53 -04001704.PP
1705.RS 4
1706.EX
1707\fB\-lncursesw\fP
1708.EE
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301709.RE
micky3879b9f5e72025-07-08 18:04:53 -04001710.PP
1711You must also enable the wide-character features in the header file
1712when compiling for the wide-character library
1713to use the extended (wide-character) functions.
1714The symbol which enables these features has changed
1715since X/Open Curses, Issue 4:
1716.bP
1717Originally, the wide-character feature required the symbol
1718\fB_XOPEN_SOURCE_EXTENDED\fP
1719but that was only valid for XPG4 (1996).
1720.bP
1721Later, that was deemed conflicting with \fB_XOPEN_SOURCE\fP defined to 500.
1722.bP
1723As of mid-2018,
1724none of the features in this implementation require a \fB_XOPEN_SOURCE\fP
1725feature greater than 600.
1726However, X/Open Curses, Issue 7 (2009) recommends defining it to 700.
1727.bP
1728Alternatively, you can enable the feature by defining \fBNCURSES_WIDECHAR\fP
1729with the caveat that some other header file than \fBcurses.h\fP
1730may require a specific value for \fB_XOPEN_SOURCE\fP
1731(or a system-specific symbol).
1732.PP
1733The \fI\%curses.h\fP header file installed for the wide-character
1734library is designed to be compatible with the non-wide library's header.
1735Only the size of the \fI\%WINDOW\fP structure differs;
1736few applications require more than pointers to \fI\%WINDOW\fPs.
1737.PP
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301738If the headers are installed allowing overwrite,
1739the wide-character library's headers should be installed last,
1740to allow applications to be built using either library
1741from the same set of headers.
micky3879b9f5e72025-07-08 18:04:53 -04001742.RE
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301743.TP 5
micky3879b9f5e72025-07-08 18:04:53 -04001744.B \-\-with\-pthread
Steve Kondikae271bc2015-11-15 02:50:53 +01001745The configure script renames the library.
micky3879b9f5e72025-07-08 18:04:53 -04001746All of the library names have a \*(``t\*('' appended to them
1747(before any \*(``w\*('' added by \fB\-\-enable\-widec\fP).
Steve Kondikae271bc2015-11-15 02:50:53 +01001748.IP
1749The global variables such as \fBLINES\fP are replaced by macros to
1750allow read-only access.
1751At the same time, setter-functions are provided to set these values.
1752Some applications (very few) may require changes to work with this convention.
1753.TP 5
micky3879b9f5e72025-07-08 18:04:53 -04001754.B \-\-with\-shared
1755.tQ
1756.B \-\-with\-normal
1757.tQ
1758.B \-\-with\-debug
1759.tQ
1760.B \-\-with\-profile
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301761The shared and normal (static) library names differ by their suffixes,
1762e.g., \fBlibncurses.so\fP and \fBlibncurses.a\fP.
micky3879b9f5e72025-07-08 18:04:53 -04001763The debug and profiling libraries add a \*(``_g\*(''
1764and a \*(``_p\*('' to the root names respectively,
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301765e.g., \fBlibncurses_g.a\fP and \fBlibncurses_p.a\fP.
1766.TP 5
micky3879b9f5e72025-07-08 18:04:53 -04001767.B \-\-with\-termlib
1768Low-level functions which do not depend upon whether the library
1769supports wide-characters, are provided in the tinfo library.
1770.IP
1771By doing this, it is possible to share the tinfo library between
1772wide/normal configurations as well as reduce the size of the library
1773when only low-level functions are needed.
1774.IP
1775Those functions are described in these pages:
1776.RS
1777.bP
1778\fB\%curs_extend\fP(3X) \- miscellaneous \fIcurses\fP extensions
1779.bP
1780\fB\%curs_inopts\fP(3X) \- \fIcurses\fP input options
1781.bP
1782\fB\%curs_kernel\fP(3X) \- low-level \fIcurses\fP routines
1783.bP
1784\fB\%curs_termattrs\fP(3X) \- \fIcurses\fP environment query routines
1785.bP
1786\fB\%curs_termcap\fP(3X) \- \fIcurses\fP emulation of \fItermcap\fP
1787.bP
1788\fB\%curs_terminfo\fP(3X) \- \fIcurses\fP interface to \fIterminfo\fP
1789database
1790.bP
1791\fB\%curs_util\fP(3X) \- miscellaneous \fIcurses\fP utility routines
1792.RE
1793.TP 5
1794.B \-\-with\-trace
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301795The \fBtrace\fP function normally resides in the debug library,
1796but it is sometimes useful to configure this in the shared library.
1797Configure scripts should check for the function's existence rather
1798than assuming it is always in the debug library.
1799.SH FILES
micky3879b9f5e72025-07-08 18:04:53 -04001800.TP
1801.I @DATADIR@/tabset
1802tab stop initialization database
1803.TP
1804.I \*d
1805compiled terminal capability database
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301806.SH NOTES
micky3879b9f5e72025-07-08 18:04:53 -04001807X/Open Curses permits most functions it specifies to be made available
1808as macros as well.
1809.\" See X/Open Curses Issue 4, Version 2, pp. 227-234.
1810.\" See X/Open Curses Issue 7, pp. 311-318.
1811\fI\%ncurses\fP does so
1812.bP
1813for functions that return values via their parameters,
1814.bP
1815to support obsolete features,
1816.bP
1817to reuse functions
1818(for example,
1819those that move the cursor before another operation),
1820and
1821.bP
1822a few special cases.
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301823.PP
micky3879b9f5e72025-07-08 18:04:53 -04001824If the standard output file descriptor of an
1825.I \%ncurses
1826program is redirected to something that is not a terminal device,
1827the library writes screen updates to the standard error file descriptor.
1828This was an undocumented feature of SVr3
1829.IR curses .
1830.PP
1831See subsection \*(``Header Files\*('' below regarding symbols exposed by
1832inclusion of \fI\%curses.h\fP.
1833.SH EXTENSIONS
1834.I \%ncurses
1835enables an application to capture mouse events on certain terminals,
1836including \fI\%xterm\fP(1);
1837see \fB\%curs_mouse\fP(3X).
1838.PP
1839.I \%ncurses
1840provides a means of responding to window resizing events,
1841as when running in a GUI terminal emulator application such as
1842.IR \%xterm ;
1843see \fB\%resizeterm\fP(3X) and \fB\%wresize\fP(3X).
1844.PP
1845.I \%ncurses
1846allows an application to query the terminal for the presence of a wide
1847variety of special keys;
1848see \fB\%has_key\fP(3X).
1849.PP
1850.I \%ncurses
1851extends the fixed set of function key capabilities specified by X/Open
1852Curses by allowing the application programmer to define additional key
1853events at runtime;
1854see
1855\fB\%define_key\fP(3X),
1856\fB\%key_defined\fP(3X),
1857\fB\%keybound\fP(3X),
1858and
1859\fB\%keyok\fP(3X).
1860.PP
1861.I \%ncurses
1862can exploit the capabilities of terminals implementing ISO\ 6429/ECMA-48
1863SGR\ 39 and SGR\ 49 sequences,
1864which allow an application to reset the terminal to its original
1865foreground and background colors.
1866From a user's perspective,
1867the application is able to draw colored text on a background whose color
1868is set independently,
1869providing better control over color contrasts.
1870See \fB\%default_colors\fP(3X).
1871.PP
1872An
1873.I \%ncurses
1874application can eschew knowledge of
1875.I \%WINDOW
1876structure internals,
1877instead using accessor functions such as
1878\fB\%is_scrollok\fP(3X).
1879.PP
1880.I \%ncurses
1881enables an application to direct application output to a printer
1882attached to the terminal device;
1883see \fB\%curs_print\fP(3X).
1884.PP
1885.I \%ncurses
1886offers \fB\%slk_attr\fP(3X) as a counterpart of \fB\%attr_get\fP(3X) for
1887soft-label key lines,
1888and \fB\%extended_slk_color\fP(3X) as a form of \fB\%slk_color\fP(3X)
1889that can gather color information from them when many colors are
1890supported.
1891.PP
1892Some extensions are available only if
1893.I \%ncurses
1894permits modification of \fB\%unctrl\fP(3X)'s behavior;
1895see \fB\%use_legacy_coding\fP(3X).
1896.I \%ncurses
1897is compiled to support them;
1898section \*(``ALTERNATE CONFIGURATIONS\*('' describes how.
1899.bP
1900Rudimentary support for multi-threaded applications may be available;
1901see \fBcurs_threads\fP(3X).
1902.bP
1903Functions that ease the management of multiple screens can be exposed;
1904see \fBcurs_sp_funcs\fP(3X).
1905.bP
1906To aid applications to debug their memory usage,
1907.I ncurses
1908optionally offers functions to more aggressively free memory it
1909dynamically allocates itself;
1910see \fBcurs_memleaks\fP(3X).
1911.bP
1912The library facilitates auditing and troubleshooting of its behavior;
1913see \fBcurs_trace\fP(3X).
1914.bP
1915The compiler option
1916.B \%\-DUSE_GETCAP
1917causes the library to fall back to reading
1918.I \%/etc/termcap
1919if the terminal setup code cannot find a
1920.I \%term\%info
1921entry corresponding to
1922.IR TERM .
1923Use of this feature is not recommended,
1924as it essentially includes an entire
1925.I termcap
1926compiler in the
1927.I \%ncurses
1928startup code,
1929at a cost in memory usage and application launch latency.
1930.PP
1931.I \%PDCurses
1932and NetBSD
1933.I curses
1934incorporate some
1935.I \%ncurses
1936extensions.
1937Individual man pages indicate where this is the case.
1938.SH PORTABILITY
1939X/Open Curses defines two levels of conformance,
1940\*(``base\*('' and \*(``enhanced\*(''.
1941The latter includes several additional features,
1942such as wide-character and color support.
1943.I \%ncurses
1944intends base-level conformance with X/Open Curses,
1945and supports all features of its enhanced level
1946except the \fB\%untic\fP utility.
1947.PP
1948Differences between X/Open Curses and
1949.I \%ncurses
1950are documented in the \*(``PORTABILITY\*('' sections of applicable man
1951pages.
1952.SS "Error Checking"
1953In many cases, X/Open Curses is vague about error conditions,
1954omitting some of the SVr4 documentation.
1955.PP
1956Unlike other implementations,
1957.I \%ncurses
1958checks pointer parameters,
1959such as those to
1960.I \%WINDOW
1961structures,
1962to ensure that they are not null.
1963This is done primarily to guard against programmer error.
1964The standard interface does not provide a way for the library
1965to tell an application which of several possible errors occurred.
1966Relying on this
1967(or some other)
1968extension adversely affects the portability of
1969.I curses
1970applications.
1971.SS "Padding Differences"
1972In historical
1973.I curses
1974implementations,
1975delays embedded in the
1976.I \%term\%info
1977capabilities
1978.B \%carriage_return
1979.RB ( cr ),
1980.B \%scroll_forward
1981.RB ( ind ),
1982.B \%cursor_left
1983.RB ( cub1 ),
1984.B \%form_feed
1985.RB ( ff ),
1986and
1987.B \%tab
1988.RB ( ht )
1989activated corresponding delay bits in the Unix terminal driver.
1990.I \%ncurses
1991performs all padding by sending NUL bytes to the device.
1992This method is slightly more expensive,
1993but narrows the interface to the Unix kernel significantly and
1994correspondingly increases the package's portability.
1995.SS "Header Files"
1996The header file
1997.I \%curses.h
1998itself includes the header files
1999.I \%stdio.h
2000and
2001.IR \%unctrl.h .
2002.PP
2003X/Open Curses has more to say,
2004.RS 4
2005.PP
2006The inclusion of
2007.I \%curses.h
2008may make visible all symbols from the headers
2009.IR \%stdio.h ,
2010.IR \%term.h ,
2011.IR \%termios.h ,
2012and
2013.IR \%wchar.h .
2014.RE
2015.PP
2016but does not finish the story.
2017A more complete account follows.
2018.bP
2019Starting with 4BSD
2020.I curses
2021(1980)
2022all implementations have provided a
2023.I \%curses.h
2024file.
2025.IP
2026BSD
2027.I curses
2028code included
2029.I \%curses.h
2030and
2031.I \%unctrl.h
2032from an internal header file
2033.IR \%curses.ext ,
2034where
2035\*(``ext\*('' abbreviated \*(``externs\*(''.
2036.IP
2037The implementations of
2038.I \%printw
2039and
2040.I \%scanw
2041used undocumented internal functions of the standard I/O library
2042.RI ( _doprnt
2043and
2044.IR _doscan ),
2045but nothing in
2046.I \%curses.h
2047itself relied upon
2048.IR \%stdio.h .
2049.bP
2050SVr2
2051.I curses
2052added
2053.IR \%newterm ,
2054which relies upon
2055.I \%stdio.h
2056because its function prototype employs the
2057.I FILE
2058type.
2059.IP
2060SVr4
2061.I curses
2062added
2063.I \%putwin
2064and
2065.IR \%getwin ,
2066which also use
2067.IR \%stdio.h .
2068.IP
2069X/Open Curses specifies all three of these functions.
2070.IP
2071SVr4
2072.I curses
2073and X/Open Curses do not require the developer to include
2074.I \%stdio.h
2075before
2076.IR \%curses.h .
2077Both document use of
2078.I curses
2079as requiring only
2080.IR \%curses.h .
2081.IP
2082As a result,
2083standard
2084.I \%curses.h
2085always includes
2086.IR \%stdio.h .
2087.bP
2088X/Open Curses and SVr4
2089.I curses
2090are inconsistent with respect to
2091.IR \%unctrl.h .
2092.IP
2093As noted in \fBcurs_util\fP(3X),
2094.I \%ncurses
2095includes
2096.I \%unctrl.h
2097from
2098.I \%curses.h
2099(as SVr4 does).
2100.bP
2101X/Open Curses's comments about
2102.I \%term.h
2103and
2104.I \%termios.h
2105may refer to HP-UX and AIX.
2106.IP
2107HP-UX
2108.I curses
2109includes
2110.I \%term.h
2111from
2112.I \%curses.h
2113to declare
2114.I \%setupterm
2115in
2116.IR \%curses.h ,
2117but
2118.I \%ncurses
2119and Solaris
2120.I curses
2121do not.
2122.IP
2123AIX
2124.I curses
2125includes
2126.I \%term.h
2127and
2128.IR \% termios.h .
2129Again,
2130.I \%ncurses
2131and Solaris
2132.I curses
2133do not.
2134.bP
2135X/Open Curses says that
2136.I \%curses.h
2137.B may
2138include
2139.IR \%term.h ,
2140but does not require it to do so.
2141.IP
2142Some programs use functions declared in both
2143.I \%curses.h
2144and
2145.IR \%term.h ,
2146and must include both header files in the same module.
2147Very old versions of AIX
2148.I curses
2149required inclusion of
2150.I \%curses.h
2151before
2152.IR \%term.h .
2153.IP
2154The header files supplied by
2155.I \%ncurses
2156include the standard library headers required for its declarations,
2157so
2158.IR \%ncurses 's
2159own header files can be included in any order.
2160But for portability,
2161you should include
2162.I \%curses.h
2163before
2164.IR \%term.h .
2165.bP
2166X/Open Curses says \*(``may make visible\*('' because including a header
2167file does not necessarily make visible all of the symbols in it
2168(consider
2169.B \%#ifdef
2170and similar).
2171.IP
2172For instance,
2173.IR \%ncurses 's
2174.I \%curses.h
2175.B may \" bold to contrast with preceding italic
2176include
2177.I \%wchar.h
2178if the proper symbol is defined,
2179and if
2180.I \%ncurses
2181is configured for wide-character support.
2182If
2183.I \%wchar.h
2184is included,
2185its symbols
2186.B may \" bold for consistency in this paragraph
2187be made visible depending on the value of the
2188.B _XOPEN_SOURCE
2189feature test macro.
2190.bP
2191X/Open Curses mandates an application's inclusion of one standard C
2192library header in a special case:
2193.I \%stdarg.h
2194before
2195.I \%curses.h
2196to prototype the functions
2197.I \%vw_printw
2198and
2199.I \%vw_scanw
2200(as well as the obsolete
2201.I \%vwprintw
2202and
2203.IR \%vwscanw ).
2204Each of these takes a variadic argument list,
2205a
2206.I \%va_list
2207parameter,
2208like that of \fI\%printf\fP(3).
2209.IP
2210SVr3
2211.I curses
2212introduced
2213the two obsolete functions,
2214and X/Open Curses the others.
2215In between,
2216SVr4
2217.I curses
2218provided for the possibility that an application might include either
2219.I \%varargs.h
2220or
2221.IR \%stdarg.h .
2222These represented contrasting approaches to handling variadic
2223argument lists.
2224The older interface,
2225.IR \%varargs.h ,
2226used a pointer to
2227.I char \" V7, 32V, System III, 3BSD
2228for variadic functions'
2229.I \%va_list
2230parameter.
2231Later,
2232the list acquired its own standard data type,
2233.IR \%va_list ,
2234defined in
2235.IR \%stdarg.h ,
2236empowering the compiler to check the types of a function call's actual
2237parameters against the formal ones declared in its prototype.
2238.IP
2239No conforming implementations of X/Open Curses require an application
2240to include
2241.I \%stdarg.h
2242before
2243.I \%curses.h
2244because they either have allowed for a special type,
2245or,
2246like
2247.IR \%ncurses ,
2248they include
2249.I \%stdarg.h
2250themselves to provide a portable interface.
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302251.SH AUTHORS
micky3879b9f5e72025-07-08 18:04:53 -04002252Zeyd M. Ben-Halim,
2253Eric S. Raymond,
2254Thomas E. Dickey.
2255Based on
2256.I \%pcurses
2257by Pavel Curtis.
2258.SH SEE ALSO
2259\fB\%curs_variables\fP(3X),
2260\fB\%terminfo\fP(5),
2261\fB\%user_caps\fP(5)