curses.h File Reference

#include <termios.h>
#include <stdarg.h>
#include <stdio.h>

Include dependency graph for curses.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  WINDOW

Defines

#define TRUE   1
#define FALSE   0
#define ERR   (-1)
#define OK   0
#define box(win, vc, hc)   wbox(win,0,0,0,0,vc,hc)
#define addch(ch)   waddch(stdscr,ch)
#define mvaddch(y, x, ch)   (wmove(stdscr,y,x)==ERR?ERR:waddch(stdscr,ch))
#define mvwaddch(win, y, x, ch)   (wmove(win,y,x)==ERR?ERR:waddch(win,ch))
#define getch()   wgetch(stdscr)
#define mvgetch(y, x)   (wmove(stdscr,y,x)==ERR?ERR:wgetch(stdscr))
#define mvwgetch(win, y, x)   (wmove(win,y,x)==ERR?ERR:wgetch(win))
#define addstr(str)   waddstr(stdscr,str)
#define mvaddstr(y, x, str)   (wmove(stdscr,y,x)==ERR?ERR:waddstr(stdscr,str))
#define mvwaddstr(win, y, x, str)   (wmove(win,y,x)==ERR?ERR:waddstr(win,str))
#define getstr(str)   wgetstr(stdscr,str)
#define mvgetstr(y, x, str)   (wmove(stdscr,y,x)==ERR?ERR:wgetstr(stdscr,str))
#define mvwgetstr(win, y, x, str)   (wmove(win,y,x)==ERR?ERR:wgetstr(win,str))
#define move(y, x)   wmove(stdscr,y,x)
#define clear()   wclear(stdscr)
#define erase()   werase(stdscr)
#define clrtobot()   wclrtobot(stdscr)
#define mvclrtobot(y, x)   (wmove(stdscr,y,x)==ERR?ERR:wclrtobot(stdscr))
#define mvwclrtobot(win, y, x)   (wmove(win,y,x)==ERR?ERR:wclrtobot(win))
#define clrtoeol()   wclrtoeol(stdscr)
#define mvclrtoeol(y, x)   (wmove(stdscr,y,x)==ERR?ERR:wclrtoeol(stdscr))
#define mvwclrtoeol(win, y, x)   (wmove(win,y,x)==ERR?ERR:wclrtoeol(win))
#define insertln()   winsertln(stdscr)
#define mvinsertln(y, x)   (wmove(stdscr,y,x)==ERR?ERR:winsertln(stdscr))
#define mvwinsertln(win, y, x)   (wmove(win,y,x)==ERR?ERR:winsertln(win))
#define deleteln()   wdeleteln(stdscr)
#define mvdeleteln(y, x)   (wmove(stdscr,y,x)==ERR?ERR:wdeleteln(stdscr))
#define mvwdeleteln(win, y, x)   (wmove(win,y,x)==ERR?ERR:wdeleteln(win))
#define refresh()   wrefresh(stdscr)
#define inch()   winch(stdscr)
#define insch(ch)   winsch(stdscr,ch)
#define mvinsch(y, x, ch)   (wmove(stdscr,y,x)==ERR?ERR:winsch(stdscr,ch))
#define mvwinsch(win, y, x, ch)   (wmove(win,y,x)==ERR?ERR:winsch(win,ch))
#define delch()   wdelch(stdscr)
#define mvdelch(y, x)   (wmove(stdscr,y,x)==ERR?ERR:wdelch(stdscr))
#define mvwdelch(win, y, x)   (wmove(win,y,x)==ERR?ERR:wdelch(win))
#define standout()   wstandout(stdscr)
#define wstandout(win)   ((win)->_attrs |= A_STANDOUT)
#define standend()   wstandend(stdscr)
#define wstandend(win)   ((win)->_attrs &= ~A_STANDOUT)
#define attrset(attrs)   wattrset(stdscr, attrs)
#define wattrset(win, attrs)   ((win)->_attrs = (attrs))
#define attron(attrs)   wattron(stdscr, attrs)
#define wattron(win, attrs)   ((win)->_attrs |= (attrs))
#define attroff(attrs)   wattroff(stdscr,attrs)
#define wattroff(win, attrs)   ((win)->_attrs &= ~(attrs))
#define resetty()   tcsetattr(1, TCSANOW, &_orig_tty)
#define getyx(win, y, x)   (y = (win)->_cury, x = (win)->_curx)
#define A_BLINK   0x0100
#define A_BLANK   0
#define A_BOLD   0x0200
#define A_DIM   0
#define A_PROTECT   0
#define A_REVERSE   0x0400
#define A_STANDOUT   0x0800
#define A_UNDERLINE   0x1000
#define A_ALTCHARSET   0x2000

Typedefs

typedef int bool

Functions

 _PROTOTYPE (char *unctrl,(int _c))
 _PROTOTYPE (int baudrate,(void))
 _PROTOTYPE (void beep,(void))
 _PROTOTYPE (void clearok,(WINDOW *_win, bool _flag))
 _PROTOTYPE (void curs_set,(int _visibility))
 _PROTOTYPE (void delwin,(WINDOW *_win))
 _PROTOTYPE (void fatal,(char *_s))
 _PROTOTYPE (WINDOW *initscr,(void))
 _PROTOTYPE (char *longname,(void))
 _PROTOTYPE (int mvcur,(int _oldy, int _oldx, int _newy, int _newx))
 _PROTOTYPE (int mvinch,(int _y, int _x))
 _PROTOTYPE (int mvprintw,(int _y, int _x, const char *_fmt,...))
 _PROTOTYPE (int mvwin,(WINDOW *_win, int _begy, int _begx))
 _PROTOTYPE (int mvwinch,(WINDOW *_win, int _y, int _x))
 _PROTOTYPE (int mvwprintw,(WINDOW *_win, int _y, int _x, const char *_fmt,...))
 _PROTOTYPE (WINDOW *newwin,(int _num_lines, int _num_cols, int _y, int _x))
 _PROTOTYPE (void outc,(int _c))
 _PROTOTYPE (void overlay,(WINDOW *_win1, WINDOW *_win2))
 _PROTOTYPE (void poscur,(int _r, int _c))
 _PROTOTYPE (int printw,(const char *_fmt,...))
 _PROTOTYPE (int setscrreg,(int _top, int _bottom))
 _PROTOTYPE (int setterm,(char *_type))
 _PROTOTYPE (WINDOW *subwin,(WINDOW *_orig, int _nlines, int _ncols, int _y, int _x))
 _PROTOTYPE (int tabsize,(int _ts))
 _PROTOTYPE (int waddch,(WINDOW *_win, int _c))
 _PROTOTYPE (int waddstr,(WINDOW *_win, char *_str))
 _PROTOTYPE (int wbox,(WINDOW *_win, int _ymin, int _xmin, int _ymax, int _xmax, unsigned int _v, unsigned int _h))
 _PROTOTYPE (int wclrtobot,(WINDOW *_win))
 _PROTOTYPE (int wprintw,(WINDOW *_win, const char *_fmt,...))
 _PROTOTYPE (int wsetscrreg,(WINDOW *_win, int _top, int _bottom))
 _PROTOTYPE (int wtabsize,(WINDOW *_win, int _ts))

Variables

int LINES
int COLS
bool NONL
WINDOWcurscr
WINDOWstdscr
termios _orig_tty _tty
unsigned int ACS_ULCORNER
unsigned int ACS_LLCORNER
unsigned int ACS_URCORNER
unsigned int ACS_LRCORNER
unsigned int ACS_RTEE
unsigned int ACS_LTEE
unsigned int ACS_BTEE
unsigned int ACS_TTEE
unsigned int ACS_HLINE
unsigned int ACS_VLINE
unsigned int ACS_PLUS
unsigned int ACS_S1
unsigned int ACS_S9
unsigned int ACS_DIAMOND
unsigned int ACS_CKBOARD
unsigned int ACS_DEGREE
unsigned int ACS_PLMINUS
unsigned int ACS_BULLET
unsigned int ACS_LARROW
unsigned int ACS_RARROW
unsigned int ACS_DARROW
unsigned int ACS_UARROW
unsigned int ACS_BOARD
unsigned int ACS_LANTERN
unsigned int ACS_BLOCK


Define Documentation

#define A_ALTCHARSET   0x2000
 

Definition at line 84 of file curses.h.

#define A_BLANK   0
 

Definition at line 77 of file curses.h.

#define A_BLINK   0x0100
 

Definition at line 76 of file curses.h.

Referenced by BlinkRow(), and newattr().

#define A_BOLD   0x0200
 

Definition at line 78 of file curses.h.

#define A_DIM   0
 

Definition at line 79 of file curses.h.

#define A_PROTECT   0
 

Definition at line 80 of file curses.h.

#define A_REVERSE   0x0400
 

Definition at line 81 of file curses.h.

Referenced by newattr().

#define A_STANDOUT   0x0800
 

Definition at line 82 of file curses.h.

#define A_UNDERLINE   0x1000
 

Definition at line 83 of file curses.h.

#define addch ch   )     waddch(stdscr,ch)
 

Definition at line 27 of file curses.h.

#define addstr str   )     waddstr(stdscr,str)
 

Definition at line 33 of file curses.h.

#define attroff attrs   )     wattroff(stdscr,attrs)
 

Definition at line 70 of file curses.h.

#define attron attrs   )     wattron(stdscr, attrs)
 

Definition at line 68 of file curses.h.

Referenced by BlinkRow().

#define attrset attrs   )     wattrset(stdscr, attrs)
 

Definition at line 66 of file curses.h.

#define box win,
vc,
hc   )     wbox(win,0,0,0,0,vc,hc)
 

Definition at line 26 of file curses.h.

 
#define clear  )     wclear(stdscr)
 

Definition at line 40 of file curses.h.

Referenced by gzofstream::attach(), gzifstream::attach(), gzfilestream_common::attach(), gzfilestream_common::close(), gzifstream::gzifstream(), gzofstream::gzofstream(), Initialize(), main(), mlabel(), gzofstream::open(), gzifstream::open(), gzfilestream_common::open(), and ScreenInit().

 
#define clrtobot  )     wclrtobot(stdscr)
 

Definition at line 42 of file curses.h.

 
#define clrtoeol  )     wclrtoeol(stdscr)
 

Definition at line 45 of file curses.h.

 
#define delch  )     wdelch(stdscr)
 

Definition at line 59 of file curses.h.

 
#define deleteln  )     wdeleteln(stdscr)
 

Definition at line 51 of file curses.h.

 
#define erase  )     werase(stdscr)
 

Definition at line 41 of file curses.h.

Referenced by decode_ioctl(), and ScreenPut().

#define ERR   (-1)
 

Definition at line 19 of file curses.h.

#define FALSE   0
 

Definition at line 16 of file curses.h.

#define getch void   )     wgetch(stdscr)
 

Definition at line 30 of file curses.h.

#define getstr str   )     wgetstr(stdscr,str)
 

Definition at line 36 of file curses.h.

Referenced by authenticate(), and calendar().

#define getyx win,
y,
x   )     (y = (win)->_cury, x = (win)->_curx)
 

Definition at line 73 of file curses.h.

Referenced by delword(), and ScreenPut().

 
#define inch  )     winch(stdscr)
 

Definition at line 55 of file curses.h.

#define insch ch   )     winsch(stdscr,ch)
 

Definition at line 56 of file curses.h.

 
#define insertln  )     winsertln(stdscr)
 

Definition at line 48 of file curses.h.

#define move y,
x   )     wmove(stdscr,y,x)
 

Definition at line 39 of file curses.h.

#define mvaddch y,
x,
ch   )     (wmove(stdscr,y,x)==ERR?ERR:waddch(stdscr,ch))
 

Definition at line 28 of file curses.h.

#define mvaddstr y,
x,
str   )     (wmove(stdscr,y,x)==ERR?ERR:waddstr(stdscr,str))
 

Definition at line 34 of file curses.h.

Referenced by ResetGame().

#define mvclrtobot y,
x   )     (wmove(stdscr,y,x)==ERR?ERR:wclrtobot(stdscr))
 

Definition at line 43 of file curses.h.

#define mvclrtoeol y,
x   )     (wmove(stdscr,y,x)==ERR?ERR:wclrtoeol(stdscr))
 

Definition at line 46 of file curses.h.

#define mvdelch y,
x   )     (wmove(stdscr,y,x)==ERR?ERR:wdelch(stdscr))
 

Definition at line 60 of file curses.h.

#define mvdeleteln y,
x   )     (wmove(stdscr,y,x)==ERR?ERR:wdeleteln(stdscr))
 

Definition at line 52 of file curses.h.

#define mvgetch y,
x   )     (wmove(stdscr,y,x)==ERR?ERR:wgetch(stdscr))
 

Definition at line 31 of file curses.h.

#define mvgetstr y,
x,
str   )     (wmove(stdscr,y,x)==ERR?ERR:wgetstr(stdscr,str))
 

Definition at line 37 of file curses.h.

#define mvinsch y,
x,
ch   )     (wmove(stdscr,y,x)==ERR?ERR:winsch(stdscr,ch))
 

Definition at line 57 of file curses.h.

#define mvinsertln y,
x   )     (wmove(stdscr,y,x)==ERR?ERR:winsertln(stdscr))
 

Definition at line 49 of file curses.h.

#define mvwaddch win,
y,
x,
ch   )     (wmove(win,y,x)==ERR?ERR:waddch(win,ch))
 

Definition at line 29 of file curses.h.

Referenced by makscr(), and wgetch().

#define mvwaddstr win,
y,
x,
str   )     (wmove(win,y,x)==ERR?ERR:waddstr(win,str))
 

Definition at line 35 of file curses.h.

#define mvwclrtobot win,
y,
x   )     (wmove(win,y,x)==ERR?ERR:wclrtobot(win))
 

Definition at line 44 of file curses.h.

#define mvwclrtoeol win,
y,
x   )     (wmove(win,y,x)==ERR?ERR:wclrtoeol(win))
 

Definition at line 47 of file curses.h.

#define mvwdelch win,
y,
x   )     (wmove(win,y,x)==ERR?ERR:wdelch(win))
 

Definition at line 61 of file curses.h.

#define mvwdeleteln win,
y,
x   )     (wmove(win,y,x)==ERR?ERR:wdeleteln(win))
 

Definition at line 53 of file curses.h.

#define mvwgetch win,
y,
x   )     (wmove(win,y,x)==ERR?ERR:wgetch(win))
 

Definition at line 32 of file curses.h.

#define mvwgetstr win,
y,
x,
str   )     (wmove(win,y,x)==ERR?ERR:wgetstr(win,str))
 

Definition at line 38 of file curses.h.

#define mvwinsch win,
y,
x,
ch   )     (wmove(win,y,x)==ERR?ERR:winsch(win,ch))
 

Definition at line 58 of file curses.h.

#define mvwinsertln win,
y,
x   )     (wmove(win,y,x)==ERR?ERR:winsertln(win))
 

Definition at line 50 of file curses.h.

#define OK   0
 

Definition at line 22 of file curses.h.

 
#define refresh  )     wrefresh(stdscr)
 

Definition at line 54 of file curses.h.

 
#define resetty  )     tcsetattr(1, TCSANOW, &_orig_tty)
 

Definition at line 72 of file curses.h.

Referenced by endwin(), and terminate().

 
#define standend  )     wstandend(stdscr)
 

Definition at line 64 of file curses.h.

 
#define standout  )     wstandout(stdscr)
 

Definition at line 62 of file curses.h.

#define TRUE   1
 

Definition at line 13 of file curses.h.

#define wattroff win,
attrs   )     ((win)->_attrs &= ~(attrs))
 

Definition at line 71 of file curses.h.

#define wattron win,
attrs   )     ((win)->_attrs |= (attrs))
 

Definition at line 69 of file curses.h.

#define wattrset win,
attrs   )     ((win)->_attrs = (attrs))
 

Definition at line 67 of file curses.h.

#define wstandend win   )     ((win)->_attrs &= ~A_STANDOUT)
 

Definition at line 65 of file curses.h.

#define wstandout win   )     ((win)->_attrs |= A_STANDOUT)
 

Definition at line 63 of file curses.h.


Typedef Documentation

typedef int bool
 

Definition at line 10 of file curses.h.


Function Documentation

_PROTOTYPE int  wtabsize,
(WINDOW *_win, int _ts) 
 

_PROTOTYPE int  wsetscrreg,
(WINDOW *_win, int _top, int _bottom
 

_PROTOTYPE int  wprintw,
(WINDOW *_win, const char *_fmt,...) 
 

_PROTOTYPE int  wclrtobot,
(WINDOW *_win) 
 

_PROTOTYPE int  wbox,
(WINDOW *_win, int _ymin, int _xmin, int _ymax, int _xmax, unsigned int _v, unsigned int _h) 
 

_PROTOTYPE int  waddstr,
(WINDOW *_win, char *_str) 
 

_PROTOTYPE int  waddch,
(WINDOW *_win, int _c) 
 

_PROTOTYPE int  tabsize,
(int _ts) 
 

_PROTOTYPE WINDOW subwin,
(WINDOW *_orig, int _nlines, int _ncols, int _y, int _x) 
 

_PROTOTYPE int  setterm,
(char *_type) 
 

_PROTOTYPE int  setscrreg,
(int _top, int _bottom
 

_PROTOTYPE int  printw,
(const char *_fmt,...) 
 

_PROTOTYPE void  poscur,
(int _r, int _c) 
 

_PROTOTYPE void  overlay,
(WINDOW *_win1, WINDOW *_win2) 
 

_PROTOTYPE void  outc,
(int _c) 
 

_PROTOTYPE WINDOW newwin,
(int _num_lines, int _num_cols, int _y, int _x) 
 

_PROTOTYPE int  mvwprintw,
(WINDOW *_win, int _y, int _x, const char *_fmt,...) 
 

_PROTOTYPE int  mvwinch,
(WINDOW *_win, int _y, int _x) 
 

_PROTOTYPE int  mvwin,
(WINDOW *_win, int _begy, int _begx) 
 

_PROTOTYPE int  mvprintw,
(int _y, int _x, const char *_fmt,...) 
 

_PROTOTYPE int  mvinch,
(int _y, int _x) 
 

_PROTOTYPE int  mvcur,
(int _oldy, int _oldx, int _newy, int _newx) 
 

_PROTOTYPE char *  longname,
(void) 
 

_PROTOTYPE WINDOW initscr,
(void) 
 

_PROTOTYPE void  fatal,
(char *_s) 
 

_PROTOTYPE void  delwin,
(WINDOW *_win) 
 

_PROTOTYPE void  curs_set,
(int _visibility) 
 

_PROTOTYPE void  clearok,
(WINDOW *_win, bool _flag) 
 

_PROTOTYPE void  beep,
(void) 
 

_PROTOTYPE int  baudrate,
(void) 
 

_PROTOTYPE char *  unctrl,
(int _c) 
 


Variable Documentation

struct termios _orig_tty _tty
 

Definition at line 8 of file cursesio.c.

Referenced by gettmode(), inittty(), and ttysetflags().

unsigned int ACS_BLOCK
 

Definition at line 93 of file cursesio.c.

Referenced by setterm().

unsigned int ACS_BOARD
 

Definition at line 91 of file cursesio.c.

Referenced by setterm().

unsigned int ACS_BTEE
 

Definition at line 75 of file cursesio.c.

Referenced by setterm(), and SetUpScreen().

unsigned int ACS_BULLET
 

Definition at line 86 of file cursesio.c.

Referenced by setterm().

unsigned int ACS_CKBOARD
 

Definition at line 83 of file cursesio.c.

Referenced by setterm().

unsigned int ACS_DARROW
 

Definition at line 89 of file cursesio.c.

Referenced by ResetGame(), and setterm().

unsigned int ACS_DEGREE
 

Definition at line 84 of file cursesio.c.

Referenced by setterm().

unsigned int ACS_DIAMOND
 

Definition at line 82 of file cursesio.c.

Referenced by setterm().

unsigned int ACS_HLINE
 

Definition at line 77 of file cursesio.c.

Referenced by setterm(), SetUpScreen(), and wbox().

unsigned int ACS_LANTERN
 

Definition at line 92 of file cursesio.c.

Referenced by setterm().

unsigned int ACS_LARROW
 

Definition at line 87 of file cursesio.c.

Referenced by ResetGame(), and setterm().

unsigned int ACS_LLCORNER
 

Definition at line 70 of file cursesio.c.

Referenced by setterm(), SetUpScreen(), and wbox().

unsigned int ACS_LRCORNER
 

Definition at line 72 of file cursesio.c.

Referenced by setterm(), SetUpScreen(), and wbox().

unsigned int ACS_LTEE
 

Definition at line 74 of file cursesio.c.

Referenced by setterm(), and SetUpScreen().

unsigned int ACS_PLMINUS
 

Definition at line 85 of file cursesio.c.

Referenced by setterm().

unsigned int ACS_PLUS
 

Definition at line 79 of file cursesio.c.

Referenced by setterm(), and SetUpScreen().

unsigned int ACS_RARROW
 

Definition at line 88 of file cursesio.c.

Referenced by ResetGame(), and setterm().

unsigned int ACS_RTEE
 

Definition at line 73 of file cursesio.c.

Referenced by setterm(), and SetUpScreen().

unsigned int ACS_S1
 

Definition at line 80 of file cursesio.c.

Referenced by setterm().

unsigned int ACS_S9
 

Definition at line 81 of file cursesio.c.

Referenced by setterm().

unsigned int ACS_TTEE
 

Definition at line 76 of file cursesio.c.

Referenced by setterm(), and SetUpScreen().

unsigned int ACS_UARROW
 

Definition at line 90 of file cursesio.c.

Referenced by ResetGame(), and setterm().

unsigned int ACS_ULCORNER
 

Definition at line 69 of file cursesio.c.

Referenced by setterm(), SetUpScreen(), and wbox().

unsigned int ACS_URCORNER
 

Definition at line 71 of file cursesio.c.

Referenced by setterm(), SetUpScreen(), and wbox().

unsigned int ACS_VLINE
 

Definition at line 78 of file cursesio.c.

Referenced by setterm(), and wbox().

int COLS
 

Definition at line 58 of file curses.c.

WINDOW* curscr
 

Definition at line 11 of file cursesio.c.

Referenced by clearok(), clrupdate(), doupdate(), endwin(), initscr(), transformline(), wgetch(), and wrefresh().

int LINES
 

Definition at line 57 of file curses.c.

bool NONL
 

Definition at line 13 of file cursesio.c.

Referenced by gettmode(), nl(), nonl(), ttysetflags(), and waddch().

WINDOW* stdscr
 

Definition at line 55 of file curses.c.


Generated on Fri Apr 14 23:02:59 2006 for minix by  doxygen 1.4.6