summaryrefslogtreecommitdiffstats
path: root/Mac/Modules
diff options
context:
space:
mode:
authorJust van Rossum <just@letterror.com>2002-03-02 10:20:44 (GMT)
committerJust van Rossum <just@letterror.com>2002-03-02 10:20:44 (GMT)
commit38b504e9e3ef3049815779e8c18b62f690ec4ed2 (patch)
tree56f084f0e6c6ea1a99ede809eac17d3ea0515488 /Mac/Modules
parenta5d78cc208c24be62b50b6d1540e03be6612d3f2 (diff)
downloadcpython-38b504e9e3ef3049815779e8c18b62f690ec4ed2.zip
cpython-38b504e9e3ef3049815779e8c18b62f690ec4ed2.tar.gz
cpython-38b504e9e3ef3049815779e8c18b62f690ec4ed2.tar.bz2
Added support for SyncCGContextOriginWithPort().
Diffstat (limited to 'Mac/Modules')
-rwxr-xr-xMac/Modules/cg/CGStubLibbin3014 -> 2744 bytes
-rwxr-xr-xMac/Modules/cg/CGStubLib.exp1
-rwxr-xr-xMac/Modules/cg/_CGmodule.c16
-rwxr-xr-xMac/Modules/cg/cgsupport.py8
4 files changed, 25 insertions, 0 deletions
diff --git a/Mac/Modules/cg/CGStubLib b/Mac/Modules/cg/CGStubLib
index 74de909..8b374a1 100755
--- a/Mac/Modules/cg/CGStubLib
+++ b/Mac/Modules/cg/CGStubLib
Binary files differ
diff --git a/Mac/Modules/cg/CGStubLib.exp b/Mac/Modules/cg/CGStubLib.exp
index 4b034b5..9f4e592 100755
--- a/Mac/Modules/cg/CGStubLib.exp
+++ b/Mac/Modules/cg/CGStubLib.exp
@@ -56,3 +56,4 @@ CGContextRestoreGState
CGContextSaveGState
CGContextRelease
CreateCGContextForPort
+SyncCGContextOriginWithPort
diff --git a/Mac/Modules/cg/_CGmodule.c b/Mac/Modules/cg/_CGmodule.c
index 3bcb260..aaa5389 100755
--- a/Mac/Modules/cg/_CGmodule.c
+++ b/Mac/Modules/cg/_CGmodule.c
@@ -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}
};
diff --git a/Mac/Modules/cg/cgsupport.py b/Mac/Modules/cg/cgsupport.py
index e0931e5..c9255ee 100755
--- a/Mac/Modules/cg/cgsupport.py
+++ b/Mac/Modules/cg/cgsupport.py
@@ -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;