[pywin32-checkins] pywin32/com/win32com/src MiscTypes.cpp,1.8,1.9
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: Mark H. <mha...@us...> - 2008-11-02 12:43:05
|
Update of /cvsroot/pywin32/pywin32/com/win32com/src In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv22442/com/win32com/src Modified Files: 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 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** MiscTypes.cpp 14 Mar 2006 12:12:44 -0000 1.8 --- MiscTypes.cpp 2 Nov 2008 12:42:58 -0000 1.9 *************** *** 1,3 **** --- 1,4 ---- // MiscTypes.cpp - misc Python types. + // @doc #include "stdafx.h" #include "PythonCOM.h" *************** *** 293,295 **** --- 294,318 ---- }; + // 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]); + } + //////////////////////////////// |