[go: up one dir, main page]

File: gcpInit.3

package info (click to toggle)
libggigcp 1.0.1-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 2,580 kB
  • ctags: 497
  • sloc: sh: 9,172; ansic: 2,396; makefile: 176
file content (100 lines) | stat: -rw-r--r-- 2,278 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
.TH "gcpInit" 3 "2005-07-30" "libggigcp-1.0.x" GGI
.SH NAME
\fBgcpInit\fR, \fBgcpExit\fR, \fBgcpAttach\fR, \fBgcpDetach\fR : Initialize and uninitialize LibGGIGCP
.SH SYNOPSIS
.nb
.nf
#include <ggi/gcp.h>

int gcpInit(void);

int gcpExit(void);

int gcpAttach(ggi_visual_t vis);

int gcpDetach(ggi_visual_t vis);
.fi

.SH DESCRIPTION
These are the standard LibGGI extension management functions for the
LibGGIGCP extension. They allow initialization and deinitialization
of the extension as a whole and of individual visuals.

\fBgcpInit\fR will initialize an instance of the LibGGIGCP extension and
prepare it to attach to visuals.

\fBgcpAttach\fR, if successful, will allow LibGGIGCP functions to
operate on the named visual.

\fBgcpDetach\fR, if successful, will clean up all resources involved in
providing the named visual with the LibGGIGCP API.

\fBgcpExit\fR will free all resources associated with an instance of
LibGGIGCP.
.SH RETURN VALUE
\fBgcpInit\fR returns \fB0\fR for OK, otherwise an \f(CWggi-error(3)\fR code.

\fBgcpExit\fR returns:
.TP
\fB0\fR
after successfully cleaning up,

.TP
\fB>0\fR
the number of 'open' \fBgcpInit\fR calls, if there has been more than
one call to \fBgcpInit\fR. As \fBgcpInit\fR and \fBgcpExit\fR must be
used in properly nested pairs, e.g. the first \fBgcpExit\fR after two
\fBgcpInit\fR's will return \fB1\fR.

.TP
\fB<0\fR
\f(CWggi-error(3)\fR, especially if more \fBgcpExit\fR calls have been done than
\fBgcpInit\fR calls.

.PP
\fBgcpAttach\fR returns:
.TP
\fB>=0\fR
the number LibGGIGCP has been attached to this visual, whereas
0 means the first time.

.TP
\fB<0\fR
indicates an \f(CWggi-error(3)\fR.

.PP
\fBgcpDetach\fR returns:
.TP
\fB0\fR
after successfully cleaning up,

.TP
\fB>0\fR
the number of 'open' \fBgcpAttach\fR calls, if there has been more than
one call to \fBgcpAttach\fR. As \fBgcpAttach\fR and \fBgcpDetach\fR must be
used in properly nested pairs, e.g. the first \fBgcpDetach\fR after two
\fBgcpInit\fR's will return \fB1\fR.

.TP
\fB<0\fR
\f(CWggi-error(3)\fR, especially if more \fBgcpDetach\fR calls have been done than
\fBgcpAttach\fR calls.

.PP
.SH EXAMPLES
.nb
.nf
ggi_visual_t vis;

ggiInit();
gcpInit();
vis = ggiOpen(NULL);
gcpAttach(vis);

/* ... */

gcpDetach(vis);
gcpExit();
ggiExit();
.fi