summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xMac/Modules/cg/_CGmodule.c122
-rwxr-xr-xMac/Modules/cg/cgsupport.py1
-rw-r--r--Mac/Modules/ctl/_Ctlmodule.c128
-rw-r--r--Mac/Modules/ctl/ctlscan.py1
-rw-r--r--Mac/Modules/drag/dragscan.py2
-rw-r--r--Mac/Modules/file/filescan.py2
-rw-r--r--Mac/Modules/icn/_Icnmodule.c50
-rw-r--r--Mac/Modules/icn/icnscan.py4
-rw-r--r--Mac/Modules/icn/icnsupport.py1
-rw-r--r--Mac/Modules/launch/_Launchmodule.c100
-rw-r--r--Mac/Modules/launch/launchscan.py9
-rw-r--r--Mac/Modules/launch/launchsupport.py15
-rw-r--r--Mac/Modules/mlte/_Mltemodule.c61
-rw-r--r--Mac/Modules/mlte/mltescan.py9
-rw-r--r--Mac/Modules/osa/osascan.py1
-rw-r--r--Mac/Modules/osa/osasupport.py1
-rw-r--r--Mac/Modules/win/_Winmodule.c141
-rw-r--r--Mac/Modules/win/winscan.py2
18 files changed, 425 insertions, 225 deletions
diff --git a/Mac/Modules/cg/_CGmodule.c b/Mac/Modules/cg/_CGmodule.c
index 0889766..378bfa4 100755
--- a/Mac/Modules/cg/_CGmodule.c
+++ b/Mac/Modules/cg/_CGmodule.c
@@ -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,
diff --git a/Mac/Modules/cg/cgsupport.py b/Mac/Modules/cg/cgsupport.py
index 1b667c0..7dc2d54 100755
--- a/Mac/Modules/cg/cgsupport.py
+++ b/Mac/Modules/cg/cgsupport.py
@@ -114,6 +114,7 @@ CGLineCap = int
CGLineJoin = int
CGTextDrawingMode = int
CGPathDrawingMode = int
+CGInterpolationQuality = int
# The real objects
CGContextRef = OpaqueByValueType("CGContextRef", "CGContextRefObj")
diff --git a/Mac/Modules/ctl/_Ctlmodule.c b/Mac/Modules/ctl/_Ctlmodule.c
index 9f299a1..a7073a6 100644
--- a/Mac/Modules/ctl/_Ctlmodule.c
+++ b/Mac/Modules/ctl/_Ctlmodule.c
@@ -1385,15 +1385,15 @@ static PyObject *CtlObj_SetControlDragTrackingEnabled(ControlObject *_self, PyOb
{
PyObject *_res = NULL;
OSStatus _err;
- Boolean tracks;
+ Boolean inTracks;
#ifndef SetControlDragTrackingEnabled
PyMac_PRECHECK(SetControlDragTrackingEnabled);
#endif
if (!PyArg_ParseTuple(_args, "b",
- &tracks))
+ &inTracks))
return NULL;
_err = SetControlDragTrackingEnabled(_self->ob_itself,
- tracks);
+ inTracks);
if (_err != noErr) return PyMac_Error(_err);
Py_INCREF(Py_None);
_res = Py_None;
@@ -1404,17 +1404,17 @@ static PyObject *CtlObj_IsControlDragTrackingEnabled(ControlObject *_self, PyObj
{
PyObject *_res = NULL;
OSStatus _err;
- Boolean tracks;
+ Boolean outTracks;
#ifndef IsControlDragTrackingEnabled
PyMac_PRECHECK(IsControlDragTrackingEnabled);
#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_err = IsControlDragTrackingEnabled(_self->ob_itself,
- &tracks);
+ &outTracks);
if (_err != noErr) return PyMac_Error(_err);
_res = Py_BuildValue("b",
- tracks);
+ outTracks);
return _res;
}
@@ -3608,9 +3608,9 @@ static PyMethodDef CtlObj_methods[] = {
{"HandleControlDragReceive", (PyCFunction)CtlObj_HandleControlDragReceive, 1,
PyDoc_STR("(DragReference inDrag) -> None")},
{"SetControlDragTrackingEnabled", (PyCFunction)CtlObj_SetControlDragTrackingEnabled, 1,
- PyDoc_STR("(Boolean tracks) -> None")},
+ PyDoc_STR("(Boolean inTracks) -> None")},
{"IsControlDragTrackingEnabled", (PyCFunction)CtlObj_IsControlDragTrackingEnabled, 1,
- PyDoc_STR("() -> (Boolean tracks)")},
+ PyDoc_STR("() -> (Boolean outTracks)")},
{"GetControlBounds", (PyCFunction)CtlObj_GetControlBounds, 1,
PyDoc_STR("() -> (Rect bounds)")},
{"IsControlHilited", (PyCFunction)CtlObj_IsControlHilited, 1,
@@ -3990,17 +3990,17 @@ static PyObject *Ctl_DrawControls(PyObject *_self, PyObject *_args)
static PyObject *Ctl_UpdateControls(PyObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
- WindowPtr theWindow;
- RgnHandle updateRegion;
+ WindowPtr inWindow;
+ RgnHandle inUpdateRegion;
#ifndef UpdateControls
PyMac_PRECHECK(UpdateControls);
#endif
if (!PyArg_ParseTuple(_args, "O&O&",
- WinObj_Convert, &theWindow,
- ResObj_Convert, &updateRegion))
+ WinObj_Convert, &inWindow,
+ ResObj_Convert, &inUpdateRegion))
return NULL;
- UpdateControls(theWindow,
- updateRegion);
+ UpdateControls(inWindow,
+ inUpdateRegion);
Py_INCREF(Py_None);
_res = Py_None;
return _res;
@@ -4231,17 +4231,17 @@ static PyObject *Ctl_SetAutomaticControlDragTrackingEnabledForWindow(PyObject *_
{
PyObject *_res = NULL;
OSStatus _err;
- WindowPtr theWindow;
- Boolean tracks;
+ WindowPtr inWindow;
+ Boolean inTracks;
#ifndef SetAutomaticControlDragTrackingEnabledForWindow
PyMac_PRECHECK(SetAutomaticControlDragTrackingEnabledForWindow);
#endif
if (!PyArg_ParseTuple(_args, "O&b",
- WinObj_Convert, &theWindow,
- &tracks))
+ WinObj_Convert, &inWindow,
+ &inTracks))
return NULL;
- _err = SetAutomaticControlDragTrackingEnabledForWindow(theWindow,
- tracks);
+ _err = SetAutomaticControlDragTrackingEnabledForWindow(inWindow,
+ inTracks);
if (_err != noErr) return PyMac_Error(_err);
Py_INCREF(Py_None);
_res = Py_None;
@@ -4252,19 +4252,19 @@ static PyObject *Ctl_IsAutomaticControlDragTrackingEnabledForWindow(PyObject *_s
{
PyObject *_res = NULL;
OSStatus _err;
- WindowPtr theWindow;
- Boolean tracks;
+ WindowPtr inWindow;
+ Boolean outTracks;
#ifndef IsAutomaticControlDragTrackingEnabledForWindow
PyMac_PRECHECK(IsAutomaticControlDragTrackingEnabledForWindow);
#endif
if (!PyArg_ParseTuple(_args, "O&",
- WinObj_Convert, &theWindow))
+ WinObj_Convert, &inWindow))
return NULL;
- _err = IsAutomaticControlDragTrackingEnabledForWindow(theWindow,
- &tracks);
+ _err = IsAutomaticControlDragTrackingEnabledForWindow(inWindow,
+ &outTracks);
if (_err != noErr) return PyMac_Error(_err);
_res = Py_BuildValue("b",
- tracks);
+ outTracks);
return _res;
}
@@ -4362,33 +4362,33 @@ static PyObject *Ctl_CreateDisclosureTriangleControl(PyObject *_self, PyObject *
{
PyObject *_res = NULL;
OSStatus _err;
- WindowPtr window;
- Rect boundsRect;
- UInt16 orientation;
- CFStringRef title;
- SInt32 initialValue;
- Boolean drawTitle;
- Boolean autoToggles;
+ WindowPtr inWindow;
+ Rect inBoundsRect;
+ UInt16 inOrientation;
+ CFStringRef inTitle;
+ SInt32 inInitialValue;
+ Boolean inDrawTitle;
+ Boolean inAutoToggles;
ControlHandle outControl;
#ifndef CreateDisclosureTriangleControl
PyMac_PRECHECK(CreateDisclosureTriangleControl);
#endif
if (!PyArg_ParseTuple(_args, "O&O&HO&lbb",
- WinObj_Convert, &window,
- PyMac_GetRect, &boundsRect,
- &orientation,
- CFStringRefObj_Convert, &title,
- &initialValue,
- &drawTitle,
- &autoToggles))
+ WinObj_Convert, &inWindow,
+ PyMac_GetRect, &inBoundsRect,
+ &inOrientation,
+ CFStringRefObj_Convert, &inTitle,
+ &inInitialValue,
+ &inDrawTitle,
+ &inAutoToggles))
return NULL;
- _err = CreateDisclosureTriangleControl(window,
- &boundsRect,
- orientation,
- title,
- initialValue,
- drawTitle,
- autoToggles,
+ _err = CreateDisclosureTriangleControl(inWindow,
+ &inBoundsRect,
+ inOrientation,
+ inTitle,
+ inInitialValue,
+ inDrawTitle,
+ inAutoToggles,
&outControl);
if (_err != noErr) return PyMac_Error(_err);
_res = Py_BuildValue("O&",
@@ -4882,24 +4882,24 @@ static PyObject *Ctl_CreateIconControl(PyObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
OSStatus _err;
- WindowPtr window;
- Rect boundsRect;
- ControlButtonContentInfo icon;
- Boolean dontTrack;
+ WindowPtr inWindow;
+ Rect inBoundsRect;
+ ControlButtonContentInfo inIconContent;
+ Boolean inDontTrack;
ControlHandle outControl;
#ifndef CreateIconControl
PyMac_PRECHECK(CreateIconControl);
#endif
if (!PyArg_ParseTuple(_args, "O&O&O&b",
- WinObj_Convert, &window,
- PyMac_GetRect, &boundsRect,
- ControlButtonContentInfo_Convert, &icon,
- &dontTrack))
+ WinObj_Convert, &inWindow,
+ PyMac_GetRect, &inBoundsRect,
+ ControlButtonContentInfo_Convert, &inIconContent,
+ &inDontTrack))
return NULL;
- _err = CreateIconControl(window,
- &boundsRect,
- &icon,
- dontTrack,
+ _err = CreateIconControl(inWindow,
+ &inBoundsRect,
+ &inIconContent,
+ inDontTrack,
&outControl);
if (_err != noErr) return PyMac_Error(_err);
_res = Py_BuildValue("O&",
@@ -5422,7 +5422,7 @@ static PyMethodDef Ctl_methods[] = {
{"DrawControls", (PyCFunction)Ctl_DrawControls, 1,
PyDoc_STR("(WindowPtr theWindow) -> None")},
{"UpdateControls", (PyCFunction)Ctl_UpdateControls, 1,
- PyDoc_STR("(WindowPtr theWindow, RgnHandle updateRegion) -> None")},
+ PyDoc_STR("(WindowPtr inWindow, RgnHandle inUpdateRegion) -> None")},
{"FindControl", (PyCFunction)Ctl_FindControl, 1,
PyDoc_STR("(Point testPoint, WindowPtr theWindow) -> (ControlPartCode _rv, ControlHandle theControl)")},
{"IdleControls", (PyCFunction)Ctl_IdleControls, 1,
@@ -5446,15 +5446,15 @@ static PyMethodDef Ctl_methods[] = {
{"ClearKeyboardFocus", (PyCFunction)Ctl_ClearKeyboardFocus, 1,
PyDoc_STR("(WindowPtr inWindow) -> None")},
{"SetAutomaticControlDragTrackingEnabledForWindow", (PyCFunction)Ctl_SetAutomaticControlDragTrackingEnabledForWindow, 1,
- PyDoc_STR("(WindowPtr theWindow, Boolean tracks) -> None")},
+ PyDoc_STR("(WindowPtr inWindow, Boolean inTracks) -> None")},
{"IsAutomaticControlDragTrackingEnabledForWindow", (PyCFunction)Ctl_IsAutomaticControlDragTrackingEnabledForWindow, 1,
- PyDoc_STR("(WindowPtr theWindow) -> (Boolean tracks)")},
+ PyDoc_STR("(WindowPtr inWindow) -> (Boolean outTracks)")},
{"CreateBevelButtonControl", (PyCFunction)Ctl_CreateBevelButtonControl, 1,
PyDoc_STR("(WindowPtr window, Rect boundsRect, CFStringRef title, UInt16 thickness, UInt16 behavior, ControlButtonContentInfo info, SInt16 menuID, UInt16 menuBehavior, UInt16 menuPlacement) -> (ControlHandle outControl)")},
{"CreateSliderControl", (PyCFunction)Ctl_CreateSliderControl, 1,
PyDoc_STR("(WindowPtr window, Rect boundsRect, SInt32 value, SInt32 minimum, SInt32 maximum, UInt16 orientation, UInt16 numTickMarks, Boolean liveTracking, PyObject* liveTrackingProc) -> (ControlHandle outControl)")},
{"CreateDisclosureTriangleControl", (PyCFunction)Ctl_CreateDisclosureTriangleControl, 1,
- PyDoc_STR("(WindowPtr window, Rect boundsRect, UInt16 orientation, CFStringRef title, SInt32 initialValue, Boolean drawTitle, Boolean autoToggles) -> (ControlHandle outControl)")},
+ PyDoc_STR("(WindowPtr inWindow, Rect inBoundsRect, UInt16 inOrientation, CFStringRef inTitle, SInt32 inInitialValue, Boolean inDrawTitle, Boolean inAutoToggles) -> (ControlHandle outControl)")},
{"CreateProgressBarControl", (PyCFunction)Ctl_CreateProgressBarControl, 1,
PyDoc_STR("(WindowPtr window, Rect boundsRect, SInt32 value, SInt32 minimum, SInt32 maximum, Boolean indeterminate) -> (ControlHandle outControl)")},
{"CreateRelevanceBarControl", (PyCFunction)Ctl_CreateRelevanceBarControl, 1,
@@ -5488,7 +5488,7 @@ static PyMethodDef Ctl_methods[] = {
{"CreatePictureControl", (PyCFunction)Ctl_CreatePictureControl, 1,
PyDoc_STR("(WindowPtr window, Rect boundsRect, ControlButtonContentInfo content, Boolean dontTrack) -> (ControlHandle outControl)")},
{"CreateIconControl", (PyCFunction)Ctl_CreateIconControl, 1,
- PyDoc_STR("(WindowPtr window, Rect boundsRect, ControlButtonContentInfo icon, Boolean dontTrack) -> (ControlHandle outControl)")},
+ PyDoc_STR("(WindowPtr inWindow, Rect inBoundsRect, ControlButtonContentInfo inIconContent, Boolean inDontTrack) -> (ControlHandle outControl)")},
{"CreateWindowHeaderControl", (PyCFunction)Ctl_CreateWindowHeaderControl, 1,
PyDoc_STR("(WindowPtr window, Rect boundsRect, Boolean isListHeader) -> (ControlHandle outControl)")},
{"CreatePushButtonControl", (PyCFunction)Ctl_CreatePushButtonControl, 1,
diff --git a/Mac/Modules/ctl/ctlscan.py b/Mac/Modules/ctl/ctlscan.py
index ac1d3f4..818541e 100644
--- a/Mac/Modules/ctl/ctlscan.py
+++ b/Mac/Modules/ctl/ctlscan.py
@@ -125,6 +125,7 @@ class MyScanner(Scanner):
## 'DataBrowserTableViewColumnDesc',
## 'DataBrowserListViewColumnDesc',
'CFDataRef',
+ 'DataBrowserListViewHeaderDesc', # difficult struct
]
def makerepairinstructions(self):
diff --git a/Mac/Modules/drag/dragscan.py b/Mac/Modules/drag/dragscan.py
index 158cfff..282728e 100644
--- a/Mac/Modules/drag/dragscan.py
+++ b/Mac/Modules/drag/dragscan.py
@@ -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):
diff --git a/Mac/Modules/file/filescan.py b/Mac/Modules/file/filescan.py
index 8d663a3..f8b5ba2 100644
--- a/Mac/Modules/file/filescan.py
+++ b/Mac/Modules/file/filescan.py
@@ -136,7 +136,9 @@ class MyScanner(Scanner_OSX):
"IOCompletionUPP", # Proc pointer
"AliasFilterProcPtr",
"AliasFilterUPP",
+ "FNSubscriptionUPP",
+ "FNSubscriptionRef", # Lazy, for now.
]
def makerepairinstructions(self):
diff --git a/Mac/Modules/icn/_Icnmodule.c b/Mac/Modules/icn/_Icnmodule.c
index bbd59ab..2b43ed4 100644
--- a/Mac/Modules/icn/_Icnmodule.c
+++ b/Mac/Modules/icn/_Icnmodule.c
@@ -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}
diff --git a/Mac/Modules/icn/icnscan.py b/Mac/Modules/icn/icnscan.py
index 138cc62..c6a39f3 100644
--- a/Mac/Modules/icn/icnscan.py
+++ b/Mac/Modules/icn/icnscan.py
@@ -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()
diff --git a/Mac/Modules/icn/icnsupport.py b/Mac/Modules/icn/icnsupport.py
index 9b4a68f..ef1dbf3 100644
--- a/Mac/Modules/icn/icnsupport.py
+++ b/Mac/Modules/icn/icnsupport.py
@@ -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)
diff --git a/Mac/Modules/launch/_Launchmodule.c b/Mac/Modules/launch/_Launchmodule.c
index cb3007f..9180350 100644
--- a/Mac/Modules/launch/_Launchmodule.c
+++ b/Mac/Modules/launch/_Launchmodule.c
@@ -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,
diff --git a/Mac/Modules/launch/launchscan.py b/Mac/Modules/launch/launchscan.py
index 8d0f3e9..01f68f5 100644
--- a/Mac/Modules/launch/launchscan.py
+++ b/Mac/Modules/launch/launchscan.py
@@ -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__":
diff --git a/Mac/Modules/launch/launchsupport.py b/Mac/Modules/launch/launchsupport.py
index 066d3c6..7816a46 100644
--- a/Mac/Modules/launch/launchsupport.py
+++ b/Mac/Modules/launch/launchsupport.py
@@ -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>
diff --git a/Mac/Modules/mlte/_Mltemodule.c b/Mac/Modules/mlte/_Mltemodule.c
index 2c972e9f..0b37fe1 100644
--- a/Mac/Modules/mlte/_Mltemodule.c
+++ b/Mac/Modules/mlte/_Mltemodule.c
@@ -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,
diff --git a/Mac/Modules/mlte/mltescan.py b/Mac/Modules/mlte/mltescan.py
index 011d7bb..134bffa 100644
--- a/Mac/Modules/mlte/mltescan.py
+++ b/Mac/Modules/mlte/mltescan.py
@@ -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):
diff --git a/Mac/Modules/osa/osascan.py b/Mac/Modules/osa/osascan.py
index ed58fc8..75e1a08 100644
--- a/Mac/Modules/osa/osascan.py
+++ b/Mac/Modules/osa/osascan.py
@@ -47,6 +47,7 @@ class MyScanner(Scanner):
def makeblacklisttypes(self):
return [
+ "OSALocalOrGlobal",
"OSACreateAppleEventUPP",
"OSAActiveUPP",
"AEEventHandlerUPP",
diff --git a/Mac/Modules/osa/osasupport.py b/Mac/Modules/osa/osasupport.py
index fe687b4..7e70223 100644
--- a/Mac/Modules/osa/osasupport.py
+++ b/Mac/Modules/osa/osasupport.py
@@ -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")
diff --git a/Mac/Modules/win/_Winmodule.c b/Mac/Modules/win/_Winmodule.c
index e971e31..2a13182 100644
--- a/Mac/Modules/win/_Winmodule.c
+++ b/Mac/Modules/win/_Winmodule.c
@@ -1041,15 +1041,15 @@ static PyObject *WinObj_SetWindowProxyAlias(WindowObject *_self, PyObject *_args
{
PyObject *_res = NULL;
OSStatus _err;
- AliasHandle alias;
+ AliasHandle inAlias;
#ifndef SetWindowProxyAlias
PyMac_PRECHECK(SetWindowProxyAlias);
#endif
if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &alias))
+ ResObj_Convert, &inAlias))
return NULL;
_err = SetWindowProxyAlias(_self->ob_itself,
- alias);
+ inAlias);
if (_err != noErr) return PyMac_Error(_err);
Py_INCREF(Py_None);
_res = Py_None;
@@ -1332,21 +1332,21 @@ static PyObject *WinObj_TransitionWindow(WindowObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
OSStatus _err;
- WindowTransitionEffect effect;
- WindowTransitionAction action;
- Rect rect;
+ WindowTransitionEffect inEffect;
+ WindowTransitionAction inAction;
+ Rect inRect;
#ifndef TransitionWindow
PyMac_PRECHECK(TransitionWindow);
#endif
if (!PyArg_ParseTuple(_args, "llO&",
- &effect,
- &action,
- PyMac_GetRect, &rect))
+ &inEffect,
+ &inAction,
+ PyMac_GetRect, &inRect))
return NULL;
_err = TransitionWindow(_self->ob_itself,
- effect,
- action,
- &rect);
+ inEffect,
+ inAction,
+ &inRect);
if (_err != noErr) return PyMac_Error(_err);
Py_INCREF(Py_None);
_res = Py_None;
@@ -1357,24 +1357,24 @@ static PyObject *WinObj_TransitionWindowAndParent(WindowObject *_self, PyObject
{
PyObject *_res = NULL;
OSStatus _err;
- WindowPtr parentWindow;
- WindowTransitionEffect effect;
- WindowTransitionAction action;
- Rect rect;
+ WindowPtr inParentWindow;
+ WindowTransitionEffect inEffect;
+ WindowTransitionAction inAction;
+ Rect inRect;
#ifndef TransitionWindowAndParent
PyMac_PRECHECK(TransitionWindowAndParent);
#endif
if (!PyArg_ParseTuple(_args, "O&llO&",
- WinObj_Convert, &parentWindow,
- &effect,
- &action,
- PyMac_GetRect, &rect))
+ WinObj_Convert, &inParentWindow,
+ &inEffect,
+ &inAction,
+ PyMac_GetRect, &inRect))
return NULL;
_err = TransitionWindowAndParent(_self->ob_itself,
- parentWindow,
- effect,
- action,
- &rect);
+ inParentWindow,
+ inEffect,
+ inAction,
+ &inRect);
if (_err != noErr) return PyMac_Error(_err);
Py_INCREF(Py_None);
_res = Py_None;
@@ -1562,23 +1562,23 @@ static PyObject *WinObj_ResizeWindow(WindowObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
Boolean _rv;
- Point startPoint;
- Rect sizeConstraints;
- Rect newContentRect;
+ Point inStartPoint;
+ Rect inSizeConstraints;
+ Rect outNewContentRect;
#ifndef ResizeWindow
PyMac_PRECHECK(ResizeWindow);
#endif
if (!PyArg_ParseTuple(_args, "O&O&",
- PyMac_GetPoint, &startPoint,
- PyMac_GetRect, &sizeConstraints))
+ PyMac_GetPoint, &inStartPoint,
+ PyMac_GetRect, &inSizeConstraints))
return NULL;
_rv = ResizeWindow(_self->ob_itself,
- startPoint,
- &sizeConstraints,
- &newContentRect);
+ inStartPoint,
+ &inSizeConstraints,
+ &outNewContentRect);
_res = Py_BuildValue("bO&",
_rv,
- PyMac_BuildRect, &newContentRect);
+ PyMac_BuildRect, &outNewContentRect);
return _res;
}
@@ -1652,20 +1652,20 @@ static PyObject *WinObj_IsWindowInStandardState(WindowObject *_self, PyObject *_
{
PyObject *_res = NULL;
Boolean _rv;
- Point idealSize;
- Rect idealStandardState;
+ Point inIdealSize;
+ Rect outIdealStandardState;
#ifndef IsWindowInStandardState
PyMac_PRECHECK(IsWindowInStandardState);
#endif
- if (!PyArg_ParseTuple(_args, ""))
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetPoint, &inIdealSize))
return NULL;
_rv = IsWindowInStandardState(_self->ob_itself,
- &idealSize,
- &idealStandardState);
- _res = Py_BuildValue("bO&O&",
+ &inIdealSize,
+ &outIdealStandardState);
+ _res = Py_BuildValue("bO&",
_rv,
- PyMac_BuildPoint, idealSize,
- PyMac_BuildRect, &idealStandardState);
+ PyMac_BuildRect, &outIdealStandardState);
return _res;
}
@@ -1673,16 +1673,16 @@ static PyObject *WinObj_ZoomWindowIdeal(WindowObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
OSStatus _err;
- WindowPartCode partCode;
+ WindowPartCode inPartCode;
Point ioIdealSize;
#ifndef ZoomWindowIdeal
PyMac_PRECHECK(ZoomWindowIdeal);
#endif
if (!PyArg_ParseTuple(_args, "h",
- &partCode))
+ &inPartCode))
return NULL;
_err = ZoomWindowIdeal(_self->ob_itself,
- partCode,
+ inPartCode,
&ioIdealSize);
if (_err != noErr) return PyMac_Error(_err);
_res = Py_BuildValue("O&",
@@ -1694,17 +1694,17 @@ static PyObject *WinObj_GetWindowIdealUserState(WindowObject *_self, PyObject *_
{
PyObject *_res = NULL;
OSStatus _err;
- Rect userState;
+ Rect outUserState;
#ifndef GetWindowIdealUserState
PyMac_PRECHECK(GetWindowIdealUserState);
#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_err = GetWindowIdealUserState(_self->ob_itself,
- &userState);
+ &outUserState);
if (_err != noErr) return PyMac_Error(_err);
_res = Py_BuildValue("O&",
- PyMac_BuildRect, &userState);
+ PyMac_BuildRect, &outUserState);
return _res;
}
@@ -1712,15 +1712,15 @@ static PyObject *WinObj_SetWindowIdealUserState(WindowObject *_self, PyObject *_
{
PyObject *_res = NULL;
OSStatus _err;
- Rect userState;
+ Rect inUserState;
#ifndef SetWindowIdealUserState
PyMac_PRECHECK(SetWindowIdealUserState);
#endif
if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetRect, &userState))
+ PyMac_GetRect, &inUserState))
return NULL;
_err = SetWindowIdealUserState(_self->ob_itself,
- &userState);
+ &inUserState);
if (_err != noErr) return PyMac_Error(_err);
Py_INCREF(Py_None);
_res = Py_None;
@@ -1997,6 +1997,21 @@ static PyObject *WinObj_GetWindowPort(WindowObject *_self, PyObject *_args)
return _res;
}
+static PyObject *WinObj_GetWindowStructurePort(WindowObject *_self, PyObject *_args)
+{
+ PyObject *_res = NULL;
+ CGrafPtr _rv;
+#ifndef GetWindowStructurePort
+ PyMac_PRECHECK(GetWindowStructurePort);
+#endif
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetWindowStructurePort(_self->ob_itself);
+ _res = Py_BuildValue("O&",
+ GrafObj_New, _rv);
+ return _res;
+}
+
static PyObject *WinObj_GetWindowKind(WindowObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
@@ -2412,7 +2427,7 @@ static PyMethodDef WinObj_methods[] = {
{"GetWindowProxyFSSpec", (PyCFunction)WinObj_GetWindowProxyFSSpec, 1,
PyDoc_STR("() -> (FSSpec outFile)")},
{"SetWindowProxyAlias", (PyCFunction)WinObj_SetWindowProxyAlias, 1,
- PyDoc_STR("(AliasHandle alias) -> None")},
+ PyDoc_STR("(AliasHandle inAlias) -> None")},
{"GetWindowProxyAlias", (PyCFunction)WinObj_GetWindowProxyAlias, 1,
PyDoc_STR("() -> (AliasHandle alias)")},
{"SetWindowProxyCreatorAndType", (PyCFunction)WinObj_SetWindowProxyCreatorAndType, 1,
@@ -2442,9 +2457,9 @@ static PyMethodDef WinObj_methods[] = {
{"HiliteWindowFrameForDrag", (PyCFunction)WinObj_HiliteWindowFrameForDrag, 1,
PyDoc_STR("(Boolean hilited) -> None")},
{"TransitionWindow", (PyCFunction)WinObj_TransitionWindow, 1,
- PyDoc_STR("(WindowTransitionEffect effect, WindowTransitionAction action, Rect rect) -> None")},
+ PyDoc_STR("(WindowTransitionEffect inEffect, WindowTransitionAction inAction, Rect inRect) -> None")},
{"TransitionWindowAndParent", (PyCFunction)WinObj_TransitionWindowAndParent, 1,
- PyDoc_STR("(WindowPtr parentWindow, WindowTransitionEffect effect, WindowTransitionAction action, Rect rect) -> None")},
+ PyDoc_STR("(WindowPtr inParentWindow, WindowTransitionEffect inEffect, WindowTransitionAction inAction, Rect inRect) -> None")},
{"MacMoveWindow", (PyCFunction)WinObj_MacMoveWindow, 1,
PyDoc_STR("(short hGlobal, short vGlobal, Boolean front) -> None")},
{"SizeWindow", (PyCFunction)WinObj_SizeWindow, 1,
@@ -2464,7 +2479,7 @@ static PyMethodDef WinObj_methods[] = {
{"GetWindowBounds", (PyCFunction)WinObj_GetWindowBounds, 1,
PyDoc_STR("(WindowRegionCode regionCode) -> (Rect globalBounds)")},
{"ResizeWindow", (PyCFunction)WinObj_ResizeWindow, 1,
- PyDoc_STR("(Point startPoint, Rect sizeConstraints) -> (Boolean _rv, Rect newContentRect)")},
+ PyDoc_STR("(Point inStartPoint, Rect inSizeConstraints) -> (Boolean _rv, Rect outNewContentRect)")},
{"SetWindowBounds", (PyCFunction)WinObj_SetWindowBounds, 1,
PyDoc_STR("(WindowRegionCode regionCode, Rect globalBounds) -> None")},
{"RepositionWindow", (PyCFunction)WinObj_RepositionWindow, 1,
@@ -2472,13 +2487,13 @@ static PyMethodDef WinObj_methods[] = {
{"MoveWindowStructure", (PyCFunction)WinObj_MoveWindowStructure, 1,
PyDoc_STR("(short hGlobal, short vGlobal) -> None")},
{"IsWindowInStandardState", (PyCFunction)WinObj_IsWindowInStandardState, 1,
- PyDoc_STR("() -> (Boolean _rv, Point idealSize, Rect idealStandardState)")},
+ PyDoc_STR("(Point inIdealSize) -> (Boolean _rv, Rect outIdealStandardState)")},
{"ZoomWindowIdeal", (PyCFunction)WinObj_ZoomWindowIdeal, 1,
- PyDoc_STR("(WindowPartCode partCode) -> (Point ioIdealSize)")},
+ PyDoc_STR("(WindowPartCode inPartCode) -> (Point ioIdealSize)")},
{"GetWindowIdealUserState", (PyCFunction)WinObj_GetWindowIdealUserState, 1,
- PyDoc_STR("() -> (Rect userState)")},
+ PyDoc_STR("() -> (Rect outUserState)")},
{"SetWindowIdealUserState", (PyCFunction)WinObj_SetWindowIdealUserState, 1,
- PyDoc_STR("(Rect userState) -> None")},
+ PyDoc_STR("(Rect inUserState) -> None")},
{"GetWindowGreatestAreaDevice", (PyCFunction)WinObj_GetWindowGreatestAreaDevice, 1,
PyDoc_STR("(WindowRegionCode inRegion) -> (GDHandle outGreatestDevice, Rect outGreatestDeviceRect)")},
{"ConstrainWindowToScreen", (PyCFunction)WinObj_ConstrainWindowToScreen, 1,
@@ -2507,6 +2522,8 @@ static PyMethodDef WinObj_methods[] = {
PyDoc_STR("(Point thePt) -> (Boolean _rv)")},
{"GetWindowPort", (PyCFunction)WinObj_GetWindowPort, 1,
PyDoc_STR("() -> (CGrafPtr _rv)")},
+ {"GetWindowStructurePort", (PyCFunction)WinObj_GetWindowStructurePort, 1,
+ PyDoc_STR("() -> (CGrafPtr _rv)")},
{"GetWindowKind", (PyCFunction)WinObj_GetWindowKind, 1,
PyDoc_STR("() -> (short _rv)")},
{"IsWindowHilited", (PyCFunction)WinObj_IsWindowHilited, 1,
@@ -2998,7 +3015,7 @@ static PyObject *Win_GetAvailableWindowPositioningBounds(PyObject *_self, PyObje
PyObject *_res = NULL;
OSStatus _err;
GDHandle inDevice;
- Rect availableRect;
+ Rect outAvailableRect;
#ifndef GetAvailableWindowPositioningBounds
PyMac_PRECHECK(GetAvailableWindowPositioningBounds);
#endif
@@ -3006,10 +3023,10 @@ static PyObject *Win_GetAvailableWindowPositioningBounds(PyObject *_self, PyObje
ResObj_Convert, &inDevice))
return NULL;
_err = GetAvailableWindowPositioningBounds(inDevice,
- &availableRect);
+ &outAvailableRect);
if (_err != noErr) return PyMac_Error(_err);
_res = Py_BuildValue("O&",
- PyMac_BuildRect, &availableRect);
+ PyMac_BuildRect, &outAvailableRect);
return _res;
}
@@ -3166,7 +3183,7 @@ static PyMethodDef Win_methods[] = {
{"CollapseAllWindows", (PyCFunction)Win_CollapseAllWindows, 1,
PyDoc_STR("(Boolean collapse) -> None")},
{"GetAvailableWindowPositioningBounds", (PyCFunction)Win_GetAvailableWindowPositioningBounds, 1,
- PyDoc_STR("(GDHandle inDevice) -> (Rect availableRect)")},
+ PyDoc_STR("(GDHandle inDevice) -> (Rect outAvailableRect)")},
{"DisableScreenUpdates", (PyCFunction)Win_DisableScreenUpdates, 1,
PyDoc_STR("() -> None")},
{"EnableScreenUpdates", (PyCFunction)Win_EnableScreenUpdates, 1,
diff --git a/Mac/Modules/win/winscan.py b/Mac/Modules/win/winscan.py
index 1aefbd3..6b08c00 100644
--- a/Mac/Modules/win/winscan.py
+++ b/Mac/Modules/win/winscan.py
@@ -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',