icon Top 9 categories map      RocketAware > man pages >

curs_kernel(3)

Tips: Browse or Search all pages for efficient awareness of more than 6000 of the most popular reusable and open source applications, functions, libraries, and FAQs.


The "RKT couplings" below include links to source code, updates, additional information, advice, FAQs, and overviews.


Home

Search all pages


Subjects

By activity
Professions, Sciences, Humanities, Business, ...

User Interface
Text-based, GUI, Audio, Video, Keyboards, Mouse, Images,...

Text Strings
Conversions, tests, processing, manipulation,...

Math
Integer, Floating point, Matrix, Statistics, Boolean, ...

Processing
Algorithms, Memory, Process control, Debugging, ...

Stored Data
Data storage, Integrity, Encryption, Compression, ...

Communications
Networks, protocols, Interprocess, Remote, Client Server, ...

Hard World
Timing, Calendar and Clock, Audio, Video, Printer, Controls...

File System
Management, Filtering, File & Directory access, Viewers, ...

    

RocketLink!--> Man page versions: OpenBSD FreeBSD Others






curs_kernel(3)                                     curs_kernel(3)


NAME
       def_prog_mode,       def_shell_mode,      reset_prog_mode,
       reset_shell_mode, resetty, savetty, getsyx, setsyx, ripof-
       fline, curs_set, napms - low-level curses routines



SYNOPSIS
       #include <curses.h>

       int def_prog_mode(void);
       int def_shell_mode(void);
       int reset_prog_mode(void);
       int reset_shell_mode(void);
       int resetty(void);
       int savetty(void);
       void getsyx(int y, int x);
       void setsyx(int y, int x);
       int ripoffline(int line, int (*init)(WINDOW *, int));
       int curs_set(int visibility);
       int napms(int ms);

DESCRIPTION
       The  following  routines  give low-level access to various
       curses capabilities.  Theses routines typically  are  used
       inside library routines.

       The  def_prog_mode  and  def_shell_mode  routines save the
       current terminal modes as the  "program"  (in  curses)  or
       "shell"   (not   in   curses)   state   for   use  by  the
       reset_prog_mode and reset_shell_mode  routines.   This  is
       done  automatically  by  initscr.   There is one such save
       area for each screen context allocated by newterm().

       The reset_prog_mode and reset_shell_mode routines  restore
       the  terminal  to "program" (in curses) or "shell" (out of
       curses) state.  These are  done  automatically  by  endwin
       and,  after  an  endwin, by doupdate, so they normally are
       not called.

       The resetty and savetty  routines  save  and  restore  the
       state  of  the  terminal modes.  savetty saves the current
       state in a buffer and resetty restores the state  to  what
       it was at the last call to savetty.

       The  getsyx routine returns the current coordinates of the
       virtual screen cursor in y and x.  If leaveok is currently
       TRUE,  then -1,-1 is returned.  If lines have been removed
       from the top of the screen,  using  ripoffline,  y  and  x
       include  these  lines;  therefore,  y and x should be used
       only as arguments for setsyx.

       The setsyx routine sets the virtual screen cursor to y, x.
       If y and x are both -1, then leaveok is set.  The two rou-
       tines getsyx and setsyx are  designed  to  be  used  by  a
       library routine, which manipulates curses windows but does



                                                                1





curs_kernel(3)                                     curs_kernel(3)


       not want to change the current position of  the  program's
       cursor.   The  library  routine  would  call getsyx at the
       beginning, do its manipulation of its own  windows,  do  a
       wnoutrefresh  on  its  windows, call setsyx, and then call
       doupdate.

       The ripoffline routine provides access to the same  facil-
       ity  that  slk_init  [see  curs_slk(3)] uses to reduce the
       size of the screen.   ripoffline  must  be  called  before
       initscr or newterm is called.  If line is positive, a line
       is removed from the top of stdscr; if line is negative,  a
       line is removed from the bottom.  When this is done inside
       initscr, the routine init (supplied by the user) is called
       with  two arguments: a window pointer to the one-line win-
       dow that has been allocated and an integer with the number
       of columns in the window.  Inside this initialization rou-
       tine, the integer variables LINES  and  COLS  (defined  in
       <curses.h>) are not guaranteed to be accurate and wrefresh
       or doupdate must not be called.  It is allowable  to  call
       wnoutrefresh during the initialization routine.

       ripoffline  can  be called up to five times before calling
       initscr or newterm.

       The curs_set routine sets  the  cursor  state  is  set  to
       invisible, normal, or very visible for visibility equal to
       0, 1, or 2 respectively.  If  the  terminal  supports  the
       visibility   requested,   the  previous  cursor  state  is
       returned; otherwise, ERR is returned.

       The napms routine is used to sleep for ms milliseconds.

RETURN VALUE
       Except for curs_set,  these  routines  always  return  OK.
       curs_set  returns the previous cursor state, or ERR if the
       requested visibility is not supported.

NOTES
       Note that getsyx is a macro, so & is not necessary  before
       the variables y and x.

       Older  SVr4  man  pages  warn  that  the  return  value of
       curs_set "is currently  incorrect".   This  implementation
       gets  it  right, but it may be unwise to count on the cor-
       rectness of the return value anywhere else.

PORTABILITY
       The functions setsyx and getsyx are not described  in  the
       XSI  Curses standard, Issue 4.  All other functions are as
       described in XSI Curses.

       The SVr4 documentation describes setsyx and getsyx as hav-
       ing  return  type  int.  This  is  misleading, as they are
       macros with no documented semantics for the return  value.



                                                                2





curs_kernel(3)                                     curs_kernel(3)


SEE ALSO
       curses(3),        curs_initscr(3),        curs_outopts(3),
       curs_refresh(3), curs_scr_dump(3), curs_slk(3)






















































                                                                3



Source: OpenBSD 2.6 man pages. Copyright: Portions are copyrighted by BERKELEY
SOFTWARE DESIGN, INC., The Regents of the University of California, Massachusetts
Institute of Technology, Free Software Foundation, FreeBSD Inc., and others.



(Corrections, notes, and links courtesy of RocketAware.com)


[Detailed Topics]
FreeBSD Sources for curs_kernel(3) functions
OpenBSD sources for curs_kernel(3)


[Overview Topics]

Up to: Curses - Curses (Library for text display interfaces)


RocketLink!--> Man page versions: OpenBSD FreeBSD Others






Rapid-Links: Search | About | Comments | Submit Path: RocketAware > man pages > curs_kernel.3/
RocketAware.com is a service of Mib Software
Copyright 1999, Forrest J. Cavalier III. All Rights Reserved.
We welcome submissions and comments