Thread: [pywin32-checkins] pywin32/com/win32com/src/extensions PyIDataObject.cpp, 1.6, 1.7
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: Roger U. <ru...@us...> - 2008-04-26 22:17:44
|
Update of /cvsroot/pywin32/pywin32/com/win32com/src/extensions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14292 Modified Files: PyIDataObject.cpp Log Message: Autoduck improvements Index: PyIDataObject.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/src/extensions/PyIDataObject.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** PyIDataObject.cpp 20 May 2005 23:25:49 -0000 1.6 --- PyIDataObject.cpp 26 Apr 2008 22:17:49 -0000 1.7 *************** *** 1,4 **** --- 1,5 ---- // This file implements the IDataObject Interface and Gateway for Python. // Generated by makegw.py + // @doc - This file contains autoduck documentation #include "stdafx.h" *************** *** 8,15 **** #include "PyComTypeObjects.h" BOOL PyObject_AsFORMATETC(PyObject *ob, FORMATETC *petc) { PyObject *obtd; ! if (!PyArg_ParseTuple(ob, "iOiii", &petc->cfFormat, &obtd, --- 9,22 ---- #include "PyComTypeObjects.h" + // @object PyFORMATETC|Tuple representing a FORMATETC struct describing an OLE data format + // @tupleitem 0|int|Format|CLIPFORMAT value (CF_*) identifying the type of data + // @tupleitem 1|None|td|DVTARGETDEVICE (currently not supported, use only None) + // @tupleitem 2|int|Aspect|One of pythoncom.DVASPECT_* values specifying level of detail + // @tupleitem 3|int|index|Usually -1, used only when data spans multiple pages + // @tupleitem 4|int|tymed|One of pythoncom.TYMED_* values indicating how the data is stored BOOL PyObject_AsFORMATETC(PyObject *ob, FORMATETC *petc) { PyObject *obtd; ! if (!PyArg_ParseTuple(ob, "iOiii:FORMATETC", &petc->cfFormat, &obtd, *************** *** 46,50 **** } - // @doc - This file contains autoduck documentation // --------------------------------------------------- // --- 53,56 ---- *************** *** 66,70 **** } ! // @pymethod <o PySTGMEDIUM>|PyIDataObject|GetData|Description of GetData. PyObject *PyIDataObject::GetData(PyObject *self, PyObject *args) { --- 72,76 ---- } ! // @pymethod <o PySTGMEDIUM>|PyIDataObject|GetData|Retrieves data from the object in specified format PyObject *PyIDataObject::GetData(PyObject *self, PyObject *args) { *************** *** 74,78 **** FORMATETC formatetcIn; PyObject *obpformatetcIn; ! // @pyparm <o PyFORMATETC>|pformatetcIn||Description for pformatetcIn if ( !PyArg_ParseTuple(args, "O:GetData", &obpformatetcIn) ) return NULL; --- 80,84 ---- FORMATETC formatetcIn; PyObject *obpformatetcIn; ! // @pyparm <o PyFORMATETC>|pformatetcIn||Tuple representing a FORMATETC struct describing how the data should be returned if ( !PyArg_ParseTuple(args, "O:GetData", &obpformatetcIn) ) return NULL; *************** *** 93,97 **** } ! // @pymethod <o PySTGMEDIUM>|PyIDataObject|GetDataHere|Description of GetDataHere. PyObject *PyIDataObject::GetDataHere(PyObject *self, PyObject *args) { --- 99,103 ---- } ! // @pymethod <o PySTGMEDIUM>|PyIDataObject|GetDataHere|Retunrs a copy of the object's data in specified format PyObject *PyIDataObject::GetDataHere(PyObject *self, PyObject *args) { *************** *** 101,105 **** FORMATETC formatetc; PyObject *obpformatetc; ! // @pyparm <o PyFORMATETC>|pformatetcIn||Description for pformatetcIn if ( !PyArg_ParseTuple(args, "O:GetDataHere", &obpformatetc) ) return NULL; --- 107,111 ---- FORMATETC formatetc; PyObject *obpformatetc; ! // @pyparm <o PyFORMATETC>|pformatetcIn||Tuple representing a FORMATETC struct describing how the data should be returned if ( !PyArg_ParseTuple(args, "O:GetDataHere", &obpformatetc) ) return NULL; *************** *** 119,123 **** } ! // @pymethod |PyIDataObject|QueryGetData|Description of QueryGetData. PyObject *PyIDataObject::QueryGetData(PyObject *self, PyObject *args) { --- 125,130 ---- } ! // @pymethod |PyIDataObject|QueryGetData|Checks if the objects supports returning data in a particular format. ! // @rdesc Returns None if the object supports the specified format, otherwise an error is raised. PyObject *PyIDataObject::QueryGetData(PyObject *self, PyObject *args) { *************** *** 127,131 **** FORMATETC formatetc; PyObject *obpformatetc; ! // @pyparm <o PyFORMATETC>|pformatetc||Description for pformatetc if ( !PyArg_ParseTuple(args, "O:QueryGetData", &obpformatetc) ) return NULL; --- 134,138 ---- FORMATETC formatetc; PyObject *obpformatetc; ! // @pyparm <o PyFORMATETC>|pformatetc||Tuple representing a FORMATETC struct describing how the data should be returned if ( !PyArg_ParseTuple(args, "O:QueryGetData", &obpformatetc) ) return NULL; *************** *** 145,149 **** } ! // @pymethod |PyIDataObject|GetCanonicalFormatEtc|Description of GetCanonicalFormatEtc. PyObject *PyIDataObject::GetCanonicalFormatEtc(PyObject *self, PyObject *args) { --- 152,156 ---- } ! // @pymethod <o PyFORMATETC>|PyIDataObject|GetCanonicalFormatEtc|Transforms a FORMATECT data description into a general format that the object supports PyObject *PyIDataObject::GetCanonicalFormatEtc(PyObject *self, PyObject *args) { *************** *** 153,157 **** FORMATETC formatectIn; PyObject *obpformatectIn; ! // @pyparm <o PyFORMATETC *>|pformatectIn||Description for pformatectIn if ( !PyArg_ParseTuple(args, "O:GetCanonicalFormatEtc", &obpformatectIn) ) return NULL; --- 160,164 ---- FORMATETC formatectIn; PyObject *obpformatectIn; ! // @pyparm <o PyFORMATETC>|pformatectIn||Tuple representing a FORMATETC struct describing how the data should be returned if ( !PyArg_ParseTuple(args, "O:GetCanonicalFormatEtc", &obpformatectIn) ) return NULL; *************** *** 167,176 **** return PyCom_BuildPyException(hr, pIDO, IID_IDataObject ); return PyObject_FromFORMATETC(&formatetcOut); - Py_INCREF(Py_None); - return Py_None; - } ! // @pymethod |PyIDataObject|SetData|Description of SetData. PyObject *PyIDataObject::SetData(PyObject *self, PyObject *args) { --- 174,180 ---- return PyCom_BuildPyException(hr, pIDO, IID_IDataObject ); return PyObject_FromFORMATETC(&formatetcOut); } ! // @pymethod |PyIDataObject|SetData|Sets the data that the object will return. PyObject *PyIDataObject::SetData(PyObject *self, PyObject *args) { *************** *** 180,188 **** FORMATETC formatetc; PyObject *obpformatetc; ! // @pyparm <o PyFORMATETC>|pformatetc||Description for pformatetc PyObject *obmedium; PySTGMEDIUM *pymedium; ! // @pyparm <o PySTGMEDIUM *>|pmedium||Description for pmedium ! // @pyparm int|fRelease||Description for fRelease BOOL fRelease; if ( !PyArg_ParseTuple(args, "OOi:SetData", &obpformatetc, &obmedium, &fRelease) ) --- 184,192 ---- FORMATETC formatetc; PyObject *obpformatetc; ! // @pyparm <o PyFORMATETC>|pformatetc||Tuple representing a FORMATETC struct describing the type of data to be set PyObject *obmedium; PySTGMEDIUM *pymedium; ! // @pyparm <o PySTGMEDIUM>|pmedium||The data to be placed in the object ! // @pyparm boolean|fRelease||If True, transfers ownership of the data to the object. If False, caller is responsible for releasing the STGMEDIUM. BOOL fRelease; if ( !PyArg_ParseTuple(args, "OOi:SetData", &obpformatetc, &obmedium, &fRelease) ) *************** *** 204,208 **** } ! // @pymethod <o PyIEnumFORMATETC>|PyIDataObject|EnumFormatEtc|Description of EnumFormatEtc. PyObject *PyIDataObject::EnumFormatEtc(PyObject *self, PyObject *args) { --- 208,212 ---- } ! // @pymethod <o PyIEnumFORMATETC>|PyIDataObject|EnumFormatEtc|Returns an enumerator to list the data formats that the object supports. PyObject *PyIDataObject::EnumFormatEtc(PyObject *self, PyObject *args) { *************** *** 210,214 **** if ( pIDO == NULL ) return NULL; ! // @pyparm int|dwDirection|DATADIR_GET|Description for dwDirection DWORD dwDirection = DATADIR_GET; IEnumFORMATETC * ppenumFormatEtc; --- 214,218 ---- if ( pIDO == NULL ) return NULL; ! // @pyparm int|dwDirection|DATADIR_GET|Indicates whether to return formats that can be queried or set (pythoncom.DATADIR_GET or DATADIR_SET) DWORD dwDirection = DATADIR_GET; IEnumFORMATETC * ppenumFormatEtc; *************** *** 225,229 **** } ! // @pymethod int|PyIDataObject|DAdvise|Description of DAdvise. PyObject *PyIDataObject::DAdvise(PyObject *self, PyObject *args) { --- 229,234 ---- } ! // @pymethod int|PyIDataObject|DAdvise|Connects the object to an interface that will receive notifications when its data changes ! // @rdesc Returns a unique number that is used to identify the connection PyObject *PyIDataObject::DAdvise(PyObject *self, PyObject *args) { *************** *** 233,239 **** FORMATETC formatetc; PyObject *obpformatetc; ! // @pyparm <o PyFORMATETC>|pformatetc||Description for pformatetc ! // @pyparm int|advf||Description for advf ! // @pyparm <o PyIAdviseSink *>|pAdvSink||Description for pAdvSink PyObject *obpAdvSink; DWORD advf; --- 238,244 ---- FORMATETC formatetc; PyObject *obpformatetc; ! // @pyparm <o PyFORMATETC>|pformatetc||Defines the type of data for which the sink will receive notifications. ! // @pyparm int|advf||Combination of values from ADVF enum. (which currently do not appear in any of the constants modules!) ! // @pyparm <o PyIAdviseSink>|pAdvSink||Currently this interface is not wrapped. PyObject *obpAdvSink; DWORD advf; *************** *** 257,261 **** } ! // @pymethod |PyIDataObject|DUnadvise|Description of DUnadvise. PyObject *PyIDataObject::DUnadvise(PyObject *self, PyObject *args) { --- 262,266 ---- } ! // @pymethod |PyIDataObject|DUnadvise|Disconnects a notification sink. PyObject *PyIDataObject::DUnadvise(PyObject *self, PyObject *args) { *************** *** 263,267 **** if ( pIDO == NULL ) return NULL; ! // @pyparm int|dwConnection||Description for dwConnection DWORD dwConnection; if ( !PyArg_ParseTuple(args, "l:DUnadvise", &dwConnection) ) --- 268,272 ---- if ( pIDO == NULL ) return NULL; ! // @pyparm int|dwConnection||Identifier of the connection as returned by DAdvise. DWORD dwConnection; if ( !PyArg_ParseTuple(args, "l:DUnadvise", &dwConnection) ) *************** *** 277,281 **** } ! // @pymethod <o PyIEnumSTATDATA>|PyIDataObject|EnumDAdvise|Description of EnumDAdvise. PyObject *PyIDataObject::EnumDAdvise(PyObject *self, PyObject *args) { --- 282,286 ---- } ! // @pymethod <o PyIEnumSTATDATA>|PyIDataObject|EnumDAdvise|Creates an enumerator to list connected notification sinks. PyObject *PyIDataObject::EnumDAdvise(PyObject *self, PyObject *args) { *************** *** 298,310 **** static struct PyMethodDef PyIDataObject_methods[] = { ! { "GetData", PyIDataObject::GetData, 1 }, // @pymeth GetData|Description of GetData ! { "GetDataHere", PyIDataObject::GetDataHere, 1 }, // @pymeth GetDataHere|Description of GetDataHere ! { "QueryGetData", PyIDataObject::QueryGetData, 1 }, // @pymeth QueryGetData|Description of QueryGetData ! { "GetCanonicalFormatEtc", PyIDataObject::GetCanonicalFormatEtc, 1 }, // @pymeth GetCanonicalFormatEtc|Description of GetCanonicalFormatEtc ! { "SetData", PyIDataObject::SetData, 1 }, // @pymeth SetData|Description of SetData ! { "EnumFormatEtc", PyIDataObject::EnumFormatEtc, 1 }, // @pymeth EnumFormatEtc|Description of EnumFormatEtc ! { "DAdvise", PyIDataObject::DAdvise, 1 }, // @pymeth DAdvise|Description of DAdvise ! { "DUnadvise", PyIDataObject::DUnadvise, 1 }, // @pymeth DUnadvise|Description of DUnadvise ! { "EnumDAdvise", PyIDataObject::EnumDAdvise, 1 }, // @pymeth EnumDAdvise|Description of EnumDAdvise { NULL } }; --- 303,315 ---- static struct PyMethodDef PyIDataObject_methods[] = { ! { "GetData", PyIDataObject::GetData, 1 }, // @pymeth GetData|Retrieves data from the object in specified format ! { "GetDataHere", PyIDataObject::GetDataHere, 1 }, // @pymeth GetDataHere|Retunrs a copy of the object's data in specified format ! { "QueryGetData", PyIDataObject::QueryGetData, 1 }, // @pymeth QueryGetData|Checks if the object supports returning data in a particular format ! { "GetCanonicalFormatEtc", PyIDataObject::GetCanonicalFormatEtc, 1 }, // @pymeth GetCanonicalFormatEtc|Transforms a FORMATECT data description into a general format that the object supports ! { "SetData", PyIDataObject::SetData, 1 }, // @pymeth SetData|Sets the data that the object will return. ! { "EnumFormatEtc", PyIDataObject::EnumFormatEtc, 1 }, // @pymeth EnumFormatEtc|Returns an enumerator to list the data formats that the object supports. ! { "DAdvise", PyIDataObject::DAdvise, 1 }, // @pymeth DAdvise|Connects the object to an interface that will receive notifications when its data changes ! { "DUnadvise", PyIDataObject::DUnadvise, 1 }, // @pymeth DUnadvise|Disconnects a notification sink. ! { "EnumDAdvise", PyIDataObject::EnumDAdvise, 1 }, // @pymeth EnumDAdvise|Creates an enumerator to list connected notification sinks. { NULL } }; |