*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->Tru64 Unix man pages -> initscr (3)              
Title
Content
Arch
Section
 

curs_initscr(3)

Contents


NAME    [Toc]    [Back]

       curs_initscr,    initscr,   newterm,   endwin,   isendwin,
       set_term, delscreen - Curses routines for screen  initialization
 and manipulation

SYNOPSIS    [Toc]    [Back]

       #include <curses.h>

       WINDOW *initscr(
               void ); int endwin(
               void ); int isendwin(
               void ); SCREEN *newterm(
               char *type,
               FILE *outfd,
               FILE *infd ); SCREEN *set_term(
               SCREEN *new ); void delscreen(
               SCREEN *sp );

LIBRARY    [Toc]    [Back]

       Curses Library (libcurses)

STANDARDS    [Toc]    [Back]

       Interfaces  documented  on  this reference page conform to
       industry standards as follows:

       delscreen,    initscr,    endwin,    isendwin,    newterm,
       set_term:  XCURSES4.2

       Refer to the standards(5) reference page for more information
 about industry standards and associated tags.

DESCRIPTION    [Toc]    [Back]

       The initscr routine is almost  always  the  first  routine
       that applications call. (The exceptions are slk_init, filter,
 ripoffline, use_env and, for multiple-terminal applications,
  newterm).  The  initscr  routine  determines the
       terminal type and initializes all Curses data  structures.
       The routine also causes the first call to refresh to clear
       the screen. If errors occur, initscr writes an appropriate
       error message to standard error and then exits; otherwise,
       the routine returns a pointer to stdscr.  If  the  program
       needs an indication of error conditions, newterm should be
       used instead of initscr; initscr  should  only  be  called
       once per application.

       A  program  that  outputs to more than one terminal should
       use the newterm  routine  for  each  terminal  instead  of
       initscr.  A program that needs an indication of error conditions,
 so it can continue to run in a line-oriented mode
       if  the terminal cannot support a screen-oriented program,
       would also use newterm. An application calls newterm  once
       for  each terminal. The routine returns a variable of type
       SCREEN * that should be saved as a reference to that  terminal.
  The routine's arguments are the type of the terminal
 to be used in place of $TERM, a file pointer for  output
  to  the  terminal, and another file pointer for input
       from the terminal.  (If type  is  NULL,  $TERM  is  used).
       Before  exiting  Curses, the program must also call endwin
       for each terminal being used. If the program calls newterm
       more  than  once for the same terminal, the first terminal
       referred to must be the  last  one  for  which  endwin  is
       called.

       A  program  should  always  call  endwin before exiting or
       escaping  from  Curses  mode  temporarily.  This   routine
       restores  tty  modes,  moves the cursor to the lower lefthand
 corner of the screen, and resets  the  terminal  into
       the  proper  nonvisual  mode.  Calling refresh or doupdate
       after a temporary escape  causes  the  program  to  resume
       visual mode.

       The  isendwin  routine  returns  TRUE  if  endwin has been
       called without any subsequent calls  to  wrefresh;  otherwise,
 the routine returns FALSE.

       The set_term routine switches between different terminals.
       The screen reference new becomes the new current terminal.
       The  routine  returns  the  previous terminal. This is the
       only routine that manipulates SCREEN pointers;  all  other
       routines affect only the current terminal.

       The  delscreen  routine  frees storage associated with the
       SCREEN data structure. The endwin routine does not perform
       this  operation,  so  applications  should  call delscreen
       after endwin if a particular SCREEN is no  longer  needed.
       Applications  must  also  close  file  pointers  passed to
       newterm.

NOTES    [Toc]    [Back]

       The header  file  <curses.h>  automatically  includes  the
       header file <stdio.h>.

RETURN VALUES    [Toc]    [Back]

       The  endwin  routine  returns the integer ERR upon failure
       and OK upon successful completion.

       Routines that return pointers always return NULL on error.

SEE ALSO    [Toc]    [Back]

      
      
       Functions:   curses(3),  curs_kernel(3),  curs_refresh(3),
       curs_slk(3), curs_util(3)

       Others: standards(5)



                                                  curs_initscr(3)
[ Back ]
 Similar pages
Name OS Title
curs_initscr OpenBSD curses screen initialization and manipulation routines
newterm OpenBSD curses screen initialization and manipulation routines
endwin OpenBSD curses screen initialization and manipulation routines
delscreen OpenBSD curses screen initialization and manipulation routines
newterm FreeBSD curses screen initialization and manipulation routines
isendwin OpenBSD curses screen initialization and manipulation routines
initscr OpenBSD curses screen initialization and manipulation routines
set_term OpenBSD curses screen initialization and manipulation routines
set_term FreeBSD curses screen initialization and manipulation routines
initscr FreeBSD curses screen initialization and manipulation routines
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service