mac-rom/Interfaces/AIncludes/Icons.a
Elliot Nunn 0ba83392d4 Bring in CubeE sources
Resource forks are included only for .rsrc files. These are DeRezzed into their data fork. 'ckid' resources, from the Projector VCS, are not included.

The Tools directory, containing mostly junk, is also excluded.
2017-09-20 18:04:16 +08:00

458 lines
14 KiB
Plaintext

;
; File: Icons.a
;
; Contains: Public Asm Interfaces for color icon plotting utilities
;
; Written by: Kevin MacDonell
;
; Copyright: © 1990, 1992 by Apple Computer, Inc., all rights reserved.
;
; This file is used in these builds: BigBang
;
;
; Change History (most recent first):
;
; <20> 3/17/92 DC Added include of traps.a so that DoDispatch would be defined.
; <19> 3/17/92 DC imported all private definitions from IconUtilsPriv.a except get
; and set icon device and SetLabel.
; <18> 1/30/91 gbm sab, #38: Change the Ôalready including this fileÕ variable to
; all uppercase (for security reasons)
; <17> 1/17/91 DC csd - add genericExtensionIconResource (-16415)
; <16> 1/16/91 JDR (dba) Renamed spoolFolderIconResource into
; printMonitorFolderIconResource.
; <15> 1/7/91 JDR (dba) Removing private Icon Utilities routines from the public
; interfaces.
; <14> 11/29/90 DC ngk - Add selector for GetIconDevice. Fix selector names for
; routines with new names.
; <13> 11/19/90 DC ngk - Moved System Icon ID's from private to public and added
; interfaces for PlotIconHandle PlotSICNHandle and PlotCIconHandle
; <12> 9/19/90 DC Changed names of some routines to be more descriptive
; <11> 9/15/90 DC Removed SetLabel from public interface
; <10> 7/25/90 DC Added interfaces for Get and Set cache Procs and Data
; <9> 7/23/90 DC New interfaces for SetIconDevice etc
; <8> 7/12/90 DC Really removed support for ttGhost
; <7> 7/12/90 DC Removed support for ttGhost
; <6> 7/5/90 DC Add interfaces for hit-testing and region-producing routines.
; <5> 6/29/90 DC Added label transforms
; <4> 6/29/90 DC Added GetLabel and SetLabel
; <3> 6/1/90 DC Minor Inteface cleanup
; <2> 5/30/90 DC Changed protection identifier from IncludingIconUtils to
; IncludingIcons
; <1> 5/30/90 DC first checked in as Icons.a
; <11> 5/30/90 DC Do the right thing for a linked patch interface
; <10> 5/22/90 DC Made IconCaches a subclass of IconSuites
; <9> 5/4/90 DC Added new EQU's for ttGhost
; <8> 5/4/90 DC Changed DC.L's to EQU's
; <4> 4/24/90 DC Add interfaces for NewIconSuite, AddIconToSuite, ETC.
; <3> 4/11/90 DC changed interfaces for transforms
; <2> 4/11/90 KSM Changed the DC.B's to DC.L's for the rsrc types.
; <1> 4/11/90 KSM First checked in.
; To Do:
IF &TYPE('__INCLUDINGICONS__') = 'UNDEFINED' THEN
__INCLUDINGICONS__ SET 1
IF &TYPE('__INCLUDINGTRAPS__') = 'UNDEFINED' THEN
INCLUDE 'Traps.a'
ENDIF ; ...already included
; The following are icons for which there are both icon suites and SICNs.
genericDocumentIconResource EQU -4000
genericStationeryIconResource EQU -3985
genericEditionFileIconResource EQU -3989
genericApplicationIconResource EQU -3996
genericDeskAccessoryIconResource EQU -3991
genericFolderIconResource EQU -3999
privateFolderIconResource EQU -3994
floppyIconResource EQU -3998
trashIconResource EQU -3993
; The following are icons for which there are SICNs only.
desktopIconResource EQU -3992
openFolderIconResource EQU -3997
genericHardDiskIconResource EQU -3995
genericFileServerIconResource EQU -3972
genericSuitcaseIconResource EQU -3970
genericMoverObjectIconResource EQU -3969
; The following are icons for which there are icon suites only.
genericPreferencesIconResource EQU -3971
genericQueryDocumentIconResource EQU -16506
genericExtensionIconResource EQU -16415
systemFolderIconResource EQU -3983
appleMenuFolderIconResource EQU -3982
startupFolderIconResource EQU -3981
ownedFolderIconResource EQU -3980
dropFolderIconResource EQU -3979
sharedFolderIconResource EQU -3978
mountedFolderIconResource EQU -3977
controlPanelFolderIconResource EQU -3976
printMonitorFolderIconResource EQU -3975
preferencesFolderIconResource EQU -3974
extensionsFolderIconResource EQU -3973
fullTrashIconResource EQU -3984
Large1BitMask EQU ('ICN#')
Large4BitData EQU ('icl4')
Large8BitData EQU ('icl8')
Small1BitMask EQU ('ics#')
Small4BitData EQU ('ics4')
Small8BitData EQU ('ics8')
Mini1BitMask EQU ('icm#')
Mini4BitData EQU ('icm4')
Mini8BitData EQU ('icm8')
; Alignment Equates
atNone EQU $0
atVerticalCenter EQU $1
atTop EQU $2
atBottom EQU $3
atHorizontalCenter EQU $4
atAbsoluteCenter EQU (atVerticalCenter | atHorizontalCenter)
atCenterTop EQU (atTop | atHorizontalCenter)
atCenterBottom EQU (atBottom | atHorizontalCenter)
atLeft EQU $8
atCenterLeft EQU (atVerticalCenter | atLeft)
atTopLeft EQU (atTop | atLeft)
atBottomLeft EQU (atBottom | atLeft)
atRight EQU $C
atCenterRight EQU (atVerticalCenter | atRight)
atTopRight EQU (atTop | atRight)
atBottomRight EQU (atBottom | atRight)
;Transform Types
ttNone EQU $0
ttDisabled EQU $1
ttOffline EQU $2
ttOpen EQU $3
ttLabel1 EQU $0100
ttLabel2 EQU $0200
ttLabel3 EQU $0300
ttLabel4 EQU $0400
ttLabel5 EQU $0500
ttLabel6 EQU $0600
ttLabel7 EQU $0700
ttSelected EQU $4000
ttSelectedDisabled EQU (ttSelected | ttDisabled)
ttSelectedOffline EQU (ttSelected | ttOffline)
ttSelectedOpen EQU (ttSelected | ttOpen)
;Selector mask values
svLarge1Bit EQU $00000001
svLarge4Bit EQU $00000002
svLarge8Bit EQU $00000004
svSmall1Bit EQU $00000100
svSmall4Bit EQU $00000200
svSmall8Bit EQU $00000400
svMini1Bit EQU $00010000
svMini4Bit EQU $00020000
svMini8Bit EQU $00040000
svAllLargeData EQU $000000FF
svAllSmallData EQU $0000FF00
svAllMiniData EQU $00FF0000
svAll1BitData EQU (svLarge1Bit | svSmall1Bit | svMini1Bit)
svAll4BitData EQU (svLarge4Bit | svSmall4Bit | svMini4Bit)
svAll8BitData EQU (svLarge8Bit | svSmall8Bit | svMini8Bit)
svAllAvailableData EQU $FFFFFFFF
;ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
; Define the new selectors for the Icon Utilities
selectPlotIconID EQU $0
selectGetIconSuite EQU $1
selectDisposeIconSuite EQU $2
selectPlotIconSuite EQU $3
selectMakeIconCache EQU $4
selectPlotIconMethod EQU $5
selectLoadIconCache EQU $6
selectNewIconSuite EQU $7
selectAddIconToSuite EQU $8
selectGetIconFromSuite EQU $9
selectForEachIconDo EQU $A
selectGetLabel EQU $B
selectPtInIconID EQU $D
selectPtInIconSuite EQU $E
selectPtInIconMethod EQU $F
selectRectInIconID EQU $10
selectRectInIconSuite EQU $11
selectRectInIconMethod EQU $12
selectIconIDToRgn EQU $13
selectIconSuiteToRgn EQU $14
selectIconMethodToRgn EQU $15
selectSetSuiteLabel EQU $16
selectGetSuiteLabel EQU $17
selectGetIconCacheData EQU $19
selectSetIconCacheData EQU $1A
selectGetIconCacheProc EQU $1B
selectSetIconCacheProc EQU $1C
selectPlotIconHandle EQU $1D
selectPlotSICNHandle EQU $1E
selectPlotCIconHandle EQU $1F
;ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
; Define the new paramors for the Icon Utilities
paramPlotIconID EQU $5
paramGetIconSuite EQU $5
paramDisposeIconSuite EQU $3
paramPlotIconSuite EQU $6
paramMakeIconCache EQU $6
paramPlotIconMethod EQU $8
paramLoadIconCache EQU $6
paramNewIconSuite EQU $2
paramAddIconToSuite EQU $6
paramGetIconFromSuite EQU $6
paramForEachIconDo EQU $8
paramGetLabel EQU $5
paramPtInIconID EQU $6
paramPtInIconSuite EQU $7
paramPtInIconMethod EQU $9
paramRectInIconID EQU $6
paramRectInIconSuite EQU $7
paramRectInIconMethod EQU $9
paramIconIDToRgn EQU $6
paramIconSuiteToRgn EQU $7
paramIconMethodToRgn EQU $9
paramSetSuiteLabel EQU $3
paramGetSuiteLabel EQU $2
paramGetIconCacheData EQU $4
paramSetIconCacheData EQU $4
paramGetIconCacheProc EQU $4
paramSetIconCacheProc EQU $4
paramPlotIconHandle EQU $6
paramPlotSICNHandle EQU $6
paramPlotCIconHandle EQU $6
; IconAction = ProcPtr; {
; FUNCTION IconAction(theType: ResType;
; VAR theIcon: Handle;
; yourDataPtr: Ptr): OSErr;
; }
; IconGetter = ProcPtr; {
; FUNCTION IconGetter(theType: ResType;
; yourDataPtr: Ptr): Handle;
; }
; FUNCTION PlotIconID(theRect: Rect; align: INTEGER;
; transform: INTEGER; theID: INTEGER): OSErr;
MACRO
_PlotIconID
DoDispatch _IconDispatch, selectPlotIconID, paramPlotIconID
ENDM
; FUNCTION NewIconSuite(VAR theIconSuite: Handle): OSErr;
MACRO
_NewIconSuite
DoDispatch _IconDispatch, selectNewIconSuite, paramNewIconSuite
ENDM
; FUNCTION AddIconToSuite(theIconData: Handle; theSuite: Handle;
; theType: ResType): OSErr;
MACRO
_AddIconToSuite
DoDispatch _IconDispatch, selectAddIconToSuite, paramAddIconToSuite
ENDM
; FUNCTION GetIconFromSuite(VAR theIconData: Handle; theSuite: Handle;
; theType: ResType): OSErr;
MACRO
_GetIconFromSuite
DoDispatch _IconDispatch, selectGetIconFromSuite, paramGetIconFromSuite
ENDM
; FUNCTION ForEachIconDo(theSuite: Handle; selector: LONGINT;
; action: IconAction; yourDataPtr: Ptr): OSErr;
MACRO
_ForEachIconDo
DoDispatch _IconDispatch, selectForEachIconDo, paramForEachIconDo
ENDM
; FUNCTION GetIconSuite(VAR theIconSuite: Handle; theID: INTEGER;
; selector: LONGINT): OSErr;
MACRO
_GetIconSuite
DoDispatch _IconDispatch, selectGetIconSuite, paramGetIconSuite
ENDM
; FUNCTION DisposeIconSuite(theIconSuite: Handle,
; disposeData: BOOLEAN): OSErr;
MACRO
_DisposeIconSuite
DoDispatch _IconDispatch, selectDisposeIconSuite, paramDisposeIconSuite
ENDM
; FUNCTION PlotIconSuite(theRect: Rect; align: INTEGER; transform: INTEGER;
; theIconSuite: Handle): OSErr;
MACRO
_PlotIconSuite
DoDispatch _IconDispatch, selectPlotIconSuite, paramPlotIconSuite
ENDM
; FUNCTION MakeIconCache(VAR theHandle: Handle; makeIcon: IconGetter;
; yourDataPtr: Ptr): OSErr;
MACRO
_MakeIconCache
DoDispatch _IconDispatch, selectMakeIconCache, paramMakeIconCache
ENDM
; FUNCTION LoadIconCache(theRect: Rect; align: INTEGER; transform: INTEGER;
; theIconCache: Handle): OSErr;
MACRO
_LoadIconCache
DoDispatch _IconDispatch, selectLoadIconCache, paramLoadIconCache
ENDM
; FUNCTION PlotIconMethod(theRect: Rect; align: INTEGER; transform: INTEGER;
; theMethod: IconGetter; yourDataPtr: Ptr): OSErr;
MACRO
_PlotIconMethod
DoDispatch _IconDispatch, selectPlotIconMethod, paramPlotIconMethod
ENDM
; FUNCTION GetLabel(labelNumber: INTEGER; VAR labelColor: RGBColor;
; VAR Str255 labelString): OSErr;
MACRO
_GetLabel
DoDispatch _IconDispatch, selectGetLabel, paramGetLabel
ENDM
; FUNCTION PtInIconID(testPt: Point; iconRect: Rect;
; align: IconAlignmentType; iconID: INTEGER): BOOLEAN;
MACRO
_PtInIconID
DoDispatch _IconDispatch, selectPtInIconID, paramPtInIconID
ENDM
; FUNCTION PtInIconSuite(testPt: Point; iconRect: Rect;
; align: IconAlignmentType;
; theIconSuite: Handle): BOOLEAN;
MACRO
_PtInIconSuite
DoDispatch _IconDispatch, selectPtInIconSuite, paramPtInIconSuite
ENDM
; FUNCTION PtInIconMethod(testPt: Point; iconRect: Rect;
; align: IconAlignmentType;
; theMethod: IconGetter; yourDataPtr: Ptr): BOOLEAN;
MACRO
_PtInIconMethod
DoDispatch _IconDispatch, selectPtInIconMethod, paramPtInIconMethod
ENDM
; FUNCTION RectInIconID(testRect: Rect; iconRect: Rect;
; align: IconAlignmentType; iconID: INTEGER): BOOLEAN;
MACRO
_RectInIconID
DoDispatch _IconDispatch, selectRectInIconID, paramRectInIconID
ENDM
; FUNCTION RectInIconSuite(testRect: Rect; iconRect: Rect;
; align: IconAlignmentType;
; theIconSuite: Handle): BOOLEAN;
MACRO
_RectInIconSuite
DoDispatch _IconDispatch, selectRectInIconSuite, paramRectInIconSuite
ENDM
; FUNCTION RectInIconMethod(testRect: Rect; iconRect: Rect;
; align: IconAlignmentType;
; theMethod: IconGetter; yourDataPtr: Ptr): BOOLEAN;
MACRO
_RectInIconMethod
DoDispatch _IconDispatch, selectRectInIconMethod, paramRectInIconMethod
ENDM
; FUNCTION IconIDToRgn(theRgn: RgnHandle; iconRect: Rect;
; align: IconAlignmentType; iconID: INTEGER): OSErr;
MACRO
_IconIDToRgn
DoDispatch _IconDispatch, selectIconIDToRgn, paramIconIDToRgn
ENDM
; FUNCTION IconSuiteToRgn(theRgn: RgnHandle; iconRect: Rect;
; align: IconAlignmentType;
; theIconSuite: Handle): OSErr;
MACRO
_IconSuiteToRgn
DoDispatch _IconDispatch, selectIconSuiteToRgn, paramIconSuiteToRgn
ENDM
; FUNCTION IconMethodToRgn(theRgn: RgnHandle; iconRect: Rect;
; align: IconAlignmentType;
; theMethod: IconGetter; yourDataPtr: Ptr): OSErr;
MACRO
_IconMethodToRgn
DoDispatch _IconDispatch, selectIconMethodToRgn, paramIconMethodToRgn
ENDM
; FUNCTION SetSuiteLabel(theSuite: Handle; theLabel: INTEGER): OSErr;
MACRO
_SetSuiteLabel
DoDispatch _IconDispatch, selectSetSuiteLabel, paramSetSuiteLabel
ENDM
; FUNCTION GetSuiteLabel(theSuite: Handle): INTEGER;
MACRO
_GetSuiteLabel
DoDispatch _IconDispatch, selectGetSuiteLabel, paramGetSuiteLabel
ENDM
; FUNCTION GetIconCacheData(theCache: Handle; VAR theData: Ptr): OSErr;
MACRO
_GetIconCacheData
DoDispatch _IconDispatch, selectGetIconCacheData, paramGetIconCacheData
ENDM
; FUNCTION SetIconCacheData(theCache: Handle; theData: Ptr): OSErr;
MACRO
_SetIconCacheData
DoDispatch _IconDispatch, selectSetIconCacheData, paramSetIconCacheData
ENDM
; FUNCTION GetIconCacheProc(theCache: Handle; VAR theProc: IconGetter): OSErr;
MACRO
_GetIconCacheProc
DoDispatch _IconDispatch, selectGetIconCacheProc, paramGetIconCacheProc
ENDM
; FUNCTION SetIconCacheProc(theCache: Handle; theProc: IconGetter): OSErr;
MACRO
_SetIconCacheProc
DoDispatch _IconDispatch, selectSetIconCacheProc, paramSetIconCacheProc
ENDM
; FUNCTION PlotIconHandle(theRect: Rect; align: INTEGER; transform: INTEGER;
; theIcon: Handle): OSErr;
MACRO
_PlotIconHandle
DoDispatch _IconDispatch, selectPlotIconHandle, paramPlotIconHandle
ENDM
; FUNCTION PlotSICNHandle(theRect: Rect; align: INTEGER; transform: INTEGER;
; theSICN: Handle): OSErr;
MACRO
_PlotSICNHandle
DoDispatch _IconDispatch, selectPlotSICNHandle, paramPlotSICNHandle
ENDM
; FUNCTION PlotCIconHandle(theRect: Rect; align: INTEGER; transform: INTEGER;
; theCIcon: CIconHandle): OSErr;
MACRO
_PlotCIconHandle
DoDispatch _IconDispatch, selectPlotCIconHandle, paramPlotCIconHandle
ENDM
ENDIF ; ...already included