RetroLinker
Linker for several 8-bit, 16-bit and 32-bit formats
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
Apple::MacintoshResourceFileFormat::SizeResource Class Reference

Stores a 'SIZE'-1 resource, containing information related to program behavior, such as being able to run in 32-bit clean mode. More...

#include <macos.h>

Inheritance diagram for Apple::MacintoshResourceFileFormat::SizeResource:
Apple::MacintoshResourceFileFormat::Resource Linker::Format Linker::Contents

Public Types

enum  target_type { Classic24 , Classic32 , AUX32 , Carbon }
 

Public Member Functions

 SizeResource (target_type target)
 
void CalculateValues () override
 
offset_t ImageSize () const override
 Retrieves the offset of the byte after the last one belonging to this format from the first one.
 
void ReadFile (const std::shared_ptr< Linker::Reader > &rd) override
 Loads file into memory.
 
void ReadFile (const std::shared_ptr< Linker::Reader > &rd, offset_t length) override
 
offset_t WriteFile (const std::shared_ptr< Linker::Writer > &wr) const override
 Stores data in memory to file.
 
int GetDisplayOptions () const override
 
void AddFields (Dumper::Dumper &dump, Dumper::Region &region, offset_t file_offset) const override
 
- Public Member Functions inherited from Apple::MacintoshResourceFileFormat::Resource
void Dump (Dumper::Dumper &dump) const override
 Display file contents in a nice manner.
 
virtual void Dump (Dumper::Dumper &dump, offset_t file_offset) const
 
virtual std::unique_ptr< Dumper::Region > CreateRegion (std::string name, offset_t offset, offset_t length, unsigned display_width) const
 
virtual void EffectFormat (MacintoshResourceFileFormat &format, const std::shared_ptr< Linker::Reader > &rd)
 Apply some changes to the format after parsing.
 
- Public Member Functions inherited from Linker::Format
 Format (offset_t file_offset=0)
 
virtual void Clear ()
 Resets all fields to their default values, deallocate memory.
 
virtual void SetFileOffset (offset_t new_offset)
 Attempts to alter the offset to the first byte of the format from the beginning of the file.
 
- Public Member Functions inherited from Linker::Contents
virtual std::shared_ptr< const Image > AsImage () const
 Retrieves a randomly accessible image.
 
std::shared_ptr< Image > AsImage ()
 Retrieves a randomly accessible image.
 

Static Public Member Functions

static constexpr uint16_t GetDefaultFlags (target_type target)
 
static constexpr uint32_t GetDefaultMemory (target_type target)
 

Public Attributes

uint16_t flags = 0
 
uint32_t preferred_memory = 0
 
uint32_t minimum_memory = 0
 
- Public Attributes inherited from Apple::MacintoshResourceFileFormat::Resource
char type [4]
 
uint16_t id
 
std::optional< std::string > name
 
uint8_t attributes
 
- Public Attributes inherited from Linker::Format
offset_t file_offset
 The offset of the first byte used by this format in the file it is stored in.
 

Static Public Attributes

static constexpr uint32_t OSType = OSTypeToUInt32('S', 'I', 'Z', 'E')
 
static constexpr uint32_t ExpectedLength = 10
 
static constexpr uint16_t SaveScreen = 0x8000
 
static constexpr uint16_t AcceptSuspendResumeEvents = 0x4000
 
static constexpr uint16_t DisableOptionSwitch = 0x2000
 
static constexpr uint16_t CanBackground = 0x1000
 
static constexpr uint16_t MultiFinderAware = 0x0800
 
static constexpr uint16_t OnlyBackground = 0x0400
 
static constexpr uint16_t GetFrontClicks = 0x0200
 
static constexpr uint16_t AcceptChildDiedEvents = 0x0100
 
static constexpr uint16_t Is32BitCompatible = 0x0080
 
static constexpr uint16_t IsHighLevelEventAware = 0x0040
 
static constexpr uint16_t LocalAndRemoteHLEvents = 0x0020
 
static constexpr uint16_t IsStationaryAware = 0x0010
 
static constexpr uint16_t UseTextEditServices = 0x0008
 
static constexpr uint16_t DisplayManagerAware = 0x0004
 

Additional Inherited Members

- Protected Member Functions inherited from Apple::MacintoshResourceFileFormat::Resource
 Resource (const char type[4], uint16_t id, uint8_t attributes=0)
 
 Resource (const char type[4], uint16_t id, std::optional< std::string > name, uint8_t attributes=0)
 

Detailed Description

Stores a 'SIZE'-1 resource, containing information related to program behavior, such as being able to run in 32-bit clean mode.

Member Function Documentation

◆ AddFields()

void MacintoshResourceFileFormat::SizeResource::AddFields ( Dumper::Dumper &  dump,
Dumper::Region &  region,
offset_t  file_offset 
) const
overridevirtual

◆ CalculateValues()

void MacintoshResourceFileFormat::SizeResource::CalculateValues ( )
overridevirtual

◆ GetDisplayOptions()

int MacintoshResourceFileFormat::SizeResource::GetDisplayOptions ( ) const
overridevirtual

◆ ImageSize()

offset_t MacintoshResourceFileFormat::SizeResource::ImageSize ( ) const
overridevirtual

Retrieves the offset of the byte after the last one belonging to this format from the first one.

Returns
The size of the image, or offset_t(-1) if it cannot be determined before writing to the file

Implements Apple::MacintoshResourceFileFormat::Resource.

◆ ReadFile() [1/2]

void MacintoshResourceFileFormat::SizeResource::ReadFile ( const std::shared_ptr< Linker::Reader > &  rd)
overridevirtual

Loads file into memory.

Implements Linker::Format.

◆ ReadFile() [2/2]

void MacintoshResourceFileFormat::SizeResource::ReadFile ( const std::shared_ptr< Linker::Reader > &  rd,
offset_t  length 
)
overridevirtual

◆ WriteFile()

offset_t MacintoshResourceFileFormat::SizeResource::WriteFile ( const std::shared_ptr< Linker::Writer > &  wr) const
overridevirtual

Stores data in memory to file.

Implements Linker::Format.

Member Data Documentation

◆ DisableOptionSwitch

constexpr uint16_t Apple::MacintoshResourceFileFormat::SizeResource::DisableOptionSwitch = 0x2000
staticconstexpr

◆ SaveScreen

constexpr uint16_t Apple::MacintoshResourceFileFormat::SizeResource::SaveScreen = 0x8000
staticconstexpr

The documentation for this class was generated from the following files: