Name
ggiBltAttach, ggiBltDetach -- Enable the LibBlt API on a LibGGI visual
Synopsis
#include <ggi/blt.h>
int ggiBltAttach
(ggi_visual_t vis
ggiGA_resource_list *reslist);
int ggiBltDetach
(ggi_visual_t vis);
Description
ggiBltAttach extends the visual vis such that the
LibBlt API may be used on the visual handle. This function must be called
before using other LibBlt functions on the visual handle. The parameter
reslist is a pointer to a LibGAlloc resource list kept by the
application, and such an object must exist and be passed to
ggiBltAttach in order to use the simple-form ggiBltCreate*
functions.
ggiBltDetach cleans up all state associated with using the
LibBlt API on the visual vis.
Return value
Both functions return 0 for OK, otherwise an error code.
Examples
Example 1. Activate LibBlt such that the ggiBltCreate* functions work
ggiGA_resource_list reslist;
reslist = NULL;
ggiBltInit();
ggiBltAttach(vis, &reslist);
/* Do some libblt stuff */
ggiBltDetach(vis);
ggiBltExit();