ui/curswa.h File Reference

Holds workarounds for curses.h. More...

Go to the source code of this file.

Enumerations

enum  { KEY_REFRESH = 12 }

Functions

int _mvwchgat_ (WINDOW *w, int y, int x, int n, int attr, short color, const void *)
void * alloca (size_t)
int box (WINDOW *win, int verch, int horch)
int clear ()
int erase ()
int move (int y, int x)
int mvwaddnstr_c (WINDOW *win, int y, int x, const char *str, int n)
int mvwaddstr_c (WINDOW *win, int y, int x, const char *str)
int refresh ()
int waddstr_c (WINDOW *win, const char *str)


Detailed Description

Holds workarounds for curses.h when compiling under C++. It specifically removes the macros:

and replaces them by inline functions.

It also defines certain inline functions for dealing with const char* arguments. Some curses functions simply use char* which doesn't go along well with std::string::c_str(). The defined functions do have the same syntax as their cousins.

The configure script figures out which one to use.

The following functions are defined to handle const char* arguments

mvwchgat is also defined as inline function in case the curses library does not provide it. The configure script takes care of figuring whether or not the function is provided by the curses library.

Please note that this file has to be included after the (n)curses header file.

Definition in file curswa.h.


Enumeration Type Documentation

anonymous enum

Enumerator:
KEY_REFRESH  The value returned by [w]getch() when the user presses ^L.

Definition at line 69 of file curswa.h.


Function Documentation

int _mvwchgat_ ( WINDOW *  w,
int  y,
int  x,
int  n,
int  attr,
short  color,
const void *   
) [inline]

Definition at line 202 of file curswa.h.

References alloca().

void* alloca ( size_t   ) 

int box ( WINDOW *  win,
int  verch,
int  horch 
) [inline]

int clear (  )  [inline]

Definition at line 95 of file curswa.h.

Referenced by YAPETUI::BaseWindow::endCurses().

int erase (  )  [inline]

Definition at line 102 of file curswa.h.

int move ( int  y,
int  x 
) [inline]

Definition at line 109 of file curswa.h.

int mvwaddnstr_c ( WINDOW *  win,
int  y,
int  x,
const char *  str,
int  n 
) [inline]

Definition at line 171 of file curswa.h.

int mvwaddstr_c ( WINDOW *  win,
int  y,
int  x,
const char *  str 
) [inline]

Definition at line 151 of file curswa.h.

int refresh (  )  [inline]

Definition at line 116 of file curswa.h.

Referenced by YAPETUI::DialogBox::refresh().

int waddstr_c ( WINDOW *  win,
const char *  str 
) [inline]

Definition at line 131 of file curswa.h.


Generated on Sun Jul 20 13:01:39 2008 for YAPET by  doxygen 1.5.6