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.
play.r
/* The BNDL describes how to get to our ICN# resources |
* so that the Finder can display the icon, and tell |
* which application to open when a file of the associated type has |
* been opened. |
*/ |
resource 'BNDL' (128) { |
'aucd', |
0, |
{ /* array TypeArray: 2 elements */ |
/* [1] */ |
'ICN#', |
{ /* array IDArray: 2 elements */ |
/* [1] */ |
0, 128, |
/* [2] */ |
1, 129 |
}, |
/* [2] */ |
'FREF', |
{ /* array IDArray: 2 elements */ |
/* [1] */ |
0, 128, |
/* [2] */ |
1, 129 |
} |
} |
}; |
resource 'FREF' (128) { |
'APPL', |
0, |
"" |
}; |
resource 'FREF' (129) { |
'trak', |
1, |
"" |
}; |
/* Our program icon. This is what I look like, |
* roughly. Thanks to the Bill AtkinsonÕs Hypercard |
* icon stack for my inspiration. (Ever notice how everybody |
* looks pretty similar at 32 bits by 32 bits?) |
*/ |
resource 'ICN#' (128) { |
{ /* array: 2 elements */ |
/* [1] */ |
$"000F F000 003F FC00 006F 7E00 01FD F700" |
$"03D3 C380 03B4 03C0 0780 03C0 0700 00E0" |
$"0680 00E0 0680 00E0 0700 00E0 06FC 3FE0" |
$"0FBF F6E0 0B2A 4A90 0B02 40D0 0584 21A0" |
$"0578 1EA0 0500 01A0 0283 41C0 03C3 A340" |
$"01E0 0A80 00AF DD80 00AD F700 00FC 0900" |
$"006B F700 0079 DD00 005F 7900 004E D980" |
$"0081 F0C0 0300 0030 1C00 001C E000 0007", |
/* [2] */ |
$"000F F000 003F FC00 007F FE00 01FF FF00" |
$"03FF FF80 03FF FFC0 07FF FFC0 07FF FFE0" |
$"07FF FFE0 07FF FFE0 07FF FFE0 07FF FFE0" |
$"0FFF FFE0 0FFF FFF0 0FFF FFF0 07FF FFE0" |
$"07FF FFE0 07FF FFE0 03FF FFC0 03FF FFC0" |
$"01FF FF80 00FF FF80 00FF FF00 00FF FF00" |
$"007F FF00 007F FD00 005F F900 004F F980" |
$"0081 F0C0 0300 0030 1C00 001C E000 0007" |
} |
}; |
/* The ICN# for the documents "created" by this |
* application. Actually, the Audio CD Access |
* file returns this icon to the finder. I must |
* supply this icon as well, so that if somebody |
* copies a audio CD track to a hard disk, it will |
* still show up with the proper icon. (Now there's |
* a useless operation... copy an audio track to |
* a hard disk...) |
*/ |
resource 'ICN#' (129) { |
{ /* array: 2 elements */ |
/* [1] */ |
$"FFFF E000 8000 3000 8200 2800 8200 2400" |
$"8300 2200 8280 2100 8240 3F80 8240 0080" |
$"8240 0080 8247 FFFC 8288 3F82 9E10 D561" |
$"BE11 AAB1 BE13 5559 9C16 AAAD 8015 5F55" |
$"801A B1AB 801D 6ED7 801A DF6B 801D 5957" |
$"801A D96B 801D 6ED7 801A B1AB 8015 5F57" |
$"8016 AAAF 8013 555D 8011 AABD 8010 D579" |
$"8010 3FF1 801F FFFF 8010 0001 FFEF FFFE", |
/* [2] */ |
$"FFFF E000 FFFF F000 FFFF F800 FFFF FC00" |
$"FFFF FE00 FFFF FF00 FFFF FF80 FFFF FF80" |
$"FFFF FF80 FFFF FFFC FFFF FFFE FFFF FFFF" |
$"FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF" |
$"FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF" |
$"FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF" |
$"FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF" |
$"FFFF FFFF FFFF FFFF FFFF FFFF FFEF FFFE" |
} |
}; |
/* My version comment. */ |
type 'aucd' as 'STR '; |
data 'aucd' (0) { |
"Play demo 1.1" |
}; |
/* This DITL, ALRT, ICON triplet makes up my error routine |
* dialog box. The ALRT defines the layout of the DITL and |
* ICON. The DITL contains a button marked "OK", plus three |
* spaces for ParamText() to fill in (I don't display the fourth |
* possible parameter to ParamText()). |
*/ |
resource 'DITL' (128, "Error", purgeable) { |
{ /* array DITLarray: 5 elements */ |
/* [1] */ |
{122, 226, 142, 286}, |
Button { |
enabled, |
"OK" |
}, |
/* [2] */ |
{17, 67, 39, 286}, |
StaticText { |
disabled, |
"^0" |
}, |
/* [3] */ |
{49, 67, 68, 108}, |
StaticText { |
disabled, |
"^1" |
}, |
/* [4] */ |
{24, 18, 56, 50}, |
Icon { |
disabled, |
128 |
}, |
/* [5] */ |
{49, 117, 114, 286}, |
StaticText { |
enabled, |
"^2" |
} |
} |
}; |
resource 'ALRT' (128, "Error") { |
{50, 72, 202, 410}, |
128, |
{ /* array: 4 elements */ |
/* [1] */ |
OK, visible, silent, |
/* [2] */ |
OK, visible, silent, |
/* [3] */ |
OK, visible, silent, |
/* [4] */ |
OK, visible, silent |
} |
}; |
resource 'ICON' (128) { |
$"FFFF E000 8000 3000 8200 2800 8200 2400" |
$"8300 2200 8280 2100 8240 3F80 8240 0080" |
$"8240 0080 8247 FFFC 8288 3F82 9E10 D561" |
$"BE11 AAB1 BE13 5559 9C16 AAAD 8015 5F55" |
$"801A B1AB 801D 6ED7 801A DF6B 801D 5957" |
$"801A D96B 801D 6ED7 801A B1AB 8015 5F57" |
$"8016 AAAF 8013 555D 8011 AABD 8010 D579" |
$"8010 3FF1 801F FFFF 8010 0001 FFEF FFFE" |
}; |
Copyright © 2003 Apple Computer, Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2003-01-14