Get pieces of information from a LibGAlloc resource handle
Name
ggiGAIsFailed, ggiGAIsModified, ggiGAIsMotor, ggiGAIsTank, ggiGAIsCarb, ggiGAGetVisual : Get pieces of information from a LibGAlloc resource handle
Synopsis
#include <ggi/galloc.h> int ggiGAIsFailed(ggiGA_resource_handle handle); int ggiGAIsModified(ggiGA_resource_handle handle); int ggiGAIsMotor(ggiGA_resource_handle handle); int ggiGAIsTank(ggiGA_resource_handle handle); int ggiGAIsCarb(ggiGA_resource_handle handle); ggi_visual_t ggiGAGetVisual(ggiGA_resource_handle handle);
Description
These functions allow data contained in the resource with handle handle to be accessed.
ggiGAIsFailed tells you whether the given resource was the reason why a ggiGACheck(3) call failed. The first resource for which this returns true is the one that caused the failure.
ggiGAIsModified tells you whether the properties of the given resource were modified during the last call to ggiGACheck(3) or ggiGASet(3). This could have happenned because the resource failed, or it could just have been that the resource held fields with default values like 'GGI_AUTO', which were filled by a suggestion.
ggiGAIsMotor tells you whether the given resource is a motor resource or not. ggiGAIsCarb tells you whether the given resource is a carb resource or not. ggiGAIsTank tells you whether the given resource is a tank resource or not.
ggiGAGetVisual returns a handle to the visual that the resource belongs to, and can only be determined for result handles returned by ggiGAGet(3), ggiGACheck(3), or ggiGASet(3).
Return value
ggiGAIsFailed returns 1 if the resource failed, a negative value if there was an error, or 0 if the resource was successful.
ggiGAIsModified returns 1 if the resource has been modified, a negative value if there was an error, or 0 if there were no suggestions made for this resource.
ggiGAIsMotor returns 1 if the resource is a motor resource, or 0 if the resource is a tank or carb. ggiGAIsCarb returns 1 if the resource is a carb resource, or 0 if the resource is a tank or motor. ggiGAIsTank returns 1 if the resource is a tank resource, or 0 if the resource is a motor or tank.
ggiGAGetVisual returns NULL if there is any error, otherwise it returns a visual as noted above.