[pywin32-checkins] pywin32/com/win32com/src MiscTypes.cpp, 1.8.4.1, 1.8.4.2
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: Mark H. <mha...@us...> - 2008-11-02 12:43:52
|
Update of /cvsroot/pywin32/pywin32/com/win32com/src In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv22520/com/win32com/src Modified Files: Tag: py3k MiscTypes.cpp Log Message: Move OLEMENUGROUPWIDTHS from win32com.shell to pythoncom Index: MiscTypes.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/src/MiscTypes.cpp,v retrieving revision 1.8.4.1 retrieving revision 1.8.4.2 diff -C2 -d -r1.8.4.1 -r1.8.4.2 *** MiscTypes.cpp 29 Aug 2008 08:27:37 -0000 1.8.4.1 --- MiscTypes.cpp 2 Nov 2008 12:43:47 -0000 1.8.4.2 *************** *** 1,3 **** --- 1,4 ---- // MiscTypes.cpp - misc Python types. + // @doc #include "stdafx.h" #include "PythonCOM.h" *************** *** 285,287 **** --- 286,310 ---- }; + // These aren't really types, but may be some day :) + // @object PyOLEMENUGROUPWIDTHS|Tuple containing 6 ints indicating nbr of options in each menu group + BOOL PyObject_AsOLEMENUGROUPWIDTHS( PyObject *oblpMenuWidths, OLEMENUGROUPWIDTHS *pWidths) + { + return PyArg_ParseTuple(oblpMenuWidths, "iiiiii", + &pWidths->width[0], &pWidths->width[1], + &pWidths->width[2], &pWidths->width[3], + &pWidths->width[4], &pWidths->width[5]) != NULL; + } + + PyObject *PyObject_FromOLEMENUGROUPWIDTHS(const OLEMENUGROUPWIDTHS *pWidths) + { + if (!pWidths) { + Py_INCREF(Py_None); + return Py_None; + } + return Py_BuildValue("(iiiiii)", + pWidths->width[0], pWidths->width[1], + pWidths->width[2], pWidths->width[3], + pWidths->width[4], pWidths->width[5]); + } + //////////////////////////////// |