Extension management

Name

ggiGAInit, ggiGAExit, ggiGAAttach, ggiGADetach : Extension management

Synopsis

#include <ggi/galloc.h>

int ggiGAInit(void);

int ggiGAExit(void);

int ggiGAAttach(ggi_visual_t vis);

int ggiGADetach(ggi_visual_t vis);

Description

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

ggiGAInit will initialize an instance of the LibGAlloc extension and prepare it to attach to visuals.

ggiGAAttach, if successful, will allow LibGAlloc functions to operate on the named visual.

ggiGADetach, if successful, will clean up all resources involved in providing the named visual with the LibGAlloc API.

ggiGAExit will free all resources associated with an instance of LibGAlloc.

Return Value

All four functions return 0 for success, and an error code on failure.

Examples

ggiGAInit/ggiGAAttach/ggiGADetach/ggiGAExit Example:

ggi_visual_t vis;
ggiInit();
ggiGAInit();
vis = ggiOpen(NULL);
ggiGAAttach(vis);

/* ... */

ggiGADetach(vis);
ggiGAExit();
ggiExit();