Commits

Jack Jansen  committed 20ca58e

Generated anew

  • Participants
  • Parent commits ad6f039
  • Branches legacy-trunk

Comments (0)

Files changed (25)

File Mac/Lib/toolbox/Controls.py

-# Generated from 'Moes:CodeWarrior6:Metrowerks C/C++:Headers:Universal Headers 2.0.1f:Controls.h'
+# Generated from 'Sap:CodeWarrior6:Metrowerks C/C++:Headers:Universal Headers 2.0.1f:Controls.h'
 
 pushButProc = 0
 checkBoxProc = 1

File Mac/Lib/toolbox/Dialogs.py

-# Generated from 'Moes:CodeWarrior6:Metrowerks C/C++:Headers:Universal Headers 2.0.1f:Dialogs.h'
+# Generated from 'Sap:CodeWarrior6:Metrowerks C/C++:Headers:Universal Headers 2.0.1f:Dialogs.h'
 
 ctrlItem = 4
 btnCtrl = 0

File Mac/Lib/toolbox/Events.py

-# Generated from 'Moes:CodeWarrior6:Metrowerks C/C++:Headers:Universal Headers 2.0.1f:Events.h'
+# Generated from 'Sap:CodeWarrior6:Metrowerks C/C++:Headers:Universal Headers 2.0.1f:Events.h'
 
 nullEvent = 0
 mouseDown = 1

File Mac/Lib/toolbox/Menus.py

-# Generated from 'Moes:CodeWarrior6:Metrowerks C/C++:Headers:Universal Headers 2.0.1f:Menus.h'
+# Generated from 'Sap:CodeWarrior6:Metrowerks C/C++:Headers:Universal Headers 2.0.1f:Menus.h'
 
 noMark = 0
 mDrawMsg = 0

File Mac/Lib/toolbox/QuickDraw.py

-# Generated from 'Moes:CodeWarrior6:Metrowerks C/C++:Headers:Universal Headers 2.0.1f:QuickDraw.h'
+# Generated from 'Sap:CodeWarrior6:Metrowerks C/C++:Headers:Universal Headers 2.0.1f:QuickDraw.h'
 
 invalColReq = -1
 srcCopy = 0
 kNoConstraint = 0
 kVerticalConstraint = 1
 kHorizontalConstraint = 2
-# Generated from 'Moes:CodeWarrior6:Metrowerks C/C++:Headers:Universal Headers 2.0.1f:QuickDrawText.h'
+# Generated from 'Sap:CodeWarrior6:Metrowerks C/C++:Headers:Universal Headers 2.0.1f:QuickDrawText.h'
 
 leftCaret = 0
 rightCaret = -1

File Mac/Lib/toolbox/Resources.py

-# Generated from 'Moes:CodeWarrior6:Metrowerks C/C++:Headers:Universal Headers 2.0.1f:Resources.h'
+# Generated from 'Sap:CodeWarrior6:Metrowerks C/C++:Headers:Universal Headers 2.0.1f:Resources.h'
 
 resSysHeap = 64
 resPurgeable = 32

File Mac/Lib/toolbox/Sound.py

-# Generated from 'Moes:CodeWarrior6:Metrowerks C/C++:Headers:Universal Headers 2.0.1f:Sound.h'
+# Generated from 'Sap:CodeWarrior6:Metrowerks C/C++:Headers:Universal Headers 2.0.1f:Sound.h'
 
 soundListRsrc = 'snd '
 rate44khz = 0xAC440000L

File Mac/Lib/toolbox/Windows.py

-# Generated from 'Moes:CodeWarrior6:Metrowerks C/C++:Headers:Universal Headers 2.0.1f:Windows.h'
+# Generated from 'Sap:CodeWarrior6:Metrowerks C/C++:Headers:Universal Headers 2.0.1f:Windows.h'
 
 kStandardWindowDefinition = 0
 kRoundWindowDefinition = 1

File Mac/Modules/ctl/Ctlmodule.c

 #include <Controls.h>
 
 extern PyObject *ResObj_New(Handle);
+extern PyObject *ResObj_OptNew(Handle);
 extern int ResObj_Convert(PyObject *, Handle *);
 
 extern PyObject *WinObj_New(WindowPtr);

File Mac/Modules/ctl/ctlgen.py

-# Generated from 'Moes:CodeWarrior6:Metrowerks C/C++:Headers:Universal Headers 2.0.1f:Controls.h'
+# Generated from 'Sap:CodeWarrior6:Metrowerks C/C++:Headers:Universal Headers 2.0.1f:Controls.h'
 
 f = Function(ControlRef, 'NewControl',
     (WindowRef, 'theWindow', InMode),

File Mac/Modules/dlg/Dlgmodule.c

 #include <Controls.h>
 
 extern PyObject *ResObj_New(Handle);
+extern PyObject *ResObj_OptNew(Handle);
 extern int ResObj_Convert(PyObject *, Handle *);
 
 extern PyObject *WinObj_New(WindowPtr);
 	              &box);
 	_res = Py_BuildValue("hO&O&",
 	                     itemType,
-	                     ResObj_New, item,
+	                     ResObj_OptNew, item,
 	                     PyMac_BuildRect, &box);
 	return _res;
 }

File Mac/Modules/dlg/dlggen.py

-# Generated from 'Moes:CodeWarrior6:Metrowerks C/C++:Headers:Universal Headers 2.0.1f:Dialogs.h'
+# Generated from 'Sap:CodeWarrior6:Metrowerks C/C++:Headers:Universal Headers 2.0.1f:Dialogs.h'
 
 f = Function(DialogRef, 'NewDialog',
     (NullStorage, 'wStorage', InMode),
     (DialogRef, 'theDialog', InMode),
     (short, 'itemNo', InMode),
     (short, 'itemType', OutMode),
-    (Handle, 'item', OutMode),
+    (OptHandle, 'item', OutMode),
     (Rect, 'box', OutMode),
 )
 methods.append(f)

File Mac/Modules/evt/Evtmodule.c

 #include <Controls.h>
 
 extern PyObject *ResObj_New(Handle);
+extern PyObject *ResObj_OptNew(Handle);
 extern int ResObj_Convert(PyObject *, Handle *);
 
 extern PyObject *WinObj_New(WindowPtr);

File Mac/Modules/evt/evtgen.py

-# Generated from 'Moes:CodeWarrior6:Metrowerks C/C++:Headers:Universal Headers 2.0.1f:Events.h'
+# Generated from 'Sap:CodeWarrior6:Metrowerks C/C++:Headers:Universal Headers 2.0.1f:Events.h'
 
 f = Function(UInt32, 'GetCaretTime',
 )

File Mac/Modules/list/Listmodule.c

 #include <Controls.h>
 
 extern PyObject *ResObj_New(Handle);
+extern PyObject *ResObj_OptNew(Handle);
 extern int ResObj_Convert(PyObject *, Handle *);
 
 extern PyObject *WinObj_New(WindowPtr);

File Mac/Modules/menu/Menumodule.c

 #include <Controls.h>
 
 extern PyObject *ResObj_New(Handle);
+extern PyObject *ResObj_OptNew(Handle);
 extern int ResObj_Convert(PyObject *, Handle *);
 
 extern PyObject *WinObj_New(WindowPtr);

File Mac/Modules/menu/menugen.py

-# Generated from 'Moes:CodeWarrior6:Metrowerks C/C++:Headers:Universal Headers 2.0.1f:Menus.h'
+# Generated from 'Sap:CodeWarrior6:Metrowerks C/C++:Headers:Universal Headers 2.0.1f:Menus.h'
 
 f = Function(short, 'GetMBarHeight',
 )

File Mac/Modules/qd/Qdmodule.c

 #include <Controls.h>
 
 extern PyObject *ResObj_New(Handle);
+extern PyObject *ResObj_OptNew(Handle);
 extern int ResObj_Convert(PyObject *, Handle *);
 
 extern PyObject *WinObj_New(WindowPtr);

File Mac/Modules/qd/qdgen.py

-# Generated from 'Moes:CodeWarrior6:Metrowerks C/C++:Headers:Universal Headers 2.0.1f:QuickDraw.h'
+# Generated from 'Sap:CodeWarrior6:Metrowerks C/C++:Headers:Universal Headers 2.0.1f:QuickDraw.h'
 
 f = Function(void, 'OpenPort',
     (GrafPtr, 'port', InMode),
 )
 functions.append(f)
 
-# Generated from 'Moes:CodeWarrior6:Metrowerks C/C++:Headers:Universal Headers 2.0.1f:QuickDrawText.h'
+# Generated from 'Sap:CodeWarrior6:Metrowerks C/C++:Headers:Universal Headers 2.0.1f:QuickDrawText.h'
 
 f = Function(void, 'TextFont',
     (short, 'font', InMode),

File Mac/Modules/res/Resmodule.c

 #include <Controls.h>
 
 extern PyObject *ResObj_New(Handle);
+extern PyObject *ResObj_OptNew(Handle);
 extern int ResObj_Convert(PyObject *, Handle *);
 
 extern PyObject *WinObj_New(WindowPtr);
 
 
 
+/* Alternative version of ResObj_New, which returns None for null argument */
+PyObject *ResObj_OptNew(itself)
+	Handle itself;
+{
+	ResourceObject *it;
+	if (itself == NULL) {
+		Py_INCREF(Py_None);
+		return Py_None;
+	}
+	return ResObj_New(itself);
+}
+
+
 
 void initRes()
 {

File Mac/Modules/res/resgen.py

-# Generated from 'Moes:CodeWarrior6:Metrowerks C/C++:Headers:Universal Headers 2.0.1f:Resources.h'
+# Generated from 'Sap:CodeWarrior6:Metrowerks C/C++:Headers:Universal Headers 2.0.1f:Resources.h'
 
 f = ResFunction(short, 'InitResources',
 )

File Mac/Modules/snd/Sndmodule.c

 #include <Controls.h>
 
 extern PyObject *ResObj_New(Handle);
+extern PyObject *ResObj_OptNew(Handle);
 extern int ResObj_Convert(PyObject *, Handle *);
 
 extern PyObject *WinObj_New(WindowPtr);

File Mac/Modules/snd/sndgen.py

-# Generated from 'Moes:CodeWarrior6:Metrowerks C/C++:Headers:Universal Headers 2.0.1f:Sound.h'
+# Generated from 'Sap:CodeWarrior6:Metrowerks C/C++:Headers:Universal Headers 2.0.1f:Sound.h'
 
 f = SndFunction(void, 'SetSoundVol',
     (short, 'level', InMode),

File Mac/Modules/win/Winmodule.c

 #include <Controls.h>
 
 extern PyObject *ResObj_New(Handle);
+extern PyObject *ResObj_OptNew(Handle);
 extern int ResObj_Convert(PyObject *, Handle *);
 
 extern PyObject *WinObj_New(WindowPtr);
 	return _res;
 }
 
+static PyObject *Win_WhichWindow(_self, _args)
+	PyObject *_self;
+	PyObject *_args;
+{
+	PyObject *_res = NULL;
+
+	long ptr;
+
+	if ( !PyArg_ParseTuple(_args, "i", &ptr) )
+		return NULL;
+	return WinObj_WhichWindow((WindowPtr)ptr);
+
+}
+
 static PyMethodDef Win_methods[] = {
 	{"InitWindows", (PyCFunction)Win_InitWindows, 1,
 	 "() -> None"},
 	 "(Rect boundsRect, Str255 title, Boolean visible, short procID, WindowPtr behind, Boolean goAwayFlag, long refCon) -> (WindowPtr _rv)"},
 	{"GetNewCWindow", (PyCFunction)Win_GetNewCWindow, 1,
 	 "(short windowID, WindowPtr behind) -> (WindowPtr _rv)"},
+	{"WhichWindow", (PyCFunction)Win_WhichWindow, 1,
+	 "Resolve an integer WindowPtr address to a Window object"},
 	{NULL, NULL, 0}
 };
 

File Mac/Modules/win/wingen.py

-# Generated from 'Moes:CodeWarrior6:Metrowerks C/C++:Headers:Universal Headers 2.0.1f:Windows.h'
+# Generated from 'Sap:CodeWarrior6:Metrowerks C/C++:Headers:Universal Headers 2.0.1f:Windows.h'
 
 f = Function(void, 'InitWindows',
 )