Important: The information in this document is obsolete and should not be used for new development.
NewRgn
To begin creating a new region, use theNewRgn
function.
FUNCTION NewRgn: RgnHandle;DESCRIPTION
TheNewRgn
function allocates space for a new, variable-size region; initializes it to the empty region defined by the rectangle (0,0,0,0); and returns a handle to the new region. This is the only function that creates a new region; other routines merely alter the size or shape of existing regions.To begin defining a region, use the
OpenRgn
procedure, described next.SPECIAL CONSIDERATIONS
TheNewRgn
function may move or purge memory blocks in the application heap. Your application should not call this function at interrupt time.Use the Memory Manager function
MaxMem
(described in Inside Macintosh: Memory) to determine whether the memory for the region is valid before usingNewRgn
.SEE ALSO
Listing 3-8 on page 3-24 and Listing 3-9 on page 3-25 illustrate how to use this function.