[Python-checkins] CVS: python/dist/src/Mac/Modules/cg CGStubLib,1.1,1.2 CGStubLib.exp,1.1,1.2 _CGmodule.c,1.3,1.4 cgsupport.py,1.2,1.3

Just van Rossum jvr@users.sourceforge.net
Sat, 02 Mar 2002 02:20:46 -0800


Update of /cvsroot/python/python/dist/src/Mac/Modules/cg
In directory usw-pr-cvs1:/tmp/cvs-serv2641

Modified Files:
	CGStubLib CGStubLib.exp _CGmodule.c cgsupport.py 
Log Message:
Added support for SyncCGContextOriginWithPort().

Index: CGStubLib
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Modules/cg/CGStubLib,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
Binary files /tmp/cvsoGvkHU and /tmp/cvsyUg6gF differ

Index: CGStubLib.exp
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Modules/cg/CGStubLib.exp,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** CGStubLib.exp	13 Dec 2001 13:17:20 -0000	1.1
--- CGStubLib.exp	2 Mar 2002 10:20:44 -0000	1.2
***************
*** 57,58 ****
--- 57,59 ----
  CGContextRelease
  CreateCGContextForPort
+ SyncCGContextOriginWithPort

Index: _CGmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Modules/cg/_CGmodule.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** _CGmodule.c	18 Dec 2001 15:38:24 -0000	1.3
--- _CGmodule.c	2 Mar 2002 10:20:44 -0000	1.4
***************
*** 1116,1119 ****
--- 1116,1133 ----
  }
  
+ static PyObject *CGContextRefObj_SyncCGContextOriginWithPort(CGContextRefObject *_self, PyObject *_args)
+ {
+ 	PyObject *_res = NULL;
+ 	CGrafPtr port;
+ 	if (!PyArg_ParseTuple(_args, "O&",
+ 	                      GrafObj_Convert, &port))
+ 		return NULL;
+ 	SyncCGContextOriginWithPort(_self->ob_itself,
+ 	                            port);
+ 	Py_INCREF(Py_None);
+ 	_res = Py_None;
+ 	return _res;
+ }
+ 
  static PyMethodDef CGContextRefObj_methods[] = {
  	{"CGContextSaveGState", (PyCFunction)CGContextRefObj_CGContextSaveGState, 1,
***************
*** 1229,1232 ****
--- 1243,1248 ----
  	{"CGContextSetShouldAntialias", (PyCFunction)CGContextRefObj_CGContextSetShouldAntialias, 1,
  	 "(int shouldAntialias) -> None"},
+ 	{"SyncCGContextOriginWithPort", (PyCFunction)CGContextRefObj_SyncCGContextOriginWithPort, 1,
+ 	 "(CGrafPtr port) -> None"},
  	{NULL, NULL, 0}
  };

Index: cgsupport.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Modules/cg/cgsupport.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** cgsupport.py	13 Dec 2001 13:40:04 -0000	1.2
--- cgsupport.py	2 Mar 2002 10:20:44 -0000	1.3
***************
*** 18,21 ****
--- 18,22 ----
  from macsupport import *
  
+ CGrafPtr = OpaqueByValueType("CGrafPtr", "GrafObj")
  
  # Create the type objects
***************
*** 275,278 ****
--- 276,286 ----
  # ADD _methods initializer here
  execfile(INPUTFILE)
+ 
+ # manual method, lives in Quickdraw.h
+ f = Method(void, 'SyncCGContextOriginWithPort',
+     (CGContextRef, 'ctx', InMode),
+     (CGrafPtr, 'port', InMode),
+ )
+ CGContextRef_methods.append(f)
  
  CreateCGContextForPort_body = """\