Specifications

Developer Technical Support May 1992
Apple IIGS
#76: Miscellaneous Resource Formats 7 of 8
The resource compiler template follows:
#define rRectList $C001
type rRectList {
integer = $$Countof(RectArray);
array RectArray {
Rect;
};
};
Print Record Resource (Type: $C002, rPrintRecord)
As a convenience for applications, a print record may be included as a resource of type $C002
(rPrintRecord). If more than one of these resources is present, the one to use as the
document’s primary print record is the first one. You can get this resource’s ID by calling
GetIndResource with type rPrintRecord and index 1. Storing the primary print record with
ID = 1 is a good way to start.
Since the print record is filled in and interpreted by the printer driver, you can’t always
programmatically set options that are driver-specific. For example, although the ImageWriter driver
stores the color-vs.-black and white option in one place, not all color printers will do the same thing.
If you want to use driver-specific options on many printers, you can use those printer drivers to
create print record that reflect the options you want and store those records as resources. Then, if
you need a pre-initialized print record with the options you want, you may already have one.
print record (+000) 160 Bytes The print record. The handle to this resource is
suitable for passing to any Print Manager call that
requires a print record handle.
Since applications shouldn’t create print records from scratch, but rather allow printer drivers to fill
them in with PrDefault and PrVerify, the resource compiler template that follows only
allocates 160 bytes for storage.
#define rPrintRecord $C002
/*-------------------- rPrintRecord ------------------*/
type rPrintRecord {
array[160] {
hex byte;
};
};
Font Resource (Type: $C003, rFont)
Some applications wish to keep fonts with the application itself instead of in a separate font file.
This isn’t always advisable—fonts not in font files can’t be easily used in other applications, which
may confuse users who, for example, use text-editing desk accessories and can’t get at certain fonts
except in certain applications. Also, fonts not in the Fonts directory must be completely memory-
resident where normal Fonts are only loaded from disk when they’re needed.