Mercurial > cpython-lru_cache-weakref
annotate Mac/Lib/MACFS.py @ 25838:8540887bcec6 2.2
Backport of 2.183:
Fix memory leak in add_subclass() found by NealN with valgrind.
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Fri, 18 Oct 2002 13:42:21 +0000 |
| parents | fb31c33761c9 |
| children | 7b10e7ff794d |
| rev | line source |
|---|---|
|
3038
43ea2c8b3286
Constants useful when using macfs module
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1 # MACFS.py - Constants used by macfs routines |
|
43ea2c8b3286
Constants useful when using macfs module
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2 # Derived from Finder.h and Folders.h |
|
43ea2c8b3286
Constants useful when using macfs module
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3 |
|
43ea2c8b3286
Constants useful when using macfs module
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
4 # Flags in FInfo.Flags field: |
|
43ea2c8b3286
Constants useful when using macfs module
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
5 kIsOnDesk = 0x1 |
|
43ea2c8b3286
Constants useful when using macfs module
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
6 kColor = 0xE |
|
43ea2c8b3286
Constants useful when using macfs module
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
7 kIsShared = 0x40 |
|
43ea2c8b3286
Constants useful when using macfs module
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
8 kHasBeenInited = 0x100 |
|
43ea2c8b3286
Constants useful when using macfs module
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
9 kHasCustomIcon = 0x400 |
|
43ea2c8b3286
Constants useful when using macfs module
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
10 kIsStationery = 0x800 |
|
43ea2c8b3286
Constants useful when using macfs module
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
11 kIsStationary = 0x800 |
|
43ea2c8b3286
Constants useful when using macfs module
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
12 kNameLocked = 0x1000 |
|
43ea2c8b3286
Constants useful when using macfs module
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
13 kHasBundle = 0x2000 |
|
43ea2c8b3286
Constants useful when using macfs module
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
14 kIsInvisible = 0x4000 |
|
43ea2c8b3286
Constants useful when using macfs module
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
15 kIsAlias = 0x8000 |
|
43ea2c8b3286
Constants useful when using macfs module
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
16 |
|
43ea2c8b3286
Constants useful when using macfs module
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
17 # Constants for FindFolder |
|
17051
d58e93dafb98
FindFolder argument is a short, not an unsigned short.
Jack Jansen <jack.jansen@cwi.nl>
parents:
16526
diff
changeset
|
18 kOnSystemDisk = -32768 # previously was 0x8000 but that is an unsigned value whereas vRefNum is signed |
|
d58e93dafb98
FindFolder argument is a short, not an unsigned short.
Jack Jansen <jack.jansen@cwi.nl>
parents:
16526
diff
changeset
|
19 kOnAppropriateDisk = -32767 # Generally, the same as kOnSystemDisk, but it's clearer that this isn't always the 'boot' disk. |
|
d58e93dafb98
FindFolder argument is a short, not an unsigned short.
Jack Jansen <jack.jansen@cwi.nl>
parents:
16526
diff
changeset
|
20 # Folder Domains - Carbon only. |
|
d58e93dafb98
FindFolder argument is a short, not an unsigned short.
Jack Jansen <jack.jansen@cwi.nl>
parents:
16526
diff
changeset
|
21 kSystemDomain = -32766 # Read-only system hierarchy. |
|
d58e93dafb98
FindFolder argument is a short, not an unsigned short.
Jack Jansen <jack.jansen@cwi.nl>
parents:
16526
diff
changeset
|
22 kLocalDomain = -32765 # All users of a single machine have access to these resources. |
|
d58e93dafb98
FindFolder argument is a short, not an unsigned short.
Jack Jansen <jack.jansen@cwi.nl>
parents:
16526
diff
changeset
|
23 kNetworkDomain = -32764 # All users configured to use a common network server has access to these resources. |
|
d58e93dafb98
FindFolder argument is a short, not an unsigned short.
Jack Jansen <jack.jansen@cwi.nl>
parents:
16526
diff
changeset
|
24 kUserDomain = -32763 # Read/write. Resources that are private to the user. |
|
d58e93dafb98
FindFolder argument is a short, not an unsigned short.
Jack Jansen <jack.jansen@cwi.nl>
parents:
16526
diff
changeset
|
25 kClassicDomain = -32762 # Domain referring to the currently configured Classic System Folder |
|
d58e93dafb98
FindFolder argument is a short, not an unsigned short.
Jack Jansen <jack.jansen@cwi.nl>
parents:
16526
diff
changeset
|
26 |
|
3038
43ea2c8b3286
Constants useful when using macfs module
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
27 kSystemFolderType = 'macs' # the system folder |
|
43ea2c8b3286
Constants useful when using macfs module
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
28 kDesktopFolderType = 'desk' # the desktop folder; objects in this folder show on the desk top. |
|
43ea2c8b3286
Constants useful when using macfs module
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
29 kTrashFolderType = 'trsh' # the trash folder; objects in this folder show up in the trash |
|
43ea2c8b3286
Constants useful when using macfs module
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
30 kWhereToEmptyTrashFolderType = 'empt' # the "empty trash" folder; Finder starts empty from here down |
|
43ea2c8b3286
Constants useful when using macfs module
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
31 kPrintMonitorDocsFolderType = 'prnt' # Print Monitor documents |
|
43ea2c8b3286
Constants useful when using macfs module
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
32 kStartupFolderType = 'strt' # Finder objects (applications, documents, DAs, aliases, to...) to open at startup go here |
|
43ea2c8b3286
Constants useful when using macfs module
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
33 kAppleMenuFolderType = 'amnu' # Finder objects to put into the Apple menu go here |
|
43ea2c8b3286
Constants useful when using macfs module
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
34 kControlPanelFolderType = 'ctrl' # Control Panels go here (may contain INITs) |
|
43ea2c8b3286
Constants useful when using macfs module
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
35 kExtensionFolderType = 'extn' # Finder extensions go here |
|
43ea2c8b3286
Constants useful when using macfs module
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
36 kFontsFolderType = 'font' # Fonts go here |
|
43ea2c8b3286
Constants useful when using macfs module
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
37 kPreferencesFolderType = 'pref' # preferences for applications go here |
|
43ea2c8b3286
Constants useful when using macfs module
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
38 kTemporaryFolderType = 'temp' |
| 8137 | 39 |
| 40 # Alias types | |
| 41 kContainerFolderAliasType = 'fdrp' | |
| 42 kContainerTrashAliasType = 'trsh' | |
| 43 kContainerHardDiskAliasType = 'hdsk' | |
| 44 kContainerFloppyAliasType = 'flpy' | |
| 45 kContainerServerAliasType = 'srvr' | |
| 46 kApplicationAliasType = 'adrp' | |
| 47 kContainerAliasType = 'drop' | |
| 48 # types for Special folder aliases | |
| 49 kSystemFolderAliasType = 'fasy' | |
| 50 kAppleMenuFolderAliasType = 'faam' | |
| 51 kStartupFolderAliasType = 'fast' | |
| 52 kPrintMonitorDocsFolderAliasType = 'fapn' | |
| 53 kPreferencesFolderAliasType = 'fapf' | |
| 54 kControlPanelFolderAliasType = 'fact' | |
| 55 kExtensionFolderAliasType = 'faex' | |
| 56 kExportedFolderAliasType = 'faet' | |
| 57 kDropFolderAliasType = 'fadr' | |
| 58 kSharedFolderAliasType = 'fash' | |
| 59 kMountedFolderAliasType = 'famn' | |
| 60 | |
| 61 # New FindFolder constants | |
| 62 kExtensionDisabledFolderType = 'extD' | |
| 63 kControlPanelDisabledFolderType = 'ctrD' | |
| 64 kSystemExtensionDisabledFolderType = 'macD' | |
| 65 kStartupItemsDisabledFolderType = 'strD' | |
| 66 kShutdownItemsDisabledFolderType = 'shdD' | |
| 67 kApplicationsFolderType = 'apps' | |
| 68 kDocumentsFolderType = 'docs' | |
| 69 | |
| 70 kVolumeRootFolderType = 'root' | |
| 71 kChewableItemsFolderType = 'flnt' | |
| 72 kApplicationSupportFolderType = 'asup' | |
|
17845
fb31c33761c9
Fixed macroman<->latin1 conversion. Some chars don't
Jack Jansen <jack.jansen@cwi.nl>
parents:
17051
diff
changeset
|
73 kTextEncodingsFolderType = '€tex' |
| 8137 | 74 kStationeryFolderType = 'odst' |
| 75 kOpenDocFolderType = 'odod' | |
| 76 kOpenDocShellPlugInsFolderType = 'odsp' | |
| 77 kEditorsFolderType = 'oded' | |
|
17845
fb31c33761c9
Fixed macroman<->latin1 conversion. Some chars don't
Jack Jansen <jack.jansen@cwi.nl>
parents:
17051
diff
changeset
|
78 kOpenDocEditorsFolderType = '€odf' |
| 8137 | 79 kOpenDocLibrariesFolderType = 'odlb' |
|
17845
fb31c33761c9
Fixed macroman<->latin1 conversion. Some chars don't
Jack Jansen <jack.jansen@cwi.nl>
parents:
17051
diff
changeset
|
80 kGenEditorsFolderType = '€edi' |
|
fb31c33761c9
Fixed macroman<->latin1 conversion. Some chars don't
Jack Jansen <jack.jansen@cwi.nl>
parents:
17051
diff
changeset
|
81 kHelpFolderType = '€hlp' |
|
fb31c33761c9
Fixed macroman<->latin1 conversion. Some chars don't
Jack Jansen <jack.jansen@cwi.nl>
parents:
17051
diff
changeset
|
82 kInternetPlugInFolderType = '€net' |
|
fb31c33761c9
Fixed macroman<->latin1 conversion. Some chars don't
Jack Jansen <jack.jansen@cwi.nl>
parents:
17051
diff
changeset
|
83 kModemScriptsFolderType = '€mod' |
| 8137 | 84 kPrinterDescriptionFolderType = 'ppdf' |
|
17845
fb31c33761c9
Fixed macroman<->latin1 conversion. Some chars don't
Jack Jansen <jack.jansen@cwi.nl>
parents:
17051
diff
changeset
|
85 kPrinterDriverFolderType = '€prd' |
|
fb31c33761c9
Fixed macroman<->latin1 conversion. Some chars don't
Jack Jansen <jack.jansen@cwi.nl>
parents:
17051
diff
changeset
|
86 kScriptingAdditionsFolderType = '€scr' |
|
fb31c33761c9
Fixed macroman<->latin1 conversion. Some chars don't
Jack Jansen <jack.jansen@cwi.nl>
parents:
17051
diff
changeset
|
87 kSharedLibrariesFolderType = '€lib' |
| 8137 | 88 kVoicesFolderType = 'fvoc' |
| 89 kControlStripModulesFolderType = 'sdev' | |
|
17845
fb31c33761c9
Fixed macroman<->latin1 conversion. Some chars don't
Jack Jansen <jack.jansen@cwi.nl>
parents:
17051
diff
changeset
|
90 kAssistantsFolderType = 'ast€' |
|
fb31c33761c9
Fixed macroman<->latin1 conversion. Some chars don't
Jack Jansen <jack.jansen@cwi.nl>
parents:
17051
diff
changeset
|
91 kUtilitiesFolderType = 'uti€' |
|
fb31c33761c9
Fixed macroman<->latin1 conversion. Some chars don't
Jack Jansen <jack.jansen@cwi.nl>
parents:
17051
diff
changeset
|
92 kAppleExtrasFolderType = 'aex€' |
| 8137 | 93 kContextualMenuItemsFolderType = 'cmnu' |
|
17845
fb31c33761c9
Fixed macroman<->latin1 conversion. Some chars don't
Jack Jansen <jack.jansen@cwi.nl>
parents:
17051
diff
changeset
|
94 kMacOSReadMesFolderType = 'mor€' |
| 8137 | 95 kALMModulesFolderType = 'walk' |
| 96 kALMPreferencesFolderType = 'trip' | |
| 97 kALMLocationsFolderType = 'fall' | |
| 98 kColorSyncProfilesFolderType = 'prof' | |
| 99 kThemesFolderType = 'thme' | |
| 100 kFavoritesFolderType = 'favs' | |
| 16526 | 101 |
| 102 # Don't remember why this is here | |
| 103 READ = 1 | |
| 104 WRITE = 2 | |
| 105 smAllScripts = -3 | |
| 106 |
