ggiExit3
Initialize and uninitialize libggi
Part of ggiInit(3).
Usage
#include <ggi/ggi.h> int ggiInit(void); int ggiExit(void);
Overview
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 cleans up if necessary. This should be called after an application finished using 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.
Return value
ggiInit returns 0 for OK, otherwise a ggi-error(3) code.
ggiExit returns:
0-
after successfully cleaning up,
>0-
the number of 'open'
ggiInitcalls, if there has been more than one call toggiInit. AsggiInitandggiExitmust be used in properly nested pairs, e.g. the firstggiExitafter twoggiInit's will return1.
<0-
ggi-error(3), especially if moreggiExitcalls have been done thanggiInitcalls.
Examples
Initialize and uninitialize LibGGI:
if (ggiInit() < 0) {
fprintf(stderr, "Cannot initialize LibGGI!\n");
exit(1);
}
/* Do some LibGGI stuff */
ggiExit();
Releases
4 releases since Debian 3.1 (Sarge); the text changed 2 times.