Kaydet (Commit) 1c4e6146 authored tarafından Jack Jansen's avatar Jack Jansen

Re-generated from new (3.1) universal headers

üst 02facaf9
...@@ -469,6 +469,67 @@ static PyObject *CmpObj_OpenComponentResFile(_self, _args) ...@@ -469,6 +469,67 @@ static PyObject *CmpObj_OpenComponentResFile(_self, _args)
return _res; return _res;
} }
static PyObject *CmpObj_GetComponentResource(_self, _args)
ComponentObject *_self;
PyObject *_args;
{
PyObject *_res = NULL;
OSErr _err;
OSType resType;
short resID;
Handle theResource;
if (!PyArg_ParseTuple(_args, "O&h",
PyMac_GetOSType, &resType,
&resID))
return NULL;
_err = GetComponentResource(_self->ob_itself,
resType,
resID,
&theResource);
if (_err != noErr) return PyMac_Error(_err);
_res = Py_BuildValue("O&",
ResObj_New, theResource);
return _res;
}
static PyObject *CmpObj_GetComponentIndString(_self, _args)
ComponentObject *_self;
PyObject *_args;
{
PyObject *_res = NULL;
OSErr _err;
Str255 theString;
short strListID;
short index;
if (!PyArg_ParseTuple(_args, "O&hh",
PyMac_GetStr255, theString,
&strListID,
&index))
return NULL;
_err = GetComponentIndString(_self->ob_itself,
theString,
strListID,
index);
if (_err != noErr) return PyMac_Error(_err);
Py_INCREF(Py_None);
_res = Py_None;
return _res;
}
static PyObject *CmpObj_ResolveComponentAlias(_self, _args)
ComponentObject *_self;
PyObject *_args;
{
PyObject *_res = NULL;
Component _rv;
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = ResolveComponentAlias(_self->ob_itself);
_res = Py_BuildValue("O&",
CmpObj_New, _rv);
return _res;
}
static PyObject *CmpObj_CountComponentInstances(_self, _args) static PyObject *CmpObj_CountComponentInstances(_self, _args)
ComponentObject *_self; ComponentObject *_self;
PyObject *_args; PyObject *_args;
...@@ -563,6 +624,12 @@ static PyMethodDef CmpObj_methods[] = { ...@@ -563,6 +624,12 @@ static PyMethodDef CmpObj_methods[] = {
"(long theRefcon) -> None"}, "(long theRefcon) -> None"},
{"OpenComponentResFile", (PyCFunction)CmpObj_OpenComponentResFile, 1, {"OpenComponentResFile", (PyCFunction)CmpObj_OpenComponentResFile, 1,
"() -> (short _rv)"}, "() -> (short _rv)"},
{"GetComponentResource", (PyCFunction)CmpObj_GetComponentResource, 1,
"(OSType resType, short resID) -> (Handle theResource)"},
{"GetComponentIndString", (PyCFunction)CmpObj_GetComponentIndString, 1,
"(Str255 theString, short strListID, short index) -> None"},
{"ResolveComponentAlias", (PyCFunction)CmpObj_ResolveComponentAlias, 1,
"() -> (Component _rv)"},
{"CountComponentInstances", (PyCFunction)CmpObj_CountComponentInstances, 1, {"CountComponentInstances", (PyCFunction)CmpObj_CountComponentInstances, 1,
"() -> (long _rv)"}, "() -> (long _rv)"},
{"SetDefaultComponent", (PyCFunction)CmpObj_SetDefaultComponent, 1, {"SetDefaultComponent", (PyCFunction)CmpObj_SetDefaultComponent, 1,
......
...@@ -55,6 +55,8 @@ class MyScanner(Scanner): ...@@ -55,6 +55,8 @@ class MyScanner(Scanner):
'GetTabContentRect', 'GetTabContentRect',
'SetTabEnabled', 'SetTabEnabled',
'SetDisclosureTriangleLastValue', 'SetDisclosureTriangleLastValue',
# Unavailable in CW Pro 3 libraries
'SetUpControlTextColor',
] ]
def makeblacklisttypes(self): def makeblacklisttypes(self):
......
...@@ -545,17 +545,17 @@ static PyObject *DlgObj_SizeDialogItem(_self, _args) ...@@ -545,17 +545,17 @@ static PyObject *DlgObj_SizeDialogItem(_self, _args)
PyObject *_res = NULL; PyObject *_res = NULL;
OSErr _err; OSErr _err;
SInt16 inItemNo; SInt16 inItemNo;
SInt16 inHeight;
SInt16 inWidth; SInt16 inWidth;
SInt16 inHeight;
if (!PyArg_ParseTuple(_args, "hhh", if (!PyArg_ParseTuple(_args, "hhh",
&inItemNo, &inItemNo,
&inHeight, &inWidth,
&inWidth)) &inHeight))
return NULL; return NULL;
_err = SizeDialogItem(_self->ob_itself, _err = SizeDialogItem(_self->ob_itself,
inItemNo, inItemNo,
inHeight, inWidth,
inWidth); inHeight);
if (_err != noErr) return PyMac_Error(_err); if (_err != noErr) return PyMac_Error(_err);
Py_INCREF(Py_None); Py_INCREF(Py_None);
_res = Py_None; _res = Py_None;
...@@ -677,7 +677,7 @@ static PyMethodDef DlgObj_methods[] = { ...@@ -677,7 +677,7 @@ static PyMethodDef DlgObj_methods[] = {
{"MoveDialogItem", (PyCFunction)DlgObj_MoveDialogItem, 1, {"MoveDialogItem", (PyCFunction)DlgObj_MoveDialogItem, 1,
"(SInt16 inItemNo, SInt16 inHoriz, SInt16 inVert) -> None"}, "(SInt16 inItemNo, SInt16 inHoriz, SInt16 inVert) -> None"},
{"SizeDialogItem", (PyCFunction)DlgObj_SizeDialogItem, 1, {"SizeDialogItem", (PyCFunction)DlgObj_SizeDialogItem, 1,
"(SInt16 inItemNo, SInt16 inHeight, SInt16 inWidth) -> None"}, "(SInt16 inItemNo, SInt16 inWidth, SInt16 inHeight) -> None"},
{"GetDialogWindow", (PyCFunction)DlgObj_GetDialogWindow, 1, {"GetDialogWindow", (PyCFunction)DlgObj_GetDialogWindow, 1,
"() -> (DialogPtr _rv)"}, "() -> (DialogPtr _rv)"},
{"GetDialogDefaultItem", (PyCFunction)DlgObj_GetDialogDefaultItem, 1, {"GetDialogDefaultItem", (PyCFunction)DlgObj_GetDialogDefaultItem, 1,
......
...@@ -49,11 +49,16 @@ class MyScanner(Scanner): ...@@ -49,11 +49,16 @@ class MyScanner(Scanner):
'CouldDialog', 'CouldDialog',
'FreeDialog', 'FreeDialog',
'GetStdFilterProc', 'GetStdFilterProc',
'GetDialogParent',
# Can't find these in the CW Pro 3 libraries
'SetDialogMovableModal',
'GetDialogControlNotificationProc',
] ]
def makeblacklisttypes(self): def makeblacklisttypes(self):
return [ return [
"AlertStdAlertParamPtr", # Too much work, for now "AlertStdAlertParamPtr", # Too much work, for now
"QTModelessCallbackProcPtr",
] ]
def makerepairinstructions(self): def makerepairinstructions(self):
......
...@@ -102,7 +102,7 @@ static PyObject *MenuObj_DisposeMenu(_self, _args) ...@@ -102,7 +102,7 @@ static PyObject *MenuObj_DisposeMenu(_self, _args)
return _res; return _res;
} }
static PyObject *MenuObj_AppendMenu(_self, _args) static PyObject *MenuObj_MacAppendMenu(_self, _args)
MenuObject *_self; MenuObject *_self;
PyObject *_args; PyObject *_args;
{ {
...@@ -111,8 +111,8 @@ static PyObject *MenuObj_AppendMenu(_self, _args) ...@@ -111,8 +111,8 @@ static PyObject *MenuObj_AppendMenu(_self, _args)
if (!PyArg_ParseTuple(_args, "O&", if (!PyArg_ParseTuple(_args, "O&",
PyMac_GetStr255, data)) PyMac_GetStr255, data))
return NULL; return NULL;
AppendMenu(_self->ob_itself, MacAppendMenu(_self->ob_itself,
data); data);
Py_INCREF(Py_None); Py_INCREF(Py_None);
_res = Py_None; _res = Py_None;
return _res; return _res;
...@@ -137,7 +137,7 @@ static PyObject *MenuObj_InsertResMenu(_self, _args) ...@@ -137,7 +137,7 @@ static PyObject *MenuObj_InsertResMenu(_self, _args)
return _res; return _res;
} }
static PyObject *MenuObj_InsertMenu(_self, _args) static PyObject *MenuObj_MacInsertMenu(_self, _args)
MenuObject *_self; MenuObject *_self;
PyObject *_args; PyObject *_args;
{ {
...@@ -146,8 +146,8 @@ static PyObject *MenuObj_InsertMenu(_self, _args) ...@@ -146,8 +146,8 @@ static PyObject *MenuObj_InsertMenu(_self, _args)
if (!PyArg_ParseTuple(_args, "h", if (!PyArg_ParseTuple(_args, "h",
&beforeID)) &beforeID))
return NULL; return NULL;
InsertMenu(_self->ob_itself, MacInsertMenu(_self->ob_itself,
beforeID); beforeID);
Py_INCREF(Py_None); Py_INCREF(Py_None);
_res = Py_None; _res = Py_None;
return _res; return _res;
...@@ -169,7 +169,7 @@ static PyObject *MenuObj_AppendResMenu(_self, _args) ...@@ -169,7 +169,7 @@ static PyObject *MenuObj_AppendResMenu(_self, _args)
return _res; return _res;
} }
static PyObject *MenuObj_InsertMenuItem(_self, _args) static PyObject *MenuObj_MacInsertMenuItem(_self, _args)
MenuObject *_self; MenuObject *_self;
PyObject *_args; PyObject *_args;
{ {
...@@ -180,9 +180,9 @@ static PyObject *MenuObj_InsertMenuItem(_self, _args) ...@@ -180,9 +180,9 @@ static PyObject *MenuObj_InsertMenuItem(_self, _args)
PyMac_GetStr255, itemString, PyMac_GetStr255, itemString,
&afterItem)) &afterItem))
return NULL; return NULL;
InsertMenuItem(_self->ob_itself, MacInsertMenuItem(_self->ob_itself,
itemString, itemString,
afterItem); afterItem);
Py_INCREF(Py_None); Py_INCREF(Py_None);
_res = Py_None; _res = Py_None;
return _res; return _res;
...@@ -919,15 +919,15 @@ static PyObject *MenuObj_as_Resource(_self, _args) ...@@ -919,15 +919,15 @@ static PyObject *MenuObj_as_Resource(_self, _args)
static PyMethodDef MenuObj_methods[] = { static PyMethodDef MenuObj_methods[] = {
{"DisposeMenu", (PyCFunction)MenuObj_DisposeMenu, 1, {"DisposeMenu", (PyCFunction)MenuObj_DisposeMenu, 1,
"() -> None"}, "() -> None"},
{"AppendMenu", (PyCFunction)MenuObj_AppendMenu, 1, {"MacAppendMenu", (PyCFunction)MenuObj_MacAppendMenu, 1,
"(Str255 data) -> None"}, "(Str255 data) -> None"},
{"InsertResMenu", (PyCFunction)MenuObj_InsertResMenu, 1, {"InsertResMenu", (PyCFunction)MenuObj_InsertResMenu, 1,
"(ResType theType, short afterItem) -> None"}, "(ResType theType, short afterItem) -> None"},
{"InsertMenu", (PyCFunction)MenuObj_InsertMenu, 1, {"MacInsertMenu", (PyCFunction)MenuObj_MacInsertMenu, 1,
"(short beforeID) -> None"}, "(short beforeID) -> None"},
{"AppendResMenu", (PyCFunction)MenuObj_AppendResMenu, 1, {"AppendResMenu", (PyCFunction)MenuObj_AppendResMenu, 1,
"(ResType theType) -> None"}, "(ResType theType) -> None"},
{"InsertMenuItem", (PyCFunction)MenuObj_InsertMenuItem, 1, {"MacInsertMenuItem", (PyCFunction)MenuObj_MacInsertMenuItem, 1,
"(Str255 itemString, short afterItem) -> None"}, "(Str255 itemString, short afterItem) -> None"},
{"DeleteMenuItem", (PyCFunction)MenuObj_DeleteMenuItem, 1, {"DeleteMenuItem", (PyCFunction)MenuObj_DeleteMenuItem, 1,
"(short item) -> None"}, "(short item) -> None"},
...@@ -1081,7 +1081,7 @@ static PyObject *Menu_NewMenu(_self, _args) ...@@ -1081,7 +1081,7 @@ static PyObject *Menu_NewMenu(_self, _args)
return _res; return _res;
} }
static PyObject *Menu_GetMenu(_self, _args) static PyObject *Menu_MacGetMenu(_self, _args)
PyObject *_self; PyObject *_self;
PyObject *_args; PyObject *_args;
{ {
...@@ -1091,13 +1091,13 @@ static PyObject *Menu_GetMenu(_self, _args) ...@@ -1091,13 +1091,13 @@ static PyObject *Menu_GetMenu(_self, _args)
if (!PyArg_ParseTuple(_args, "h", if (!PyArg_ParseTuple(_args, "h",
&resourceID)) &resourceID))
return NULL; return NULL;
_rv = GetMenu(resourceID); _rv = MacGetMenu(resourceID);
_res = Py_BuildValue("O&", _res = Py_BuildValue("O&",
MenuObj_New, _rv); MenuObj_New, _rv);
return _res; return _res;
} }
static PyObject *Menu_DeleteMenu(_self, _args) static PyObject *Menu_MacDeleteMenu(_self, _args)
PyObject *_self; PyObject *_self;
PyObject *_args; PyObject *_args;
{ {
...@@ -1106,7 +1106,7 @@ static PyObject *Menu_DeleteMenu(_self, _args) ...@@ -1106,7 +1106,7 @@ static PyObject *Menu_DeleteMenu(_self, _args)
if (!PyArg_ParseTuple(_args, "h", if (!PyArg_ParseTuple(_args, "h",
&menuID)) &menuID))
return NULL; return NULL;
DeleteMenu(menuID); MacDeleteMenu(menuID);
Py_INCREF(Py_None); Py_INCREF(Py_None);
_res = Py_None; _res = Py_None;
return _res; return _res;
...@@ -1206,14 +1206,14 @@ static PyObject *Menu_DeleteMCEntries(_self, _args) ...@@ -1206,14 +1206,14 @@ static PyObject *Menu_DeleteMCEntries(_self, _args)
return _res; return _res;
} }
static PyObject *Menu_DrawMenuBar(_self, _args) static PyObject *Menu_MacDrawMenuBar(_self, _args)
PyObject *_self; PyObject *_self;
PyObject *_args; PyObject *_args;
{ {
PyObject *_res = NULL; PyObject *_res = NULL;
if (!PyArg_ParseTuple(_args, "")) if (!PyArg_ParseTuple(_args, ""))
return NULL; return NULL;
DrawMenuBar(); MacDrawMenuBar();
Py_INCREF(Py_None); Py_INCREF(Py_None);
_res = Py_None; _res = Py_None;
return _res; return _res;
...@@ -1405,9 +1405,9 @@ static PyMethodDef Menu_methods[] = { ...@@ -1405,9 +1405,9 @@ static PyMethodDef Menu_methods[] = {
"() -> None"}, "() -> None"},
{"NewMenu", (PyCFunction)Menu_NewMenu, 1, {"NewMenu", (PyCFunction)Menu_NewMenu, 1,
"(short menuID, Str255 menuTitle) -> (MenuHandle _rv)"}, "(short menuID, Str255 menuTitle) -> (MenuHandle _rv)"},
{"GetMenu", (PyCFunction)Menu_GetMenu, 1, {"MacGetMenu", (PyCFunction)Menu_MacGetMenu, 1,
"(short resourceID) -> (MenuHandle _rv)"}, "(short resourceID) -> (MenuHandle _rv)"},
{"DeleteMenu", (PyCFunction)Menu_DeleteMenu, 1, {"MacDeleteMenu", (PyCFunction)Menu_MacDeleteMenu, 1,
"(short menuID) -> None"}, "(short menuID) -> None"},
{"MenuKey", (PyCFunction)Menu_MenuKey, 1, {"MenuKey", (PyCFunction)Menu_MenuKey, 1,
"(CharParameter ch) -> (long _rv)"}, "(CharParameter ch) -> (long _rv)"},
...@@ -1421,7 +1421,7 @@ static PyMethodDef Menu_methods[] = { ...@@ -1421,7 +1421,7 @@ static PyMethodDef Menu_methods[] = {
"() -> (long _rv)"}, "() -> (long _rv)"},
{"DeleteMCEntries", (PyCFunction)Menu_DeleteMCEntries, 1, {"DeleteMCEntries", (PyCFunction)Menu_DeleteMCEntries, 1,
"(short menuID, short menuItem) -> None"}, "(short menuID, short menuItem) -> None"},
{"DrawMenuBar", (PyCFunction)Menu_DrawMenuBar, 1, {"MacDrawMenuBar", (PyCFunction)Menu_MacDrawMenuBar, 1,
"() -> None"}, "() -> None"},
{"InvalMenuBar", (PyCFunction)Menu_InvalMenuBar, 1, {"InvalMenuBar", (PyCFunction)Menu_InvalMenuBar, 1,
"() -> None"}, "() -> None"},
......
...@@ -32,6 +32,8 @@ class MyScanner(Scanner): ...@@ -32,6 +32,8 @@ class MyScanner(Scanner):
def makeblacklistnames(self): def makeblacklistnames(self):
return [ return [
"IsShowContextualMenuClick", # Can't find it in the library
"InitContextualMenus", # ditto
] ]
def makeblacklisttypes(self): def makeblacklisttypes(self):
...@@ -39,6 +41,8 @@ class MyScanner(Scanner): ...@@ -39,6 +41,8 @@ class MyScanner(Scanner):
'MCTableHandle', 'MCTableHandle',
'MCEntryPtr', 'MCEntryPtr',
'MCTablePtr', 'MCTablePtr',
'AEDesc_ptr', # For now: doable, but not easy
'ProcessSerialNumber', # ditto
] ]
def makerepairinstructions(self): def makerepairinstructions(self):
......
This diff is collapsed.
...@@ -75,6 +75,18 @@ class MyScanner(Scanner): ...@@ -75,6 +75,18 @@ class MyScanner(Scanner):
'CloseCPort', 'CloseCPort',
'BitMapToRegionGlue', 'BitMapToRegionGlue',
'StdOpcode', # XXXX Missing from library... 'StdOpcode', # XXXX Missing from library...
# The following are for non-macos use:
'LockPortBits',
'UnlockPortBits',
'UpdatePort',
'GetPortNativeWindow',
'GetNativeWindowPort',
'NativeRegionToMacRegion',
'MacRegionToNativeRegion',
'GetPortHWND',
'GetHWNDPort',
'GetPICTFromDIB',
] ]
......
This diff is collapsed.
...@@ -58,33 +58,37 @@ class MyScanner(Scanner): ...@@ -58,33 +58,37 @@ class MyScanner(Scanner):
"AddHiliteSample", "AddHiliteSample",
"HiliteTextSample", "HiliteTextSample",
# Missing in CW11 quicktime library # Missing in CW11 quicktime library
"SpriteMediaGetDisplayedSampleNumber", # "SpriteMediaGetDisplayedSampleNumber",
"SpriteMediaGetIndImageDescription", # "SpriteMediaGetIndImageDescription",
"SpriteMediaCountImages", # "SpriteMediaCountImages",
"SpriteMediaCountSprites", # "SpriteMediaCountSprites",
"SpriteMediaHitTestSprites", # "SpriteMediaHitTestSprites",
"SpriteMediaGetProperty", # "SpriteMediaGetProperty",
"SpriteMediaSetProperty", # "SpriteMediaSetProperty",
"TextMediaSetTextSampleData", # "TextMediaSetTextSampleData",
"TextMediaHiliteTextSample", # "TextMediaHiliteTextSample",
"TextMediaFindNextText", # "TextMediaFindNextText",
"TextMediaAddHiliteSample", # "TextMediaAddHiliteSample",
"TextMediaAddTESample", # "TextMediaAddTESample",
"TextMediaAddTextSample", # "TextMediaAddTextSample",
"VideoMediaGetStatistics", # "VideoMediaGetStatistics",
"VideoMediaResetStatistics", # "VideoMediaResetStatistics",
"EndFullScreen", # "EndFullScreen",
"NewMovieFromDataRef", # "NewMovieFromDataRef",
"MCPtInController", # "MCPtInController",
"MCRemoveAMovie", # "MCRemoveAMovie",
"MCRemoveAllMovies", # "MCRemoveAllMovies",
"MCInvalidate", # "MCInvalidate",
"InvalidateMovieRegion", # "InvalidateMovieRegion",
"GetMovieCompositeBufferFlags", # "GetMovieCompositeBufferFlags",
"SetMovieCompositeBufferFlags", # "SetMovieCompositeBufferFlags",
"SetTrackSoundLocalizationSettings", # "SetTrackSoundLocalizationSettings",
"GetTrackSoundLocalizationSettings", # "GetTrackSoundLocalizationSettings",
"GetMovieNaturalBoundsRect", # "GetMovieNaturalBoundsRect",
"MakeTrackTimeTable", # Uses long * return?
"MakeMediaTimeTable", # ditto
"VideoMediaGetStallCount", # Undefined in CW Pro 3 library
] ]
def makeblacklisttypes(self): def makeblacklisttypes(self):
...@@ -101,6 +105,7 @@ class MyScanner(Scanner): ...@@ -101,6 +105,7 @@ class MyScanner(Scanner):
"MatrixRecord", "MatrixRecord",
"MatrixRecord_ptr", "MatrixRecord_ptr",
"SampleReferencePtr", "SampleReferencePtr",
"QTTweener",
# Routine pointers, not yet. # Routine pointers, not yet.
"MoviesErrorUPP", "MoviesErrorUPP",
......
...@@ -73,8 +73,12 @@ ImageDescriptionHandle = OpaqueByValueType("ImageDescriptionHandle", "ResObj") ...@@ -73,8 +73,12 @@ ImageDescriptionHandle = OpaqueByValueType("ImageDescriptionHandle", "ResObj")
TEHandle = OpaqueByValueType("TEHandle", "ResObj") TEHandle = OpaqueByValueType("TEHandle", "ResObj")
CGrafPtr = OpaqueByValueType("CGrafPtr", "GrafObj") CGrafPtr = OpaqueByValueType("CGrafPtr", "GrafObj")
GDHandle = OpaqueByValueType("GDHandle", "ResObj") GDHandle = OpaqueByValueType("GDHandle", "ResObj")
AliasHandle = OpaqueByValueType("AliasHandle", "ResObj")
SoundDescriptionHandle = OpaqueByValueType("SoundDescriptionHandle", "ResObj")
# Silly Apple, passing an OStype by reference... # Silly Apple, passing an OStype by reference...
OSType_ptr = OpaqueType("OSType", "PyMac_BuildOSType", "PyMac_GetOSType") OSType_ptr = OpaqueType("OSType", "PyMac_BuildOSType", "PyMac_GetOSType")
# And even sillier: passing floats by address
float_ptr = ByAddressType("float", "f")
RGBColor = OpaqueType("RGBColor", "QdRGB") RGBColor = OpaqueType("RGBColor", "QdRGB")
RGBColor_ptr = OpaqueType("RGBColor", "QdRGB") RGBColor_ptr = OpaqueType("RGBColor", "QdRGB")
...@@ -97,7 +101,9 @@ HandlerError = Type("HandlerError", "l") ...@@ -97,7 +101,9 @@ HandlerError = Type("HandlerError", "l")
Ptr = InputOnlyType("Ptr", "s") Ptr = InputOnlyType("Ptr", "s")
StringPtr = Type("StringPtr", "s") StringPtr = Type("StringPtr", "s")
mcactionparams = InputOnlyType("void *", "s") mcactionparams = InputOnlyType("void *", "s")
QTParameterDialog = Type("QTParameterDialog", "l")
QTAtomID = Type("QTAtomID", "l")
MCInterfaceElement = Type("MCInterfaceElement", "l")
# Could-not-be-bothered-types (NewMovieFromFile) # Could-not-be-bothered-types (NewMovieFromFile)
dummyshortptr = FakeType('(short *)0') dummyshortptr = FakeType('(short *)0')
dummyStringPtr = FakeType('(StringPtr)0') dummyStringPtr = FakeType('(StringPtr)0')
......
...@@ -108,14 +108,14 @@ static PyObject *ResObj_HomeResFile(_self, _args) ...@@ -108,14 +108,14 @@ static PyObject *ResObj_HomeResFile(_self, _args)
return _res; return _res;
} }
static PyObject *ResObj_LoadResource(_self, _args) static PyObject *ResObj_MacLoadResource(_self, _args)
ResourceObject *_self; ResourceObject *_self;
PyObject *_args; PyObject *_args;
{ {
PyObject *_res = NULL; PyObject *_res = NULL;
if (!PyArg_ParseTuple(_args, "")) if (!PyArg_ParseTuple(_args, ""))
return NULL; return NULL;
LoadResource(_self->ob_itself); MacLoadResource(_self->ob_itself);
{ {
OSErr _err = ResError(); OSErr _err = ResError();
if (_err != noErr) return PyMac_Error(_err); if (_err != noErr) return PyMac_Error(_err);
...@@ -437,7 +437,7 @@ static PyObject *ResObj_as_Menu(_self, _args) ...@@ -437,7 +437,7 @@ static PyObject *ResObj_as_Menu(_self, _args)
static PyMethodDef ResObj_methods[] = { static PyMethodDef ResObj_methods[] = {
{"HomeResFile", (PyCFunction)ResObj_HomeResFile, 1, {"HomeResFile", (PyCFunction)ResObj_HomeResFile, 1,
"() -> (short _rv)"}, "() -> (short _rv)"},
{"LoadResource", (PyCFunction)ResObj_LoadResource, 1, {"MacLoadResource", (PyCFunction)ResObj_MacLoadResource, 1,
"() -> None"}, "() -> None"},
{"ReleaseResource", (PyCFunction)ResObj_ReleaseResource, 1, {"ReleaseResource", (PyCFunction)ResObj_ReleaseResource, 1,
"() -> None"}, "() -> None"},
......
...@@ -102,6 +102,19 @@ static void WinObj_dealloc(self) ...@@ -102,6 +102,19 @@ static void WinObj_dealloc(self)
PyMem_DEL(self); PyMem_DEL(self);
} }
static PyObject *WinObj_MacCloseWindow(_self, _args)
WindowObject *_self;
PyObject *_args;
{
PyObject *_res = NULL;
if (!PyArg_ParseTuple(_args, ""))
return NULL;
MacCloseWindow(_self->ob_itself);
Py_INCREF(Py_None);
_res = Py_None;
return _res;
}
static PyObject *WinObj_SetWinColor(_self, _args) static PyObject *WinObj_SetWinColor(_self, _args)
WindowObject *_self; WindowObject *_self;
PyObject *_args; PyObject *_args;
...@@ -263,6 +276,22 @@ static PyObject *WinObj_SelectWindow(_self, _args) ...@@ -263,6 +276,22 @@ static PyObject *WinObj_SelectWindow(_self, _args)
return _res; return _res;
} }
static PyObject *WinObj_HiliteWindow(_self, _args)
WindowObject *_self;
PyObject *_args;
{
PyObject *_res = NULL;
Boolean fHilite;
if (!PyArg_ParseTuple(_args, "b",
&fHilite))
return NULL;
HiliteWindow(_self->ob_itself,
fHilite);
Py_INCREF(Py_None);
_res = Py_None;
return _res;
}
static PyObject *WinObj_GetWindowFeatures(_self, _args) static PyObject *WinObj_GetWindowFeatures(_self, _args)
WindowObject *_self; WindowObject *_self;
PyObject *_args; PyObject *_args;
...@@ -413,22 +442,6 @@ static PyObject *WinObj_DrawGrowIcon(_self, _args) ...@@ -413,22 +442,6 @@ static PyObject *WinObj_DrawGrowIcon(_self, _args)
return _res; return _res;
} }
static PyObject *WinObj_HiliteWindow(_self, _args)
WindowObject *_self;
PyObject *_args;
{
PyObject *_res = NULL;
Boolean fHilite;
if (!PyArg_ParseTuple(_args, "b",
&fHilite))
return NULL;
HiliteWindow(_self->ob_itself,
fHilite);
Py_INCREF(Py_None);
_res = Py_None;
return _res;
}
static PyObject *WinObj_SetWTitle(_self, _args) static PyObject *WinObj_SetWTitle(_self, _args)
WindowObject *_self; WindowObject *_self;
PyObject *_args; PyObject *_args;
...@@ -505,7 +518,7 @@ static PyObject *WinObj_CollapseWindow(_self, _args) ...@@ -505,7 +518,7 @@ static PyObject *WinObj_CollapseWindow(_self, _args)
return _res; return _res;
} }
static PyObject *WinObj_MoveWindow(_self, _args) static PyObject *WinObj_MacMoveWindow(_self, _args)
WindowObject *_self; WindowObject *_self;
PyObject *_args; PyObject *_args;
{ {
...@@ -518,10 +531,10 @@ static PyObject *WinObj_MoveWindow(_self, _args) ...@@ -518,10 +531,10 @@ static PyObject *WinObj_MoveWindow(_self, _args)
&vGlobal, &vGlobal,
&front)) &front))
return NULL; return NULL;
MoveWindow(_self->ob_itself, MacMoveWindow(_self->ob_itself,
hGlobal, hGlobal,
vGlobal, vGlobal,
front); front);
Py_INCREF(Py_None); Py_INCREF(Py_None);
_res = Py_None; _res = Py_None;
return _res; return _res;
...@@ -620,14 +633,14 @@ static PyObject *WinObj_HideWindow(_self, _args) ...@@ -620,14 +633,14 @@ static PyObject *WinObj_HideWindow(_self, _args)
return _res; return _res;
} }
static PyObject *WinObj_ShowWindow(_self, _args) static PyObject *WinObj_MacShowWindow(_self, _args)
WindowObject *_self; WindowObject *_self;
PyObject *_args; PyObject *_args;
{ {
PyObject *_res = NULL; PyObject *_res = NULL;
if (!PyArg_ParseTuple(_args, "")) if (!PyArg_ParseTuple(_args, ""))
return NULL; return NULL;
ShowWindow(_self->ob_itself); MacShowWindow(_self->ob_itself);
Py_INCREF(Py_None); Py_INCREF(Py_None);
_res = Py_None; _res = Py_None;
return _res; return _res;
...@@ -955,6 +968,8 @@ static PyObject *WinObj_SetWindowUserState(_self, _args) ...@@ -955,6 +968,8 @@ static PyObject *WinObj_SetWindowUserState(_self, _args)
} }
static PyMethodDef WinObj_methods[] = { static PyMethodDef WinObj_methods[] = {
{"MacCloseWindow", (PyCFunction)WinObj_MacCloseWindow, 1,
"() -> None"},
{"SetWinColor", (PyCFunction)WinObj_SetWinColor, 1, {"SetWinColor", (PyCFunction)WinObj_SetWinColor, 1,
"(WCTabHandle newColorTable) -> None"}, "(WCTabHandle newColorTable) -> None"},
{"ClipAbove", (PyCFunction)WinObj_ClipAbove, 1, {"ClipAbove", (PyCFunction)WinObj_ClipAbove, 1,
...@@ -977,6 +992,8 @@ static PyMethodDef WinObj_methods[] = { ...@@ -977,6 +992,8 @@ static PyMethodDef WinObj_methods[] = {
"(WindowPtr behindWindow) -> None"}, "(WindowPtr behindWindow) -> None"},
{"SelectWindow", (PyCFunction)WinObj_SelectWindow, 1, {"SelectWindow", (PyCFunction)WinObj_SelectWindow, 1,
"() -> None"}, "() -> None"},
{"HiliteWindow", (PyCFunction)WinObj_HiliteWindow, 1,
"(Boolean fHilite) -> None"},
{"GetWindowFeatures", (PyCFunction)WinObj_GetWindowFeatures, 1, {"GetWindowFeatures", (PyCFunction)WinObj_GetWindowFeatures, 1,
"() -> (OSStatus _rv, UInt32 outFeatures)"}, "() -> (OSStatus _rv, UInt32 outFeatures)"},
{"GetWindowRegion", (PyCFunction)WinObj_GetWindowRegion, 1, {"GetWindowRegion", (PyCFunction)WinObj_GetWindowRegion, 1,
...@@ -997,8 +1014,6 @@ static PyMethodDef WinObj_methods[] = { ...@@ -997,8 +1014,6 @@ static PyMethodDef WinObj_methods[] = {
"() -> None"}, "() -> None"},
{"DrawGrowIcon", (PyCFunction)WinObj_DrawGrowIcon, 1, {"DrawGrowIcon", (PyCFunction)WinObj_DrawGrowIcon, 1,
"() -> None"}, "() -> None"},
{"HiliteWindow", (PyCFunction)WinObj_HiliteWindow, 1,
"(Boolean fHilite) -> None"},
{"SetWTitle", (PyCFunction)WinObj_SetWTitle, 1, {"SetWTitle", (PyCFunction)WinObj_SetWTitle, 1,
"(Str255 title) -> None"}, "(Str255 title) -> None"},
{"GetWTitle", (PyCFunction)WinObj_GetWTitle, 1, {"GetWTitle", (PyCFunction)WinObj_GetWTitle, 1,
...@@ -1009,7 +1024,7 @@ static PyMethodDef WinObj_methods[] = { ...@@ -1009,7 +1024,7 @@ static PyMethodDef WinObj_methods[] = {
"() -> (Boolean _rv)"}, "() -> (Boolean _rv)"},
{"CollapseWindow", (PyCFunction)WinObj_CollapseWindow, 1, {"CollapseWindow", (PyCFunction)WinObj_CollapseWindow, 1,
"(Boolean inCollapseIt) -> (OSStatus _rv)"}, "(Boolean inCollapseIt) -> (OSStatus _rv)"},
{"MoveWindow", (PyCFunction)WinObj_MoveWindow, 1, {"MacMoveWindow", (PyCFunction)WinObj_MacMoveWindow, 1,
"(short hGlobal, short vGlobal, Boolean front) -> None"}, "(short hGlobal, short vGlobal, Boolean front) -> None"},
{"SizeWindow", (PyCFunction)WinObj_SizeWindow, 1, {"SizeWindow", (PyCFunction)WinObj_SizeWindow, 1,
"(short w, short h, Boolean fUpdate) -> None"}, "(short w, short h, Boolean fUpdate) -> None"},
...@@ -1021,7 +1036,7 @@ static PyMethodDef WinObj_methods[] = { ...@@ -1021,7 +1036,7 @@ static PyMethodDef WinObj_methods[] = {
"(Point startPt, Rect boundsRect) -> None"}, "(Point startPt, Rect boundsRect) -> None"},
{"HideWindow", (PyCFunction)WinObj_HideWindow, 1, {"HideWindow", (PyCFunction)WinObj_HideWindow, 1,
"() -> None"}, "() -> None"},
{"ShowWindow", (PyCFunction)WinObj_ShowWindow, 1, {"MacShowWindow", (PyCFunction)WinObj_MacShowWindow, 1,
"() -> None"}, "() -> None"},
{"ShowHide", (PyCFunction)WinObj_ShowHide, 1, {"ShowHide", (PyCFunction)WinObj_ShowHide, 1,
"(Boolean showFlag) -> None"}, "(Boolean showFlag) -> None"},
...@@ -1236,7 +1251,7 @@ static PyObject *Win_CheckUpdate(_self, _args) ...@@ -1236,7 +1251,7 @@ static PyObject *Win_CheckUpdate(_self, _args)
return _res; return _res;
} }
static PyObject *Win_FindWindow(_self, _args) static PyObject *Win_MacFindWindow(_self, _args)
PyObject *_self; PyObject *_self;
PyObject *_args; PyObject *_args;
{ {
...@@ -1247,8 +1262,8 @@ static PyObject *Win_FindWindow(_self, _args) ...@@ -1247,8 +1262,8 @@ static PyObject *Win_FindWindow(_self, _args)
if (!PyArg_ParseTuple(_args, "O&", if (!PyArg_ParseTuple(_args, "O&",
PyMac_GetPoint, &thePoint)) PyMac_GetPoint, &thePoint))
return NULL; return NULL;
_rv = FindWindow(thePoint, _rv = MacFindWindow(thePoint,
&theWindow); &theWindow);
_res = Py_BuildValue("hO&", _res = Py_BuildValue("hO&",
_rv, _rv,
WinObj_WhichWindow, theWindow); WinObj_WhichWindow, theWindow);
...@@ -1446,7 +1461,7 @@ static PyMethodDef Win_methods[] = { ...@@ -1446,7 +1461,7 @@ static PyMethodDef Win_methods[] = {
"(PixPatHandle deskPixPat) -> None"}, "(PixPatHandle deskPixPat) -> None"},
{"CheckUpdate", (PyCFunction)Win_CheckUpdate, 1, {"CheckUpdate", (PyCFunction)Win_CheckUpdate, 1,
"() -> (Boolean _rv, EventRecord theEvent)"}, "() -> (Boolean _rv, EventRecord theEvent)"},
{"FindWindow", (PyCFunction)Win_FindWindow, 1, {"MacFindWindow", (PyCFunction)Win_MacFindWindow, 1,
"(Point thePoint) -> (short _rv, WindowPtr theWindow)"}, "(Point thePoint) -> (short _rv, WindowPtr theWindow)"},
{"FrontWindow", (PyCFunction)Win_FrontWindow, 1, {"FrontWindow", (PyCFunction)Win_FrontWindow, 1,
"() -> (WindowPtr _rv)"}, "() -> (WindowPtr _rv)"},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment