Commits

Anonymous committed e88d2e3

Added support for WCTabHandle, AuxWinHandle, PixPatHandle: no reason
for blacklisting them.

Comments (0)

Files changed (3)

Mac/Modules/win/Winmodule.c

 	return _res;
 }
 
+static PyObject *WinObj_SetWinColor(_self, _args)
+	WindowObject *_self;
+	PyObject *_args;
+{
+	PyObject *_res = NULL;
+	WCTabHandle newColorTable;
+	if (!PyArg_ParseTuple(_args, "O&",
+	                      ResObj_Convert, &newColorTable))
+		return NULL;
+	SetWinColor(_self->ob_itself,
+	            newColorTable);
+	Py_INCREF(Py_None);
+	_res = Py_None;
+	return _res;
+}
+
 static PyObject *WinObj_GetWVariant(_self, _args)
 	WindowObject *_self;
 	PyObject *_args;
 	return _res;
 }
 
+static PyObject *WinObj_GetAuxWin(_self, _args)
+	WindowObject *_self;
+	PyObject *_args;
+{
+	PyObject *_res = NULL;
+	Boolean _rv;
+	AuxWinHandle awHndl;
+	if (!PyArg_ParseTuple(_args, ""))
+		return NULL;
+	_rv = GetAuxWin(_self->ob_itself,
+	                &awHndl);
+	_res = Py_BuildValue("bO&",
+	                     _rv,
+	                     ResObj_New, awHndl);
+	return _res;
+}
+
 static PyObject *WinObj_GetWindowPort(_self, _args)
 	WindowObject *_self;
 	PyObject *_args;
 	 "(Point startPt, Rect bBox) -> (long _rv)"},
 	{"TrackBox", (PyCFunction)WinObj_TrackBox, 1,
 	 "(Point thePt, short partCode) -> (Boolean _rv)"},
+	{"SetWinColor", (PyCFunction)WinObj_SetWinColor, 1,
+	 "(WCTabHandle newColorTable) -> None"},
 	{"GetWVariant", (PyCFunction)WinObj_GetWVariant, 1,
 	 "() -> (short _rv)"},
 	{"SetWTitle", (PyCFunction)WinObj_SetWTitle, 1,
 	 "(Point thePt) -> (Boolean _rv)"},
 	{"DragWindow", (PyCFunction)WinObj_DragWindow, 1,
 	 "(Point startPt, Rect boundsRect) -> None"},
+	{"GetAuxWin", (PyCFunction)WinObj_GetAuxWin, 1,
+	 "() -> (Boolean _rv, AuxWinHandle awHndl)"},
 	{"GetWindowPort", (PyCFunction)WinObj_GetWindowPort, 1,
 	 "() -> (CGrafPtr _rv)"},
 	{"SetPortWindowPort", (PyCFunction)WinObj_SetPortWindowPort, 1,
 	return _res;
 }
 
+static PyObject *Win_SetDeskCPat(_self, _args)
+	PyObject *_self;
+	PyObject *_args;
+{
+	PyObject *_res = NULL;
+	PixPatHandle deskPixPat;
+	if (!PyArg_ParseTuple(_args, "O&",
+	                      ResObj_Convert, &deskPixPat))
+		return NULL;
+	SetDeskCPat(deskPixPat);
+	Py_INCREF(Py_None);
+	_res = Py_None;
+	return _res;
+}
+
 static PyObject *Win_NewCWindow(_self, _args)
 	PyObject *_self;
 	PyObject *_args;
 	 "(Rect theRect, Point thePt) -> (long _rv)"},
 	{"GetCWMgrPort", (PyCFunction)Win_GetCWMgrPort, 1,
 	 "() -> (CGrafPtr wMgrCPort)"},
+	{"SetDeskCPat", (PyCFunction)Win_SetDeskCPat, 1,
+	 "(PixPatHandle deskPixPat) -> None"},
 	{"NewCWindow", (PyCFunction)Win_NewCWindow, 1,
 	 "(Rect boundsRect, Str255 title, Boolean visible, short procID, WindowPtr behind, Boolean goAwayFlag, long refCon) -> (WindowPtr _rv)"},
 	{"GetNewCWindow", (PyCFunction)Win_GetNewCWindow, 1,

Mac/Modules/win/winscan.py

 	def makeblacklisttypes(self):
 		return [
 			'ProcPtr',
-			'WCTabHandle',
-			'AuxWinHandle',
-			'PixPatHandle',
 			'DragGrayRgnUPP',
 			]
 

Mac/Modules/win/winsupport.py

 
 RgnHandle = OpaqueByValueType("RgnHandle", "ResObj")
 PicHandle = OpaqueByValueType("PicHandle", "ResObj")
+WCTabHandle = OpaqueByValueType("WCTabHandle", "ResObj")
+AuxWinHandle = OpaqueByValueType("AuxWinHandle", "ResObj")
+PixPatHandle = OpaqueByValueType("PixPatHandle", "ResObj")
 
 includestuff = includestuff + """
 #include <%s>""" % MACHEADERFILE + """
 methods = []
 execfile(INPUTFILE)
 
-# Add a manual routine for converting integer WindowPtr's (as returned by
-# various event routines) to a WindowObject.
+# Add manual routines for converting integer WindowPtr's (as returned by
+# various event routines)  and Dialog objects to a WindowObject.
 whichwin_body = """
 long ptr;
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.