mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Ported to Universal Headers 3.4.2. Qd and Qt remain to be done.
Completely untested.
This commit is contained in:
parent
fe3fe4adb5
commit
da6081fccb
18 changed files with 425 additions and 225 deletions
|
@ -699,20 +699,20 @@ static PyObject *CGContextRefObj_CGContextSetGrayStrokeColor(CGContextRefObject
|
||||||
static PyObject *CGContextRefObj_CGContextSetRGBFillColor(CGContextRefObject *_self, PyObject *_args)
|
static PyObject *CGContextRefObj_CGContextSetRGBFillColor(CGContextRefObject *_self, PyObject *_args)
|
||||||
{
|
{
|
||||||
PyObject *_res = NULL;
|
PyObject *_res = NULL;
|
||||||
float r;
|
float red;
|
||||||
float g;
|
float green;
|
||||||
float b;
|
float blue;
|
||||||
float alpha;
|
float alpha;
|
||||||
if (!PyArg_ParseTuple(_args, "ffff",
|
if (!PyArg_ParseTuple(_args, "ffff",
|
||||||
&r,
|
&red,
|
||||||
&g,
|
&green,
|
||||||
&b,
|
&blue,
|
||||||
&alpha))
|
&alpha))
|
||||||
return NULL;
|
return NULL;
|
||||||
CGContextSetRGBFillColor(_self->ob_itself,
|
CGContextSetRGBFillColor(_self->ob_itself,
|
||||||
r,
|
red,
|
||||||
g,
|
green,
|
||||||
b,
|
blue,
|
||||||
alpha);
|
alpha);
|
||||||
Py_INCREF(Py_None);
|
Py_INCREF(Py_None);
|
||||||
_res = Py_None;
|
_res = Py_None;
|
||||||
|
@ -722,20 +722,20 @@ static PyObject *CGContextRefObj_CGContextSetRGBFillColor(CGContextRefObject *_s
|
||||||
static PyObject *CGContextRefObj_CGContextSetRGBStrokeColor(CGContextRefObject *_self, PyObject *_args)
|
static PyObject *CGContextRefObj_CGContextSetRGBStrokeColor(CGContextRefObject *_self, PyObject *_args)
|
||||||
{
|
{
|
||||||
PyObject *_res = NULL;
|
PyObject *_res = NULL;
|
||||||
float r;
|
float red;
|
||||||
float g;
|
float green;
|
||||||
float b;
|
float blue;
|
||||||
float alpha;
|
float alpha;
|
||||||
if (!PyArg_ParseTuple(_args, "ffff",
|
if (!PyArg_ParseTuple(_args, "ffff",
|
||||||
&r,
|
&red,
|
||||||
&g,
|
&green,
|
||||||
&b,
|
&blue,
|
||||||
&alpha))
|
&alpha))
|
||||||
return NULL;
|
return NULL;
|
||||||
CGContextSetRGBStrokeColor(_self->ob_itself,
|
CGContextSetRGBStrokeColor(_self->ob_itself,
|
||||||
r,
|
red,
|
||||||
g,
|
green,
|
||||||
b,
|
blue,
|
||||||
alpha);
|
alpha);
|
||||||
Py_INCREF(Py_None);
|
Py_INCREF(Py_None);
|
||||||
_res = Py_None;
|
_res = Py_None;
|
||||||
|
@ -745,23 +745,23 @@ static PyObject *CGContextRefObj_CGContextSetRGBStrokeColor(CGContextRefObject *
|
||||||
static PyObject *CGContextRefObj_CGContextSetCMYKFillColor(CGContextRefObject *_self, PyObject *_args)
|
static PyObject *CGContextRefObj_CGContextSetCMYKFillColor(CGContextRefObject *_self, PyObject *_args)
|
||||||
{
|
{
|
||||||
PyObject *_res = NULL;
|
PyObject *_res = NULL;
|
||||||
float c;
|
float cyan;
|
||||||
float m;
|
float magenta;
|
||||||
float y;
|
float yellow;
|
||||||
float k;
|
float black;
|
||||||
float alpha;
|
float alpha;
|
||||||
if (!PyArg_ParseTuple(_args, "fffff",
|
if (!PyArg_ParseTuple(_args, "fffff",
|
||||||
&c,
|
&cyan,
|
||||||
&m,
|
&magenta,
|
||||||
&y,
|
&yellow,
|
||||||
&k,
|
&black,
|
||||||
&alpha))
|
&alpha))
|
||||||
return NULL;
|
return NULL;
|
||||||
CGContextSetCMYKFillColor(_self->ob_itself,
|
CGContextSetCMYKFillColor(_self->ob_itself,
|
||||||
c,
|
cyan,
|
||||||
m,
|
magenta,
|
||||||
y,
|
yellow,
|
||||||
k,
|
black,
|
||||||
alpha);
|
alpha);
|
||||||
Py_INCREF(Py_None);
|
Py_INCREF(Py_None);
|
||||||
_res = Py_None;
|
_res = Py_None;
|
||||||
|
@ -771,29 +771,55 @@ static PyObject *CGContextRefObj_CGContextSetCMYKFillColor(CGContextRefObject *_
|
||||||
static PyObject *CGContextRefObj_CGContextSetCMYKStrokeColor(CGContextRefObject *_self, PyObject *_args)
|
static PyObject *CGContextRefObj_CGContextSetCMYKStrokeColor(CGContextRefObject *_self, PyObject *_args)
|
||||||
{
|
{
|
||||||
PyObject *_res = NULL;
|
PyObject *_res = NULL;
|
||||||
float c;
|
float cyan;
|
||||||
float m;
|
float magenta;
|
||||||
float y;
|
float yellow;
|
||||||
float k;
|
float black;
|
||||||
float alpha;
|
float alpha;
|
||||||
if (!PyArg_ParseTuple(_args, "fffff",
|
if (!PyArg_ParseTuple(_args, "fffff",
|
||||||
&c,
|
&cyan,
|
||||||
&m,
|
&magenta,
|
||||||
&y,
|
&yellow,
|
||||||
&k,
|
&black,
|
||||||
&alpha))
|
&alpha))
|
||||||
return NULL;
|
return NULL;
|
||||||
CGContextSetCMYKStrokeColor(_self->ob_itself,
|
CGContextSetCMYKStrokeColor(_self->ob_itself,
|
||||||
c,
|
cyan,
|
||||||
m,
|
magenta,
|
||||||
y,
|
yellow,
|
||||||
k,
|
black,
|
||||||
alpha);
|
alpha);
|
||||||
Py_INCREF(Py_None);
|
Py_INCREF(Py_None);
|
||||||
_res = Py_None;
|
_res = Py_None;
|
||||||
return _res;
|
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)
|
static PyObject *CGContextRefObj_CGContextSetCharacterSpacing(CGContextRefObject *_self, PyObject *_args)
|
||||||
{
|
{
|
||||||
PyObject *_res = NULL;
|
PyObject *_res = NULL;
|
||||||
|
@ -1107,13 +1133,17 @@ static PyMethodDef CGContextRefObj_methods[] = {
|
||||||
{"CGContextSetGrayStrokeColor", (PyCFunction)CGContextRefObj_CGContextSetGrayStrokeColor, 1,
|
{"CGContextSetGrayStrokeColor", (PyCFunction)CGContextRefObj_CGContextSetGrayStrokeColor, 1,
|
||||||
PyDoc_STR("(float gray, float alpha) -> None")},
|
PyDoc_STR("(float gray, float alpha) -> None")},
|
||||||
{"CGContextSetRGBFillColor", (PyCFunction)CGContextRefObj_CGContextSetRGBFillColor, 1,
|
{"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,
|
{"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,
|
{"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,
|
{"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,
|
{"CGContextSetCharacterSpacing", (PyCFunction)CGContextRefObj_CGContextSetCharacterSpacing, 1,
|
||||||
PyDoc_STR("(float spacing) -> None")},
|
PyDoc_STR("(float spacing) -> None")},
|
||||||
{"CGContextSetTextPosition", (PyCFunction)CGContextRefObj_CGContextSetTextPosition, 1,
|
{"CGContextSetTextPosition", (PyCFunction)CGContextRefObj_CGContextSetTextPosition, 1,
|
||||||
|
|
|
@ -114,6 +114,7 @@ CGLineCap = int
|
||||||
CGLineJoin = int
|
CGLineJoin = int
|
||||||
CGTextDrawingMode = int
|
CGTextDrawingMode = int
|
||||||
CGPathDrawingMode = int
|
CGPathDrawingMode = int
|
||||||
|
CGInterpolationQuality = int
|
||||||
|
|
||||||
# The real objects
|
# The real objects
|
||||||
CGContextRef = OpaqueByValueType("CGContextRef", "CGContextRefObj")
|
CGContextRef = OpaqueByValueType("CGContextRef", "CGContextRefObj")
|
||||||
|
|
|
@ -1385,15 +1385,15 @@ static PyObject *CtlObj_SetControlDragTrackingEnabled(ControlObject *_self, PyOb
|
||||||
{
|
{
|
||||||
PyObject *_res = NULL;
|
PyObject *_res = NULL;
|
||||||
OSStatus _err;
|
OSStatus _err;
|
||||||
Boolean tracks;
|
Boolean inTracks;
|
||||||
#ifndef SetControlDragTrackingEnabled
|
#ifndef SetControlDragTrackingEnabled
|
||||||
PyMac_PRECHECK(SetControlDragTrackingEnabled);
|
PyMac_PRECHECK(SetControlDragTrackingEnabled);
|
||||||
#endif
|
#endif
|
||||||
if (!PyArg_ParseTuple(_args, "b",
|
if (!PyArg_ParseTuple(_args, "b",
|
||||||
&tracks))
|
&inTracks))
|
||||||
return NULL;
|
return NULL;
|
||||||
_err = SetControlDragTrackingEnabled(_self->ob_itself,
|
_err = SetControlDragTrackingEnabled(_self->ob_itself,
|
||||||
tracks);
|
inTracks);
|
||||||
if (_err != noErr) return PyMac_Error(_err);
|
if (_err != noErr) return PyMac_Error(_err);
|
||||||
Py_INCREF(Py_None);
|
Py_INCREF(Py_None);
|
||||||
_res = Py_None;
|
_res = Py_None;
|
||||||
|
@ -1404,17 +1404,17 @@ static PyObject *CtlObj_IsControlDragTrackingEnabled(ControlObject *_self, PyObj
|
||||||
{
|
{
|
||||||
PyObject *_res = NULL;
|
PyObject *_res = NULL;
|
||||||
OSStatus _err;
|
OSStatus _err;
|
||||||
Boolean tracks;
|
Boolean outTracks;
|
||||||
#ifndef IsControlDragTrackingEnabled
|
#ifndef IsControlDragTrackingEnabled
|
||||||
PyMac_PRECHECK(IsControlDragTrackingEnabled);
|
PyMac_PRECHECK(IsControlDragTrackingEnabled);
|
||||||
#endif
|
#endif
|
||||||
if (!PyArg_ParseTuple(_args, ""))
|
if (!PyArg_ParseTuple(_args, ""))
|
||||||
return NULL;
|
return NULL;
|
||||||
_err = IsControlDragTrackingEnabled(_self->ob_itself,
|
_err = IsControlDragTrackingEnabled(_self->ob_itself,
|
||||||
&tracks);
|
&outTracks);
|
||||||
if (_err != noErr) return PyMac_Error(_err);
|
if (_err != noErr) return PyMac_Error(_err);
|
||||||
_res = Py_BuildValue("b",
|
_res = Py_BuildValue("b",
|
||||||
tracks);
|
outTracks);
|
||||||
return _res;
|
return _res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3608,9 +3608,9 @@ static PyMethodDef CtlObj_methods[] = {
|
||||||
{"HandleControlDragReceive", (PyCFunction)CtlObj_HandleControlDragReceive, 1,
|
{"HandleControlDragReceive", (PyCFunction)CtlObj_HandleControlDragReceive, 1,
|
||||||
PyDoc_STR("(DragReference inDrag) -> None")},
|
PyDoc_STR("(DragReference inDrag) -> None")},
|
||||||
{"SetControlDragTrackingEnabled", (PyCFunction)CtlObj_SetControlDragTrackingEnabled, 1,
|
{"SetControlDragTrackingEnabled", (PyCFunction)CtlObj_SetControlDragTrackingEnabled, 1,
|
||||||
PyDoc_STR("(Boolean tracks) -> None")},
|
PyDoc_STR("(Boolean inTracks) -> None")},
|
||||||
{"IsControlDragTrackingEnabled", (PyCFunction)CtlObj_IsControlDragTrackingEnabled, 1,
|
{"IsControlDragTrackingEnabled", (PyCFunction)CtlObj_IsControlDragTrackingEnabled, 1,
|
||||||
PyDoc_STR("() -> (Boolean tracks)")},
|
PyDoc_STR("() -> (Boolean outTracks)")},
|
||||||
{"GetControlBounds", (PyCFunction)CtlObj_GetControlBounds, 1,
|
{"GetControlBounds", (PyCFunction)CtlObj_GetControlBounds, 1,
|
||||||
PyDoc_STR("() -> (Rect bounds)")},
|
PyDoc_STR("() -> (Rect bounds)")},
|
||||||
{"IsControlHilited", (PyCFunction)CtlObj_IsControlHilited, 1,
|
{"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)
|
static PyObject *Ctl_UpdateControls(PyObject *_self, PyObject *_args)
|
||||||
{
|
{
|
||||||
PyObject *_res = NULL;
|
PyObject *_res = NULL;
|
||||||
WindowPtr theWindow;
|
WindowPtr inWindow;
|
||||||
RgnHandle updateRegion;
|
RgnHandle inUpdateRegion;
|
||||||
#ifndef UpdateControls
|
#ifndef UpdateControls
|
||||||
PyMac_PRECHECK(UpdateControls);
|
PyMac_PRECHECK(UpdateControls);
|
||||||
#endif
|
#endif
|
||||||
if (!PyArg_ParseTuple(_args, "O&O&",
|
if (!PyArg_ParseTuple(_args, "O&O&",
|
||||||
WinObj_Convert, &theWindow,
|
WinObj_Convert, &inWindow,
|
||||||
ResObj_Convert, &updateRegion))
|
ResObj_Convert, &inUpdateRegion))
|
||||||
return NULL;
|
return NULL;
|
||||||
UpdateControls(theWindow,
|
UpdateControls(inWindow,
|
||||||
updateRegion);
|
inUpdateRegion);
|
||||||
Py_INCREF(Py_None);
|
Py_INCREF(Py_None);
|
||||||
_res = Py_None;
|
_res = Py_None;
|
||||||
return _res;
|
return _res;
|
||||||
|
@ -4231,17 +4231,17 @@ static PyObject *Ctl_SetAutomaticControlDragTrackingEnabledForWindow(PyObject *_
|
||||||
{
|
{
|
||||||
PyObject *_res = NULL;
|
PyObject *_res = NULL;
|
||||||
OSStatus _err;
|
OSStatus _err;
|
||||||
WindowPtr theWindow;
|
WindowPtr inWindow;
|
||||||
Boolean tracks;
|
Boolean inTracks;
|
||||||
#ifndef SetAutomaticControlDragTrackingEnabledForWindow
|
#ifndef SetAutomaticControlDragTrackingEnabledForWindow
|
||||||
PyMac_PRECHECK(SetAutomaticControlDragTrackingEnabledForWindow);
|
PyMac_PRECHECK(SetAutomaticControlDragTrackingEnabledForWindow);
|
||||||
#endif
|
#endif
|
||||||
if (!PyArg_ParseTuple(_args, "O&b",
|
if (!PyArg_ParseTuple(_args, "O&b",
|
||||||
WinObj_Convert, &theWindow,
|
WinObj_Convert, &inWindow,
|
||||||
&tracks))
|
&inTracks))
|
||||||
return NULL;
|
return NULL;
|
||||||
_err = SetAutomaticControlDragTrackingEnabledForWindow(theWindow,
|
_err = SetAutomaticControlDragTrackingEnabledForWindow(inWindow,
|
||||||
tracks);
|
inTracks);
|
||||||
if (_err != noErr) return PyMac_Error(_err);
|
if (_err != noErr) return PyMac_Error(_err);
|
||||||
Py_INCREF(Py_None);
|
Py_INCREF(Py_None);
|
||||||
_res = Py_None;
|
_res = Py_None;
|
||||||
|
@ -4252,19 +4252,19 @@ static PyObject *Ctl_IsAutomaticControlDragTrackingEnabledForWindow(PyObject *_s
|
||||||
{
|
{
|
||||||
PyObject *_res = NULL;
|
PyObject *_res = NULL;
|
||||||
OSStatus _err;
|
OSStatus _err;
|
||||||
WindowPtr theWindow;
|
WindowPtr inWindow;
|
||||||
Boolean tracks;
|
Boolean outTracks;
|
||||||
#ifndef IsAutomaticControlDragTrackingEnabledForWindow
|
#ifndef IsAutomaticControlDragTrackingEnabledForWindow
|
||||||
PyMac_PRECHECK(IsAutomaticControlDragTrackingEnabledForWindow);
|
PyMac_PRECHECK(IsAutomaticControlDragTrackingEnabledForWindow);
|
||||||
#endif
|
#endif
|
||||||
if (!PyArg_ParseTuple(_args, "O&",
|
if (!PyArg_ParseTuple(_args, "O&",
|
||||||
WinObj_Convert, &theWindow))
|
WinObj_Convert, &inWindow))
|
||||||
return NULL;
|
return NULL;
|
||||||
_err = IsAutomaticControlDragTrackingEnabledForWindow(theWindow,
|
_err = IsAutomaticControlDragTrackingEnabledForWindow(inWindow,
|
||||||
&tracks);
|
&outTracks);
|
||||||
if (_err != noErr) return PyMac_Error(_err);
|
if (_err != noErr) return PyMac_Error(_err);
|
||||||
_res = Py_BuildValue("b",
|
_res = Py_BuildValue("b",
|
||||||
tracks);
|
outTracks);
|
||||||
return _res;
|
return _res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4362,33 +4362,33 @@ static PyObject *Ctl_CreateDisclosureTriangleControl(PyObject *_self, PyObject *
|
||||||
{
|
{
|
||||||
PyObject *_res = NULL;
|
PyObject *_res = NULL;
|
||||||
OSStatus _err;
|
OSStatus _err;
|
||||||
WindowPtr window;
|
WindowPtr inWindow;
|
||||||
Rect boundsRect;
|
Rect inBoundsRect;
|
||||||
UInt16 orientation;
|
UInt16 inOrientation;
|
||||||
CFStringRef title;
|
CFStringRef inTitle;
|
||||||
SInt32 initialValue;
|
SInt32 inInitialValue;
|
||||||
Boolean drawTitle;
|
Boolean inDrawTitle;
|
||||||
Boolean autoToggles;
|
Boolean inAutoToggles;
|
||||||
ControlHandle outControl;
|
ControlHandle outControl;
|
||||||
#ifndef CreateDisclosureTriangleControl
|
#ifndef CreateDisclosureTriangleControl
|
||||||
PyMac_PRECHECK(CreateDisclosureTriangleControl);
|
PyMac_PRECHECK(CreateDisclosureTriangleControl);
|
||||||
#endif
|
#endif
|
||||||
if (!PyArg_ParseTuple(_args, "O&O&HO&lbb",
|
if (!PyArg_ParseTuple(_args, "O&O&HO&lbb",
|
||||||
WinObj_Convert, &window,
|
WinObj_Convert, &inWindow,
|
||||||
PyMac_GetRect, &boundsRect,
|
PyMac_GetRect, &inBoundsRect,
|
||||||
&orientation,
|
&inOrientation,
|
||||||
CFStringRefObj_Convert, &title,
|
CFStringRefObj_Convert, &inTitle,
|
||||||
&initialValue,
|
&inInitialValue,
|
||||||
&drawTitle,
|
&inDrawTitle,
|
||||||
&autoToggles))
|
&inAutoToggles))
|
||||||
return NULL;
|
return NULL;
|
||||||
_err = CreateDisclosureTriangleControl(window,
|
_err = CreateDisclosureTriangleControl(inWindow,
|
||||||
&boundsRect,
|
&inBoundsRect,
|
||||||
orientation,
|
inOrientation,
|
||||||
title,
|
inTitle,
|
||||||
initialValue,
|
inInitialValue,
|
||||||
drawTitle,
|
inDrawTitle,
|
||||||
autoToggles,
|
inAutoToggles,
|
||||||
&outControl);
|
&outControl);
|
||||||
if (_err != noErr) return PyMac_Error(_err);
|
if (_err != noErr) return PyMac_Error(_err);
|
||||||
_res = Py_BuildValue("O&",
|
_res = Py_BuildValue("O&",
|
||||||
|
@ -4882,24 +4882,24 @@ static PyObject *Ctl_CreateIconControl(PyObject *_self, PyObject *_args)
|
||||||
{
|
{
|
||||||
PyObject *_res = NULL;
|
PyObject *_res = NULL;
|
||||||
OSStatus _err;
|
OSStatus _err;
|
||||||
WindowPtr window;
|
WindowPtr inWindow;
|
||||||
Rect boundsRect;
|
Rect inBoundsRect;
|
||||||
ControlButtonContentInfo icon;
|
ControlButtonContentInfo inIconContent;
|
||||||
Boolean dontTrack;
|
Boolean inDontTrack;
|
||||||
ControlHandle outControl;
|
ControlHandle outControl;
|
||||||
#ifndef CreateIconControl
|
#ifndef CreateIconControl
|
||||||
PyMac_PRECHECK(CreateIconControl);
|
PyMac_PRECHECK(CreateIconControl);
|
||||||
#endif
|
#endif
|
||||||
if (!PyArg_ParseTuple(_args, "O&O&O&b",
|
if (!PyArg_ParseTuple(_args, "O&O&O&b",
|
||||||
WinObj_Convert, &window,
|
WinObj_Convert, &inWindow,
|
||||||
PyMac_GetRect, &boundsRect,
|
PyMac_GetRect, &inBoundsRect,
|
||||||
ControlButtonContentInfo_Convert, &icon,
|
ControlButtonContentInfo_Convert, &inIconContent,
|
||||||
&dontTrack))
|
&inDontTrack))
|
||||||
return NULL;
|
return NULL;
|
||||||
_err = CreateIconControl(window,
|
_err = CreateIconControl(inWindow,
|
||||||
&boundsRect,
|
&inBoundsRect,
|
||||||
&icon,
|
&inIconContent,
|
||||||
dontTrack,
|
inDontTrack,
|
||||||
&outControl);
|
&outControl);
|
||||||
if (_err != noErr) return PyMac_Error(_err);
|
if (_err != noErr) return PyMac_Error(_err);
|
||||||
_res = Py_BuildValue("O&",
|
_res = Py_BuildValue("O&",
|
||||||
|
@ -5422,7 +5422,7 @@ static PyMethodDef Ctl_methods[] = {
|
||||||
{"DrawControls", (PyCFunction)Ctl_DrawControls, 1,
|
{"DrawControls", (PyCFunction)Ctl_DrawControls, 1,
|
||||||
PyDoc_STR("(WindowPtr theWindow) -> None")},
|
PyDoc_STR("(WindowPtr theWindow) -> None")},
|
||||||
{"UpdateControls", (PyCFunction)Ctl_UpdateControls, 1,
|
{"UpdateControls", (PyCFunction)Ctl_UpdateControls, 1,
|
||||||
PyDoc_STR("(WindowPtr theWindow, RgnHandle updateRegion) -> None")},
|
PyDoc_STR("(WindowPtr inWindow, RgnHandle inUpdateRegion) -> None")},
|
||||||
{"FindControl", (PyCFunction)Ctl_FindControl, 1,
|
{"FindControl", (PyCFunction)Ctl_FindControl, 1,
|
||||||
PyDoc_STR("(Point testPoint, WindowPtr theWindow) -> (ControlPartCode _rv, ControlHandle theControl)")},
|
PyDoc_STR("(Point testPoint, WindowPtr theWindow) -> (ControlPartCode _rv, ControlHandle theControl)")},
|
||||||
{"IdleControls", (PyCFunction)Ctl_IdleControls, 1,
|
{"IdleControls", (PyCFunction)Ctl_IdleControls, 1,
|
||||||
|
@ -5446,15 +5446,15 @@ static PyMethodDef Ctl_methods[] = {
|
||||||
{"ClearKeyboardFocus", (PyCFunction)Ctl_ClearKeyboardFocus, 1,
|
{"ClearKeyboardFocus", (PyCFunction)Ctl_ClearKeyboardFocus, 1,
|
||||||
PyDoc_STR("(WindowPtr inWindow) -> None")},
|
PyDoc_STR("(WindowPtr inWindow) -> None")},
|
||||||
{"SetAutomaticControlDragTrackingEnabledForWindow", (PyCFunction)Ctl_SetAutomaticControlDragTrackingEnabledForWindow, 1,
|
{"SetAutomaticControlDragTrackingEnabledForWindow", (PyCFunction)Ctl_SetAutomaticControlDragTrackingEnabledForWindow, 1,
|
||||||
PyDoc_STR("(WindowPtr theWindow, Boolean tracks) -> None")},
|
PyDoc_STR("(WindowPtr inWindow, Boolean inTracks) -> None")},
|
||||||
{"IsAutomaticControlDragTrackingEnabledForWindow", (PyCFunction)Ctl_IsAutomaticControlDragTrackingEnabledForWindow, 1,
|
{"IsAutomaticControlDragTrackingEnabledForWindow", (PyCFunction)Ctl_IsAutomaticControlDragTrackingEnabledForWindow, 1,
|
||||||
PyDoc_STR("(WindowPtr theWindow) -> (Boolean tracks)")},
|
PyDoc_STR("(WindowPtr inWindow) -> (Boolean outTracks)")},
|
||||||
{"CreateBevelButtonControl", (PyCFunction)Ctl_CreateBevelButtonControl, 1,
|
{"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)")},
|
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,
|
{"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)")},
|
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,
|
{"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,
|
{"CreateProgressBarControl", (PyCFunction)Ctl_CreateProgressBarControl, 1,
|
||||||
PyDoc_STR("(WindowPtr window, Rect boundsRect, SInt32 value, SInt32 minimum, SInt32 maximum, Boolean indeterminate) -> (ControlHandle outControl)")},
|
PyDoc_STR("(WindowPtr window, Rect boundsRect, SInt32 value, SInt32 minimum, SInt32 maximum, Boolean indeterminate) -> (ControlHandle outControl)")},
|
||||||
{"CreateRelevanceBarControl", (PyCFunction)Ctl_CreateRelevanceBarControl, 1,
|
{"CreateRelevanceBarControl", (PyCFunction)Ctl_CreateRelevanceBarControl, 1,
|
||||||
|
@ -5488,7 +5488,7 @@ static PyMethodDef Ctl_methods[] = {
|
||||||
{"CreatePictureControl", (PyCFunction)Ctl_CreatePictureControl, 1,
|
{"CreatePictureControl", (PyCFunction)Ctl_CreatePictureControl, 1,
|
||||||
PyDoc_STR("(WindowPtr window, Rect boundsRect, ControlButtonContentInfo content, Boolean dontTrack) -> (ControlHandle outControl)")},
|
PyDoc_STR("(WindowPtr window, Rect boundsRect, ControlButtonContentInfo content, Boolean dontTrack) -> (ControlHandle outControl)")},
|
||||||
{"CreateIconControl", (PyCFunction)Ctl_CreateIconControl, 1,
|
{"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,
|
{"CreateWindowHeaderControl", (PyCFunction)Ctl_CreateWindowHeaderControl, 1,
|
||||||
PyDoc_STR("(WindowPtr window, Rect boundsRect, Boolean isListHeader) -> (ControlHandle outControl)")},
|
PyDoc_STR("(WindowPtr window, Rect boundsRect, Boolean isListHeader) -> (ControlHandle outControl)")},
|
||||||
{"CreatePushButtonControl", (PyCFunction)Ctl_CreatePushButtonControl, 1,
|
{"CreatePushButtonControl", (PyCFunction)Ctl_CreatePushButtonControl, 1,
|
||||||
|
|
|
@ -125,6 +125,7 @@ class MyScanner(Scanner):
|
||||||
## 'DataBrowserTableViewColumnDesc',
|
## 'DataBrowserTableViewColumnDesc',
|
||||||
## 'DataBrowserListViewColumnDesc',
|
## 'DataBrowserListViewColumnDesc',
|
||||||
'CFDataRef',
|
'CFDataRef',
|
||||||
|
'DataBrowserListViewHeaderDesc', # difficult struct
|
||||||
]
|
]
|
||||||
|
|
||||||
def makerepairinstructions(self):
|
def makerepairinstructions(self):
|
||||||
|
|
|
@ -47,12 +47,14 @@ class MyScanner(Scanner):
|
||||||
self.defsfile.write("def FOUR_CHAR_CODE(x): return x\n")
|
self.defsfile.write("def FOUR_CHAR_CODE(x): return x\n")
|
||||||
self.defsfile.write("from Carbon.TextEdit import *\n")
|
self.defsfile.write("from Carbon.TextEdit import *\n")
|
||||||
self.defsfile.write("from Carbon.QuickDraw import *\n")
|
self.defsfile.write("from Carbon.QuickDraw import *\n")
|
||||||
|
self.defsfile.write("fkDragActionAll = -1\n")
|
||||||
self.defsfile.write("\n")
|
self.defsfile.write("\n")
|
||||||
# Defines unparseable in Drag.h
|
# Defines unparseable in Drag.h
|
||||||
self.defsfile.write(MISSING_DEFINES)
|
self.defsfile.write(MISSING_DEFINES)
|
||||||
|
|
||||||
def makeblacklistnames(self):
|
def makeblacklistnames(self):
|
||||||
return [
|
return [
|
||||||
|
"kDragActionAll",
|
||||||
]
|
]
|
||||||
|
|
||||||
def makeblacklisttypes(self):
|
def makeblacklisttypes(self):
|
||||||
|
|
|
@ -136,7 +136,9 @@ class MyScanner(Scanner_OSX):
|
||||||
"IOCompletionUPP", # Proc pointer
|
"IOCompletionUPP", # Proc pointer
|
||||||
"AliasFilterProcPtr",
|
"AliasFilterProcPtr",
|
||||||
"AliasFilterUPP",
|
"AliasFilterUPP",
|
||||||
|
"FNSubscriptionUPP",
|
||||||
|
|
||||||
|
"FNSubscriptionRef", # Lazy, for now.
|
||||||
]
|
]
|
||||||
|
|
||||||
def makerepairinstructions(self):
|
def makerepairinstructions(self):
|
||||||
|
|
|
@ -906,6 +906,32 @@ static PyObject *Icn_RegisterIconRefFromResource(PyObject *_self, PyObject *_arg
|
||||||
return _res;
|
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)
|
static PyObject *Icn_UnregisterIconRef(PyObject *_self, PyObject *_args)
|
||||||
{
|
{
|
||||||
PyObject *_res = NULL;
|
PyObject *_res = NULL;
|
||||||
|
@ -1381,6 +1407,26 @@ static PyObject *Icn_ReadIconFile(PyObject *_self, PyObject *_args)
|
||||||
return _res;
|
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)
|
static PyObject *Icn_WriteIconFile(PyObject *_self, PyObject *_args)
|
||||||
{
|
{
|
||||||
PyObject *_res = NULL;
|
PyObject *_res = NULL;
|
||||||
|
@ -1479,6 +1525,8 @@ static PyMethodDef Icn_methods[] = {
|
||||||
PyDoc_STR("(OSType creator, OSType iconType, IconFamilyHandle iconFamily) -> (IconRef theIconRef)")},
|
PyDoc_STR("(OSType creator, OSType iconType, IconFamilyHandle iconFamily) -> (IconRef theIconRef)")},
|
||||||
{"RegisterIconRefFromResource", (PyCFunction)Icn_RegisterIconRefFromResource, 1,
|
{"RegisterIconRefFromResource", (PyCFunction)Icn_RegisterIconRefFromResource, 1,
|
||||||
PyDoc_STR("(OSType creator, OSType iconType, FSSpec resourceFile, SInt16 resourceID) -> (IconRef theIconRef)")},
|
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,
|
{"UnregisterIconRef", (PyCFunction)Icn_UnregisterIconRef, 1,
|
||||||
PyDoc_STR("(OSType creator, OSType iconType) -> None")},
|
PyDoc_STR("(OSType creator, OSType iconType) -> None")},
|
||||||
{"UpdateIconRef", (PyCFunction)Icn_UpdateIconRef, 1,
|
{"UpdateIconRef", (PyCFunction)Icn_UpdateIconRef, 1,
|
||||||
|
@ -1521,6 +1569,8 @@ static PyMethodDef Icn_methods[] = {
|
||||||
PyDoc_STR("(OSType creator, OSType iconType, FSSpec iconFile) -> (IconRef theIconRef)")},
|
PyDoc_STR("(OSType creator, OSType iconType, FSSpec iconFile) -> (IconRef theIconRef)")},
|
||||||
{"ReadIconFile", (PyCFunction)Icn_ReadIconFile, 1,
|
{"ReadIconFile", (PyCFunction)Icn_ReadIconFile, 1,
|
||||||
PyDoc_STR("(FSSpec iconFile) -> (IconFamilyHandle iconFamily)")},
|
PyDoc_STR("(FSSpec iconFile) -> (IconFamilyHandle iconFamily)")},
|
||||||
|
{"ReadIconFromFSRef", (PyCFunction)Icn_ReadIconFromFSRef, 1,
|
||||||
|
PyDoc_STR("(FSRef ref) -> (IconFamilyHandle iconFamily)")},
|
||||||
{"WriteIconFile", (PyCFunction)Icn_WriteIconFile, 1,
|
{"WriteIconFile", (PyCFunction)Icn_WriteIconFile, 1,
|
||||||
PyDoc_STR("(IconFamilyHandle iconFamily, FSSpec iconFile) -> None")},
|
PyDoc_STR("(IconFamilyHandle iconFamily, FSSpec iconFile) -> None")},
|
||||||
{NULL, NULL, 0}
|
{NULL, NULL, 0}
|
||||||
|
|
|
@ -48,6 +48,8 @@ class MyScanner(Scanner):
|
||||||
"err",
|
"err",
|
||||||
# OS8 only
|
# OS8 only
|
||||||
'IconServicesTerminate',
|
'IconServicesTerminate',
|
||||||
|
# Lazy, right now.
|
||||||
|
"GetIconRefFromFileInfo"
|
||||||
]
|
]
|
||||||
|
|
||||||
def makeblacklisttypes(self):
|
def makeblacklisttypes(self):
|
||||||
|
@ -55,6 +57,7 @@ class MyScanner(Scanner):
|
||||||
"IconActionUPP",
|
"IconActionUPP",
|
||||||
"IconGetterUPP",
|
"IconGetterUPP",
|
||||||
"CFragInitBlockPtr",
|
"CFragInitBlockPtr",
|
||||||
|
"CGRect_ptr",
|
||||||
]
|
]
|
||||||
|
|
||||||
def makerepairinstructions(self):
|
def makerepairinstructions(self):
|
||||||
|
@ -63,6 +66,7 @@ class MyScanner(Scanner):
|
||||||
|
|
||||||
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\n")
|
||||||
|
self.defsfile.write("from Carbon.Files import *\n")
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
main()
|
main()
|
||||||
|
|
|
@ -32,6 +32,7 @@ IconTransformType = Type("IconTransformType", "h")
|
||||||
IconSelectorValue = Type("IconSelectorValue", "l")
|
IconSelectorValue = Type("IconSelectorValue", "l")
|
||||||
IconServicesUsageFlags = Type("IconServicesUsageFlags", "l")
|
IconServicesUsageFlags = Type("IconServicesUsageFlags", "l")
|
||||||
RGBColor = OpaqueType("RGBColor", "QdRGB")
|
RGBColor = OpaqueType("RGBColor", "QdRGB")
|
||||||
|
CGContextRef = OpaqueByValueType("CGContextRef", "CGContextRefObj")
|
||||||
|
|
||||||
#WindowPeek = OpaqueByValueType("WindowPeek", OBJECTPREFIX)
|
#WindowPeek = OpaqueByValueType("WindowPeek", OBJECTPREFIX)
|
||||||
|
|
||||||
|
|
|
@ -97,6 +97,96 @@ static PyObject *Launch_LSCopyItemInfoForURL(PyObject *_self, PyObject *_args)
|
||||||
return _res;
|
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)
|
static PyObject *Launch_LSCopyKindStringForRef(PyObject *_self, PyObject *_args)
|
||||||
{
|
{
|
||||||
PyObject *_res = NULL;
|
PyObject *_res = NULL;
|
||||||
|
@ -323,6 +413,16 @@ static PyMethodDef Launch_methods[] = {
|
||||||
PyDoc_STR("(FSRef inItemRef, LSRequestedInfo inWhichInfo) -> (LSItemInfoRecord outItemInfo)")},
|
PyDoc_STR("(FSRef inItemRef, LSRequestedInfo inWhichInfo) -> (LSItemInfoRecord outItemInfo)")},
|
||||||
{"LSCopyItemInfoForURL", (PyCFunction)Launch_LSCopyItemInfoForURL, 1,
|
{"LSCopyItemInfoForURL", (PyCFunction)Launch_LSCopyItemInfoForURL, 1,
|
||||||
PyDoc_STR("(CFURLRef inURL, LSRequestedInfo inWhichInfo) -> (LSItemInfoRecord outItemInfo)")},
|
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,
|
{"LSCopyKindStringForRef", (PyCFunction)Launch_LSCopyKindStringForRef, 1,
|
||||||
PyDoc_STR("(FSRef inFSRef) -> (CFStringRef outKindString)")},
|
PyDoc_STR("(FSRef inFSRef) -> (CFStringRef outKindString)")},
|
||||||
{"LSCopyKindStringForURL", (PyCFunction)Launch_LSCopyKindStringForURL, 1,
|
{"LSCopyKindStringForURL", (PyCFunction)Launch_LSCopyKindStringForURL, 1,
|
||||||
|
|
|
@ -39,8 +39,10 @@ class MyScanner(Scanner):
|
||||||
|
|
||||||
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\n")
|
||||||
|
self.defsfile.write("from Carbon.Files import *\n")
|
||||||
self.defsfile.write("kLSRequestAllInfo = -1\n")
|
self.defsfile.write("kLSRequestAllInfo = -1\n")
|
||||||
self.defsfile.write("kLSRolesAll = -1\n")
|
self.defsfile.write("kLSRolesAll = -1\n")
|
||||||
|
self.defsfile.write("kLSInvalidExtensionIndex = -1\n")
|
||||||
|
|
||||||
def makeblacklistnames(self):
|
def makeblacklistnames(self):
|
||||||
return [
|
return [
|
||||||
|
@ -48,6 +50,7 @@ class MyScanner(Scanner):
|
||||||
"LSTerm",
|
"LSTerm",
|
||||||
"kLSRequestAllInfo",
|
"kLSRequestAllInfo",
|
||||||
"kLSRolesAll",
|
"kLSRolesAll",
|
||||||
|
"kLSInvalidExtensionIndex",
|
||||||
]
|
]
|
||||||
|
|
||||||
def makeblacklisttypes(self):
|
def makeblacklisttypes(self):
|
||||||
|
@ -67,6 +70,12 @@ class MyScanner(Scanner):
|
||||||
[('OptCFStringRef', 'inBundleID', 'InMode')]),
|
[('OptCFStringRef', 'inBundleID', 'InMode')]),
|
||||||
([('CFStringRef', 'inName', 'InMode')],
|
([('CFStringRef', 'inName', 'InMode')],
|
||||||
[('OptCFStringRef', 'inName', 'InMode')]),
|
[('OptCFStringRef', 'inName', 'InMode')]),
|
||||||
|
|
||||||
|
# Unicode filenames passed as length, buffer. LSGetExtensionInfo
|
||||||
|
([('UniCharCount', '*', 'InMode'),
|
||||||
|
('UniChar_ptr', '*', 'InMode')],
|
||||||
|
[('UnicodeReverseInBuffer', '*', 'InMode')]
|
||||||
|
),
|
||||||
]
|
]
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|
|
@ -24,22 +24,9 @@ LSAcceptanceFlags = Type("LSAcceptanceFlags", "l")
|
||||||
LSInitializeFlags = Type("LSInitializeFlags", "l")
|
LSInitializeFlags = Type("LSInitializeFlags", "l")
|
||||||
LSRequestedInfo = Type("LSRequestedInfo", "l")
|
LSRequestedInfo = Type("LSRequestedInfo", "l")
|
||||||
LSRolesMask = Type("LSRolesMask", "l")
|
LSRolesMask = Type("LSRolesMask", "l")
|
||||||
|
UniCharCount = Type("UniCharCount", "l")
|
||||||
OptCFStringRef = OpaqueByValueType("CFStringRef", "OptCFStringRefObj")
|
OptCFStringRef = OpaqueByValueType("CFStringRef", "OptCFStringRefObj")
|
||||||
LSItemInfoRecord = OpaqueType("LSItemInfoRecord", "LSItemInfoRecord")
|
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 + """
|
includestuff = includestuff + """
|
||||||
#include <ApplicationServices/ApplicationServices.h>
|
#include <ApplicationServices/ApplicationServices.h>
|
||||||
|
|
|
@ -361,7 +361,7 @@ static PyObject *TXNObj_TXNGrowWindow(TXNObjectObject *_self, PyObject *_args)
|
||||||
static PyObject *TXNObj_TXNZoomWindow(TXNObjectObject *_self, PyObject *_args)
|
static PyObject *TXNObj_TXNZoomWindow(TXNObjectObject *_self, PyObject *_args)
|
||||||
{
|
{
|
||||||
PyObject *_res = NULL;
|
PyObject *_res = NULL;
|
||||||
short iPart;
|
SInt16 iPart;
|
||||||
#ifndef TXNZoomWindow
|
#ifndef TXNZoomWindow
|
||||||
PyMac_PRECHECK(TXNZoomWindow);
|
PyMac_PRECHECK(TXNZoomWindow);
|
||||||
#endif
|
#endif
|
||||||
|
@ -697,37 +697,6 @@ static PyObject *TXNObj_TXNSetDataFromFile(TXNObjectObject *_self, PyObject *_ar
|
||||||
return _res;
|
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)
|
static PyObject *TXNObj_TXNGetChangeCount(TXNObjectObject *_self, PyObject *_args)
|
||||||
{
|
{
|
||||||
PyObject *_res = NULL;
|
PyObject *_res = NULL;
|
||||||
|
@ -1150,6 +1119,20 @@ static PyObject *TXNObj_TXNIsObjectAttachedToSpecificWindow(TXNObjectObject *_se
|
||||||
return _res;
|
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[] = {
|
static PyMethodDef TXNObj_methods[] = {
|
||||||
{"TXNDeleteObject", (PyCFunction)TXNObj_TXNDeleteObject, 1,
|
{"TXNDeleteObject", (PyCFunction)TXNObj_TXNDeleteObject, 1,
|
||||||
PyDoc_STR("() -> None")},
|
PyDoc_STR("() -> None")},
|
||||||
|
@ -1180,7 +1163,7 @@ static PyMethodDef TXNObj_methods[] = {
|
||||||
{"TXNGrowWindow", (PyCFunction)TXNObj_TXNGrowWindow, 1,
|
{"TXNGrowWindow", (PyCFunction)TXNObj_TXNGrowWindow, 1,
|
||||||
PyDoc_STR("(EventRecord iEvent) -> None")},
|
PyDoc_STR("(EventRecord iEvent) -> None")},
|
||||||
{"TXNZoomWindow", (PyCFunction)TXNObj_TXNZoomWindow, 1,
|
{"TXNZoomWindow", (PyCFunction)TXNObj_TXNZoomWindow, 1,
|
||||||
PyDoc_STR("(short iPart) -> None")},
|
PyDoc_STR("(SInt16 iPart) -> None")},
|
||||||
{"TXNCanUndo", (PyCFunction)TXNObj_TXNCanUndo, 1,
|
{"TXNCanUndo", (PyCFunction)TXNObj_TXNCanUndo, 1,
|
||||||
PyDoc_STR("() -> (Boolean _rv, TXNActionKey oTXNActionKey)")},
|
PyDoc_STR("() -> (Boolean _rv, TXNActionKey oTXNActionKey)")},
|
||||||
{"TXNUndo", (PyCFunction)TXNObj_TXNUndo, 1,
|
{"TXNUndo", (PyCFunction)TXNObj_TXNUndo, 1,
|
||||||
|
@ -1215,8 +1198,6 @@ static PyMethodDef TXNObj_methods[] = {
|
||||||
PyDoc_STR("(TXNOffset iStartOffset, TXNOffset iEndOffset, TXNDataType iEncoding) -> (Handle oDataHandle)")},
|
PyDoc_STR("(TXNOffset iStartOffset, TXNOffset iEndOffset, TXNDataType iEncoding) -> (Handle oDataHandle)")},
|
||||||
{"TXNSetDataFromFile", (PyCFunction)TXNObj_TXNSetDataFromFile, 1,
|
{"TXNSetDataFromFile", (PyCFunction)TXNObj_TXNSetDataFromFile, 1,
|
||||||
PyDoc_STR("(SInt16 iFileRefNum, OSType iFileType, ByteCount iFileLength, TXNOffset iStartOffset, TXNOffset iEndOffset) -> None")},
|
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,
|
{"TXNGetChangeCount", (PyCFunction)TXNObj_TXNGetChangeCount, 1,
|
||||||
PyDoc_STR("() -> (ItemCount _rv)")},
|
PyDoc_STR("() -> (ItemCount _rv)")},
|
||||||
{"TXNSave", (PyCFunction)TXNObj_TXNSave, 1,
|
{"TXNSave", (PyCFunction)TXNObj_TXNSave, 1,
|
||||||
|
@ -1257,6 +1238,8 @@ static PyMethodDef TXNObj_methods[] = {
|
||||||
PyDoc_STR("(UInt32 iLineNumber) -> (Fixed oLineWidth, Fixed oLineHeight)")},
|
PyDoc_STR("(UInt32 iLineNumber) -> (Fixed oLineWidth, Fixed oLineHeight)")},
|
||||||
{"TXNIsObjectAttachedToSpecificWindow", (PyCFunction)TXNObj_TXNIsObjectAttachedToSpecificWindow, 1,
|
{"TXNIsObjectAttachedToSpecificWindow", (PyCFunction)TXNObj_TXNIsObjectAttachedToSpecificWindow, 1,
|
||||||
PyDoc_STR("(WindowPtr iWindow) -> (Boolean oAttached)")},
|
PyDoc_STR("(WindowPtr iWindow) -> (Boolean oAttached)")},
|
||||||
|
{"TXNRecalcTextLayout", (PyCFunction)TXNObj_TXNRecalcTextLayout, 1,
|
||||||
|
PyDoc_STR("() -> None")},
|
||||||
{NULL, NULL, 0}
|
{NULL, NULL, 0}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1493,7 +1476,7 @@ static PyObject *Mlte_TXNNewObject(PyObject *_self, PyObject *_args)
|
||||||
OSStatus _err;
|
OSStatus _err;
|
||||||
FSSpec * iFileSpec;
|
FSSpec * iFileSpec;
|
||||||
WindowPtr iWindow;
|
WindowPtr iWindow;
|
||||||
Rect * iFrame;
|
Rect iFrame;
|
||||||
TXNFrameOptions iFrameOptions;
|
TXNFrameOptions iFrameOptions;
|
||||||
TXNFrameType iFrameType;
|
TXNFrameType iFrameType;
|
||||||
TXNFileType iFileType;
|
TXNFileType iFileType;
|
||||||
|
@ -1506,7 +1489,7 @@ static PyObject *Mlte_TXNNewObject(PyObject *_self, PyObject *_args)
|
||||||
if (!PyArg_ParseTuple(_args, "O&O&O&llO&l",
|
if (!PyArg_ParseTuple(_args, "O&O&O&llO&l",
|
||||||
OptFSSpecPtr_Convert, &iFileSpec,
|
OptFSSpecPtr_Convert, &iFileSpec,
|
||||||
WinObj_Convert, &iWindow,
|
WinObj_Convert, &iWindow,
|
||||||
OptRectPtr_Convert, &iFrame,
|
PyMac_GetRect, &iFrame,
|
||||||
&iFrameOptions,
|
&iFrameOptions,
|
||||||
&iFrameType,
|
&iFrameType,
|
||||||
PyMac_GetOSType, &iFileType,
|
PyMac_GetOSType, &iFileType,
|
||||||
|
@ -1514,7 +1497,7 @@ static PyObject *Mlte_TXNNewObject(PyObject *_self, PyObject *_args)
|
||||||
return NULL;
|
return NULL;
|
||||||
_err = TXNNewObject(iFileSpec,
|
_err = TXNNewObject(iFileSpec,
|
||||||
iWindow,
|
iWindow,
|
||||||
iFrame,
|
&iFrame,
|
||||||
iFrameOptions,
|
iFrameOptions,
|
||||||
iFrameType,
|
iFrameType,
|
||||||
iFileType,
|
iFileType,
|
||||||
|
@ -1656,7 +1639,7 @@ static PyObject *Mlte_TXNInitTextension(PyObject *_self, PyObject *_args)
|
||||||
|
|
||||||
static PyMethodDef Mlte_methods[] = {
|
static PyMethodDef Mlte_methods[] = {
|
||||||
{"TXNNewObject", (PyCFunction)Mlte_TXNNewObject, 1,
|
{"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,
|
{"TXNTerminateTextension", (PyCFunction)Mlte_TXNTerminateTextension, 1,
|
||||||
PyDoc_STR("() -> None")},
|
PyDoc_STR("() -> None")},
|
||||||
{"TXNIsScrapPastable", (PyCFunction)Mlte_TXNIsScrapPastable, 1,
|
{"TXNIsScrapPastable", (PyCFunction)Mlte_TXNIsScrapPastable, 1,
|
||||||
|
|
|
@ -52,6 +52,7 @@ kTXNEndOffset = 0x7FFFFFFF
|
||||||
MovieFileType = FOUR_CHAR_CODE('moov')
|
MovieFileType = FOUR_CHAR_CODE('moov')
|
||||||
kTXNUseEncodingWordRulesMask = 0x80000000
|
kTXNUseEncodingWordRulesMask = 0x80000000
|
||||||
kTXNFontSizeAttributeSize = 4
|
kTXNFontSizeAttributeSize = 4
|
||||||
|
normal = 0
|
||||||
""")
|
""")
|
||||||
|
|
||||||
def makeblacklistnames(self):
|
def makeblacklistnames(self):
|
||||||
|
@ -94,10 +95,18 @@ kTXNFontSizeAttributeSize = 4
|
||||||
"TXNBackground", #TBD
|
"TXNBackground", #TBD
|
||||||
"TXNFindUPP",
|
"TXNFindUPP",
|
||||||
"ATSUStyle", #TBD
|
"ATSUStyle", #TBD
|
||||||
|
"TXNBackground_ptr", #TBD
|
||||||
|
"TXNControlData_ptr", #TBD
|
||||||
|
"TXNControlTag_ptr", #TBD
|
||||||
|
"TXNLongRect", #TBD
|
||||||
|
"TXNLongRect_ptr", #TBD
|
||||||
|
"TXNTypeAttributes_ptr", #TBD
|
||||||
|
|
||||||
"TXNActionKeyMapperProcPtr",
|
"TXNActionKeyMapperProcPtr",
|
||||||
"TXNActionKeyMapperUPP",
|
"TXNActionKeyMapperUPP",
|
||||||
"TXNTextBoxOptionsData",
|
"TXNTextBoxOptionsData",
|
||||||
"TXNCountOptions",
|
"TXNCountOptions",
|
||||||
|
"void_ptr",
|
||||||
]
|
]
|
||||||
|
|
||||||
def makerepairinstructions(self):
|
def makerepairinstructions(self):
|
||||||
|
|
|
@ -47,6 +47,7 @@ class MyScanner(Scanner):
|
||||||
|
|
||||||
def makeblacklisttypes(self):
|
def makeblacklisttypes(self):
|
||||||
return [
|
return [
|
||||||
|
"OSALocalOrGlobal",
|
||||||
"OSACreateAppleEventUPP",
|
"OSACreateAppleEventUPP",
|
||||||
"OSAActiveUPP",
|
"OSAActiveUPP",
|
||||||
"AEEventHandlerUPP",
|
"AEEventHandlerUPP",
|
||||||
|
|
|
@ -40,6 +40,7 @@ initstuff = initstuff + """
|
||||||
|
|
||||||
ComponentInstance = OpaqueByValueType('ComponentInstance', OBJECTPREFIX)
|
ComponentInstance = OpaqueByValueType('ComponentInstance', OBJECTPREFIX)
|
||||||
OSAError = OSErrType("OSAError", "l")
|
OSAError = OSErrType("OSAError", "l")
|
||||||
|
# OSALocalOrGlobal = Type("OSALocalOrGlobal", "l")
|
||||||
OSAID = Type("OSAID", "l")
|
OSAID = Type("OSAID", "l")
|
||||||
OSADebugCallFrameRef = Type("OSADebugCallFrameRef", "l")
|
OSADebugCallFrameRef = Type("OSADebugCallFrameRef", "l")
|
||||||
OSADebugSessionRef = Type("OSADebugSessionRef", "l")
|
OSADebugSessionRef = Type("OSADebugSessionRef", "l")
|
||||||
|
|
|
@ -1041,15 +1041,15 @@ static PyObject *WinObj_SetWindowProxyAlias(WindowObject *_self, PyObject *_args
|
||||||
{
|
{
|
||||||
PyObject *_res = NULL;
|
PyObject *_res = NULL;
|
||||||
OSStatus _err;
|
OSStatus _err;
|
||||||
AliasHandle alias;
|
AliasHandle inAlias;
|
||||||
#ifndef SetWindowProxyAlias
|
#ifndef SetWindowProxyAlias
|
||||||
PyMac_PRECHECK(SetWindowProxyAlias);
|
PyMac_PRECHECK(SetWindowProxyAlias);
|
||||||
#endif
|
#endif
|
||||||
if (!PyArg_ParseTuple(_args, "O&",
|
if (!PyArg_ParseTuple(_args, "O&",
|
||||||
ResObj_Convert, &alias))
|
ResObj_Convert, &inAlias))
|
||||||
return NULL;
|
return NULL;
|
||||||
_err = SetWindowProxyAlias(_self->ob_itself,
|
_err = SetWindowProxyAlias(_self->ob_itself,
|
||||||
alias);
|
inAlias);
|
||||||
if (_err != noErr) return PyMac_Error(_err);
|
if (_err != noErr) return PyMac_Error(_err);
|
||||||
Py_INCREF(Py_None);
|
Py_INCREF(Py_None);
|
||||||
_res = Py_None;
|
_res = Py_None;
|
||||||
|
@ -1332,21 +1332,21 @@ static PyObject *WinObj_TransitionWindow(WindowObject *_self, PyObject *_args)
|
||||||
{
|
{
|
||||||
PyObject *_res = NULL;
|
PyObject *_res = NULL;
|
||||||
OSStatus _err;
|
OSStatus _err;
|
||||||
WindowTransitionEffect effect;
|
WindowTransitionEffect inEffect;
|
||||||
WindowTransitionAction action;
|
WindowTransitionAction inAction;
|
||||||
Rect rect;
|
Rect inRect;
|
||||||
#ifndef TransitionWindow
|
#ifndef TransitionWindow
|
||||||
PyMac_PRECHECK(TransitionWindow);
|
PyMac_PRECHECK(TransitionWindow);
|
||||||
#endif
|
#endif
|
||||||
if (!PyArg_ParseTuple(_args, "llO&",
|
if (!PyArg_ParseTuple(_args, "llO&",
|
||||||
&effect,
|
&inEffect,
|
||||||
&action,
|
&inAction,
|
||||||
PyMac_GetRect, &rect))
|
PyMac_GetRect, &inRect))
|
||||||
return NULL;
|
return NULL;
|
||||||
_err = TransitionWindow(_self->ob_itself,
|
_err = TransitionWindow(_self->ob_itself,
|
||||||
effect,
|
inEffect,
|
||||||
action,
|
inAction,
|
||||||
&rect);
|
&inRect);
|
||||||
if (_err != noErr) return PyMac_Error(_err);
|
if (_err != noErr) return PyMac_Error(_err);
|
||||||
Py_INCREF(Py_None);
|
Py_INCREF(Py_None);
|
||||||
_res = Py_None;
|
_res = Py_None;
|
||||||
|
@ -1357,24 +1357,24 @@ static PyObject *WinObj_TransitionWindowAndParent(WindowObject *_self, PyObject
|
||||||
{
|
{
|
||||||
PyObject *_res = NULL;
|
PyObject *_res = NULL;
|
||||||
OSStatus _err;
|
OSStatus _err;
|
||||||
WindowPtr parentWindow;
|
WindowPtr inParentWindow;
|
||||||
WindowTransitionEffect effect;
|
WindowTransitionEffect inEffect;
|
||||||
WindowTransitionAction action;
|
WindowTransitionAction inAction;
|
||||||
Rect rect;
|
Rect inRect;
|
||||||
#ifndef TransitionWindowAndParent
|
#ifndef TransitionWindowAndParent
|
||||||
PyMac_PRECHECK(TransitionWindowAndParent);
|
PyMac_PRECHECK(TransitionWindowAndParent);
|
||||||
#endif
|
#endif
|
||||||
if (!PyArg_ParseTuple(_args, "O&llO&",
|
if (!PyArg_ParseTuple(_args, "O&llO&",
|
||||||
WinObj_Convert, &parentWindow,
|
WinObj_Convert, &inParentWindow,
|
||||||
&effect,
|
&inEffect,
|
||||||
&action,
|
&inAction,
|
||||||
PyMac_GetRect, &rect))
|
PyMac_GetRect, &inRect))
|
||||||
return NULL;
|
return NULL;
|
||||||
_err = TransitionWindowAndParent(_self->ob_itself,
|
_err = TransitionWindowAndParent(_self->ob_itself,
|
||||||
parentWindow,
|
inParentWindow,
|
||||||
effect,
|
inEffect,
|
||||||
action,
|
inAction,
|
||||||
&rect);
|
&inRect);
|
||||||
if (_err != noErr) return PyMac_Error(_err);
|
if (_err != noErr) return PyMac_Error(_err);
|
||||||
Py_INCREF(Py_None);
|
Py_INCREF(Py_None);
|
||||||
_res = Py_None;
|
_res = Py_None;
|
||||||
|
@ -1562,23 +1562,23 @@ static PyObject *WinObj_ResizeWindow(WindowObject *_self, PyObject *_args)
|
||||||
{
|
{
|
||||||
PyObject *_res = NULL;
|
PyObject *_res = NULL;
|
||||||
Boolean _rv;
|
Boolean _rv;
|
||||||
Point startPoint;
|
Point inStartPoint;
|
||||||
Rect sizeConstraints;
|
Rect inSizeConstraints;
|
||||||
Rect newContentRect;
|
Rect outNewContentRect;
|
||||||
#ifndef ResizeWindow
|
#ifndef ResizeWindow
|
||||||
PyMac_PRECHECK(ResizeWindow);
|
PyMac_PRECHECK(ResizeWindow);
|
||||||
#endif
|
#endif
|
||||||
if (!PyArg_ParseTuple(_args, "O&O&",
|
if (!PyArg_ParseTuple(_args, "O&O&",
|
||||||
PyMac_GetPoint, &startPoint,
|
PyMac_GetPoint, &inStartPoint,
|
||||||
PyMac_GetRect, &sizeConstraints))
|
PyMac_GetRect, &inSizeConstraints))
|
||||||
return NULL;
|
return NULL;
|
||||||
_rv = ResizeWindow(_self->ob_itself,
|
_rv = ResizeWindow(_self->ob_itself,
|
||||||
startPoint,
|
inStartPoint,
|
||||||
&sizeConstraints,
|
&inSizeConstraints,
|
||||||
&newContentRect);
|
&outNewContentRect);
|
||||||
_res = Py_BuildValue("bO&",
|
_res = Py_BuildValue("bO&",
|
||||||
_rv,
|
_rv,
|
||||||
PyMac_BuildRect, &newContentRect);
|
PyMac_BuildRect, &outNewContentRect);
|
||||||
return _res;
|
return _res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1652,20 +1652,20 @@ static PyObject *WinObj_IsWindowInStandardState(WindowObject *_self, PyObject *_
|
||||||
{
|
{
|
||||||
PyObject *_res = NULL;
|
PyObject *_res = NULL;
|
||||||
Boolean _rv;
|
Boolean _rv;
|
||||||
Point idealSize;
|
Point inIdealSize;
|
||||||
Rect idealStandardState;
|
Rect outIdealStandardState;
|
||||||
#ifndef IsWindowInStandardState
|
#ifndef IsWindowInStandardState
|
||||||
PyMac_PRECHECK(IsWindowInStandardState);
|
PyMac_PRECHECK(IsWindowInStandardState);
|
||||||
#endif
|
#endif
|
||||||
if (!PyArg_ParseTuple(_args, ""))
|
if (!PyArg_ParseTuple(_args, "O&",
|
||||||
|
PyMac_GetPoint, &inIdealSize))
|
||||||
return NULL;
|
return NULL;
|
||||||
_rv = IsWindowInStandardState(_self->ob_itself,
|
_rv = IsWindowInStandardState(_self->ob_itself,
|
||||||
&idealSize,
|
&inIdealSize,
|
||||||
&idealStandardState);
|
&outIdealStandardState);
|
||||||
_res = Py_BuildValue("bO&O&",
|
_res = Py_BuildValue("bO&",
|
||||||
_rv,
|
_rv,
|
||||||
PyMac_BuildPoint, idealSize,
|
PyMac_BuildRect, &outIdealStandardState);
|
||||||
PyMac_BuildRect, &idealStandardState);
|
|
||||||
return _res;
|
return _res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1673,16 +1673,16 @@ static PyObject *WinObj_ZoomWindowIdeal(WindowObject *_self, PyObject *_args)
|
||||||
{
|
{
|
||||||
PyObject *_res = NULL;
|
PyObject *_res = NULL;
|
||||||
OSStatus _err;
|
OSStatus _err;
|
||||||
WindowPartCode partCode;
|
WindowPartCode inPartCode;
|
||||||
Point ioIdealSize;
|
Point ioIdealSize;
|
||||||
#ifndef ZoomWindowIdeal
|
#ifndef ZoomWindowIdeal
|
||||||
PyMac_PRECHECK(ZoomWindowIdeal);
|
PyMac_PRECHECK(ZoomWindowIdeal);
|
||||||
#endif
|
#endif
|
||||||
if (!PyArg_ParseTuple(_args, "h",
|
if (!PyArg_ParseTuple(_args, "h",
|
||||||
&partCode))
|
&inPartCode))
|
||||||
return NULL;
|
return NULL;
|
||||||
_err = ZoomWindowIdeal(_self->ob_itself,
|
_err = ZoomWindowIdeal(_self->ob_itself,
|
||||||
partCode,
|
inPartCode,
|
||||||
&ioIdealSize);
|
&ioIdealSize);
|
||||||
if (_err != noErr) return PyMac_Error(_err);
|
if (_err != noErr) return PyMac_Error(_err);
|
||||||
_res = Py_BuildValue("O&",
|
_res = Py_BuildValue("O&",
|
||||||
|
@ -1694,17 +1694,17 @@ static PyObject *WinObj_GetWindowIdealUserState(WindowObject *_self, PyObject *_
|
||||||
{
|
{
|
||||||
PyObject *_res = NULL;
|
PyObject *_res = NULL;
|
||||||
OSStatus _err;
|
OSStatus _err;
|
||||||
Rect userState;
|
Rect outUserState;
|
||||||
#ifndef GetWindowIdealUserState
|
#ifndef GetWindowIdealUserState
|
||||||
PyMac_PRECHECK(GetWindowIdealUserState);
|
PyMac_PRECHECK(GetWindowIdealUserState);
|
||||||
#endif
|
#endif
|
||||||
if (!PyArg_ParseTuple(_args, ""))
|
if (!PyArg_ParseTuple(_args, ""))
|
||||||
return NULL;
|
return NULL;
|
||||||
_err = GetWindowIdealUserState(_self->ob_itself,
|
_err = GetWindowIdealUserState(_self->ob_itself,
|
||||||
&userState);
|
&outUserState);
|
||||||
if (_err != noErr) return PyMac_Error(_err);
|
if (_err != noErr) return PyMac_Error(_err);
|
||||||
_res = Py_BuildValue("O&",
|
_res = Py_BuildValue("O&",
|
||||||
PyMac_BuildRect, &userState);
|
PyMac_BuildRect, &outUserState);
|
||||||
return _res;
|
return _res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1712,15 +1712,15 @@ static PyObject *WinObj_SetWindowIdealUserState(WindowObject *_self, PyObject *_
|
||||||
{
|
{
|
||||||
PyObject *_res = NULL;
|
PyObject *_res = NULL;
|
||||||
OSStatus _err;
|
OSStatus _err;
|
||||||
Rect userState;
|
Rect inUserState;
|
||||||
#ifndef SetWindowIdealUserState
|
#ifndef SetWindowIdealUserState
|
||||||
PyMac_PRECHECK(SetWindowIdealUserState);
|
PyMac_PRECHECK(SetWindowIdealUserState);
|
||||||
#endif
|
#endif
|
||||||
if (!PyArg_ParseTuple(_args, "O&",
|
if (!PyArg_ParseTuple(_args, "O&",
|
||||||
PyMac_GetRect, &userState))
|
PyMac_GetRect, &inUserState))
|
||||||
return NULL;
|
return NULL;
|
||||||
_err = SetWindowIdealUserState(_self->ob_itself,
|
_err = SetWindowIdealUserState(_self->ob_itself,
|
||||||
&userState);
|
&inUserState);
|
||||||
if (_err != noErr) return PyMac_Error(_err);
|
if (_err != noErr) return PyMac_Error(_err);
|
||||||
Py_INCREF(Py_None);
|
Py_INCREF(Py_None);
|
||||||
_res = Py_None;
|
_res = Py_None;
|
||||||
|
@ -1997,6 +1997,21 @@ static PyObject *WinObj_GetWindowPort(WindowObject *_self, PyObject *_args)
|
||||||
return _res;
|
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)
|
static PyObject *WinObj_GetWindowKind(WindowObject *_self, PyObject *_args)
|
||||||
{
|
{
|
||||||
PyObject *_res = NULL;
|
PyObject *_res = NULL;
|
||||||
|
@ -2412,7 +2427,7 @@ static PyMethodDef WinObj_methods[] = {
|
||||||
{"GetWindowProxyFSSpec", (PyCFunction)WinObj_GetWindowProxyFSSpec, 1,
|
{"GetWindowProxyFSSpec", (PyCFunction)WinObj_GetWindowProxyFSSpec, 1,
|
||||||
PyDoc_STR("() -> (FSSpec outFile)")},
|
PyDoc_STR("() -> (FSSpec outFile)")},
|
||||||
{"SetWindowProxyAlias", (PyCFunction)WinObj_SetWindowProxyAlias, 1,
|
{"SetWindowProxyAlias", (PyCFunction)WinObj_SetWindowProxyAlias, 1,
|
||||||
PyDoc_STR("(AliasHandle alias) -> None")},
|
PyDoc_STR("(AliasHandle inAlias) -> None")},
|
||||||
{"GetWindowProxyAlias", (PyCFunction)WinObj_GetWindowProxyAlias, 1,
|
{"GetWindowProxyAlias", (PyCFunction)WinObj_GetWindowProxyAlias, 1,
|
||||||
PyDoc_STR("() -> (AliasHandle alias)")},
|
PyDoc_STR("() -> (AliasHandle alias)")},
|
||||||
{"SetWindowProxyCreatorAndType", (PyCFunction)WinObj_SetWindowProxyCreatorAndType, 1,
|
{"SetWindowProxyCreatorAndType", (PyCFunction)WinObj_SetWindowProxyCreatorAndType, 1,
|
||||||
|
@ -2442,9 +2457,9 @@ static PyMethodDef WinObj_methods[] = {
|
||||||
{"HiliteWindowFrameForDrag", (PyCFunction)WinObj_HiliteWindowFrameForDrag, 1,
|
{"HiliteWindowFrameForDrag", (PyCFunction)WinObj_HiliteWindowFrameForDrag, 1,
|
||||||
PyDoc_STR("(Boolean hilited) -> None")},
|
PyDoc_STR("(Boolean hilited) -> None")},
|
||||||
{"TransitionWindow", (PyCFunction)WinObj_TransitionWindow, 1,
|
{"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,
|
{"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,
|
{"MacMoveWindow", (PyCFunction)WinObj_MacMoveWindow, 1,
|
||||||
PyDoc_STR("(short hGlobal, short vGlobal, Boolean front) -> None")},
|
PyDoc_STR("(short hGlobal, short vGlobal, Boolean front) -> None")},
|
||||||
{"SizeWindow", (PyCFunction)WinObj_SizeWindow, 1,
|
{"SizeWindow", (PyCFunction)WinObj_SizeWindow, 1,
|
||||||
|
@ -2464,7 +2479,7 @@ static PyMethodDef WinObj_methods[] = {
|
||||||
{"GetWindowBounds", (PyCFunction)WinObj_GetWindowBounds, 1,
|
{"GetWindowBounds", (PyCFunction)WinObj_GetWindowBounds, 1,
|
||||||
PyDoc_STR("(WindowRegionCode regionCode) -> (Rect globalBounds)")},
|
PyDoc_STR("(WindowRegionCode regionCode) -> (Rect globalBounds)")},
|
||||||
{"ResizeWindow", (PyCFunction)WinObj_ResizeWindow, 1,
|
{"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,
|
{"SetWindowBounds", (PyCFunction)WinObj_SetWindowBounds, 1,
|
||||||
PyDoc_STR("(WindowRegionCode regionCode, Rect globalBounds) -> None")},
|
PyDoc_STR("(WindowRegionCode regionCode, Rect globalBounds) -> None")},
|
||||||
{"RepositionWindow", (PyCFunction)WinObj_RepositionWindow, 1,
|
{"RepositionWindow", (PyCFunction)WinObj_RepositionWindow, 1,
|
||||||
|
@ -2472,13 +2487,13 @@ static PyMethodDef WinObj_methods[] = {
|
||||||
{"MoveWindowStructure", (PyCFunction)WinObj_MoveWindowStructure, 1,
|
{"MoveWindowStructure", (PyCFunction)WinObj_MoveWindowStructure, 1,
|
||||||
PyDoc_STR("(short hGlobal, short vGlobal) -> None")},
|
PyDoc_STR("(short hGlobal, short vGlobal) -> None")},
|
||||||
{"IsWindowInStandardState", (PyCFunction)WinObj_IsWindowInStandardState, 1,
|
{"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,
|
{"ZoomWindowIdeal", (PyCFunction)WinObj_ZoomWindowIdeal, 1,
|
||||||
PyDoc_STR("(WindowPartCode partCode) -> (Point ioIdealSize)")},
|
PyDoc_STR("(WindowPartCode inPartCode) -> (Point ioIdealSize)")},
|
||||||
{"GetWindowIdealUserState", (PyCFunction)WinObj_GetWindowIdealUserState, 1,
|
{"GetWindowIdealUserState", (PyCFunction)WinObj_GetWindowIdealUserState, 1,
|
||||||
PyDoc_STR("() -> (Rect userState)")},
|
PyDoc_STR("() -> (Rect outUserState)")},
|
||||||
{"SetWindowIdealUserState", (PyCFunction)WinObj_SetWindowIdealUserState, 1,
|
{"SetWindowIdealUserState", (PyCFunction)WinObj_SetWindowIdealUserState, 1,
|
||||||
PyDoc_STR("(Rect userState) -> None")},
|
PyDoc_STR("(Rect inUserState) -> None")},
|
||||||
{"GetWindowGreatestAreaDevice", (PyCFunction)WinObj_GetWindowGreatestAreaDevice, 1,
|
{"GetWindowGreatestAreaDevice", (PyCFunction)WinObj_GetWindowGreatestAreaDevice, 1,
|
||||||
PyDoc_STR("(WindowRegionCode inRegion) -> (GDHandle outGreatestDevice, Rect outGreatestDeviceRect)")},
|
PyDoc_STR("(WindowRegionCode inRegion) -> (GDHandle outGreatestDevice, Rect outGreatestDeviceRect)")},
|
||||||
{"ConstrainWindowToScreen", (PyCFunction)WinObj_ConstrainWindowToScreen, 1,
|
{"ConstrainWindowToScreen", (PyCFunction)WinObj_ConstrainWindowToScreen, 1,
|
||||||
|
@ -2507,6 +2522,8 @@ static PyMethodDef WinObj_methods[] = {
|
||||||
PyDoc_STR("(Point thePt) -> (Boolean _rv)")},
|
PyDoc_STR("(Point thePt) -> (Boolean _rv)")},
|
||||||
{"GetWindowPort", (PyCFunction)WinObj_GetWindowPort, 1,
|
{"GetWindowPort", (PyCFunction)WinObj_GetWindowPort, 1,
|
||||||
PyDoc_STR("() -> (CGrafPtr _rv)")},
|
PyDoc_STR("() -> (CGrafPtr _rv)")},
|
||||||
|
{"GetWindowStructurePort", (PyCFunction)WinObj_GetWindowStructurePort, 1,
|
||||||
|
PyDoc_STR("() -> (CGrafPtr _rv)")},
|
||||||
{"GetWindowKind", (PyCFunction)WinObj_GetWindowKind, 1,
|
{"GetWindowKind", (PyCFunction)WinObj_GetWindowKind, 1,
|
||||||
PyDoc_STR("() -> (short _rv)")},
|
PyDoc_STR("() -> (short _rv)")},
|
||||||
{"IsWindowHilited", (PyCFunction)WinObj_IsWindowHilited, 1,
|
{"IsWindowHilited", (PyCFunction)WinObj_IsWindowHilited, 1,
|
||||||
|
@ -2998,7 +3015,7 @@ static PyObject *Win_GetAvailableWindowPositioningBounds(PyObject *_self, PyObje
|
||||||
PyObject *_res = NULL;
|
PyObject *_res = NULL;
|
||||||
OSStatus _err;
|
OSStatus _err;
|
||||||
GDHandle inDevice;
|
GDHandle inDevice;
|
||||||
Rect availableRect;
|
Rect outAvailableRect;
|
||||||
#ifndef GetAvailableWindowPositioningBounds
|
#ifndef GetAvailableWindowPositioningBounds
|
||||||
PyMac_PRECHECK(GetAvailableWindowPositioningBounds);
|
PyMac_PRECHECK(GetAvailableWindowPositioningBounds);
|
||||||
#endif
|
#endif
|
||||||
|
@ -3006,10 +3023,10 @@ static PyObject *Win_GetAvailableWindowPositioningBounds(PyObject *_self, PyObje
|
||||||
ResObj_Convert, &inDevice))
|
ResObj_Convert, &inDevice))
|
||||||
return NULL;
|
return NULL;
|
||||||
_err = GetAvailableWindowPositioningBounds(inDevice,
|
_err = GetAvailableWindowPositioningBounds(inDevice,
|
||||||
&availableRect);
|
&outAvailableRect);
|
||||||
if (_err != noErr) return PyMac_Error(_err);
|
if (_err != noErr) return PyMac_Error(_err);
|
||||||
_res = Py_BuildValue("O&",
|
_res = Py_BuildValue("O&",
|
||||||
PyMac_BuildRect, &availableRect);
|
PyMac_BuildRect, &outAvailableRect);
|
||||||
return _res;
|
return _res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3166,7 +3183,7 @@ static PyMethodDef Win_methods[] = {
|
||||||
{"CollapseAllWindows", (PyCFunction)Win_CollapseAllWindows, 1,
|
{"CollapseAllWindows", (PyCFunction)Win_CollapseAllWindows, 1,
|
||||||
PyDoc_STR("(Boolean collapse) -> None")},
|
PyDoc_STR("(Boolean collapse) -> None")},
|
||||||
{"GetAvailableWindowPositioningBounds", (PyCFunction)Win_GetAvailableWindowPositioningBounds, 1,
|
{"GetAvailableWindowPositioningBounds", (PyCFunction)Win_GetAvailableWindowPositioningBounds, 1,
|
||||||
PyDoc_STR("(GDHandle inDevice) -> (Rect availableRect)")},
|
PyDoc_STR("(GDHandle inDevice) -> (Rect outAvailableRect)")},
|
||||||
{"DisableScreenUpdates", (PyCFunction)Win_DisableScreenUpdates, 1,
|
{"DisableScreenUpdates", (PyCFunction)Win_DisableScreenUpdates, 1,
|
||||||
PyDoc_STR("() -> None")},
|
PyDoc_STR("() -> None")},
|
||||||
{"EnableScreenUpdates", (PyCFunction)Win_EnableScreenUpdates, 1,
|
{"EnableScreenUpdates", (PyCFunction)Win_EnableScreenUpdates, 1,
|
||||||
|
|
|
@ -35,6 +35,7 @@ class MyScanner(Scanner):
|
||||||
self.defsfile.write("def FOUR_CHAR_CODE(x): return x\n")
|
self.defsfile.write("def FOUR_CHAR_CODE(x): return x\n")
|
||||||
self.defsfile.write("false = 0\n")
|
self.defsfile.write("false = 0\n")
|
||||||
self.defsfile.write("true = 1\n")
|
self.defsfile.write("true = 1\n")
|
||||||
|
self.defsfile.write("kWindowNoConstrainAttribute = 0x80000000\n")
|
||||||
|
|
||||||
def makeblacklistnames(self):
|
def makeblacklistnames(self):
|
||||||
return [
|
return [
|
||||||
|
@ -49,6 +50,7 @@ class MyScanner(Scanner):
|
||||||
# Constants with funny definitions
|
# Constants with funny definitions
|
||||||
'kMouseUpOutOfSlop',
|
'kMouseUpOutOfSlop',
|
||||||
'kAllWindowClasses',
|
'kAllWindowClasses',
|
||||||
|
'kWindowNoConstrainAttribute',
|
||||||
# OS8 only:
|
# OS8 only:
|
||||||
'GetAuxWin',
|
'GetAuxWin',
|
||||||
'GetWindowDataHandle',
|
'GetWindowDataHandle',
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue