Update of /cvsroot/pywin32/pywin32/win32/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18768/win32/src
Modified Files:
win32crypt.i win32gui.i win32inet.i win32process.i
Log Message:
Move Swig typemaps for HWND into pywintypes.i
Index: win32process.i
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/src/win32process.i,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** win32process.i 15 Dec 2006 04:22:59 -0000 1.22
--- win32process.i 16 Jan 2007 19:04:21 -0000 1.23
***************
*** 15,21 ****
%include "pywin32.i"
- %apply HWND {long};
- typedef long HWND
-
%{
#include "structmember.h"
--- 15,18 ----
Index: win32inet.i
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/src/win32inet.i,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** win32inet.i 19 Feb 2006 12:56:46 -0000 1.4
--- win32inet.i 16 Jan 2007 19:04:21 -0000 1.5
***************
*** 13,19 ****
%include "pywin32.i"
- %apply HWND {long};
- typedef long HWND
-
%{
#undef PyHANDLE // undef earlier define, so we are back to the class.
--- 13,16 ----
Index: win32crypt.i
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/src/win32crypt.i,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** win32crypt.i 23 Oct 2005 11:33:52 -0000 1.2
--- win32crypt.i 16 Jan 2007 19:04:21 -0000 1.3
***************
*** 14,20 ****
%include "pywin32.i"
- %apply HWND {long};
- typedef long HWND
-
%{
BOOL PyWinObject_AsDATA_BLOB(PyObject *ob, DATA_BLOB *b)
--- 14,17 ----
***************
*** 115,127 ****
else if (PyTuple_Check($source)) {
$target = (CRYPTPROTECT_PROMPTSTRUCT *)_alloca(sizeof(CRYPTPROTECT_PROMPTSTRUCT));
! PyObject *obPrompt = Py_None;
memset($target, 0, sizeof(*$target));
$target->cbSize = sizeof(*$target);
! if (!PyArg_ParseTuple($source, "l|lO", &$target->dwPromptFlags,
! &$target->hwndApp,
&obPrompt))
return NULL;
if (!PyWinObject_AsWCHAR(obPrompt, (WCHAR **)(&$target->szPrompt), TRUE))
return NULL;
} else {
PyErr_Format(PyExc_TypeError, "CRYPTPROTECT_PROMPTSTRUCT must be None or a tuple (got %s)",
--- 112,126 ----
else if (PyTuple_Check($source)) {
$target = (CRYPTPROTECT_PROMPTSTRUCT *)_alloca(sizeof(CRYPTPROTECT_PROMPTSTRUCT));
! PyObject *obPrompt = Py_None, *obhwndApp = Py_None;
memset($target, 0, sizeof(*$target));
$target->cbSize = sizeof(*$target);
! if (!PyArg_ParseTuple($source, "l|OO", &$target->dwPromptFlags,
! &obhwndApp,
&obPrompt))
return NULL;
if (!PyWinObject_AsWCHAR(obPrompt, (WCHAR **)(&$target->szPrompt), TRUE))
return NULL;
+ if (!PyWinObject_AsHANDLE(obhwndApp, (HANDLE *)&$target->hwndApp, TRUE))
+ return NULL;
} else {
PyErr_Format(PyExc_TypeError, "CRYPTPROTECT_PROMPTSTRUCT must be None or a tuple (got %s)",
Index: win32gui.i
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/src/win32gui.i,v
retrieving revision 1.100
retrieving revision 1.101
diff -C2 -d -r1.100 -r1.101
*** win32gui.i 12 Jan 2007 05:54:38 -0000 1.100
--- win32gui.i 16 Jan 2007 19:04:21 -0000 1.101
***************
*** 293,302 ****
// Handles types with no specific PyHANDLE subclass, returned to Python as plain ints or longs
! typedef float HDC, HWND, HCURSOR, HINSTANCE, HMENU, HICON, HGDIOBJ, HIMAGELIST, HACCEL;
! %typemap(python, in) HDC, HWND, HCURSOR, HINSTANCE, HMENU, HICON, HGDIOBJ, HIMAGELIST, HACCEL{
if (!PyWinObject_AsHANDLE($source, (HANDLE *)&$target, FALSE))
return NULL;
}
! %typemap(python, out) HDC, HWND, HCURSOR, HINSTANCE, HMENU, HICON, HGDIOBJ, HIMAGELIST, HACCEL{
$target=PyWinLong_FromHANDLE($source);
}
--- 293,302 ----
// Handles types with no specific PyHANDLE subclass, returned to Python as plain ints or longs
! typedef float HDC, HCURSOR, HINSTANCE, HMENU, HICON, HGDIOBJ, HIMAGELIST, HACCEL;
! %typemap(python, in) HDC, HCURSOR, HINSTANCE, HMENU, HICON, HGDIOBJ, HIMAGELIST, HACCEL{
if (!PyWinObject_AsHANDLE($source, (HANDLE *)&$target, FALSE))
return NULL;
}
! %typemap(python, out) HDC, HCURSOR, HINSTANCE, HMENU, HICON, HGDIOBJ, HIMAGELIST, HACCEL{
$target=PyWinLong_FromHANDLE($source);
}
|