2019-11-11 00:11:59 -05:00
|
|
|
#pragma once
|
|
|
|
|
#ifndef __PL_RESOURCES_H__
|
|
|
|
|
#define __PL_RESOURCES_H__
|
|
|
|
|
|
|
|
|
|
#include "PLCore.h"
|
|
|
|
|
|
|
|
|
|
struct ResType
|
|
|
|
|
{
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
class PLPasStr;
|
|
|
|
|
|
|
|
|
|
void DetachResource(Handle hdl);
|
|
|
|
|
void ReleaseResource(Handle hdl);
|
|
|
|
|
|
|
|
|
|
short CurResFile();
|
|
|
|
|
void UseResFile(short fid);
|
|
|
|
|
Handle Get1Resource(UInt32 resID, int index);
|
|
|
|
|
Handle Get1IndResource(UInt32 resID, int index);
|
|
|
|
|
int Count1Resources(UInt32 resType);
|
|
|
|
|
|
2019-12-29 06:38:18 -05:00
|
|
|
void HCreateResFile(PortabilityLayer::VirtualDirectory_t dirID, const PLPasStr &name);
|
|
|
|
|
PLError_t ResError();
|
2019-11-11 00:11:59 -05:00
|
|
|
|
2019-12-29 06:38:18 -05:00
|
|
|
short FSpOpenResFile(const VFileSpec &spec, int permission);
|
2019-11-11 00:11:59 -05:00
|
|
|
void CloseResFile(short refNum);
|
|
|
|
|
|
|
|
|
|
void SetResLoad(Boolean load); // Sets whether resources should be loaded when requested
|
|
|
|
|
|
|
|
|
|
long GetMaxResourceSize(Handle res);
|
|
|
|
|
void GetResInfo(Handle res, short *resID, ResType *resType, Str255 resName);
|
|
|
|
|
|
|
|
|
|
// This should return -1 on error?
|
2019-12-29 06:38:18 -05:00
|
|
|
short HOpenResFile(PortabilityLayer::VirtualDirectory_t dirID, const PLPasStr &name, int permissions);
|
2019-11-11 00:11:59 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|