endwin man page on NetBSD

Man page or keyword search:  
man Server   9087 pages
apropos Keyword Search (all sections)
Output format
NetBSD logo
[printable version]

CURSES_SCREEN(3)	 BSD Library Functions Manual	      CURSES_SCREEN(3)

NAME
     curses_screen, newterm, set_term, delscreen, endwin, initscr, isendwin,
     resizeterm, setterm — curses terminal and screen routines

LIBRARY
     Curses Library (libcurses, -lcurses)

SYNOPSIS
     #include <curses.h>

     SCREEN *
     newterm(char *type, FILE *outfd, FILE *infd);

     SCREEN *
     set_term(SCREEN *screen);

     void
     delscreen(SCREEN *screen);

     int
     endwin(void);

     WINDOW *
     initscr(void);

     bool
     isendwin(void);

     int
     resizeterm(int lines, int cols);

     int
     setterm(char *name);

     extern int LINES;

     extern int COLS;

DESCRIPTION
     These functions initialize terminals and screens.

     The newterm() function initialises the curses data structures and point‐
     ers ready for use by curses.  The type argument points to a termcap(5)
     capability name, or it may be NULL in which case the TERM environment
     variable is used.	The outfd and infd are the output and input file
     descriptors for the terminal.  The newterm() function must only be called
     once  per terminal.

     The set_term() function can be used to switch between the screens defined
     by calling newterm(), a pointer to the previous screen structure that was
     in use will be returned on success.

     Calling delscreen() will destroy the given screen and free all allocated
     resources.

     Calling endwin() will end the curses session and restore the saved termi‐
     nal settings.

     The curses session must be initialised by calling initscr() which saves
     the current terminal state and sets up the terminal and internal data
     structures to support the curses application.  This function call must
     be, with few exceptions, the first Curses library call made.  The excep‐
     tion to this rule is the newterm() call which may be called prior to
     initscr().	 The size of the curses screen is determined by checking the
     tty(4) size and then the termcap(5) entries for the terminal type.	 If
     the environment variables LINES or COLS are set, then these will be used
     instead.

     When either newterm() or initscr() are called, the Curses library sets up
     signal handlers for SIGTSTP and SIGWINCH.	If a signal handler is already
     installed for SIGWINCH, this will also be called when the Curses library
     handler is called.

     The isendwin() function can be used to determine whether or not a refresh
     of the screen has occurred since the last call to endwin().

     The size of the screen may be changed  by calling resizeterm() with the
     updated number of lines and columns.  This will resize the curses inter‐
     nal data structures to accommodate the changed terminal geometry.	The
     curscr and stdscr windows and any of their subwindows will be resized to
     fit the new screen size.  The application must redraw the screen after a
     call to resizeterm().

     The setterm() function sets the terminal type for the current screen to
     the one passed, initialising all the curses internal data structures with
     information related to the named terminal.	 The name argument must be a
     valid name or alias in the termcap(5) database for this function to suc‐
     ceed.

RETURN VALUES
     Functions returning pointers will return NULL if an error is detected.
     The functions that return an int will return one of the following values:

     OK	  The function completed successfully.
     ERR  An error occurred in the function.

SEE ALSO
     curses_window(3), tty(4), termcap(5), signal(7)

STANDARDS
     The NetBSD Curses library complies with the X/Open Curses specification,
     part of the Single Unix Specification.

HISTORY
     The Curses package appeared in 4.0BSD.  The resizeterm() function is a
     ncurses extension to the Curses library and was added in NetBSD 1.6.

BSD			       October 24, 2007				   BSD
[top]
                             _         _         _ 
                            | |       | |       | |     
                            | |       | |       | |     
                         __ | | __ __ | | __ __ | | __  
                         \ \| |/ / \ \| |/ / \ \| |/ /  
                          \ \ / /   \ \ / /   \ \ / /   
                           \   /     \   /     \   /    
                            \_/       \_/       \_/ 
More information is available in HTML format for server NetBSD

List of man pages available for NetBSD

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net