Folders.h
上传用户:xjjlds
上传日期:2015-12-05
资源大小:22823k
文件大小:30k
- /*
- File: Folders.h
-
- Contains: Folder Manager Interfaces.
-
- Version: Technology: Mac OS 8
- Release: QuickTime 6.0.2
-
- Copyright: (c) 1995-2001 by Apple Computer, Inc., all rights reserved.
-
- Bugs?: For bug reports, consult the following page on
- the World Wide Web:
-
- http://developer.apple.com/bugreporter/
-
- */
- #ifndef __FOLDERS__
- #define __FOLDERS__
- #ifndef __MACTYPES__
- #include "MacTypes.h"
- #endif
- #ifndef __MIXEDMODE__
- #include "MixedMode.h"
- #endif
- #ifndef __FILES__
- #include "Files.h"
- #endif
- #if PRAGMA_ONCE
- #pragma once
- #endif
- #ifdef __cplusplus
- extern "C" {
- #endif
- #if PRAGMA_IMPORT
- #pragma import on
- #endif
- #if PRAGMA_STRUCT_ALIGN
- #pragma options align=mac68k
- #elif PRAGMA_STRUCT_PACKPUSH
- #pragma pack(push, 2)
- #elif PRAGMA_STRUCT_PACK
- #pragma pack(2)
- #endif
- enum {
- kOnSystemDisk = -32768L, /* previously was 0x8000 but that is an unsigned value whereas vRefNum is signed*/
- kOnAppropriateDisk = -32767 /* Generally, the same as kOnSystemDisk, but it's clearer that this isn't always the 'boot' disk.*/
- };
- enum {
- kCreateFolder = true,
- kDontCreateFolder = false
- };
- enum {
- kSystemFolderType = FOUR_CHAR_CODE('macs'), /* the system folder */
- kDesktopFolderType = FOUR_CHAR_CODE('desk'), /* the desktop folder; objects in this folder show on the desk top. */
- kSystemDesktopFolderType = FOUR_CHAR_CODE('sdsk'), /* the desktop folder at the root of the hard drive, never the redirected user desktop folder */
- kTrashFolderType = FOUR_CHAR_CODE('trsh'), /* the trash folder; objects in this folder show up in the trash */
- kSystemTrashFolderType = FOUR_CHAR_CODE('strs'), /* the trash folder at the root of the drive, never the redirected user trash folder */
- kWhereToEmptyTrashFolderType = FOUR_CHAR_CODE('empt'), /* the "empty trash" folder; Finder starts empty from here down */
- kPrintMonitorDocsFolderType = FOUR_CHAR_CODE('prnt'), /* Print Monitor documents */
- kStartupFolderType = FOUR_CHAR_CODE('strt'), /* Finder objects (applications, documents, DAs, aliases, to...) to open at startup go here */
- kShutdownFolderType = FOUR_CHAR_CODE('shdf'), /* Finder objects (applications, documents, DAs, aliases, to...) to open at shutdown go here */
- kAppleMenuFolderType = FOUR_CHAR_CODE('amnu'), /* Finder objects to put into the Apple menu go here */
- kControlPanelFolderType = FOUR_CHAR_CODE('ctrl'), /* Control Panels go here (may contain INITs) */
- kSystemControlPanelFolderType = FOUR_CHAR_CODE('sctl'), /* System control panels folder - never the redirected one, always "Control Panels" inside the System Folder */
- kExtensionFolderType = FOUR_CHAR_CODE('extn'), /* System extensions go here */
- kFontsFolderType = FOUR_CHAR_CODE('font'), /* Fonts go here */
- kPreferencesFolderType = FOUR_CHAR_CODE('pref'), /* preferences for applications go here */
- kSystemPreferencesFolderType = FOUR_CHAR_CODE('sprf'), /* System-type Preferences go here - this is always the system's preferences folder, never a logged in user's */
- kTemporaryFolderType = FOUR_CHAR_CODE('temp') /* temporary files go here (deleted periodically, but don't rely on it.) */
- };
- EXTERN_API( OSErr )
- FindFolder (short vRefNum,
- OSType folderType,
- Boolean createFolder,
- short * foundVRefNum,
- long * foundDirID) TWOWORDINLINE(0x7000, 0xA823);
- EXTERN_API( OSErr )
- FindFolderExtended (short vol,
- OSType foldType,
- Boolean createFolder,
- UInt32 flags,
- void * data,
- short * vRefNum,
- long * dirID) THREEWORDINLINE(0x303C, 0x0B2C, 0xA823);
- EXTERN_API( OSErr )
- ReleaseFolder (short vRefNum,
- OSType folderType) TWOWORDINLINE(0x700B, 0xA823);
- #if !TARGET_OS_MAC
- /* Since non-mac targets don't know about VRef's or DirID's, the Ex version returns
- the found folder path.
- */
- #if CALL_NOT_IN_CARBON
- EXTERN_API_C( OSErr )
- FindFolderEx (short vRefNum,
- OSType folderType,
- Boolean createFolder,
- short * foundVRefNum,
- long * foundDirID,
- char * foundFolder);
- #endif /* CALL_NOT_IN_CARBON */
- #endif /* !TARGET_OS_MAC */
- /******************************************/
- /* Extensible Folder Manager declarations */
- /******************************************/
- /****************************/
- /* Folder Manager constants */
- /****************************/
- enum {
- kExtensionDisabledFolderType = FOUR_CHAR_CODE('extD'),
- kControlPanelDisabledFolderType = FOUR_CHAR_CODE('ctrD'),
- kSystemExtensionDisabledFolderType = FOUR_CHAR_CODE('macD'),
- kStartupItemsDisabledFolderType = FOUR_CHAR_CODE('strD'),
- kShutdownItemsDisabledFolderType = FOUR_CHAR_CODE('shdD'),
- kApplicationsFolderType = FOUR_CHAR_CODE('apps'),
- kDocumentsFolderType = FOUR_CHAR_CODE('docs')
- };
- enum {
- /* new constants */
- kVolumeRootFolderType = FOUR_CHAR_CODE('root'), /* root folder of a volume */
- kChewableItemsFolderType = FOUR_CHAR_CODE('flnt'), /* items deleted at boot */
- kApplicationSupportFolderType = FOUR_CHAR_CODE('asup'), /* third-party items and folders */
- kTextEncodingsFolderType = FOUR_CHAR_CODE('膖ex'), /* encoding tables */
- kStationeryFolderType = FOUR_CHAR_CODE('odst'), /* stationery */
- kOpenDocFolderType = FOUR_CHAR_CODE('odod'), /* OpenDoc root */
- kOpenDocShellPlugInsFolderType = FOUR_CHAR_CODE('odsp'), /* OpenDoc Shell Plug-Ins in OpenDoc folder */
- kEditorsFolderType = FOUR_CHAR_CODE('oded'), /* OpenDoc editors in MacOS Folder */
- kOpenDocEditorsFolderType = FOUR_CHAR_CODE('膐df'), /* OpenDoc subfolder of Editors folder */
- kOpenDocLibrariesFolderType = FOUR_CHAR_CODE('odlb'), /* OpenDoc libraries folder */
- kGenEditorsFolderType = FOUR_CHAR_CODE('膃di'), /* CKH general editors folder at root level of Sys folder */
- kHelpFolderType = FOUR_CHAR_CODE('膆lp'), /* CKH help folder currently at root of system folder */
- kInternetPlugInFolderType = FOUR_CHAR_CODE('膎et'), /* CKH internet plug ins for browsers and stuff */
- kModemScriptsFolderType = FOUR_CHAR_CODE('膍od'), /* CKH modem scripts, get 'em OUT of the Extensions folder */
- kPrinterDescriptionFolderType = FOUR_CHAR_CODE('ppdf'), /* CKH new folder at root of System folder for printer descs. */
- kPrinterDriverFolderType = FOUR_CHAR_CODE('膒rd'), /* CKH new folder at root of System folder for printer drivers */
- kScriptingAdditionsFolderType = FOUR_CHAR_CODE('膕cr'), /* CKH at root of system folder */
- kSharedLibrariesFolderType = FOUR_CHAR_CODE('膌ib'), /* CKH for general shared libs. */
- kVoicesFolderType = FOUR_CHAR_CODE('fvoc'), /* CKH macintalk can live here */
- kControlStripModulesFolderType = FOUR_CHAR_CODE('sdev'), /* CKH for control strip modules */
- kAssistantsFolderType = FOUR_CHAR_CODE('ast