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

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


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

Modified Files:
	Qdoffsmodule.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: Qdoffsmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Modules/qdoffs/Qdoffsmodule.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** Qdoffsmodule.c	2001/05/17 21:56:51	1.7
--- Qdoffsmodule.c	2001/05/22 21:53:54	1.8
***************
*** 9,13 ****
--- 9,17 ----
  #include "pymactoolbox.h"
  
+ #ifdef WITHOUT_FRAMEWORKS
  #include <QDOffscreen.h>
+ #else
+ #include <Carbon/Carbon.h>
+ #endif
  
  #ifdef USE_TOOLBOX_OBJECT_GLUE
***************
*** 35,40 ****
  } GWorldObject;
  
! PyObject *GWorldObj_New(itself)
! 	GWorldPtr itself;
  {
  	GWorldObject *it;
--- 39,43 ----
  } GWorldObject;
  
! PyObject *GWorldObj_New(GWorldPtr itself)
  {
  	GWorldObject *it;
***************
*** 45,51 ****
  	return (PyObject *)it;
  }
! GWorldObj_Convert(v, p_itself)
! 	PyObject *v;
! 	GWorldPtr *p_itself;
  {
  	if (!GWorldObj_Check(v))
--- 48,52 ----
  	return (PyObject *)it;
  }
! GWorldObj_Convert(PyObject *v, GWorldPtr *p_itself)
  {
  	if (!GWorldObj_Check(v))
***************
*** 58,63 ****
  }
  
! static void GWorldObj_dealloc(self)
! 	GWorldObject *self;
  {
  	DisposeGWorld(self->ob_itself);
--- 59,63 ----
  }
  
! static void GWorldObj_dealloc(GWorldObject *self)
  {
  	DisposeGWorld(self->ob_itself);
***************
*** 65,71 ****
  }
  
! static PyObject *GWorldObj_GetGWorldDevice(_self, _args)
! 	GWorldObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 65,69 ----
  }
  
! static PyObject *GWorldObj_GetGWorldDevice(GWorldObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 79,85 ****
  }
  
! static PyObject *GWorldObj_GetGWorldPixMap(_self, _args)
! 	GWorldObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 77,81 ----
  }
  
! static PyObject *GWorldObj_GetGWorldPixMap(GWorldObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 93,99 ****
  }
  
! static PyObject *GWorldObj_as_GrafPtr(_self, _args)
! 	GWorldObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 89,93 ----
  }
  
! static PyObject *GWorldObj_as_GrafPtr(GWorldObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 119,125 ****
  PyMethodChain GWorldObj_chain = { GWorldObj_methods, NULL };
  
! static PyObject *GWorldObj_getattr(self, name)
! 	GWorldObject *self;
! 	char *name;
  {
  	return Py_FindMethodInChain(&GWorldObj_chain, (PyObject *)self, name);
--- 113,117 ----
  PyMethodChain GWorldObj_chain = { GWorldObj_methods, NULL };
  
! static PyObject *GWorldObj_getattr(GWorldObject *self, char *name)
  {
  	return Py_FindMethodInChain(&GWorldObj_chain, (PyObject *)self, name);
***************
*** 156,162 ****
  
  
! static PyObject *Qdoffs_NewGWorld(_self, _args)
! 	PyObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 148,152 ----
  
  
! static PyObject *Qdoffs_NewGWorld(PyObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 187,193 ****
  }
  
! static PyObject *Qdoffs_LockPixels(_self, _args)
! 	PyObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 177,181 ----
  }
  
! static PyObject *Qdoffs_LockPixels(PyObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 203,209 ****
  }
  
! static PyObject *Qdoffs_UnlockPixels(_self, _args)
! 	PyObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 191,195 ----
  }
  
! static PyObject *Qdoffs_UnlockPixels(PyObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 218,224 ****
  }
  
! static PyObject *Qdoffs_UpdateGWorld(_self, _args)
! 	PyObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 204,208 ----
  }
  
! static PyObject *Qdoffs_UpdateGWorld(PyObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 249,255 ****
  }
  
! static PyObject *Qdoffs_GetGWorld(_self, _args)
! 	PyObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 233,237 ----
  }
  
! static PyObject *Qdoffs_GetGWorld(PyObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 266,272 ****
  }
  
! static PyObject *Qdoffs_SetGWorld(_self, _args)
! 	PyObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 248,252 ----
  }
  
! static PyObject *Qdoffs_SetGWorld(PyObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 284,290 ****
  }
  
! static PyObject *Qdoffs_CTabChanged(_self, _args)
! 	PyObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 264,268 ----
  }
  
! static PyObject *Qdoffs_CTabChanged(PyObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 299,305 ****
  }
  
! static PyObject *Qdoffs_PixPatChanged(_self, _args)
! 	PyObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 277,281 ----
  }
  
! static PyObject *Qdoffs_PixPatChanged(PyObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 314,320 ****
  }
  
! static PyObject *Qdoffs_PortChanged(_self, _args)
! 	PyObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 290,294 ----
  }
  
! static PyObject *Qdoffs_PortChanged(PyObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 329,335 ****
  }
  
! static PyObject *Qdoffs_GDeviceChanged(_self, _args)
! 	PyObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 303,307 ----
  }
  
! static PyObject *Qdoffs_GDeviceChanged(PyObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 344,350 ****
  }
  
! static PyObject *Qdoffs_AllowPurgePixels(_self, _args)
! 	PyObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 316,320 ----
  }
  
! static PyObject *Qdoffs_AllowPurgePixels(PyObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 359,365 ****
  }
  
! static PyObject *Qdoffs_NoPurgePixels(_self, _args)
! 	PyObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 329,333 ----
  }
  
! static PyObject *Qdoffs_NoPurgePixels(PyObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 374,380 ****
  }
  
! static PyObject *Qdoffs_GetPixelsState(_self, _args)
! 	PyObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 342,346 ----
  }
  
! static PyObject *Qdoffs_GetPixelsState(PyObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 390,396 ****
  }
  
! static PyObject *Qdoffs_SetPixelsState(_self, _args)
! 	PyObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 356,360 ----
  }
  
! static PyObject *Qdoffs_SetPixelsState(PyObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 408,414 ****
  }
  
! static PyObject *Qdoffs_GetPixRowBytes(_self, _args)
! 	PyObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 372,376 ----
  }
  
! static PyObject *Qdoffs_GetPixRowBytes(PyObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 424,430 ****
  }
  
! static PyObject *Qdoffs_NewScreenBuffer(_self, _args)
! 	PyObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 386,390 ----
  }
  
! static PyObject *Qdoffs_NewScreenBuffer(PyObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 449,455 ****
  }
  
! static PyObject *Qdoffs_DisposeScreenBuffer(_self, _args)
! 	PyObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 409,413 ----
  }
  
! static PyObject *Qdoffs_DisposeScreenBuffer(PyObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 464,470 ****
  }
  
! static PyObject *Qdoffs_QDDone(_self, _args)
! 	PyObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 422,426 ----
  }
  
! static PyObject *Qdoffs_QDDone(PyObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 480,486 ****
  }
  
! static PyObject *Qdoffs_OffscreenVersion(_self, _args)
! 	PyObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 436,440 ----
  }
  
! static PyObject *Qdoffs_OffscreenVersion(PyObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 494,500 ****
  }
  
! static PyObject *Qdoffs_NewTempScreenBuffer(_self, _args)
! 	PyObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 448,452 ----
  }
  
! static PyObject *Qdoffs_NewTempScreenBuffer(PyObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 519,525 ****
  }
  
! static PyObject *Qdoffs_PixMap32Bit(_self, _args)
! 	PyObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 471,475 ----
  }
  
! static PyObject *Qdoffs_PixMap32Bit(PyObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 535,541 ****
  }
  
! static PyObject *Qdoffs_GetPixMapBytes(_self, _args)
! 	PyObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 485,489 ----
  }
  
! static PyObject *Qdoffs_GetPixMapBytes(PyObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 552,558 ****
  }
  
! static PyObject *Qdoffs_PutPixMapBytes(_self, _args)
! 	PyObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 500,504 ----
  }
  
! static PyObject *Qdoffs_PutPixMapBytes(PyObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 624,628 ****
  
  
! void initQdoffs()
  {
  	PyObject *m;
--- 570,574 ----
  
  
! void initQdoffs(void)
  {
  	PyObject *m;
***************
*** 631,636 ****
  
  
! 		PyMac_INIT_TOOLBOX_OBJECT_NEW(GWorldObj_New);
! 		PyMac_INIT_TOOLBOX_OBJECT_CONVERT(GWorldObj_Convert);
  
  
--- 577,582 ----
  
  
! 		PyMac_INIT_TOOLBOX_OBJECT_NEW(GWorldPtr, GWorldObj_New);
! 		PyMac_INIT_TOOLBOX_OBJECT_CONVERT(GWorldPtr, GWorldObj_Convert);