Curses Windows Display


Files

file  WINCREAT.c

Data Structures

struct  _window_

Defines

#define bool   unsigned int
#define reg   register
#define TRUE   (1)
#define FALSE   (0)
#define ERR   (0)
#define OK   (1)
#define WIN_BOXED   1
#define WIN_UNBOXED   0
#define getyx(win, y, x)   ((x) = ((WINDOW*)(win))->col, (y) = ((WINDOW*)(win))->row)
#define refresh()
#define scrollok(win, flag)   ((win)->scroll_ok = (flag))
#define wrapok(win, flag)   ((win)->wrap_ok = (flag))
#define wrefresh(win)
#define mvwinr(w, dy, dx)
#define ground(win, f, b)   ( win->attrib = ((f) & 0x7f) | ((b) & 0x7f) << 4)
#define addch(c)   waddch(stdscr, c)
#define addstr(s)   waddstr(stdscr,s)
#define clrtoeol()   wclrtoeol(stdscr)
#define erase   werase(stdscr)
#define wclear(w)   werase(w)
#define clear()   werase(stdscr)
#define getch()   wgetch( stdscr )
#define move(y, x)   wmove( stdscr,(y),(x) )
#define mvcur(oy, ox, y, x)   move((y),(x))
#define scroll(win)   wscroll(win,1)
#define inch()   winch(stdscr)
#define mvinch(y, x)   ( wmove(stdscr,y,x), winch(stdscr) )
#define mvwinch(w, y, x)   ( wmove(w, y,x), winch(w) )
#define subwin(w, a, b, c, d)   newwin(a,b,c,d)

Typedefs

typedef struct _window_ WINDOW

Functions

void endwin (void)
void initscr (void)
int waddch (WINDOW *, int)
void waddstr (WINDOW *, char *)
void wclrtoeol (WINDOW *)
void werase (WINDOW *)
int wgetch (WINDOW *)
void wmove (WINDOW *, int, int)
int wprintw (WINDOW *, char *,...)
int printw (char *,...)
int wscroll (WINDOW *, int)
int winch (WINDOW *)
WINDOWnewwin (int, int, int, int, void *, int atrib, int nBoxed)
void WinSetTitle (WINDOW *w, char *title)
void box (WINDOW *, int, int)
void crmode (WINDOW *)
void delwin (WINDOW *)
void echo (WINDOW *)
int mvwin (WINDOW *win, int y, int x)
void nl (WINDOW *)
void nocrmode (WINDOW *)
void noecho (WINDOW *)
void nonl (WINDOW *)
void boxed (WINDOW *)
void unboxed (WINDOW *)
void save (WINDOW *)
void nosave (WINDOW *)
void def_ground (WINDOW *, int, int)

Variables

WINDOWstdscr

Define Documentation

#define addch (  )     waddch(stdscr, c)

Definition at line 107 of file CURSES.h.

#define addstr (  )     waddstr(stdscr,s)

Definition at line 110 of file CURSES.h.

#define bool   unsigned int

Definition at line 58 of file CURSES.h.

 
#define clear (  )     werase(stdscr)

Definition at line 119 of file CURSES.h.

 
#define clrtoeol (  )     wclrtoeol(stdscr)

Definition at line 113 of file CURSES.h.

#define erase   werase(stdscr)

Definition at line 116 of file CURSES.h.

#define ERR   (0)

Definition at line 64 of file CURSES.h.

Referenced by mvwin(), and waddch().

#define FALSE   (0)

Definition at line 62 of file CURSES.h.

 
#define getch (  )     wgetch( stdscr )

Definition at line 122 of file CURSES.h.

#define getyx ( win,
y,
 )     ((x) = ((WINDOW*)(win))->col, (y) = ((WINDOW*)(win))->row)

Definition at line 74 of file CURSES.h.

Referenced by box().

#define ground ( win,
f,
 )     ( win->attrib = ((f) & 0x7f) | ((b) & 0x7f) << 4)

Definition at line 92 of file CURSES.h.

 
#define inch (  )     winch(stdscr)

Definition at line 135 of file CURSES.h.

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

Definition at line 125 of file CURSES.h.

#define mvcur ( oy,
ox,
y,
 )     move((y),(x))

Definition at line 126 of file CURSES.h.

#define mvinch ( y,
 )     ( wmove(stdscr,y,x), winch(stdscr) )

Definition at line 136 of file CURSES.h.

#define mvwinch ( w,
y,
 )     ( wmove(w, y,x), winch(w) )

Definition at line 137 of file CURSES.h.

#define mvwinr ( w,
dy,
dx   ) 

Value:

mvwin((w),((w)->y_org - (w)->boxed) + (dy), \
                                  ((w)->x_org - (w)->boxed) + (dx) )

Definition at line 89 of file CURSES.h.

#define OK   (1)

Definition at line 65 of file CURSES.h.

Referenced by mvwin(), printw(), waddch(), and wprintw().

 
#define refresh (  ) 

Definition at line 77 of file CURSES.h.

#define reg   register

Definition at line 59 of file CURSES.h.

#define scroll ( win   )     wscroll(win,1)

Definition at line 132 of file CURSES.h.

#define scrollok ( win,
flag   )     ((win)->scroll_ok = (flag))

Definition at line 78 of file CURSES.h.

Referenced by MMCTask(), and WXio().

#define subwin ( w,
a,
b,
c,
 )     newwin(a,b,c,d)

Definition at line 140 of file CURSES.h.

#define TRUE   (1)

Definition at line 61 of file CURSES.h.

#define wclear (  )     werase(w)

Definition at line 118 of file CURSES.h.

#define WIN_BOXED   1

Definition at line 67 of file CURSES.h.

Referenced by MMCTask().

#define WIN_UNBOXED   0

Definition at line 68 of file CURSES.h.

#define wrapok ( win,
flag   )     ((win)->wrap_ok = (flag))

Definition at line 79 of file CURSES.h.

#define wrefresh ( win   ) 

Definition at line 80 of file CURSES.h.


Typedef Documentation

typedef struct _window_ WINDOW

typedef for a Curses Window

Definition at line 26 of file CURSES.h.


Function Documentation

void box ( WINDOW ,
int  ,
int   
)

Definition at line 5 of file BOX.c.

void boxed ( WINDOW  ) 

Definition at line 35 of file WINCREAT.c.

void crmode ( WINDOW  ) 

Definition at line 21 of file WINIO.c.

void def_ground ( WINDOW w,
int  f,
int  b 
)

Set the default foreground and background colors

Parameters:
w window to set the forground and background colors
f Forground color
b Background color

Definition at line 46 of file WINCREAT.c.

void delwin ( WINDOW  ) 

Definition at line 4 of file DELWIN.c.

void echo ( WINDOW  ) 

Definition at line 16 of file WINIO.c.

void endwin ( void   ) 

Definition at line 6 of file INITSCR.c.

void initscr ( void   ) 

Definition at line 11 of file INITSCR.c.

int mvwin ( WINDOW win,
int  y,
int  x 
)

Definition at line 15 of file MVWIN.c.

WINDOW* newwin ( int  lines,
int  cols,
int  begin_y,
int  begin_x,
void *  IoChan,
int  attrib,
int  nBoxed 
)

Create a new window

Parameters:
lines Vertical size including border
cols Horizontal Size (including border
begin_y Y coordinate of the upper left hand corner
begin_x X coordinate of the upper left hand corner
IoChan Pointer to input channel (used for getc)
attrib background/forground colors, etc
nBoxed 0 = No border, 1 = Bordered
Returns:
returns pointer to WINDOW object on success, NULL on fail

Definition at line 66 of file WINCREAT.c.

void nl ( WINDOW  ) 

Definition at line 18 of file WINIO.c.

void nocrmode ( WINDOW  ) 

Definition at line 27 of file WINIO.c.

void noecho ( WINDOW  ) 

Definition at line 17 of file WINIO.c.

void nonl ( WINDOW  ) 

Definition at line 19 of file WINIO.c.

void nosave ( WINDOW  ) 

Definition at line 34 of file WINCREAT.c.

int printw ( char *  ,
  ... 
)

Definition at line 22 of file WPRINTW.c.

void save ( WINDOW  ) 

Definition at line 33 of file WINCREAT.c.

void unboxed ( WINDOW  ) 

Definition at line 36 of file WINCREAT.c.

int waddch ( WINDOW ,
int   
)

Definition at line 125 of file WINIO.c.

void waddstr ( WINDOW ,
char *   
)

Definition at line 4 of file WADDSTR.c.

void wclrtoeol ( WINDOW  ) 

Definition at line 4 of file WCLRTOEO.c.

void werase ( WINDOW  ) 

Definition at line 4 of file WERASE.c.

int wgetch ( WINDOW  ) 

Definition at line 74 of file WINIO.c.

int winch ( WINDOW  ) 

Definition at line 4 of file WINCH.c.

void WinSetTitle ( WINDOW w,
char *  title 
)

Set the title of the WINDOW

Parameters:
w pointer to the window to title
title pointer to the string that contains the title

Definition at line 138 of file WINCREAT.c.

References _window_::attrib, SCREEN, strlen(), _window_::x_org, _window_::x_size, and _window_::y_org.

Referenced by MMCTask(), and WXio().

void wmove ( WINDOW ,
int  ,
int   
)

Definition at line 4 of file WMOVE.c.

int wprintw ( WINDOW ,
char *  ,
  ... 
)

Definition at line 12 of file WPRINTW.c.

int wscroll ( WINDOW ,
int   
)

Definition at line 20 of file WSCROLL.c.


Variable Documentation

Definition at line 4 of file INITSCR.c.

Referenced by mvwin(), and printw().


Generated on Sun Aug 31 13:31:32 2008 for FrankenRTOS by  doxygen 1.5.6