File: ggiInit.3ggi

package info (click to toggle)
libggi 1%3A2.0.1-2
  • links: PTS
  • area: main
  • in suites: woody
  • size: 6,072 kB
  • ctags: 5,274
  • sloc: ansic: 42,720; sh: 6,508; makefile: 666
file content (60 lines) | stat: -rw-r--r-- 1,653 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
.\\" auto-generated by docbook2man-spec $Revision: 1.5 $
.TH "ggiInit" "3ggi" "22 August 2001" "GGI" "LibGGI API"
.SH NAME
ggiInit, ggiExit \- Initialize and uninitialize LibGGI
.SH SYNOPSIS
\fB#include <ggi/ggi.h>
.sp
int ggiInit(void);
.sp
int ggiExit(void);
\fR.SH "DESCRIPTION"
.PP
\fBggiInit\fR initalizes the library. This function must be called
before using other LibGGI functions; otherwise the results will be
undefined.
.PP
\fBggiExit\fR uninitializes the library (after being initalized by
\fBggiInit\fR) 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.
.PP
\fBggiInit\fR allows multiple invocations. A reference count is
maintained, and to completely uninitialize the library,
\fBggiExit\fR must be called as many times as \fBggiInit\fR
has been called beforehand.
.SH "RETURN VALUE"
.PP
\fBggiInit\fR returns 0 for OK, otherwise an error
code.
.PP
\fBggiExit\fR returns:
.TP
\fB0\fR
after successfully cleaning up,
.TP
\fB> 0\fR
the number of 'open' \fBggiInit\fR calls, if there has been more
than one call to \fBggiInit\fR. As \fBggiInit\fR and
\fBggiExit\fR must be used in properly nested pairs, e.g. the first
\fBggiExit\fR after two \fBggiInit\fRs will return 1.
.TP
\fB< 0\fR
error, especially if more \fBggiExit\fR calls have been done than
\fBggiInit\fR calls.
.SH "EXAMPLES"
.SS "INITIALIZE AND UNINITIALIZE LIBGGI"
.sp
.nf
if (ggiInit() < 0)
{
	fprintf(stderr, "Cannot initalize LibGGI!\\n");
	exit(1);
}

\fI/* Do some LibGGI stuff */\fR

ggiExit();
.sp
.fi