.TH "ggiWmhInit" 3 "2006-12-30" "libggiwmh-0.3.x" GGI .SH NAME \fBggiWmhInit\fR, \fBggiWmhExit\fR, \fBggiWmhAttach\fR, \fBggiWmhDetach\fR : Initialize and Uninitialize LibGGIWmh .SH SYNOPSIS .nb .nf #include int ggiWmhInit(void); int ggiWmhExit(void); int ggiWmhAttach(ggi_visual_t vis); int ggiWmhDetach(ggi_visual_t vis); .fi .SH DESCRIPTION These are the standard LibGGI extension management functions for the LibGGIWmh extension. They allow initialization and deinitialization of the extension as a whole and of individual visuals. \fBggiWmhInit\fR will initialize an instance of the LibGGIWmh extension and prepare it to attach to visuals. \fBggiWmhAttach\fR, if successful, will allow LibGGIWmh functions to operate on the named visual. \fBggiWmhDetach\fR, if successful, will clean up all resources involved in providing the named visual with the LibGGIWmh API. \fBggiWmhExit\fR will free all resources associated with an instance of LibGGIWmh. .SH RETURN VALUE \fBggiWmhInit\fR returns \fB0\fR for OK, otherwise an \f(CWggi-error(3)\fR code. \fBggiWmhExit\fR returns: .TP \fB0\fR after successfully cleaning up, .TP \fB>0\fR the number of 'open' \fBggiWmhInit\fR calls, if there has been more than one call to \fBggiWmhInit\fR. As \fBggiWmhInit\fR and \fBggiWmhExit\fR must be used in properly nested pairs, e.g. the first \fBggiWmhExit\fR after two \fBggiWmhInit\fR's will return \fB1\fR. .TP \fB<0\fR \f(CWggi-error(3)\fR, especially if more \fBggiWmhExit\fR calls have been done than \fBggiWmhInit\fR calls. .PP \fBggiWmhAttach\fR returns: .TP \fB>=0\fR the number LibGGIWmh has been attached to this visual, whereas 0 means the first time. .TP \fB<0\fR indicates an \f(CWggi-error(3)\fR. .PP \fBggiWmhDetach\fR returns: .TP \fB0\fR after successfully cleaning up, .TP \fB>0\fR the number of 'open' \fBggiWmhAttach\fR calls, if there has been more than one call to \fBggiWmhAttach\fR. As \fBggiWmhAttach\fR and \fBggiWmhDetach\fR must be used in properly nested pairs, e.g. the first \fBggiWmhDetach\fR after two \fBggiWmhInit`s will return `1\fR. .TP \fB<0\fR \f(CWggi-error(3)\fR, especially if more \fBggiWmhDetach\fR calls have been done than \fBggiWmhAttach\fR calls. .PP .SH EXAMPLES .nb .nf ggi_visual_t vis; ggiInit(); ggiWmhInit(); vis = ggiOpen(NULL); ggiWmhAttach(vis); /* ... */ ggiWmhDetach(vis); ggiWmhExit(); ggiExit(); .fi