Commit 6367c2b4 authored by Jack Jansen's avatar Jack Jansen

Re-generated from new (3.1) universal headers

parent 69fb9f1e
...@@ -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,7 +111,7 @@ static PyObject *MenuObj_AppendMenu(_self, _args) ...@@ -111,7 +111,7 @@ 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;
...@@ -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,7 +146,7 @@ static PyObject *MenuObj_InsertMenu(_self, _args) ...@@ -146,7 +146,7 @@ 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;
...@@ -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,7 +180,7 @@ static PyObject *MenuObj_InsertMenuItem(_self, _args) ...@@ -180,7 +180,7 @@ 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);
...@@ -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):
......
...@@ -403,7 +403,7 @@ staticforward PyTypeObject QDGlobalsAccess_Type = { ...@@ -403,7 +403,7 @@ staticforward PyTypeObject QDGlobalsAccess_Type = {
/* ---------------- End object type QDGlobalsAccess ----------------- */ /* ---------------- End object type QDGlobalsAccess ----------------- */
static PyObject *Qd_SetPort(_self, _args) static PyObject *Qd_MacSetPort(_self, _args)
PyObject *_self; PyObject *_self;
PyObject *_args; PyObject *_args;
{ {
...@@ -412,7 +412,7 @@ static PyObject *Qd_SetPort(_self, _args) ...@@ -412,7 +412,7 @@ static PyObject *Qd_SetPort(_self, _args)
if (!PyArg_ParseTuple(_args, "O&", if (!PyArg_ParseTuple(_args, "O&",
GrafObj_Convert, &port)) GrafObj_Convert, &port))
return NULL; return NULL;
SetPort(port); MacSetPort(port);
Py_INCREF(Py_None); Py_INCREF(Py_None);
_res = Py_None; _res = Py_None;
return _res; return _res;
...@@ -596,7 +596,7 @@ static PyObject *Qd_InitCursor(_self, _args) ...@@ -596,7 +596,7 @@ static PyObject *Qd_InitCursor(_self, _args)
return _res; return _res;
} }
static PyObject *Qd_SetCursor(_self, _args) static PyObject *Qd_MacSetCursor(_self, _args)
PyObject *_self; PyObject *_self;
PyObject *_args; PyObject *_args;
{ {
...@@ -611,7 +611,7 @@ static PyObject *Qd_SetCursor(_self, _args) ...@@ -611,7 +611,7 @@ static PyObject *Qd_SetCursor(_self, _args)
PyErr_SetString(PyExc_TypeError, "buffer length should be sizeof(Cursor)"); PyErr_SetString(PyExc_TypeError, "buffer length should be sizeof(Cursor)");
goto crsr__error__; goto crsr__error__;
} }
SetCursor(crsr__in__); MacSetCursor(crsr__in__);
Py_INCREF(Py_None); Py_INCREF(Py_None);
_res = Py_None; _res = Py_None;
crsr__error__: ; crsr__error__: ;
...@@ -631,14 +631,14 @@ static PyObject *Qd_HideCursor(_self, _args) ...@@ -631,14 +631,14 @@ static PyObject *Qd_HideCursor(_self, _args)
return _res; return _res;
} }
static PyObject *Qd_ShowCursor(_self, _args) static PyObject *Qd_MacShowCursor(_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;
ShowCursor(); MacShowCursor();
Py_INCREF(Py_None); Py_INCREF(Py_None);
_res = Py_None; _res = Py_None;
return _res; return _res;
...@@ -838,7 +838,7 @@ static PyObject *Qd_Move(_self, _args) ...@@ -838,7 +838,7 @@ static PyObject *Qd_Move(_self, _args)
return _res; return _res;
} }
static PyObject *Qd_LineTo(_self, _args) static PyObject *Qd_MacLineTo(_self, _args)
PyObject *_self; PyObject *_self;
PyObject *_args; PyObject *_args;
{ {
...@@ -849,7 +849,7 @@ static PyObject *Qd_LineTo(_self, _args) ...@@ -849,7 +849,7 @@ static PyObject *Qd_LineTo(_self, _args)
&h, &h,
&v)) &v))
return NULL; return NULL;
LineTo(h, MacLineTo(h,
v); v);
Py_INCREF(Py_None); Py_INCREF(Py_None);
_res = Py_None; _res = Py_None;
...@@ -919,7 +919,7 @@ static PyObject *Qd_ColorBit(_self, _args) ...@@ -919,7 +919,7 @@ static PyObject *Qd_ColorBit(_self, _args)
return _res; return _res;
} }
static PyObject *Qd_SetRect(_self, _args) static PyObject *Qd_MacSetRect(_self, _args)
PyObject *_self; PyObject *_self;
PyObject *_args; PyObject *_args;
{ {
...@@ -935,7 +935,7 @@ static PyObject *Qd_SetRect(_self, _args) ...@@ -935,7 +935,7 @@ static PyObject *Qd_SetRect(_self, _args)
&right, &right,
&bottom)) &bottom))
return NULL; return NULL;
SetRect(&r, MacSetRect(&r,
left, left,
top, top,
right, right,
...@@ -945,7 +945,7 @@ static PyObject *Qd_SetRect(_self, _args) ...@@ -945,7 +945,7 @@ static PyObject *Qd_SetRect(_self, _args)
return _res; return _res;
} }
static PyObject *Qd_OffsetRect(_self, _args) static PyObject *Qd_MacOffsetRect(_self, _args)
PyObject *_self; PyObject *_self;
PyObject *_args; PyObject *_args;
{ {
...@@ -958,7 +958,7 @@ static PyObject *Qd_OffsetRect(_self, _args) ...@@ -958,7 +958,7 @@ static PyObject *Qd_OffsetRect(_self, _args)
&dh, &dh,
&dv)) &dv))
return NULL; return NULL;
OffsetRect(&r, MacOffsetRect(&r,
dh, dh,
dv); dv);
_res = Py_BuildValue("O&", _res = Py_BuildValue("O&",
...@@ -966,7 +966,7 @@ static PyObject *Qd_OffsetRect(_self, _args) ...@@ -966,7 +966,7 @@ static PyObject *Qd_OffsetRect(_self, _args)
return _res; return _res;
} }
static PyObject *Qd_InsetRect(_self, _args) static PyObject *Qd_MacInsetRect(_self, _args)
PyObject *_self; PyObject *_self;
PyObject *_args; PyObject *_args;
{ {
...@@ -979,7 +979,7 @@ static PyObject *Qd_InsetRect(_self, _args) ...@@ -979,7 +979,7 @@ static PyObject *Qd_InsetRect(_self, _args)
&dh, &dh,
&dv)) &dv))
return NULL; return NULL;
InsetRect(&r, MacInsetRect(&r,
dh, dh,
dv); dv);
_res = Py_BuildValue("O&", _res = Py_BuildValue("O&",
...@@ -1009,7 +1009,7 @@ static PyObject *Qd_SectRect(_self, _args) ...@@ -1009,7 +1009,7 @@ static PyObject *Qd_SectRect(_self, _args)
return _res; return _res;
} }
static PyObject *Qd_UnionRect(_self, _args) static PyObject *Qd_MacUnionRect(_self, _args)
PyObject *_self; PyObject *_self;
PyObject *_args; PyObject *_args;
{ {
...@@ -1021,7 +1021,7 @@ static PyObject *Qd_UnionRect(_self, _args) ...@@ -1021,7 +1021,7 @@ static PyObject *Qd_UnionRect(_self, _args)
PyMac_GetRect, &src1, PyMac_GetRect, &src1,
PyMac_GetRect, &src2)) PyMac_GetRect, &src2))
return NULL; return NULL;
UnionRect(&src1, MacUnionRect(&src1,
&src2, &src2,
&dstRect); &dstRect);
_res = Py_BuildValue("O&", _res = Py_BuildValue("O&",
...@@ -1029,7 +1029,7 @@ static PyObject *Qd_UnionRect(_self, _args) ...@@ -1029,7 +1029,7 @@ static PyObject *Qd_UnionRect(_self, _args)
return _res; return _res;
} }
static PyObject *Qd_EqualRect(_self, _args) static PyObject *Qd_MacEqualRect(_self, _args)
PyObject *_self; PyObject *_self;
PyObject *_args; PyObject *_args;
{ {
...@@ -1041,7 +1041,7 @@ static PyObject *Qd_EqualRect(_self, _args) ...@@ -1041,7 +1041,7 @@ static PyObject *Qd_EqualRect(_self, _args)
PyMac_GetRect, &rect1, PyMac_GetRect, &rect1,
PyMac_GetRect, &rect2)) PyMac_GetRect, &rect2))
return NULL; return NULL;
_rv = EqualRect(&rect1, _rv = MacEqualRect(&rect1,
&rect2); &rect2);
_res = Py_BuildValue("b", _res = Py_BuildValue("b",
_rv); _rv);
...@@ -1064,7 +1064,7 @@ static PyObject *Qd_EmptyRect(_self, _args) ...@@ -1064,7 +1064,7 @@ static PyObject *Qd_EmptyRect(_self, _args)
return _res; return _res;
} }
static PyObject *Qd_FrameRect(_self, _args) static PyObject *Qd_MacFrameRect(_self, _args)
PyObject *_self; PyObject *_self;
PyObject *_args; PyObject *_args;
{ {
...@@ -1073,7 +1073,7 @@ static PyObject *Qd_FrameRect(_self, _args) ...@@ -1073,7 +1073,7 @@ static PyObject *Qd_FrameRect(_self, _args)
if (!PyArg_ParseTuple(_args, "O&", if (!PyArg_ParseTuple(_args, "O&",
PyMac_GetRect, &r)) PyMac_GetRect, &r))
return NULL; return NULL;
FrameRect(&r); MacFrameRect(&r);
Py_INCREF(Py_None); Py_INCREF(Py_None);
_res = Py_None; _res = Py_None;
return _res; return _res;
...@@ -1109,7 +1109,7 @@ static PyObject *Qd_EraseRect(_self, _args) ...@@ -1109,7 +1109,7 @@ static PyObject *Qd_EraseRect(_self, _args)
return _res; return _res;
} }
static PyObject *Qd_InvertRect(_self, _args) static PyObject *Qd_MacInvertRect(_self, _args)
PyObject *_self; PyObject *_self;
PyObject *_args; PyObject *_args;
{ {
...@@ -1118,13 +1118,13 @@ static PyObject *Qd_InvertRect(_self, _args) ...@@ -1118,13 +1118,13 @@ static PyObject *Qd_InvertRect(_self, _args)
if (!PyArg_ParseTuple(_args, "O&", if (!PyArg_ParseTuple(_args, "O&",
PyMac_GetRect, &r)) PyMac_GetRect, &r))
return NULL; return NULL;
InvertRect(&r); MacInvertRect(&r);
Py_INCREF(Py_None); Py_INCREF(Py_None);
_res = Py_None; _res = Py_None;
return _res; return _res;
} }
static PyObject *Qd_FillRect(_self, _args) static PyObject *Qd_MacFillRect(_self, _args)
PyObject *_self; PyObject *_self;
PyObject *_args; PyObject *_args;
{ {
...@@ -1141,7 +1141,7 @@ static PyObject *Qd_FillRect(_self, _args) ...@@ -1141,7 +1141,7 @@ static PyObject *Qd_FillRect(_self, _args)
PyErr_SetString(PyExc_TypeError, "buffer length should be sizeof(Pattern)"); PyErr_SetString(PyExc_TypeError, "buffer length should be sizeof(Pattern)");
goto pat__error__; goto pat__error__;
} }
FillRect(&r, MacFillRect(&r,
pat__in__); pat__in__);
Py_INCREF(Py_None); Py_INCREF(Py_None);
_res = Py_None; _res = Py_None;
...@@ -1541,7 +1541,7 @@ static PyObject *Qd_DisposeRgn(_self, _args) ...@@ -1541,7 +1541,7 @@ static PyObject *Qd_DisposeRgn(_self, _args)
return _res; return _res;
} }
static PyObject *Qd_CopyRgn(_self, _args) static PyObject *Qd_MacCopyRgn(_self, _args)
PyObject *_self; PyObject *_self;
PyObject *_args; PyObject *_args;
{ {
...@@ -1552,7 +1552,7 @@ static PyObject *Qd_CopyRgn(_self, _args) ...@@ -1552,7 +1552,7 @@ static PyObject *Qd_CopyRgn(_self, _args)
ResObj_Convert, &srcRgn, ResObj_Convert, &srcRgn,
ResObj_Convert, &dstRgn)) ResObj_Convert, &dstRgn))
return NULL; return NULL;
CopyRgn(srcRgn, MacCopyRgn(srcRgn,
dstRgn); dstRgn);
Py_INCREF(Py_None); Py_INCREF(Py_None);
_res = Py_None; _res = Py_None;
...@@ -1574,7 +1574,7 @@ static PyObject *Qd_SetEmptyRgn(_self, _args) ...@@ -1574,7 +1574,7 @@ static PyObject *Qd_SetEmptyRgn(_self, _args)
return _res; return _res;
} }
static PyObject *Qd_SetRectRgn(_self, _args) static PyObject *Qd_MacSetRectRgn(_self, _args)
PyObject *_self; PyObject *_self;
PyObject *_args; PyObject *_args;
{ {
...@@ -1591,7 +1591,7 @@ static PyObject *Qd_SetRectRgn(_self, _args) ...@@ -1591,7 +1591,7 @@ static PyObject *Qd_SetRectRgn(_self, _args)
&right, &right,
&bottom)) &bottom))
return NULL; return NULL;
SetRectRgn(rgn, MacSetRectRgn(rgn,
left, left,
top, top,
right, right,
...@@ -1619,7 +1619,7 @@ static PyObject *Qd_RectRgn(_self, _args) ...@@ -1619,7 +1619,7 @@ static PyObject *Qd_RectRgn(_self, _args)
return _res; return _res;
} }
static PyObject *Qd_OffsetRgn(_self, _args) static PyObject *Qd_MacOffsetRgn(_self, _args)
PyObject *_self; PyObject *_self;
PyObject *_args; PyObject *_args;
{ {
...@@ -1632,7 +1632,7 @@ static PyObject *Qd_OffsetRgn(_self, _args) ...@@ -1632,7 +1632,7 @@ static PyObject *Qd_OffsetRgn(_self, _args)
&dh, &dh,
&dv)) &dv))
return NULL; return NULL;
OffsetRgn(rgn, MacOffsetRgn(rgn,
dh, dh,
dv); dv);
Py_INCREF(Py_None); Py_INCREF(Py_None);
...@@ -1682,7 +1682,7 @@ static PyObject *Qd_SectRgn(_self, _args) ...@@ -1682,7 +1682,7 @@ static PyObject *Qd_SectRgn(_self, _args)
return _res; return _res;
} }
static PyObject *Qd_UnionRgn(_self, _args) static PyObject *Qd_MacUnionRgn(_self, _args)
PyObject *_self; PyObject *_self;
PyObject *_args; PyObject *_args;
{ {
...@@ -1695,7 +1695,7 @@ static PyObject *Qd_UnionRgn(_self, _args) ...@@ -1695,7 +1695,7 @@ static PyObject *Qd_UnionRgn(_self, _args)
ResObj_Convert, &srcRgnB, ResObj_Convert, &srcRgnB,
ResObj_Convert, &dstRgn)) ResObj_Convert, &dstRgn))
return NULL; return NULL;
UnionRgn(srcRgnA, MacUnionRgn(srcRgnA,
srcRgnB, srcRgnB,
dstRgn); dstRgn);
Py_INCREF(Py_None); Py_INCREF(Py_None);
...@@ -1724,7 +1724,7 @@ static PyObject *Qd_DiffRgn(_self, _args) ...@@ -1724,7 +1724,7 @@ static PyObject *Qd_DiffRgn(_self, _args)
return _res; return _res;
} }
static PyObject *Qd_XorRgn(_self, _args) static PyObject *Qd_MacXorRgn(_self, _args)
PyObject *_self; PyObject *_self;
PyObject *_args; PyObject *_args;
{ {
...@@ -1737,7 +1737,7 @@ static PyObject *Qd_XorRgn(_self, _args) ...@@ -1737,7 +1737,7 @@ static PyObject *Qd_XorRgn(_self, _args)
ResObj_Convert, &srcRgnB, ResObj_Convert, &srcRgnB,
ResObj_Convert, &dstRgn)) ResObj_Convert, &dstRgn))
return NULL; return NULL;
XorRgn(srcRgnA, MacXorRgn(srcRgnA,
srcRgnB, srcRgnB,
dstRgn); dstRgn);
Py_INCREF(Py_None); Py_INCREF(Py_None);
...@@ -1764,7 +1764,7 @@ static PyObject *Qd_RectInRgn(_self, _args) ...@@ -1764,7 +1764,7 @@ static PyObject *Qd_RectInRgn(_self, _args)
return _res; return _res;
} }
static PyObject *Qd_EqualRgn(_self, _args) static PyObject *Qd_MacEqualRgn(_self, _args)
PyObject *_self; PyObject *_self;
PyObject *_args; PyObject *_args;
{ {
...@@ -1776,7 +1776,7 @@ static PyObject *Qd_EqualRgn(_self, _args) ...@@ -1776,7 +1776,7 @@ static PyObject *Qd_EqualRgn(_self, _args)
ResObj_Convert, &rgnA, ResObj_Convert, &rgnA,
ResObj_Convert, &rgnB)) ResObj_Convert, &rgnB))
return NULL; return NULL;
_rv = EqualRgn(rgnA, _rv = MacEqualRgn(rgnA,
rgnB); rgnB);
_res = Py_BuildValue("b", _res = Py_BuildValue("b",
_rv); _rv);
...@@ -1799,7 +1799,7 @@ static PyObject *Qd_EmptyRgn(_self, _args) ...@@ -1799,7 +1799,7 @@ static PyObject *Qd_EmptyRgn(_self, _args)
return _res; return _res;
} }
static PyObject *Qd_FrameRgn(_self, _args) static PyObject *Qd_MacFrameRgn(_self, _args)
PyObject *_self; PyObject *_self;
PyObject *_args; PyObject *_args;
{ {
...@@ -1808,13 +1808,13 @@ static PyObject *Qd_FrameRgn(_self, _args) ...@@ -1808,13 +1808,13 @@ static PyObject *Qd_FrameRgn(_self, _args)
if (!PyArg_ParseTuple(_args, "O&", if (!PyArg_ParseTuple(_args, "O&",
ResObj_Convert, &rgn)) ResObj_Convert, &rgn))
return NULL; return NULL;
FrameRgn(rgn); MacFrameRgn(rgn);
Py_INCREF(Py_None); Py_INCREF(Py_None);
_res = Py_None; _res = Py_None;
return _res; return _res;
} }
static PyObject *Qd_PaintRgn(_self, _args) static PyObject *Qd_MacPaintRgn(_self, _args)
PyObject *_self; PyObject *_self;
PyObject *_args; PyObject *_args;
{ {
...@@ -1823,7 +1823,7 @@ static PyObject *Qd_PaintRgn(_self, _args) ...@@ -1823,7 +1823,7 @@ static PyObject *Qd_PaintRgn(_self, _args)
if (!PyArg_ParseTuple(_args, "O&", if (!PyArg_ParseTuple(_args, "O&",
ResObj_Convert, &rgn)) ResObj_Convert, &rgn))
return NULL; return NULL;
PaintRgn(rgn); MacPaintRgn(rgn);
Py_INCREF(Py_None); Py_INCREF(Py_None);
_res = Py_None; _res = Py_None;
return _res; return _res;
...@@ -1844,7 +1844,7 @@ static PyObject *Qd_EraseRgn(_self, _args) ...@@ -1844,7 +1844,7 @@ static PyObject *Qd_EraseRgn(_self, _args)
return _res; return _res;
} }
static PyObject *Qd_InvertRgn(_self, _args) static PyObject *Qd_MacInvertRgn(_self, _args)
PyObject *_self; PyObject *_self;
PyObject *_args; PyObject *_args;
{ {
...@@ -1853,13 +1853,13 @@ static PyObject *Qd_InvertRgn(_self, _args) ...@@ -1853,13 +1853,13 @@ static PyObject *Qd_InvertRgn(_self, _args)
if (!PyArg_ParseTuple(_args, "O&", if (!PyArg_ParseTuple(_args, "O&",
ResObj_Convert, &rgn)) ResObj_Convert, &rgn))
return NULL; return NULL;
InvertRgn(rgn); MacInvertRgn(rgn);
Py_INCREF(Py_None); Py_INCREF(Py_None);
_res = Py_None; _res = Py_None;
return _res; return _res;
} }
static PyObject *Qd_FillRgn(_self, _args) static PyObject *Qd_MacFillRgn(_self, _args)
PyObject *_self; PyObject *_self;
PyObject *_args; PyObject *_args;
{ {
...@@ -1876,7 +1876,7 @@ static PyObject *Qd_FillRgn(_self, _args) ...@@ -1876,7 +1876,7 @@ static PyObject *Qd_FillRgn(_self, _args)
PyErr_SetString(PyExc_TypeError, "buffer length should be sizeof(Pattern)"); PyErr_SetString(PyExc_TypeError, "buffer length should be sizeof(Pattern)");
goto pat__error__; goto pat__error__;
} }
FillRgn(rgn, MacFillRgn(rgn,
pat__in__); pat__in__);
Py_INCREF(Py_None); Py_INCREF(Py_None);
_res = Py_None; _res = Py_None;
...@@ -2263,7 +2263,7 @@ static PyObject *Qd_Random(_self, _args) ...@@ -2263,7 +2263,7 @@ static PyObject *Qd_Random(_self, _args)
return _res; return _res;
} }
static PyObject *Qd_GetPixel(_self, _args) static PyObject *Qd_MacGetPixel(_self, _args)
PyObject *_self; PyObject *_self;
PyObject *_args; PyObject *_args;
{ {
...@@ -2275,7 +2275,7 @@ static PyObject *Qd_GetPixel(_self, _args) ...@@ -2275,7 +2275,7 @@ static PyObject *Qd_GetPixel(_self, _args)
&h, &h,
&v)) &v))
return NULL; return NULL;
_rv = GetPixel(h, _rv = MacGetPixel(h,
v); v);
_res = Py_BuildValue("b", _res = Py_BuildValue("b",
_rv); _rv);
...@@ -2451,7 +2451,7 @@ static PyObject *Qd_EqualPt(_self, _args) ...@@ -2451,7 +2451,7 @@ static PyObject *Qd_EqualPt(_self, _args)
return _res; return _res;
} }
static PyObject *Qd_PtInRect(_self, _args) static PyObject *Qd_MacPtInRect(_self, _args)
PyObject *_self; PyObject *_self;
PyObject *_args; PyObject *_args;
{ {
...@@ -2463,7 +2463,7 @@ static PyObject *Qd_PtInRect(_self, _args) ...@@ -2463,7 +2463,7 @@ static PyObject *Qd_PtInRect(_self, _args)
PyMac_GetPoint, &pt, PyMac_GetPoint, &pt,
PyMac_GetRect, &r)) PyMac_GetRect, &r))
return NULL; return NULL;
_rv = PtInRect(pt, _rv = MacPtInRect(pt,
&r); &r);
_res = Py_BuildValue("b", _res = Py_BuildValue("b",
_rv); _rv);
...@@ -3479,7 +3479,7 @@ static PyObject *Qd_GetPattern(_self, _args) ...@@ -3479,7 +3479,7 @@ static PyObject *Qd_GetPattern(_self, _args)
return _res; return _res;
} }
static PyObject *Qd_GetCursor(_self, _args) static PyObject *Qd_MacGetCursor(_self, _args)
PyObject *_self; PyObject *_self;
PyObject *_args; PyObject *_args;
{ {
...@@ -3489,7 +3489,7 @@ static PyObject *Qd_GetCursor(_self, _args) ...@@ -3489,7 +3489,7 @@ static PyObject *Qd_GetCursor(_self, _args)
if (!PyArg_ParseTuple(_args, "h", if (!PyArg_ParseTuple(_args, "h",
&cursorID)) &cursorID))
return NULL; return NULL;
_rv = GetCursor(cursorID); _rv = MacGetCursor(cursorID);
_res = Py_BuildValue("O&", _res = Py_BuildValue("O&",
ResObj_New, _rv); ResObj_New, _rv);
return _res; return _res;
...@@ -3723,7 +3723,7 @@ static PyObject *Qd_DrawString(_self, _args) ...@@ -3723,7 +3723,7 @@ static PyObject *Qd_DrawString(_self, _args)
return _res; return _res;
} }
static PyObject *Qd_DrawText(_self, _args) static PyObject *Qd_MacDrawText(_self, _args)
PyObject *_self; PyObject *_self;
PyObject *_args; PyObject *_args;
{ {
...@@ -3738,7 +3738,7 @@ static PyObject *Qd_DrawText(_self, _args) ...@@ -3738,7 +3738,7 @@ static PyObject *Qd_DrawText(_self, _args)
&firstByte, &firstByte,
&byteCount)) &byteCount))
return NULL; return NULL;
DrawText(textBuf__in__, MacDrawText(textBuf__in__,
firstByte, firstByte,
byteCount); byteCount);
Py_INCREF(Py_None); Py_INCREF(Py_None);
...@@ -3891,7 +3891,7 @@ static PyObject *Qd_RawBitMap(_self, _args) ...@@ -3891,7 +3891,7 @@ static PyObject *Qd_RawBitMap(_self, _args)
} }
static PyMethodDef Qd_methods[] = { static PyMethodDef Qd_methods[] = {
{"SetPort", (PyCFunction)Qd_SetPort, 1, {"MacSetPort", (PyCFunction)Qd_MacSetPort, 1,
"(GrafPtr port) -> None"}, "(GrafPtr port) -> None"},
{"GetPort", (PyCFunction)Qd_GetPort, 1, {"GetPort", (PyCFunction)Qd_GetPort, 1,
"() -> (GrafPtr port)"}, "() -> (GrafPtr port)"},
...@@ -3915,11 +3915,11 @@ static PyMethodDef Qd_methods[] = { ...@@ -3915,11 +3915,11 @@ static PyMethodDef Qd_methods[] = {
"(Pattern pat) -> None"}, "(Pattern pat) -> None"},
{"InitCursor", (PyCFunction)Qd_InitCursor, 1, {"InitCursor", (PyCFunction)Qd_InitCursor, 1,
"() -> None"}, "() -> None"},
{"SetCursor", (PyCFunction)Qd_SetCursor, 1, {"MacSetCursor", (PyCFunction)Qd_MacSetCursor, 1,
"(Cursor crsr) -> None"}, "(Cursor crsr) -> None"},
{"HideCursor", (PyCFunction)Qd_HideCursor, 1, {"HideCursor", (PyCFunction)Qd_HideCursor, 1,
"() -> None"}, "() -> None"},
{"ShowCursor", (PyCFunction)Qd_ShowCursor, 1, {"MacShowCursor", (PyCFunction)Qd_MacShowCursor, 1,
"() -> None"}, "() -> None"},
{"ObscureCursor", (PyCFunction)Qd_ObscureCursor, 1, {"ObscureCursor", (PyCFunction)Qd_ObscureCursor, 1,
"() -> None"}, "() -> None"},
...@@ -3945,7 +3945,7 @@ static PyMethodDef Qd_methods[] = { ...@@ -3945,7 +3945,7 @@ static PyMethodDef Qd_methods[] = {
"(short h, short v) -> None"}, "(short h, short v) -> None"},
{"Move", (PyCFunction)Qd_Move, 1, {"Move", (PyCFunction)Qd_Move, 1,
"(short dh, short dv) -> None"}, "(short dh, short dv) -> None"},
{"LineTo", (PyCFunction)Qd_LineTo, 1, {"MacLineTo", (PyCFunction)Qd_MacLineTo, 1,
"(short h, short v) -> None"}, "(short h, short v) -> None"},
{"Line", (PyCFunction)Qd_Line, 1, {"Line", (PyCFunction)Qd_Line, 1,
"(short dh, short dv) -> None"}, "(short dh, short dv) -> None"},
...@@ -3955,29 +3955,29 @@ static PyMethodDef Qd_methods[] = { ...@@ -3955,29 +3955,29 @@ static PyMethodDef Qd_methods[] = {
"(long color) -> None"}, "(long color) -> None"},
{"ColorBit", (PyCFunction)Qd_ColorBit, 1, {"ColorBit", (PyCFunction)Qd_ColorBit, 1,
"(short whichBit) -> None"}, "(short whichBit) -> None"},
{"SetRect", (PyCFunction)Qd_SetRect, 1, {"MacSetRect", (PyCFunction)Qd_MacSetRect, 1,
"(short left, short top, short right, short bottom) -> (Rect r)"}, "(short left, short top, short right, short bottom) -> (Rect r)"},
{"OffsetRect", (PyCFunction)Qd_OffsetRect, 1, {"MacOffsetRect", (PyCFunction)Qd_MacOffsetRect, 1,
"(Rect r, short dh, short dv) -> (Rect r)"}, "(Rect r, short dh, short dv) -> (Rect r)"},
{"InsetRect", (PyCFunction)Qd_InsetRect, 1, {"MacInsetRect", (PyCFunction)Qd_MacInsetRect, 1,
"(Rect r, short dh, short dv) -> (Rect r)"}, "(Rect r, short dh, short dv) -> (Rect r)"},
{"SectRect", (PyCFunction)Qd_SectRect, 1, {"SectRect", (PyCFunction)Qd_SectRect, 1,
"(Rect src1, Rect src2) -> (Boolean _rv, Rect dstRect)"}, "(Rect src1, Rect src2) -> (Boolean _rv, Rect dstRect)"},
{"UnionRect", (PyCFunction)Qd_UnionRect, 1, {"MacUnionRect", (PyCFunction)Qd_MacUnionRect, 1,
"(Rect src1, Rect src2) -> (Rect dstRect)"}, "(Rect src1, Rect src2) -> (Rect dstRect)"},
{"EqualRect", (PyCFunction)Qd_EqualRect, 1, {"MacEqualRect", (PyCFunction)Qd_MacEqualRect, 1,
"(Rect rect1, Rect rect2) -> (Boolean _rv)"}, "(Rect rect1, Rect rect2) -> (Boolean _rv)"},
{"EmptyRect", (PyCFunction)Qd_EmptyRect, 1, {"EmptyRect", (PyCFunction)Qd_EmptyRect, 1,
"(Rect r) -> (Boolean _rv)"}, "(Rect r) -> (Boolean _rv)"},
{"FrameRect", (PyCFunction)Qd_FrameRect, 1, {"MacFrameRect", (PyCFunction)Qd_MacFrameRect, 1,
"(Rect r) -> None"}, "(Rect r) -> None"},
{"PaintRect", (PyCFunction)Qd_PaintRect, 1, {"PaintRect", (PyCFunction)Qd_PaintRect, 1,
"(Rect r) -> None"}, "(Rect r) -> None"},
{"EraseRect", (PyCFunction)Qd_EraseRect, 1, {"EraseRect", (PyCFunction)Qd_EraseRect, 1,
"(Rect r) -> None"}, "(Rect r) -> None"},
{"InvertRect", (PyCFunction)Qd_InvertRect, 1, {"MacInvertRect", (PyCFunction)Qd_MacInvertRect, 1,
"(Rect r) -> None"}, "(Rect r) -> None"},
{"FillRect", (PyCFunction)Qd_FillRect, 1, {"MacFillRect", (PyCFunction)Qd_MacFillRect, 1,
"(Rect r, Pattern pat) -> None"}, "(Rect r, Pattern pat) -> None"},
{"FrameOval", (PyCFunction)Qd_FrameOval, 1, {"FrameOval", (PyCFunction)Qd_FrameOval, 1,
"(Rect r) -> None"}, "(Rect r) -> None"},
...@@ -4019,41 +4019,41 @@ static PyMethodDef Qd_methods[] = { ...@@ -4019,41 +4019,41 @@ static PyMethodDef Qd_methods[] = {
"(RgnHandle region, BitMapPtr bMap) -> None"}, "(RgnHandle region, BitMapPtr bMap) -> None"},
{"DisposeRgn", (PyCFunction)Qd_DisposeRgn, 1, {"DisposeRgn", (PyCFunction)Qd_DisposeRgn, 1,
"(RgnHandle rgn) -> None"}, "(RgnHandle rgn) -> None"},
{"CopyRgn", (PyCFunction)Qd_CopyRgn, 1, {"MacCopyRgn", (PyCFunction)Qd_MacCopyRgn, 1,
"(RgnHandle srcRgn, RgnHandle dstRgn) -> None"}, "(RgnHandle srcRgn, RgnHandle dstRgn) -> None"},
{"SetEmptyRgn", (PyCFunction)Qd_SetEmptyRgn, 1, {"SetEmptyRgn", (PyCFunction)Qd_SetEmptyRgn, 1,
"(RgnHandle rgn) -> None"}, "(RgnHandle rgn) -> None"},
{"SetRectRgn", (PyCFunction)Qd_SetRectRgn, 1, {"MacSetRectRgn", (PyCFunction)Qd_MacSetRectRgn, 1,
"(RgnHandle rgn, short left, short top, short right, short bottom) -> None"}, "(RgnHandle rgn, short left, short top, short right, short bottom) -> None"},
{"RectRgn", (PyCFunction)Qd_RectRgn, 1, {"RectRgn", (PyCFunction)Qd_RectRgn, 1,
"(RgnHandle rgn, Rect r) -> None"}, "(RgnHandle rgn, Rect r) -> None"},
{"OffsetRgn", (PyCFunction)Qd_OffsetRgn, 1, {"MacOffsetRgn", (PyCFunction)Qd_MacOffsetRgn, 1,
"(RgnHandle rgn, short dh, short dv) -> None"}, "(RgnHandle rgn, short dh, short dv) -> None"},
{"InsetRgn", (PyCFunction)Qd_InsetRgn, 1, {"InsetRgn", (PyCFunction)Qd_InsetRgn, 1,
"(RgnHandle rgn, short dh, short dv) -> None"}, "(RgnHandle rgn, short dh, short dv) -> None"},
{"SectRgn", (PyCFunction)Qd_SectRgn, 1, {"SectRgn", (PyCFunction)Qd_SectRgn, 1,
"(RgnHandle srcRgnA, RgnHandle srcRgnB, RgnHandle dstRgn) -> None"}, "(RgnHandle srcRgnA, RgnHandle srcRgnB, RgnHandle dstRgn) -> None"},
{"UnionRgn", (PyCFunction)Qd_UnionRgn, 1, {"MacUnionRgn", (PyCFunction)Qd_MacUnionRgn, 1,
"(RgnHandle srcRgnA, RgnHandle srcRgnB, RgnHandle dstRgn) -> None"}, "(RgnHandle srcRgnA, RgnHandle srcRgnB, RgnHandle dstRgn) -> None"},
{"DiffRgn", (PyCFunction)Qd_DiffRgn, 1, {"DiffRgn", (PyCFunction)Qd_DiffRgn, 1,
"(RgnHandle srcRgnA, RgnHandle srcRgnB, RgnHandle dstRgn) -> None"}, "(RgnHandle srcRgnA, RgnHandle srcRgnB, RgnHandle dstRgn) -> None"},
{"XorRgn", (PyCFunction)Qd_XorRgn, 1, {"MacXorRgn", (PyCFunction)Qd_MacXorRgn, 1,
"(RgnHandle srcRgnA, RgnHandle srcRgnB, RgnHandle dstRgn) -> None"}, "(RgnHandle srcRgnA, RgnHandle srcRgnB, RgnHandle dstRgn) -> None"},
{"RectInRgn", (PyCFunction)Qd_RectInRgn, 1, {"RectInRgn", (PyCFunction)Qd_RectInRgn, 1,
"(Rect r, RgnHandle rgn) -> (Boolean _rv)"}, "(Rect r, RgnHandle rgn) -> (Boolean _rv)"},
{"EqualRgn", (PyCFunction)Qd_EqualRgn, 1, {"MacEqualRgn", (PyCFunction)Qd_MacEqualRgn, 1,
"(RgnHandle rgnA, RgnHandle rgnB) -> (Boolean _rv)"}, "(RgnHandle rgnA, RgnHandle rgnB) -> (Boolean _rv)"},
{"EmptyRgn", (PyCFunction)Qd_EmptyRgn, 1, {"EmptyRgn", (PyCFunction)Qd_EmptyRgn, 1,
"(RgnHandle rgn) -> (Boolean _rv)"}, "(RgnHandle rgn) -> (Boolean _rv)"},
{"FrameRgn", (PyCFunction)Qd_FrameRgn, 1, {"MacFrameRgn", (PyCFunction)Qd_MacFrameRgn, 1,
"(RgnHandle rgn) -> None"}, "(RgnHandle rgn) -> None"},
{"PaintRgn", (PyCFunction)Qd_PaintRgn, 1, {"MacPaintRgn", (PyCFunction)Qd_MacPaintRgn, 1,
"(RgnHandle rgn) -> None"}, "(RgnHandle rgn) -> None"},
{"EraseRgn", (PyCFunction)Qd_EraseRgn, 1, {"EraseRgn", (PyCFunction)Qd_EraseRgn, 1,
"(RgnHandle rgn) -> None"}, "(RgnHandle rgn) -> None"},
{"InvertRgn", (PyCFunction)Qd_InvertRgn, 1, {"MacInvertRgn", (PyCFunction)Qd_MacInvertRgn, 1,
"(RgnHandle rgn) -> None"}, "(RgnHandle rgn) -> None"},
{"FillRgn", (PyCFunction)Qd_FillRgn, 1, {"MacFillRgn", (PyCFunction)Qd_MacFillRgn, 1,
"(RgnHandle rgn, Pattern pat) -> None"}, "(RgnHandle rgn, Pattern pat) -> None"},
{"ScrollRect", (PyCFunction)Qd_ScrollRect, 1, {"ScrollRect", (PyCFunction)Qd_ScrollRect, 1,
"(Rect r, short dh, short dv, RgnHandle updateRgn) -> None"}, "(Rect r, short dh, short dv, RgnHandle updateRgn) -> None"},
...@@ -4097,7 +4097,7 @@ static PyMethodDef Qd_methods[] = { ...@@ -4097,7 +4097,7 @@ static PyMethodDef Qd_methods[] = {
"(Point pt) -> (Point pt)"}, "(Point pt) -> (Point pt)"},
{"Random", (PyCFunction)Qd_Random, 1, {"Random", (PyCFunction)Qd_Random, 1,
"() -> (short _rv)"}, "() -> (short _rv)"},
{"GetPixel", (PyCFunction)Qd_GetPixel, 1, {"MacGetPixel", (PyCFunction)Qd_MacGetPixel, 1,
"(short h, short v) -> (Boolean _rv)"}, "(short h, short v) -> (Boolean _rv)"},
{"ScalePt", (PyCFunction)Qd_ScalePt, 1, {"ScalePt", (PyCFunction)Qd_ScalePt, 1,
"(Point pt, Rect srcRect, Rect dstRect) -> (Point pt)"}, "(Point pt, Rect srcRect, Rect dstRect) -> (Point pt)"},
...@@ -4115,7 +4115,7 @@ static PyMethodDef Qd_methods[] = { ...@@ -4115,7 +4115,7 @@ static PyMethodDef Qd_methods[] = {
"(Point src, Point dst) -> (Point dst)"}, "(Point src, Point dst) -> (Point dst)"},
{"EqualPt", (PyCFunction)Qd_EqualPt, 1, {"EqualPt", (PyCFunction)Qd_EqualPt, 1,
"(Point pt1, Point pt2) -> (Boolean _rv)"}, "(Point pt1, Point pt2) -> (Boolean _rv)"},
{"PtInRect", (PyCFunction)Qd_PtInRect, 1, {"MacPtInRect", (PyCFunction)Qd_MacPtInRect, 1,
"(Point pt, Rect r) -> (Boolean _rv)"}, "(Point pt, Rect r) -> (Boolean _rv)"},
{"Pt2Rect", (PyCFunction)Qd_Pt2Rect, 1, {"Pt2Rect", (PyCFunction)Qd_Pt2Rect, 1,
"(Point pt1, Point pt2) -> (Rect dstRect)"}, "(Point pt1, Point pt2) -> (Rect dstRect)"},
...@@ -4235,7 +4235,7 @@ static PyMethodDef Qd_methods[] = { ...@@ -4235,7 +4235,7 @@ static PyMethodDef Qd_methods[] = {
"(BitMapPtr srcBits, BitMapPtr maskBits, BitMapPtr dstBits, Rect srcRect, Rect maskRect, Rect dstRect, short mode, RgnHandle maskRgn) -> None"}, "(BitMapPtr srcBits, BitMapPtr maskBits, BitMapPtr dstBits, Rect srcRect, Rect maskRect, Rect dstRect, short mode, RgnHandle maskRgn) -> None"},
{"GetPattern", (PyCFunction)Qd_GetPattern, 1, {"GetPattern", (PyCFunction)Qd_GetPattern, 1,
"(short patternID) -> (PatHandle _rv)"}, "(short patternID) -> (PatHandle _rv)"},
{"GetCursor", (PyCFunction)Qd_GetCursor, 1, {"MacGetCursor", (PyCFunction)Qd_MacGetCursor, 1,
"(short cursorID) -> (CursHandle _rv)"}, "(short cursorID) -> (CursHandle _rv)"},
{"GetPicture", (PyCFunction)Qd_GetPicture, 1, {"GetPicture", (PyCFunction)Qd_GetPicture, 1,
"(short pictureID) -> (PicHandle _rv)"}, "(short pictureID) -> (PicHandle _rv)"},
...@@ -4265,7 +4265,7 @@ static PyMethodDef Qd_methods[] = { ...@@ -4265,7 +4265,7 @@ static PyMethodDef Qd_methods[] = {
"(CharParameter ch) -> None"}, "(CharParameter ch) -> None"},
{"DrawString", (PyCFunction)Qd_DrawString, 1, {"DrawString", (PyCFunction)Qd_DrawString, 1,
"(Str255 s) -> None"}, "(Str255 s) -> None"},
{"DrawText", (PyCFunction)Qd_DrawText, 1, {"MacDrawText", (PyCFunction)Qd_MacDrawText, 1,
"(Buffer textBuf, short firstByte, short byteCount) -> None"}, "(Buffer textBuf, short firstByte, short byteCount) -> None"},
{"CharWidth", (PyCFunction)Qd_CharWidth, 1, {"CharWidth", (PyCFunction)Qd_CharWidth, 1,
"(CharParameter ch) -> (short _rv)"}, "(CharParameter ch) -> (short _rv)"},
......
...@@ -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',
] ]
......
...@@ -150,6 +150,37 @@ static PyObject *MovieCtlObj_MCGetIndMovie(_self, _args) ...@@ -150,6 +150,37 @@ static PyObject *MovieCtlObj_MCGetIndMovie(_self, _args)
return _res; return _res;
} }
static PyObject *MovieCtlObj_MCRemoveAllMovies(_self, _args)
MovieControllerObject *_self;
PyObject *_args;
{
PyObject *_res = NULL;
ComponentResult _rv;
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = MCRemoveAllMovies(_self->ob_itself);
_res = Py_BuildValue("l",
_rv);
return _res;
}
static PyObject *MovieCtlObj_MCRemoveAMovie(_self, _args)
MovieControllerObject *_self;
PyObject *_args;
{
PyObject *_res = NULL;
ComponentResult _rv;
Movie m;
if (!PyArg_ParseTuple(_args, "O&",
MovieObj_Convert, &m))
return NULL;
_rv = MCRemoveAMovie(_self->ob_itself,
m);
_res = Py_BuildValue("l",
_rv);
return _res;
}
static PyObject *MovieCtlObj_MCRemoveMovie(_self, _args) static PyObject *MovieCtlObj_MCRemoveMovie(_self, _args)
MovieControllerObject *_self; MovieControllerObject *_self;
PyObject *_args; PyObject *_args;
...@@ -777,11 +808,98 @@ static PyObject *MovieCtlObj_MCGetMenuString(_self, _args) ...@@ -777,11 +808,98 @@ static PyObject *MovieCtlObj_MCGetMenuString(_self, _args)
return _res; return _res;
} }
static PyObject *MovieCtlObj_MCPtInController(_self, _args)
MovieControllerObject *_self;
PyObject *_args;
{
PyObject *_res = NULL;
ComponentResult _rv;
Point thePt;
Boolean inController;
if (!PyArg_ParseTuple(_args, "O&",
PyMac_GetPoint, &thePt))
return NULL;
_rv = MCPtInController(_self->ob_itself,
thePt,
&inController);
_res = Py_BuildValue("lb",
_rv,
inController);
return _res;
}
static PyObject *MovieCtlObj_MCInvalidate(_self, _args)
MovieControllerObject *_self;
PyObject *_args;
{
PyObject *_res = NULL;
ComponentResult _rv;
WindowPtr w;
RgnHandle invalidRgn;
if (!PyArg_ParseTuple(_args, "O&O&",
WinObj_Convert, &w,
ResObj_Convert, &invalidRgn))
return NULL;
_rv = MCInvalidate(_self->ob_itself,
w,
invalidRgn);
_res = Py_BuildValue("l",
_rv);
return _res;
}
static PyObject *MovieCtlObj_MCAdjustCursor(_self, _args)
MovieControllerObject *_self;
PyObject *_args;
{
PyObject *_res = NULL;
ComponentResult _rv;
WindowPtr w;
Point where;
long modifiers;
if (!PyArg_ParseTuple(_args, "O&O&l",
WinObj_Convert, &w,
PyMac_GetPoint, &where,
&modifiers))
return NULL;
_rv = MCAdjustCursor(_self->ob_itself,
w,
where,
modifiers);
_res = Py_BuildValue("l",
_rv);
return _res;
}
static PyObject *MovieCtlObj_MCGetInterfaceElement(_self, _args)
MovieControllerObject *_self;
PyObject *_args;
{
PyObject *_res = NULL;
ComponentResult _rv;
MCInterfaceElement whichElement;
void * element;
if (!PyArg_ParseTuple(_args, "ls",
&whichElement,
&element))
return NULL;
_rv = MCGetInterfaceElement(_self->ob_itself,
whichElement,
element);
_res = Py_BuildValue("l",
_rv);
return _res;
}
static PyMethodDef MovieCtlObj_methods[] = { static PyMethodDef MovieCtlObj_methods[] = {
{"MCSetMovie", (PyCFunction)MovieCtlObj_MCSetMovie, 1, {"MCSetMovie", (PyCFunction)MovieCtlObj_MCSetMovie, 1,
"(Movie theMovie, WindowPtr movieWindow, Point where) -> (ComponentResult _rv)"}, "(Movie theMovie, WindowPtr movieWindow, Point where) -> (ComponentResult _rv)"},
{"MCGetIndMovie", (PyCFunction)MovieCtlObj_MCGetIndMovie, 1, {"MCGetIndMovie", (PyCFunction)MovieCtlObj_MCGetIndMovie, 1,
"(short index) -> (Movie _rv)"}, "(short index) -> (Movie _rv)"},
{"MCRemoveAllMovies", (PyCFunction)MovieCtlObj_MCRemoveAllMovies, 1,
"() -> (ComponentResult _rv)"},
{"MCRemoveAMovie", (PyCFunction)MovieCtlObj_MCRemoveAMovie, 1,
"(Movie m) -> (ComponentResult _rv)"},
{"MCRemoveMovie", (PyCFunction)MovieCtlObj_MCRemoveMovie, 1, {"MCRemoveMovie", (PyCFunction)MovieCtlObj_MCRemoveMovie, 1,
"() -> (ComponentResult _rv)"}, "() -> (ComponentResult _rv)"},
{"MCIsPlayerEvent", (PyCFunction)MovieCtlObj_MCIsPlayerEvent, 1, {"MCIsPlayerEvent", (PyCFunction)MovieCtlObj_MCIsPlayerEvent, 1,
...@@ -854,6 +972,14 @@ static PyMethodDef MovieCtlObj_methods[] = { ...@@ -854,6 +972,14 @@ static PyMethodDef MovieCtlObj_methods[] = {
"(long modifiers, MenuHandle mh) -> (ComponentResult _rv)"}, "(long modifiers, MenuHandle mh) -> (ComponentResult _rv)"},
{"MCGetMenuString", (PyCFunction)MovieCtlObj_MCGetMenuString, 1, {"MCGetMenuString", (PyCFunction)MovieCtlObj_MCGetMenuString, 1,
"(long modifiers, short item, Str255 aString) -> (ComponentResult _rv)"}, "(long modifiers, short item, Str255 aString) -> (ComponentResult _rv)"},
{"MCPtInController", (PyCFunction)MovieCtlObj_MCPtInController, 1,
"(Point thePt) -> (ComponentResult _rv, Boolean inController)"},
{"MCInvalidate", (PyCFunction)MovieCtlObj_MCInvalidate, 1,
"(WindowPtr w, RgnHandle invalidRgn) -> (ComponentResult _rv)"},
{"MCAdjustCursor", (PyCFunction)MovieCtlObj_MCAdjustCursor, 1,
"(WindowPtr w, Point where, long modifiers) -> (ComponentResult _rv)"},
{"MCGetInterfaceElement", (PyCFunction)MovieCtlObj_MCGetInterfaceElement, 1,
"(MCInterfaceElement whichElement, void * element) -> (ComponentResult _rv)"},
{NULL, NULL, 0} {NULL, NULL, 0}
}; };
...@@ -1844,6 +1970,20 @@ static PyObject *MediaObj_GetMediaSampleCount(_self, _args) ...@@ -1844,6 +1970,20 @@ static PyObject *MediaObj_GetMediaSampleCount(_self, _args)
return _res; return _res;
} }
static PyObject *MediaObj_GetMediaSyncSampleCount(_self, _args)
MediaObject *_self;
PyObject *_args;
{
PyObject *_res = NULL;
long _rv;
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = GetMediaSyncSampleCount(_self->ob_itself);
_res = Py_BuildValue("l",
_rv);
return _res;
}
static PyObject *MediaObj_SampleNumToMediaTime(_self, _args) static PyObject *MediaObj_SampleNumToMediaTime(_self, _args)
MediaObject *_self; MediaObject *_self;
PyObject *_args; PyObject *_args;
...@@ -2306,6 +2446,21 @@ static PyObject *MediaObj_SetMediaPlayHints(_self, _args) ...@@ -2306,6 +2446,21 @@ static PyObject *MediaObj_SetMediaPlayHints(_self, _args)
return _res; return _res;
} }
static PyObject *MediaObj_GetMediaPlayHints(_self, _args)
MediaObject *_self;
PyObject *_args;
{
PyObject *_res = NULL;
long flags;
if (!PyArg_ParseTuple(_args, ""))
return NULL;
GetMediaPlayHints(_self->ob_itself,
&flags);
_res = Py_BuildValue("l",
flags);
return _res;
}
static PyMethodDef MediaObj_methods[] = { static PyMethodDef MediaObj_methods[] = {
{"LoadMediaIntoRam", (PyCFunction)MediaObj_LoadMediaIntoRam, 1, {"LoadMediaIntoRam", (PyCFunction)MediaObj_LoadMediaIntoRam, 1,
"(TimeValue time, TimeValue duration, long flags) -> None"}, "(TimeValue time, TimeValue duration, long flags) -> None"},
...@@ -2357,6 +2512,8 @@ static PyMethodDef MediaObj_methods[] = { ...@@ -2357,6 +2512,8 @@ static PyMethodDef MediaObj_methods[] = {
"(long index, SampleDescriptionHandle descH) -> None"}, "(long index, SampleDescriptionHandle descH) -> None"},
{"GetMediaSampleCount", (PyCFunction)MediaObj_GetMediaSampleCount, 1, {"GetMediaSampleCount", (PyCFunction)MediaObj_GetMediaSampleCount, 1,
"() -> (long _rv)"}, "() -> (long _rv)"},
{"GetMediaSyncSampleCount", (PyCFunction)MediaObj_GetMediaSyncSampleCount, 1,
"() -> (long _rv)"},
{"SampleNumToMediaTime", (PyCFunction)MediaObj_SampleNumToMediaTime, 1, {"SampleNumToMediaTime", (PyCFunction)MediaObj_SampleNumToMediaTime, 1,
"(long logicalSampleNum) -> (TimeValue sampleTime, TimeValue sampleDuration)"}, "(long logicalSampleNum) -> (TimeValue sampleTime, TimeValue sampleDuration)"},
{"MediaTimeToSampleNum", (PyCFunction)MediaObj_MediaTimeToSampleNum, 1, {"MediaTimeToSampleNum", (PyCFunction)MediaObj_MediaTimeToSampleNum, 1,
...@@ -2393,6 +2550,8 @@ static PyMethodDef MediaObj_methods[] = { ...@@ -2393,6 +2550,8 @@ static PyMethodDef MediaObj_methods[] = {
"() -> (short count)"}, "() -> (short count)"},
{"SetMediaPlayHints", (PyCFunction)MediaObj_SetMediaPlayHints, 1, {"SetMediaPlayHints", (PyCFunction)MediaObj_SetMediaPlayHints, 1,
"(long flags, long flagsMask) -> None"}, "(long flags, long flagsMask) -> None"},
{"GetMediaPlayHints", (PyCFunction)MediaObj_GetMediaPlayHints, 1,
"() -> (long flags)"},
{NULL, NULL, 0} {NULL, NULL, 0}
}; };
...@@ -2911,6 +3070,41 @@ static PyObject *TrackObj_GetTrackUserData(_self, _args) ...@@ -2911,6 +3070,41 @@ static PyObject *TrackObj_GetTrackUserData(_self, _args)
return _res; return _res;
} }
static PyObject *TrackObj_GetTrackSoundLocalizationSettings(_self, _args)
TrackObject *_self;
PyObject *_args;
{
PyObject *_res = NULL;
OSErr _err;
Handle settings;
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_err = GetTrackSoundLocalizationSettings(_self->ob_itself,
&settings);
if (_err != noErr) return PyMac_Error(_err);
_res = Py_BuildValue("O&",
ResObj_New, settings);
return _res;
}
static PyObject *TrackObj_SetTrackSoundLocalizationSettings(_self, _args)
TrackObject *_self;
PyObject *_args;
{
PyObject *_res = NULL;
OSErr _err;
Handle settings;
if (!PyArg_ParseTuple(_args, "O&",
ResObj_Convert, &settings))
return NULL;
_err = SetTrackSoundLocalizationSettings(_self->ob_itself,
settings);
if (_err != noErr) return PyMac_Error(_err);
Py_INCREF(Py_None);
_res = Py_None;
return _res;
}
static PyObject *TrackObj_NewTrackMedia(_self, _args) static PyObject *TrackObj_NewTrackMedia(_self, _args)
TrackObject *_self; TrackObject *_self;
PyObject *_args; PyObject *_args;
...@@ -3474,6 +3668,10 @@ static PyMethodDef TrackObj_methods[] = { ...@@ -3474,6 +3668,10 @@ static PyMethodDef TrackObj_methods[] = {
"(Fixed width, Fixed height) -> None"}, "(Fixed width, Fixed height) -> None"},
{"GetTrackUserData", (PyCFunction)TrackObj_GetTrackUserData, 1, {"GetTrackUserData", (PyCFunction)TrackObj_GetTrackUserData, 1,
"() -> (UserData _rv)"}, "() -> (UserData _rv)"},
{"GetTrackSoundLocalizationSettings", (PyCFunction)TrackObj_GetTrackSoundLocalizationSettings, 1,
"() -> (Handle settings)"},
{"SetTrackSoundLocalizationSettings", (PyCFunction)TrackObj_SetTrackSoundLocalizationSettings, 1,
"(Handle settings) -> None"},
{"NewTrackMedia", (PyCFunction)TrackObj_NewTrackMedia, 1, {"NewTrackMedia", (PyCFunction)TrackObj_NewTrackMedia, 1,
"(OSType mediaType, TimeScale timeScale, Handle dataRef, OSType dataRefType) -> (Media _rv)"}, "(OSType mediaType, TimeScale timeScale, Handle dataRef, OSType dataRefType) -> (Media _rv)"},
{"GetTrackMedia", (PyCFunction)TrackObj_GetTrackMedia, 1, {"GetTrackMedia", (PyCFunction)TrackObj_GetTrackMedia, 1,
...@@ -3847,6 +4045,21 @@ static PyObject *MovieObj_SetMovieGWorld(_self, _args) ...@@ -3847,6 +4045,21 @@ static PyObject *MovieObj_SetMovieGWorld(_self, _args)
return _res; return _res;
} }
static PyObject *MovieObj_GetMovieNaturalBoundsRect(_self, _args)
MovieObject *_self;
PyObject *_args;
{
PyObject *_res = NULL;
Rect naturalBounds;
if (!PyArg_ParseTuple(_args, ""))
return NULL;
GetMovieNaturalBoundsRect(_self->ob_itself,
&naturalBounds);
_res = Py_BuildValue("O&",
PyMac_BuildRect, &naturalBounds);
return _res;
}
static PyObject *MovieObj_GetNextTrackForCompositing(_self, _args) static PyObject *MovieObj_GetNextTrackForCompositing(_self, _args)
MovieObject *_self; MovieObject *_self;
PyObject *_args; PyObject *_args;
...@@ -3927,6 +4140,24 @@ static PyObject *MovieObj_UpdateMovie(_self, _args) ...@@ -3927,6 +4140,24 @@ static PyObject *MovieObj_UpdateMovie(_self, _args)
return _res; return _res;
} }
static PyObject *MovieObj_InvalidateMovieRegion(_self, _args)
MovieObject *_self;
PyObject *_args;
{
PyObject *_res = NULL;
OSErr _err;
RgnHandle invalidRgn;
if (!PyArg_ParseTuple(_args, "O&",
ResObj_Convert, &invalidRgn))
return NULL;
_err = InvalidateMovieRegion(_self->ob_itself,
invalidRgn);
if (_err != noErr) return PyMac_Error(_err);
Py_INCREF(Py_None);
_res = Py_None;
return _res;
}
static PyObject *MovieObj_GetMovieBox(_self, _args) static PyObject *MovieObj_GetMovieBox(_self, _args)
MovieObject *_self; MovieObject *_self;
PyObject *_args; PyObject *_args;
...@@ -5287,6 +5518,63 @@ static PyObject *MovieObj_SetMoviePlayHints(_self, _args) ...@@ -5287,6 +5518,63 @@ static PyObject *MovieObj_SetMoviePlayHints(_self, _args)
return _res; return _res;
} }
static PyObject *MovieObj_GetMaxLoadedTimeInMovie(_self, _args)
MovieObject *_self;
PyObject *_args;
{
PyObject *_res = NULL;
OSErr _err;
TimeValue time;
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_err = GetMaxLoadedTimeInMovie(_self->ob_itself,
&time);
if (_err != noErr) return PyMac_Error(_err);
_res = Py_BuildValue("l",
time);
return _res;
}
static PyObject *MovieObj_QTMovieNeedsTimeTable(_self, _args)
MovieObject *_self;
PyObject *_args;
{
PyObject *_res = NULL;
OSErr _err;
Boolean needsTimeTable;
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_err = QTMovieNeedsTimeTable(_self->ob_itself,
&needsTimeTable);
if (_err != noErr) return PyMac_Error(_err);
_res = Py_BuildValue("b",
needsTimeTable);
return _res;
}
static PyObject *MovieObj_QTGetDataRefMaxFileOffset(_self, _args)
MovieObject *_self;
PyObject *_args;
{
PyObject *_res = NULL;
OSErr _err;
OSType dataRefType;
Handle dataRef;
long offset;
if (!PyArg_ParseTuple(_args, "O&O&",
PyMac_GetOSType, &dataRefType,
ResObj_Convert, &dataRef))
return NULL;
_err = QTGetDataRefMaxFileOffset(_self->ob_itself,
dataRefType,
dataRef,
&offset);
if (_err != noErr) return PyMac_Error(_err);
_res = Py_BuildValue("l",
offset);
return _res;
}
static PyMethodDef MovieObj_methods[] = { static PyMethodDef MovieObj_methods[] = {
{"MoviesTask", (PyCFunction)MovieObj_MoviesTask, 1, {"MoviesTask", (PyCFunction)MovieObj_MoviesTask, 1,
"(long maxMilliSecToUse) -> None"}, "(long maxMilliSecToUse) -> None"},
...@@ -5320,6 +5608,8 @@ static PyMethodDef MovieObj_methods[] = { ...@@ -5320,6 +5608,8 @@ static PyMethodDef MovieObj_methods[] = {
"() -> (CGrafPtr port, GDHandle gdh)"}, "() -> (CGrafPtr port, GDHandle gdh)"},
{"SetMovieGWorld", (PyCFunction)MovieObj_SetMovieGWorld, 1, {"SetMovieGWorld", (PyCFunction)MovieObj_SetMovieGWorld, 1,
"(CGrafPtr port, GDHandle gdh) -> None"}, "(CGrafPtr port, GDHandle gdh) -> None"},
{"GetMovieNaturalBoundsRect", (PyCFunction)MovieObj_GetMovieNaturalBoundsRect, 1,
"() -> (Rect naturalBounds)"},
{"GetNextTrackForCompositing", (PyCFunction)MovieObj_GetNextTrackForCompositing, 1, {"GetNextTrackForCompositing", (PyCFunction)MovieObj_GetNextTrackForCompositing, 1,
"(Track theTrack) -> (Track _rv)"}, "(Track theTrack) -> (Track _rv)"},
{"GetPrevTrackForCompositing", (PyCFunction)MovieObj_GetPrevTrackForCompositing, 1, {"GetPrevTrackForCompositing", (PyCFunction)MovieObj_GetPrevTrackForCompositing, 1,
...@@ -5330,6 +5620,8 @@ static PyMethodDef MovieObj_methods[] = { ...@@ -5330,6 +5620,8 @@ static PyMethodDef MovieObj_methods[] = {
"() -> (PicHandle _rv)"}, "() -> (PicHandle _rv)"},
{"UpdateMovie", (PyCFunction)MovieObj_UpdateMovie, 1, {"UpdateMovie", (PyCFunction)MovieObj_UpdateMovie, 1,
"() -> None"}, "() -> None"},
{"InvalidateMovieRegion", (PyCFunction)MovieObj_InvalidateMovieRegion, 1,
"(RgnHandle invalidRgn) -> None"},
{"GetMovieBox", (PyCFunction)MovieObj_GetMovieBox, 1, {"GetMovieBox", (PyCFunction)MovieObj_GetMovieBox, 1,
"() -> (Rect boxRect)"}, "() -> (Rect boxRect)"},
{"SetMovieBox", (PyCFunction)MovieObj_SetMovieBox, 1, {"SetMovieBox", (PyCFunction)MovieObj_SetMovieBox, 1,
...@@ -5478,6 +5770,12 @@ static PyMethodDef MovieObj_methods[] = { ...@@ -5478,6 +5770,12 @@ static PyMethodDef MovieObj_methods[] = {
"(long movieScrapFlags) -> None"}, "(long movieScrapFlags) -> None"},
{"SetMoviePlayHints", (PyCFunction)MovieObj_SetMoviePlayHints, 1, {"SetMoviePlayHints", (PyCFunction)MovieObj_SetMoviePlayHints, 1,
"(long flags, long flagsMask) -> None"}, "(long flags, long flagsMask) -> None"},
{"GetMaxLoadedTimeInMovie", (PyCFunction)MovieObj_GetMaxLoadedTimeInMovie, 1,
"() -> (TimeValue time)"},
{"QTMovieNeedsTimeTable", (PyCFunction)MovieObj_QTMovieNeedsTimeTable, 1,
"() -> (Boolean needsTimeTable)"},
{"QTGetDataRefMaxFileOffset", (PyCFunction)MovieObj_QTGetDataRefMaxFileOffset, 1,
"(OSType dataRefType, Handle dataRef) -> (long offset)"},
{NULL, NULL, 0} {NULL, NULL, 0}
}; };
...@@ -5661,6 +5959,31 @@ static PyObject *Qt_PasteHandleIntoMovie(_self, _args) ...@@ -5661,6 +5959,31 @@ static PyObject *Qt_PasteHandleIntoMovie(_self, _args)
return _res; return _res;
} }
static PyObject *Qt_GetMovieImporterForDataRef(_self, _args)
PyObject *_self;
PyObject *_args;
{
PyObject *_res = NULL;
OSErr _err;
OSType dataRefType;
Handle dataRef;
long flags;
Component importer;
if (!PyArg_ParseTuple(_args, "O&O&l",
PyMac_GetOSType, &dataRefType,
ResObj_Convert, &dataRef,
&flags))
return NULL;
_err = GetMovieImporterForDataRef(dataRefType,
dataRef,
flags,
&importer);
if (_err != noErr) return PyMac_Error(_err);
_res = Py_BuildValue("O&",
CmpObj_New, importer);
return _res;
}
static PyObject *Qt_TrackTimeToMediaTime(_self, _args) static PyObject *Qt_TrackTimeToMediaTime(_self, _args)
PyObject *_self; PyObject *_self;
PyObject *_args; PyObject *_args;
...@@ -5885,6 +6208,34 @@ static PyObject *Qt_NewMovieFromDataFork(_self, _args) ...@@ -5885,6 +6208,34 @@ static PyObject *Qt_NewMovieFromDataFork(_self, _args)
return _res; return _res;
} }
static PyObject *Qt_NewMovieFromDataRef(_self, _args)
PyObject *_self;
PyObject *_args;
{
PyObject *_res = NULL;
OSErr _err;
Movie m;
short flags;
short id;
Handle dataRef;
OSType dataRefType;
if (!PyArg_ParseTuple(_args, "hO&O&",
&flags,
ResObj_Convert, &dataRef,
PyMac_GetOSType, &dataRefType))
return NULL;
_err = NewMovieFromDataRef(&m,
flags,
&id,
dataRef,
dataRefType);
if (_err != noErr) return PyMac_Error(_err);
_res = Py_BuildValue("O&h",
MovieObj_New, m,
id);
return _res;
}
static PyObject *Qt_RemoveMovieResource(_self, _args) static PyObject *Qt_RemoveMovieResource(_self, _args)
PyObject *_self; PyObject *_self;
PyObject *_args; PyObject *_args;
...@@ -5921,17 +6272,951 @@ static PyObject *Qt_NewMovieFromScrap(_self, _args) ...@@ -5921,17 +6272,951 @@ static PyObject *Qt_NewMovieFromScrap(_self, _args)
return _res; return _res;
} }
static PyObject *Qt_NewTimeBase(_self, _args) static PyObject *Qt_QTNewAlias(_self, _args)
PyObject *_self; PyObject *_self;
PyObject *_args; PyObject *_args;
{ {
PyObject *_res = NULL; PyObject *_res = NULL;
TimeBase _rv; OSErr _err;
if (!PyArg_ParseTuple(_args, "")) FSSpec fss;
AliasHandle alias;
Boolean minimal;
if (!PyArg_ParseTuple(_args, "O&b",
PyMac_GetFSSpec, &fss,
&minimal))
return NULL; return NULL;
_rv = NewTimeBase(); _err = QTNewAlias(&fss,
&alias,
minimal);
if (_err != noErr) return PyMac_Error(_err);
_res = Py_BuildValue("O&", _res = Py_BuildValue("O&",
TimeBaseObj_New, _rv); ResObj_New, alias);
return _res;
}
static PyObject *Qt_EndFullScreen(_self, _args)
PyObject *_self;
PyObject *_args;
{
PyObject *_res = NULL;
OSErr _err;
Ptr fullState;
long flags;
if (!PyArg_ParseTuple(_args, "sl",
&fullState,
&flags))
return NULL;
_err = EndFullScreen(fullState,
flags);
if (_err != noErr) return PyMac_Error(_err);
Py_INCREF(Py_None);
_res = Py_None;
return _res;
}
static PyObject *Qt_AddSoundDescriptionExtension(_self, _args)
PyObject *_self;
PyObject *_args;
{
PyObject *_res = NULL;
OSErr _err;
SoundDescriptionHandle desc;
Handle extension;
OSType idType;
if (!PyArg_ParseTuple(_args, "O&O&O&",
ResObj_Convert, &desc,
ResObj_Convert, &extension,
PyMac_GetOSType, &idType))
return NULL;
_err = AddSoundDescriptionExtension(desc,
extension,
idType);
if (_err != noErr) return PyMac_Error(_err);
Py_INCREF(Py_None);
_res = Py_None;
return _res;
}
static PyObject *Qt_GetSoundDescriptionExtension(_self, _args)
PyObject *_self;
PyObject *_args;
{
PyObject *_res = NULL;
OSErr _err;
SoundDescriptionHandle desc;
Handle extension;
OSType idType;
if (!PyArg_ParseTuple(_args, "O&O&",
ResObj_Convert, &desc,
PyMac_GetOSType, &idType))
return NULL;
_err = GetSoundDescriptionExtension(desc,
&extension,
idType);
if (_err != noErr) return PyMac_Error(_err);
_res = Py_BuildValue("O&",
ResObj_New, extension);
return _res;
}
static PyObject *Qt_RemoveSoundDescriptionExtension(_self, _args)
PyObject *_self;
PyObject *_args;
{
PyObject *_res = NULL;
OSErr _err;
SoundDescriptionHandle desc;
OSType idType;
if (!PyArg_ParseTuple(_args, "O&O&",
ResObj_Convert, &desc,
PyMac_GetOSType, &idType))
return NULL;
_err = RemoveSoundDescriptionExtension(desc,
idType);
if (_err != noErr) return PyMac_Error(_err);
Py_INCREF(Py_None);
_res = Py_None;
return _res;
}
static PyObject *Qt_QTIsStandardParameterDialogEvent(_self, _args)
PyObject *_self;
PyObject *_args;
{
PyObject *_res = NULL;
OSErr _err;
EventRecord pEvent;
QTParameterDialog createdDialog;
if (!PyArg_ParseTuple(_args, "l",
&createdDialog))
return NULL;
_err = QTIsStandardParameterDialogEvent(&pEvent,
createdDialog);
if (_err != noErr) return PyMac_Error(_err);
_res = Py_BuildValue("O&",
PyMac_BuildEventRecord, &pEvent);
return _res;
}
static PyObject *Qt_QTDismissStandardParameterDialog(_self, _args)
PyObject *_self;
PyObject *_args;
{
PyObject *_res = NULL;
OSErr _err;
QTParameterDialog createdDialog;
if (!PyArg_ParseTuple(_args, "l",
&createdDialog))
return NULL;
_err = QTDismissStandardParameterDialog(createdDialog);
if (_err != noErr) return PyMac_Error(_err);
Py_INCREF(Py_None);
_res = Py_None;
return _res;
}
static PyObject *Qt_QTStandardParameterDialogDoAction(_self, _args)
PyObject *_self;
PyObject *_args;
{
PyObject *_res = NULL;
OSErr _err;
QTParameterDialog createdDialog;
long action;
void * params;
if (!PyArg_ParseTuple(_args, "lls",
&createdDialog,
&action,
&params))
return NULL;
_err = QTStandardParameterDialogDoAction(createdDialog,
action,
params);
if (_err != noErr) return PyMac_Error(_err);
Py_INCREF(Py_None);
_res = Py_None;
return _res;
}
static PyObject *Qt_QTRegisterAccessKey(_self, _args)
PyObject *_self;
PyObject *_args;
{
PyObject *_res = NULL;
OSErr _err;
Str255 accessKeyType;
long flags;
Handle accessKey;
if (!PyArg_ParseTuple(_args, "O&lO&",
PyMac_GetStr255, accessKeyType,
&flags,
ResObj_Convert, &accessKey))
return NULL;
_err = QTRegisterAccessKey(accessKeyType,
flags,
accessKey);
if (_err != noErr) return PyMac_Error(_err);
Py_INCREF(Py_None);
_res = Py_None;
return _res;
}
static PyObject *Qt_QTUnregisterAccessKey(_self, _args)
PyObject *_self;
PyObject *_args;
{
PyObject *_res = NULL;
OSErr _err;
Str255 accessKeyType;
long flags;
Handle accessKey;
if (!PyArg_ParseTuple(_args, "O&lO&",
PyMac_GetStr255, accessKeyType,
&flags,
ResObj_Convert, &accessKey))
return NULL;
_err = QTUnregisterAccessKey(accessKeyType,
flags,
accessKey);
if (_err != noErr) return PyMac_Error(_err);
Py_INCREF(Py_None);
_res = Py_None;
return _res;
}
static PyObject *Qt_QTTextToNativeText(_self, _args)
PyObject *_self;
PyObject *_args;
{
PyObject *_res = NULL;
OSErr _err;
Handle theText;
long encoding;
long flags;
if (!PyArg_ParseTuple(_args, "O&ll",
ResObj_Convert, &theText,
&encoding,
&flags))
return NULL;
_err = QTTextToNativeText(theText,
encoding,
flags);
if (_err != noErr) return PyMac_Error(_err);
Py_INCREF(Py_None);
_res = Py_None;
return _res;
}
static PyObject *Qt_VideoMediaResetStatistics(_self, _args)
PyObject *_self;
PyObject *_args;
{
PyObject *_res = NULL;
ComponentResult _rv;
MediaHandler mh;
if (!PyArg_ParseTuple(_args, "O&",
CmpInstObj_Convert, &mh))
return NULL;
_rv = VideoMediaResetStatistics(mh);
_res = Py_BuildValue("l",
_rv);
return _res;
}
static PyObject *Qt_VideoMediaGetStatistics(_self, _args)
PyObject *_self;
PyObject *_args;
{
PyObject *_res = NULL;
ComponentResult _rv;
MediaHandler mh;
if (!PyArg_ParseTuple(_args, "O&",
CmpInstObj_Convert, &mh))
return NULL;
_rv = VideoMediaGetStatistics(mh);
_res = Py_BuildValue("l",
_rv);
return _res;
}
static PyObject *Qt_TextMediaAddTextSample(_self, _args)
PyObject *_self;
PyObject *_args;
{
PyObject *_res = NULL;
ComponentResult _rv;
MediaHandler mh;
Ptr text;
unsigned long size;
short fontNumber;
short fontSize;
Style textFace;
RGBColor textColor;
RGBColor backColor;
short textJustification;
Rect textBox;
long displayFlags;
TimeValue scrollDelay;
short hiliteStart;
short hiliteEnd;
RGBColor rgbHiliteColor;
TimeValue duration;
TimeValue sampleTime;
if (!PyArg_ParseTuple(_args, "O&slhhbhllhhl",
CmpInstObj_Convert, &mh,
&text,
&size,
&fontNumber,
&fontSize,
&textFace,
&textJustification,
&displayFlags,
&scrollDelay,
&hiliteStart,
&hiliteEnd,
&duration))
return NULL;
_rv = TextMediaAddTextSample(mh,
text,
size,
fontNumber,
fontSize,
textFace,
&textColor,
&backColor,
textJustification,
&textBox,
displayFlags,
scrollDelay,
hiliteStart,
hiliteEnd,
&rgbHiliteColor,
duration,
&sampleTime);
_res = Py_BuildValue("lO&O&O&O&l",
_rv,
QdRGB_New, &textColor,
QdRGB_New, &backColor,
PyMac_BuildRect, &textBox,
QdRGB_New, &rgbHiliteColor,
sampleTime);
return _res;
}
static PyObject *Qt_TextMediaAddTESample(_self, _args)
PyObject *_self;
PyObject *_args;
{
PyObject *_res = NULL;
ComponentResult _rv;
MediaHandler mh;
TEHandle hTE;
RGBColor backColor;
short textJustification;
Rect textBox;
long displayFlags;
TimeValue scrollDelay;
short hiliteStart;
short hiliteEnd;
RGBColor rgbHiliteColor;
TimeValue duration;
TimeValue sampleTime;
if (!PyArg_ParseTuple(_args, "O&O&hllhhl",
CmpInstObj_Convert, &mh,
ResObj_Convert, &hTE,
&textJustification,
&displayFlags,
&scrollDelay,
&hiliteStart,
&hiliteEnd,
&duration))
return NULL;
_rv = TextMediaAddTESample(mh,
hTE,
&backColor,
textJustification,
&textBox,
displayFlags,
scrollDelay,
hiliteStart,
hiliteEnd,
&rgbHiliteColor,
duration,
&sampleTime);
_res = Py_BuildValue("lO&O&O&l",
_rv,
QdRGB_New, &backColor,
PyMac_BuildRect, &textBox,
QdRGB_New, &rgbHiliteColor,
sampleTime);
return _res;
}
static PyObject *Qt_TextMediaAddHiliteSample(_self, _args)
PyObject *_self;
PyObject *_args;
{
PyObject *_res = NULL;
ComponentResult _rv;
MediaHandler mh;
short hiliteStart;
short hiliteEnd;
RGBColor rgbHiliteColor;
TimeValue duration;
TimeValue sampleTime;
if (!PyArg_ParseTuple(_args, "O&hhl",
CmpInstObj_Convert, &mh,
&hiliteStart,
&hiliteEnd,
&duration))
return NULL;
_rv = TextMediaAddHiliteSample(mh,
hiliteStart,
hiliteEnd,
&rgbHiliteColor,
duration,
&sampleTime);
_res = Py_BuildValue("lO&l",
_rv,
QdRGB_New, &rgbHiliteColor,
sampleTime);
return _res;
}
static PyObject *Qt_TextMediaFindNextText(_self, _args)
PyObject *_self;
PyObject *_args;
{
PyObject *_res = NULL;
ComponentResult _rv;
MediaHandler mh;
Ptr text;
long size;
short findFlags;
TimeValue startTime;
TimeValue foundTime;
TimeValue foundDuration;
long offset;
if (!PyArg_ParseTuple(_args, "O&slhl",
CmpInstObj_Convert, &mh,
&text,
&size,
&findFlags,
&startTime))
return NULL;
_rv = TextMediaFindNextText(mh,
text,
size,
findFlags,
startTime,
&foundTime,
&foundDuration,
&offset);
_res = Py_BuildValue("llll",
_rv,
foundTime,
foundDuration,
offset);
return _res;
}
static PyObject *Qt_TextMediaHiliteTextSample(_self, _args)
PyObject *_self;
PyObject *_args;
{
PyObject *_res = NULL;
ComponentResult _rv;
MediaHandler mh;
TimeValue sampleTime;
short hiliteStart;
short hiliteEnd;
RGBColor rgbHiliteColor;
if (!PyArg_ParseTuple(_args, "O&lhh",
CmpInstObj_Convert, &mh,
&sampleTime,
&hiliteStart,
&hiliteEnd))
return NULL;
_rv = TextMediaHiliteTextSample(mh,
sampleTime,
hiliteStart,
hiliteEnd,
&rgbHiliteColor);
_res = Py_BuildValue("lO&",
_rv,
QdRGB_New, &rgbHiliteColor);
return _res;
}
static PyObject *Qt_TextMediaSetTextSampleData(_self, _args)
PyObject *_self;
PyObject *_args;
{
PyObject *_res = NULL;
ComponentResult _rv;
MediaHandler mh;
void * data;
OSType dataType;
if (!PyArg_ParseTuple(_args, "O&sO&",
CmpInstObj_Convert, &mh,
&data,
PyMac_GetOSType, &dataType))
return NULL;
_rv = TextMediaSetTextSampleData(mh,
data,
dataType);
_res = Py_BuildValue("l",
_rv);
return _res;
}
static PyObject *Qt_SpriteMediaSetProperty(_self, _args)
PyObject *_self;
PyObject *_args;
{
PyObject *_res = NULL;
ComponentResult _rv;
MediaHandler mh;
short spriteIndex;
long propertyType;
void * propertyValue;
if (!PyArg_ParseTuple(_args, "O&hls",
CmpInstObj_Convert, &mh,
&spriteIndex,
&propertyType,
&propertyValue))
return NULL;
_rv = SpriteMediaSetProperty(mh,
spriteIndex,
propertyType,
propertyValue);
_res = Py_BuildValue("l",
_rv);
return _res;
}
static PyObject *Qt_SpriteMediaGetProperty(_self, _args)
PyObject *_self;
PyObject *_args;
{
PyObject *_res = NULL;
ComponentResult _rv;
MediaHandler mh;
short spriteIndex;
long propertyType;
void * propertyValue;
if (!PyArg_ParseTuple(_args, "O&hls",
CmpInstObj_Convert, &mh,
&spriteIndex,
&propertyType,
&propertyValue))
return NULL;
_rv = SpriteMediaGetProperty(mh,
spriteIndex,
propertyType,
propertyValue);
_res = Py_BuildValue("l",
_rv);
return _res;
}
static PyObject *Qt_SpriteMediaHitTestSprites(_self, _args)
PyObject *_self;
PyObject *_args;
{
PyObject *_res = NULL;
ComponentResult _rv;
MediaHandler mh;
long flags;
Point loc;
short spriteHitIndex;
if (!PyArg_ParseTuple(_args, "O&lO&",
CmpInstObj_Convert, &mh,
&flags,
PyMac_GetPoint, &loc))
return NULL;
_rv = SpriteMediaHitTestSprites(mh,
flags,
loc,
&spriteHitIndex);
_res = Py_BuildValue("lh",
_rv,
spriteHitIndex);
return _res;
}
static PyObject *Qt_SpriteMediaCountSprites(_self, _args)
PyObject *_self;
PyObject *_args;
{
PyObject *_res = NULL;
ComponentResult _rv;
MediaHandler mh;
short numSprites;
if (!PyArg_ParseTuple(_args, "O&",
CmpInstObj_Convert, &mh))
return NULL;
_rv = SpriteMediaCountSprites(mh,
&numSprites);
_res = Py_BuildValue("lh",
_rv,
numSprites);
return _res;
}
static PyObject *Qt_SpriteMediaCountImages(_self, _args)
PyObject *_self;
PyObject *_args;
{
PyObject *_res = NULL;
ComponentResult _rv;
MediaHandler mh;
short numImages;
if (!PyArg_ParseTuple(_args, "O&",
CmpInstObj_Convert, &mh))
return NULL;
_rv = SpriteMediaCountImages(mh,
&numImages);
_res = Py_BuildValue("lh",
_rv,
numImages);
return _res;
}
static PyObject *Qt_SpriteMediaGetIndImageDescription(_self, _args)
PyObject *_self;
PyObject *_args;
{
PyObject *_res = NULL;
ComponentResult _rv;
MediaHandler mh;
short imageIndex;
ImageDescriptionHandle imageDescription;
if (!PyArg_ParseTuple(_args, "O&hO&",
CmpInstObj_Convert, &mh,
&imageIndex,
ResObj_Convert, &imageDescription))
return NULL;
_rv = SpriteMediaGetIndImageDescription(mh,
imageIndex,
imageDescription);
_res = Py_BuildValue("l",
_rv);
return _res;
}
static PyObject *Qt_SpriteMediaGetDisplayedSampleNumber(_self, _args)
PyObject *_self;
PyObject *_args;
{
PyObject *_res = NULL;
ComponentResult _rv;
MediaHandler mh;
long sampleNum;
if (!PyArg_ParseTuple(_args, "O&",
CmpInstObj_Convert, &mh))
return NULL;
_rv = SpriteMediaGetDisplayedSampleNumber(mh,
&sampleNum);
_res = Py_BuildValue("ll",
_rv,
sampleNum);
return _res;
}
static PyObject *Qt_SpriteMediaGetSpriteName(_self, _args)
PyObject *_self;
PyObject *_args;
{
PyObject *_res = NULL;
ComponentResult _rv;
MediaHandler mh;
QTAtomID spriteID;
Str255 spriteName;
if (!PyArg_ParseTuple(_args, "O&lO&",
CmpInstObj_Convert, &mh,
&spriteID,
PyMac_GetStr255, spriteName))
return NULL;
_rv = SpriteMediaGetSpriteName(mh,
spriteID,
spriteName);
_res = Py_BuildValue("l",
_rv);
return _res;
}
static PyObject *Qt_SpriteMediaGetImageName(_self, _args)
PyObject *_self;
PyObject *_args;
{
PyObject *_res = NULL;
ComponentResult _rv;
MediaHandler mh;
short imageIndex;
Str255 imageName;
if (!PyArg_ParseTuple(_args, "O&hO&",
CmpInstObj_Convert, &mh,
&imageIndex,
PyMac_GetStr255, imageName))
return NULL;
_rv = SpriteMediaGetImageName(mh,
imageIndex,
imageName);
_res = Py_BuildValue("l",
_rv);
return _res;
}
static PyObject *Qt_SpriteMediaSetSpriteProperty(_self, _args)
PyObject *_self;
PyObject *_args;
{
PyObject *_res = NULL;
ComponentResult _rv;
MediaHandler mh;
QTAtomID spriteID;
long propertyType;
void * propertyValue;
if (!PyArg_ParseTuple(_args, "O&lls",
CmpInstObj_Convert, &mh,
&spriteID,
&propertyType,
&propertyValue))
return NULL;
_rv = SpriteMediaSetSpriteProperty(mh,
spriteID,
propertyType,
propertyValue);
_res = Py_BuildValue("l",
_rv);
return _res;
}
static PyObject *Qt_SpriteMediaGetSpriteProperty(_self, _args)
PyObject *_self;
PyObject *_args;
{
PyObject *_res = NULL;
ComponentResult _rv;
MediaHandler mh;
QTAtomID spriteID;
long propertyType;
void * propertyValue;
if (!PyArg_ParseTuple(_args, "O&lls",
CmpInstObj_Convert, &mh,
&spriteID,
&propertyType,
&propertyValue))
return NULL;
_rv = SpriteMediaGetSpriteProperty(mh,
spriteID,
propertyType,
propertyValue);
_res = Py_BuildValue("l",
_rv);
return _res;
}
static PyObject *Qt_SpriteMediaHitTestAllSprites(_self, _args)
PyObject *_self;
PyObject *_args;
{
PyObject *_res = NULL;
ComponentResult _rv;
MediaHandler mh;
long flags;
Point loc;
QTAtomID spriteHitID;
if (!PyArg_ParseTuple(_args, "O&lO&",
CmpInstObj_Convert, &mh,
&flags,
PyMac_GetPoint, &loc))
return NULL;
_rv = SpriteMediaHitTestAllSprites(mh,
flags,
loc,
&spriteHitID);
_res = Py_BuildValue("ll",
_rv,
spriteHitID);
return _res;
}
static PyObject *Qt_SpriteMediaHitTestOneSprite(_self, _args)
PyObject *_self;
PyObject *_args;
{
PyObject *_res = NULL;
ComponentResult _rv;
MediaHandler mh;
QTAtomID spriteID;
long flags;
Point loc;
Boolean wasHit;
if (!PyArg_ParseTuple(_args, "O&llO&",
CmpInstObj_Convert, &mh,
&spriteID,
&flags,
PyMac_GetPoint, &loc))
return NULL;
_rv = SpriteMediaHitTestOneSprite(mh,
spriteID,
flags,
loc,
&wasHit);
_res = Py_BuildValue("lb",
_rv,
wasHit);
return _res;
}
static PyObject *Qt_SpriteMediaSpriteIndexToID(_self, _args)
PyObject *_self;
PyObject *_args;
{
PyObject *_res = NULL;
ComponentResult _rv;
MediaHandler mh;
short spriteIndex;
QTAtomID spriteID;
if (!PyArg_ParseTuple(_args, "O&h",
CmpInstObj_Convert, &mh,
&spriteIndex))
return NULL;
_rv = SpriteMediaSpriteIndexToID(mh,
spriteIndex,
&spriteID);
_res = Py_BuildValue("ll",
_rv,
spriteID);
return _res;
}
static PyObject *Qt_SpriteMediaSpriteIDToIndex(_self, _args)
PyObject *_self;
PyObject *_args;
{
PyObject *_res = NULL;
ComponentResult _rv;
MediaHandler mh;
QTAtomID spriteID;
short spriteIndex;
if (!PyArg_ParseTuple(_args, "O&l",
CmpInstObj_Convert, &mh,
&spriteID))
return NULL;
_rv = SpriteMediaSpriteIDToIndex(mh,
spriteID,
&spriteIndex);
_res = Py_BuildValue("lh",
_rv,
spriteIndex);
return _res;
}
static PyObject *Qt_SpriteMediaSetActionVariable(_self, _args)
PyObject *_self;
PyObject *_args;
{
PyObject *_res = NULL;
ComponentResult _rv;
MediaHandler mh;
QTAtomID variableID;
float value;
if (!PyArg_ParseTuple(_args, "O&lf",
CmpInstObj_Convert, &mh,
&variableID,
&value))
return NULL;
_rv = SpriteMediaSetActionVariable(mh,
variableID,
&value);
_res = Py_BuildValue("l",
_rv);
return _res;
}
static PyObject *Qt_SpriteMediaGetActionVariable(_self, _args)
PyObject *_self;
PyObject *_args;
{
PyObject *_res = NULL;
ComponentResult _rv;
MediaHandler mh;
QTAtomID variableID;
float value;
if (!PyArg_ParseTuple(_args, "O&l",
CmpInstObj_Convert, &mh,
&variableID))
return NULL;
_rv = SpriteMediaGetActionVariable(mh,
variableID,
&value);
_res = Py_BuildValue("lf",
_rv,
value);
return _res;
}
static PyObject *Qt_SpriteMediaGetIndImageProperty(_self, _args)
PyObject *_self;
PyObject *_args;
{
PyObject *_res = NULL;
ComponentResult _rv;
MediaHandler mh;
short imageIndex;
long imagePropertyType;
void * imagePropertyValue;
if (!PyArg_ParseTuple(_args, "O&hls",
CmpInstObj_Convert, &mh,
&imageIndex,
&imagePropertyType,
&imagePropertyValue))
return NULL;
_rv = SpriteMediaGetIndImageProperty(mh,
imageIndex,
imagePropertyType,
imagePropertyValue);
_res = Py_BuildValue("l",
_rv);
return _res;
}
static PyObject *Qt_NewTimeBase(_self, _args)
PyObject *_self;
PyObject *_args;
{
PyObject *_res = NULL;
TimeBase _rv;
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = NewTimeBase();
_res = Py_BuildValue("O&",
TimeBaseObj_New, _rv);
return _res;
}
static PyObject *Qt_MusicMediaGetIndexedTunePlayer(_self, _args)
PyObject *_self;
PyObject *_args;
{
PyObject *_res = NULL;
ComponentResult _rv;
ComponentInstance ti;
long sampleDescIndex;
ComponentInstance tp;
if (!PyArg_ParseTuple(_args, "O&l",
CmpInstObj_Convert, &ti,
&sampleDescIndex))
return NULL;
_rv = MusicMediaGetIndexedTunePlayer(ti,
sampleDescIndex,
&tp);
_res = Py_BuildValue("lO&",
_rv,
CmpInstObj_New, tp);
return _res; return _res;
} }
...@@ -5997,6 +7282,8 @@ static PyMethodDef Qt_methods[] = { ...@@ -5997,6 +7282,8 @@ static PyMethodDef Qt_methods[] = {
"(Handle dataRef, OSType dataHandlerSubType, long flags) -> (Component _rv)"}, "(Handle dataRef, OSType dataHandlerSubType, long flags) -> (Component _rv)"},
{"PasteHandleIntoMovie", (PyCFunction)Qt_PasteHandleIntoMovie, 1, {"PasteHandleIntoMovie", (PyCFunction)Qt_PasteHandleIntoMovie, 1,
"(Handle h, OSType handleType, Movie theMovie, long flags, ComponentInstance userComp) -> None"}, "(Handle h, OSType handleType, Movie theMovie, long flags, ComponentInstance userComp) -> None"},
{"GetMovieImporterForDataRef", (PyCFunction)Qt_GetMovieImporterForDataRef, 1,
"(OSType dataRefType, Handle dataRef, long flags) -> (Component importer)"},
{"TrackTimeToMediaTime", (PyCFunction)Qt_TrackTimeToMediaTime, 1, {"TrackTimeToMediaTime", (PyCFunction)Qt_TrackTimeToMediaTime, 1,
"(TimeValue value, Track theTrack) -> (TimeValue _rv)"}, "(TimeValue value, Track theTrack) -> (TimeValue _rv)"},
{"NewUserData", (PyCFunction)Qt_NewUserData, 1, {"NewUserData", (PyCFunction)Qt_NewUserData, 1,
...@@ -6017,12 +7304,90 @@ static PyMethodDef Qt_methods[] = { ...@@ -6017,12 +7304,90 @@ static PyMethodDef Qt_methods[] = {
"(Handle h, short newMovieFlags) -> (Movie theMovie, Boolean dataRefWasChanged)"}, "(Handle h, short newMovieFlags) -> (Movie theMovie, Boolean dataRefWasChanged)"},
{"NewMovieFromDataFork", (PyCFunction)Qt_NewMovieFromDataFork, 1, {"NewMovieFromDataFork", (PyCFunction)Qt_NewMovieFromDataFork, 1,
"(short fRefNum, long fileOffset, short newMovieFlags) -> (Movie theMovie, Boolean dataRefWasChanged)"}, "(short fRefNum, long fileOffset, short newMovieFlags) -> (Movie theMovie, Boolean dataRefWasChanged)"},
{"NewMovieFromDataRef", (PyCFunction)Qt_NewMovieFromDataRef, 1,
"(short flags, Handle dataRef, OSType dataRefType) -> (Movie m, short id)"},
{"RemoveMovieResource", (PyCFunction)Qt_RemoveMovieResource, 1, {"RemoveMovieResource", (PyCFunction)Qt_RemoveMovieResource, 1,
"(short resRefNum, short resId) -> None"}, "(short resRefNum, short resId) -> None"},
{"NewMovieFromScrap", (PyCFunction)Qt_NewMovieFromScrap, 1, {"NewMovieFromScrap", (PyCFunction)Qt_NewMovieFromScrap, 1,
"(long newMovieFlags) -> (Movie _rv)"}, "(long newMovieFlags) -> (Movie _rv)"},
{"QTNewAlias", (PyCFunction)Qt_QTNewAlias, 1,
"(FSSpec fss, Boolean minimal) -> (AliasHandle alias)"},
{"EndFullScreen", (PyCFunction)Qt_EndFullScreen, 1,
"(Ptr fullState, long flags) -> None"},
{"AddSoundDescriptionExtension", (PyCFunction)Qt_AddSoundDescriptionExtension, 1,
"(SoundDescriptionHandle desc, Handle extension, OSType idType) -> None"},
{"GetSoundDescriptionExtension", (PyCFunction)Qt_GetSoundDescriptionExtension, 1,
"(SoundDescriptionHandle desc, OSType idType) -> (Handle extension)"},
{"RemoveSoundDescriptionExtension", (PyCFunction)Qt_RemoveSoundDescriptionExtension, 1,
"(SoundDescriptionHandle desc, OSType idType) -> None"},
{"QTIsStandardParameterDialogEvent", (PyCFunction)Qt_QTIsStandardParameterDialogEvent, 1,
"(QTParameterDialog createdDialog) -> (EventRecord pEvent)"},
{"QTDismissStandardParameterDialog", (PyCFunction)Qt_QTDismissStandardParameterDialog, 1,
"(QTParameterDialog createdDialog) -> None"},
{"QTStandardParameterDialogDoAction", (PyCFunction)Qt_QTStandardParameterDialogDoAction, 1,
"(QTParameterDialog createdDialog, long action, void * params) -> None"},
{"QTRegisterAccessKey", (PyCFunction)Qt_QTRegisterAccessKey, 1,
"(Str255 accessKeyType, long flags, Handle accessKey) -> None"},
{"QTUnregisterAccessKey", (PyCFunction)Qt_QTUnregisterAccessKey, 1,
"(Str255 accessKeyType, long flags, Handle accessKey) -> None"},
{"QTTextToNativeText", (PyCFunction)Qt_QTTextToNativeText, 1,
"(Handle theText, long encoding, long flags) -> None"},
{"VideoMediaResetStatistics", (PyCFunction)Qt_VideoMediaResetStatistics, 1,
"(MediaHandler mh) -> (ComponentResult _rv)"},
{"VideoMediaGetStatistics", (PyCFunction)Qt_VideoMediaGetStatistics, 1,
"(MediaHandler mh) -> (ComponentResult _rv)"},
{"TextMediaAddTextSample", (PyCFunction)Qt_TextMediaAddTextSample, 1,
"(MediaHandler mh, Ptr text, unsigned long size, short fontNumber, short fontSize, Style textFace, short textJustification, long displayFlags, TimeValue scrollDelay, short hiliteStart, short hiliteEnd, TimeValue duration) -> (ComponentResult _rv, RGBColor textColor, RGBColor backColor, Rect textBox, RGBColor rgbHiliteColor, TimeValue sampleTime)"},
{"TextMediaAddTESample", (PyCFunction)Qt_TextMediaAddTESample, 1,
"(MediaHandler mh, TEHandle hTE, short textJustification, long displayFlags, TimeValue scrollDelay, short hiliteStart, short hiliteEnd, TimeValue duration) -> (ComponentResult _rv, RGBColor backColor, Rect textBox, RGBColor rgbHiliteColor, TimeValue sampleTime)"},
{"TextMediaAddHiliteSample", (PyCFunction)Qt_TextMediaAddHiliteSample, 1,
"(MediaHandler mh, short hiliteStart, short hiliteEnd, TimeValue duration) -> (ComponentResult _rv, RGBColor rgbHiliteColor, TimeValue sampleTime)"},
{"TextMediaFindNextText", (PyCFunction)Qt_TextMediaFindNextText, 1,
"(MediaHandler mh, Ptr text, long size, short findFlags, TimeValue startTime) -> (ComponentResult _rv, TimeValue foundTime, TimeValue foundDuration, long offset)"},
{"TextMediaHiliteTextSample", (PyCFunction)Qt_TextMediaHiliteTextSample, 1,
"(MediaHandler mh, TimeValue sampleTime, short hiliteStart, short hiliteEnd) -> (ComponentResult _rv, RGBColor rgbHiliteColor)"},
{"TextMediaSetTextSampleData", (PyCFunction)Qt_TextMediaSetTextSampleData, 1,
"(MediaHandler mh, void * data, OSType dataType) -> (ComponentResult _rv)"},
{"SpriteMediaSetProperty", (PyCFunction)Qt_SpriteMediaSetProperty, 1,
"(MediaHandler mh, short spriteIndex, long propertyType, void * propertyValue) -> (ComponentResult _rv)"},
{"SpriteMediaGetProperty", (PyCFunction)Qt_SpriteMediaGetProperty, 1,
"(MediaHandler mh, short spriteIndex, long propertyType, void * propertyValue) -> (ComponentResult _rv)"},
{"SpriteMediaHitTestSprites", (PyCFunction)Qt_SpriteMediaHitTestSprites, 1,
"(MediaHandler mh, long flags, Point loc) -> (ComponentResult _rv, short spriteHitIndex)"},
{"SpriteMediaCountSprites", (PyCFunction)Qt_SpriteMediaCountSprites, 1,
"(MediaHandler mh) -> (ComponentResult _rv, short numSprites)"},
{"SpriteMediaCountImages", (PyCFunction)Qt_SpriteMediaCountImages, 1,
"(MediaHandler mh) -> (ComponentResult _rv, short numImages)"},
{"SpriteMediaGetIndImageDescription", (PyCFunction)Qt_SpriteMediaGetIndImageDescription, 1,
"(MediaHandler mh, short imageIndex, ImageDescriptionHandle imageDescription) -> (ComponentResult _rv)"},
{"SpriteMediaGetDisplayedSampleNumber", (PyCFunction)Qt_SpriteMediaGetDisplayedSampleNumber, 1,
"(MediaHandler mh) -> (ComponentResult _rv, long sampleNum)"},
{"SpriteMediaGetSpriteName", (PyCFunction)Qt_SpriteMediaGetSpriteName, 1,
"(MediaHandler mh, QTAtomID spriteID, Str255 spriteName) -> (ComponentResult _rv)"},
{"SpriteMediaGetImageName", (PyCFunction)Qt_SpriteMediaGetImageName, 1,
"(MediaHandler mh, short imageIndex, Str255 imageName) -> (ComponentResult _rv)"},
{"SpriteMediaSetSpriteProperty", (PyCFunction)Qt_SpriteMediaSetSpriteProperty, 1,
"(MediaHandler mh, QTAtomID spriteID, long propertyType, void * propertyValue) -> (ComponentResult _rv)"},
{"SpriteMediaGetSpriteProperty", (PyCFunction)Qt_SpriteMediaGetSpriteProperty, 1,
"(MediaHandler mh, QTAtomID spriteID, long propertyType, void * propertyValue) -> (ComponentResult _rv)"},
{"SpriteMediaHitTestAllSprites", (PyCFunction)Qt_SpriteMediaHitTestAllSprites, 1,
"(MediaHandler mh, long flags, Point loc) -> (ComponentResult _rv, QTAtomID spriteHitID)"},
{"SpriteMediaHitTestOneSprite", (PyCFunction)Qt_SpriteMediaHitTestOneSprite, 1,
"(MediaHandler mh, QTAtomID spriteID, long flags, Point loc) -> (ComponentResult _rv, Boolean wasHit)"},
{"SpriteMediaSpriteIndexToID", (PyCFunction)Qt_SpriteMediaSpriteIndexToID, 1,
"(MediaHandler mh, short spriteIndex) -> (ComponentResult _rv, QTAtomID spriteID)"},
{"SpriteMediaSpriteIDToIndex", (PyCFunction)Qt_SpriteMediaSpriteIDToIndex, 1,
"(MediaHandler mh, QTAtomID spriteID) -> (ComponentResult _rv, short spriteIndex)"},
{"SpriteMediaSetActionVariable", (PyCFunction)Qt_SpriteMediaSetActionVariable, 1,
"(MediaHandler mh, QTAtomID variableID, float value) -> (ComponentResult _rv)"},
{"SpriteMediaGetActionVariable", (PyCFunction)Qt_SpriteMediaGetActionVariable, 1,
"(MediaHandler mh, QTAtomID variableID) -> (ComponentResult _rv, float value)"},
{"SpriteMediaGetIndImageProperty", (PyCFunction)Qt_SpriteMediaGetIndImageProperty, 1,
"(MediaHandler mh, short imageIndex, long imagePropertyType, void * imagePropertyValue) -> (ComponentResult _rv)"},
{"NewTimeBase", (PyCFunction)Qt_NewTimeBase, 1, {"NewTimeBase", (PyCFunction)Qt_NewTimeBase, 1,
"() -> (TimeBase _rv)"}, "() -> (TimeBase _rv)"},
{"MusicMediaGetIndexedTunePlayer", (PyCFunction)Qt_MusicMediaGetIndexedTunePlayer, 1,
"(ComponentInstance ti, long sampleDescIndex) -> (ComponentResult _rv, ComponentInstance tp)"},
{"AlignWindow", (PyCFunction)Qt_AlignWindow, 1, {"AlignWindow", (PyCFunction)Qt_AlignWindow, 1,
"(WindowPtr wp, Boolean front) -> None"}, "(WindowPtr wp, Boolean front) -> None"},
{"DragAlignedWindow", (PyCFunction)Qt_DragAlignedWindow, 1, {"DragAlignedWindow", (PyCFunction)Qt_DragAlignedWindow, 1,
......
...@@ -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,7 +531,7 @@ static PyObject *WinObj_MoveWindow(_self, _args) ...@@ -518,7 +531,7 @@ 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);
...@@ -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,7 +1262,7 @@ static PyObject *Win_FindWindow(_self, _args) ...@@ -1247,7 +1262,7 @@ 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,
...@@ -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