1giiInit(3) GGI giiInit(3)
2
3
4
6 giiInit, giiExit : Initialize and uninitialize LibGII
7
9 #include <ggi/gii.h>
10
11 int giiInit(void);
12
13 int giiExit(void);
14
15
17 giiInit initializes the library. This function must be called before
18 using other LibGII functions; otherwise the results will be undefined.
19
20 giiExit uninitializes the library (after being initialized by giiInit)
21 and automatically cleanup if necessary. This should be called after an
22 application is finished with the library. If any GGI functions are
23 called after the library has been uninitialized, the results will be
24 undefined.
25
26 giiInit allows multiple invocations. A reference count is maintained,
27 and to completely uninitialize the library, giiExit must be called as
28 many times as giiInit has been called beforehand.
29
31 giiInit returns 0 for OK, otherwise an gii-error(3) code.
32
33 giiExit returns:
34
35 0 after successfully cleaning up,
36
37
38 >0 the number of 'open' giiInit calls, if there has been more than
39 one call to giiInit. As giiInit and giiExit must be used in
40 properly nested pairs, e.g. the first giiExit after two giiInit
41 will return 1.
42
43
44 <0 gii-error(3), especially if more giiExit calls have been done
45 than giiInit calls.
46
47
49 Initialize and uninitialize LibGII:
50
51 if (!giiInit()) {
52 exit(EXIT_FAILURE); /* can't start! */
53 }
54
55 /* Do some libgii stuff */
56
57 giiExit();
58
59
61 giiMTInit(3), giiOpen(3)
62
63
64
65libgii-1.0.x 2006-12-30 giiInit(3)