Support additional resource file attributes

Added the attributes "Resources Locked" and "Printer Driver MultiFinder
Compatible" from ResEdit, as well as more dummy constants (512-16384)
for attributes with no known meaning.
This commit is contained in:
dgelessus 2018-02-01 11:02:01 +01:00
parent 3d802c570f
commit ee796d0eb1
2 changed files with 14 additions and 0 deletions

View File

@ -139,6 +139,12 @@ __ https://archive.fo/
Changelog
---------
Version 1.1.2
`````````````
* Added support for the resource file attributes "Resources Locked" and "Printer Driver MultiFinder Compatible" from ResEdit.
* Added more dummy constants for resource attributes with unknown meaning, so that resource files containing such attributes can be loaded without errors.
Version 1.1.1
`````````````

View File

@ -79,6 +79,14 @@ STRUCT_RESOURCE_NAME_HEADER = struct.Struct(">B")
class ResourceFileAttrs(enum.Flag):
"""Resource file attribute flags. The descriptions for these flags are taken from comments on the map*Bit and map* enum constants in <CarbonCore/Resources.h>."""
mapResourcesLocked = 32768 # "Resources Locked" (undocumented, but available as a checkbox in ResEdit)
_UNKNOWN_16384 = 16384
_UNKNOWN_8192 = 8192
_UNKNOWN_4096 = 4096
_UNKNOWN_2048 = 2048
_UNKNOWN_1024 = 1024
_UNKNOWN_512 = 512
mapPrinterDriverMultiFinderCompatible = 256 # "Printer Driver MultiFinder Compatible" (undocumented, but available as a checkbox in ResEdit)
mapReadOnly = 128 # "is this file read-only?", "Resource file read-only"
mapCompact = 64 # "Is a compact necessary?", "Compact resource file"
mapChanged = 32 # "Is it necessary to write map?", "Write map out at update"