[Python-checkins] CVS: python/dist/src/Mac/Modules/drag Dragmodule.c,1.7,1.8

Jack Jansen jackjansen@users.sourceforge.net
Tue, 22 May 2001 14:52:06 -0700


Update of /cvsroot/python/python/dist/src/Mac/Modules/drag
In directory usw-pr-cvs1:/tmp/cvs-serv14014/Python/Mac/Modules/drag

Modified Files:
	Dragmodule.c 
Log Message:
Lots more Carbon/Carbon.h includes, new UPP routine names, function prototypes. Most toolbox modules now compile, link and import in MacOSX-MachO python.

Index: Dragmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Modules/drag/Dragmodule.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** Dragmodule.c	2001/05/17 21:55:17	1.7
--- Dragmodule.c	2001/05/22 21:52:04	1.8
***************
*** 9,13 ****
--- 9,17 ----
  #include "pymactoolbox.h"
  
+ #ifdef WITHOUT_FRAMEWORKS
  #include <Drag.h>
+ #else
+ #include <Carbon/Carbon.h>
+ #endif
  
  /* Callback glue routines */
***************
*** 42,47 ****
  } DragObjObject;
  
! PyObject *DragObj_New(itself)
! 	DragRef itself;
  {
  	DragObjObject *it;
--- 46,50 ----
  } DragObjObject;
  
! PyObject *DragObj_New(DragRef itself)
  {
  	DragObjObject *it;
***************
*** 56,62 ****
  	return (PyObject *)it;
  }
! DragObj_Convert(v, p_itself)
! 	PyObject *v;
! 	DragRef *p_itself;
  {
  	if (!DragObj_Check(v))
--- 59,63 ----
  	return (PyObject *)it;
  }
! DragObj_Convert(PyObject *v, DragRef *p_itself)
  {
  	if (!DragObj_Check(v))
***************
*** 69,74 ****
  }
  
! static void DragObj_dealloc(self)
! 	DragObjObject *self;
  {
  	Py_XDECREF(self->sendproc);
--- 70,74 ----
  }
  
! static void DragObj_dealloc(DragObjObject *self)
  {
  	Py_XDECREF(self->sendproc);
***************
*** 76,82 ****
  }
  
! static PyObject *DragObj_DisposeDrag(_self, _args)
! 	DragObjObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 76,80 ----
  }
  
! static PyObject *DragObj_DisposeDrag(DragObjObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 91,97 ****
  }
  
! static PyObject *DragObj_AddDragItemFlavor(_self, _args)
! 	DragObjObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 89,93 ----
  }
  
! static PyObject *DragObj_AddDragItemFlavor(DragObjObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 122,128 ****
  }
  
! static PyObject *DragObj_SetDragItemFlavorData(_self, _args)
! 	DragObjObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 118,122 ----
  }
  
! static PyObject *DragObj_SetDragItemFlavorData(DragObjObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 153,159 ****
  }
  
! static PyObject *DragObj_SetDragImage(_self, _args)
! 	DragObjObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 147,151 ----
  }
  
! static PyObject *DragObj_SetDragImage(DragObjObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 180,186 ****
  }
  
! static PyObject *DragObj_ChangeDragBehaviors(_self, _args)
! 	DragObjObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 172,176 ----
  }
  
! static PyObject *DragObj_ChangeDragBehaviors(DragObjObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 201,207 ****
  }
  
! static PyObject *DragObj_TrackDrag(_self, _args)
! 	DragObjObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 191,195 ----
  }
  
! static PyObject *DragObj_TrackDrag(DragObjObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 222,228 ****
  }
  
! static PyObject *DragObj_CountDragItems(_self, _args)
! 	DragObjObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 210,214 ----
  }
  
! static PyObject *DragObj_CountDragItems(DragObjObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 239,245 ****
  }
  
! static PyObject *DragObj_GetDragItemReferenceNumber(_self, _args)
! 	DragObjObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 225,229 ----
  }
  
! static PyObject *DragObj_GetDragItemReferenceNumber(DragObjObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 259,265 ****
  }
  
! static PyObject *DragObj_CountDragItemFlavors(_self, _args)
! 	DragObjObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 243,247 ----
  }
  
! static PyObject *DragObj_CountDragItemFlavors(DragObjObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 279,285 ****
  }
  
! static PyObject *DragObj_GetFlavorType(_self, _args)
! 	DragObjObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 261,265 ----
  }
  
! static PyObject *DragObj_GetFlavorType(DragObjObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 302,308 ****
  }
  
! static PyObject *DragObj_GetFlavorFlags(_self, _args)
! 	DragObjObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 282,286 ----
  }
  
! static PyObject *DragObj_GetFlavorFlags(DragObjObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 325,331 ****
  }
  
! static PyObject *DragObj_GetFlavorDataSize(_self, _args)
! 	DragObjObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 303,307 ----
  }
  
! static PyObject *DragObj_GetFlavorDataSize(DragObjObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 348,354 ****
  }
  
! static PyObject *DragObj_GetFlavorData(_self, _args)
! 	DragObjObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 324,328 ----
  }
  
! static PyObject *DragObj_GetFlavorData(DragObjObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 385,391 ****
  }
  
! static PyObject *DragObj_GetDragItemBounds(_self, _args)
! 	DragObjObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 359,363 ----
  }
  
! static PyObject *DragObj_GetDragItemBounds(DragObjObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 405,411 ****
  }
  
! static PyObject *DragObj_SetDragItemBounds(_self, _args)
! 	DragObjObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 377,381 ----
  }
  
! static PyObject *DragObj_SetDragItemBounds(DragObjObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 426,432 ****
  }
  
! static PyObject *DragObj_GetDropLocation(_self, _args)
! 	DragObjObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 396,400 ----
  }
  
! static PyObject *DragObj_GetDropLocation(DragObjObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 443,449 ****
  }
  
! static PyObject *DragObj_SetDropLocation(_self, _args)
! 	DragObjObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 411,415 ----
  }
  
! static PyObject *DragObj_SetDropLocation(DragObjObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 461,467 ****
  }
  
! static PyObject *DragObj_GetDragAttributes(_self, _args)
! 	DragObjObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 427,431 ----
  }
  
! static PyObject *DragObj_GetDragAttributes(DragObjObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 478,484 ****
  }
  
! static PyObject *DragObj_GetDragMouse(_self, _args)
! 	DragObjObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 442,446 ----
  }
  
! static PyObject *DragObj_GetDragMouse(DragObjObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 498,504 ****
  }
  
! static PyObject *DragObj_SetDragMouse(_self, _args)
! 	DragObjObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 460,464 ----
  }
  
! static PyObject *DragObj_SetDragMouse(DragObjObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 516,522 ****
  }
  
! static PyObject *DragObj_GetDragOrigin(_self, _args)
! 	DragObjObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 476,480 ----
  }
  
! static PyObject *DragObj_GetDragOrigin(DragObjObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 533,539 ****
  }
  
! static PyObject *DragObj_GetDragModifiers(_self, _args)
! 	DragObjObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 491,495 ----
  }
  
! static PyObject *DragObj_GetDragModifiers(DragObjObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 556,562 ****
  }
  
! static PyObject *DragObj_ShowDragHilite(_self, _args)
! 	DragObjObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 512,516 ----
  }
  
! static PyObject *DragObj_ShowDragHilite(DragObjObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 577,583 ****
  }
  
! static PyObject *DragObj_HideDragHilite(_self, _args)
! 	DragObjObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 531,535 ----
  }
  
! static PyObject *DragObj_HideDragHilite(DragObjObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 592,598 ****
  }
  
! static PyObject *DragObj_DragPreScroll(_self, _args)
! 	DragObjObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 544,548 ----
  }
  
! static PyObject *DragObj_DragPreScroll(DragObjObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 613,619 ****
  }
  
! static PyObject *DragObj_DragPostScroll(_self, _args)
! 	DragObjObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 563,567 ----
  }
  
! static PyObject *DragObj_DragPostScroll(DragObjObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 628,634 ****
  }
  
! static PyObject *DragObj_UpdateDragHilite(_self, _args)
! 	DragObjObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 576,580 ----
  }
  
! static PyObject *DragObj_UpdateDragHilite(DragObjObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 706,712 ****
  PyMethodChain DragObj_chain = { DragObj_methods, NULL };
  
! static PyObject *DragObj_getattr(self, name)
! 	DragObjObject *self;
! 	char *name;
  {
  	return Py_FindMethodInChain(&DragObj_chain, (PyObject *)self, name);
--- 652,656 ----
  PyMethodChain DragObj_chain = { DragObj_methods, NULL };
  
! static PyObject *DragObj_getattr(DragObjObject *self, char *name)
  {
  	return Py_FindMethodInChain(&DragObj_chain, (PyObject *)self, name);
***************
*** 743,749 ****
  
  
! static PyObject *Drag_NewDrag(_self, _args)
! 	PyObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 687,691 ----
  
  
! static PyObject *Drag_NewDrag(PyObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 759,765 ****
  }
  
! static PyObject *Drag_GetDragHiliteColor(_self, _args)
! 	PyObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 701,705 ----
  }
  
! static PyObject *Drag_GetDragHiliteColor(PyObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 778,784 ****
  }
  
! static PyObject *Drag_WaitMouseMoved(_self, _args)
! 	PyObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 718,722 ----
  }
  
! static PyObject *Drag_WaitMouseMoved(PyObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 794,800 ****
  }
  
! static PyObject *Drag_ZoomRects(_self, _args)
! 	PyObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 732,736 ----
  }
  
! static PyObject *Drag_ZoomRects(PyObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 820,826 ****
  }
  
! static PyObject *Drag_ZoomRegion(_self, _args)
! 	PyObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 756,760 ----
  }
  
! static PyObject *Drag_ZoomRegion(PyObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 846,852 ****
  }
  
! static PyObject *Drag_InstallTrackingHandler(_self, _args)
! 	PyObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 780,784 ----
  }
  
! static PyObject *Drag_InstallTrackingHandler(PyObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 866,872 ****
  }
  
! static PyObject *Drag_InstallReceiveHandler(_self, _args)
! 	PyObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 798,802 ----
  }
  
! static PyObject *Drag_InstallReceiveHandler(PyObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 886,892 ****
  }
  
! static PyObject *Drag_RemoveTrackingHandler(_self, _args)
! 	PyObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 816,820 ----
  }
  
! static PyObject *Drag_RemoveTrackingHandler(PyObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 904,910 ****
  }
  
! static PyObject *Drag_RemoveReceiveHandler(_self, _args)
! 	PyObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 832,836 ----
  }
  
! static PyObject *Drag_RemoveReceiveHandler(PyObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 1042,1046 ****
  
  
! void initDrag()
  {
  	PyObject *m;
--- 968,972 ----
  
  
! void initDrag(void)
  {
  	PyObject *m;
***************
*** 1049,1054 ****
  
  
! 		PyMac_INIT_TOOLBOX_OBJECT_NEW(DragObj_New);
! 		PyMac_INIT_TOOLBOX_OBJECT_CONVERT(DragObj_Convert);
  
  
--- 975,980 ----
  
  
! 		PyMac_INIT_TOOLBOX_OBJECT_NEW(DragRef, DragObj_New);
! 		PyMac_INIT_TOOLBOX_OBJECT_CONVERT(DragRef, DragObj_Convert);
  
  
***************
*** 1064,1073 ****
  		Py_FatalError("can't initialize DragObjType");
  
! 	dragglue_TrackingHandlerUPP = NewDragTrackingHandlerProc(dragglue_TrackingHandler);
! 	dragglue_ReceiveHandlerUPP = NewDragReceiveHandlerProc(dragglue_ReceiveHandler);
! 	dragglue_SendDataUPP = NewDragSendDataProc(dragglue_SendData);
  #if 0
! 	dragglue_InputUPP = NewDragInputProc(dragglue_Input);
! 	dragglue_DrawingUPP = NewDragDrawingProc(dragglue_Drawing);
  #endif
  
--- 990,999 ----
  		Py_FatalError("can't initialize DragObjType");
  
! 	dragglue_TrackingHandlerUPP = NewDragTrackingHandlerUPP(dragglue_TrackingHandler);
! 	dragglue_ReceiveHandlerUPP = NewDragReceiveHandlerUPP(dragglue_ReceiveHandler);
! 	dragglue_SendDataUPP = NewDragSendDataUPP(dragglue_SendData);
  #if 0
! 	dragglue_InputUPP = NewDragInputUPP(dragglue_Input);
! 	dragglue_DrawingUPP = NewDragDrawingUPP(dragglue_Drawing);
  #endif