gcpInit3
Initialize and uninitialize libggigcp
Usage
#include <ggi/gcp.h> int gcpInit(void); int gcpExit(void); int gcpAttach(ggi_visual_t vis); int gcpDetach(ggi_visual_t vis);
Overview
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.
gcpInit will initialize an instance of the LibGGIGCP extension and prepare it to attach to visuals.
gcpAttach, if successful, will allow LibGGIGCP functions to operate on the named visual.
gcpDetach, if successful, will clean up all resources involved in providing the named visual with the LibGGIGCP API.
gcpExit will free all resources associated with an instance of LibGGIGCP.
Return value
gcpInit returns 0 for OK, otherwise an ggi-error(3) code.
gcpExit returns:
0-
after successfully cleaning up,
>0-
the number of 'open'
gcpInitcalls, if there has been more than one call togcpInit. AsgcpInitandgcpExitmust be used in properly nested pairs, e.g. the firstgcpExitafter twogcpInit's will return1.
<0-
ggi-error(3), especially if moregcpExitcalls have been done thangcpInitcalls.
gcpAttach returns:
>=0-
the number LibGGIGCP has been attached to this visual, whereas 0 means the first time.
<0-
indicates an
ggi-error(3).
gcpDetach returns:
0-
after successfully cleaning up,
>0-
the number of 'open'
gcpAttachcalls, if there has been more than one call togcpAttach. AsgcpAttachandgcpDetachmust be used in properly nested pairs, e.g. the firstgcpDetachafter twogcpInit's will return1.
<0-
ggi-error(3), especially if moregcpDetachcalls have been done thangcpAttachcalls.
Examples
ggi_visual_t vis; ggiInit(); gcpInit(); vis = ggiOpen(NULL); gcpAttach(vis); /* ... */ gcpDetach(vis); gcpExit(); ggiExit();
Releases
3 releases since Debian 4.0 (Etch); the text changed 1 time.