[pywin32-checkins] pywin32/win32/src win32gui.i,1.94,1.95
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: Roger U. <ru...@us...> - 2007-01-02 07:30:52
|
Update of /cvsroot/pywin32/pywin32/win32/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24006/win32/src Modified Files: win32gui.i Log Message: Revise stack allocations for Swig typemaps, and use more descriptive names for parameters Gdi objects treated as PyHANDLE subclass (PyGdiHANDLE) Add region functions using above Add ExtCreatePen and CreateBrushIndirect Remove a few more places where handles were parsed as "l" or "i" ScrollWindowEx rcUpdate parameter is output instead of input (could break code) Various Autoduck fixes Index: win32gui.i =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32gui.i,v retrieving revision 1.94 retrieving revision 1.95 diff -C2 -d -r1.94 -r1.95 *** win32gui.i 2 Jan 2007 00:53:02 -0000 1.94 --- win32gui.i 2 Jan 2007 07:30:50 -0000 1.95 *************** *** 116,120 **** // @object PyBLENDFUNCTION|Tuple of four small ints used to fill a BLENDFUNCTION struct ! // All 4 ints must fit in a byte (0-255). // @pyseeapi BLENDFUNCTION BOOL PyWinObject_AsBLENDFUNCTION(PyObject *obbl, BLENDFUNCTION *pbl) --- 116,120 ---- // @object PyBLENDFUNCTION|Tuple of four small ints used to fill a BLENDFUNCTION struct ! // Each int must fit in a byte (0-255). // @pyseeapi BLENDFUNCTION [...1459 lines suppressed...] + if (!PyArg_ParseTuple(args, "kkO|O:ExtCreatePen", + &style, // @pyparm int|PenStyle||Combination of win32con.PS_*. Must contain either PS_GEOMETRIC or PS_COSMETIC. + &width, // @pyparm int|Width||Width of pen in logical units. Must be 1 for PS_COSMETIC. + &oblb, // @pyparm <o PyLOGBRUSH>|lb||Dict containing brush creation parameters + &obcustom_style)) // @pyparm (int, ...)|Style|None|Sequence containing lengths of dashes and spaces Used only with PS_USERSTYLE, otherwise must be None. + return NULL; + if (!PyWinObject_AsLOGBRUSH(oblb, &lb)) + return NULL; + if (!PyWinObject_AsDWORDArray(obcustom_style, &custom_style, &custom_style_cnt, TRUE)) + return NULL; + hpen=ExtCreatePen(style, width, &lb, custom_style_cnt, custom_style); + if (custom_style) + free(custom_style); + if (hpen==NULL) + return PyWin_SetAPIError("ExtCreatePen"); + return PyWinObject_FromGdiHANDLE(hpen); + } + %} + %native (CreateBrushIndirect) PyCreateBrushIndirect; + %native (ExtCreatePen) PyExtCreatePen; |