[pywin32-checkins] pywin32/win32/src win32gui.i,1.40,1.41
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: Mark H. <mha...@us...> - 2004-05-19 10:33:28
|
Update of /cvsroot/pywin32/pywin32/win32/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3755 Modified Files: win32gui.i Log Message: Enable tooltips in taskbar icons, as contributed by 'alch' in [ 944453 ] win32gui patch to enable balloon tooltips Index: win32gui.i =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32gui.i,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** win32gui.i 19 May 2004 10:24:37 -0000 1.40 --- win32gui.i 19 May 2004 10:33:18 -0000 1.41 *************** *** 3,6 **** --- 3,11 ---- %module win32gui // A module which provides an interface to the native win32 GUI + // alch begin 29/04/2004 to enable balloon notifications in Shell_NotifyIcon + %{ + #define _WIN32_IE 0x0501 + %} + // alch end %include "typemaps.i" %include "pywintypes.i" *************** *** 1979,1986 **** BOOL PyObject_AsNOTIFYICONDATA(PyObject *ob, NOTIFYICONDATA *pnid) { ! PyObject *obTip=NULL; memset(pnid, 0, sizeof(*pnid)); pnid->cbSize = sizeof(*pnid); ! if (!PyArg_ParseTuple(ob, "l|iiilO:NOTIFYICONDATA tuple", &pnid->hWnd, &pnid->uID, &pnid->uFlags, &pnid->uCallbackMessage, &pnid->hIcon, &obTip)) return FALSE; if (obTip) { --- 1984,1995 ---- BOOL PyObject_AsNOTIFYICONDATA(PyObject *ob, NOTIFYICONDATA *pnid) { ! PyObject *obTip=NULL, *obInfo=NULL, *obInfoTitle=NULL; memset(pnid, 0, sizeof(*pnid)); pnid->cbSize = sizeof(*pnid); ! if (!PyArg_ParseTuple(ob, "l|iiilOOiOi:NOTIFYICONDATA tuple", ! &pnid->hWnd, &pnid->uID, &pnid->uFlags, ! &pnid->uCallbackMessage, &pnid->hIcon, &obTip, ! &obInfo, &pnid->uTimeout, &obInfoTitle, ! &pnid->dwInfoFlags)) return FALSE; if (obTip) { *************** *** 1991,1994 **** --- 2000,2017 ---- PyWinObject_FreeTCHAR(szTip); } + if (obInfo) { + TCHAR *szInfo; + if (!PyWinObject_AsTCHAR(obInfo, &szInfo)) + return NULL; + _tcsncpy(pnid->szInfo, szInfo, sizeof(pnid->szInfo)/sizeof(TCHAR)); + PyWinObject_FreeTCHAR(szInfo); + } + if (obInfoTitle) { + TCHAR *szInfoTitle; + if (!PyWinObject_AsTCHAR(obInfoTitle, &szInfoTitle)) + return NULL; + _tcsncpy(pnid->szInfoTitle, szInfoTitle, sizeof(pnid->szInfoTitle)/sizeof(TCHAR)); + PyWinObject_FreeTCHAR(szInfoTitle); + } return TRUE; } *************** *** 1997,2000 **** --- 2020,2029 ---- #define NIF_MESSAGE NIF_MESSAGE #define NIF_TIP NIF_TIP + #define NIF_INFO NIF_INFO + #define NIIF_WARNING NIIF_WARNING + #define NIIF_ERROR NIIF_ERROR + #define NIIF_NONE NIIF_NONE + #define NIIF_INFO NIIF_INFO + #define NIM_ADD NIM_ADD // Adds an icon to the status area. #define NIM_DELETE NIM_DELETE // Deletes an icon from the status area. |