Name
ggiGAGetType, ggiGASetType -- Get or set the allocation state of a resource.
Synopsis
#include <ggi/galloc.h>
enum ggiGA_resource_type ggiGAGetType
(ggiGA_resource_handle res);
enum ggiGA_resource_type ggiGASetType
(ggiGA_resource_handle res,
enum ggiGA_resource_type state);
Description
These allow setting/getting the resource's feature type.
Return value
Both functions return the feature type that was in the resource
before the function was called.
Examples
Example 1. ggiGAGetType Example
switch (ggiGAGetType(resource) & GA_RT_TYPE_MASK) {
case GA_RT_WINDOW:
/* We don't do windows. */
return;
default:
break;
}
switch(ggiGAGetType(resource)) {
case GA_RT_SPRITE_SPRITE:
/* [...] */
}