ggiInit, ggiExit : Initialize and uninitialize LibGGI
#include <ggi/ggi.h> int ggiInit(void); int ggiExit(void);
ggiInit initializes the library. This function must be called before using other LibGGI functions; otherwise the results will be undefined.
ggiExit uninitializes the library (after being initialized by ggiInit) and automatically cleanup if necessary. This should be called after an application is finished with the library. If any GGI functions are called after the library has been uninitialized, the results will be undefined.
ggiInit allows multiple invocations. A reference count is maintained, and to completely uninitialize the library, ggiExit must be called as many times as ggiInit has been called beforehand.
ggiInit returns 0 for OK, otherwise an error code.
ggiExit returns:
Initialize and uninitialize LibGGI:
if (ggiInit() < 0) { fprintf(stderr, "Cannot initialize LibGGI!\n"); exit(1); } /* Do some LibGGI stuff */ ggiExit();