@@ -46,9 +46,6 @@ extern PyObject *WinObj_WhichWindow(WindowPtr);
4646
4747#define resNotFound -192 /* Can't include <Errors.h> because of Python's "errors.h" */
4848
49- #ifdef HAVE_UNIVERSAL_HEADERS
50- #define WindowPeek WindowPtr
51- #endif
5249
5350static PyObject * Win_Error ;
5451
@@ -967,6 +964,36 @@ static PyObject *WinObj_SetWindowUserState(_self, _args)
967964 return _res ;
968965}
969966
967+ static PyObject * WinObj_GetWindowDataHandle (_self , _args )
968+ WindowObject * _self ;
969+ PyObject * _args ;
970+ {
971+ PyObject * _res = NULL ;
972+ Handle _rv ;
973+ if (!PyArg_ParseTuple (_args , "" ))
974+ return NULL ;
975+ _rv = GetWindowDataHandle (_self -> ob_itself );
976+ _res = Py_BuildValue ("O&" ,
977+ ResObj_New , _rv );
978+ return _res ;
979+ }
980+
981+ static PyObject * WinObj_SetWindowDataHandle (_self , _args )
982+ WindowObject * _self ;
983+ PyObject * _args ;
984+ {
985+ PyObject * _res = NULL ;
986+ Handle data ;
987+ if (!PyArg_ParseTuple (_args , "O&" ,
988+ ResObj_Convert , & data ))
989+ return NULL ;
990+ SetWindowDataHandle (_self -> ob_itself ,
991+ data );
992+ Py_INCREF (Py_None );
993+ _res = Py_None ;
994+ return _res ;
995+ }
996+
970997static PyObject * WinObj_CloseWindow (_self , _args )
971998 WindowObject * _self ;
972999 PyObject * _args ;
@@ -1128,6 +1155,10 @@ static PyMethodDef WinObj_methods[] = {
11281155 "(Rect r) -> None" },
11291156 {"SetWindowUserState" , (PyCFunction )WinObj_SetWindowUserState , 1 ,
11301157 "(Rect r) -> None" },
1158+ {"GetWindowDataHandle" , (PyCFunction )WinObj_GetWindowDataHandle , 1 ,
1159+ "() -> (Handle _rv)" },
1160+ {"SetWindowDataHandle" , (PyCFunction )WinObj_SetWindowDataHandle , 1 ,
1161+ "(Handle data) -> None" },
11311162 {"CloseWindow" , (PyCFunction )WinObj_CloseWindow , 1 ,
11321163 "() -> None" },
11331164 {"MoveWindow" , (PyCFunction )WinObj_MoveWindow , 1 ,
0 commit comments