mirror of
https://github.com/python/cpython.git
synced 2025-11-02 19:12:55 +00:00
Added support for SyncCGContextOriginWithPort().
This commit is contained in:
parent
a5d78cc208
commit
38b504e9e3
4 changed files with 25 additions and 0 deletions
Binary file not shown.
|
|
@ -56,3 +56,4 @@ CGContextRestoreGState
|
||||||
CGContextSaveGState
|
CGContextSaveGState
|
||||||
CGContextRelease
|
CGContextRelease
|
||||||
CreateCGContextForPort
|
CreateCGContextForPort
|
||||||
|
SyncCGContextOriginWithPort
|
||||||
|
|
|
||||||
|
|
@ -1115,6 +1115,20 @@ static PyObject *CGContextRefObj_CGContextSetShouldAntialias(CGContextRefObject
|
||||||
return _res;
|
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[] = {
|
static PyMethodDef CGContextRefObj_methods[] = {
|
||||||
{"CGContextSaveGState", (PyCFunction)CGContextRefObj_CGContextSaveGState, 1,
|
{"CGContextSaveGState", (PyCFunction)CGContextRefObj_CGContextSaveGState, 1,
|
||||||
"() -> None"},
|
"() -> None"},
|
||||||
|
|
@ -1228,6 +1242,8 @@ static PyMethodDef CGContextRefObj_methods[] = {
|
||||||
"() -> None"},
|
"() -> None"},
|
||||||
{"CGContextSetShouldAntialias", (PyCFunction)CGContextRefObj_CGContextSetShouldAntialias, 1,
|
{"CGContextSetShouldAntialias", (PyCFunction)CGContextRefObj_CGContextSetShouldAntialias, 1,
|
||||||
"(int shouldAntialias) -> None"},
|
"(int shouldAntialias) -> None"},
|
||||||
|
{"SyncCGContextOriginWithPort", (PyCFunction)CGContextRefObj_SyncCGContextOriginWithPort, 1,
|
||||||
|
"(CGrafPtr port) -> None"},
|
||||||
{NULL, NULL, 0}
|
{NULL, NULL, 0}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,7 @@ OUTPUTFILE = MODNAME + "module.c" # The file generated by this program
|
||||||
|
|
||||||
from macsupport import *
|
from macsupport import *
|
||||||
|
|
||||||
|
CGrafPtr = OpaqueByValueType("CGrafPtr", "GrafObj")
|
||||||
|
|
||||||
# Create the type objects
|
# Create the type objects
|
||||||
|
|
||||||
|
|
@ -275,6 +276,13 @@ CGContextRef_methods = []
|
||||||
# ADD _methods initializer here
|
# ADD _methods initializer here
|
||||||
execfile(INPUTFILE)
|
execfile(INPUTFILE)
|
||||||
|
|
||||||
|
# manual method, lives in Quickdraw.h
|
||||||
|
f = Method(void, 'SyncCGContextOriginWithPort',
|
||||||
|
(CGContextRef, 'ctx', InMode),
|
||||||
|
(CGrafPtr, 'port', InMode),
|
||||||
|
)
|
||||||
|
CGContextRef_methods.append(f)
|
||||||
|
|
||||||
CreateCGContextForPort_body = """\
|
CreateCGContextForPort_body = """\
|
||||||
GrafPtr port;
|
GrafPtr port;
|
||||||
CGContextRef ctx;
|
CGContextRef ctx;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue