mirror of https://github.com/python/cpython.git
Various small fixes. The demo now starts to limp along.
This commit is contained in:
parent
e1608529d1
commit
f0ded2f0bc
|
@ -191,7 +191,7 @@ static PyObject *TXNObj_TXNAdjustCursor(TXNObjectObject *_self, PyObject *_args)
|
||||||
RgnHandle ioCursorRgn;
|
RgnHandle ioCursorRgn;
|
||||||
PyMac_PRECHECK(TXNAdjustCursor);
|
PyMac_PRECHECK(TXNAdjustCursor);
|
||||||
if (!PyArg_ParseTuple(_args, "O&",
|
if (!PyArg_ParseTuple(_args, "O&",
|
||||||
ResObj_Convert, &ioCursorRgn))
|
OptResObj_Convert, &ioCursorRgn))
|
||||||
return NULL;
|
return NULL;
|
||||||
TXNAdjustCursor(_self->ob_itself,
|
TXNAdjustCursor(_self->ob_itself,
|
||||||
ioCursorRgn);
|
ioCursorRgn);
|
||||||
|
|
|
@ -37,13 +37,42 @@ def destination(self, type, name, arglist):
|
||||||
return classname, listname
|
return classname, listname
|
||||||
|
|
||||||
def writeinitialdefs(self):
|
def writeinitialdefs(self):
|
||||||
self.defsfile.write("def FOUR_CHAR_CODE(x): return x\n")
|
self.defsfile.write("""
|
||||||
|
def FOUR_CHAR_CODE(x): return x
|
||||||
|
false = 0
|
||||||
|
true = 1
|
||||||
|
kTXNClearThisControl = 0xFFFFFFFF
|
||||||
|
kTXNClearTheseFontFeatures = 0x80000000
|
||||||
|
kTXNDontCareTypeSize = 0xFFFFFFFF
|
||||||
|
kTXNDecrementTypeSize = 0x80000000
|
||||||
|
kTXNUseCurrentSelection = 0xFFFFFFFF
|
||||||
|
kTXNStartOffset = 0
|
||||||
|
kTXNEndOffset = 0x7FFFFFFF
|
||||||
|
MovieFileType = FOUR_CHAR_CODE('moov')
|
||||||
|
""")
|
||||||
|
|
||||||
def makeblacklistnames(self):
|
def makeblacklistnames(self):
|
||||||
return [
|
return [
|
||||||
"TXNGetFontDefaults", # Arg is too difficult
|
"TXNGetFontDefaults", # Arg is too difficult
|
||||||
"TXNSetFontDefaults", # Arg is too difficult
|
"TXNSetFontDefaults", # Arg is too difficult
|
||||||
"TXNInitTextension", # done manually
|
"TXNInitTextension", # done manually
|
||||||
|
|
||||||
|
# Constants with funny definitions
|
||||||
|
"kTXNClearThisControl",
|
||||||
|
"kTXNClearTheseFontFeatures",
|
||||||
|
"kTXNDontCareTypeSize",
|
||||||
|
"kTXNDecrementTypeSize",
|
||||||
|
"kTXNUseCurrentSelection",
|
||||||
|
"kTXNStartOffset",
|
||||||
|
"kTXNEndOffset",
|
||||||
|
"kTXNQDFontNameAttributeSize",
|
||||||
|
"kTXNQDFontFamilyIDAttributeSize",
|
||||||
|
"kTXNQDFontSizeAttributeSize",
|
||||||
|
"kTXNQDFontStyleAttributeSize",
|
||||||
|
"kTXNQDFontColorAttributeSize",
|
||||||
|
"kTXNTextEncodingAttributeSize",
|
||||||
|
"status",
|
||||||
|
"justification",
|
||||||
]
|
]
|
||||||
|
|
||||||
def makegreylist(self):
|
def makegreylist(self):
|
||||||
|
@ -84,6 +113,10 @@ def makerepairinstructions(self):
|
||||||
# In buffers are passed as void *
|
# In buffers are passed as void *
|
||||||
([("void", "*", "OutMode"), ("ByteCount", "*", "InMode")],
|
([("void", "*", "OutMode"), ("ByteCount", "*", "InMode")],
|
||||||
[("MlteInBuffer", "*", "InMode")]),
|
[("MlteInBuffer", "*", "InMode")]),
|
||||||
|
|
||||||
|
# The AdjustCursor region handle is optional
|
||||||
|
([("RgnHandle", "ioCursorRgn", "InMode")],
|
||||||
|
[("OptRgnHandle", "*", "*")])
|
||||||
]
|
]
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|
|
@ -107,6 +107,7 @@
|
||||||
DragReference = OpaqueByValueType("DragReference", "DragObj")
|
DragReference = OpaqueByValueType("DragReference", "DragObj")
|
||||||
DragTrackingMessage = Type("DragTrackingMessage", "h")
|
DragTrackingMessage = Type("DragTrackingMessage", "h")
|
||||||
RgnHandle = OpaqueByValueType("RgnHandle", "ResObj")
|
RgnHandle = OpaqueByValueType("RgnHandle", "ResObj")
|
||||||
|
OptRgnHandle = OpaqueByValueType("RgnHandle", "OptResObj")
|
||||||
GWorldPtr = OpaqueByValueType("GWorldPtr", "GWorldObj")
|
GWorldPtr = OpaqueByValueType("GWorldPtr", "GWorldObj")
|
||||||
MlteInBuffer = VarInputBufferType('void *', 'ByteCount', 'l')
|
MlteInBuffer = VarInputBufferType('void *', 'ByteCount', 'l')
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue