FinderRegistry.h

/*
    File:       FinderRegistry.h
 
    Contains:   Classes, properties and data types used by the Scriptable Finder
 
    Written by: Francis Stanbach & Greg Anderson    
 
    Copyright:  Copyright © 1991-1999 by Apple Computer, Inc., All Rights Reserved.
 
                You may incorporate this Apple sample source code into your program(s) without
                restriction. This Apple sample source code has been provided "AS IS" and the
                responsibility for its operation is yours. You are not permitted to redistribute
                this Apple sample source code as "Apple sample source code" after having made
                changes. If you're going to re-distribute the source, we require that you make
                it clear in the source that the code was descended from Apple sample source
                code, but that you've made changes.
 
    Change History (most recent first):
                7/22/1999   Karl Groethe    Updated for Metrowerks Codewarror Pro 2.1
                
 
*/
#ifndef __FINDERREGISTRY__
#define __FINDERREGISTRY__
#define FinderRegistry_h
 
#ifndef __AEREGISTRY__
#include "AERegistry.h"
#endif
 
////////////////////////////////////////
// Finder Suite
////////////////////////////////////////
 
//
// The old Finder Event suite was 'FNDR'
// The new suite is 'fndr'
//
enum {
    kAEFinderSuite              = 'fndr'
};
 
////////////////////////////////////////
// Finder Events
////////////////////////////////////////
 
/*enum {
    kAECleanUp                  = 'fclu',
    kAEEject                    = 'ejct',
    kAEEmpty                    = 'empt',
    kAEErase                    = 'fera',
    kAEGestalt                  = 'gstl',
    kAEPutAway                  = 'ptwy',
    kAERebuildDesktopDB         = 'rddb',
    kAESnooze                   = 'snoz',               // Go to sleep
    kAEUpdate                   = 'fupd'
};*/
 
////////////////////////////////////////
// Classes
////////////////////////////////////////
 
enum {
    cFinder                     = cApplication,     // the finder object Å null
 
    cDisk                       = 'cdis',
    cFolder                     = 'cfol',
    cTrash                      = 'ctrs',
    cDesktop                    = 'cdsk',
    cContainer                  = 'ctnr',               // Disks, folders, trashes, desktops, suitcases
    cSharableContainer          = 'sctr',               // Disks and folders
    cSuitcase                   = 'stcs',
    cFontSuitcase               = 'fsut',
    cAccessorySuitcase          = 'dsut',
 
    cAliasFile                  = 'alia',
 
    cApplicationFile            = 'appf',
    cDocumentFile               = 'docf',
    cControlPanel               = 'ccdv',
    cDeskAccessoryFile          = 'dafi',
    cSoundFile                  = 'sndf',
    cFontFile                   = 'fntf',
 
    cContentSpace               = 'dwnd',               // Content space:  includes desktop window & other windows
    cContainerWindow            = 'cwnd',
    cInfoWindow                 = 'iwnd',
    cSharingWindow              = 'swnd',
    cStatusWindow               = 'qwnd',               // Empty trash progress, 'copy' window
 
    cPrivilege                  = 'priv',
    cGestalt                    = 'cgst',
    cProcess                    = 'prcs',               // Information about a process running on this machine (like cApplication)
    cAccessoryProcess           = 'pcda',
    cApplicationProcess         = 'pcap',
 
    cEntireContents             = 'ects',
 
    cUser                       = 'cuse',
    cGroup                      = 'sgrp',
 
    cIconFamily                 = 'ifam'
};
 
////////////////////////////////////////
// Properties
////////////////////////////////////////
 
//
// Properties of cObject:
//
enum {
    pComment                    = 'comt',
    pContainer                  = cContainer,           // The container the object is stored in
    pCreationDate               = 'crtd',
    pDemiWindow                 = cContentSpace,
    pDisk                       = cDisk,                // the disk the object is stored on
    pIconBitmap                 = 'iimg',
    pInformationWindow          = cInfoWindow,          // Get info window
    pStatusWindow               = cStatusWindow,        // Status window (copy, empty trash, rebuild desktop database)
    pIsLocked                   = 'islk',
    pIsSelected                 = 'issl',
    pKind                       = 'kind',
    pModificationDate           = 'modd',
    pPhysicalSize               = 'phys',
    pPosition                   = 'posn',
    pSize                       = pPointSize,           // both are called "Size" in their respective terminologies, so they must have the same four-character code
    pWindow                     = cWindow
};
 
//
// Properties of cFile:
//
enum {
    pCreatorType                = 'fcrt',
    pFileType                   = 'fitp',
    pVersion2                   = 'ver2'
};
 
//
// Properties of cAliasFile:
//
enum {
    pOriginalItem               = 'orig'                // Item pointed to by alias
};
 
//
// Properties of cApplicationFile:
//
enum {
    pAppPartition               = 'appt',
    pSuggestedAppPartition      = 'sprt',
    pMinAppPartition            = 'mprt'
};
 
//
// Properties of cContainer:
//
enum {
    pContainerWindow            = cContainerWindow, // Window that contains children
    pEntireContents             = cEntireContents,
    pLabelIndex                 = 'labi',
    pExpanded                   = 'pexp',               // Same as kAEExpanded
    pExpandable                 = 'pexa',
    pCompletelyExpanded         = 'pexc',
    pSharingWindow              = cSharingWindow,       // Sharing window
    pView                       = 'pvew',
    pPreviousView               = 'svew',               // The last listwindow (non-icon) view
 
    pSharing                    = 'shar',
    pSharingProtection          = 'spro',
    pExported                   = 'sexp',
    pMounted                    = 'smou',
    pInheritedPrivileges        = 'iprv',               // "Same as enclosing" checkbox
    pOwner                      = 'sown',
    pGroup                      = cGroup,
    pOwnerPrivileges            = 'ownr',
    pGroupPrivileges            = 'gppr',
    pGuestPrivileges            = 'gstp'
};
 
//
// Properties of cDisk:
//
enum {
    pCapacity                   = 'capa',
    pEjectable                  = 'isej',
    pFreeSpace                  = 'frsp',
    pLocal                      = 'isrv',
    pIsStartup                  = 'istd'
};
 
//
// Properties of cDesktop:
//
enum {
    pTrash                      = 'trsh',               // Can't use cTrash, and pTrash must == kTrashFolderType
    pStartupDisk                = 'sdsk'
};
 
//
// Properties of cTrash:
//
enum {
    pWarnOnEmpty                = 'warn'
};
 
//
// Properties of cFinder / cApplication:
//
enum {
    pAppleMenuItemsFolder       = 'amnu',               // kAppleMenuFolderType
    pControlPanelsFolder        = 'ctrl',               // kControlPanelFolderType
    pDesktop                    = 'desk',               // Can't use cDesktop, and pDesktop must == kDesktopFolderType
    pExtensionsFolder           = 'extn',               // kExtensionFolderType
    pFileShareOn                = 'fshr',
    pFileShareStartingUp        = 'fsup',
    pFontsFolder                = 'ffnt',
 
    pLargestFreeBlock           = 'mfre',
    pPreferencesFolder          = 'pref',               // kPreferencesFolderType
    pAboutMacintosh             = 'abbx',               // Open this to get 'About this Macintosh' window
    pShortcuts                  = 'scut',               // Finder shortcuts in help menu
    pShutdownFolder             = 'shdf',
    pStartupItemsFolder         = 'strt',               // kStartupFolderType
    pSystemFolder               = 'macs',               // kSystemFolderType
    pTemporaryFolder            = 'temp',               // kTemporaryFolderType
    pTimerItemsFolder           = 'timf',
    pViewPreferences            = 'pvwp'                // Finder view preferences ("Views" control panel)
};
 
//
// View preferences properties
//
enum {
    pViewFont                   = 'vfnt',
    pViewFontSize               = 'vfsz',
    pGridIcons                  = 'fgrd',
    pListViewIconSize           = 'lvis',
    pShowComment                = 'scom',
    pShowDate                   = 'sdat',
    pShowDiskInfo               = 'sdin',
    pShowFolderSize             = 'sfsz',
    pShowKind                   = 'sknd',
    pShowLabel                  = 'slbl',
    pShowSize                   = 'ssiz',
    pShowVersion                = 'svrs',
    pStaggerIcons               = 'fstg'
};
 
//
// Properties of cPrivilegs
//
enum {
    pSeeFiles                   = 'prvr',
    pSeeFolders                 = 'prvs',
    pMakeChanges                = 'prvw'
};
 
//
// Properties of cProcess
//
enum {
    pApplicationFile            = cApplicationFile,
 
    pDeskAccessoryFile          = cDeskAccessoryFile,
    pIsScriptable               = 'isab',
    pLocalAndRemoteEvents       = 'revt',
    pPartitionSpaceUsed         = 'pusd',
 
    pFolder                     = cFolder,
    pObject                     = cObject,
    pSharableContainer          = cSharableContainer,
    pSuitcase                   = cSuitcase,
    pFontSuitcase               = cFontSuitcase,
    pAccessorySuitcase          = cAccessorySuitcase
};
 
 
////////////////////////////////////////
// Enumerations defined by the Finder
////////////////////////////////////////
 
enum {
    enumViewBy                  = 'vwby',
    pSmallIcon                  = 'smic',
    enumGestalt                 = 'gsen',
    enumConflicts               = 'cflc',
    enumExistingItems           = 'exsi'
};
 
////////////////////////////////////////
// Types defined by the Finder
////////////////////////////////////////
 
enum {
    typeIconFamily              = cIconFamily,          // An AEList of typeIconAndMask, type8BitIcon, & c.
    typeIconAndMask             = 'ICN#',
    type8BitIcon                = 'icl8',
    type4BitIcon                = 'icl4',
    typeSmallIconAndMask        = 'ics#',
    typeSmall8BitIcon           = 'ics8',
    typeSmall4BitIcon           = 'ics4'
};
 
////////////////////////////////////////
// Keywords defined by the Finder
////////////////////////////////////////
 
enum {
    keyIconAndMask              = 'ICN#',
    key8BitIcon                 = 'icl8',
    key4BitIcon                 = 'icl4',
    keySmallIconAndMask         = 'ics#',
    keySmall8BitIcon            = 'ics8',
    keySmall4BitIcon            = 'ics4',
 
    keyAEUsing                  = 'usin',
    keyAEReplacing              = 'alrp',
 
    keyLocalPositionList        = 'mvpl',
    keyGlobalPositionList       = 'mvpg'
};
 
////////////////////////////////////////
// New prepositions used by the Finder
////////////////////////////////////////
 
enum {
    keyASPrepositionHas         = 'has ',
    keyAll                      = 'kyal',
    keyOldFinderItems           = 'fsel'
};
 
////////////////////////////////////////
// New key forms used by the Finder
////////////////////////////////////////
 
enum {
    formAlias                   = typeAlias,
    formCreator                 = pCreatorType
};
 
////////////////////////////////////////
// Finder error codes
////////////////////////////////////////
 
enum {
    errFinderIsBusy                 = -15260,
    errFinderWindowNotOpen          = -15261,
    errFinderCannotPutAway          = -15262,
    errFinderWindowMustBeIconView   = -15263,       // RequireWindowInIconView
    errFinderWindowMustBeListView   = -15264,       // RequireWindowInListView
    errFinderCantMoveToDestination  = -15265,
    errFinderCantMoveSource         = -15266,
    errFinderCantOverwrite          = -15267,
    errFinderIncestuousMove         = -15268,       
    errFinderCantMoveToAncestor     = -15269,       
    errFinderCantUseTrashedItems    = -15270,
    errFinderItemAlreadyInDest      = -15271,       // Move from folder A to folder A
    errFinderUnknownUser            = -15272,       // Includes unknown group
    errFinderSharePointsCantInherit = -15273,
 
    errFinderBoundsWrong            = -15278,
    errAEValueOutOfRange            = -15279
};
 
#endif