Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1c4e614

Browse files
committed
Re-generated from new (3.1) universal headers
1 parent 02facaf commit 1c4e614

13 files changed

Lines changed: 1684 additions & 203 deletions

File tree

Mac/Modules/cm/Cmmodule.c

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -469,6 +469,67 @@ static PyObject *CmpObj_OpenComponentResFile(_self, _args)
469469
return _res;
470470
}
471471

472+
static PyObject *CmpObj_GetComponentResource(_self, _args)
473+
ComponentObject *_self;
474+
PyObject *_args;
475+
{
476+
PyObject *_res = NULL;
477+
OSErr _err;
478+
OSType resType;
479+
short resID;
480+
Handle theResource;
481+
if (!PyArg_ParseTuple(_args, "O&h",
482+
PyMac_GetOSType, &resType,
483+
&resID))
484+
return NULL;
485+
_err = GetComponentResource(_self->ob_itself,
486+
resType,
487+
resID,
488+
&theResource);
489+
if (_err != noErr) return PyMac_Error(_err);
490+
_res = Py_BuildValue("O&",
491+
ResObj_New, theResource);
492+
return _res;
493+
}
494+
495+
static PyObject *CmpObj_GetComponentIndString(_self, _args)
496+
ComponentObject *_self;
497+
PyObject *_args;
498+
{
499+
PyObject *_res = NULL;
500+
OSErr _err;
501+
Str255 theString;
502+
short strListID;
503+
short index;
504+
if (!PyArg_ParseTuple(_args, "O&hh",
505+
PyMac_GetStr255, theString,
506+
&strListID,
507+
&index))
508+
return NULL;
509+
_err = GetComponentIndString(_self->ob_itself,
510+
theString,
511+
strListID,
512+
index);
513+
if (_err != noErr) return PyMac_Error(_err);
514+
Py_INCREF(Py_None);
515+
_res = Py_None;
516+
return _res;
517+
}
518+
519+
static PyObject *CmpObj_ResolveComponentAlias(_self, _args)
520+
ComponentObject *_self;
521+
PyObject *_args;
522+
{
523+
PyObject *_res = NULL;
524+
Component _rv;
525+
if (!PyArg_ParseTuple(_args, ""))
526+
return NULL;
527+
_rv = ResolveComponentAlias(_self->ob_itself);
528+
_res = Py_BuildValue("O&",
529+
CmpObj_New, _rv);
530+
return _res;
531+
}
532+
472533
static PyObject *CmpObj_CountComponentInstances(_self, _args)
473534
ComponentObject *_self;
474535
PyObject *_args;
@@ -563,6 +624,12 @@ static PyMethodDef CmpObj_methods[] = {
563624
"(long theRefcon) -> None"},
564625
{"OpenComponentResFile", (PyCFunction)CmpObj_OpenComponentResFile, 1,
565626
"() -> (short _rv)"},
627+
{"GetComponentResource", (PyCFunction)CmpObj_GetComponentResource, 1,
628+
"(OSType resType, short resID) -> (Handle theResource)"},
629+
{"GetComponentIndString", (PyCFunction)CmpObj_GetComponentIndString, 1,
630+
"(Str255 theString, short strListID, short index) -> None"},
631+
{"ResolveComponentAlias", (PyCFunction)CmpObj_ResolveComponentAlias, 1,
632+
"() -> (Component _rv)"},
566633
{"CountComponentInstances", (PyCFunction)CmpObj_CountComponentInstances, 1,
567634
"() -> (long _rv)"},
568635
{"SetDefaultComponent", (PyCFunction)CmpObj_SetDefaultComponent, 1,

Mac/Modules/ctl/ctlscan.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ def makeblacklistnames(self):
5555
'GetTabContentRect',
5656
'SetTabEnabled',
5757
'SetDisclosureTriangleLastValue',
58+
# Unavailable in CW Pro 3 libraries
59+
'SetUpControlTextColor',
5860
]
5961

6062
def makeblacklisttypes(self):

Mac/Modules/dlg/Dlgmodule.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -545,17 +545,17 @@ static PyObject *DlgObj_SizeDialogItem(_self, _args)
545545
PyObject *_res = NULL;
546546
OSErr _err;
547547
SInt16 inItemNo;
548-
SInt16 inHeight;
549548
SInt16 inWidth;
549+
SInt16 inHeight;
550550
if (!PyArg_ParseTuple(_args, "hhh",
551551
&inItemNo,
552-
&inHeight,
553-
&inWidth))
552+
&inWidth,
553+
&inHeight))
554554
return NULL;
555555
_err = SizeDialogItem(_self->ob_itself,
556556
inItemNo,
557-
inHeight,
558-
inWidth);
557+
inWidth,
558+
inHeight);
559559
if (_err != noErr) return PyMac_Error(_err);
560560
Py_INCREF(Py_None);
561561
_res = Py_None;
@@ -677,7 +677,7 @@ static PyMethodDef DlgObj_methods[] = {
677677
{"MoveDialogItem", (PyCFunction)DlgObj_MoveDialogItem, 1,
678678
"(SInt16 inItemNo, SInt16 inHoriz, SInt16 inVert) -> None"},
679679
{"SizeDialogItem", (PyCFunction)DlgObj_SizeDialogItem, 1,
680-
"(SInt16 inItemNo, SInt16 inHeight, SInt16 inWidth) -> None"},
680+
"(SInt16 inItemNo, SInt16 inWidth, SInt16 inHeight) -> None"},
681681
{"GetDialogWindow", (PyCFunction)DlgObj_GetDialogWindow, 1,
682682
"() -> (DialogPtr _rv)"},
683683
{"GetDialogDefaultItem", (PyCFunction)DlgObj_GetDialogDefaultItem, 1,

Mac/Modules/dlg/dlgscan.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,16 @@ def makeblacklistnames(self):
4949
'CouldDialog',
5050
'FreeDialog',
5151
'GetStdFilterProc',
52+
'GetDialogParent',
53+
# Can't find these in the CW Pro 3 libraries
54+
'SetDialogMovableModal',
55+
'GetDialogControlNotificationProc',
5256
]
5357

5458
def makeblacklisttypes(self):
5559
return [
5660
"AlertStdAlertParamPtr", # Too much work, for now
61+
"QTModelessCallbackProcPtr",
5762
]
5863

5964
def makerepairinstructions(self):

Mac/Modules/menu/Menumodule.c

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ static PyObject *MenuObj_DisposeMenu(_self, _args)
102102
return _res;
103103
}
104104

105-
static PyObject *MenuObj_AppendMenu(_self, _args)
105+
static PyObject *MenuObj_MacAppendMenu(_self, _args)
106106
MenuObject *_self;
107107
PyObject *_args;
108108
{
@@ -111,8 +111,8 @@ static PyObject *MenuObj_AppendMenu(_self, _args)
111111
if (!PyArg_ParseTuple(_args, "O&",
112112
PyMac_GetStr255, data))
113113
return NULL;
114-
AppendMenu(_self->ob_itself,
115-
data);
114+
MacAppendMenu(_self->ob_itself,
115+
data);
116116
Py_INCREF(Py_None);
117117
_res = Py_None;
118118
return _res;
@@ -137,7 +137,7 @@ static PyObject *MenuObj_InsertResMenu(_self, _args)
137137
return _res;
138138
}
139139

140-
static PyObject *MenuObj_InsertMenu(_self, _args)
140+
static PyObject *MenuObj_MacInsertMenu(_self, _args)
141141
MenuObject *_self;
142142
PyObject *_args;
143143
{
@@ -146,8 +146,8 @@ static PyObject *MenuObj_InsertMenu(_self, _args)
146146
if (!PyArg_ParseTuple(_args, "h",
147147
&beforeID))
148148
return NULL;
149-
InsertMenu(_self->ob_itself,
150-
beforeID);
149+
MacInsertMenu(_self->ob_itself,
150+
beforeID);
151151
Py_INCREF(Py_None);
152152
_res = Py_None;
153153
return _res;
@@ -169,7 +169,7 @@ static PyObject *MenuObj_AppendResMenu(_self, _args)
169169
return _res;
170170
}
171171

172-
static PyObject *MenuObj_InsertMenuItem(_self, _args)
172+
static PyObject *MenuObj_MacInsertMenuItem(_self, _args)
173173
MenuObject *_self;
174174
PyObject *_args;
175175
{
@@ -180,9 +180,9 @@ static PyObject *MenuObj_InsertMenuItem(_self, _args)
180180
PyMac_GetStr255, itemString,
181181
&afterItem))
182182
return NULL;
183-
InsertMenuItem(_self->ob_itself,
184-
itemString,
185-
afterItem);
183+
MacInsertMenuItem(_self->ob_itself,
184+
itemString,
185+
afterItem);
186186
Py_INCREF(Py_None);
187187
_res = Py_None;
188188
return _res;
@@ -919,15 +919,15 @@ static PyObject *MenuObj_as_Resource(_self, _args)
919919
static PyMethodDef MenuObj_methods[] = {
920920
{"DisposeMenu", (PyCFunction)MenuObj_DisposeMenu, 1,
921921
"() -> None"},
922-
{"AppendMenu", (PyCFunction)MenuObj_AppendMenu, 1,
922+
{"MacAppendMenu", (PyCFunction)MenuObj_MacAppendMenu, 1,
923923
"(Str255 data) -> None"},
924924
{"InsertResMenu", (PyCFunction)MenuObj_InsertResMenu, 1,
925925
"(ResType theType, short afterItem) -> None"},
926-
{"InsertMenu", (PyCFunction)MenuObj_InsertMenu, 1,
926+
{"MacInsertMenu", (PyCFunction)MenuObj_MacInsertMenu, 1,
927927
"(short beforeID) -> None"},
928928
{"AppendResMenu", (PyCFunction)MenuObj_AppendResMenu, 1,
929929
"(ResType theType) -> None"},
930-
{"InsertMenuItem", (PyCFunction)MenuObj_InsertMenuItem, 1,
930+
{"MacInsertMenuItem", (PyCFunction)MenuObj_MacInsertMenuItem, 1,
931931
"(Str255 itemString, short afterItem) -> None"},
932932
{"DeleteMenuItem", (PyCFunction)MenuObj_DeleteMenuItem, 1,
933933
"(short item) -> None"},
@@ -1081,7 +1081,7 @@ static PyObject *Menu_NewMenu(_self, _args)
10811081
return _res;
10821082
}
10831083

1084-
static PyObject *Menu_GetMenu(_self, _args)
1084+
static PyObject *Menu_MacGetMenu(_self, _args)
10851085
PyObject *_self;
10861086
PyObject *_args;
10871087
{
@@ -1091,13 +1091,13 @@ static PyObject *Menu_GetMenu(_self, _args)
10911091
if (!PyArg_ParseTuple(_args, "h",
10921092
&resourceID))
10931093
return NULL;
1094-
_rv = GetMenu(resourceID);
1094+
_rv = MacGetMenu(resourceID);
10951095
_res = Py_BuildValue("O&",
10961096
MenuObj_New, _rv);
10971097
return _res;
10981098
}
10991099

1100-
static PyObject *Menu_DeleteMenu(_self, _args)
1100+
static PyObject *Menu_MacDeleteMenu(_self, _args)
11011101
PyObject *_self;
11021102
PyObject *_args;
11031103
{
@@ -1106,7 +1106,7 @@ static PyObject *Menu_DeleteMenu(_self, _args)
11061106
if (!PyArg_ParseTuple(_args, "h",
11071107
&menuID))
11081108
return NULL;
1109-
DeleteMenu(menuID);
1109+
MacDeleteMenu(menuID);
11101110
Py_INCREF(Py_None);
11111111
_res = Py_None;
11121112
return _res;
@@ -1206,14 +1206,14 @@ static PyObject *Menu_DeleteMCEntries(_self, _args)
12061206
return _res;
12071207
}
12081208

1209-
static PyObject *Menu_DrawMenuBar(_self, _args)
1209+
static PyObject *Menu_MacDrawMenuBar(_self, _args)
12101210
PyObject *_self;
12111211
PyObject *_args;
12121212
{
12131213
PyObject *_res = NULL;
12141214
if (!PyArg_ParseTuple(_args, ""))
12151215
return NULL;
1216-
DrawMenuBar();
1216+
MacDrawMenuBar();
12171217
Py_INCREF(Py_None);
12181218
_res = Py_None;
12191219
return _res;
@@ -1405,9 +1405,9 @@ static PyMethodDef Menu_methods[] = {
14051405
"() -> None"},
14061406
{"NewMenu", (PyCFunction)Menu_NewMenu, 1,
14071407
"(short menuID, Str255 menuTitle) -> (MenuHandle _rv)"},
1408-
{"GetMenu", (PyCFunction)Menu_GetMenu, 1,
1408+
{"MacGetMenu", (PyCFunction)Menu_MacGetMenu, 1,
14091409
"(short resourceID) -> (MenuHandle _rv)"},
1410-
{"DeleteMenu", (PyCFunction)Menu_DeleteMenu, 1,
1410+
{"MacDeleteMenu", (PyCFunction)Menu_MacDeleteMenu, 1,
14111411
"(short menuID) -> None"},
14121412
{"MenuKey", (PyCFunction)Menu_MenuKey, 1,
14131413
"(CharParameter ch) -> (long _rv)"},
@@ -1421,7 +1421,7 @@ static PyMethodDef Menu_methods[] = {
14211421
"() -> (long _rv)"},
14221422
{"DeleteMCEntries", (PyCFunction)Menu_DeleteMCEntries, 1,
14231423
"(short menuID, short menuItem) -> None"},
1424-
{"DrawMenuBar", (PyCFunction)Menu_DrawMenuBar, 1,
1424+
{"MacDrawMenuBar", (PyCFunction)Menu_MacDrawMenuBar, 1,
14251425
"() -> None"},
14261426
{"InvalMenuBar", (PyCFunction)Menu_InvalMenuBar, 1,
14271427
"() -> None"},

Mac/Modules/menu/menuscan.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,17 @@ def destination(self, type, name, arglist):
3232

3333
def makeblacklistnames(self):
3434
return [
35+
"IsShowContextualMenuClick", # Can't find it in the library
36+
"InitContextualMenus", # ditto
3537
]
3638

3739
def makeblacklisttypes(self):
3840
return [
3941
'MCTableHandle',
4042
'MCEntryPtr',
4143
'MCTablePtr',
44+
'AEDesc_ptr', # For now: doable, but not easy
45+
'ProcessSerialNumber', # ditto
4246
]
4347

4448
def makerepairinstructions(self):

0 commit comments

Comments
 (0)