Some of the new routines are carbon-only.
This commit is contained in:
parent
61fec30e1e
commit
3bac5ca11a
|
@ -8,7 +8,7 @@ resPreload = 4
|
|||
resChanged = 2
|
||||
mapReadOnly = 128
|
||||
mapCompact = 64
|
||||
mapChanged = 32
|
||||
mapChanged = 32
|
||||
resSysRefBit = 7
|
||||
resSysHeapBit = 6
|
||||
resPurgeableBit = 5
|
||||
|
@ -18,10 +18,10 @@ resPreloadBit = 2
|
|||
resChangedBit = 1
|
||||
mapReadOnlyBit = 7
|
||||
mapCompactBit = 6
|
||||
mapChangedBit = 5
|
||||
mapChangedBit = 5
|
||||
kResFileNotOpened = -1
|
||||
kSystemResFile = 0
|
||||
kSystemResFile = 0
|
||||
kRsrcChainBelowSystemMap = 0
|
||||
kRsrcChainBelowApplicationMap = 1
|
||||
kRsrcChainAboveApplicationMap = 2
|
||||
kRsrcChainAboveAllMaps = 4
|
||||
kRsrcChainAboveAllMaps = 4
|
||||
|
|
|
@ -1436,6 +1436,8 @@ static PyObject *Res_FSResourceFileAlreadyOpen(PyObject *_self, PyObject *_args)
|
|||
return _res;
|
||||
}
|
||||
|
||||
#if TARGET_API_MAC_CARBON
|
||||
|
||||
static PyObject *Res_FSCreateResourceFile(PyObject *_self, PyObject *_args)
|
||||
{
|
||||
PyObject *_res = NULL;
|
||||
|
@ -1473,6 +1475,9 @@ static PyObject *Res_FSCreateResourceFile(PyObject *_self, PyObject *_args)
|
|||
PyMac_BuildFSSpec, newSpec);
|
||||
return _res;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if TARGET_API_MAC_CARBON
|
||||
|
||||
static PyObject *Res_FSOpenResourceFile(PyObject *_self, PyObject *_args)
|
||||
{
|
||||
|
@ -1503,6 +1508,7 @@ static PyObject *Res_FSOpenResourceFile(PyObject *_self, PyObject *_args)
|
|||
refNum);
|
||||
return _res;
|
||||
}
|
||||
#endif
|
||||
|
||||
static PyObject *Res_Resource(PyObject *_self, PyObject *_args)
|
||||
{
|
||||
|
@ -1671,10 +1677,16 @@ static PyMethodDef Res_methods[] = {
|
|||
"(FSRef parentRef, Buffer nameLength) -> (FSRef newRef, FSSpec newSpec)"},
|
||||
{"FSResourceFileAlreadyOpen", (PyCFunction)Res_FSResourceFileAlreadyOpen, 1,
|
||||
"(FSRef resourceFileRef) -> (Boolean _rv, Boolean inChain, SInt16 refNum)"},
|
||||
|
||||
#if TARGET_API_MAC_CARBON
|
||||
{"FSCreateResourceFile", (PyCFunction)Res_FSCreateResourceFile, 1,
|
||||
"(FSRef parentRef, Buffer nameLength, Buffer forkNameLength) -> (OSErr _rv, FSRef newRef, FSSpec newSpec)"},
|
||||
#endif
|
||||
|
||||
#if TARGET_API_MAC_CARBON
|
||||
{"FSOpenResourceFile", (PyCFunction)Res_FSOpenResourceFile, 1,
|
||||
"(FSRef ref, Buffer forkNameLength, SignedByte permissions) -> (OSErr _rv, SInt16 refNum)"},
|
||||
#endif
|
||||
{"Resource", (PyCFunction)Res_Resource, 1,
|
||||
"Convert a string to a resource object.\n\nThe created resource object is actually just a handle,\napply AddResource() to write it to a resource file.\nSee also the Handle() docstring.\n"},
|
||||
{"Handle", (PyCFunction)Res_Handle, 1,
|
||||
|
|
|
@ -67,6 +67,8 @@ class ResourcesScanner(Scanner):
|
|||
'DetachResourceFile',
|
||||
'InsertResourceFile',
|
||||
'FSpResourceFileAlreadyOpen',
|
||||
'FSOpenResourceFile',
|
||||
'FSCreateResourceFile',
|
||||
])]
|
||||
|
||||
def makerepairinstructions(self):
|
||||
|
|
Loading…
Reference in New Issue