Retired Document
Important: This sample code may not represent best practices for current development. The project may use deprecated symbols and illustrate technologies and techniques that are no longer recommended.
FOR MPW/PACKMan.r
// Chooser Package, updated from Scott ÒZzÓ Zimmerman's PACKman pascal sample |
// |
// Copyright: © 1989-94 by Apple Computer, Inc., all rights reserved. |
// |
// Modification History: |
// |
// 10/18/94 nick converted from Pascal |
// 10/19/94 nick updated to reflect info in IM: Devices (pages 1-42 ff) |
// remove the pack -4096 code resource defintion |
// |
#include "Chooser.r" |
type 'Zz ' as 'STR '; |
resource 'Zz ' (0) { |
"PACKMan - Sample device package for Chooser." |
}; |
resource 'vers' (1) { |
0x00, 0x00, development, 0x00, |
verUS, |
"0.00d1", |
"0.00d1, Copyright \251 1989-94 Apple Computer, Inc." |
}; |
resource 'BNDL' (128) { |
'Zz ', |
0, |
{ |
'ICN#', |
{ |
0, 128 |
}, |
'FREF', |
{ |
0, 128 |
} |
} |
}; |
resource 'FREF' (128) { |
'PRER', |
0, |
"" |
}; |
resource 'ICN#' (128) { |
{ /* array: 2 elements */ |
/* [1] */ |
$"04 30 40 00 0A 50 A0 00 0B 91 10 02 08 22 08 03" |
$"12 24 04 05 20 28 02 09 40 10 01 11 80 0C 00 A1" |
$"80 03 FF C2 7E 00 FF 04 01 00 7F 04 03 00 1E 08" |
$"04 E0 00 0C 08 E0 00 0A 10 E0 00 09 08 C0 00 06" |
$"04 87 FE 04 02 88 01 04 01 88 00 84 00 88 00 44" |
$"00 88 00 44 00 88 00 C4 01 10 01 88 02 28 03 10" |
$"01 C4 04 E0 00 02 08 00 73 BF FB EE 4C A2 8A 2A" |
$"40 AA AA EA 52 AA AA 24 5E A2 8A EA 73 BE FB 8E", |
/* [2] */ |
$"04 30 40 00 0E 70 E0 00 0F F1 F0 02 0F E3 F8 03" |
$"1F E7 FC 07 3F EF FE 0F 7F FF FF 1F FF FF FF BF" |
$"FF FF FF FE 7F FF FF FC 01 FF FF FC 03 FF FF F8" |
$"07 FF FF FC 0F FF FF FE 1F FF FF FF 0F FF FF FE" |
$"07 FF FF FC 03 FF FF FC 01 FF FF FC 00 FF FF FC" |
$"00 FF FF FC 00 FF FF FC 01 FF FF F8 03 EF FF F0" |
$"01 C7 FC E0 00 03 F8 00 73 BF FB EE 7F BE FB EE" |
$"7F BE FB EE 7F BE FB E4 7F BE FB EE 73 BE FB 8E" |
} |
}; |
/* Type name for AppleTalk devices... */ |
resource 'STR ' (-4096) { |
"BogusWriter" |
}; |
/* Left button title. */ |
resource 'STR ' (-4093) { |
"Left" |
}; |
/* Right button title. */ |
resource 'STR ' (-4092) { |
"Right" |
}; |
/* String for Chooser to use to label the */ |
/* list when choosing the device. */ |
resource 'STR ' (-4091) { |
"BogusWriters:" |
}; |
/* Reserved for use by the Chooser. */ |
resource 'STR ' (-4090) { |
"BogusWriters:" |
}; |
/* NBP timeout and retry information for AppleTalk devices. */ |
resource 'GNRL' (-4096) { |
11, /* Retry interval */ |
5 /* Retry count */ |
}; |
/* Device PACKage resource [IM IV-217]. */ |
// This is defined in new inside macintosh: devices page 1-42 onwards |
// in Zz's pascal sample the code resource was included in the |
// resource in the following way - as the THINK Rez compiler does |
// not understand the $$resource directive we need to build the header |
// as described on pages 274 onwards in the THINK C 7 manual. |
// |
//resource 'PACK' (-4096, purgeable) { |
// 128, /* Device ID */ |
// 10, /* Version (1.0) */ |
// usesAppleTalk, |
// noPAP, |
// noPostScript, |
// noMultiples, |
// noLeftButton, |
// noRightButton, |
// usesSavedZoneName, |
// noActualZoneNames, |
// acceptsInit, |
// acceptsNewSel, |
// acceptsFillList, |
// acceptsGetSel, |
// acceptsSelect, |
// acceptsDeselect, |
// ignoresTerminate, |
// $$resource("PACKMan.CODE", 'CODE', 42) |
//}; |
Copyright © 2003 Apple Computer, Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2003-01-14