[Contents] [Index] [Help] [Retrace] [browse <] [Browse >]


NAME
    ObtainGIRPort -- Set up a rastport for a custom gadget. (v36)

SYNOPSIS
    RPort = ObtainGIRPort( GInfo )
    D0                     A0

    struct rastport *obtaingirport( struct gadgetinfo * );

FUNCTION
    Sets up a rastport for use (only) by custom gadget hook routines.
    This function must be called EACH time a hook routine needing
    to perform gadget rendering is called, and must be accompanied
    by a corresponding call to releasegirport().

    Note that if a hook function passes you a rastport pointer,
    e.g., GM_RENDER, you needn't call ObtainGIRPort() in that case.

INPUTS
    A pointer to a gadgetinfo structure, as passed to each custom
    gadget hook function.

RESULT
    A pointer to a rastport that may be used for gadget rendering.
    This pointer may be NULL, in which case you should do no rendering.
    You may (optionally) pass a null return value to releasegirport().

BUGS

SEE ALSO
    releasegirport(), custom gadget documentation