[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

9. Core Functions

The core functions represent critical access points into the Libtui library. They are defined in `tui/core.h' and are included by `tui/tui.h'.

Each core function is usually paired with a "More" version. These "More" versions perform the necessary curses calls for Libtui to function properly. Non-"More" versions are provided for when finer tuning of curses is desired.

Function: void tuiInitMore (void (*exitfunc)(int))
This function initializes Libtui and many common curses settings.

exitfunc is a callback used when an error occurs in Libtui or when tuiEnd or tuiEndMore is called. exitfunc may be NULL. When exitfunc is called from Libtui, the integer passed is 0 on success (no error), or the value of errno.

Function: void tuiExitMore (int error)
This function cleans up any leftover issues in Libtui and shuts down curses.

If error is non-0, the callback set by tuiInitMore or tuiInit is called with that value (provided that the callback is not NULL).

Function: void tuiRefreshMore (void)
This function should be called whenever you want a screen update of Libtui components. It flushes the buffer with the curses doupdate function.

Function: void tuiInit (void (*exitfunc)(int))
This function initializes Libtui but does not do any curses initialization.

exitfunc is a callback used when an error occurs in Libtui or when tuiEnd or tuiEndMore is called. exitfunc may be NULL. When exitfunc is called from Libtui, the integer passed is 0 on success (no error), or the value of errno.

Function: void tuiExit (int error)
This function cleans up any leftover issues in Libtui but does not shut down curses.

If error is non-0, the callback set by tuiInitMore or tuiInit is called with that value (provided that the callback is not NULL).

Function: void tuiRefresh (void)
This function should be called whenever you want a screen update of Libtui components. It does not flush the buffer with the curses doupdate function.


[ << ] [ >> ]           [Top] [Contents] [Index] [ ? ]

This document was generated by on May, 16 2001 using texi2html