Kaydet (Commit) da6081fc authored tarafından Jack Jansen's avatar Jack Jansen

Ported to Universal Headers 3.4.2. Qd and Qt remain to be done.

Completely untested.
üst fe3fe4ad
......@@ -699,20 +699,20 @@ static PyObject *CGContextRefObj_CGContextSetGrayStrokeColor(CGContextRefObject
static PyObject *CGContextRefObj_CGContextSetRGBFillColor(CGContextRefObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
float r;
float g;
float b;
float red;
float green;
float blue;
float alpha;
if (!PyArg_ParseTuple(_args, "ffff",
&r,
&g,
&b,
&red,
&green,
&blue,
&alpha))
return NULL;
CGContextSetRGBFillColor(_self->ob_itself,
r,
g,
b,
red,
green,
blue,
alpha);
Py_INCREF(Py_None);
_res = Py_None;
......@@ -722,20 +722,20 @@ static PyObject *CGContextRefObj_CGContextSetRGBFillColor(CGContextRefObject *_s
static PyObject *CGContextRefObj_CGContextSetRGBStrokeColor(CGContextRefObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
float r;
float g;
float b;
float red;
float green;
float blue;
float alpha;
if (!PyArg_ParseTuple(_args, "ffff",
&r,
&g,
&b,
&red,
&green,
&blue,
&alpha))
return NULL;
CGContextSetRGBStrokeColor(_self->ob_itself,
r,
g,
b,
red,
green,
blue,
alpha);
Py_INCREF(Py_None);
_res = Py_None;
......@@ -745,23 +745,23 @@ static PyObject *CGContextRefObj_CGContextSetRGBStrokeColor(CGContextRefObject *
static PyObject *CGContextRefObj_CGContextSetCMYKFillColor(CGContextRefObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
float c;
float m;
float y;
float k;
float cyan;
float magenta;
float yellow;
float black;
float alpha;
if (!PyArg_ParseTuple(_args, "fffff",
&c,
&m,
&y,
&k,
&cyan,
&magenta,
&yellow,
&black,
&alpha))
return NULL;
CGContextSetCMYKFillColor(_self->ob_itself,
c,
m,
y,
k,
cyan,
magenta,
yellow,
black,
alpha);
Py_INCREF(Py_None);
_res = Py_None;
......@@ -771,29 +771,55 @@ static PyObject *CGContextRefObj_CGContextSetCMYKFillColor(CGContextRefObject *_
static PyObject *CGContextRefObj_CGContextSetCMYKStrokeColor(CGContextRefObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
float c;
float m;
float y;
float k;
float cyan;
float magenta;
float yellow;
float black;
float alpha;
if (!PyArg_ParseTuple(_args, "fffff",
&c,
&m,
&y,
&k,
&cyan,
&magenta,
&yellow,
&black,
&alpha))
return NULL;
CGContextSetCMYKStrokeColor(_self->ob_itself,
c,
m,
y,
k,
cyan,
magenta,
yellow,
black,
alpha);
Py_INCREF(Py_None);
_res = Py_None;
return _res;
}
static PyObject *CGContextRefObj_CGContextGetInterpolationQuality(CGContextRefObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
int _rv;
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = CGContextGetInterpolationQuality(_self->ob_itself);
_res = Py_BuildValue("i",
_rv);
return _res;
}
static PyObject *CGContextRefObj_CGContextSetInterpolationQuality(CGContextRefObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
int quality;
if (!PyArg_ParseTuple(_args, "i",
&quality))
return NULL;
CGContextSetInterpolationQuality(_self->ob_itself,
quality);
Py_INCREF(Py_None);
_res = Py_None;
return _res;
}
static PyObject *CGContextRefObj_CGContextSetCharacterSpacing(CGContextRefObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
......@@ -1107,13 +1133,17 @@ static PyMethodDef CGContextRefObj_methods[] = {
{"CGContextSetGrayStrokeColor", (PyCFunction)CGContextRefObj_CGContextSetGrayStrokeColor, 1,
PyDoc_STR("(float gray, float alpha) -> None")},
{"CGContextSetRGBFillColor", (PyCFunction)CGContextRefObj_CGContextSetRGBFillColor, 1,
PyDoc_STR("(float r, float g, float b, float alpha) -> None")},
PyDoc_STR("(float red, float green, float blue, float alpha) -> None")},
{"CGContextSetRGBStrokeColor", (PyCFunction)CGContextRefObj_CGContextSetRGBStrokeColor, 1,
PyDoc_STR("(float r, float g, float b, float alpha) -> None")},
PyDoc_STR("(float red, float green, float blue, float alpha) -> None")},
{"CGContextSetCMYKFillColor", (PyCFunction)CGContextRefObj_CGContextSetCMYKFillColor, 1,
PyDoc_STR("(float c, float m, float y, float k, float alpha) -> None")},
PyDoc_STR("(float cyan, float magenta, float yellow, float black, float alpha) -> None")},
{"CGContextSetCMYKStrokeColor", (PyCFunction)CGContextRefObj_CGContextSetCMYKStrokeColor, 1,
PyDoc_STR("(float c, float m, float y, float k, float alpha) -> None")},
PyDoc_STR("(float cyan, float magenta, float yellow, float black, float alpha) -> None")},
{"CGContextGetInterpolationQuality", (PyCFunction)CGContextRefObj_CGContextGetInterpolationQuality, 1,
PyDoc_STR("() -> (int _rv)")},
{"CGContextSetInterpolationQuality", (PyCFunction)CGContextRefObj_CGContextSetInterpolationQuality, 1,
PyDoc_STR("(int quality) -> None")},
{"CGContextSetCharacterSpacing", (PyCFunction)CGContextRefObj_CGContextSetCharacterSpacing, 1,
PyDoc_STR("(float spacing) -> None")},
{"CGContextSetTextPosition", (PyCFunction)CGContextRefObj_CGContextSetTextPosition, 1,
......
......@@ -114,6 +114,7 @@ CGLineCap = int
CGLineJoin = int
CGTextDrawingMode = int
CGPathDrawingMode = int
CGInterpolationQuality = int
# The real objects
CGContextRef = OpaqueByValueType("CGContextRef", "CGContextRefObj")
......
This diff is collapsed.
......@@ -125,6 +125,7 @@ class MyScanner(Scanner):
## 'DataBrowserTableViewColumnDesc',
## 'DataBrowserListViewColumnDesc',
'CFDataRef',
'DataBrowserListViewHeaderDesc', # difficult struct
]
def makerepairinstructions(self):
......
......@@ -47,12 +47,14 @@ class MyScanner(Scanner):
self.defsfile.write("def FOUR_CHAR_CODE(x): return x\n")
self.defsfile.write("from Carbon.TextEdit import *\n")
self.defsfile.write("from Carbon.QuickDraw import *\n")
self.defsfile.write("fkDragActionAll = -1\n")
self.defsfile.write("\n")
# Defines unparseable in Drag.h
self.defsfile.write(MISSING_DEFINES)
def makeblacklistnames(self):
return [
"kDragActionAll",
]
def makeblacklisttypes(self):
......
......@@ -136,7 +136,9 @@ class MyScanner(Scanner_OSX):
"IOCompletionUPP", # Proc pointer
"AliasFilterProcPtr",
"AliasFilterUPP",
"FNSubscriptionUPP",
"FNSubscriptionRef", # Lazy, for now.
]
def makerepairinstructions(self):
......
......@@ -906,6 +906,32 @@ static PyObject *Icn_RegisterIconRefFromResource(PyObject *_self, PyObject *_arg
return _res;
}
static PyObject *Icn_RegisterIconRefFromFSRef(PyObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
OSStatus _err;
OSType creator;
OSType iconType;
FSRef iconFile;
IconRef theIconRef;
#ifndef RegisterIconRefFromFSRef
PyMac_PRECHECK(RegisterIconRefFromFSRef);
#endif
if (!PyArg_ParseTuple(_args, "O&O&O&",
PyMac_GetOSType, &creator,
PyMac_GetOSType, &iconType,
PyMac_GetFSRef, &iconFile))
return NULL;
_err = RegisterIconRefFromFSRef(creator,
iconType,
&iconFile,
&theIconRef);
if (_err != noErr) return PyMac_Error(_err);
_res = Py_BuildValue("O&",
ResObj_New, theIconRef);
return _res;
}
static PyObject *Icn_UnregisterIconRef(PyObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
......@@ -1381,6 +1407,26 @@ static PyObject *Icn_ReadIconFile(PyObject *_self, PyObject *_args)
return _res;
}
static PyObject *Icn_ReadIconFromFSRef(PyObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
OSStatus _err;
FSRef ref;
IconFamilyHandle iconFamily;
#ifndef ReadIconFromFSRef
PyMac_PRECHECK(ReadIconFromFSRef);
#endif
if (!PyArg_ParseTuple(_args, "O&",
PyMac_GetFSRef, &ref))
return NULL;
_err = ReadIconFromFSRef(&ref,
&iconFamily);
if (_err != noErr) return PyMac_Error(_err);
_res = Py_BuildValue("O&",
ResObj_New, iconFamily);
return _res;
}
static PyObject *Icn_WriteIconFile(PyObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
......@@ -1479,6 +1525,8 @@ static PyMethodDef Icn_methods[] = {
PyDoc_STR("(OSType creator, OSType iconType, IconFamilyHandle iconFamily) -> (IconRef theIconRef)")},
{"RegisterIconRefFromResource", (PyCFunction)Icn_RegisterIconRefFromResource, 1,
PyDoc_STR("(OSType creator, OSType iconType, FSSpec resourceFile, SInt16 resourceID) -> (IconRef theIconRef)")},
{"RegisterIconRefFromFSRef", (PyCFunction)Icn_RegisterIconRefFromFSRef, 1,
PyDoc_STR("(OSType creator, OSType iconType, FSRef iconFile) -> (IconRef theIconRef)")},
{"UnregisterIconRef", (PyCFunction)Icn_UnregisterIconRef, 1,
PyDoc_STR("(OSType creator, OSType iconType) -> None")},
{"UpdateIconRef", (PyCFunction)Icn_UpdateIconRef, 1,
......@@ -1521,6 +1569,8 @@ static PyMethodDef Icn_methods[] = {
PyDoc_STR("(OSType creator, OSType iconType, FSSpec iconFile) -> (IconRef theIconRef)")},
{"ReadIconFile", (PyCFunction)Icn_ReadIconFile, 1,
PyDoc_STR("(FSSpec iconFile) -> (IconFamilyHandle iconFamily)")},
{"ReadIconFromFSRef", (PyCFunction)Icn_ReadIconFromFSRef, 1,
PyDoc_STR("(FSRef ref) -> (IconFamilyHandle iconFamily)")},
{"WriteIconFile", (PyCFunction)Icn_WriteIconFile, 1,
PyDoc_STR("(IconFamilyHandle iconFamily, FSSpec iconFile) -> None")},
{NULL, NULL, 0}
......
......@@ -48,6 +48,8 @@ class MyScanner(Scanner):
"err",
# OS8 only
'IconServicesTerminate',
# Lazy, right now.
"GetIconRefFromFileInfo"
]
def makeblacklisttypes(self):
......@@ -55,6 +57,7 @@ class MyScanner(Scanner):
"IconActionUPP",
"IconGetterUPP",
"CFragInitBlockPtr",
"CGRect_ptr",
]
def makerepairinstructions(self):
......@@ -63,6 +66,7 @@ class MyScanner(Scanner):
def writeinitialdefs(self):
self.defsfile.write("def FOUR_CHAR_CODE(x): return x\n")
self.defsfile.write("from Carbon.Files import *\n")
if __name__ == "__main__":
main()
......@@ -32,6 +32,7 @@ IconTransformType = Type("IconTransformType", "h")
IconSelectorValue = Type("IconSelectorValue", "l")
IconServicesUsageFlags = Type("IconServicesUsageFlags", "l")
RGBColor = OpaqueType("RGBColor", "QdRGB")
CGContextRef = OpaqueByValueType("CGContextRef", "CGContextRefObj")
#WindowPeek = OpaqueByValueType("WindowPeek", OBJECTPREFIX)
......
......@@ -97,6 +97,96 @@ static PyObject *Launch_LSCopyItemInfoForURL(PyObject *_self, PyObject *_args)
return _res;
}
static PyObject *Launch_LSGetExtensionInfo(PyObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
OSStatus _err;
UniChar *inNameLen__in__;
UniCharCount inNameLen__len__;
int inNameLen__in_len__;
UniCharCount outExtStartIndex;
if (!PyArg_ParseTuple(_args, "u#",
&inNameLen__in__, &inNameLen__in_len__))
return NULL;
inNameLen__len__ = inNameLen__in_len__;
_err = LSGetExtensionInfo(inNameLen__len__, inNameLen__in__,
&outExtStartIndex);
if (_err != noErr) return PyMac_Error(_err);
_res = Py_BuildValue("l",
outExtStartIndex);
return _res;
}
static PyObject *Launch_LSCopyDisplayNameForRef(PyObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
OSStatus _err;
FSRef inRef;
CFStringRef outDisplayName;
if (!PyArg_ParseTuple(_args, "O&",
PyMac_GetFSRef, &inRef))
return NULL;
_err = LSCopyDisplayNameForRef(&inRef,
&outDisplayName);
if (_err != noErr) return PyMac_Error(_err);
_res = Py_BuildValue("O&",
CFStringRefObj_New, outDisplayName);
return _res;
}
static PyObject *Launch_LSCopyDisplayNameForURL(PyObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
OSStatus _err;
CFURLRef inURL;
CFStringRef outDisplayName;
if (!PyArg_ParseTuple(_args, "O&",
CFURLRefObj_Convert, &inURL))
return NULL;
_err = LSCopyDisplayNameForURL(inURL,
&outDisplayName);
if (_err != noErr) return PyMac_Error(_err);
_res = Py_BuildValue("O&",
CFStringRefObj_New, outDisplayName);
return _res;
}
static PyObject *Launch_LSSetExtensionHiddenForRef(PyObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
OSStatus _err;
FSRef inRef;
Boolean inHide;
if (!PyArg_ParseTuple(_args, "O&b",
PyMac_GetFSRef, &inRef,
&inHide))
return NULL;
_err = LSSetExtensionHiddenForRef(&inRef,
inHide);
if (_err != noErr) return PyMac_Error(_err);
Py_INCREF(Py_None);
_res = Py_None;
return _res;
}
static PyObject *Launch_LSSetExtensionHiddenForURL(PyObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
OSStatus _err;
CFURLRef inURL;
Boolean inHide;
if (!PyArg_ParseTuple(_args, "O&b",
CFURLRefObj_Convert, &inURL,
&inHide))
return NULL;
_err = LSSetExtensionHiddenForURL(inURL,
inHide);
if (_err != noErr) return PyMac_Error(_err);
Py_INCREF(Py_None);
_res = Py_None;
return _res;
}
static PyObject *Launch_LSCopyKindStringForRef(PyObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
......@@ -323,6 +413,16 @@ static PyMethodDef Launch_methods[] = {
PyDoc_STR("(FSRef inItemRef, LSRequestedInfo inWhichInfo) -> (LSItemInfoRecord outItemInfo)")},
{"LSCopyItemInfoForURL", (PyCFunction)Launch_LSCopyItemInfoForURL, 1,
PyDoc_STR("(CFURLRef inURL, LSRequestedInfo inWhichInfo) -> (LSItemInfoRecord outItemInfo)")},
{"LSGetExtensionInfo", (PyCFunction)Launch_LSGetExtensionInfo, 1,
PyDoc_STR("(Buffer inNameLen) -> (UniCharCount outExtStartIndex)")},
{"LSCopyDisplayNameForRef", (PyCFunction)Launch_LSCopyDisplayNameForRef, 1,
PyDoc_STR("(FSRef inRef) -> (CFStringRef outDisplayName)")},
{"LSCopyDisplayNameForURL", (PyCFunction)Launch_LSCopyDisplayNameForURL, 1,
PyDoc_STR("(CFURLRef inURL) -> (CFStringRef outDisplayName)")},
{"LSSetExtensionHiddenForRef", (PyCFunction)Launch_LSSetExtensionHiddenForRef, 1,
PyDoc_STR("(FSRef inRef, Boolean inHide) -> None")},
{"LSSetExtensionHiddenForURL", (PyCFunction)Launch_LSSetExtensionHiddenForURL, 1,
PyDoc_STR("(CFURLRef inURL, Boolean inHide) -> None")},
{"LSCopyKindStringForRef", (PyCFunction)Launch_LSCopyKindStringForRef, 1,
PyDoc_STR("(FSRef inFSRef) -> (CFStringRef outKindString)")},
{"LSCopyKindStringForURL", (PyCFunction)Launch_LSCopyKindStringForURL, 1,
......
......@@ -39,8 +39,10 @@ class MyScanner(Scanner):
def writeinitialdefs(self):
self.defsfile.write("def FOUR_CHAR_CODE(x): return x\n")
self.defsfile.write("from Carbon.Files import *\n")
self.defsfile.write("kLSRequestAllInfo = -1\n")
self.defsfile.write("kLSRolesAll = -1\n")
self.defsfile.write("kLSInvalidExtensionIndex = -1\n")
def makeblacklistnames(self):
return [
......@@ -48,6 +50,7 @@ class MyScanner(Scanner):
"LSTerm",
"kLSRequestAllInfo",
"kLSRolesAll",
"kLSInvalidExtensionIndex",
]
def makeblacklisttypes(self):
......@@ -67,6 +70,12 @@ class MyScanner(Scanner):
[('OptCFStringRef', 'inBundleID', 'InMode')]),
([('CFStringRef', 'inName', 'InMode')],
[('OptCFStringRef', 'inName', 'InMode')]),
# Unicode filenames passed as length, buffer. LSGetExtensionInfo
([('UniCharCount', '*', 'InMode'),
('UniChar_ptr', '*', 'InMode')],
[('UnicodeReverseInBuffer', '*', 'InMode')]
),
]
if __name__ == "__main__":
......
......@@ -24,22 +24,9 @@ LSAcceptanceFlags = Type("LSAcceptanceFlags", "l")
LSInitializeFlags = Type("LSInitializeFlags", "l")
LSRequestedInfo = Type("LSRequestedInfo", "l")
LSRolesMask = Type("LSRolesMask", "l")
UniCharCount = Type("UniCharCount", "l")
OptCFStringRef = OpaqueByValueType("CFStringRef", "OptCFStringRefObj")
LSItemInfoRecord = OpaqueType("LSItemInfoRecord", "LSItemInfoRecord")
#MenuRef = OpaqueByValueType("MenuRef", "MenuObj")
#MenuItemIndex = Type("MenuItemIndex", "H")
#WindowPeek = OpaqueByValueType("WindowPeek", OBJECTPREFIX)
#RgnHandle = FakeType("(RgnHandle)0")
# XXXX Should be next, but this will break a lot of code...
# RgnHandle = OpaqueByValueType("RgnHandle", "OptResObj")
#KeyMap = ArrayOutputBufferType("KeyMap")
##MacOSEventKind = Type("MacOSEventKind", "h") # Old-style
##MacOSEventMask = Type("MacOSEventMask", "h") # Old-style
#EventMask = Type("EventMask", "H")
#EventKind = Type("EventKind", "H")
includestuff = includestuff + """
#include <ApplicationServices/ApplicationServices.h>
......
......@@ -361,7 +361,7 @@ static PyObject *TXNObj_TXNGrowWindow(TXNObjectObject *_self, PyObject *_args)
static PyObject *TXNObj_TXNZoomWindow(TXNObjectObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
short iPart;
SInt16 iPart;
#ifndef TXNZoomWindow
PyMac_PRECHECK(TXNZoomWindow);
#endif
......@@ -697,37 +697,6 @@ static PyObject *TXNObj_TXNSetDataFromFile(TXNObjectObject *_self, PyObject *_ar
return _res;
}
static PyObject *TXNObj_TXNSetData(TXNObjectObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
OSStatus _err;
TXNDataType iDataType;
void * *iDataPtr__in__;
ByteCount iDataPtr__len__;
int iDataPtr__in_len__;
TXNOffset iStartOffset;
TXNOffset iEndOffset;
#ifndef TXNSetData
PyMac_PRECHECK(TXNSetData);
#endif
if (!PyArg_ParseTuple(_args, "O&s#ll",
PyMac_GetOSType, &iDataType,
&iDataPtr__in__, &iDataPtr__in_len__,
&iStartOffset,
&iEndOffset))
return NULL;
iDataPtr__len__ = iDataPtr__in_len__;
_err = TXNSetData(_self->ob_itself,
iDataType,
iDataPtr__in__, iDataPtr__len__,
iStartOffset,
iEndOffset);
if (_err != noErr) return PyMac_Error(_err);
Py_INCREF(Py_None);
_res = Py_None;
return _res;
}
static PyObject *TXNObj_TXNGetChangeCount(TXNObjectObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
......@@ -1150,6 +1119,20 @@ static PyObject *TXNObj_TXNIsObjectAttachedToSpecificWindow(TXNObjectObject *_se
return _res;
}
static PyObject *TXNObj_TXNRecalcTextLayout(TXNObjectObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
#ifndef TXNRecalcTextLayout
PyMac_PRECHECK(TXNRecalcTextLayout);
#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
TXNRecalcTextLayout(_self->ob_itself);
Py_INCREF(Py_None);
_res = Py_None;
return _res;
}
static PyMethodDef TXNObj_methods[] = {
{"TXNDeleteObject", (PyCFunction)TXNObj_TXNDeleteObject, 1,
PyDoc_STR("() -> None")},
......@@ -1180,7 +1163,7 @@ static PyMethodDef TXNObj_methods[] = {
{"TXNGrowWindow", (PyCFunction)TXNObj_TXNGrowWindow, 1,
PyDoc_STR("(EventRecord iEvent) -> None")},
{"TXNZoomWindow", (PyCFunction)TXNObj_TXNZoomWindow, 1,
PyDoc_STR("(short iPart) -> None")},
PyDoc_STR("(SInt16 iPart) -> None")},
{"TXNCanUndo", (PyCFunction)TXNObj_TXNCanUndo, 1,
PyDoc_STR("() -> (Boolean _rv, TXNActionKey oTXNActionKey)")},
{"TXNUndo", (PyCFunction)TXNObj_TXNUndo, 1,
......@@ -1215,8 +1198,6 @@ static PyMethodDef TXNObj_methods[] = {
PyDoc_STR("(TXNOffset iStartOffset, TXNOffset iEndOffset, TXNDataType iEncoding) -> (Handle oDataHandle)")},
{"TXNSetDataFromFile", (PyCFunction)TXNObj_TXNSetDataFromFile, 1,
PyDoc_STR("(SInt16 iFileRefNum, OSType iFileType, ByteCount iFileLength, TXNOffset iStartOffset, TXNOffset iEndOffset) -> None")},
{"TXNSetData", (PyCFunction)TXNObj_TXNSetData, 1,
PyDoc_STR("(TXNDataType iDataType, Buffer iDataPtr, TXNOffset iStartOffset, TXNOffset iEndOffset) -> None")},
{"TXNGetChangeCount", (PyCFunction)TXNObj_TXNGetChangeCount, 1,
PyDoc_STR("() -> (ItemCount _rv)")},
{"TXNSave", (PyCFunction)TXNObj_TXNSave, 1,
......@@ -1257,6 +1238,8 @@ static PyMethodDef TXNObj_methods[] = {
PyDoc_STR("(UInt32 iLineNumber) -> (Fixed oLineWidth, Fixed oLineHeight)")},
{"TXNIsObjectAttachedToSpecificWindow", (PyCFunction)TXNObj_TXNIsObjectAttachedToSpecificWindow, 1,
PyDoc_STR("(WindowPtr iWindow) -> (Boolean oAttached)")},
{"TXNRecalcTextLayout", (PyCFunction)TXNObj_TXNRecalcTextLayout, 1,
PyDoc_STR("() -> None")},
{NULL, NULL, 0}
};
......@@ -1493,7 +1476,7 @@ static PyObject *Mlte_TXNNewObject(PyObject *_self, PyObject *_args)
OSStatus _err;
FSSpec * iFileSpec;
WindowPtr iWindow;
Rect * iFrame;
Rect iFrame;
TXNFrameOptions iFrameOptions;
TXNFrameType iFrameType;
TXNFileType iFileType;
......@@ -1506,7 +1489,7 @@ static PyObject *Mlte_TXNNewObject(PyObject *_self, PyObject *_args)
if (!PyArg_ParseTuple(_args, "O&O&O&llO&l",
OptFSSpecPtr_Convert, &iFileSpec,
WinObj_Convert, &iWindow,
OptRectPtr_Convert, &iFrame,
PyMac_GetRect, &iFrame,
&iFrameOptions,
&iFrameType,
PyMac_GetOSType, &iFileType,
......@@ -1514,7 +1497,7 @@ static PyObject *Mlte_TXNNewObject(PyObject *_self, PyObject *_args)
return NULL;
_err = TXNNewObject(iFileSpec,
iWindow,
iFrame,
&iFrame,
iFrameOptions,
iFrameType,
iFileType,
......@@ -1656,7 +1639,7 @@ static PyObject *Mlte_TXNInitTextension(PyObject *_self, PyObject *_args)
static PyMethodDef Mlte_methods[] = {
{"TXNNewObject", (PyCFunction)Mlte_TXNNewObject, 1,
PyDoc_STR("(FSSpec * iFileSpec, WindowPtr iWindow, Rect * iFrame, TXNFrameOptions iFrameOptions, TXNFrameType iFrameType, TXNFileType iFileType, TXNPermanentTextEncodingType iPermanentEncoding) -> (TXNObject oTXNObject, TXNFrameID oTXNFrameID)")},
PyDoc_STR("(FSSpec * iFileSpec, WindowPtr iWindow, Rect iFrame, TXNFrameOptions iFrameOptions, TXNFrameType iFrameType, TXNFileType iFileType, TXNPermanentTextEncodingType iPermanentEncoding) -> (TXNObject oTXNObject, TXNFrameID oTXNFrameID)")},
{"TXNTerminateTextension", (PyCFunction)Mlte_TXNTerminateTextension, 1,
PyDoc_STR("() -> None")},
{"TXNIsScrapPastable", (PyCFunction)Mlte_TXNIsScrapPastable, 1,
......
......@@ -52,6 +52,7 @@ kTXNEndOffset = 0x7FFFFFFF
MovieFileType = FOUR_CHAR_CODE('moov')
kTXNUseEncodingWordRulesMask = 0x80000000
kTXNFontSizeAttributeSize = 4
normal = 0
""")
def makeblacklistnames(self):
......@@ -94,10 +95,18 @@ kTXNFontSizeAttributeSize = 4
"TXNBackground", #TBD
"TXNFindUPP",
"ATSUStyle", #TBD
"TXNBackground_ptr", #TBD
"TXNControlData_ptr", #TBD
"TXNControlTag_ptr", #TBD
"TXNLongRect", #TBD
"TXNLongRect_ptr", #TBD
"TXNTypeAttributes_ptr", #TBD
"TXNActionKeyMapperProcPtr",
"TXNActionKeyMapperUPP",
"TXNTextBoxOptionsData",
"TXNCountOptions",
"void_ptr",
]
def makerepairinstructions(self):
......
......@@ -47,6 +47,7 @@ class MyScanner(Scanner):
def makeblacklisttypes(self):
return [
"OSALocalOrGlobal",
"OSACreateAppleEventUPP",
"OSAActiveUPP",
"AEEventHandlerUPP",
......
......@@ -40,6 +40,7 @@ initstuff = initstuff + """
ComponentInstance = OpaqueByValueType('ComponentInstance', OBJECTPREFIX)
OSAError = OSErrType("OSAError", "l")
# OSALocalOrGlobal = Type("OSALocalOrGlobal", "l")
OSAID = Type("OSAID", "l")
OSADebugCallFrameRef = Type("OSADebugCallFrameRef", "l")
OSADebugSessionRef = Type("OSADebugSessionRef", "l")
......
This diff is collapsed.
......@@ -35,6 +35,7 @@ class MyScanner(Scanner):
self.defsfile.write("def FOUR_CHAR_CODE(x): return x\n")
self.defsfile.write("false = 0\n")
self.defsfile.write("true = 1\n")
self.defsfile.write("kWindowNoConstrainAttribute = 0x80000000\n")
def makeblacklistnames(self):
return [
......@@ -49,6 +50,7 @@ class MyScanner(Scanner):
# Constants with funny definitions
'kMouseUpOutOfSlop',
'kAllWindowClasses',
'kWindowNoConstrainAttribute',
# OS8 only:
'GetAuxWin',
'GetWindowDataHandle',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment