]> granicus.if.org Git - python/commitdiff
Added support for SyncCGContextOriginWithPort().
authorJust van Rossum <just@letterror.com>
Sat, 2 Mar 2002 10:20:44 +0000 (10:20 +0000)
committerJust van Rossum <just@letterror.com>
Sat, 2 Mar 2002 10:20:44 +0000 (10:20 +0000)
Mac/Modules/cg/CGStubLib
Mac/Modules/cg/CGStubLib.exp
Mac/Modules/cg/_CGmodule.c
Mac/Modules/cg/cgsupport.py

index 74de90927ee50226baa5e058d5359c5b4be42177..8b374a1c21a74d15a6f1ba4ce773809321ed72b1 100755 (executable)
Binary files a/Mac/Modules/cg/CGStubLib and b/Mac/Modules/cg/CGStubLib differ
index 4b034b5811973998f40253b90c297829dbcac0db..9f4e592c502b6ff52ff075cf7258fd99a9fc0950 100755 (executable)
@@ -56,3 +56,4 @@ CGContextRestoreGState
 CGContextSaveGState
 CGContextRelease
 CreateCGContextForPort
+SyncCGContextOriginWithPort
index 3bcb2602583e5250cc73eb81c679903ad507311e..aaa53899a72f9692399a4fd6de27adec3f51577a 100755 (executable)
@@ -1115,6 +1115,20 @@ static PyObject *CGContextRefObj_CGContextSetShouldAntialias(CGContextRefObject
        return _res;
 }
 
+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,
         "() -> None"},
@@ -1228,6 +1242,8 @@ static PyMethodDef CGContextRefObj_methods[] = {
         "() -> None"},
        {"CGContextSetShouldAntialias", (PyCFunction)CGContextRefObj_CGContextSetShouldAntialias, 1,
         "(int shouldAntialias) -> None"},
+       {"SyncCGContextOriginWithPort", (PyCFunction)CGContextRefObj_SyncCGContextOriginWithPort, 1,
+        "(CGrafPtr port) -> None"},
        {NULL, NULL, 0}
 };
 
index e0931e54761cbc50a649192b601a1dce3d4d536d..c9255eef29b3e2eb1af6bbbb5617ad0a279d798c 100755 (executable)
@@ -17,6 +17,7 @@ OUTPUTFILE = MODNAME + "module.c"     # The file generated by this program
 
 from macsupport import *
 
+CGrafPtr = OpaqueByValueType("CGrafPtr", "GrafObj")
 
 # Create the type objects
 
@@ -275,6 +276,13 @@ CGContextRef_methods = []
 # 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 = """\
 GrafPtr port;
 CGContextRef ctx;