|
Mac OS 9
|
Icon Utilities and Icon Services Interfaces. More...
#include <MacTypes.h>#include <Quickdraw.h>#include <Files.h>#include <CodeFragments.h>#include <CGContext.h>Go to the source code of this file.
Data Structures | |
| struct | CIcon |
| struct | IconFamilyElement |
| struct | IconFamilyResource |
Macros | |
| #define | NewIconActionUPP(userRoutine) |
| #define | NewIconGetterUPP(userRoutine) |
| #define | DisposeIconActionUPP(userUPP) DisposeRoutineDescriptor(userUPP) |
| #define | DisposeIconGetterUPP(userUPP) DisposeRoutineDescriptor(userUPP) |
| #define | InvokeIconActionUPP(theType, theIcon, yourDataPtr, userUPP) |
| #define | InvokeIconGetterUPP(theType, yourDataPtr, userUPP) |
| #define | NewIconActionProc(userRoutine) NewIconActionUPP(userRoutine) |
| #define | NewIconGetterProc(userRoutine) NewIconGetterUPP(userRoutine) |
| #define | CallIconActionProc(userRoutine, theType, theIcon, yourDataPtr) InvokeIconActionUPP(theType, theIcon, yourDataPtr, userRoutine) |
| #define | CallIconGetterProc(userRoutine, theType, yourDataPtr) InvokeIconGetterUPP(theType, yourDataPtr, userRoutine) |
Typedefs | |
| typedef SInt16 | IconAlignmentType |
| typedef SInt16 | IconTransformType |
| typedef UInt32 | IconSelectorValue |
| typedef Handle * | theIcon |
| typedef Handle void * | yourDataPtr |
| typedef IconGetterProcPtr | IconGetter |
| typedef IconActionProcPtr | IconAction |
| typedef struct CIcon | CIcon |
| typedef CIcon * | CIconPtr |
| typedef CIconPtr * | CIconHandle |
| typedef Handle | IconSuiteRef |
| typedef Handle | IconCacheRef |
| typedef struct OpaqueIconRef * | IconRef |
| typedef UInt32 | IconServicesUsageFlags |
| typedef UInt32 | PlotIconRefFlags |
| typedef struct IconFamilyElement | IconFamilyElement |
| typedef struct IconFamilyResource | IconFamilyResource |
| typedef IconFamilyResource * | IconFamilyPtr |
| typedef IconFamilyPtr * | IconFamilyHandle |
Enumerations | |
| enum | { kGenericDocumentIconResource = -4000 , kGenericStationeryIconResource = -3985 , kGenericEditionFileIconResource = -3989 , kGenericApplicationIconResource = -3996 , kGenericDeskAccessoryIconResource = -3991 , kGenericFolderIconResource = -3999 , kPrivateFolderIconResource = -3994 , kFloppyIconResource = -3998 , kTrashIconResource = -3993 , kGenericRAMDiskIconResource = -3988 , kGenericCDROMIconResource = -3987 } |
| enum | { kDesktopIconResource = -3992 , kOpenFolderIconResource = -3997 , kGenericHardDiskIconResource = -3995 , kGenericFileServerIconResource = -3972 , kGenericSuitcaseIconResource = -3970 , kGenericMoverObjectIconResource = -3969 } |
| enum | { kGenericPreferencesIconResource = -3971 , kGenericQueryDocumentIconResource = -16506 , kGenericExtensionIconResource = -16415 , kSystemFolderIconResource = -3983 , kHelpIconResource = -20271 , kAppleMenuFolderIconResource = -3982 } |
| enum | { genericDocumentIconResource = kGenericDocumentIconResource , genericStationeryIconResource = kGenericStationeryIconResource , genericEditionFileIconResource = kGenericEditionFileIconResource , genericApplicationIconResource = kGenericApplicationIconResource , genericDeskAccessoryIconResource = kGenericDeskAccessoryIconResource , genericFolderIconResource = kGenericFolderIconResource , privateFolderIconResource = kPrivateFolderIconResource , floppyIconResource = kFloppyIconResource , trashIconResource = kTrashIconResource , genericRAMDiskIconResource = kGenericRAMDiskIconResource , genericCDROMIconResource = kGenericCDROMIconResource , desktopIconResource = kDesktopIconResource , openFolderIconResource = kOpenFolderIconResource , genericHardDiskIconResource = kGenericHardDiskIconResource , genericFileServerIconResource = kGenericFileServerIconResource , genericSuitcaseIconResource = kGenericSuitcaseIconResource , genericMoverObjectIconResource = kGenericMoverObjectIconResource , genericPreferencesIconResource = kGenericPreferencesIconResource , genericQueryDocumentIconResource = kGenericQueryDocumentIconResource , genericExtensionIconResource = kGenericExtensionIconResource , systemFolderIconResource = kSystemFolderIconResource , appleMenuFolderIconResource = kAppleMenuFolderIconResource } |
| enum | { kStartupFolderIconResource = -3981 , kOwnedFolderIconResource = -3980 , kDropFolderIconResource = -3979 , kSharedFolderIconResource = -3978 , kMountedFolderIconResource = -3977 , kControlPanelFolderIconResource = -3976 , kPrintMonitorFolderIconResource = -3975 , kPreferencesFolderIconResource = -3974 , kExtensionsFolderIconResource = -3973 , kFontsFolderIconResource = -3968 , kFullTrashIconResource = -3984 } |
| enum | { startupFolderIconResource = kStartupFolderIconResource , ownedFolderIconResource = kOwnedFolderIconResource , dropFolderIconResource = kDropFolderIconResource , sharedFolderIconResource = kSharedFolderIconResource , mountedFolderIconResource = kMountedFolderIconResource , controlPanelFolderIconResource = kControlPanelFolderIconResource , printMonitorFolderIconResource = kPrintMonitorFolderIconResource , preferencesFolderIconResource = kPreferencesFolderIconResource , extensionsFolderIconResource = kExtensionsFolderIconResource , fontsFolderIconResource = kFontsFolderIconResource , fullTrashIconResource = kFullTrashIconResource } |
| enum | { kThumbnail32BitData = FOUR_CHAR_CODE('it32') , kThumbnail8BitMask = FOUR_CHAR_CODE('t8mk') } |
| enum | { kHuge1BitMask = FOUR_CHAR_CODE('ich#') , kHuge4BitData = FOUR_CHAR_CODE('ich4') , kHuge8BitData = FOUR_CHAR_CODE('ich8') , kHuge32BitData = FOUR_CHAR_CODE('ih32') , kHuge8BitMask = FOUR_CHAR_CODE('h8mk') } |
| enum | { kLarge1BitMask = FOUR_CHAR_CODE('ICN#') , kLarge4BitData = FOUR_CHAR_CODE('icl4') , kLarge8BitData = FOUR_CHAR_CODE('icl8') , kLarge32BitData = FOUR_CHAR_CODE('il32') , kLarge8BitMask = FOUR_CHAR_CODE('l8mk') , kSmall1BitMask = FOUR_CHAR_CODE('ics#') , kSmall4BitData = FOUR_CHAR_CODE('ics4') , kSmall8BitData = FOUR_CHAR_CODE('ics8') , kSmall32BitData = FOUR_CHAR_CODE('is32') , kSmall8BitMask = FOUR_CHAR_CODE('s8mk') , kMini1BitMask = FOUR_CHAR_CODE('icm#') , kMini4BitData = FOUR_CHAR_CODE('icm4') , kMini8BitData = FOUR_CHAR_CODE('icm8') } |
| enum | { kTileIconVariant = FOUR_CHAR_CODE('tile') , kRolloverIconVariant = FOUR_CHAR_CODE('over') , kDropIconVariant = FOUR_CHAR_CODE('drop') , kOpenIconVariant = FOUR_CHAR_CODE('open') , kOpenDropIconVariant = FOUR_CHAR_CODE('odrp') } |
| enum | { large1BitMask = kLarge1BitMask , large4BitData = kLarge4BitData , large8BitData = kLarge8BitData , small1BitMask = kSmall1BitMask , small4BitData = kSmall4BitData , small8BitData = kSmall8BitData , mini1BitMask = kMini1BitMask , mini4BitData = kMini4BitData , mini8BitData = kMini8BitData } |
| enum | { kAlignNone = 0x00 , kAlignVerticalCenter = 0x01 , kAlignTop = 0x02 , kAlignBottom = 0x03 , kAlignHorizontalCenter = 0x04 , kAlignAbsoluteCenter = kAlignVerticalCenter | kAlignHorizontalCenter , kAlignCenterTop = kAlignTop | kAlignHorizontalCenter , kAlignCenterBottom = kAlignBottom | kAlignHorizontalCenter , kAlignLeft = 0x08 , kAlignCenterLeft = kAlignVerticalCenter | kAlignLeft , kAlignTopLeft = kAlignTop | kAlignLeft , kAlignBottomLeft = kAlignBottom | kAlignLeft , kAlignRight = 0x0C , kAlignCenterRight = kAlignVerticalCenter | kAlignRight , kAlignTopRight = kAlignTop | kAlignRight , kAlignBottomRight = kAlignBottom | kAlignRight } |
| enum | { atNone = kAlignNone , atVerticalCenter = kAlignVerticalCenter , atTop = kAlignTop , atBottom = kAlignBottom , atHorizontalCenter = kAlignHorizontalCenter , atAbsoluteCenter = kAlignAbsoluteCenter , atCenterTop = kAlignCenterTop , atCenterBottom = kAlignCenterBottom , atLeft = kAlignLeft , atCenterLeft = kAlignCenterLeft , atTopLeft = kAlignTopLeft , atBottomLeft = kAlignBottomLeft , atRight = kAlignRight , atCenterRight = kAlignCenterRight , atTopRight = kAlignTopRight , atBottomRight = kAlignBottomRight } |
| enum | { kTransformNone = 0x00 , kTransformDisabled = 0x01 , kTransformOffline = 0x02 , kTransformOpen = 0x03 , kTransformLabel1 = 0x0100 , kTransformLabel2 = 0x0200 , kTransformLabel3 = 0x0300 , kTransformLabel4 = 0x0400 , kTransformLabel5 = 0x0500 , kTransformLabel6 = 0x0600 , kTransformLabel7 = 0x0700 , kTransformSelected = 0x4000 , kTransformSelectedDisabled = kTransformSelected | kTransformDisabled , kTransformSelectedOffline = kTransformSelected | kTransformOffline , kTransformSelectedOpen = kTransformSelected | kTransformOpen } |
| enum | { ttNone = kTransformNone , ttDisabled = kTransformDisabled , ttOffline = kTransformOffline , ttOpen = kTransformOpen , ttLabel1 = kTransformLabel1 , ttLabel2 = kTransformLabel2 , ttLabel3 = kTransformLabel3 , ttLabel4 = kTransformLabel4 , ttLabel5 = kTransformLabel5 , ttLabel6 = kTransformLabel6 , ttLabel7 = kTransformLabel7 , ttSelected = kTransformSelected , ttSelectedDisabled = kTransformSelectedDisabled , ttSelectedOffline = kTransformSelectedOffline , ttSelectedOpen = kTransformSelectedOpen } |
| enum | { kSelectorLarge1Bit = 0x00000001 , kSelectorLarge4Bit = 0x00000002 , kSelectorLarge8Bit = 0x00000004 , kSelectorLarge32Bit = 0x00000008 , kSelectorLarge8BitMask = 0x00000010 , kSelectorSmall1Bit = 0x00000100 , kSelectorSmall4Bit = 0x00000200 , kSelectorSmall8Bit = 0x00000400 , kSelectorSmall32Bit = 0x00000800 , kSelectorSmall8BitMask = 0x00001000 , kSelectorMini1Bit = 0x00010000 , kSelectorMini4Bit = 0x00020000 , kSelectorMini8Bit = 0x00040000 , kSelectorHuge1Bit = 0x01000000 , kSelectorHuge4Bit = 0x02000000 , kSelectorHuge8Bit = 0x04000000 , kSelectorHuge32Bit = 0x08000000 , kSelectorHuge8BitMask = 0x10000000 , kSelectorAllLargeData = 0x000000FF , kSelectorAllSmallData = 0x0000FF00 , kSelectorAllMiniData = 0x00FF0000 , kSelectorAllHugeData = (long)0xFF000000 , kSelectorAll1BitData , kSelectorAll4BitData , kSelectorAll8BitData , kSelectorAll32BitData , kSelectorAllAvailableData = (long)0xFFFFFFFF } |
| enum | { svLarge1Bit = kSelectorLarge1Bit , svLarge4Bit = kSelectorLarge4Bit , svLarge8Bit = kSelectorLarge8Bit , svSmall1Bit = kSelectorSmall1Bit , svSmall4Bit = kSelectorSmall4Bit , svSmall8Bit = kSelectorSmall8Bit , svMini1Bit = kSelectorMini1Bit , svMini4Bit = kSelectorMini4Bit , svMini8Bit = kSelectorMini8Bit , svAllLargeData = kSelectorAllLargeData , svAllSmallData = kSelectorAllSmallData , svAllMiniData = kSelectorAllMiniData , svAll1BitData = kSelectorAll1BitData , svAll4BitData = kSelectorAll4BitData , svAll8BitData = kSelectorAll8BitData , svAllAvailableData = kSelectorAllAvailableData } |
| enum | { uppIconActionProcInfo = 0x00000FE0 } |
| enum | { uppIconGetterProcInfo = 0x000003F0 } |
| enum | { kSystemIconsCreator = FOUR_CHAR_CODE('macs') } |
| enum | { kClipboardIcon = FOUR_CHAR_CODE('CLIP') , kClippingUnknownTypeIcon = FOUR_CHAR_CODE('clpu') , kClippingPictureTypeIcon = FOUR_CHAR_CODE('clpp') , kClippingTextTypeIcon = FOUR_CHAR_CODE('clpt') , kClippingSoundTypeIcon = FOUR_CHAR_CODE('clps') , kDesktopIcon = FOUR_CHAR_CODE('desk') , kFinderIcon = FOUR_CHAR_CODE('FNDR') , kFontSuitcaseIcon = FOUR_CHAR_CODE('FFIL') , kFullTrashIcon = FOUR_CHAR_CODE('ftrh') , kGenericApplicationIcon = FOUR_CHAR_CODE('APPL') , kGenericCDROMIcon = FOUR_CHAR_CODE('cddr') , kGenericControlPanelIcon = FOUR_CHAR_CODE('APPC') , kGenericControlStripModuleIcon = FOUR_CHAR_CODE('sdev') , kGenericComponentIcon = FOUR_CHAR_CODE('thng') , kGenericDeskAccessoryIcon = FOUR_CHAR_CODE('APPD') , kGenericDocumentIcon = FOUR_CHAR_CODE('docu') , kGenericEditionFileIcon = FOUR_CHAR_CODE('edtf') , kGenericExtensionIcon = FOUR_CHAR_CODE('INIT') , kGenericFileServerIcon = FOUR_CHAR_CODE('srvr') , kGenericFontIcon = FOUR_CHAR_CODE('ffil') , kGenericFontScalerIcon = FOUR_CHAR_CODE('sclr') , kGenericFloppyIcon = FOUR_CHAR_CODE('flpy') , kGenericHardDiskIcon = FOUR_CHAR_CODE('hdsk') , kGenericIDiskIcon = FOUR_CHAR_CODE('idsk') , kGenericRemovableMediaIcon = FOUR_CHAR_CODE('rmov') , kGenericMoverObjectIcon = FOUR_CHAR_CODE('movr') , kGenericPCCardIcon = FOUR_CHAR_CODE('pcmc') , kGenericPreferencesIcon = FOUR_CHAR_CODE('pref') , kGenericQueryDocumentIcon = FOUR_CHAR_CODE('qery') , kGenericRAMDiskIcon = FOUR_CHAR_CODE('ramd') , kGenericSharedLibaryIcon = FOUR_CHAR_CODE('shlb') , kGenericStationeryIcon = FOUR_CHAR_CODE('sdoc') , kGenericSuitcaseIcon = FOUR_CHAR_CODE('suit') , kGenericURLIcon = FOUR_CHAR_CODE('gurl') , kGenericWORMIcon = FOUR_CHAR_CODE('worm') , kInternationalResourcesIcon = FOUR_CHAR_CODE('ifil') , kKeyboardLayoutIcon = FOUR_CHAR_CODE('kfil') , kSoundFileIcon = FOUR_CHAR_CODE('sfil') , kSystemSuitcaseIcon = FOUR_CHAR_CODE('zsys') , kTrashIcon = FOUR_CHAR_CODE('trsh') , kTrueTypeFontIcon = FOUR_CHAR_CODE('tfil') , kTrueTypeFlatFontIcon = FOUR_CHAR_CODE('sfnt') , kTrueTypeMultiFlatFontIcon = FOUR_CHAR_CODE('ttcf') , kUserIDiskIcon = FOUR_CHAR_CODE('udsk') , kInternationResourcesIcon = kInternationalResourcesIcon } |
| enum | { kInternetLocationHTTPIcon = FOUR_CHAR_CODE('ilht') , kInternetLocationFTPIcon = FOUR_CHAR_CODE('ilft') , kInternetLocationAppleShareIcon = FOUR_CHAR_CODE('ilaf') , kInternetLocationAppleTalkZoneIcon = FOUR_CHAR_CODE('ilat') , kInternetLocationFileIcon = FOUR_CHAR_CODE('ilfi') , kInternetLocationMailIcon = FOUR_CHAR_CODE('ilma') , kInternetLocationNewsIcon = FOUR_CHAR_CODE('ilnw') , kInternetLocationNSLNeighborhoodIcon = FOUR_CHAR_CODE('ilns') , kInternetLocationGenericIcon = FOUR_CHAR_CODE('ilge') } |
| enum | { kGenericFolderIcon = FOUR_CHAR_CODE('fldr') , kDropFolderIcon = FOUR_CHAR_CODE('dbox') , kMountedFolderIcon = FOUR_CHAR_CODE('mntd') , kOpenFolderIcon = FOUR_CHAR_CODE('ofld') , kOwnedFolderIcon = FOUR_CHAR_CODE('ownd') , kPrivateFolderIcon = FOUR_CHAR_CODE('prvf') , kSharedFolderIcon = FOUR_CHAR_CODE('shfl') } |
| enum | { kSharingPrivsNotApplicableIcon = FOUR_CHAR_CODE('shna') , kSharingPrivsReadOnlyIcon = FOUR_CHAR_CODE('shro') , kSharingPrivsReadWriteIcon = FOUR_CHAR_CODE('shrw') , kSharingPrivsUnknownIcon = FOUR_CHAR_CODE('shuk') , kSharingPrivsWritableIcon = FOUR_CHAR_CODE('writ') } |
| enum | { kUserFolderIcon = FOUR_CHAR_CODE('ufld') , kWorkgroupFolderIcon = FOUR_CHAR_CODE('wfld') , kGuestUserIcon = FOUR_CHAR_CODE('gusr') , kUserIcon = FOUR_CHAR_CODE('user') , kOwnerIcon = FOUR_CHAR_CODE('susr') , kGroupIcon = FOUR_CHAR_CODE('grup') } |
| enum | { kAppearanceFolderIcon = FOUR_CHAR_CODE('appr') , kAppleExtrasFolderIcon = FOUR_CHAR_CODE('aex�') , kAppleMenuFolderIcon = FOUR_CHAR_CODE('amnu') , kApplicationsFolderIcon = FOUR_CHAR_CODE('apps') , kApplicationSupportFolderIcon = FOUR_CHAR_CODE('asup') , kAssistantsFolderIcon = FOUR_CHAR_CODE('ast�') , kColorSyncFolderIcon = FOUR_CHAR_CODE('prof') , kContextualMenuItemsFolderIcon = FOUR_CHAR_CODE('cmnu') , kControlPanelDisabledFolderIcon = FOUR_CHAR_CODE('ctrD') , kControlPanelFolderIcon = FOUR_CHAR_CODE('ctrl') , kControlStripModulesFolderIcon = FOUR_CHAR_CODE('sdv�') , kDocumentsFolderIcon = FOUR_CHAR_CODE('docs') , kExtensionsDisabledFolderIcon = FOUR_CHAR_CODE('extD') , kExtensionsFolderIcon = FOUR_CHAR_CODE('extn') , kFavoritesFolderIcon = FOUR_CHAR_CODE('favs') , kFontsFolderIcon = FOUR_CHAR_CODE('font') , kHelpFolderIcon = FOUR_CHAR_CODE('�hlp') , kInternetFolderIcon = FOUR_CHAR_CODE('int�') , kInternetPlugInFolderIcon = FOUR_CHAR_CODE('�net') , kInternetSearchSitesFolderIcon = FOUR_CHAR_CODE('issf') , kLocalesFolderIcon = FOUR_CHAR_CODE('�loc') , kMacOSReadMeFolderIcon = FOUR_CHAR_CODE('mor�') , kPublicFolderIcon = FOUR_CHAR_CODE('pubf') , kPreferencesFolderIcon = FOUR_CHAR_CODE('prf�') , kPrinterDescriptionFolderIcon = FOUR_CHAR_CODE('ppdf') , kPrinterDriverFolderIcon = FOUR_CHAR_CODE('�prd') , kPrintMonitorFolderIcon = FOUR_CHAR_CODE('prnt') , kRecentApplicationsFolderIcon = FOUR_CHAR_CODE('rapp') , kRecentDocumentsFolderIcon = FOUR_CHAR_CODE('rdoc') , kRecentServersFolderIcon = FOUR_CHAR_CODE('rsrv') , kScriptingAdditionsFolderIcon = FOUR_CHAR_CODE('�scr') , kSharedLibrariesFolderIcon = FOUR_CHAR_CODE('�lib') , kScriptsFolderIcon = FOUR_CHAR_CODE('scr�') , kShutdownItemsDisabledFolderIcon = FOUR_CHAR_CODE('shdD') , kShutdownItemsFolderIcon = FOUR_CHAR_CODE('shdf') , kSpeakableItemsFolder = FOUR_CHAR_CODE('spki') , kStartupItemsDisabledFolderIcon = FOUR_CHAR_CODE('strD') , kStartupItemsFolderIcon = FOUR_CHAR_CODE('strt') , kSystemExtensionDisabledFolderIcon = FOUR_CHAR_CODE('macD') , kSystemFolderIcon = FOUR_CHAR_CODE('macs') , kTextEncodingsFolderIcon = FOUR_CHAR_CODE('�tex') , kUsersFolderIcon = FOUR_CHAR_CODE('usr�') , kUtilitiesFolderIcon = FOUR_CHAR_CODE('uti�') , kVoicesFolderIcon = FOUR_CHAR_CODE('fvoc') } |
| enum | { kAppleScriptBadgeIcon = FOUR_CHAR_CODE('scrp') , kLockedBadgeIcon = FOUR_CHAR_CODE('lbdg') , kMountedBadgeIcon = FOUR_CHAR_CODE('mbdg') , kSharedBadgeIcon = FOUR_CHAR_CODE('sbdg') , kAliasBadgeIcon = FOUR_CHAR_CODE('abdg') , kAlertCautionBadgeIcon = FOUR_CHAR_CODE('cbdg') } |
| enum | { kAlertNoteIcon = FOUR_CHAR_CODE('note') , kAlertCautionIcon = FOUR_CHAR_CODE('caut') , kAlertStopIcon = FOUR_CHAR_CODE('stop') } |
| enum | { kAppleTalkIcon = FOUR_CHAR_CODE('atlk') , kAppleTalkZoneIcon = FOUR_CHAR_CODE('atzn') , kAFPServerIcon = FOUR_CHAR_CODE('afps') , kFTPServerIcon = FOUR_CHAR_CODE('ftps') , kHTTPServerIcon = FOUR_CHAR_CODE('htps') , kGenericNetworkIcon = FOUR_CHAR_CODE('gnet') , kIPFileServerIcon = FOUR_CHAR_CODE('isrv') } |
| enum | { kToolbarCustomizeIcon = FOUR_CHAR_CODE('tcus') , kToolbarDeleteIcon = FOUR_CHAR_CODE('tdel') , kToolbarFavoritesIcon = FOUR_CHAR_CODE('tfav') , kToolbarHomeIcon = FOUR_CHAR_CODE('thom') } |
| enum | { kAppleLogoIcon = FOUR_CHAR_CODE('capl') , kAppleMenuIcon = FOUR_CHAR_CODE('sapl') , kBackwardArrowIcon = FOUR_CHAR_CODE('baro') , kFavoriteItemsIcon = FOUR_CHAR_CODE('favr') , kForwardArrowIcon = FOUR_CHAR_CODE('faro') , kGridIcon = FOUR_CHAR_CODE('grid') , kHelpIcon = FOUR_CHAR_CODE('help') , kKeepArrangedIcon = FOUR_CHAR_CODE('arng') , kLockedIcon = FOUR_CHAR_CODE('lock') , kNoFilesIcon = FOUR_CHAR_CODE('nfil') , kNoFolderIcon = FOUR_CHAR_CODE('nfld') , kNoWriteIcon = FOUR_CHAR_CODE('nwrt') , kProtectedApplicationFolderIcon = FOUR_CHAR_CODE('papp') , kProtectedSystemFolderIcon = FOUR_CHAR_CODE('psys') , kRecentItemsIcon = FOUR_CHAR_CODE('rcnt') , kShortcutIcon = FOUR_CHAR_CODE('shrt') , kSortAscendingIcon = FOUR_CHAR_CODE('asnd') , kSortDescendingIcon = FOUR_CHAR_CODE('dsnd') , kUnlockedIcon = FOUR_CHAR_CODE('ulck') , kConnectToIcon = FOUR_CHAR_CODE('cnct') , kGenericWindowIcon = FOUR_CHAR_CODE('gwin') , kQuestionMarkIcon = FOUR_CHAR_CODE('ques') , kDeleteAliasIcon = FOUR_CHAR_CODE('dali') , kEjectMediaIcon = FOUR_CHAR_CODE('ejec') , kBurningIcon = FOUR_CHAR_CODE('burn') , kRightContainerArrowIcon = FOUR_CHAR_CODE('rcar') } |
| enum | { kIconServicesNormalUsageFlag = 0 } |
| enum | { kIconServicesCatalogInfoMask } |
| enum | { kPlotIconRefNormalFlags = 0L , kPlotIconRefNoImage = (1 << 1) , kPlotIconRefNoMask = (1 << 2) } |
| enum | { kIconFamilyType = FOUR_CHAR_CODE('icns') } |
Functions | |
| typedef | CALLBACK_API (OSErr, IconActionProcPtr)(ResType theType |
| typedef | CALLBACK_API (Handle, IconGetterProcPtr)(ResType theType |
| typedef | STACK_UPP_TYPE (IconActionProcPtr) IconActionUPP |
| typedef | STACK_UPP_TYPE (IconGetterProcPtr) IconGetterUPP |
| IconActionUPP | NewIconActionUPP (IconActionProcPtr userRoutine) |
| IconGetterUPP | NewIconGetterUPP (IconGetterProcPtr userRoutine) |
| void | DisposeIconActionUPP (IconActionUPP userUPP) |
| void | DisposeIconGetterUPP (IconGetterUPP userUPP) |
| OSErr | InvokeIconActionUPP (ResType theType, Handle *theIcon, void *yourDataPtr, IconActionUPP userUPP) |
| Handle | InvokeIconGetterUPP (ResType theType, void *yourDataPtr, IconGetterUPP userUPP) |
| CIconHandle | GetCIcon (SInt16 iconID) |
| void | PlotCIcon (const Rect *theRect, CIconHandle theIcon) |
| void | DisposeCIcon (CIconHandle theIcon) |
| Handle | GetIcon (SInt16 iconID) |
| void | PlotIcon (const Rect *theRect, Handle theIcon) |
| OSErr | PlotIconID (const Rect *theRect, IconAlignmentType align, IconTransformType transform, SInt16 theResID) |
| OSErr | NewIconSuite (IconSuiteRef *theIconSuite) |
| OSErr | AddIconToSuite (Handle theIconData, IconSuiteRef theSuite, ResType theType) |
| Add an icon to an icon family. More... | |
| OSErr | GetIconFromSuite (Handle *theIconData, IconSuiteRef theSuite, ResType theType) |
| GetIconFromSuite Obtain a specified icon from an icon family. More... | |
| OSErr | ForEachIconDo (IconSuiteRef theSuite, IconSelectorValue selector, IconActionUPP action, void *yourDataPtr) |
| Perform action for specified members of an icon family. More... | |
| OSErr | GetIconSuite (IconSuiteRef *theIconSuite, SInt16 theResID, IconSelectorValue selector) |
| OSErr | DisposeIconSuite (IconSuiteRef theIconSuite, Boolean disposeData) |
| DisposeIconSuite Dispose of icon family. More... | |
| OSErr | PlotIconSuite (const Rect *theRect, IconAlignmentType align, IconTransformType transform, IconSuiteRef theIconSuite) |
| OSErr | MakeIconCache (IconCacheRef *theCache, IconGetterUPP makeIcon, void *yourDataPtr) |
| OSErr | LoadIconCache (const Rect *theRect, IconAlignmentType align, IconTransformType transform, IconCacheRef theIconCache) |
| OSErr | PlotIconMethod (const Rect *theRect, IconAlignmentType align, IconTransformType transform, IconGetterUPP theMethod, void *yourDataPtr) |
| OSErr | GetLabel (SInt16 labelNumber, RGBColor *labelColor, Str255 labelString) |
| Get color and string used in the lable menu of the Finder. More... | |
| Boolean | PtInIconID (Point testPt, const Rect *iconRect, IconAlignmentType align, SInt16 iconID) |
| Boolean | PtInIconSuite (Point testPt, const Rect *iconRect, IconAlignmentType align, IconSuiteRef theIconSuite) |
| Hit test a point against indicated icon. More... | |
| Boolean | PtInIconMethod (Point testPt, const Rect *iconRect, IconAlignmentType align, IconGetterUPP theMethod, void *yourDataPtr) |
| Boolean | RectInIconID (const Rect *testRect, const Rect *iconRect, IconAlignmentType align, SInt16 iconID) |
| Boolean | RectInIconSuite (const Rect *testRect, const Rect *iconRect, IconAlignmentType align, IconSuiteRef theIconSuite) |
| Hit test a rectangle against indicated icon. More... | |
| Boolean | RectInIconMethod (const Rect *testRect, const Rect *iconRect, IconAlignmentType align, IconGetterUPP theMethod, void *yourDataPtr) |
| OSErr | IconIDToRgn (RgnHandle theRgn, const Rect *iconRect, IconAlignmentType align, SInt16 iconID) |
| OSErr | IconSuiteToRgn (RgnHandle theRgn, const Rect *iconRect, IconAlignmentType align, IconSuiteRef theIconSuite) |
| Create a region from an icon mask. More... | |
| OSErr | IconMethodToRgn (RgnHandle theRgn, const Rect *iconRect, IconAlignmentType align, IconGetterUPP theMethod, void *yourDataPtr) |
| OSErr | SetSuiteLabel (IconSuiteRef theSuite, SInt16 theLabel) |
| Specify a default label for an icon family. More... | |
| SInt16 | GetSuiteLabel (IconSuiteRef theSuite) |
| Specify a default label for an icon family. More... | |
| OSErr | GetIconCacheData (IconCacheRef theCache, void **theData) |
| GetIconCacheData Get data associated with an icon cache. More... | |
| OSErr | SetIconCacheData (IconCacheRef theCache, void *theData) |
| SetIconCacheData Set the data associated with an icon cache. More... | |
| OSErr | GetIconCacheProc (IconCacheRef theCache, IconGetterUPP *theProc) |
| GetIconCacheProc Get procedure associated with an icon cache. More... | |
| OSErr | SetIconCacheProc (IconCacheRef theCache, IconGetterUPP theProc) |
| SetIconCacheProc Set the procedure associated with an icon cache. More... | |
| OSErr | PlotIconHandle (const Rect *theRect, IconAlignmentType align, IconTransformType transform, Handle theIcon) |
| OSErr | PlotSICNHandle (const Rect *theRect, IconAlignmentType align, IconTransformType transform, Handle theSICN) |
| OSErr | PlotCIconHandle (const Rect *theRect, IconAlignmentType align, IconTransformType transform, CIconHandle theCIcon) |
| Display an icon image with System 7 icon resource types. More... | |
| OSErr | IconServicesInit (CFragInitBlockPtr initBlockPtr) |
| void | IconServicesTerminate (void) |
| OSErr | IconRefToIconFamily (IconRef theIconRef, IconSelectorValue whichIcons, IconFamilyHandle *iconFamily) |
| OSErr | IconFamilyToIconSuite (IconFamilyHandle iconFamily, IconSelectorValue whichIcons, IconSuiteRef *iconSuite) |
| OSErr | IconSuiteToIconFamily (IconSuiteRef iconSuite, IconSelectorValue whichIcons, IconFamilyHandle *iconFamily) |
| OSErr | SetIconFamilyData (IconFamilyHandle iconFamily, OSType iconType, Handle h) |
| OSErr | GetIconFamilyData (IconFamilyHandle iconFamily, OSType iconType, Handle h) |
| OSErr | GetIconRefOwners (IconRef theIconRef, UInt16 *owners) |
| OSErr | AcquireIconRef (IconRef theIconRef) |
| OSErr | ReleaseIconRef (IconRef theIconRef) |
| OSErr | GetIconRefFromFile (const FSSpec *theFile, IconRef *theIconRef, SInt16 *theLabel) |
| OSErr | GetIconRef (SInt16 vRefNum, OSType creator, OSType iconType, IconRef *theIconRef) |
| OSErr | GetIconRefFromFolder (SInt16 vRefNum, SInt32 parentFolderID, SInt32 folderID, SInt8 attributes, SInt8 accessPrivileges, IconRef *theIconRef) |
| OSStatus | GetIconRefFromFileInfo (const FSRef *inRef, UniCharCount inFileNameLength, const UniChar *inFileName, FSCatalogInfoBitmap inWhichInfo, const FSCatalogInfo *inCatalogInfo, IconServicesUsageFlags inUsageFlags, IconRef *outIconRef, SInt16 *outLabel) |
| OSErr | RegisterIconRefFromIconFamily (OSType creator, OSType iconType, IconFamilyHandle iconFamily, IconRef *theIconRef) |
| OSErr | RegisterIconRefFromResource (OSType creator, OSType iconType, const FSSpec *resourceFile, SInt16 resourceID, IconRef *theIconRef) |
| OSStatus | RegisterIconRefFromFSRef (OSType creator, OSType iconType, const FSRef *iconFile, IconRef *theIconRef) |
| OSErr | UnregisterIconRef (OSType creator, OSType iconType) |
| OSErr | UpdateIconRef (IconRef theIconRef) |
| OSErr | OverrideIconRefFromResource (IconRef theIconRef, const FSSpec *resourceFile, SInt16 resourceID) |
| OSErr | OverrideIconRef (IconRef oldIconRef, IconRef newIconRef) |
| OSErr | RemoveIconRefOverride (IconRef theIconRef) |
| OSErr | CompositeIconRef (IconRef backgroundIconRef, IconRef foregroundIconRef, IconRef *compositeIconRef) |
| OSErr | IsIconRefComposite (IconRef compositeIconRef, IconRef *backgroundIconRef, IconRef *foregroundIconRef) |
| Boolean | IsValidIconRef (IconRef theIconRef) |
| OSErr | PlotIconRef (const Rect *theRect, IconAlignmentType align, IconTransformType transform, IconServicesUsageFlags theIconServicesUsageFlags, IconRef theIconRef) |
| OSStatus | PlotIconRefInContext (CGContextRef inContext, const CGRect *inRect, IconAlignmentType inAlign, IconTransformType inTransform, const RGBColor *inLabelColor, PlotIconRefFlags inFlags, IconRef inIconRef) |
| Boolean | PtInIconRef (const Point *testPt, const Rect *iconRect, IconAlignmentType align, IconServicesUsageFlags theIconServicesUsageFlags, IconRef theIconRef) |
| Boolean | RectInIconRef (const Rect *testRect, const Rect *iconRect, IconAlignmentType align, IconServicesUsageFlags iconServicesUsageFlags, IconRef theIconRef) |
| OSErr | IconRefToRgn (RgnHandle theRgn, const Rect *iconRect, IconAlignmentType align, IconServicesUsageFlags iconServicesUsageFlags, IconRef theIconRef) |
| OSErr | GetIconSizesFromIconRef (IconSelectorValue iconSelectorInput, IconSelectorValue *iconSelectorOutputPtr, IconServicesUsageFlags iconServicesUsageFlags, IconRef theIconRef) |
| OSErr | FlushIconRefs (OSType creator, OSType iconType) |
| OSErr | FlushIconRefsByVolume (SInt16 vRefNum) |
| OSErr | SetCustomIconsEnabled (SInt16 vRefNum, Boolean enableCustomIcons) |
| OSErr | GetCustomIconsEnabled (SInt16 vRefNum, Boolean *customIconsEnabled) |
| Boolean | IsIconRefMaskEmpty (IconRef iconRef) |
| IconRef | GetIconRefVariant (IconRef inIconRef, OSType inVariant, IconTransformType *outTransform) |
| OSErr | RegisterIconRefFromIconFile (OSType creator, OSType iconType, const FSSpec *iconFile, IconRef *theIconRef) |
| OSErr | ReadIconFile (const FSSpec *iconFile, IconFamilyHandle *iconFamily) |
| OSStatus | ReadIconFromFSRef (const FSRef *ref, IconFamilyHandle *iconFamily) |
| OSErr | WriteIconFile (IconFamilyHandle iconFamily, const FSSpec *iconFile) |
Icon Utilities and Icon Services Interfaces.
For bug reports, consult the following page on the World Wide Web:
http://developer.apple.com/bugreporter/
RegisterIconRefFromFSRef()
Discussion: This routine registers an IconRef from a ".icns" file and associates it with a creator/type pair.
Parameters:
creator: The creator code for the icns file.
iconType: The type code for the icns file
icon The FSRef of the icns file.
theIconRef: The output IconRef for the routine.
@par Non-Carbon CFM: not available @par Carbon Lib: not available in CarbonLib 1.x, is available on Mac OS
X version 10.1 and later
| #define InvokeIconActionUPP | ( | theType, | |
| theIcon, | |||
| yourDataPtr, | |||
| userUPP | |||
| ) |
| #define InvokeIconGetterUPP | ( | theType, | |
| yourDataPtr, | |||
| userUPP | |||
| ) |
| #define NewIconActionUPP | ( | userRoutine | ) |
| #define NewIconGetterUPP | ( | userRoutine | ) |
| typedef Handle IconSuiteRef |
Note: IconSuiteRef and IconCacheRef should be an abstract types, but too much source code already relies on them being of type Handle.
| typedef UInt32 PlotIconRefFlags |
PlotIconRefFlags
Discussion: Flags that can be passed to the PlotIconRefInContext routine.
| anonymous enum |
IconServices is an efficient mechanism to share icon data amongst multiple clients. It avoids duplication of data; it provides efficient caching, releasing memory when the icon data is no longer needed; it can provide the appropriate icon for any filesystem object; it can provide commonly used icons (caution, note, help...); it is Appearance-savvy: the icons are switched when appropriate. IconServices refer to cached icon data using IconRef, a 32-bit opaque value. IconRefs are reference counted. When there are no more "owners" of an IconRef, the memory used by the icon bitmap is disposed of. Two files of same type and creator with no custom icon will have the same IconRef. Files with custom icons will have their own IconRef. Use the special creator kSystemIconsCreator to get "standard" icons that are not associated with a file, such as the help icon. Note that all lowercase creators are reserved by Apple.
| anonymous enum |
Type of the predefined/generic icons. For example, the call: err = GetIconRef(kOnSystemDisk, kSystemIconsCreator, kHelpIcon, &iconRef); will retun in iconRef the IconRef for the standard help icon.
| anonymous enum |
kIconServicesCatalogInfoMask - Minimal bitmask for use with GetIconRefFromFileInfo(). Use this mask with FSGetCatalogInfo before calling GetIconRefFromFileInfo().
| anonymous enum |
| anonymous enum |
IconFamily 'icns' resources contain an entire IconFamily (all sizes and depths). For custom icons, icns IconFamily resources of the custom icon resource ID are fetched first before the classic custom icons (individual 'ics#, ICN#, etc) are fetched. If the fetch of the icns resource succeeds then the icns is looked at exclusively for the icon data. For custom icons, new icon features such as 32-bit deep icons are only fetched from the icns resource. This is to avoid incompatibilities with cut & paste of new style icons with an older version of the MacOS Finder. DriverGestalt is called with code kdgMediaIconSuite by IconServices after calling FSM to determine a driver icon for a particular device. The result of the kdgMediaIconSuite call to DriverGestalt should be a pointer an an IconFamily. In this manner driver vendors can provide rich, detailed drive icons instead of the 1-bit variety previously supported.
| OSErr AcquireIconRef | ( | IconRef | theIconRef | ) |
AcquireIconRef This routine increments the reference count for the IconRef AcquireIconRef()
| OSErr AddIconToSuite | ( | Handle | theIconData, |
| IconSuiteRef | theSuite, | ||
| ResType | theType | ||
| ) |
Add an icon to an icon family.
AddIconToSuite adds the data in theIconData into the the icon family referenced by theSuite at the location reseved for theType of icon data. AddIconToSuite will replace any old data in that slot without disposing of it, so you may want to call GetIconFromSuite to obtain the old handle (if any), to dispose. AddIconToSuite is use most often with NewIconSuite to fill an empty family after it has been created.
This routine is not currently documented in MPW header files (hence, it is
not in any THINK C or THINK Pascal header file either). The information
given above comes from Macintosh Technical Note #306. This tech. note
also gives the inline glue for the call as follows:
pascal OSErr AddIconToSuite (Handle theIconData, Handle theSuite,
ResType theType) = {0x303C, 0x0608, 0xABC9};
| OSErr CompositeIconRef | ( | IconRef | backgroundIconRef, |
| IconRef | foregroundIconRef, | ||
| IconRef * | compositeIconRef | ||
| ) |
CompositeIconRef
Superimposes an IconRef on top of another one CompositeIconRef()
| void DisposeCIcon | ( | CIconHandle | theIcon | ) |
| void DisposeIconActionUPP | ( | IconActionUPP | userUPP | ) |
| void DisposeIconGetterUPP | ( | IconGetterUPP | userUPP | ) |
| OSErr DisposeIconSuite | ( | IconSuiteRef | theIconSuite, |
| Boolean | disposeData | ||
| ) |
DisposeIconSuite Dispose of icon family.
DisposeIconSuite call disposes the icon family handle itself; in addition if disposeData is TRUE, any of the icon data handles that do not belong to a resource form will also be disposed.
This routine is not currently documented in MPW header files (hence, it is
not in any THINK C or THINK Pascal header file either). The information
given above comes from Macintosh Technical Note #306. This tech. note
also gives the inline glue for the call as follows:
pascal OSErr DisposeIconSuite (Handle theSuite, Boolean disposeData)
= {0x303C, 0x0302, 0xABC9};
| OSErr FlushIconRefs | ( | OSType | creator, |
| OSType | iconType | ||
| ) |
FlushIconRefs
Making this call will dispose of all the data for the specified icons if the data can be reacquired, for example if the data is provided from a resource. '****' is a wildcard for all types or all creators. FlushIconRefs()
| OSErr FlushIconRefsByVolume | ( | SInt16 | vRefNum | ) |
FlushIconRefsByVolume
This routine disposes of the data for the icons related to the indicated volume if this data can be reacquired, for example if the data is provided from a resource. FlushIconRefsByVolume()
| OSErr ForEachIconDo | ( | IconSuiteRef | theSuite, |
| IconSelectorValue | selector, | ||
| IconActionUPP | action, | ||
| void * | yourDataPtr | ||
| ) |
Perform action for specified members of an icon family.
ForEachIconDo will call actionProc for each icon in the family specified by theSelector and theSuite. theSelector is a bit level flag that specifies which members to operate on; they can be added together to create composite selectors that work on several different family members. See the Notes section below for the possible selector values.
ForEachIconDo takes a selector value that specifies which icons in the
family to operate on. The values for theSelector are as follows:
svLarge1Bit svMini8Bit
svLarge4Bit svAllLargeData
svLarge8Bit svAllSmallData
svSmall1Bit svAllMiniData
svSmall4Bit svAll1BitData
svSmall8Bit svAll4BitData
svMini1Bit svAll8BitData
svMini4Bit svAllAvailableData
The actionProc procedure should have the following form:
pascal OSErr ActionProc (Handle *theIconData, ResType the Type,
void *yourDataPtr);
This routine is not currently documented in MPW header files (hence, it is
not in any THINK C or THINK Pascal header file either). The information
given above comes from Macintosh Technical Note #306. This tech. note
also gives the inline glue for the call as follows:
pascal OSErr ForEachIconDo (Handle theSuite, long selector,
ProcPtr action, void *yourDataPtr)
= {0x303C, 0x080A, 0xABC9};
| CIconHandle GetCIcon | ( | SInt16 | iconID | ) |
| OSErr GetCustomIconsEnabled | ( | SInt16 | vRefNum, |
| Boolean * | customIconsEnabled | ||
| ) |
GetCustomIconsEnabled
Return true if custom icons are enabled on the specified volume, false otherwise. GetCustomIconsEnabled()
| Handle GetIcon | ( | SInt16 | iconID | ) |
| OSErr GetIconCacheData | ( | IconCacheRef | theCache, |
| void ** | theData | ||
| ) |
GetIconCacheData Get data associated with an icon cache.
GetIconCacheData obtains the data pointer value associated with theCache . The data pointer is returned in yourDataPtr .
This routine is not currently documented in MPW header files (hence, it is
not in any THINK C or THINK Pascal header file either). The information
given above comes from Macintosh Technical Note #306. This tech. note
also gives the inline glue for the call as follows:
pascal OSErr GetIconCacheData (Handle theCache, Ptr *yourDataPtr)
= {0x303C, 0x0419, 0xABC9};
| OSErr GetIconCacheProc | ( | IconCacheRef | theCache, |
| IconGetterUPP * | theProc | ||
| ) |
GetIconCacheProc Get procedure associated with an icon cache.
@par Non-Carbon CFM: in InterfaceLib 7.1 and later
| OSErr GetIconFamilyData | ( | IconFamilyHandle | iconFamily, |
| OSType | iconType, | ||
| Handle | h | ||
| ) |
GetIconFamilyData Return a copy of the data in the icon family. The type can be one of the icon type, or 'PICT' The data will be returned uncompressed. The handle (h) will be resized as appropriate. If no data of the requested type is present, the handle size will be set to 0. GetIconFamilyData()
| OSErr GetIconFromSuite | ( | Handle * | theIconData, |
| IconSuiteRef | theSuite, | ||
| ResType | theType | ||
| ) |
GetIconFromSuite Obtain a specified icon from an icon family.
GetIconFromSuite returns a handle to the pixel data of the family member of theSuite specified by theType. If you intend to dispose of this handle, be sure to call AddIconToSuite with a NIL handle to zero out the family entry.
This routine is not currently documented in MPW header files (hence, it is
not in any THINK C or THINK Pascal header file either). The information
given above comes from Macintosh Technical Note #306. This tech. note
also gives the inline glue for the call as follows:
pascal OSErr GetIconFromSuite (Handle *theIconData, Handle theSuite,
ResType theType) = {0x303C, 0x0609, 0xABC9};
| OSErr GetIconRef | ( | SInt16 | vRefNum, |
| OSType | creator, | ||
| OSType | iconType, | ||
| IconRef * | theIconRef | ||
| ) |
GetIconRef
This routine returns an icon ref for an icon in the desktop database or for a registered icon. The system registers a set of icon such as the help icon with the creator code kSystemIconsCreator. See above for a list of the registered system types. The vRefNum is used as a hint on where to look for the icon first. Use kOnSystemDisk if you don't know what to pass. This routine increments the reference count of the returned IconRef. Call ReleaseIconRef() when you're done with it. GetIconRef()
| OSErr GetIconRefFromFile | ( | const FSSpec * | theFile, |
| IconRef * | theIconRef, | ||
| SInt16 * | theLabel | ||
| ) |
GetIconRefFromFile
This routine returns an icon ref for the specified file, folder or volume. The label information is provided separately, since two files with the same icon but a different label would share the same iconRef. The label can be used in PlotIconRef() for example.
Use this routine if you have no information about the file system object. If you have already done a GetCatInfo on the file and want to save some I/O, call GetIconRefFromFolder() if you know it's a folder with no custom icon or call GetIconRef() if it's a file with no custom icon. This routine increments the reference count of the returned IconRef. Call ReleaseIconRef() when you're done with it. GetIconRefFromFile()
| OSStatus GetIconRefFromFileInfo | ( | const FSRef * | inRef, |
| UniCharCount | inFileNameLength, | ||
| const UniChar * | inFileName, | ||
| FSCatalogInfoBitmap | inWhichInfo, | ||
| const FSCatalogInfo * | inCatalogInfo, | ||
| IconServicesUsageFlags | inUsageFlags, | ||
| IconRef * | outIconRef, | ||
| SInt16 * | outLabel | ||
| ) |
Summary: This routine returns an IconRef for a file with minimal file I/O.
Discussion: To minimize file operations, FSGetCatalogInfo should be called prior to calling this routine. The FSCatalogInfo should correspond to kIconServicesCatalogInfoMask The name should be fetched and passed in. If either the name or the correct catalog info is not passed in, this routine will do file operations for this information instead.
Parameters:
inRef: An FSRef for the target file
inFileNameLength: The length of the name of the target file
inFileName: The name of the target file
inWhichInfo: The mask of file info already acquired.
inCatalogInfo: The catalog info already acquired.
inUsageFlags: The usage flags for this call (use kIconServicesNormalUsageFlag).
outIconRef: The output IconRef for the routine.
outLabel: The output label for the icon/file.
@par Non-Carbon CFM: not available @par Carbon Lib: not available in CarbonLib 1.x, is available on Mac OS
X version 10.1 and later
| OSErr GetIconRefFromFolder | ( | SInt16 | vRefNum, |
| SInt32 | parentFolderID, | ||
| SInt32 | folderID, | ||
| SInt8 | attributes, | ||
| SInt8 | accessPrivileges, | ||
| IconRef * | theIconRef | ||
| ) |
GetIconRefFromFolder
This routine returns an icon ref for a folder with no custom icon. Use the more generic, but slightly slower, GetIconRefFromFile() if you don't already have the necessary info about the file. Attributes should be CInfoPBRec.dirInfo.ioFlAttrib for this folder. Access privileges should be CInfoPBRec.dirInfo.ioACUser for this folder. This routine increments the reference count of the IconRef. Call ReleaseIconRef() when you're done with it. GetIconRefFromFolder()
| OSErr GetIconRefOwners | ( | IconRef | theIconRef, |
| UInt16 * | owners | ||
| ) |
GetIconRefOwners
This routine returns the reference count for the IconRef, or number of owners.
A valid IconRef always has at least one owner. GetIconRefOwners()
| IconRef GetIconRefVariant | ( | IconRef | inIconRef, |
| OSType | inVariant, | ||
| IconTransformType * | outTransform | ||
| ) |
GetIconRefVariant Icon variants allows different images to be used with different icon state. For example, the 'open' variant for a folder could be represented with an open folder. Given an icon ref and a desired variant, this routine returns an icon ref (which may be the same as the input icon ref) and a transformation which should be used with PlotIconRef() to render the icon appropriately. The returned icon ref should be used to do hit-testing. GetIconRefVariant()
| OSErr GetIconSizesFromIconRef | ( | IconSelectorValue | iconSelectorInput, |
| IconSelectorValue * | iconSelectorOutputPtr, | ||
| IconServicesUsageFlags | iconServicesUsageFlags, | ||
| IconRef | theIconRef | ||
| ) |
GetIconSizesFromIconRef
This routine returns an IconSelectorValue indicating the depths and sizes of icon data which are actually available. It takes an IconSelectorValue indicating which sizes/depths the caller is interested and returns an IconSelectorValue indicating which sizes/depths exist.
Caution:
This is potentially an extremely expensive call as IconServices may be forced to attempt fetching the data for the IconRef's sizes/depths which may result in hitting the local disk or even the network to obtain the data to determine which sizes/depths actually exist. Pass kIconServicesNormalUsageFlag as a default value for IconServicesUsageFlags. GetIconSizesFromIconRef()
| OSErr GetIconSuite | ( | IconSuiteRef * | theIconSuite, |
| SInt16 | theResID, | ||
| IconSelectorValue | selector | ||
| ) |
| OSErr GetLabel | ( | SInt16 | labelNumber, |
| RGBColor * | labelColor, | ||
| Str255 | labelString | ||
| ) |
Get color and string used in the lable menu of the Finder.
GetLabel returns the actual color and string used in the label menu of the Finder and in the labels control panel. in labelColor and labelString respectively. This information is useful case you wish to include the label text or color when displaying a file's icon in your application.
This routine is not currently documented in MPW header files (hence, it is not in any THINK C or THINK Pascal header file either). The information given above comes from Macintosh Technical Note #306. This tech. note also gives the inline glue for the call as follows: pascal OSErr GetLabel (short labelNumber, RGBColor labelColor, Str255 labelString) = {0x303C, 0x061F, 0xABC9};
| SInt16 GetSuiteLabel | ( | IconSuiteRef | theSuite | ) |
Specify a default label for an icon family.
GetSuiteLabel returns any label set previously with SetSuiteLabel .
This routine is not currently documented in MPW header files (hence, it is
not in any THINK C or THINK Pascal header file either). The information
given above comes from Macintosh Technical Note #306. This tech. note
also gives the inline glue for the call as follows:
pascal short GetSuiteLabel (Handle theSuite )
= {0x303C, 0x0217, 0xABC9};
| OSErr IconFamilyToIconSuite | ( | IconFamilyHandle | iconFamily, |
| IconSelectorValue | whichIcons, | ||
| IconSuiteRef * | iconSuite | ||
| ) |
IconFamilyToIconSuite This routine transfers the data from an icon family handle into an icon suite. IconFamilyToIconSuite()
| OSErr IconIDToRgn | ( | RgnHandle | theRgn, |
| const Rect * | iconRect, | ||
| IconAlignmentType | align, | ||
| SInt16 | iconID | ||
| ) |
| OSErr IconMethodToRgn | ( | RgnHandle | theRgn, |
| const Rect * | iconRect, | ||
| IconAlignmentType | align, | ||
| IconGetterUPP | theMethod, | ||
| void * | yourDataPtr | ||
| ) |
| OSErr IconRefToIconFamily | ( | IconRef | theIconRef, |
| IconSelectorValue | whichIcons, | ||
| IconFamilyHandle * | iconFamily | ||
| ) |
IconRefToIconFamily This routines returns a new IconFamily that contains the data corresponding to the specified IconRef. IconRefToIconFamily()
| OSErr IconRefToRgn | ( | RgnHandle | theRgn, |
| const Rect * | iconRect, | ||
| IconAlignmentType | align, | ||
| IconServicesUsageFlags | iconServicesUsageFlags, | ||
| IconRef | theIconRef | ||
| ) |
IconRefToRgn
This routine returns a region for the icon. It mostly takes the same parameters as IconSuiteToRgn. Pass kIconServicesNormalUsageFlag as a default value for IconServicesUsageFlags. IconRefToRgn()
| OSErr IconServicesInit | ( | CFragInitBlockPtr | initBlockPtr | ) |
IconServicesInit
Call this routine once per classic 68K application initialization. This routine does not need to be called at boot time. IconServicesInit()
| void IconServicesTerminate | ( | void | ) |
IconServicesTerminate:
Call this routine once from the termination of a classic 68K application. This routine does not need to be called at boot time. IconServicesTerminate()
| OSErr IconSuiteToIconFamily | ( | IconSuiteRef | iconSuite, |
| IconSelectorValue | whichIcons, | ||
| IconFamilyHandle * | iconFamily | ||
| ) |
IconSuiteToIconFamily This routine transfers the data in an icon suite into an icon family. IconSuiteToIconFamily()
| OSErr IconSuiteToRgn | ( | RgnHandle | theRgn, |
| const Rect * | iconRect, | ||
| IconAlignmentType | align, | ||
| IconSuiteRef | theIconSuite | ||
| ) |
Create a region from an icon mask.
IconSuiteToRgn selects an icon from iconSuite , based on iconRect, and creates a region from the icon mask of that icon. The icon mask is aligned according to the alignment parameter. The region created is returned in theRgn. This allows you to do accurate hit testing and outline dragging of the icon in your application. theRgn must be allocated before calling IconSuiteToRgn .
This routine is not currently documented in MPW header files (hence, it is not in any THINK C or THINK Pascal header file either). The information given above comes from Macintosh Technical Note #306. This tech. note also gives the inline glue for the call as follows: pascal OSErr IconSuiteToRgn (RgnHandle theRgn, const Rect *iconRect, short alignment, Handle theIconSuite) = {0x303C, 0x0714, 0xABC9};
| OSErr InvokeIconActionUPP | ( | ResType | theType, |
| Handle * | theIcon, | ||
| void * | yourDataPtr, | ||
| IconActionUPP | userUPP | ||
| ) |
| Handle InvokeIconGetterUPP | ( | ResType | theType, |
| void * | yourDataPtr, | ||
| IconGetterUPP | userUPP | ||
| ) |
| OSErr IsIconRefComposite | ( | IconRef | compositeIconRef, |
| IconRef * | backgroundIconRef, | ||
| IconRef * | foregroundIconRef | ||
| ) |
IsIconRefComposite Indicates if a given icon ref is a composite of two other icon refs (and which ones) If it isn't a composite, backgroundIconRef and foreGroundIconRef will be 0. IsIconRefComposite()
| Boolean IsIconRefMaskEmpty | ( | IconRef | iconRef | ) |
IsIconRefMaskEmpty Returns true if the mask for this icon is blank IsIconRefMaskEmpty()
| Boolean IsValidIconRef | ( | IconRef | theIconRef | ) |
IsValidIconRef Return true if the iconRef passed in is a valid icon ref IsValidIconRef()
| OSErr LoadIconCache | ( | const Rect * | theRect, |
| IconAlignmentType | align, | ||
| IconTransformType | transform, | ||
| IconCacheRef | theIconCache | ||
| ) |
| OSErr MakeIconCache | ( | IconCacheRef * | theCache, |
| IconGetterUPP | makeIcon, | ||
| void * | yourDataPtr | ||
| ) |
| IconActionUPP NewIconActionUPP | ( | IconActionProcPtr | userRoutine | ) |
| IconGetterUPP NewIconGetterUPP | ( | IconGetterProcPtr | userRoutine | ) |
| OSErr NewIconSuite | ( | IconSuiteRef * | theIconSuite | ) |
| OSErr OverrideIconRef | ( | IconRef | oldIconRef, |
| IconRef | newIconRef | ||
| ) |
OverrideIconRef
This routines replaces the bitmaps of the specified IconRef with the ones from the new IconRef. OverrideIconRef()
| OSErr OverrideIconRefFromResource | ( | IconRef | theIconRef, |
| const FSSpec * | resourceFile, | ||
| SInt16 | resourceID | ||
| ) |
OverrideIconRefFromResource
This routines replaces the bitmaps of the specified IconRef with the ones in the specified resource file. OverrideIconRefFromResource()
| void PlotCIcon | ( | const Rect * | theRect, |
| CIconHandle | theIcon | ||
| ) |
| OSErr PlotCIconHandle | ( | const Rect * | theRect, |
| IconAlignmentType | align, | ||
| IconTransformType | transform, | ||
| CIconHandle | theCIcon | ||
| ) |
Display an icon image with System 7 icon resource types.
PlotCIconHandle plots an icon image in the current GrafPort at local coordinates specified by a rectangle. theRectis the address of an 8-byte Rect structure, expressed in local coordinates. alignment alignment method used in case the icon does not exactly fit the rectangle give. See the Notes section below. transform desired appearance of the icon on the screen. See the Notes section belwo theCIconH handle to a standard QuickDraw color icon. Use GetCIcon to load a color icon. Don't forget to dispose of it when you are done with DisposCIcon (sometimes they can take up quite a bit of memory).
error code
PlotCIconHandle takes a parameter which specifies the aligment of the icon in the destination rectangle. Most icons do not fully fill their rectangle, and it is sometimes necessary to draw the icon relative to other data (like menu text). For this reason, you can specify one of these standard alignment values for the alignment parameter. You can add a vertical alignment to a horizontal alignment to create a composite alignment value. atNone atVerticalCenter atTop atBottom atHorizontalCenter atLeft atRight The transform parameter specifies the mode or "transform" in which the icon should be drawn. Transforms are analogous to certain Finder states for the icons. For example the transform that you would use to show an icon of a disk that has been ejected is ttOffline. The following transforms are available. ttNone ttDisabled ttOffline ttOpen ttSelected
| void PlotIcon | ( | const Rect * | theRect, |
| Handle | theIcon | ||
| ) |
| OSErr PlotIconHandle | ( | const Rect * | theRect, |
| IconAlignmentType | align, | ||
| IconTransformType | transform, | ||
| Handle | theIcon | ||
| ) |
| OSErr PlotIconID | ( | const Rect * | theRect, |
| IconAlignmentType | align, | ||
| IconTransformType | transform, | ||
| SInt16 | theResID | ||
| ) |
| OSErr PlotIconMethod | ( | const Rect * | theRect, |
| IconAlignmentType | align, | ||
| IconTransformType | transform, | ||
| IconGetterUPP | theMethod, | ||
| void * | yourDataPtr | ||
| ) |
| OSErr PlotIconRef | ( | const Rect * | theRect, |
| IconAlignmentType | align, | ||
| IconTransformType | transform, | ||
| IconServicesUsageFlags | theIconServicesUsageFlags, | ||
| IconRef | theIconRef | ||
| ) |
PlotIconRef
This routine plots the IconRef. It mostly takes the same parameters as PlotIconSuite. Pass kIconServicesNormalUsageFlag as a default value for IconServicesUsageFlags. PlotIconRef()
| OSStatus PlotIconRefInContext | ( | CGContextRef | inContext, |
| const CGRect * | inRect, | ||
| IconAlignmentType | inAlign, | ||
| IconTransformType | inTransform, | ||
| const RGBColor * | inLabelColor, | ||
| PlotIconRefFlags | inFlags, | ||
| IconRef | inIconRef | ||
| ) |
Discussion: This routines plots an IconRef using Quartz/CoreGraphics.
Parameters:
inContext: The graphics context to use.
inRect: The rect to plot the icon in.
inAlign: The icon alignment.
inTransform: The icon transform.
inLabelColor: The icon label color.
inFlags: The drawing flags to use (usually kPlotIconRefNormalFlags).
inIconRef: The IconRef to plot.
@par Non-Carbon CFM: not available @par Carbon Lib: not available in CarbonLib 1.x, is available on Mac OS
X version 10.1 and later
| OSErr PlotIconSuite | ( | const Rect * | theRect, |
| IconAlignmentType | align, | ||
| IconTransformType | transform, | ||
| IconSuiteRef | theIconSuite | ||
| ) |
| OSErr PlotSICNHandle | ( | const Rect * | theRect, |
| IconAlignmentType | align, | ||
| IconTransformType | transform, | ||
| Handle | theSICN | ||
| ) |
| Boolean PtInIconMethod | ( | Point | testPt, |
| const Rect * | iconRect, | ||
| IconAlignmentType | align, | ||
| IconGetterUPP | theMethod, | ||
| void * | yourDataPtr | ||
| ) |
| Boolean PtInIconRef | ( | const Point * | testPt, |
| const Rect * | iconRect, | ||
| IconAlignmentType | align, | ||
| IconServicesUsageFlags | theIconServicesUsageFlags, | ||
| IconRef | theIconRef | ||
| ) |
PtInIconRef
This routine indicates if testPt would hit the icon designated by iconRef. It mostly takes the same parameters as PtInIconSuite. Pass kIconServicesNormalUsageFlag as a default value for IconServicesUsageFlags. PtInIconRef()
| Boolean PtInIconSuite | ( | Point | testPt, |
| const Rect * | iconRect, | ||
| IconAlignmentType | align, | ||
| IconSuiteRef | theIconSuite | ||
| ) |
Hit test a point against indicated icon.
PtInIconSuite returns TRUE if testPoint is in the icon mask of the appropriate member of iconSuite . iconRect, alignment , and the current GrafPort should be the same as when the icon was last drawn.
This routine is not currently documented in MPW header files (hence, it is not in any THINK C or THINK Pascal header file either). The information given above comes from Macintosh Technical Note #306. This tech. note also gives the inline glue for the call as follows: pascal Boolean PtInIconSuite (Point testPoint, const Rect *iconRect, short alignment, short iconSuite) = {0x303C, 0x070E, 0xABC9};
| *or disposing the iconFamily *OSErr ReadIconFile | ( | const FSSpec * | iconFile, |
| IconFamilyHandle * | iconFamily | ||
| ) |
ReadIconFile Read the specified icon file into the icon family handle. The caller is responsible for disposing the iconFamily ReadIconFile()
| OSStatus ReadIconFromFSRef | ( | const FSRef * | ref, |
| IconFamilyHandle * | iconFamily | ||
| ) |
Discussion: This routine reads an icon (icns) file into memory.
Parameters:
ref: The FSRef for the icon file.
iconFamily: The handle for the icon family.
@par Non-Carbon CFM: not available @par Carbon Lib: not available in CarbonLib 1.x, is available on Mac OS
X version 10.1 and later
| Boolean RectInIconID | ( | const Rect * | testRect, |
| const Rect * | iconRect, | ||
| IconAlignmentType | align, | ||
| SInt16 | iconID | ||
| ) |
| Boolean RectInIconMethod | ( | const Rect * | testRect, |
| const Rect * | iconRect, | ||
| IconAlignmentType | align, | ||
| IconGetterUPP | theMethod, | ||
| void * | yourDataPtr | ||
| ) |
| Boolean RectInIconRef | ( | const Rect * | testRect, |
| const Rect * | iconRect, | ||
| IconAlignmentType | align, | ||
| IconServicesUsageFlags | iconServicesUsageFlags, | ||
| IconRef | theIconRef | ||
| ) |
RectInIconRef
This routine indicates if testRect would intersect the icon designated by iconRef. It mostly takes the same parameters as RectInIconSuite. Pass kIconServicesNormalUsageFlag as a default value for IconServicesUsageFlags. RectInIconRef()
| Boolean RectInIconSuite | ( | const Rect * | testRect, |
| const Rect * | iconRect, | ||
| IconAlignmentType | align, | ||
| IconSuiteRef | theIconSuite | ||
| ) |
Hit test a rectangle against indicated icon.
RectInIconSuite returns TRUE if testRect intersects the icon mask of the appropriate member of iconSuite . iconRect, alignment , and the current GrafPort should be the same as when the icon was last drawn.
This routine is not currently documented in MPW header files (hence, it is not in any THINK C or THINK Pascal header file either). The information given above comes from Macintosh Technical Note #306. This tech. note also gives the inline glue for the call as follows: pascal Boolean RectInIconSuite (const Rect *testRect, const Rect *iconRect, short alignment, short iconSuite) = {0x303C, 0x0711, 0xABC9};
| OSErr RegisterIconRefFromIconFamily | ( | OSType | creator, |
| OSType | iconType, | ||
| IconFamilyHandle | iconFamily, | ||
| IconRef * | theIconRef | ||
| ) |
RegisterIconRefFromIconFamily This routine adds a new entry to the IconRef registry. Other clients will be able to access it using the (creator, iconType) pair specified here. Lower-case creators are reserved for the system. Consider using RegisterIconRefFromResource() if possible, since the data registered using RegisterIconRefFromFamily() cannot be purged. The iconFamily data is copied and the caller is reponsible for disposing of it. This routine increments the reference count of the IconRef. Call ReleaseIconRef() when you're done with it. RegisterIconRefFromIconFamily()
| OSErr RegisterIconRefFromIconFile | ( | OSType | creator, |
| OSType | iconType, | ||
| const FSSpec * | iconFile, | ||
| IconRef * | theIconRef | ||
| ) |
RegisterIconRefFromIconFile This routine adds a new entry to the IconRef registry. Other clients will be able to access it using the (creator, iconType) pair specified here. Lower-case creators are reserved for the system. If the creator is kSystemIconsCreator and the iconType is 0, a new IconRef is always returned. Otherwise, if the creator and type have already been registered, the previously registered IconRef is returned. This routine increments the reference count of the IconRef. Call ReleaseIconRef() when you're done with it. RegisterIconRefFromIconFile()
| OSErr RegisterIconRefFromResource | ( | OSType | creator, |
| OSType | iconType, | ||
| const FSSpec * | resourceFile, | ||
| SInt16 | resourceID, | ||
| IconRef * | theIconRef | ||
| ) |
RegisterIconRefFromResource
Registers an IconRef from a resouce file. Lower-case creators are reserved for the system. The icon data to be fetched is either classic icon data or an icon family. The 'icns' icon family is searched for before the classic icon data. This routine increments the reference count of the IconRef. Call ReleaseIconRef() when you're done with it. RegisterIconRefFromResource()
| OSErr ReleaseIconRef | ( | IconRef | theIconRef | ) |
ReleaseIconRef
This routine decrements the reference count for the IconRef.
When the reference count reaches 0, all memory allocated for the icon is disposed. Any subsequent use of the IconRef is invalid. ReleaseIconRef()
| OSErr RemoveIconRefOverride | ( | IconRef | theIconRef | ) |
RemoveIconRefOverride This routine remove an override if one was applied to the icon and reverts back to the original bitmap data. RemoveIconRefOverride()
| OSErr SetCustomIconsEnabled | ( | SInt16 | vRefNum, |
| Boolean | enableCustomIcons | ||
| ) |
SetCustomIconsEnabled
Enable or disable custom icons on the specified volume. SetCustomIconsEnabled()
| OSErr SetIconCacheData | ( | IconCacheRef | theCache, |
| void * | theData | ||
| ) |
SetIconCacheData Set the data associated with an icon cache.
SetIconCacheData sets the data pointer value associated with the theCache to yourDataPtr .
This routine is not currently documented in MPW header files (hence, it is
not in any THINK C or THINK Pascal header file either). The information
given above comes from Macintosh Technical Note #306. This tech. note
also gives the inline glue for the call as follows:
pascal OSErr SetIconCacheData (Handle theCache, Ptr yourDataPtr)
= {0x303C, 0x041A, 0xABC9};
| OSErr SetIconCacheProc | ( | IconCacheRef | theCache, |
| IconGetterUPP | theProc | ||
| ) |
SetIconCacheProc Set the procedure associated with an icon cache.
SetIconCacheProc sets the ProcPtr value associated with the theCache to theProc.
SetIconCacheProc takes a ProcPtr parameter, theProc The ProcPtr
should have the following format:
Handle GetAnIcon (ResType theType, Ptr yourDataPtr);
This function should return either the icon data to be used to draw or nil to
signify that this entry in the icon cache does not exist. See
Drawing Icons with System 7 for more on icon caches.
This routine is not currently documented in MPW header files (hence, it is
not in any THINK C or THINK Pascal header file either). The information
given above comes from Macintosh Technical Note #306. This tech. note
also gives the inline glue for the call as follows:
pascal OSErr SetIconCacheProc (Handle theCache, Ptr yourDataPtr)
= {0x303C, 0x041C, 0xABC9};
| OSErr SetIconFamilyData | ( | IconFamilyHandle | iconFamily, |
| OSType | iconType, | ||
| Handle | h | ||
| ) |
SetIconFamilyData Change the data of an icon family. The data is copied. The type can be one of the icon type, or 'PICT'. The data will be compressed if needed. SetIconFamilyData()
| OSErr SetSuiteLabel | ( | IconSuiteRef | theSuite, |
| SInt16 | theLabel | ||
| ) |
Specify a default label for an icon family.
SetSuiteLabel allows you to specify a label that is used to draw an icon of this suite when no label is specified in PlotIconSuite . This is used primarily when you want to make sure that a family passes to a system routine gets drawn with the proper label. The default label can be overridden by specifying a label in PlotIconSuite .
This routine is not currently documented in MPW header files (hence, it is
not in any THINK C or THINK Pascal header file either). The information
given above comes from Macintosh Technical Note #306. This tech. note
also gives the inline glue for the call as follows:
pascal OSErr SetSuiteLabel (Handle theSuite, short theLabel)
= {0x303C, 0x0316, 0xABC9};
| OSErr UnregisterIconRef | ( | OSType | creator, |
| OSType | iconType | ||
| ) |
UnregisterIconRef
Removes the specified icon from the icon cache (if there are no users of it). If some clients are using this iconRef, then the IconRef will be removed when the last user calls ReleaseIconRef. UnregisterIconRef()
| OSErr UpdateIconRef | ( | IconRef | theIconRef | ) |
UpdateIconRef
Call this routine to force an update of the data for iconRef.
For example after changing an icon in the desktop database or changing the custom icon of a file. Note that after adding a custom icon to file or folder, you need to call GetIconRefFromFile() to get a new IconRef specific to this file.
This routine does nothing if the IconRef is a registered icon. UpdateIconRef()
| OSErr WriteIconFile | ( | IconFamilyHandle | iconFamily, |
| const FSSpec * | iconFile | ||
| ) |
WriteIconFile Write the iconFamily handle to the specified file WriteIconFile()