Updated to Universal Headers 3.4
This commit is contained in:
parent
f30c3ad0d9
commit
620a7667eb
|
@ -5,8 +5,12 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
#include "pywintoolbox.h"
|
||||||
|
#else
|
||||||
#include "macglue.h"
|
#include "macglue.h"
|
||||||
#include "pymactoolbox.h"
|
#include "pymactoolbox.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Macro to test whether a weak-loaded CFM function exists */
|
/* Macro to test whether a weak-loaded CFM function exists */
|
||||||
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
|
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
|
||||||
|
|
|
@ -5,8 +5,12 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
#include "pywintoolbox.h"
|
||||||
|
#else
|
||||||
#include "macglue.h"
|
#include "macglue.h"
|
||||||
#include "pymactoolbox.h"
|
#include "pymactoolbox.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Macro to test whether a weak-loaded CFM function exists */
|
/* Macro to test whether a weak-loaded CFM function exists */
|
||||||
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
|
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
|
||||||
|
|
|
@ -5,8 +5,12 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
#include "pywintoolbox.h"
|
||||||
|
#else
|
||||||
#include "macglue.h"
|
#include "macglue.h"
|
||||||
#include "pymactoolbox.h"
|
#include "pymactoolbox.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Macro to test whether a weak-loaded CFM function exists */
|
/* Macro to test whether a weak-loaded CFM function exists */
|
||||||
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
|
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
|
||||||
|
|
|
@ -5,8 +5,12 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
#include "pywintoolbox.h"
|
||||||
|
#else
|
||||||
#include "macglue.h"
|
#include "macglue.h"
|
||||||
#include "pymactoolbox.h"
|
#include "pymactoolbox.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Macro to test whether a weak-loaded CFM function exists */
|
/* Macro to test whether a weak-loaded CFM function exists */
|
||||||
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
|
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
|
||||||
|
|
|
@ -5,8 +5,12 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
#include "pywintoolbox.h"
|
||||||
|
#else
|
||||||
#include "macglue.h"
|
#include "macglue.h"
|
||||||
#include "pymactoolbox.h"
|
#include "pymactoolbox.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Macro to test whether a weak-loaded CFM function exists */
|
/* Macro to test whether a weak-loaded CFM function exists */
|
||||||
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
|
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
|
||||||
|
|
|
@ -5,8 +5,12 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
#include "pywintoolbox.h"
|
||||||
|
#else
|
||||||
#include "macglue.h"
|
#include "macglue.h"
|
||||||
#include "pymactoolbox.h"
|
#include "pymactoolbox.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Macro to test whether a weak-loaded CFM function exists */
|
/* Macro to test whether a weak-loaded CFM function exists */
|
||||||
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
|
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
|
||||||
|
|
|
@ -5,8 +5,12 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
#include "pywintoolbox.h"
|
||||||
|
#else
|
||||||
#include "macglue.h"
|
#include "macglue.h"
|
||||||
#include "pymactoolbox.h"
|
#include "pymactoolbox.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Macro to test whether a weak-loaded CFM function exists */
|
/* Macro to test whether a weak-loaded CFM function exists */
|
||||||
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
|
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
|
||||||
|
|
|
@ -4,3 +4,7 @@ f = Function(void, 'SystemClick',
|
||||||
)
|
)
|
||||||
functions.append(f)
|
functions.append(f)
|
||||||
|
|
||||||
|
f = Function(UInt32, 'TickCount',
|
||||||
|
)
|
||||||
|
functions.append(f)
|
||||||
|
|
||||||
|
|
|
@ -5,8 +5,12 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
#include "pywintoolbox.h"
|
||||||
|
#else
|
||||||
#include "macglue.h"
|
#include "macglue.h"
|
||||||
#include "pymactoolbox.h"
|
#include "pymactoolbox.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Macro to test whether a weak-loaded CFM function exists */
|
/* Macro to test whether a weak-loaded CFM function exists */
|
||||||
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
|
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
|
||||||
|
|
|
@ -5,8 +5,12 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
#include "pywintoolbox.h"
|
||||||
|
#else
|
||||||
#include "macglue.h"
|
#include "macglue.h"
|
||||||
#include "pymactoolbox.h"
|
#include "pymactoolbox.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Macro to test whether a weak-loaded CFM function exists */
|
/* Macro to test whether a weak-loaded CFM function exists */
|
||||||
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
|
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
|
||||||
|
|
|
@ -5,8 +5,12 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
#include "pywintoolbox.h"
|
||||||
|
#else
|
||||||
#include "macglue.h"
|
#include "macglue.h"
|
||||||
#include "pymactoolbox.h"
|
#include "pymactoolbox.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Macro to test whether a weak-loaded CFM function exists */
|
/* Macro to test whether a weak-loaded CFM function exists */
|
||||||
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
|
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
|
||||||
|
|
|
@ -5,8 +5,12 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
#include "pywintoolbox.h"
|
||||||
|
#else
|
||||||
#include "macglue.h"
|
#include "macglue.h"
|
||||||
#include "pymactoolbox.h"
|
#include "pymactoolbox.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Macro to test whether a weak-loaded CFM function exists */
|
/* Macro to test whether a weak-loaded CFM function exists */
|
||||||
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
|
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
|
||||||
|
|
|
@ -5,8 +5,12 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
#include "pywintoolbox.h"
|
||||||
|
#else
|
||||||
#include "macglue.h"
|
#include "macglue.h"
|
||||||
#include "pymactoolbox.h"
|
#include "pymactoolbox.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Macro to test whether a weak-loaded CFM function exists */
|
/* Macro to test whether a weak-loaded CFM function exists */
|
||||||
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
|
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
|
||||||
|
|
|
@ -5,8 +5,12 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
#include "pywintoolbox.h"
|
||||||
|
#else
|
||||||
#include "macglue.h"
|
#include "macglue.h"
|
||||||
#include "pymactoolbox.h"
|
#include "pymactoolbox.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Macro to test whether a weak-loaded CFM function exists */
|
/* Macro to test whether a weak-loaded CFM function exists */
|
||||||
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
|
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
|
||||||
|
@ -241,23 +245,23 @@ static PyObject *TXNObj_TXNClick(TXNObjectObject *_self, PyObject *_args)
|
||||||
return _res;
|
return _res;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
#if TARGET_API_MAC_OS8
|
||||||
|
|
||||||
static PyObject *TXNObj_TXNTSMCheck(TXNObjectObject *_self, PyObject *_args)
|
static PyObject *TXNObj_TXNTSMCheck(TXNObjectObject *_self, PyObject *_args)
|
||||||
{
|
{
|
||||||
PyObject *_res = NULL;
|
PyObject *_res = NULL;
|
||||||
Boolean _rv;
|
Boolean _rv;
|
||||||
EventRecord iEvent;
|
EventRecord ioEvent;
|
||||||
#ifndef TXNTSMCheck
|
#ifndef TXNTSMCheck
|
||||||
PyMac_PRECHECK(TXNTSMCheck);
|
PyMac_PRECHECK(TXNTSMCheck);
|
||||||
#endif
|
#endif
|
||||||
if (!PyArg_ParseTuple(_args, "O&",
|
if (!PyArg_ParseTuple(_args, ""))
|
||||||
PyMac_GetEventRecord, &iEvent))
|
|
||||||
return NULL;
|
return NULL;
|
||||||
_rv = TXNTSMCheck(_self->ob_itself,
|
_rv = TXNTSMCheck(_self->ob_itself,
|
||||||
&iEvent);
|
&ioEvent);
|
||||||
_res = Py_BuildValue("b",
|
_res = Py_BuildValue("bO&",
|
||||||
_rv);
|
_rv,
|
||||||
|
PyMac_BuildEventRecord, &ioEvent);
|
||||||
return _res;
|
return _res;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -606,8 +610,8 @@ static PyObject *TXNObj_TXNCountRunsInRange(TXNObjectObject *_self, PyObject *_a
|
||||||
{
|
{
|
||||||
PyObject *_res = NULL;
|
PyObject *_res = NULL;
|
||||||
OSStatus _err;
|
OSStatus _err;
|
||||||
UInt32 iStartOffset;
|
TXNOffset iStartOffset;
|
||||||
UInt32 iEndOffset;
|
TXNOffset iEndOffset;
|
||||||
ItemCount oRunCount;
|
ItemCount oRunCount;
|
||||||
#ifndef TXNCountRunsInRange
|
#ifndef TXNCountRunsInRange
|
||||||
PyMac_PRECHECK(TXNCountRunsInRange);
|
PyMac_PRECHECK(TXNCountRunsInRange);
|
||||||
|
@ -773,7 +777,7 @@ static PyObject *TXNObj_TXNSave(TXNObjectObject *_self, PyObject *_args)
|
||||||
{
|
{
|
||||||
PyObject *_res = NULL;
|
PyObject *_res = NULL;
|
||||||
OSStatus _err;
|
OSStatus _err;
|
||||||
OSType iType;
|
TXNFileType iType;
|
||||||
OSType iResType;
|
OSType iResType;
|
||||||
TXNPermanentTextEncodingType iPermanentEncoding;
|
TXNPermanentTextEncodingType iPermanentEncoding;
|
||||||
FSSpec iFileSpecification;
|
FSSpec iFileSpecification;
|
||||||
|
@ -867,6 +871,23 @@ static PyObject *TXNObj_TXNGetViewRect(TXNObjectObject *_self, PyObject *_args)
|
||||||
return _res;
|
return _res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static PyObject *TXNObj_TXNSetViewRect(TXNObjectObject *_self, PyObject *_args)
|
||||||
|
{
|
||||||
|
PyObject *_res = NULL;
|
||||||
|
Rect iViewRect;
|
||||||
|
#ifndef TXNSetViewRect
|
||||||
|
PyMac_PRECHECK(TXNSetViewRect);
|
||||||
|
#endif
|
||||||
|
if (!PyArg_ParseTuple(_args, "O&",
|
||||||
|
PyMac_GetRect, &iViewRect))
|
||||||
|
return NULL;
|
||||||
|
TXNSetViewRect(_self->ob_itself,
|
||||||
|
&iViewRect);
|
||||||
|
Py_INCREF(Py_None);
|
||||||
|
_res = Py_None;
|
||||||
|
return _res;
|
||||||
|
}
|
||||||
|
|
||||||
static PyObject *TXNObj_TXNAttachObjectToWindow(TXNObjectObject *_self, PyObject *_args)
|
static PyObject *TXNObj_TXNAttachObjectToWindow(TXNObjectObject *_self, PyObject *_args)
|
||||||
{
|
{
|
||||||
PyObject *_res = NULL;
|
PyObject *_res = NULL;
|
||||||
|
@ -1029,6 +1050,111 @@ static PyObject *TXNObj_TXNPrepareFontMenu(TXNObjectObject *_self, PyObject *_ar
|
||||||
return _res;
|
return _res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static PyObject *TXNObj_TXNPointToOffset(TXNObjectObject *_self, PyObject *_args)
|
||||||
|
{
|
||||||
|
PyObject *_res = NULL;
|
||||||
|
OSStatus _err;
|
||||||
|
Point iPoint;
|
||||||
|
TXNOffset oOffset;
|
||||||
|
#ifndef TXNPointToOffset
|
||||||
|
PyMac_PRECHECK(TXNPointToOffset);
|
||||||
|
#endif
|
||||||
|
if (!PyArg_ParseTuple(_args, "O&",
|
||||||
|
PyMac_GetPoint, &iPoint))
|
||||||
|
return NULL;
|
||||||
|
_err = TXNPointToOffset(_self->ob_itself,
|
||||||
|
iPoint,
|
||||||
|
&oOffset);
|
||||||
|
if (_err != noErr) return PyMac_Error(_err);
|
||||||
|
_res = Py_BuildValue("l",
|
||||||
|
oOffset);
|
||||||
|
return _res;
|
||||||
|
}
|
||||||
|
|
||||||
|
static PyObject *TXNObj_TXNOffsetToPoint(TXNObjectObject *_self, PyObject *_args)
|
||||||
|
{
|
||||||
|
PyObject *_res = NULL;
|
||||||
|
OSStatus _err;
|
||||||
|
TXNOffset iOffset;
|
||||||
|
Point oPoint;
|
||||||
|
#ifndef TXNOffsetToPoint
|
||||||
|
PyMac_PRECHECK(TXNOffsetToPoint);
|
||||||
|
#endif
|
||||||
|
if (!PyArg_ParseTuple(_args, "l",
|
||||||
|
&iOffset))
|
||||||
|
return NULL;
|
||||||
|
_err = TXNOffsetToPoint(_self->ob_itself,
|
||||||
|
iOffset,
|
||||||
|
&oPoint);
|
||||||
|
if (_err != noErr) return PyMac_Error(_err);
|
||||||
|
_res = Py_BuildValue("O&",
|
||||||
|
PyMac_BuildPoint, oPoint);
|
||||||
|
return _res;
|
||||||
|
}
|
||||||
|
|
||||||
|
static PyObject *TXNObj_TXNGetLineCount(TXNObjectObject *_self, PyObject *_args)
|
||||||
|
{
|
||||||
|
PyObject *_res = NULL;
|
||||||
|
OSStatus _err;
|
||||||
|
ItemCount oLineTotal;
|
||||||
|
#ifndef TXNGetLineCount
|
||||||
|
PyMac_PRECHECK(TXNGetLineCount);
|
||||||
|
#endif
|
||||||
|
if (!PyArg_ParseTuple(_args, ""))
|
||||||
|
return NULL;
|
||||||
|
_err = TXNGetLineCount(_self->ob_itself,
|
||||||
|
&oLineTotal);
|
||||||
|
if (_err != noErr) return PyMac_Error(_err);
|
||||||
|
_res = Py_BuildValue("l",
|
||||||
|
oLineTotal);
|
||||||
|
return _res;
|
||||||
|
}
|
||||||
|
|
||||||
|
static PyObject *TXNObj_TXNGetLineMetrics(TXNObjectObject *_self, PyObject *_args)
|
||||||
|
{
|
||||||
|
PyObject *_res = NULL;
|
||||||
|
OSStatus _err;
|
||||||
|
UInt32 iLineNumber;
|
||||||
|
Fixed oLineWidth;
|
||||||
|
Fixed oLineHeight;
|
||||||
|
#ifndef TXNGetLineMetrics
|
||||||
|
PyMac_PRECHECK(TXNGetLineMetrics);
|
||||||
|
#endif
|
||||||
|
if (!PyArg_ParseTuple(_args, "l",
|
||||||
|
&iLineNumber))
|
||||||
|
return NULL;
|
||||||
|
_err = TXNGetLineMetrics(_self->ob_itself,
|
||||||
|
iLineNumber,
|
||||||
|
&oLineWidth,
|
||||||
|
&oLineHeight);
|
||||||
|
if (_err != noErr) return PyMac_Error(_err);
|
||||||
|
_res = Py_BuildValue("O&O&",
|
||||||
|
PyMac_BuildFixed, oLineWidth,
|
||||||
|
PyMac_BuildFixed, oLineHeight);
|
||||||
|
return _res;
|
||||||
|
}
|
||||||
|
|
||||||
|
static PyObject *TXNObj_TXNIsObjectAttachedToSpecificWindow(TXNObjectObject *_self, PyObject *_args)
|
||||||
|
{
|
||||||
|
PyObject *_res = NULL;
|
||||||
|
OSStatus _err;
|
||||||
|
WindowPtr iWindow;
|
||||||
|
Boolean oAttached;
|
||||||
|
#ifndef TXNIsObjectAttachedToSpecificWindow
|
||||||
|
PyMac_PRECHECK(TXNIsObjectAttachedToSpecificWindow);
|
||||||
|
#endif
|
||||||
|
if (!PyArg_ParseTuple(_args, "O&",
|
||||||
|
WinObj_Convert, &iWindow))
|
||||||
|
return NULL;
|
||||||
|
_err = TXNIsObjectAttachedToSpecificWindow(_self->ob_itself,
|
||||||
|
iWindow,
|
||||||
|
&oAttached);
|
||||||
|
if (_err != noErr) return PyMac_Error(_err);
|
||||||
|
_res = Py_BuildValue("b",
|
||||||
|
oAttached);
|
||||||
|
return _res;
|
||||||
|
}
|
||||||
|
|
||||||
static PyMethodDef TXNObj_methods[] = {
|
static PyMethodDef TXNObj_methods[] = {
|
||||||
{"TXNDeleteObject", (PyCFunction)TXNObj_TXNDeleteObject, 1,
|
{"TXNDeleteObject", (PyCFunction)TXNObj_TXNDeleteObject, 1,
|
||||||
"() -> None"},
|
"() -> None"},
|
||||||
|
@ -1043,9 +1169,9 @@ static PyMethodDef TXNObj_methods[] = {
|
||||||
{"TXNClick", (PyCFunction)TXNObj_TXNClick, 1,
|
{"TXNClick", (PyCFunction)TXNObj_TXNClick, 1,
|
||||||
"(EventRecord iEvent) -> None"},
|
"(EventRecord iEvent) -> None"},
|
||||||
|
|
||||||
#if 0
|
#if TARGET_API_MAC_OS8
|
||||||
{"TXNTSMCheck", (PyCFunction)TXNObj_TXNTSMCheck, 1,
|
{"TXNTSMCheck", (PyCFunction)TXNObj_TXNTSMCheck, 1,
|
||||||
"(EventRecord iEvent) -> (Boolean _rv)"},
|
"() -> (Boolean _rv, EventRecord ioEvent)"},
|
||||||
#endif
|
#endif
|
||||||
{"TXNSelectAll", (PyCFunction)TXNObj_TXNSelectAll, 1,
|
{"TXNSelectAll", (PyCFunction)TXNObj_TXNSelectAll, 1,
|
||||||
"() -> None"},
|
"() -> None"},
|
||||||
|
@ -1090,7 +1216,7 @@ static PyMethodDef TXNObj_methods[] = {
|
||||||
{"TXNSetSelection", (PyCFunction)TXNObj_TXNSetSelection, 1,
|
{"TXNSetSelection", (PyCFunction)TXNObj_TXNSetSelection, 1,
|
||||||
"(TXNOffset iStartOffset, TXNOffset iEndOffset) -> None"},
|
"(TXNOffset iStartOffset, TXNOffset iEndOffset) -> None"},
|
||||||
{"TXNCountRunsInRange", (PyCFunction)TXNObj_TXNCountRunsInRange, 1,
|
{"TXNCountRunsInRange", (PyCFunction)TXNObj_TXNCountRunsInRange, 1,
|
||||||
"(UInt32 iStartOffset, UInt32 iEndOffset) -> (ItemCount oRunCount)"},
|
"(TXNOffset iStartOffset, TXNOffset iEndOffset) -> (ItemCount oRunCount)"},
|
||||||
{"TXNDataSize", (PyCFunction)TXNObj_TXNDataSize, 1,
|
{"TXNDataSize", (PyCFunction)TXNObj_TXNDataSize, 1,
|
||||||
"() -> (ByteCount _rv)"},
|
"() -> (ByteCount _rv)"},
|
||||||
{"TXNGetData", (PyCFunction)TXNObj_TXNGetData, 1,
|
{"TXNGetData", (PyCFunction)TXNObj_TXNGetData, 1,
|
||||||
|
@ -1104,7 +1230,7 @@ static PyMethodDef TXNObj_methods[] = {
|
||||||
{"TXNGetChangeCount", (PyCFunction)TXNObj_TXNGetChangeCount, 1,
|
{"TXNGetChangeCount", (PyCFunction)TXNObj_TXNGetChangeCount, 1,
|
||||||
"() -> (ItemCount _rv)"},
|
"() -> (ItemCount _rv)"},
|
||||||
{"TXNSave", (PyCFunction)TXNObj_TXNSave, 1,
|
{"TXNSave", (PyCFunction)TXNObj_TXNSave, 1,
|
||||||
"(OSType iType, OSType iResType, TXNPermanentTextEncodingType iPermanentEncoding, FSSpec iFileSpecification, SInt16 iDataReference, SInt16 iResourceReference) -> None"},
|
"(TXNFileType iType, OSType iResType, TXNPermanentTextEncodingType iPermanentEncoding, FSSpec iFileSpecification, SInt16 iDataReference, SInt16 iResourceReference) -> None"},
|
||||||
{"TXNRevert", (PyCFunction)TXNObj_TXNRevert, 1,
|
{"TXNRevert", (PyCFunction)TXNObj_TXNRevert, 1,
|
||||||
"() -> None"},
|
"() -> None"},
|
||||||
{"TXNPageSetup", (PyCFunction)TXNObj_TXNPageSetup, 1,
|
{"TXNPageSetup", (PyCFunction)TXNObj_TXNPageSetup, 1,
|
||||||
|
@ -1113,6 +1239,8 @@ static PyMethodDef TXNObj_methods[] = {
|
||||||
"() -> None"},
|
"() -> None"},
|
||||||
{"TXNGetViewRect", (PyCFunction)TXNObj_TXNGetViewRect, 1,
|
{"TXNGetViewRect", (PyCFunction)TXNObj_TXNGetViewRect, 1,
|
||||||
"() -> (Rect oViewRect)"},
|
"() -> (Rect oViewRect)"},
|
||||||
|
{"TXNSetViewRect", (PyCFunction)TXNObj_TXNSetViewRect, 1,
|
||||||
|
"(Rect iViewRect) -> None"},
|
||||||
{"TXNAttachObjectToWindow", (PyCFunction)TXNObj_TXNAttachObjectToWindow, 1,
|
{"TXNAttachObjectToWindow", (PyCFunction)TXNObj_TXNAttachObjectToWindow, 1,
|
||||||
"(GWorldPtr iWindow, Boolean iIsActualWindow) -> None"},
|
"(GWorldPtr iWindow, Boolean iIsActualWindow) -> None"},
|
||||||
{"TXNIsObjectAttachedToWindow", (PyCFunction)TXNObj_TXNIsObjectAttachedToWindow, 1,
|
{"TXNIsObjectAttachedToWindow", (PyCFunction)TXNObj_TXNIsObjectAttachedToWindow, 1,
|
||||||
|
@ -1127,6 +1255,16 @@ static PyMethodDef TXNObj_methods[] = {
|
||||||
"(TXNFontMenuObject iTXNFontMenuObject, SInt16 iMenuID, SInt16 iMenuItem) -> None"},
|
"(TXNFontMenuObject iTXNFontMenuObject, SInt16 iMenuID, SInt16 iMenuItem) -> None"},
|
||||||
{"TXNPrepareFontMenu", (PyCFunction)TXNObj_TXNPrepareFontMenu, 1,
|
{"TXNPrepareFontMenu", (PyCFunction)TXNObj_TXNPrepareFontMenu, 1,
|
||||||
"(TXNFontMenuObject iTXNFontMenuObject) -> None"},
|
"(TXNFontMenuObject iTXNFontMenuObject) -> None"},
|
||||||
|
{"TXNPointToOffset", (PyCFunction)TXNObj_TXNPointToOffset, 1,
|
||||||
|
"(Point iPoint) -> (TXNOffset oOffset)"},
|
||||||
|
{"TXNOffsetToPoint", (PyCFunction)TXNObj_TXNOffsetToPoint, 1,
|
||||||
|
"(TXNOffset iOffset) -> (Point oPoint)"},
|
||||||
|
{"TXNGetLineCount", (PyCFunction)TXNObj_TXNGetLineCount, 1,
|
||||||
|
"() -> (ItemCount oLineTotal)"},
|
||||||
|
{"TXNGetLineMetrics", (PyCFunction)TXNObj_TXNGetLineMetrics, 1,
|
||||||
|
"(UInt32 iLineNumber) -> (Fixed oLineWidth, Fixed oLineHeight)"},
|
||||||
|
{"TXNIsObjectAttachedToSpecificWindow", (PyCFunction)TXNObj_TXNIsObjectAttachedToSpecificWindow, 1,
|
||||||
|
"(WindowPtr iWindow) -> (Boolean oAttached)"},
|
||||||
{NULL, NULL, 0}
|
{NULL, NULL, 0}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -77,7 +77,7 @@ MovieFileType = FOUR_CHAR_CODE('moov')
|
||||||
|
|
||||||
def makegreylist(self):
|
def makegreylist(self):
|
||||||
return [
|
return [
|
||||||
('#if !TARGET_API_MAC_OSX', [
|
('#if TARGET_API_MAC_OS8', [
|
||||||
'TXNTSMCheck',
|
'TXNTSMCheck',
|
||||||
])]
|
])]
|
||||||
|
|
||||||
|
@ -94,7 +94,14 @@ MovieFileType = FOUR_CHAR_CODE('moov')
|
||||||
"TXNMatchTextRecord", #TBD
|
"TXNMatchTextRecord", #TBD
|
||||||
"TXNBackground", #TBD
|
"TXNBackground", #TBD
|
||||||
"UniChar", #TBD
|
"UniChar", #TBD
|
||||||
|
"UniCharCount", #TBD
|
||||||
|
"UniChar_ptr", #TBD
|
||||||
"TXNFindUPP",
|
"TXNFindUPP",
|
||||||
|
"ATSUStyle", #TBD
|
||||||
|
"TXNActionKeyMapperProcPtr",
|
||||||
|
"TXNActionKeyMapperUPP",
|
||||||
|
"TXNTextBoxOptionsData",
|
||||||
|
"TXNCountOptions",
|
||||||
]
|
]
|
||||||
|
|
||||||
def makerepairinstructions(self):
|
def makerepairinstructions(self):
|
||||||
|
|
|
@ -125,6 +125,7 @@ OptRgnHandle = OpaqueByValueType("RgnHandle", "OptResObj")
|
||||||
GWorldPtr = OpaqueByValueType("GWorldPtr", "GWorldObj")
|
GWorldPtr = OpaqueByValueType("GWorldPtr", "GWorldObj")
|
||||||
OptGWorldPtr = OpaqueByValueType("GWorldPtr", "OptGWorldObj")
|
OptGWorldPtr = OpaqueByValueType("GWorldPtr", "OptGWorldObj")
|
||||||
MlteInBuffer = VarInputBufferType('void *', 'ByteCount', 'l')
|
MlteInBuffer = VarInputBufferType('void *', 'ByteCount', 'l')
|
||||||
|
CFStringRef = OpaqueByValueType("CFStringRef", "CFStringRefObj")
|
||||||
|
|
||||||
OptFSSpecPtr = OpaqueByValueType("FSSpec *", "OptFSSpecPtr")
|
OptFSSpecPtr = OpaqueByValueType("FSSpec *", "OptFSSpecPtr")
|
||||||
OptRectPtr = OpaqueByValueType("Rect *", "OptRectPtr")
|
OptRectPtr = OpaqueByValueType("Rect *", "OptRectPtr")
|
||||||
|
|
|
@ -5,8 +5,12 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
#include "pywintoolbox.h"
|
||||||
|
#else
|
||||||
#include "macglue.h"
|
#include "macglue.h"
|
||||||
#include "pymactoolbox.h"
|
#include "pymactoolbox.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Macro to test whether a weak-loaded CFM function exists */
|
/* Macro to test whether a weak-loaded CFM function exists */
|
||||||
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
|
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
|
||||||
|
@ -1645,6 +1649,25 @@ static PyObject *Qd_BitMapToRegion(PyObject *_self, PyObject *_args)
|
||||||
return _res;
|
return _res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if TARGET_API_MAC_CARBON
|
||||||
|
|
||||||
|
static PyObject *Qd_RgnToHandle(PyObject *_self, PyObject *_args)
|
||||||
|
{
|
||||||
|
PyObject *_res = NULL;
|
||||||
|
RgnHandle region;
|
||||||
|
Handle flattenedRgnDataHdl;
|
||||||
|
if (!PyArg_ParseTuple(_args, "O&O&",
|
||||||
|
ResObj_Convert, ®ion,
|
||||||
|
ResObj_Convert, &flattenedRgnDataHdl))
|
||||||
|
return NULL;
|
||||||
|
RgnToHandle(region,
|
||||||
|
flattenedRgnDataHdl);
|
||||||
|
Py_INCREF(Py_None);
|
||||||
|
_res = Py_None;
|
||||||
|
return _res;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static PyObject *Qd_DisposeRgn(PyObject *_self, PyObject *_args)
|
static PyObject *Qd_DisposeRgn(PyObject *_self, PyObject *_args)
|
||||||
{
|
{
|
||||||
PyObject *_res = NULL;
|
PyObject *_res = NULL;
|
||||||
|
@ -3502,6 +3525,23 @@ static PyObject *Qd_AngleFromSlope(PyObject *_self, PyObject *_args)
|
||||||
return _res;
|
return _res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if TARGET_API_MAC_CARBON
|
||||||
|
|
||||||
|
static PyObject *Qd_IsValidPort(PyObject *_self, PyObject *_args)
|
||||||
|
{
|
||||||
|
PyObject *_res = NULL;
|
||||||
|
Boolean _rv;
|
||||||
|
CGrafPtr port;
|
||||||
|
if (!PyArg_ParseTuple(_args, "O&",
|
||||||
|
GrafObj_Convert, &port))
|
||||||
|
return NULL;
|
||||||
|
_rv = IsValidPort(port);
|
||||||
|
_res = Py_BuildValue("b",
|
||||||
|
_rv);
|
||||||
|
return _res;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static PyObject *Qd_GetPortPixMap(PyObject *_self, PyObject *_args)
|
static PyObject *Qd_GetPortPixMap(PyObject *_self, PyObject *_args)
|
||||||
{
|
{
|
||||||
PyObject *_res = NULL;
|
PyObject *_res = NULL;
|
||||||
|
@ -3878,6 +3918,23 @@ static PyObject *Qd_IsPortPictureBeingDefined(PyObject *_self, PyObject *_args)
|
||||||
|
|
||||||
#if TARGET_API_MAC_CARBON
|
#if TARGET_API_MAC_CARBON
|
||||||
|
|
||||||
|
static PyObject *Qd_IsPortPolyBeingDefined(PyObject *_self, PyObject *_args)
|
||||||
|
{
|
||||||
|
PyObject *_res = NULL;
|
||||||
|
Boolean _rv;
|
||||||
|
CGrafPtr port;
|
||||||
|
if (!PyArg_ParseTuple(_args, "O&",
|
||||||
|
GrafObj_Convert, &port))
|
||||||
|
return NULL;
|
||||||
|
_rv = IsPortPolyBeingDefined(port);
|
||||||
|
_res = Py_BuildValue("b",
|
||||||
|
_rv);
|
||||||
|
return _res;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if TARGET_API_MAC_CARBON
|
||||||
|
|
||||||
static PyObject *Qd_IsPortOffscreen(PyObject *_self, PyObject *_args)
|
static PyObject *Qd_IsPortOffscreen(PyObject *_self, PyObject *_args)
|
||||||
{
|
{
|
||||||
PyObject *_res = NULL;
|
PyObject *_res = NULL;
|
||||||
|
@ -3990,6 +4047,22 @@ static PyObject *Qd_SetPortPenPixPat(PyObject *_self, PyObject *_args)
|
||||||
return _res;
|
return _res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static PyObject *Qd_SetPortFillPixPat(PyObject *_self, PyObject *_args)
|
||||||
|
{
|
||||||
|
PyObject *_res = NULL;
|
||||||
|
CGrafPtr port;
|
||||||
|
PixPatHandle penPattern;
|
||||||
|
if (!PyArg_ParseTuple(_args, "O&O&",
|
||||||
|
GrafObj_Convert, &port,
|
||||||
|
ResObj_Convert, &penPattern))
|
||||||
|
return NULL;
|
||||||
|
SetPortFillPixPat(port,
|
||||||
|
penPattern);
|
||||||
|
Py_INCREF(Py_None);
|
||||||
|
_res = Py_None;
|
||||||
|
return _res;
|
||||||
|
}
|
||||||
|
|
||||||
static PyObject *Qd_SetPortBackPixPat(PyObject *_self, PyObject *_args)
|
static PyObject *Qd_SetPortBackPixPat(PyObject *_self, PyObject *_args)
|
||||||
{
|
{
|
||||||
PyObject *_res = NULL;
|
PyObject *_res = NULL;
|
||||||
|
@ -4347,6 +4420,398 @@ static PyObject *Qd_QDFlushPortBuffer(PyObject *_self, PyObject *_args)
|
||||||
return _res;
|
return _res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if TARGET_API_MAC_CARBON
|
||||||
|
|
||||||
|
static PyObject *Qd_QDGetDirtyRegion(PyObject *_self, PyObject *_args)
|
||||||
|
{
|
||||||
|
PyObject *_res = NULL;
|
||||||
|
OSStatus _err;
|
||||||
|
CGrafPtr port;
|
||||||
|
RgnHandle rgn;
|
||||||
|
if (!PyArg_ParseTuple(_args, "O&O&",
|
||||||
|
GrafObj_Convert, &port,
|
||||||
|
ResObj_Convert, &rgn))
|
||||||
|
return NULL;
|
||||||
|
_err = QDGetDirtyRegion(port,
|
||||||
|
rgn);
|
||||||
|
if (_err != noErr) return PyMac_Error(_err);
|
||||||
|
Py_INCREF(Py_None);
|
||||||
|
_res = Py_None;
|
||||||
|
return _res;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if TARGET_API_MAC_CARBON
|
||||||
|
|
||||||
|
static PyObject *Qd_QDSetDirtyRegion(PyObject *_self, PyObject *_args)
|
||||||
|
{
|
||||||
|
PyObject *_res = NULL;
|
||||||
|
OSStatus _err;
|
||||||
|
CGrafPtr port;
|
||||||
|
RgnHandle rgn;
|
||||||
|
if (!PyArg_ParseTuple(_args, "O&O&",
|
||||||
|
GrafObj_Convert, &port,
|
||||||
|
ResObj_Convert, &rgn))
|
||||||
|
return NULL;
|
||||||
|
_err = QDSetDirtyRegion(port,
|
||||||
|
rgn);
|
||||||
|
if (_err != noErr) return PyMac_Error(_err);
|
||||||
|
Py_INCREF(Py_None);
|
||||||
|
_res = Py_None;
|
||||||
|
return _res;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
static PyObject *Qd_LMGetScrVRes(PyObject *_self, PyObject *_args)
|
||||||
|
{
|
||||||
|
PyObject *_res = NULL;
|
||||||
|
SInt16 _rv;
|
||||||
|
if (!PyArg_ParseTuple(_args, ""))
|
||||||
|
return NULL;
|
||||||
|
_rv = LMGetScrVRes();
|
||||||
|
_res = Py_BuildValue("h",
|
||||||
|
_rv);
|
||||||
|
return _res;
|
||||||
|
}
|
||||||
|
|
||||||
|
static PyObject *Qd_LMSetScrVRes(PyObject *_self, PyObject *_args)
|
||||||
|
{
|
||||||
|
PyObject *_res = NULL;
|
||||||
|
SInt16 value;
|
||||||
|
if (!PyArg_ParseTuple(_args, "h",
|
||||||
|
&value))
|
||||||
|
return NULL;
|
||||||
|
LMSetScrVRes(value);
|
||||||
|
Py_INCREF(Py_None);
|
||||||
|
_res = Py_None;
|
||||||
|
return _res;
|
||||||
|
}
|
||||||
|
|
||||||
|
static PyObject *Qd_LMGetScrHRes(PyObject *_self, PyObject *_args)
|
||||||
|
{
|
||||||
|
PyObject *_res = NULL;
|
||||||
|
SInt16 _rv;
|
||||||
|
if (!PyArg_ParseTuple(_args, ""))
|
||||||
|
return NULL;
|
||||||
|
_rv = LMGetScrHRes();
|
||||||
|
_res = Py_BuildValue("h",
|
||||||
|
_rv);
|
||||||
|
return _res;
|
||||||
|
}
|
||||||
|
|
||||||
|
static PyObject *Qd_LMSetScrHRes(PyObject *_self, PyObject *_args)
|
||||||
|
{
|
||||||
|
PyObject *_res = NULL;
|
||||||
|
SInt16 value;
|
||||||
|
if (!PyArg_ParseTuple(_args, "h",
|
||||||
|
&value))
|
||||||
|
return NULL;
|
||||||
|
LMSetScrHRes(value);
|
||||||
|
Py_INCREF(Py_None);
|
||||||
|
_res = Py_None;
|
||||||
|
return _res;
|
||||||
|
}
|
||||||
|
|
||||||
|
static PyObject *Qd_LMGetMainDevice(PyObject *_self, PyObject *_args)
|
||||||
|
{
|
||||||
|
PyObject *_res = NULL;
|
||||||
|
GDHandle _rv;
|
||||||
|
if (!PyArg_ParseTuple(_args, ""))
|
||||||
|
return NULL;
|
||||||
|
_rv = LMGetMainDevice();
|
||||||
|
_res = Py_BuildValue("O&",
|
||||||
|
ResObj_New, _rv);
|
||||||
|
return _res;
|
||||||
|
}
|
||||||
|
|
||||||
|
static PyObject *Qd_LMSetMainDevice(PyObject *_self, PyObject *_args)
|
||||||
|
{
|
||||||
|
PyObject *_res = NULL;
|
||||||
|
GDHandle value;
|
||||||
|
if (!PyArg_ParseTuple(_args, "O&",
|
||||||
|
ResObj_Convert, &value))
|
||||||
|
return NULL;
|
||||||
|
LMSetMainDevice(value);
|
||||||
|
Py_INCREF(Py_None);
|
||||||
|
_res = Py_None;
|
||||||
|
return _res;
|
||||||
|
}
|
||||||
|
|
||||||
|
static PyObject *Qd_LMGetDeviceList(PyObject *_self, PyObject *_args)
|
||||||
|
{
|
||||||
|
PyObject *_res = NULL;
|
||||||
|
GDHandle _rv;
|
||||||
|
if (!PyArg_ParseTuple(_args, ""))
|
||||||
|
return NULL;
|
||||||
|
_rv = LMGetDeviceList();
|
||||||
|
_res = Py_BuildValue("O&",
|
||||||
|
ResObj_New, _rv);
|
||||||
|
return _res;
|
||||||
|
}
|
||||||
|
|
||||||
|
static PyObject *Qd_LMSetDeviceList(PyObject *_self, PyObject *_args)
|
||||||
|
{
|
||||||
|
PyObject *_res = NULL;
|
||||||
|
GDHandle value;
|
||||||
|
if (!PyArg_ParseTuple(_args, "O&",
|
||||||
|
ResObj_Convert, &value))
|
||||||
|
return NULL;
|
||||||
|
LMSetDeviceList(value);
|
||||||
|
Py_INCREF(Py_None);
|
||||||
|
_res = Py_None;
|
||||||
|
return _res;
|
||||||
|
}
|
||||||
|
|
||||||
|
static PyObject *Qd_LMGetQDColors(PyObject *_self, PyObject *_args)
|
||||||
|
{
|
||||||
|
PyObject *_res = NULL;
|
||||||
|
Handle _rv;
|
||||||
|
if (!PyArg_ParseTuple(_args, ""))
|
||||||
|
return NULL;
|
||||||
|
_rv = LMGetQDColors();
|
||||||
|
_res = Py_BuildValue("O&",
|
||||||
|
ResObj_New, _rv);
|
||||||
|
return _res;
|
||||||
|
}
|
||||||
|
|
||||||
|
static PyObject *Qd_LMSetQDColors(PyObject *_self, PyObject *_args)
|
||||||
|
{
|
||||||
|
PyObject *_res = NULL;
|
||||||
|
Handle value;
|
||||||
|
if (!PyArg_ParseTuple(_args, "O&",
|
||||||
|
ResObj_Convert, &value))
|
||||||
|
return NULL;
|
||||||
|
LMSetQDColors(value);
|
||||||
|
Py_INCREF(Py_None);
|
||||||
|
_res = Py_None;
|
||||||
|
return _res;
|
||||||
|
}
|
||||||
|
|
||||||
|
static PyObject *Qd_LMGetWidthListHand(PyObject *_self, PyObject *_args)
|
||||||
|
{
|
||||||
|
PyObject *_res = NULL;
|
||||||
|
Handle _rv;
|
||||||
|
if (!PyArg_ParseTuple(_args, ""))
|
||||||
|
return NULL;
|
||||||
|
_rv = LMGetWidthListHand();
|
||||||
|
_res = Py_BuildValue("O&",
|
||||||
|
ResObj_New, _rv);
|
||||||
|
return _res;
|
||||||
|
}
|
||||||
|
|
||||||
|
static PyObject *Qd_LMSetWidthListHand(PyObject *_self, PyObject *_args)
|
||||||
|
{
|
||||||
|
PyObject *_res = NULL;
|
||||||
|
Handle value;
|
||||||
|
if (!PyArg_ParseTuple(_args, "O&",
|
||||||
|
ResObj_Convert, &value))
|
||||||
|
return NULL;
|
||||||
|
LMSetWidthListHand(value);
|
||||||
|
Py_INCREF(Py_None);
|
||||||
|
_res = Py_None;
|
||||||
|
return _res;
|
||||||
|
}
|
||||||
|
|
||||||
|
static PyObject *Qd_LMGetHiliteMode(PyObject *_self, PyObject *_args)
|
||||||
|
{
|
||||||
|
PyObject *_res = NULL;
|
||||||
|
UInt8 _rv;
|
||||||
|
if (!PyArg_ParseTuple(_args, ""))
|
||||||
|
return NULL;
|
||||||
|
_rv = LMGetHiliteMode();
|
||||||
|
_res = Py_BuildValue("b",
|
||||||
|
_rv);
|
||||||
|
return _res;
|
||||||
|
}
|
||||||
|
|
||||||
|
static PyObject *Qd_LMSetHiliteMode(PyObject *_self, PyObject *_args)
|
||||||
|
{
|
||||||
|
PyObject *_res = NULL;
|
||||||
|
UInt8 value;
|
||||||
|
if (!PyArg_ParseTuple(_args, "b",
|
||||||
|
&value))
|
||||||
|
return NULL;
|
||||||
|
LMSetHiliteMode(value);
|
||||||
|
Py_INCREF(Py_None);
|
||||||
|
_res = Py_None;
|
||||||
|
return _res;
|
||||||
|
}
|
||||||
|
|
||||||
|
static PyObject *Qd_LMGetWidthTabHandle(PyObject *_self, PyObject *_args)
|
||||||
|
{
|
||||||
|
PyObject *_res = NULL;
|
||||||
|
Handle _rv;
|
||||||
|
if (!PyArg_ParseTuple(_args, ""))
|
||||||
|
return NULL;
|
||||||
|
_rv = LMGetWidthTabHandle();
|
||||||
|
_res = Py_BuildValue("O&",
|
||||||
|
ResObj_New, _rv);
|
||||||
|
return _res;
|
||||||
|
}
|
||||||
|
|
||||||
|
static PyObject *Qd_LMSetWidthTabHandle(PyObject *_self, PyObject *_args)
|
||||||
|
{
|
||||||
|
PyObject *_res = NULL;
|
||||||
|
Handle value;
|
||||||
|
if (!PyArg_ParseTuple(_args, "O&",
|
||||||
|
ResObj_Convert, &value))
|
||||||
|
return NULL;
|
||||||
|
LMSetWidthTabHandle(value);
|
||||||
|
Py_INCREF(Py_None);
|
||||||
|
_res = Py_None;
|
||||||
|
return _res;
|
||||||
|
}
|
||||||
|
|
||||||
|
static PyObject *Qd_LMGetLastSPExtra(PyObject *_self, PyObject *_args)
|
||||||
|
{
|
||||||
|
PyObject *_res = NULL;
|
||||||
|
SInt32 _rv;
|
||||||
|
if (!PyArg_ParseTuple(_args, ""))
|
||||||
|
return NULL;
|
||||||
|
_rv = LMGetLastSPExtra();
|
||||||
|
_res = Py_BuildValue("l",
|
||||||
|
_rv);
|
||||||
|
return _res;
|
||||||
|
}
|
||||||
|
|
||||||
|
static PyObject *Qd_LMSetLastSPExtra(PyObject *_self, PyObject *_args)
|
||||||
|
{
|
||||||
|
PyObject *_res = NULL;
|
||||||
|
SInt32 value;
|
||||||
|
if (!PyArg_ParseTuple(_args, "l",
|
||||||
|
&value))
|
||||||
|
return NULL;
|
||||||
|
LMSetLastSPExtra(value);
|
||||||
|
Py_INCREF(Py_None);
|
||||||
|
_res = Py_None;
|
||||||
|
return _res;
|
||||||
|
}
|
||||||
|
|
||||||
|
static PyObject *Qd_LMGetLastFOND(PyObject *_self, PyObject *_args)
|
||||||
|
{
|
||||||
|
PyObject *_res = NULL;
|
||||||
|
Handle _rv;
|
||||||
|
if (!PyArg_ParseTuple(_args, ""))
|
||||||
|
return NULL;
|
||||||
|
_rv = LMGetLastFOND();
|
||||||
|
_res = Py_BuildValue("O&",
|
||||||
|
ResObj_New, _rv);
|
||||||
|
return _res;
|
||||||
|
}
|
||||||
|
|
||||||
|
static PyObject *Qd_LMSetLastFOND(PyObject *_self, PyObject *_args)
|
||||||
|
{
|
||||||
|
PyObject *_res = NULL;
|
||||||
|
Handle value;
|
||||||
|
if (!PyArg_ParseTuple(_args, "O&",
|
||||||
|
ResObj_Convert, &value))
|
||||||
|
return NULL;
|
||||||
|
LMSetLastFOND(value);
|
||||||
|
Py_INCREF(Py_None);
|
||||||
|
_res = Py_None;
|
||||||
|
return _res;
|
||||||
|
}
|
||||||
|
|
||||||
|
static PyObject *Qd_LMGetFractEnable(PyObject *_self, PyObject *_args)
|
||||||
|
{
|
||||||
|
PyObject *_res = NULL;
|
||||||
|
UInt8 _rv;
|
||||||
|
if (!PyArg_ParseTuple(_args, ""))
|
||||||
|
return NULL;
|
||||||
|
_rv = LMGetFractEnable();
|
||||||
|
_res = Py_BuildValue("b",
|
||||||
|
_rv);
|
||||||
|
return _res;
|
||||||
|
}
|
||||||
|
|
||||||
|
static PyObject *Qd_LMSetFractEnable(PyObject *_self, PyObject *_args)
|
||||||
|
{
|
||||||
|
PyObject *_res = NULL;
|
||||||
|
UInt8 value;
|
||||||
|
if (!PyArg_ParseTuple(_args, "b",
|
||||||
|
&value))
|
||||||
|
return NULL;
|
||||||
|
LMSetFractEnable(value);
|
||||||
|
Py_INCREF(Py_None);
|
||||||
|
_res = Py_None;
|
||||||
|
return _res;
|
||||||
|
}
|
||||||
|
|
||||||
|
static PyObject *Qd_LMGetTheGDevice(PyObject *_self, PyObject *_args)
|
||||||
|
{
|
||||||
|
PyObject *_res = NULL;
|
||||||
|
GDHandle _rv;
|
||||||
|
if (!PyArg_ParseTuple(_args, ""))
|
||||||
|
return NULL;
|
||||||
|
_rv = LMGetTheGDevice();
|
||||||
|
_res = Py_BuildValue("O&",
|
||||||
|
ResObj_New, _rv);
|
||||||
|
return _res;
|
||||||
|
}
|
||||||
|
|
||||||
|
static PyObject *Qd_LMSetTheGDevice(PyObject *_self, PyObject *_args)
|
||||||
|
{
|
||||||
|
PyObject *_res = NULL;
|
||||||
|
GDHandle value;
|
||||||
|
if (!PyArg_ParseTuple(_args, "O&",
|
||||||
|
ResObj_Convert, &value))
|
||||||
|
return NULL;
|
||||||
|
LMSetTheGDevice(value);
|
||||||
|
Py_INCREF(Py_None);
|
||||||
|
_res = Py_None;
|
||||||
|
return _res;
|
||||||
|
}
|
||||||
|
|
||||||
|
static PyObject *Qd_LMGetHiliteRGB(PyObject *_self, PyObject *_args)
|
||||||
|
{
|
||||||
|
PyObject *_res = NULL;
|
||||||
|
RGBColor hiliteRGBValue;
|
||||||
|
if (!PyArg_ParseTuple(_args, ""))
|
||||||
|
return NULL;
|
||||||
|
LMGetHiliteRGB(&hiliteRGBValue);
|
||||||
|
_res = Py_BuildValue("O&",
|
||||||
|
QdRGB_New, &hiliteRGBValue);
|
||||||
|
return _res;
|
||||||
|
}
|
||||||
|
|
||||||
|
static PyObject *Qd_LMSetHiliteRGB(PyObject *_self, PyObject *_args)
|
||||||
|
{
|
||||||
|
PyObject *_res = NULL;
|
||||||
|
RGBColor hiliteRGBValue;
|
||||||
|
if (!PyArg_ParseTuple(_args, "O&",
|
||||||
|
QdRGB_Convert, &hiliteRGBValue))
|
||||||
|
return NULL;
|
||||||
|
LMSetHiliteRGB(&hiliteRGBValue);
|
||||||
|
Py_INCREF(Py_None);
|
||||||
|
_res = Py_None;
|
||||||
|
return _res;
|
||||||
|
}
|
||||||
|
|
||||||
|
static PyObject *Qd_LMGetCursorNew(PyObject *_self, PyObject *_args)
|
||||||
|
{
|
||||||
|
PyObject *_res = NULL;
|
||||||
|
Boolean _rv;
|
||||||
|
if (!PyArg_ParseTuple(_args, ""))
|
||||||
|
return NULL;
|
||||||
|
_rv = LMGetCursorNew();
|
||||||
|
_res = Py_BuildValue("b",
|
||||||
|
_rv);
|
||||||
|
return _res;
|
||||||
|
}
|
||||||
|
|
||||||
|
static PyObject *Qd_LMSetCursorNew(PyObject *_self, PyObject *_args)
|
||||||
|
{
|
||||||
|
PyObject *_res = NULL;
|
||||||
|
Boolean value;
|
||||||
|
if (!PyArg_ParseTuple(_args, "b",
|
||||||
|
&value))
|
||||||
|
return NULL;
|
||||||
|
LMSetCursorNew(value);
|
||||||
|
Py_INCREF(Py_None);
|
||||||
|
_res = Py_None;
|
||||||
|
return _res;
|
||||||
|
}
|
||||||
|
|
||||||
static PyObject *Qd_TextFont(PyObject *_self, PyObject *_args)
|
static PyObject *Qd_TextFont(PyObject *_self, PyObject *_args)
|
||||||
{
|
{
|
||||||
PyObject *_res = NULL;
|
PyObject *_res = NULL;
|
||||||
|
@ -4536,6 +5001,26 @@ static PyObject *Qd_CharExtra(PyObject *_self, PyObject *_args)
|
||||||
return _res;
|
return _res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static PyObject *Qd_TruncString(PyObject *_self, PyObject *_args)
|
||||||
|
{
|
||||||
|
PyObject *_res = NULL;
|
||||||
|
short _rv;
|
||||||
|
short width;
|
||||||
|
Str255 theString;
|
||||||
|
TruncCode truncWhere;
|
||||||
|
if (!PyArg_ParseTuple(_args, "hO&h",
|
||||||
|
&width,
|
||||||
|
PyMac_GetStr255, theString,
|
||||||
|
&truncWhere))
|
||||||
|
return NULL;
|
||||||
|
_rv = TruncString(width,
|
||||||
|
theString,
|
||||||
|
truncWhere);
|
||||||
|
_res = Py_BuildValue("h",
|
||||||
|
_rv);
|
||||||
|
return _res;
|
||||||
|
}
|
||||||
|
|
||||||
static PyObject *Qd_SetPort(PyObject *_self, PyObject *_args)
|
static PyObject *Qd_SetPort(PyObject *_self, PyObject *_args)
|
||||||
{
|
{
|
||||||
PyObject *_res = NULL;
|
PyObject *_res = NULL;
|
||||||
|
@ -5169,6 +5654,11 @@ static PyMethodDef Qd_methods[] = {
|
||||||
"(RgnHandle dstRgn) -> None"},
|
"(RgnHandle dstRgn) -> None"},
|
||||||
{"BitMapToRegion", (PyCFunction)Qd_BitMapToRegion, 1,
|
{"BitMapToRegion", (PyCFunction)Qd_BitMapToRegion, 1,
|
||||||
"(RgnHandle region, BitMapPtr bMap) -> None"},
|
"(RgnHandle region, BitMapPtr bMap) -> None"},
|
||||||
|
|
||||||
|
#if TARGET_API_MAC_CARBON
|
||||||
|
{"RgnToHandle", (PyCFunction)Qd_RgnToHandle, 1,
|
||||||
|
"(RgnHandle region, Handle flattenedRgnDataHdl) -> None"},
|
||||||
|
#endif
|
||||||
{"DisposeRgn", (PyCFunction)Qd_DisposeRgn, 1,
|
{"DisposeRgn", (PyCFunction)Qd_DisposeRgn, 1,
|
||||||
"(RgnHandle rgn) -> None"},
|
"(RgnHandle rgn) -> None"},
|
||||||
{"MacCopyRgn", (PyCFunction)Qd_MacCopyRgn, 1,
|
{"MacCopyRgn", (PyCFunction)Qd_MacCopyRgn, 1,
|
||||||
|
@ -5403,6 +5893,11 @@ static PyMethodDef Qd_methods[] = {
|
||||||
"(short angle) -> (Fixed _rv)"},
|
"(short angle) -> (Fixed _rv)"},
|
||||||
{"AngleFromSlope", (PyCFunction)Qd_AngleFromSlope, 1,
|
{"AngleFromSlope", (PyCFunction)Qd_AngleFromSlope, 1,
|
||||||
"(Fixed slope) -> (short _rv)"},
|
"(Fixed slope) -> (short _rv)"},
|
||||||
|
|
||||||
|
#if TARGET_API_MAC_CARBON
|
||||||
|
{"IsValidPort", (PyCFunction)Qd_IsValidPort, 1,
|
||||||
|
"(CGrafPtr port) -> (Boolean _rv)"},
|
||||||
|
#endif
|
||||||
{"GetPortPixMap", (PyCFunction)Qd_GetPortPixMap, 1,
|
{"GetPortPixMap", (PyCFunction)Qd_GetPortPixMap, 1,
|
||||||
"(CGrafPtr port) -> (PixMapHandle _rv)"},
|
"(CGrafPtr port) -> (PixMapHandle _rv)"},
|
||||||
{"GetPortBitMapForCopyBits", (PyCFunction)Qd_GetPortBitMapForCopyBits, 1,
|
{"GetPortBitMapForCopyBits", (PyCFunction)Qd_GetPortBitMapForCopyBits, 1,
|
||||||
|
@ -5454,6 +5949,11 @@ static PyMethodDef Qd_methods[] = {
|
||||||
{"IsPortPictureBeingDefined", (PyCFunction)Qd_IsPortPictureBeingDefined, 1,
|
{"IsPortPictureBeingDefined", (PyCFunction)Qd_IsPortPictureBeingDefined, 1,
|
||||||
"(CGrafPtr port) -> (Boolean _rv)"},
|
"(CGrafPtr port) -> (Boolean _rv)"},
|
||||||
|
|
||||||
|
#if TARGET_API_MAC_CARBON
|
||||||
|
{"IsPortPolyBeingDefined", (PyCFunction)Qd_IsPortPolyBeingDefined, 1,
|
||||||
|
"(CGrafPtr port) -> (Boolean _rv)"},
|
||||||
|
#endif
|
||||||
|
|
||||||
#if TARGET_API_MAC_CARBON
|
#if TARGET_API_MAC_CARBON
|
||||||
{"IsPortOffscreen", (PyCFunction)Qd_IsPortOffscreen, 1,
|
{"IsPortOffscreen", (PyCFunction)Qd_IsPortOffscreen, 1,
|
||||||
"(CGrafPtr port) -> (Boolean _rv)"},
|
"(CGrafPtr port) -> (Boolean _rv)"},
|
||||||
|
@ -5473,6 +5973,8 @@ static PyMethodDef Qd_methods[] = {
|
||||||
"(CGrafPtr port, RgnHandle clipRgn) -> None"},
|
"(CGrafPtr port, RgnHandle clipRgn) -> None"},
|
||||||
{"SetPortPenPixPat", (PyCFunction)Qd_SetPortPenPixPat, 1,
|
{"SetPortPenPixPat", (PyCFunction)Qd_SetPortPenPixPat, 1,
|
||||||
"(CGrafPtr port, PixPatHandle penPattern) -> None"},
|
"(CGrafPtr port, PixPatHandle penPattern) -> None"},
|
||||||
|
{"SetPortFillPixPat", (PyCFunction)Qd_SetPortFillPixPat, 1,
|
||||||
|
"(CGrafPtr port, PixPatHandle penPattern) -> None"},
|
||||||
{"SetPortBackPixPat", (PyCFunction)Qd_SetPortBackPixPat, 1,
|
{"SetPortBackPixPat", (PyCFunction)Qd_SetPortBackPixPat, 1,
|
||||||
"(CGrafPtr port, PixPatHandle backPattern) -> None"},
|
"(CGrafPtr port, PixPatHandle backPattern) -> None"},
|
||||||
{"SetPortPenSize", (PyCFunction)Qd_SetPortPenSize, 1,
|
{"SetPortPenSize", (PyCFunction)Qd_SetPortPenSize, 1,
|
||||||
|
@ -5535,6 +6037,72 @@ static PyMethodDef Qd_methods[] = {
|
||||||
"(CGrafPtr port) -> (Boolean _rv)"},
|
"(CGrafPtr port) -> (Boolean _rv)"},
|
||||||
{"QDFlushPortBuffer", (PyCFunction)Qd_QDFlushPortBuffer, 1,
|
{"QDFlushPortBuffer", (PyCFunction)Qd_QDFlushPortBuffer, 1,
|
||||||
"(CGrafPtr port, RgnHandle region) -> None"},
|
"(CGrafPtr port, RgnHandle region) -> None"},
|
||||||
|
|
||||||
|
#if TARGET_API_MAC_CARBON
|
||||||
|
{"QDGetDirtyRegion", (PyCFunction)Qd_QDGetDirtyRegion, 1,
|
||||||
|
"(CGrafPtr port, RgnHandle rgn) -> None"},
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if TARGET_API_MAC_CARBON
|
||||||
|
{"QDSetDirtyRegion", (PyCFunction)Qd_QDSetDirtyRegion, 1,
|
||||||
|
"(CGrafPtr port, RgnHandle rgn) -> None"},
|
||||||
|
#endif
|
||||||
|
{"LMGetScrVRes", (PyCFunction)Qd_LMGetScrVRes, 1,
|
||||||
|
"() -> (SInt16 _rv)"},
|
||||||
|
{"LMSetScrVRes", (PyCFunction)Qd_LMSetScrVRes, 1,
|
||||||
|
"(SInt16 value) -> None"},
|
||||||
|
{"LMGetScrHRes", (PyCFunction)Qd_LMGetScrHRes, 1,
|
||||||
|
"() -> (SInt16 _rv)"},
|
||||||
|
{"LMSetScrHRes", (PyCFunction)Qd_LMSetScrHRes, 1,
|
||||||
|
"(SInt16 value) -> None"},
|
||||||
|
{"LMGetMainDevice", (PyCFunction)Qd_LMGetMainDevice, 1,
|
||||||
|
"() -> (GDHandle _rv)"},
|
||||||
|
{"LMSetMainDevice", (PyCFunction)Qd_LMSetMainDevice, 1,
|
||||||
|
"(GDHandle value) -> None"},
|
||||||
|
{"LMGetDeviceList", (PyCFunction)Qd_LMGetDeviceList, 1,
|
||||||
|
"() -> (GDHandle _rv)"},
|
||||||
|
{"LMSetDeviceList", (PyCFunction)Qd_LMSetDeviceList, 1,
|
||||||
|
"(GDHandle value) -> None"},
|
||||||
|
{"LMGetQDColors", (PyCFunction)Qd_LMGetQDColors, 1,
|
||||||
|
"() -> (Handle _rv)"},
|
||||||
|
{"LMSetQDColors", (PyCFunction)Qd_LMSetQDColors, 1,
|
||||||
|
"(Handle value) -> None"},
|
||||||
|
{"LMGetWidthListHand", (PyCFunction)Qd_LMGetWidthListHand, 1,
|
||||||
|
"() -> (Handle _rv)"},
|
||||||
|
{"LMSetWidthListHand", (PyCFunction)Qd_LMSetWidthListHand, 1,
|
||||||
|
"(Handle value) -> None"},
|
||||||
|
{"LMGetHiliteMode", (PyCFunction)Qd_LMGetHiliteMode, 1,
|
||||||
|
"() -> (UInt8 _rv)"},
|
||||||
|
{"LMSetHiliteMode", (PyCFunction)Qd_LMSetHiliteMode, 1,
|
||||||
|
"(UInt8 value) -> None"},
|
||||||
|
{"LMGetWidthTabHandle", (PyCFunction)Qd_LMGetWidthTabHandle, 1,
|
||||||
|
"() -> (Handle _rv)"},
|
||||||
|
{"LMSetWidthTabHandle", (PyCFunction)Qd_LMSetWidthTabHandle, 1,
|
||||||
|
"(Handle value) -> None"},
|
||||||
|
{"LMGetLastSPExtra", (PyCFunction)Qd_LMGetLastSPExtra, 1,
|
||||||
|
"() -> (SInt32 _rv)"},
|
||||||
|
{"LMSetLastSPExtra", (PyCFunction)Qd_LMSetLastSPExtra, 1,
|
||||||
|
"(SInt32 value) -> None"},
|
||||||
|
{"LMGetLastFOND", (PyCFunction)Qd_LMGetLastFOND, 1,
|
||||||
|
"() -> (Handle _rv)"},
|
||||||
|
{"LMSetLastFOND", (PyCFunction)Qd_LMSetLastFOND, 1,
|
||||||
|
"(Handle value) -> None"},
|
||||||
|
{"LMGetFractEnable", (PyCFunction)Qd_LMGetFractEnable, 1,
|
||||||
|
"() -> (UInt8 _rv)"},
|
||||||
|
{"LMSetFractEnable", (PyCFunction)Qd_LMSetFractEnable, 1,
|
||||||
|
"(UInt8 value) -> None"},
|
||||||
|
{"LMGetTheGDevice", (PyCFunction)Qd_LMGetTheGDevice, 1,
|
||||||
|
"() -> (GDHandle _rv)"},
|
||||||
|
{"LMSetTheGDevice", (PyCFunction)Qd_LMSetTheGDevice, 1,
|
||||||
|
"(GDHandle value) -> None"},
|
||||||
|
{"LMGetHiliteRGB", (PyCFunction)Qd_LMGetHiliteRGB, 1,
|
||||||
|
"() -> (RGBColor hiliteRGBValue)"},
|
||||||
|
{"LMSetHiliteRGB", (PyCFunction)Qd_LMSetHiliteRGB, 1,
|
||||||
|
"(RGBColor hiliteRGBValue) -> None"},
|
||||||
|
{"LMGetCursorNew", (PyCFunction)Qd_LMGetCursorNew, 1,
|
||||||
|
"() -> (Boolean _rv)"},
|
||||||
|
{"LMSetCursorNew", (PyCFunction)Qd_LMSetCursorNew, 1,
|
||||||
|
"(Boolean value) -> None"},
|
||||||
{"TextFont", (PyCFunction)Qd_TextFont, 1,
|
{"TextFont", (PyCFunction)Qd_TextFont, 1,
|
||||||
"(short font) -> None"},
|
"(short font) -> None"},
|
||||||
{"TextFace", (PyCFunction)Qd_TextFace, 1,
|
{"TextFace", (PyCFunction)Qd_TextFace, 1,
|
||||||
|
@ -5561,6 +6129,8 @@ static PyMethodDef Qd_methods[] = {
|
||||||
"() -> (FontInfo info)"},
|
"() -> (FontInfo info)"},
|
||||||
{"CharExtra", (PyCFunction)Qd_CharExtra, 1,
|
{"CharExtra", (PyCFunction)Qd_CharExtra, 1,
|
||||||
"(Fixed extra) -> None"},
|
"(Fixed extra) -> None"},
|
||||||
|
{"TruncString", (PyCFunction)Qd_TruncString, 1,
|
||||||
|
"(short width, Str255 theString, TruncCode truncWhere) -> (short _rv)"},
|
||||||
{"SetPort", (PyCFunction)Qd_SetPort, 1,
|
{"SetPort", (PyCFunction)Qd_SetPort, 1,
|
||||||
"(GrafPtr thePort) -> None"},
|
"(GrafPtr thePort) -> None"},
|
||||||
{"GetCursor", (PyCFunction)Qd_GetCursor, 1,
|
{"GetCursor", (PyCFunction)Qd_GetCursor, 1,
|
||||||
|
|
|
@ -122,6 +122,11 @@ extend = 0x40
|
||||||
'CreateNewPort',
|
'CreateNewPort',
|
||||||
'DisposePort',
|
'DisposePort',
|
||||||
'SetQDError',
|
'SetQDError',
|
||||||
|
'IsPortPolyBeingDefined',
|
||||||
|
'QDSetDirtyRegion',
|
||||||
|
'QDGetDirtyRegion',
|
||||||
|
'IsValidPort',
|
||||||
|
'RgnToHandle',
|
||||||
])]
|
])]
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -63,6 +63,7 @@ Pattern = StructOutputBufferType('Pattern')
|
||||||
Pattern_ptr = StructInputBufferType('Pattern')
|
Pattern_ptr = StructInputBufferType('Pattern')
|
||||||
PenState = StructOutputBufferType('PenState')
|
PenState = StructOutputBufferType('PenState')
|
||||||
PenState_ptr = StructInputBufferType('PenState')
|
PenState_ptr = StructInputBufferType('PenState')
|
||||||
|
TruncCode = Type("TruncCode", "h")
|
||||||
|
|
||||||
includestuff = includestuff + """
|
includestuff = includestuff + """
|
||||||
#ifdef WITHOUT_FRAMEWORKS
|
#ifdef WITHOUT_FRAMEWORKS
|
||||||
|
|
|
@ -5,8 +5,12 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
#include "pywintoolbox.h"
|
||||||
|
#else
|
||||||
#include "macglue.h"
|
#include "macglue.h"
|
||||||
#include "pymactoolbox.h"
|
#include "pymactoolbox.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Macro to test whether a weak-loaded CFM function exists */
|
/* Macro to test whether a weak-loaded CFM function exists */
|
||||||
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
|
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
|
||||||
|
|
|
@ -5,8 +5,12 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
#include "pywintoolbox.h"
|
||||||
|
#else
|
||||||
#include "macglue.h"
|
#include "macglue.h"
|
||||||
#include "pymactoolbox.h"
|
#include "pymactoolbox.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Macro to test whether a weak-loaded CFM function exists */
|
/* Macro to test whether a weak-loaded CFM function exists */
|
||||||
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
|
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
|
||||||
|
@ -822,6 +826,36 @@ static PyObject *MovieCtlObj_MCGetInterfaceElement(MovieControllerObject *_self,
|
||||||
return _res;
|
return _res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static PyObject *MovieCtlObj_MCAddMovieSegment(MovieControllerObject *_self, PyObject *_args)
|
||||||
|
{
|
||||||
|
PyObject *_res = NULL;
|
||||||
|
ComponentResult _rv;
|
||||||
|
Movie srcMovie;
|
||||||
|
Boolean scaled;
|
||||||
|
if (!PyArg_ParseTuple(_args, "O&b",
|
||||||
|
MovieObj_Convert, &srcMovie,
|
||||||
|
&scaled))
|
||||||
|
return NULL;
|
||||||
|
_rv = MCAddMovieSegment(_self->ob_itself,
|
||||||
|
srcMovie,
|
||||||
|
scaled);
|
||||||
|
_res = Py_BuildValue("l",
|
||||||
|
_rv);
|
||||||
|
return _res;
|
||||||
|
}
|
||||||
|
|
||||||
|
static PyObject *MovieCtlObj_MCTrimMovieSegment(MovieControllerObject *_self, PyObject *_args)
|
||||||
|
{
|
||||||
|
PyObject *_res = NULL;
|
||||||
|
ComponentResult _rv;
|
||||||
|
if (!PyArg_ParseTuple(_args, ""))
|
||||||
|
return NULL;
|
||||||
|
_rv = MCTrimMovieSegment(_self->ob_itself);
|
||||||
|
_res = Py_BuildValue("l",
|
||||||
|
_rv);
|
||||||
|
return _res;
|
||||||
|
}
|
||||||
|
|
||||||
static PyMethodDef MovieCtlObj_methods[] = {
|
static PyMethodDef MovieCtlObj_methods[] = {
|
||||||
{"MCSetMovie", (PyCFunction)MovieCtlObj_MCSetMovie, 1,
|
{"MCSetMovie", (PyCFunction)MovieCtlObj_MCSetMovie, 1,
|
||||||
"(Movie theMovie, WindowPtr movieWindow, Point where) -> (ComponentResult _rv)"},
|
"(Movie theMovie, WindowPtr movieWindow, Point where) -> (ComponentResult _rv)"},
|
||||||
|
@ -911,6 +945,10 @@ static PyMethodDef MovieCtlObj_methods[] = {
|
||||||
"(WindowPtr w, Point where, long modifiers) -> (ComponentResult _rv)"},
|
"(WindowPtr w, Point where, long modifiers) -> (ComponentResult _rv)"},
|
||||||
{"MCGetInterfaceElement", (PyCFunction)MovieCtlObj_MCGetInterfaceElement, 1,
|
{"MCGetInterfaceElement", (PyCFunction)MovieCtlObj_MCGetInterfaceElement, 1,
|
||||||
"(MCInterfaceElement whichElement, void * element) -> (ComponentResult _rv)"},
|
"(MCInterfaceElement whichElement, void * element) -> (ComponentResult _rv)"},
|
||||||
|
{"MCAddMovieSegment", (PyCFunction)MovieCtlObj_MCAddMovieSegment, 1,
|
||||||
|
"(Movie srcMovie, Boolean scaled) -> (ComponentResult _rv)"},
|
||||||
|
{"MCTrimMovieSegment", (PyCFunction)MovieCtlObj_MCTrimMovieSegment, 1,
|
||||||
|
"() -> (ComponentResult _rv)"},
|
||||||
{NULL, NULL, 0}
|
{NULL, NULL, 0}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -3311,6 +3349,27 @@ static PyObject *TrackObj_AddEmptyTrackToMovie(TrackObject *_self, PyObject *_ar
|
||||||
return _res;
|
return _res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static PyObject *TrackObj_AddClonedTrackToMovie(TrackObject *_self, PyObject *_args)
|
||||||
|
{
|
||||||
|
PyObject *_res = NULL;
|
||||||
|
OSErr _err;
|
||||||
|
Movie dstMovie;
|
||||||
|
long flags;
|
||||||
|
Track dstTrack;
|
||||||
|
if (!PyArg_ParseTuple(_args, "O&l",
|
||||||
|
MovieObj_Convert, &dstMovie,
|
||||||
|
&flags))
|
||||||
|
return NULL;
|
||||||
|
_err = AddClonedTrackToMovie(_self->ob_itself,
|
||||||
|
dstMovie,
|
||||||
|
flags,
|
||||||
|
&dstTrack);
|
||||||
|
if (_err != noErr) return PyMac_Error(_err);
|
||||||
|
_res = Py_BuildValue("O&",
|
||||||
|
TrackObj_New, dstTrack);
|
||||||
|
return _res;
|
||||||
|
}
|
||||||
|
|
||||||
static PyObject *TrackObj_AddTrackReference(TrackObject *_self, PyObject *_args)
|
static PyObject *TrackObj_AddTrackReference(TrackObject *_self, PyObject *_args)
|
||||||
{
|
{
|
||||||
PyObject *_res = NULL;
|
PyObject *_res = NULL;
|
||||||
|
@ -3673,6 +3732,8 @@ static PyMethodDef TrackObj_methods[] = {
|
||||||
"(Track dstTrack) -> None"},
|
"(Track dstTrack) -> None"},
|
||||||
{"AddEmptyTrackToMovie", (PyCFunction)TrackObj_AddEmptyTrackToMovie, 1,
|
{"AddEmptyTrackToMovie", (PyCFunction)TrackObj_AddEmptyTrackToMovie, 1,
|
||||||
"(Movie dstMovie, Handle dataRef, OSType dataRefType) -> (Track dstTrack)"},
|
"(Movie dstMovie, Handle dataRef, OSType dataRefType) -> (Track dstTrack)"},
|
||||||
|
{"AddClonedTrackToMovie", (PyCFunction)TrackObj_AddClonedTrackToMovie, 1,
|
||||||
|
"(Movie dstMovie, long flags) -> (Track dstTrack)"},
|
||||||
{"AddTrackReference", (PyCFunction)TrackObj_AddTrackReference, 1,
|
{"AddTrackReference", (PyCFunction)TrackObj_AddTrackReference, 1,
|
||||||
"(Track refTrack, OSType refType) -> (long addedIndex)"},
|
"(Track refTrack, OSType refType) -> (long addedIndex)"},
|
||||||
{"DeleteTrackReference", (PyCFunction)TrackObj_DeleteTrackReference, 1,
|
{"DeleteTrackReference", (PyCFunction)TrackObj_DeleteTrackReference, 1,
|
||||||
|
@ -4252,6 +4313,20 @@ static PyObject *MovieObj_GetMovieBoundsRgn(MovieObject *_self, PyObject *_args)
|
||||||
return _res;
|
return _res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static PyObject *MovieObj_SetMovieVideoOutput(MovieObject *_self, PyObject *_args)
|
||||||
|
{
|
||||||
|
PyObject *_res = NULL;
|
||||||
|
ComponentInstance vout;
|
||||||
|
if (!PyArg_ParseTuple(_args, "O&",
|
||||||
|
CmpInstObj_Convert, &vout))
|
||||||
|
return NULL;
|
||||||
|
SetMovieVideoOutput(_self->ob_itself,
|
||||||
|
vout);
|
||||||
|
Py_INCREF(Py_None);
|
||||||
|
_res = Py_None;
|
||||||
|
return _res;
|
||||||
|
}
|
||||||
|
|
||||||
static PyObject *MovieObj_PutMovieIntoHandle(MovieObject *_self, PyObject *_args)
|
static PyObject *MovieObj_PutMovieIntoHandle(MovieObject *_self, PyObject *_args)
|
||||||
{
|
{
|
||||||
PyObject *_res = NULL;
|
PyObject *_res = NULL;
|
||||||
|
@ -5614,6 +5689,8 @@ static PyMethodDef MovieObj_methods[] = {
|
||||||
"() -> (RgnHandle _rv)"},
|
"() -> (RgnHandle _rv)"},
|
||||||
{"GetMovieBoundsRgn", (PyCFunction)MovieObj_GetMovieBoundsRgn, 1,
|
{"GetMovieBoundsRgn", (PyCFunction)MovieObj_GetMovieBoundsRgn, 1,
|
||||||
"() -> (RgnHandle _rv)"},
|
"() -> (RgnHandle _rv)"},
|
||||||
|
{"SetMovieVideoOutput", (PyCFunction)MovieObj_SetMovieVideoOutput, 1,
|
||||||
|
"(ComponentInstance vout) -> None"},
|
||||||
{"PutMovieIntoHandle", (PyCFunction)MovieObj_PutMovieIntoHandle, 1,
|
{"PutMovieIntoHandle", (PyCFunction)MovieObj_PutMovieIntoHandle, 1,
|
||||||
"(Handle publicMovie) -> None"},
|
"(Handle publicMovie) -> None"},
|
||||||
{"PutMovieIntoDataFork", (PyCFunction)MovieObj_PutMovieIntoDataFork, 1,
|
{"PutMovieIntoDataFork", (PyCFunction)MovieObj_PutMovieIntoDataFork, 1,
|
||||||
|
@ -6027,6 +6104,32 @@ static PyObject *Qt_GetMovieImporterForDataRef(PyObject *_self, PyObject *_args)
|
||||||
return _res;
|
return _res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static PyObject *Qt_QTGetMIMETypeInfo(PyObject *_self, PyObject *_args)
|
||||||
|
{
|
||||||
|
PyObject *_res = NULL;
|
||||||
|
OSErr _err;
|
||||||
|
char* mimeStringStart;
|
||||||
|
short mimeStringLength;
|
||||||
|
OSType infoSelector;
|
||||||
|
void * infoDataPtr;
|
||||||
|
long infoDataSize;
|
||||||
|
if (!PyArg_ParseTuple(_args, "shO&s",
|
||||||
|
&mimeStringStart,
|
||||||
|
&mimeStringLength,
|
||||||
|
PyMac_GetOSType, &infoSelector,
|
||||||
|
&infoDataPtr))
|
||||||
|
return NULL;
|
||||||
|
_err = QTGetMIMETypeInfo(mimeStringStart,
|
||||||
|
mimeStringLength,
|
||||||
|
infoSelector,
|
||||||
|
infoDataPtr,
|
||||||
|
&infoDataSize);
|
||||||
|
if (_err != noErr) return PyMac_Error(_err);
|
||||||
|
_res = Py_BuildValue("l",
|
||||||
|
infoDataSize);
|
||||||
|
return _res;
|
||||||
|
}
|
||||||
|
|
||||||
static PyObject *Qt_TrackTimeToMediaTime(PyObject *_self, PyObject *_args)
|
static PyObject *Qt_TrackTimeToMediaTime(PyObject *_self, PyObject *_args)
|
||||||
{
|
{
|
||||||
PyObject *_res = NULL;
|
PyObject *_res = NULL;
|
||||||
|
@ -6331,6 +6434,67 @@ static PyObject *Qt_CreateShortcutMovieFile(PyObject *_self, PyObject *_args)
|
||||||
return _res;
|
return _res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static PyObject *Qt_CanQuickTimeOpenFile(PyObject *_self, PyObject *_args)
|
||||||
|
{
|
||||||
|
PyObject *_res = NULL;
|
||||||
|
OSErr _err;
|
||||||
|
FSSpec fileSpec;
|
||||||
|
OSType fileType;
|
||||||
|
OSType fileNameExtension;
|
||||||
|
Boolean outCanOpenWithGraphicsImporter;
|
||||||
|
Boolean outCanOpenAsMovie;
|
||||||
|
Boolean outPreferGraphicsImporter;
|
||||||
|
UInt32 inFlags;
|
||||||
|
if (!PyArg_ParseTuple(_args, "O&O&O&l",
|
||||||
|
PyMac_GetFSSpec, &fileSpec,
|
||||||
|
PyMac_GetOSType, &fileType,
|
||||||
|
PyMac_GetOSType, &fileNameExtension,
|
||||||
|
&inFlags))
|
||||||
|
return NULL;
|
||||||
|
_err = CanQuickTimeOpenFile(&fileSpec,
|
||||||
|
fileType,
|
||||||
|
fileNameExtension,
|
||||||
|
&outCanOpenWithGraphicsImporter,
|
||||||
|
&outCanOpenAsMovie,
|
||||||
|
&outPreferGraphicsImporter,
|
||||||
|
inFlags);
|
||||||
|
if (_err != noErr) return PyMac_Error(_err);
|
||||||
|
_res = Py_BuildValue("bbb",
|
||||||
|
outCanOpenWithGraphicsImporter,
|
||||||
|
outCanOpenAsMovie,
|
||||||
|
outPreferGraphicsImporter);
|
||||||
|
return _res;
|
||||||
|
}
|
||||||
|
|
||||||
|
static PyObject *Qt_CanQuickTimeOpenDataRef(PyObject *_self, PyObject *_args)
|
||||||
|
{
|
||||||
|
PyObject *_res = NULL;
|
||||||
|
OSErr _err;
|
||||||
|
Handle dataRef;
|
||||||
|
OSType dataRefType;
|
||||||
|
Boolean outCanOpenWithGraphicsImporter;
|
||||||
|
Boolean outCanOpenAsMovie;
|
||||||
|
Boolean outPreferGraphicsImporter;
|
||||||
|
UInt32 inFlags;
|
||||||
|
if (!PyArg_ParseTuple(_args, "O&O&l",
|
||||||
|
ResObj_Convert, &dataRef,
|
||||||
|
PyMac_GetOSType, &dataRefType,
|
||||||
|
&inFlags))
|
||||||
|
return NULL;
|
||||||
|
_err = CanQuickTimeOpenDataRef(dataRef,
|
||||||
|
dataRefType,
|
||||||
|
&outCanOpenWithGraphicsImporter,
|
||||||
|
&outCanOpenAsMovie,
|
||||||
|
&outPreferGraphicsImporter,
|
||||||
|
inFlags);
|
||||||
|
if (_err != noErr) return PyMac_Error(_err);
|
||||||
|
_res = Py_BuildValue("bbb",
|
||||||
|
outCanOpenWithGraphicsImporter,
|
||||||
|
outCanOpenAsMovie,
|
||||||
|
outPreferGraphicsImporter);
|
||||||
|
return _res;
|
||||||
|
}
|
||||||
|
|
||||||
static PyObject *Qt_NewMovieFromScrap(PyObject *_self, PyObject *_args)
|
static PyObject *Qt_NewMovieFromScrap(PyObject *_self, PyObject *_args)
|
||||||
{
|
{
|
||||||
PyObject *_res = NULL;
|
PyObject *_res = NULL;
|
||||||
|
@ -6909,6 +7073,32 @@ static PyObject *Qt_TextMediaRawIdle(PyObject *_self, PyObject *_args)
|
||||||
return _res;
|
return _res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static PyObject *Qt_TextMediaGetTextProperty(PyObject *_self, PyObject *_args)
|
||||||
|
{
|
||||||
|
PyObject *_res = NULL;
|
||||||
|
ComponentResult _rv;
|
||||||
|
MediaHandler mh;
|
||||||
|
TimeValue atMediaTime;
|
||||||
|
long propertyType;
|
||||||
|
void * data;
|
||||||
|
long dataSize;
|
||||||
|
if (!PyArg_ParseTuple(_args, "O&llsl",
|
||||||
|
CmpInstObj_Convert, &mh,
|
||||||
|
&atMediaTime,
|
||||||
|
&propertyType,
|
||||||
|
&data,
|
||||||
|
&dataSize))
|
||||||
|
return NULL;
|
||||||
|
_rv = TextMediaGetTextProperty(mh,
|
||||||
|
atMediaTime,
|
||||||
|
propertyType,
|
||||||
|
data,
|
||||||
|
dataSize);
|
||||||
|
_res = Py_BuildValue("l",
|
||||||
|
_rv);
|
||||||
|
return _res;
|
||||||
|
}
|
||||||
|
|
||||||
static PyObject *Qt_TextMediaFindNextText(PyObject *_self, PyObject *_args)
|
static PyObject *Qt_TextMediaFindNextText(PyObject *_self, PyObject *_args)
|
||||||
{
|
{
|
||||||
PyObject *_res = NULL;
|
PyObject *_res = NULL;
|
||||||
|
@ -7617,6 +7807,95 @@ static PyObject *Qt_FlashMediaFrameLabelToMovieTime(PyObject *_self, PyObject *_
|
||||||
return _res;
|
return _res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static PyObject *Qt_FlashMediaGetFlashVariable(PyObject *_self, PyObject *_args)
|
||||||
|
{
|
||||||
|
PyObject *_res = NULL;
|
||||||
|
ComponentResult _rv;
|
||||||
|
MediaHandler mh;
|
||||||
|
char path;
|
||||||
|
char name;
|
||||||
|
Handle theVariableCStringOut;
|
||||||
|
if (!PyArg_ParseTuple(_args, "O&",
|
||||||
|
CmpInstObj_Convert, &mh))
|
||||||
|
return NULL;
|
||||||
|
_rv = FlashMediaGetFlashVariable(mh,
|
||||||
|
&path,
|
||||||
|
&name,
|
||||||
|
&theVariableCStringOut);
|
||||||
|
_res = Py_BuildValue("lccO&",
|
||||||
|
_rv,
|
||||||
|
path,
|
||||||
|
name,
|
||||||
|
ResObj_New, theVariableCStringOut);
|
||||||
|
return _res;
|
||||||
|
}
|
||||||
|
|
||||||
|
static PyObject *Qt_FlashMediaSetFlashVariable(PyObject *_self, PyObject *_args)
|
||||||
|
{
|
||||||
|
PyObject *_res = NULL;
|
||||||
|
ComponentResult _rv;
|
||||||
|
MediaHandler mh;
|
||||||
|
char path;
|
||||||
|
char name;
|
||||||
|
char value;
|
||||||
|
Boolean updateFocus;
|
||||||
|
if (!PyArg_ParseTuple(_args, "O&b",
|
||||||
|
CmpInstObj_Convert, &mh,
|
||||||
|
&updateFocus))
|
||||||
|
return NULL;
|
||||||
|
_rv = FlashMediaSetFlashVariable(mh,
|
||||||
|
&path,
|
||||||
|
&name,
|
||||||
|
&value,
|
||||||
|
updateFocus);
|
||||||
|
_res = Py_BuildValue("lccc",
|
||||||
|
_rv,
|
||||||
|
path,
|
||||||
|
name,
|
||||||
|
value);
|
||||||
|
return _res;
|
||||||
|
}
|
||||||
|
|
||||||
|
static PyObject *Qt_FlashMediaDoButtonActions(PyObject *_self, PyObject *_args)
|
||||||
|
{
|
||||||
|
PyObject *_res = NULL;
|
||||||
|
ComponentResult _rv;
|
||||||
|
MediaHandler mh;
|
||||||
|
char path;
|
||||||
|
long buttonID;
|
||||||
|
long transition;
|
||||||
|
if (!PyArg_ParseTuple(_args, "O&ll",
|
||||||
|
CmpInstObj_Convert, &mh,
|
||||||
|
&buttonID,
|
||||||
|
&transition))
|
||||||
|
return NULL;
|
||||||
|
_rv = FlashMediaDoButtonActions(mh,
|
||||||
|
&path,
|
||||||
|
buttonID,
|
||||||
|
transition);
|
||||||
|
_res = Py_BuildValue("lc",
|
||||||
|
_rv,
|
||||||
|
path);
|
||||||
|
return _res;
|
||||||
|
}
|
||||||
|
|
||||||
|
static PyObject *Qt_FlashMediaGetSupportedSwfVersion(PyObject *_self, PyObject *_args)
|
||||||
|
{
|
||||||
|
PyObject *_res = NULL;
|
||||||
|
ComponentResult _rv;
|
||||||
|
MediaHandler mh;
|
||||||
|
UInt8 swfVersion;
|
||||||
|
if (!PyArg_ParseTuple(_args, "O&",
|
||||||
|
CmpInstObj_Convert, &mh))
|
||||||
|
return NULL;
|
||||||
|
_rv = FlashMediaGetSupportedSwfVersion(mh,
|
||||||
|
&swfVersion);
|
||||||
|
_res = Py_BuildValue("lb",
|
||||||
|
_rv,
|
||||||
|
swfVersion);
|
||||||
|
return _res;
|
||||||
|
}
|
||||||
|
|
||||||
#if !TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
|
|
||||||
static PyObject *Qt_MovieMediaGetCurrentMovieProperty(PyObject *_self, PyObject *_args)
|
static PyObject *Qt_MovieMediaGetCurrentMovieProperty(PyObject *_self, PyObject *_args)
|
||||||
|
@ -7985,32 +8264,30 @@ static PyObject *Qt_NewTimeBase(PyObject *_self, PyObject *_args)
|
||||||
static PyObject *Qt_ConvertTime(PyObject *_self, PyObject *_args)
|
static PyObject *Qt_ConvertTime(PyObject *_self, PyObject *_args)
|
||||||
{
|
{
|
||||||
PyObject *_res = NULL;
|
PyObject *_res = NULL;
|
||||||
TimeRecord inout;
|
TimeRecord theTime;
|
||||||
TimeBase newBase;
|
TimeBase newBase;
|
||||||
if (!PyArg_ParseTuple(_args, "O&O&",
|
if (!PyArg_ParseTuple(_args, "O&",
|
||||||
QtTimeRecord_Convert, &inout,
|
|
||||||
TimeBaseObj_Convert, &newBase))
|
TimeBaseObj_Convert, &newBase))
|
||||||
return NULL;
|
return NULL;
|
||||||
ConvertTime(&inout,
|
ConvertTime(&theTime,
|
||||||
newBase);
|
newBase);
|
||||||
_res = Py_BuildValue("O&",
|
_res = Py_BuildValue("O&",
|
||||||
QtTimeRecord_New, &inout);
|
QtTimeRecord_New, &theTime);
|
||||||
return _res;
|
return _res;
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject *Qt_ConvertTimeScale(PyObject *_self, PyObject *_args)
|
static PyObject *Qt_ConvertTimeScale(PyObject *_self, PyObject *_args)
|
||||||
{
|
{
|
||||||
PyObject *_res = NULL;
|
PyObject *_res = NULL;
|
||||||
TimeRecord inout;
|
TimeRecord theTime;
|
||||||
TimeScale newScale;
|
TimeScale newScale;
|
||||||
if (!PyArg_ParseTuple(_args, "O&l",
|
if (!PyArg_ParseTuple(_args, "l",
|
||||||
QtTimeRecord_Convert, &inout,
|
|
||||||
&newScale))
|
&newScale))
|
||||||
return NULL;
|
return NULL;
|
||||||
ConvertTimeScale(&inout,
|
ConvertTimeScale(&theTime,
|
||||||
newScale);
|
newScale);
|
||||||
_res = Py_BuildValue("O&",
|
_res = Py_BuildValue("O&",
|
||||||
QtTimeRecord_New, &inout);
|
QtTimeRecord_New, &theTime);
|
||||||
return _res;
|
return _res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8150,6 +8427,8 @@ static PyMethodDef Qt_methods[] = {
|
||||||
"(Handle h, OSType handleType, Movie theMovie, long flags, ComponentInstance userComp) -> None"},
|
"(Handle h, OSType handleType, Movie theMovie, long flags, ComponentInstance userComp) -> None"},
|
||||||
{"GetMovieImporterForDataRef", (PyCFunction)Qt_GetMovieImporterForDataRef, 1,
|
{"GetMovieImporterForDataRef", (PyCFunction)Qt_GetMovieImporterForDataRef, 1,
|
||||||
"(OSType dataRefType, Handle dataRef, long flags) -> (Component importer)"},
|
"(OSType dataRefType, Handle dataRef, long flags) -> (Component importer)"},
|
||||||
|
{"QTGetMIMETypeInfo", (PyCFunction)Qt_QTGetMIMETypeInfo, 1,
|
||||||
|
"(char* mimeStringStart, short mimeStringLength, OSType infoSelector, void * infoDataPtr) -> (long infoDataSize)"},
|
||||||
{"TrackTimeToMediaTime", (PyCFunction)Qt_TrackTimeToMediaTime, 1,
|
{"TrackTimeToMediaTime", (PyCFunction)Qt_TrackTimeToMediaTime, 1,
|
||||||
"(TimeValue value, Track theTrack) -> (TimeValue _rv)"},
|
"(TimeValue value, Track theTrack) -> (TimeValue _rv)"},
|
||||||
{"NewUserData", (PyCFunction)Qt_NewUserData, 1,
|
{"NewUserData", (PyCFunction)Qt_NewUserData, 1,
|
||||||
|
@ -8178,6 +8457,10 @@ static PyMethodDef Qt_methods[] = {
|
||||||
"(short resRefNum, short resId) -> None"},
|
"(short resRefNum, short resId) -> None"},
|
||||||
{"CreateShortcutMovieFile", (PyCFunction)Qt_CreateShortcutMovieFile, 1,
|
{"CreateShortcutMovieFile", (PyCFunction)Qt_CreateShortcutMovieFile, 1,
|
||||||
"(FSSpec fileSpec, OSType creator, ScriptCode scriptTag, long createMovieFileFlags, Handle targetDataRef, OSType targetDataRefType) -> None"},
|
"(FSSpec fileSpec, OSType creator, ScriptCode scriptTag, long createMovieFileFlags, Handle targetDataRef, OSType targetDataRefType) -> None"},
|
||||||
|
{"CanQuickTimeOpenFile", (PyCFunction)Qt_CanQuickTimeOpenFile, 1,
|
||||||
|
"(FSSpec fileSpec, OSType fileType, OSType fileNameExtension, UInt32 inFlags) -> (Boolean outCanOpenWithGraphicsImporter, Boolean outCanOpenAsMovie, Boolean outPreferGraphicsImporter)"},
|
||||||
|
{"CanQuickTimeOpenDataRef", (PyCFunction)Qt_CanQuickTimeOpenDataRef, 1,
|
||||||
|
"(Handle dataRef, OSType dataRefType, UInt32 inFlags) -> (Boolean outCanOpenWithGraphicsImporter, Boolean outCanOpenAsMovie, Boolean outPreferGraphicsImporter)"},
|
||||||
{"NewMovieFromScrap", (PyCFunction)Qt_NewMovieFromScrap, 1,
|
{"NewMovieFromScrap", (PyCFunction)Qt_NewMovieFromScrap, 1,
|
||||||
"(long newMovieFlags) -> (Movie _rv)"},
|
"(long newMovieFlags) -> (Movie _rv)"},
|
||||||
{"QTNewAlias", (PyCFunction)Qt_QTNewAlias, 1,
|
{"QTNewAlias", (PyCFunction)Qt_QTNewAlias, 1,
|
||||||
|
@ -8226,6 +8509,8 @@ static PyMethodDef Qt_methods[] = {
|
||||||
"(MediaHandler mh, GWorldPtr gw, GDHandle gd, void * data, long dataSize, TextDescriptionHandle tdh, TimeValue sampleDuration) -> (ComponentResult _rv)"},
|
"(MediaHandler mh, GWorldPtr gw, GDHandle gd, void * data, long dataSize, TextDescriptionHandle tdh, TimeValue sampleDuration) -> (ComponentResult _rv)"},
|
||||||
{"TextMediaRawIdle", (PyCFunction)Qt_TextMediaRawIdle, 1,
|
{"TextMediaRawIdle", (PyCFunction)Qt_TextMediaRawIdle, 1,
|
||||||
"(MediaHandler mh, GWorldPtr gw, GDHandle gd, TimeValue sampleTime, long flagsIn) -> (ComponentResult _rv, long flagsOut)"},
|
"(MediaHandler mh, GWorldPtr gw, GDHandle gd, TimeValue sampleTime, long flagsIn) -> (ComponentResult _rv, long flagsOut)"},
|
||||||
|
{"TextMediaGetTextProperty", (PyCFunction)Qt_TextMediaGetTextProperty, 1,
|
||||||
|
"(MediaHandler mh, TimeValue atMediaTime, long propertyType, void * data, long dataSize) -> (ComponentResult _rv)"},
|
||||||
{"TextMediaFindNextText", (PyCFunction)Qt_TextMediaFindNextText, 1,
|
{"TextMediaFindNextText", (PyCFunction)Qt_TextMediaFindNextText, 1,
|
||||||
"(MediaHandler mh, Ptr text, long size, short findFlags, TimeValue startTime) -> (ComponentResult _rv, TimeValue foundTime, TimeValue foundDuration, long offset)"},
|
"(MediaHandler mh, Ptr text, long size, short findFlags, TimeValue startTime) -> (ComponentResult _rv, TimeValue foundTime, TimeValue foundDuration, long offset)"},
|
||||||
{"TextMediaHiliteTextSample", (PyCFunction)Qt_TextMediaHiliteTextSample, 1,
|
{"TextMediaHiliteTextSample", (PyCFunction)Qt_TextMediaHiliteTextSample, 1,
|
||||||
|
@ -8295,6 +8580,14 @@ static PyMethodDef Qt_methods[] = {
|
||||||
"(MediaHandler mh, long flashFrameNumber) -> (ComponentResult _rv, TimeValue movieTime)"},
|
"(MediaHandler mh, long flashFrameNumber) -> (ComponentResult _rv, TimeValue movieTime)"},
|
||||||
{"FlashMediaFrameLabelToMovieTime", (PyCFunction)Qt_FlashMediaFrameLabelToMovieTime, 1,
|
{"FlashMediaFrameLabelToMovieTime", (PyCFunction)Qt_FlashMediaFrameLabelToMovieTime, 1,
|
||||||
"(MediaHandler mh, Ptr theLabel) -> (ComponentResult _rv, TimeValue movieTime)"},
|
"(MediaHandler mh, Ptr theLabel) -> (ComponentResult _rv, TimeValue movieTime)"},
|
||||||
|
{"FlashMediaGetFlashVariable", (PyCFunction)Qt_FlashMediaGetFlashVariable, 1,
|
||||||
|
"(MediaHandler mh) -> (ComponentResult _rv, char path, char name, Handle theVariableCStringOut)"},
|
||||||
|
{"FlashMediaSetFlashVariable", (PyCFunction)Qt_FlashMediaSetFlashVariable, 1,
|
||||||
|
"(MediaHandler mh, Boolean updateFocus) -> (ComponentResult _rv, char path, char name, char value)"},
|
||||||
|
{"FlashMediaDoButtonActions", (PyCFunction)Qt_FlashMediaDoButtonActions, 1,
|
||||||
|
"(MediaHandler mh, long buttonID, long transition) -> (ComponentResult _rv, char path)"},
|
||||||
|
{"FlashMediaGetSupportedSwfVersion", (PyCFunction)Qt_FlashMediaGetSupportedSwfVersion, 1,
|
||||||
|
"(MediaHandler mh) -> (ComponentResult _rv, UInt8 swfVersion)"},
|
||||||
|
|
||||||
#if !TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
{"MovieMediaGetCurrentMovieProperty", (PyCFunction)Qt_MovieMediaGetCurrentMovieProperty, 1,
|
{"MovieMediaGetCurrentMovieProperty", (PyCFunction)Qt_MovieMediaGetCurrentMovieProperty, 1,
|
||||||
|
@ -8348,9 +8641,9 @@ static PyMethodDef Qt_methods[] = {
|
||||||
{"NewTimeBase", (PyCFunction)Qt_NewTimeBase, 1,
|
{"NewTimeBase", (PyCFunction)Qt_NewTimeBase, 1,
|
||||||
"() -> (TimeBase _rv)"},
|
"() -> (TimeBase _rv)"},
|
||||||
{"ConvertTime", (PyCFunction)Qt_ConvertTime, 1,
|
{"ConvertTime", (PyCFunction)Qt_ConvertTime, 1,
|
||||||
"(TimeRecord inout, TimeBase newBase) -> (TimeRecord inout)"},
|
"(TimeBase newBase) -> (TimeRecord theTime)"},
|
||||||
{"ConvertTimeScale", (PyCFunction)Qt_ConvertTimeScale, 1,
|
{"ConvertTimeScale", (PyCFunction)Qt_ConvertTimeScale, 1,
|
||||||
"(TimeRecord inout, TimeScale newScale) -> (TimeRecord inout)"},
|
"(TimeScale newScale) -> (TimeRecord theTime)"},
|
||||||
{"AddTime", (PyCFunction)Qt_AddTime, 1,
|
{"AddTime", (PyCFunction)Qt_AddTime, 1,
|
||||||
"(TimeRecord dst, TimeRecord src) -> (TimeRecord dst)"},
|
"(TimeRecord dst, TimeRecord src) -> (TimeRecord dst)"},
|
||||||
{"SubtractTime", (PyCFunction)Qt_SubtractTime, 1,
|
{"SubtractTime", (PyCFunction)Qt_SubtractTime, 1,
|
||||||
|
|
|
@ -144,6 +144,11 @@ class MyScanner(Scanner):
|
||||||
|
|
||||||
# AddTime and SubtractTime
|
# AddTime and SubtractTime
|
||||||
([('TimeRecord', 'dst', 'OutMode')], [('TimeRecord', 'dst', 'InOutMode')]),
|
([('TimeRecord', 'dst', 'OutMode')], [('TimeRecord', 'dst', 'InOutMode')]),
|
||||||
|
|
||||||
|
# Funny definitions
|
||||||
|
([('char_ptr', '*', 'InMode')], [('stringptr', '*', 'InMode')]),
|
||||||
|
([('FSSpecPtr', '*', 'InMode')], [('FSSpec_ptr', '*', 'InMode')]),
|
||||||
|
([('unsigned_char', 'swfVersion', 'OutMode')], [('UInt8', 'swfVersion', 'OutMode')]),
|
||||||
]
|
]
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|
|
@ -5,8 +5,12 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
#include "pywintoolbox.h"
|
||||||
|
#else
|
||||||
#include "macglue.h"
|
#include "macglue.h"
|
||||||
#include "pymactoolbox.h"
|
#include "pymactoolbox.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Macro to test whether a weak-loaded CFM function exists */
|
/* Macro to test whether a weak-loaded CFM function exists */
|
||||||
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
|
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
|
||||||
|
@ -1357,6 +1361,51 @@ static PyObject *Res_GetNextResourceFile(PyObject *_self, PyObject *_args)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
static PyObject *Res_FSOpenResFile(PyObject *_self, PyObject *_args)
|
||||||
|
{
|
||||||
|
PyObject *_res = NULL;
|
||||||
|
short _rv;
|
||||||
|
FSRef ref;
|
||||||
|
SignedByte permission;
|
||||||
|
if (!PyArg_ParseTuple(_args, "O&b",
|
||||||
|
PyMac_GetFSRef, &ref,
|
||||||
|
&permission))
|
||||||
|
return NULL;
|
||||||
|
_rv = FSOpenResFile(&ref,
|
||||||
|
permission);
|
||||||
|
{
|
||||||
|
OSErr _err = ResError();
|
||||||
|
if (_err != noErr) return PyMac_Error(_err);
|
||||||
|
}
|
||||||
|
_res = Py_BuildValue("h",
|
||||||
|
_rv);
|
||||||
|
return _res;
|
||||||
|
}
|
||||||
|
|
||||||
|
static PyObject *Res_FSResourceFileAlreadyOpen(PyObject *_self, PyObject *_args)
|
||||||
|
{
|
||||||
|
PyObject *_res = NULL;
|
||||||
|
Boolean _rv;
|
||||||
|
FSRef resourceFileRef;
|
||||||
|
Boolean inChain;
|
||||||
|
SInt16 refNum;
|
||||||
|
if (!PyArg_ParseTuple(_args, "O&",
|
||||||
|
PyMac_GetFSRef, &resourceFileRef))
|
||||||
|
return NULL;
|
||||||
|
_rv = FSResourceFileAlreadyOpen(&resourceFileRef,
|
||||||
|
&inChain,
|
||||||
|
&refNum);
|
||||||
|
{
|
||||||
|
OSErr _err = ResError();
|
||||||
|
if (_err != noErr) return PyMac_Error(_err);
|
||||||
|
}
|
||||||
|
_res = Py_BuildValue("bbh",
|
||||||
|
_rv,
|
||||||
|
inChain,
|
||||||
|
refNum);
|
||||||
|
return _res;
|
||||||
|
}
|
||||||
|
|
||||||
static PyObject *Res_Resource(PyObject *_self, PyObject *_args)
|
static PyObject *Res_Resource(PyObject *_self, PyObject *_args)
|
||||||
{
|
{
|
||||||
PyObject *_res = NULL;
|
PyObject *_res = NULL;
|
||||||
|
@ -1518,6 +1567,10 @@ static PyMethodDef Res_methods[] = {
|
||||||
{"GetNextResourceFile", (PyCFunction)Res_GetNextResourceFile, 1,
|
{"GetNextResourceFile", (PyCFunction)Res_GetNextResourceFile, 1,
|
||||||
"(SInt16 curRefNum) -> (OSErr _rv, SInt16 nextRefNum)"},
|
"(SInt16 curRefNum) -> (OSErr _rv, SInt16 nextRefNum)"},
|
||||||
#endif
|
#endif
|
||||||
|
{"FSOpenResFile", (PyCFunction)Res_FSOpenResFile, 1,
|
||||||
|
"(FSRef ref, SignedByte permission) -> (short _rv)"},
|
||||||
|
{"FSResourceFileAlreadyOpen", (PyCFunction)Res_FSResourceFileAlreadyOpen, 1,
|
||||||
|
"(FSRef resourceFileRef) -> (Boolean _rv, Boolean inChain, SInt16 refNum)"},
|
||||||
{"Resource", (PyCFunction)Res_Resource, 1,
|
{"Resource", (PyCFunction)Res_Resource, 1,
|
||||||
"Convert a string to a resource object.\n\nThe created resource object is actually just a handle,\napply AddResource() to write it to a resource file.\nSee also the Handle() docstring.\n"},
|
"Convert a string to a resource object.\n\nThe created resource object is actually just a handle,\napply AddResource() to write it to a resource file.\nSee also the Handle() docstring.\n"},
|
||||||
{"Handle", (PyCFunction)Res_Handle, 1,
|
{"Handle", (PyCFunction)Res_Handle, 1,
|
||||||
|
|
|
@ -46,6 +46,11 @@ class ResourcesScanner(Scanner):
|
||||||
## "MaxSizeRsrc", # GetMaxResourceSize
|
## "MaxSizeRsrc", # GetMaxResourceSize
|
||||||
]
|
]
|
||||||
|
|
||||||
|
def makeblacklisttypes(self):
|
||||||
|
return [
|
||||||
|
"UniCharCount", #TBD
|
||||||
|
]
|
||||||
|
|
||||||
def makegreylist(self):
|
def makegreylist(self):
|
||||||
return [
|
return [
|
||||||
('#if TARGET_API_MAC_OS8', [
|
('#if TARGET_API_MAC_OS8', [
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
|
|
||||||
from macsupport import *
|
from macsupport import *
|
||||||
|
|
||||||
|
FSRef_ptr = OpaqueType("FSRef", "PyMac_BuildFSRef", "PyMac_GetFSRef")
|
||||||
|
|
||||||
class ResMixIn:
|
class ResMixIn:
|
||||||
|
|
||||||
|
|
|
@ -5,8 +5,12 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
#include "pywintoolbox.h"
|
||||||
|
#else
|
||||||
#include "macglue.h"
|
#include "macglue.h"
|
||||||
#include "pymactoolbox.h"
|
#include "pymactoolbox.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Macro to test whether a weak-loaded CFM function exists */
|
/* Macro to test whether a weak-loaded CFM function exists */
|
||||||
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
|
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
|
||||||
|
|
|
@ -5,8 +5,12 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
#include "pywintoolbox.h"
|
||||||
|
#else
|
||||||
#include "macglue.h"
|
#include "macglue.h"
|
||||||
#include "pymactoolbox.h"
|
#include "pymactoolbox.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Macro to test whether a weak-loaded CFM function exists */
|
/* Macro to test whether a weak-loaded CFM function exists */
|
||||||
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
|
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
|
||||||
|
|
|
@ -5,8 +5,12 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
#include "pywintoolbox.h"
|
||||||
|
#else
|
||||||
#include "macglue.h"
|
#include "macglue.h"
|
||||||
#include "pymactoolbox.h"
|
#include "pymactoolbox.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Macro to test whether a weak-loaded CFM function exists */
|
/* Macro to test whether a weak-loaded CFM function exists */
|
||||||
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
|
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
|
||||||
|
|
|
@ -5,8 +5,12 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
#include "pywintoolbox.h"
|
||||||
|
#else
|
||||||
#include "macglue.h"
|
#include "macglue.h"
|
||||||
#include "pymactoolbox.h"
|
#include "pymactoolbox.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Macro to test whether a weak-loaded CFM function exists */
|
/* Macro to test whether a weak-loaded CFM function exists */
|
||||||
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
|
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
|
||||||
|
@ -153,7 +157,63 @@ static PyObject *WinObj_CloneWindow(WindowObject *_self, PyObject *_args)
|
||||||
return _res;
|
return _res;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_OS8
|
||||||
|
|
||||||
|
static PyObject *WinObj_GetWindowRetainCount(WindowObject *_self, PyObject *_args)
|
||||||
|
{
|
||||||
|
PyObject *_res = NULL;
|
||||||
|
ItemCount _rv;
|
||||||
|
#ifndef GetWindowRetainCount
|
||||||
|
PyMac_PRECHECK(GetWindowRetainCount);
|
||||||
|
#endif
|
||||||
|
if (!PyArg_ParseTuple(_args, ""))
|
||||||
|
return NULL;
|
||||||
|
_rv = GetWindowRetainCount(_self->ob_itself);
|
||||||
|
_res = Py_BuildValue("l",
|
||||||
|
_rv);
|
||||||
|
return _res;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !TARGET_API_MAC_OS8
|
||||||
|
|
||||||
|
static PyObject *WinObj_RetainWindow(WindowObject *_self, PyObject *_args)
|
||||||
|
{
|
||||||
|
PyObject *_res = NULL;
|
||||||
|
OSStatus _err;
|
||||||
|
#ifndef RetainWindow
|
||||||
|
PyMac_PRECHECK(RetainWindow);
|
||||||
|
#endif
|
||||||
|
if (!PyArg_ParseTuple(_args, ""))
|
||||||
|
return NULL;
|
||||||
|
_err = RetainWindow(_self->ob_itself);
|
||||||
|
if (_err != noErr) return PyMac_Error(_err);
|
||||||
|
Py_INCREF(Py_None);
|
||||||
|
_res = Py_None;
|
||||||
|
return _res;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !TARGET_API_MAC_OS8
|
||||||
|
|
||||||
|
static PyObject *WinObj_ReleaseWindow(WindowObject *_self, PyObject *_args)
|
||||||
|
{
|
||||||
|
PyObject *_res = NULL;
|
||||||
|
OSStatus _err;
|
||||||
|
#ifndef ReleaseWindow
|
||||||
|
PyMac_PRECHECK(ReleaseWindow);
|
||||||
|
#endif
|
||||||
|
if (!PyArg_ParseTuple(_args, ""))
|
||||||
|
return NULL;
|
||||||
|
_err = ReleaseWindow(_self->ob_itself);
|
||||||
|
if (_err != noErr) return PyMac_Error(_err);
|
||||||
|
Py_INCREF(Py_None);
|
||||||
|
_res = Py_None;
|
||||||
|
return _res;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !TARGET_API_MAC_OS8
|
||||||
|
|
||||||
static PyObject *WinObj_ReshapeCustomWindow(WindowObject *_self, PyObject *_args)
|
static PyObject *WinObj_ReshapeCustomWindow(WindowObject *_self, PyObject *_args)
|
||||||
{
|
{
|
||||||
|
@ -172,6 +232,24 @@ static PyObject *WinObj_ReshapeCustomWindow(WindowObject *_self, PyObject *_args
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
static PyObject *WinObj_GetWindowWidgetHilite(WindowObject *_self, PyObject *_args)
|
||||||
|
{
|
||||||
|
PyObject *_res = NULL;
|
||||||
|
OSStatus _err;
|
||||||
|
WindowDefPartCode outHilite;
|
||||||
|
#ifndef GetWindowWidgetHilite
|
||||||
|
PyMac_PRECHECK(GetWindowWidgetHilite);
|
||||||
|
#endif
|
||||||
|
if (!PyArg_ParseTuple(_args, ""))
|
||||||
|
return NULL;
|
||||||
|
_err = GetWindowWidgetHilite(_self->ob_itself,
|
||||||
|
&outHilite);
|
||||||
|
if (_err != noErr) return PyMac_Error(_err);
|
||||||
|
_res = Py_BuildValue("h",
|
||||||
|
outHilite);
|
||||||
|
return _res;
|
||||||
|
}
|
||||||
|
|
||||||
static PyObject *WinObj_GetWindowClass(WindowObject *_self, PyObject *_args)
|
static PyObject *WinObj_GetWindowClass(WindowObject *_self, PyObject *_args)
|
||||||
{
|
{
|
||||||
PyObject *_res = NULL;
|
PyObject *_res = NULL;
|
||||||
|
@ -208,7 +286,7 @@ static PyObject *WinObj_GetWindowAttributes(WindowObject *_self, PyObject *_args
|
||||||
return _res;
|
return _res;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_OS8
|
||||||
|
|
||||||
static PyObject *WinObj_ChangeWindowAttributes(WindowObject *_self, PyObject *_args)
|
static PyObject *WinObj_ChangeWindowAttributes(WindowObject *_self, PyObject *_args)
|
||||||
{
|
{
|
||||||
|
@ -233,6 +311,77 @@ static PyObject *WinObj_ChangeWindowAttributes(WindowObject *_self, PyObject *_a
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if !TARGET_API_MAC_OS8
|
||||||
|
|
||||||
|
static PyObject *WinObj_SetWindowClass(WindowObject *_self, PyObject *_args)
|
||||||
|
{
|
||||||
|
PyObject *_res = NULL;
|
||||||
|
OSStatus _err;
|
||||||
|
WindowClass inWindowClass;
|
||||||
|
#ifndef SetWindowClass
|
||||||
|
PyMac_PRECHECK(SetWindowClass);
|
||||||
|
#endif
|
||||||
|
if (!PyArg_ParseTuple(_args, "l",
|
||||||
|
&inWindowClass))
|
||||||
|
return NULL;
|
||||||
|
_err = SetWindowClass(_self->ob_itself,
|
||||||
|
inWindowClass);
|
||||||
|
if (_err != noErr) return PyMac_Error(_err);
|
||||||
|
Py_INCREF(Py_None);
|
||||||
|
_res = Py_None;
|
||||||
|
return _res;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !TARGET_API_MAC_OS8
|
||||||
|
|
||||||
|
static PyObject *WinObj_SetWindowModality(WindowObject *_self, PyObject *_args)
|
||||||
|
{
|
||||||
|
PyObject *_res = NULL;
|
||||||
|
OSStatus _err;
|
||||||
|
WindowModality inModalKind;
|
||||||
|
WindowPtr inUnavailableWindow;
|
||||||
|
#ifndef SetWindowModality
|
||||||
|
PyMac_PRECHECK(SetWindowModality);
|
||||||
|
#endif
|
||||||
|
if (!PyArg_ParseTuple(_args, "lO&",
|
||||||
|
&inModalKind,
|
||||||
|
WinObj_Convert, &inUnavailableWindow))
|
||||||
|
return NULL;
|
||||||
|
_err = SetWindowModality(_self->ob_itself,
|
||||||
|
inModalKind,
|
||||||
|
inUnavailableWindow);
|
||||||
|
if (_err != noErr) return PyMac_Error(_err);
|
||||||
|
Py_INCREF(Py_None);
|
||||||
|
_res = Py_None;
|
||||||
|
return _res;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !TARGET_API_MAC_OS8
|
||||||
|
|
||||||
|
static PyObject *WinObj_GetWindowModality(WindowObject *_self, PyObject *_args)
|
||||||
|
{
|
||||||
|
PyObject *_res = NULL;
|
||||||
|
OSStatus _err;
|
||||||
|
WindowModality outModalKind;
|
||||||
|
WindowPtr outUnavailableWindow;
|
||||||
|
#ifndef GetWindowModality
|
||||||
|
PyMac_PRECHECK(GetWindowModality);
|
||||||
|
#endif
|
||||||
|
if (!PyArg_ParseTuple(_args, ""))
|
||||||
|
return NULL;
|
||||||
|
_err = GetWindowModality(_self->ob_itself,
|
||||||
|
&outModalKind,
|
||||||
|
&outUnavailableWindow);
|
||||||
|
if (_err != noErr) return PyMac_Error(_err);
|
||||||
|
_res = Py_BuildValue("lO&",
|
||||||
|
outModalKind,
|
||||||
|
WinObj_WhichWindow, outUnavailableWindow);
|
||||||
|
return _res;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#if !TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
|
|
||||||
static PyObject *WinObj_SetWinColor(WindowObject *_self, PyObject *_args)
|
static PyObject *WinObj_SetWinColor(WindowObject *_self, PyObject *_args)
|
||||||
|
@ -328,7 +477,7 @@ static PyObject *WinObj_SetWindowContentPattern(WindowObject *_self, PyObject *_
|
||||||
return _res;
|
return _res;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_OS8
|
||||||
|
|
||||||
static PyObject *WinObj_ScrollWindowRect(WindowObject *_self, PyObject *_args)
|
static PyObject *WinObj_ScrollWindowRect(WindowObject *_self, PyObject *_args)
|
||||||
{
|
{
|
||||||
|
@ -362,7 +511,7 @@ static PyObject *WinObj_ScrollWindowRect(WindowObject *_self, PyObject *_args)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_OS8
|
||||||
|
|
||||||
static PyObject *WinObj_ScrollWindowRegion(WindowObject *_self, PyObject *_args)
|
static PyObject *WinObj_ScrollWindowRegion(WindowObject *_self, PyObject *_args)
|
||||||
{
|
{
|
||||||
|
@ -557,7 +706,7 @@ static PyObject *WinObj_SelectWindow(WindowObject *_self, PyObject *_args)
|
||||||
return _res;
|
return _res;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_OS8
|
||||||
|
|
||||||
static PyObject *WinObj_GetNextWindowOfClass(WindowObject *_self, PyObject *_args)
|
static PyObject *WinObj_GetNextWindowOfClass(WindowObject *_self, PyObject *_args)
|
||||||
{
|
{
|
||||||
|
@ -581,6 +730,49 @@ static PyObject *WinObj_GetNextWindowOfClass(WindowObject *_self, PyObject *_arg
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if !TARGET_API_MAC_OS8
|
||||||
|
|
||||||
|
static PyObject *WinObj_SetWindowAlternateTitle(WindowObject *_self, PyObject *_args)
|
||||||
|
{
|
||||||
|
PyObject *_res = NULL;
|
||||||
|
OSStatus _err;
|
||||||
|
CFStringRef inTitle;
|
||||||
|
#ifndef SetWindowAlternateTitle
|
||||||
|
PyMac_PRECHECK(SetWindowAlternateTitle);
|
||||||
|
#endif
|
||||||
|
if (!PyArg_ParseTuple(_args, "O&",
|
||||||
|
CFStringRefObj_Convert, &inTitle))
|
||||||
|
return NULL;
|
||||||
|
_err = SetWindowAlternateTitle(_self->ob_itself,
|
||||||
|
inTitle);
|
||||||
|
if (_err != noErr) return PyMac_Error(_err);
|
||||||
|
Py_INCREF(Py_None);
|
||||||
|
_res = Py_None;
|
||||||
|
return _res;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !TARGET_API_MAC_OS8
|
||||||
|
|
||||||
|
static PyObject *WinObj_CopyWindowAlternateTitle(WindowObject *_self, PyObject *_args)
|
||||||
|
{
|
||||||
|
PyObject *_res = NULL;
|
||||||
|
OSStatus _err;
|
||||||
|
CFStringRef outTitle;
|
||||||
|
#ifndef CopyWindowAlternateTitle
|
||||||
|
PyMac_PRECHECK(CopyWindowAlternateTitle);
|
||||||
|
#endif
|
||||||
|
if (!PyArg_ParseTuple(_args, ""))
|
||||||
|
return NULL;
|
||||||
|
_err = CopyWindowAlternateTitle(_self->ob_itself,
|
||||||
|
&outTitle);
|
||||||
|
if (_err != noErr) return PyMac_Error(_err);
|
||||||
|
_res = Py_BuildValue("O&",
|
||||||
|
CFStringRefObj_New, outTitle);
|
||||||
|
return _res;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#if !TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
|
|
||||||
static PyObject *WinObj_IsValidWindowPtr(WindowObject *_self, PyObject *_args)
|
static PyObject *WinObj_IsValidWindowPtr(WindowObject *_self, PyObject *_args)
|
||||||
|
@ -735,6 +927,24 @@ static PyObject *WinObj_GetWindowRegion(WindowObject *_self, PyObject *_args)
|
||||||
return _res;
|
return _res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static PyObject *WinObj_GetWindowStructureWidths(WindowObject *_self, PyObject *_args)
|
||||||
|
{
|
||||||
|
PyObject *_res = NULL;
|
||||||
|
OSStatus _err;
|
||||||
|
Rect outRect;
|
||||||
|
#ifndef GetWindowStructureWidths
|
||||||
|
PyMac_PRECHECK(GetWindowStructureWidths);
|
||||||
|
#endif
|
||||||
|
if (!PyArg_ParseTuple(_args, ""))
|
||||||
|
return NULL;
|
||||||
|
_err = GetWindowStructureWidths(_self->ob_itself,
|
||||||
|
&outRect);
|
||||||
|
if (_err != noErr) return PyMac_Error(_err);
|
||||||
|
_res = Py_BuildValue("O&",
|
||||||
|
PyMac_BuildRect, &outRect);
|
||||||
|
return _res;
|
||||||
|
}
|
||||||
|
|
||||||
static PyObject *WinObj_BeginUpdate(WindowObject *_self, PyObject *_args)
|
static PyObject *WinObj_BeginUpdate(WindowObject *_self, PyObject *_args)
|
||||||
{
|
{
|
||||||
PyObject *_res = NULL;
|
PyObject *_res = NULL;
|
||||||
|
@ -886,6 +1096,49 @@ static PyObject *WinObj_GetWTitle(WindowObject *_self, PyObject *_args)
|
||||||
return _res;
|
return _res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if !TARGET_API_MAC_OS8
|
||||||
|
|
||||||
|
static PyObject *WinObj_SetWindowTitleWithCFString(WindowObject *_self, PyObject *_args)
|
||||||
|
{
|
||||||
|
PyObject *_res = NULL;
|
||||||
|
OSStatus _err;
|
||||||
|
CFStringRef inString;
|
||||||
|
#ifndef SetWindowTitleWithCFString
|
||||||
|
PyMac_PRECHECK(SetWindowTitleWithCFString);
|
||||||
|
#endif
|
||||||
|
if (!PyArg_ParseTuple(_args, "O&",
|
||||||
|
CFStringRefObj_Convert, &inString))
|
||||||
|
return NULL;
|
||||||
|
_err = SetWindowTitleWithCFString(_self->ob_itself,
|
||||||
|
inString);
|
||||||
|
if (_err != noErr) return PyMac_Error(_err);
|
||||||
|
Py_INCREF(Py_None);
|
||||||
|
_res = Py_None;
|
||||||
|
return _res;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !TARGET_API_MAC_OS8
|
||||||
|
|
||||||
|
static PyObject *WinObj_CopyWindowTitleAsCFString(WindowObject *_self, PyObject *_args)
|
||||||
|
{
|
||||||
|
PyObject *_res = NULL;
|
||||||
|
OSStatus _err;
|
||||||
|
CFStringRef outString;
|
||||||
|
#ifndef CopyWindowTitleAsCFString
|
||||||
|
PyMac_PRECHECK(CopyWindowTitleAsCFString);
|
||||||
|
#endif
|
||||||
|
if (!PyArg_ParseTuple(_args, ""))
|
||||||
|
return NULL;
|
||||||
|
_err = CopyWindowTitleAsCFString(_self->ob_itself,
|
||||||
|
&outString);
|
||||||
|
if (_err != noErr) return PyMac_Error(_err);
|
||||||
|
_res = Py_BuildValue("O&",
|
||||||
|
CFStringRefObj_New, outString);
|
||||||
|
return _res;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static PyObject *WinObj_SetWindowProxyFSSpec(WindowObject *_self, PyObject *_args)
|
static PyObject *WinObj_SetWindowProxyFSSpec(WindowObject *_self, PyObject *_args)
|
||||||
{
|
{
|
||||||
PyObject *_res = NULL;
|
PyObject *_res = NULL;
|
||||||
|
@ -1239,6 +1492,37 @@ static PyObject *WinObj_TransitionWindow(WindowObject *_self, PyObject *_args)
|
||||||
return _res;
|
return _res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if TARGET_API_MAC_OSX
|
||||||
|
|
||||||
|
static PyObject *WinObj_TransitionWindowAndParent(WindowObject *_self, PyObject *_args)
|
||||||
|
{
|
||||||
|
PyObject *_res = NULL;
|
||||||
|
OSStatus _err;
|
||||||
|
WindowPtr parentWindow;
|
||||||
|
WindowTransitionEffect effect;
|
||||||
|
WindowTransitionAction action;
|
||||||
|
Rect rect;
|
||||||
|
#ifndef TransitionWindowAndParent
|
||||||
|
PyMac_PRECHECK(TransitionWindowAndParent);
|
||||||
|
#endif
|
||||||
|
if (!PyArg_ParseTuple(_args, "O&llO&",
|
||||||
|
WinObj_Convert, &parentWindow,
|
||||||
|
&effect,
|
||||||
|
&action,
|
||||||
|
PyMac_GetRect, &rect))
|
||||||
|
return NULL;
|
||||||
|
_err = TransitionWindowAndParent(_self->ob_itself,
|
||||||
|
parentWindow,
|
||||||
|
effect,
|
||||||
|
action,
|
||||||
|
&rect);
|
||||||
|
if (_err != noErr) return PyMac_Error(_err);
|
||||||
|
Py_INCREF(Py_None);
|
||||||
|
_res = Py_None;
|
||||||
|
return _res;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static PyObject *WinObj_MacMoveWindow(WindowObject *_self, PyObject *_args)
|
static PyObject *WinObj_MacMoveWindow(WindowObject *_self, PyObject *_args)
|
||||||
{
|
{
|
||||||
PyObject *_res = NULL;
|
PyObject *_res = NULL;
|
||||||
|
@ -1574,16 +1858,74 @@ static PyObject *WinObj_SetWindowIdealUserState(WindowObject *_self, PyObject *_
|
||||||
#ifndef SetWindowIdealUserState
|
#ifndef SetWindowIdealUserState
|
||||||
PyMac_PRECHECK(SetWindowIdealUserState);
|
PyMac_PRECHECK(SetWindowIdealUserState);
|
||||||
#endif
|
#endif
|
||||||
if (!PyArg_ParseTuple(_args, ""))
|
if (!PyArg_ParseTuple(_args, "O&",
|
||||||
|
PyMac_GetRect, &userState))
|
||||||
return NULL;
|
return NULL;
|
||||||
_err = SetWindowIdealUserState(_self->ob_itself,
|
_err = SetWindowIdealUserState(_self->ob_itself,
|
||||||
&userState);
|
&userState);
|
||||||
if (_err != noErr) return PyMac_Error(_err);
|
if (_err != noErr) return PyMac_Error(_err);
|
||||||
_res = Py_BuildValue("O&",
|
Py_INCREF(Py_None);
|
||||||
PyMac_BuildRect, &userState);
|
_res = Py_None;
|
||||||
return _res;
|
return _res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if !TARGET_API_MAC_OS8
|
||||||
|
|
||||||
|
static PyObject *WinObj_GetWindowGreatestAreaDevice(WindowObject *_self, PyObject *_args)
|
||||||
|
{
|
||||||
|
PyObject *_res = NULL;
|
||||||
|
OSStatus _err;
|
||||||
|
WindowRegionCode inRegion;
|
||||||
|
GDHandle outGreatestDevice;
|
||||||
|
Rect outGreatestDeviceRect;
|
||||||
|
#ifndef GetWindowGreatestAreaDevice
|
||||||
|
PyMac_PRECHECK(GetWindowGreatestAreaDevice);
|
||||||
|
#endif
|
||||||
|
if (!PyArg_ParseTuple(_args, "H",
|
||||||
|
&inRegion))
|
||||||
|
return NULL;
|
||||||
|
_err = GetWindowGreatestAreaDevice(_self->ob_itself,
|
||||||
|
inRegion,
|
||||||
|
&outGreatestDevice,
|
||||||
|
&outGreatestDeviceRect);
|
||||||
|
if (_err != noErr) return PyMac_Error(_err);
|
||||||
|
_res = Py_BuildValue("O&O&",
|
||||||
|
ResObj_New, outGreatestDevice,
|
||||||
|
PyMac_BuildRect, &outGreatestDeviceRect);
|
||||||
|
return _res;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !TARGET_API_MAC_OS8
|
||||||
|
|
||||||
|
static PyObject *WinObj_ConstrainWindowToScreen(WindowObject *_self, PyObject *_args)
|
||||||
|
{
|
||||||
|
PyObject *_res = NULL;
|
||||||
|
OSStatus _err;
|
||||||
|
WindowRegionCode inRegionCode;
|
||||||
|
WindowConstrainOptions inOptions;
|
||||||
|
Rect inScreenRect;
|
||||||
|
Rect outStructure;
|
||||||
|
#ifndef ConstrainWindowToScreen
|
||||||
|
PyMac_PRECHECK(ConstrainWindowToScreen);
|
||||||
|
#endif
|
||||||
|
if (!PyArg_ParseTuple(_args, "HlO&",
|
||||||
|
&inRegionCode,
|
||||||
|
&inOptions,
|
||||||
|
PyMac_GetRect, &inScreenRect))
|
||||||
|
return NULL;
|
||||||
|
_err = ConstrainWindowToScreen(_self->ob_itself,
|
||||||
|
inRegionCode,
|
||||||
|
inOptions,
|
||||||
|
&inScreenRect,
|
||||||
|
&outStructure);
|
||||||
|
if (_err != noErr) return PyMac_Error(_err);
|
||||||
|
_res = Py_BuildValue("O&",
|
||||||
|
PyMac_BuildRect, &outStructure);
|
||||||
|
return _res;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static PyObject *WinObj_HideWindow(WindowObject *_self, PyObject *_args)
|
static PyObject *WinObj_HideWindow(WindowObject *_self, PyObject *_args)
|
||||||
{
|
{
|
||||||
PyObject *_res = NULL;
|
PyObject *_res = NULL;
|
||||||
|
@ -1629,7 +1971,84 @@ static PyObject *WinObj_ShowHide(WindowObject *_self, PyObject *_args)
|
||||||
return _res;
|
return _res;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if TARGET_API_MAC_CARBON
|
static PyObject *WinObj_MacIsWindowVisible(WindowObject *_self, PyObject *_args)
|
||||||
|
{
|
||||||
|
PyObject *_res = NULL;
|
||||||
|
Boolean _rv;
|
||||||
|
#ifndef MacIsWindowVisible
|
||||||
|
PyMac_PRECHECK(MacIsWindowVisible);
|
||||||
|
#endif
|
||||||
|
if (!PyArg_ParseTuple(_args, ""))
|
||||||
|
return NULL;
|
||||||
|
_rv = MacIsWindowVisible(_self->ob_itself);
|
||||||
|
_res = Py_BuildValue("b",
|
||||||
|
_rv);
|
||||||
|
return _res;
|
||||||
|
}
|
||||||
|
|
||||||
|
#if !TARGET_API_MAC_OS8
|
||||||
|
|
||||||
|
static PyObject *WinObj_ShowSheetWindow(WindowObject *_self, PyObject *_args)
|
||||||
|
{
|
||||||
|
PyObject *_res = NULL;
|
||||||
|
OSStatus _err;
|
||||||
|
WindowPtr inParentWindow;
|
||||||
|
#ifndef ShowSheetWindow
|
||||||
|
PyMac_PRECHECK(ShowSheetWindow);
|
||||||
|
#endif
|
||||||
|
if (!PyArg_ParseTuple(_args, "O&",
|
||||||
|
WinObj_Convert, &inParentWindow))
|
||||||
|
return NULL;
|
||||||
|
_err = ShowSheetWindow(_self->ob_itself,
|
||||||
|
inParentWindow);
|
||||||
|
if (_err != noErr) return PyMac_Error(_err);
|
||||||
|
Py_INCREF(Py_None);
|
||||||
|
_res = Py_None;
|
||||||
|
return _res;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !TARGET_API_MAC_OS8
|
||||||
|
|
||||||
|
static PyObject *WinObj_HideSheetWindow(WindowObject *_self, PyObject *_args)
|
||||||
|
{
|
||||||
|
PyObject *_res = NULL;
|
||||||
|
OSStatus _err;
|
||||||
|
#ifndef HideSheetWindow
|
||||||
|
PyMac_PRECHECK(HideSheetWindow);
|
||||||
|
#endif
|
||||||
|
if (!PyArg_ParseTuple(_args, ""))
|
||||||
|
return NULL;
|
||||||
|
_err = HideSheetWindow(_self->ob_itself);
|
||||||
|
if (_err != noErr) return PyMac_Error(_err);
|
||||||
|
Py_INCREF(Py_None);
|
||||||
|
_res = Py_None;
|
||||||
|
return _res;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !TARGET_API_MAC_OS8
|
||||||
|
|
||||||
|
static PyObject *WinObj_GetSheetWindowParent(WindowObject *_self, PyObject *_args)
|
||||||
|
{
|
||||||
|
PyObject *_res = NULL;
|
||||||
|
OSStatus _err;
|
||||||
|
WindowPtr outParentWindow;
|
||||||
|
#ifndef GetSheetWindowParent
|
||||||
|
PyMac_PRECHECK(GetSheetWindowParent);
|
||||||
|
#endif
|
||||||
|
if (!PyArg_ParseTuple(_args, ""))
|
||||||
|
return NULL;
|
||||||
|
_err = GetSheetWindowParent(_self->ob_itself,
|
||||||
|
&outParentWindow);
|
||||||
|
if (_err != noErr) return PyMac_Error(_err);
|
||||||
|
_res = Py_BuildValue("O&",
|
||||||
|
WinObj_WhichWindow, outParentWindow);
|
||||||
|
return _res;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !TARGET_API_MAC_OS8
|
||||||
|
|
||||||
static PyObject *WinObj_GetWindowPropertyAttributes(WindowObject *_self, PyObject *_args)
|
static PyObject *WinObj_GetWindowPropertyAttributes(WindowObject *_self, PyObject *_args)
|
||||||
{
|
{
|
||||||
|
@ -1656,7 +2075,7 @@ static PyObject *WinObj_GetWindowPropertyAttributes(WindowObject *_self, PyObjec
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_OS8
|
||||||
|
|
||||||
static PyObject *WinObj_ChangeWindowPropertyAttributes(WindowObject *_self, PyObject *_args)
|
static PyObject *WinObj_ChangeWindowPropertyAttributes(WindowObject *_self, PyObject *_args)
|
||||||
{
|
{
|
||||||
|
@ -1813,21 +2232,6 @@ static PyObject *WinObj_GetWindowKind(WindowObject *_self, PyObject *_args)
|
||||||
return _res;
|
return _res;
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject *WinObj_MacIsWindowVisible(WindowObject *_self, PyObject *_args)
|
|
||||||
{
|
|
||||||
PyObject *_res = NULL;
|
|
||||||
Boolean _rv;
|
|
||||||
#ifndef MacIsWindowVisible
|
|
||||||
PyMac_PRECHECK(MacIsWindowVisible);
|
|
||||||
#endif
|
|
||||||
if (!PyArg_ParseTuple(_args, ""))
|
|
||||||
return NULL;
|
|
||||||
_rv = MacIsWindowVisible(_self->ob_itself);
|
|
||||||
_res = Py_BuildValue("b",
|
|
||||||
_rv);
|
|
||||||
return _res;
|
|
||||||
}
|
|
||||||
|
|
||||||
static PyObject *WinObj_IsWindowHilited(WindowObject *_self, PyObject *_args)
|
static PyObject *WinObj_IsWindowHilited(WindowObject *_self, PyObject *_args)
|
||||||
{
|
{
|
||||||
PyObject *_res = NULL;
|
PyObject *_res = NULL;
|
||||||
|
@ -1843,7 +2247,7 @@ static PyObject *WinObj_IsWindowHilited(WindowObject *_self, PyObject *_args)
|
||||||
return _res;
|
return _res;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_OS8
|
||||||
|
|
||||||
static PyObject *WinObj_IsWindowUpdatePending(WindowObject *_self, PyObject *_args)
|
static PyObject *WinObj_IsWindowUpdatePending(WindowObject *_self, PyObject *_args)
|
||||||
{
|
{
|
||||||
|
@ -2166,20 +2570,52 @@ static PyMethodDef WinObj_methods[] = {
|
||||||
{"CloneWindow", (PyCFunction)WinObj_CloneWindow, 1,
|
{"CloneWindow", (PyCFunction)WinObj_CloneWindow, 1,
|
||||||
"() -> None"},
|
"() -> None"},
|
||||||
|
|
||||||
#if TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_OS8
|
||||||
|
{"GetWindowRetainCount", (PyCFunction)WinObj_GetWindowRetainCount, 1,
|
||||||
|
"() -> (ItemCount _rv)"},
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !TARGET_API_MAC_OS8
|
||||||
|
{"RetainWindow", (PyCFunction)WinObj_RetainWindow, 1,
|
||||||
|
"() -> None"},
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !TARGET_API_MAC_OS8
|
||||||
|
{"ReleaseWindow", (PyCFunction)WinObj_ReleaseWindow, 1,
|
||||||
|
"() -> None"},
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !TARGET_API_MAC_OS8
|
||||||
{"ReshapeCustomWindow", (PyCFunction)WinObj_ReshapeCustomWindow, 1,
|
{"ReshapeCustomWindow", (PyCFunction)WinObj_ReshapeCustomWindow, 1,
|
||||||
"() -> None"},
|
"() -> None"},
|
||||||
#endif
|
#endif
|
||||||
|
{"GetWindowWidgetHilite", (PyCFunction)WinObj_GetWindowWidgetHilite, 1,
|
||||||
|
"() -> (WindowDefPartCode outHilite)"},
|
||||||
{"GetWindowClass", (PyCFunction)WinObj_GetWindowClass, 1,
|
{"GetWindowClass", (PyCFunction)WinObj_GetWindowClass, 1,
|
||||||
"() -> (WindowClass outClass)"},
|
"() -> (WindowClass outClass)"},
|
||||||
{"GetWindowAttributes", (PyCFunction)WinObj_GetWindowAttributes, 1,
|
{"GetWindowAttributes", (PyCFunction)WinObj_GetWindowAttributes, 1,
|
||||||
"() -> (WindowAttributes outAttributes)"},
|
"() -> (WindowAttributes outAttributes)"},
|
||||||
|
|
||||||
#if TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_OS8
|
||||||
{"ChangeWindowAttributes", (PyCFunction)WinObj_ChangeWindowAttributes, 1,
|
{"ChangeWindowAttributes", (PyCFunction)WinObj_ChangeWindowAttributes, 1,
|
||||||
"(WindowAttributes setTheseAttributes, WindowAttributes clearTheseAttributes) -> None"},
|
"(WindowAttributes setTheseAttributes, WindowAttributes clearTheseAttributes) -> None"},
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if !TARGET_API_MAC_OS8
|
||||||
|
{"SetWindowClass", (PyCFunction)WinObj_SetWindowClass, 1,
|
||||||
|
"(WindowClass inWindowClass) -> None"},
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !TARGET_API_MAC_OS8
|
||||||
|
{"SetWindowModality", (PyCFunction)WinObj_SetWindowModality, 1,
|
||||||
|
"(WindowModality inModalKind, WindowPtr inUnavailableWindow) -> None"},
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !TARGET_API_MAC_OS8
|
||||||
|
{"GetWindowModality", (PyCFunction)WinObj_GetWindowModality, 1,
|
||||||
|
"() -> (WindowModality outModalKind, WindowPtr outUnavailableWindow)"},
|
||||||
|
#endif
|
||||||
|
|
||||||
#if !TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
{"SetWinColor", (PyCFunction)WinObj_SetWinColor, 1,
|
{"SetWinColor", (PyCFunction)WinObj_SetWinColor, 1,
|
||||||
"(WCTabHandle newColorTable) -> None"},
|
"(WCTabHandle newColorTable) -> None"},
|
||||||
|
@ -2193,12 +2629,12 @@ static PyMethodDef WinObj_methods[] = {
|
||||||
{"SetWindowContentPattern", (PyCFunction)WinObj_SetWindowContentPattern, 1,
|
{"SetWindowContentPattern", (PyCFunction)WinObj_SetWindowContentPattern, 1,
|
||||||
"(PixPatHandle pixPat) -> None"},
|
"(PixPatHandle pixPat) -> None"},
|
||||||
|
|
||||||
#if TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_OS8
|
||||||
{"ScrollWindowRect", (PyCFunction)WinObj_ScrollWindowRect, 1,
|
{"ScrollWindowRect", (PyCFunction)WinObj_ScrollWindowRect, 1,
|
||||||
"(Rect inScrollRect, SInt16 inHPixels, SInt16 inVPixels, ScrollWindowOptions inOptions, RgnHandle outExposedRgn) -> None"},
|
"(Rect inScrollRect, SInt16 inHPixels, SInt16 inVPixels, ScrollWindowOptions inOptions, RgnHandle outExposedRgn) -> None"},
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_OS8
|
||||||
{"ScrollWindowRegion", (PyCFunction)WinObj_ScrollWindowRegion, 1,
|
{"ScrollWindowRegion", (PyCFunction)WinObj_ScrollWindowRegion, 1,
|
||||||
"(RgnHandle inScrollRgn, SInt16 inHPixels, SInt16 inVPixels, ScrollWindowOptions inOptions, RgnHandle outExposedRgn) -> None"},
|
"(RgnHandle inScrollRgn, SInt16 inHPixels, SInt16 inVPixels, ScrollWindowOptions inOptions, RgnHandle outExposedRgn) -> None"},
|
||||||
#endif
|
#endif
|
||||||
|
@ -2229,11 +2665,21 @@ static PyMethodDef WinObj_methods[] = {
|
||||||
{"SelectWindow", (PyCFunction)WinObj_SelectWindow, 1,
|
{"SelectWindow", (PyCFunction)WinObj_SelectWindow, 1,
|
||||||
"() -> None"},
|
"() -> None"},
|
||||||
|
|
||||||
#if TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_OS8
|
||||||
{"GetNextWindowOfClass", (PyCFunction)WinObj_GetNextWindowOfClass, 1,
|
{"GetNextWindowOfClass", (PyCFunction)WinObj_GetNextWindowOfClass, 1,
|
||||||
"(WindowClass inWindowClass, Boolean mustBeVisible) -> (WindowPtr _rv)"},
|
"(WindowClass inWindowClass, Boolean mustBeVisible) -> (WindowPtr _rv)"},
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if !TARGET_API_MAC_OS8
|
||||||
|
{"SetWindowAlternateTitle", (PyCFunction)WinObj_SetWindowAlternateTitle, 1,
|
||||||
|
"(CFStringRef inTitle) -> None"},
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !TARGET_API_MAC_OS8
|
||||||
|
{"CopyWindowAlternateTitle", (PyCFunction)WinObj_CopyWindowAlternateTitle, 1,
|
||||||
|
"() -> (CFStringRef outTitle)"},
|
||||||
|
#endif
|
||||||
|
|
||||||
#if !TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
{"IsValidWindowPtr", (PyCFunction)WinObj_IsValidWindowPtr, 1,
|
{"IsValidWindowPtr", (PyCFunction)WinObj_IsValidWindowPtr, 1,
|
||||||
"() -> (Boolean _rv)"},
|
"() -> (Boolean _rv)"},
|
||||||
|
@ -2254,6 +2700,8 @@ static PyMethodDef WinObj_methods[] = {
|
||||||
"() -> (UInt32 outFeatures)"},
|
"() -> (UInt32 outFeatures)"},
|
||||||
{"GetWindowRegion", (PyCFunction)WinObj_GetWindowRegion, 1,
|
{"GetWindowRegion", (PyCFunction)WinObj_GetWindowRegion, 1,
|
||||||
"(WindowRegionCode inRegionCode, RgnHandle ioWinRgn) -> None"},
|
"(WindowRegionCode inRegionCode, RgnHandle ioWinRgn) -> None"},
|
||||||
|
{"GetWindowStructureWidths", (PyCFunction)WinObj_GetWindowStructureWidths, 1,
|
||||||
|
"() -> (Rect outRect)"},
|
||||||
{"BeginUpdate", (PyCFunction)WinObj_BeginUpdate, 1,
|
{"BeginUpdate", (PyCFunction)WinObj_BeginUpdate, 1,
|
||||||
"() -> None"},
|
"() -> None"},
|
||||||
{"EndUpdate", (PyCFunction)WinObj_EndUpdate, 1,
|
{"EndUpdate", (PyCFunction)WinObj_EndUpdate, 1,
|
||||||
|
@ -2272,6 +2720,16 @@ static PyMethodDef WinObj_methods[] = {
|
||||||
"(Str255 title) -> None"},
|
"(Str255 title) -> None"},
|
||||||
{"GetWTitle", (PyCFunction)WinObj_GetWTitle, 1,
|
{"GetWTitle", (PyCFunction)WinObj_GetWTitle, 1,
|
||||||
"() -> (Str255 title)"},
|
"() -> (Str255 title)"},
|
||||||
|
|
||||||
|
#if !TARGET_API_MAC_OS8
|
||||||
|
{"SetWindowTitleWithCFString", (PyCFunction)WinObj_SetWindowTitleWithCFString, 1,
|
||||||
|
"(CFStringRef inString) -> None"},
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !TARGET_API_MAC_OS8
|
||||||
|
{"CopyWindowTitleAsCFString", (PyCFunction)WinObj_CopyWindowTitleAsCFString, 1,
|
||||||
|
"() -> (CFStringRef outString)"},
|
||||||
|
#endif
|
||||||
{"SetWindowProxyFSSpec", (PyCFunction)WinObj_SetWindowProxyFSSpec, 1,
|
{"SetWindowProxyFSSpec", (PyCFunction)WinObj_SetWindowProxyFSSpec, 1,
|
||||||
"(FSSpec inFile) -> None"},
|
"(FSSpec inFile) -> None"},
|
||||||
{"GetWindowProxyFSSpec", (PyCFunction)WinObj_GetWindowProxyFSSpec, 1,
|
{"GetWindowProxyFSSpec", (PyCFunction)WinObj_GetWindowProxyFSSpec, 1,
|
||||||
|
@ -2308,6 +2766,11 @@ static PyMethodDef WinObj_methods[] = {
|
||||||
"(Boolean hilited) -> None"},
|
"(Boolean hilited) -> None"},
|
||||||
{"TransitionWindow", (PyCFunction)WinObj_TransitionWindow, 1,
|
{"TransitionWindow", (PyCFunction)WinObj_TransitionWindow, 1,
|
||||||
"(WindowTransitionEffect effect, WindowTransitionAction action, Rect rect) -> None"},
|
"(WindowTransitionEffect effect, WindowTransitionAction action, Rect rect) -> None"},
|
||||||
|
|
||||||
|
#if TARGET_API_MAC_OSX
|
||||||
|
{"TransitionWindowAndParent", (PyCFunction)WinObj_TransitionWindowAndParent, 1,
|
||||||
|
"(WindowPtr parentWindow, WindowTransitionEffect effect, WindowTransitionAction action, Rect rect) -> None"},
|
||||||
|
#endif
|
||||||
{"MacMoveWindow", (PyCFunction)WinObj_MacMoveWindow, 1,
|
{"MacMoveWindow", (PyCFunction)WinObj_MacMoveWindow, 1,
|
||||||
"(short hGlobal, short vGlobal, Boolean front) -> None"},
|
"(short hGlobal, short vGlobal, Boolean front) -> None"},
|
||||||
{"SizeWindow", (PyCFunction)WinObj_SizeWindow, 1,
|
{"SizeWindow", (PyCFunction)WinObj_SizeWindow, 1,
|
||||||
|
@ -2341,20 +2804,47 @@ static PyMethodDef WinObj_methods[] = {
|
||||||
{"GetWindowIdealUserState", (PyCFunction)WinObj_GetWindowIdealUserState, 1,
|
{"GetWindowIdealUserState", (PyCFunction)WinObj_GetWindowIdealUserState, 1,
|
||||||
"() -> (Rect userState)"},
|
"() -> (Rect userState)"},
|
||||||
{"SetWindowIdealUserState", (PyCFunction)WinObj_SetWindowIdealUserState, 1,
|
{"SetWindowIdealUserState", (PyCFunction)WinObj_SetWindowIdealUserState, 1,
|
||||||
"() -> (Rect userState)"},
|
"(Rect userState) -> None"},
|
||||||
|
|
||||||
|
#if !TARGET_API_MAC_OS8
|
||||||
|
{"GetWindowGreatestAreaDevice", (PyCFunction)WinObj_GetWindowGreatestAreaDevice, 1,
|
||||||
|
"(WindowRegionCode inRegion) -> (GDHandle outGreatestDevice, Rect outGreatestDeviceRect)"},
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !TARGET_API_MAC_OS8
|
||||||
|
{"ConstrainWindowToScreen", (PyCFunction)WinObj_ConstrainWindowToScreen, 1,
|
||||||
|
"(WindowRegionCode inRegionCode, WindowConstrainOptions inOptions, Rect inScreenRect) -> (Rect outStructure)"},
|
||||||
|
#endif
|
||||||
{"HideWindow", (PyCFunction)WinObj_HideWindow, 1,
|
{"HideWindow", (PyCFunction)WinObj_HideWindow, 1,
|
||||||
"() -> None"},
|
"() -> None"},
|
||||||
{"MacShowWindow", (PyCFunction)WinObj_MacShowWindow, 1,
|
{"MacShowWindow", (PyCFunction)WinObj_MacShowWindow, 1,
|
||||||
"() -> None"},
|
"() -> None"},
|
||||||
{"ShowHide", (PyCFunction)WinObj_ShowHide, 1,
|
{"ShowHide", (PyCFunction)WinObj_ShowHide, 1,
|
||||||
"(Boolean showFlag) -> None"},
|
"(Boolean showFlag) -> None"},
|
||||||
|
{"MacIsWindowVisible", (PyCFunction)WinObj_MacIsWindowVisible, 1,
|
||||||
|
"() -> (Boolean _rv)"},
|
||||||
|
|
||||||
#if TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_OS8
|
||||||
|
{"ShowSheetWindow", (PyCFunction)WinObj_ShowSheetWindow, 1,
|
||||||
|
"(WindowPtr inParentWindow) -> None"},
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !TARGET_API_MAC_OS8
|
||||||
|
{"HideSheetWindow", (PyCFunction)WinObj_HideSheetWindow, 1,
|
||||||
|
"() -> None"},
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !TARGET_API_MAC_OS8
|
||||||
|
{"GetSheetWindowParent", (PyCFunction)WinObj_GetSheetWindowParent, 1,
|
||||||
|
"() -> (WindowPtr outParentWindow)"},
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !TARGET_API_MAC_OS8
|
||||||
{"GetWindowPropertyAttributes", (PyCFunction)WinObj_GetWindowPropertyAttributes, 1,
|
{"GetWindowPropertyAttributes", (PyCFunction)WinObj_GetWindowPropertyAttributes, 1,
|
||||||
"(OSType propertyCreator, OSType propertyTag) -> (UInt32 attributes)"},
|
"(OSType propertyCreator, OSType propertyTag) -> (UInt32 attributes)"},
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_OS8
|
||||||
{"ChangeWindowPropertyAttributes", (PyCFunction)WinObj_ChangeWindowPropertyAttributes, 1,
|
{"ChangeWindowPropertyAttributes", (PyCFunction)WinObj_ChangeWindowPropertyAttributes, 1,
|
||||||
"(OSType propertyCreator, OSType propertyTag, UInt32 attributesToSet, UInt32 attributesToClear) -> None"},
|
"(OSType propertyCreator, OSType propertyTag, UInt32 attributesToSet, UInt32 attributesToClear) -> None"},
|
||||||
#endif
|
#endif
|
||||||
|
@ -2381,12 +2871,10 @@ static PyMethodDef WinObj_methods[] = {
|
||||||
"() -> (CGrafPtr _rv)"},
|
"() -> (CGrafPtr _rv)"},
|
||||||
{"GetWindowKind", (PyCFunction)WinObj_GetWindowKind, 1,
|
{"GetWindowKind", (PyCFunction)WinObj_GetWindowKind, 1,
|
||||||
"() -> (short _rv)"},
|
"() -> (short _rv)"},
|
||||||
{"MacIsWindowVisible", (PyCFunction)WinObj_MacIsWindowVisible, 1,
|
|
||||||
"() -> (Boolean _rv)"},
|
|
||||||
{"IsWindowHilited", (PyCFunction)WinObj_IsWindowHilited, 1,
|
{"IsWindowHilited", (PyCFunction)WinObj_IsWindowHilited, 1,
|
||||||
"() -> (Boolean _rv)"},
|
"() -> (Boolean _rv)"},
|
||||||
|
|
||||||
#if TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_OS8
|
||||||
{"IsWindowUpdatePending", (PyCFunction)WinObj_IsWindowUpdatePending, 1,
|
{"IsWindowUpdatePending", (PyCFunction)WinObj_IsWindowUpdatePending, 1,
|
||||||
"() -> (Boolean _rv)"},
|
"() -> (Boolean _rv)"},
|
||||||
#endif
|
#endif
|
||||||
|
@ -2781,7 +3269,7 @@ static PyObject *Win_FrontNonFloatingWindow(PyObject *_self, PyObject *_args)
|
||||||
return _res;
|
return _res;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_OS8
|
||||||
|
|
||||||
static PyObject *Win_GetFrontWindowOfClass(PyObject *_self, PyObject *_args)
|
static PyObject *Win_GetFrontWindowOfClass(PyObject *_self, PyObject *_args)
|
||||||
{
|
{
|
||||||
|
@ -2804,7 +3292,7 @@ static PyObject *Win_GetFrontWindowOfClass(PyObject *_self, PyObject *_args)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_OS8
|
||||||
|
|
||||||
static PyObject *Win_FindWindowOfClass(PyObject *_self, PyObject *_args)
|
static PyObject *Win_FindWindowOfClass(PyObject *_self, PyObject *_args)
|
||||||
{
|
{
|
||||||
|
@ -2833,6 +3321,29 @@ static PyObject *Win_FindWindowOfClass(PyObject *_self, PyObject *_args)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if !TARGET_API_MAC_OS8
|
||||||
|
|
||||||
|
static PyObject *Win_CreateStandardWindowMenu(PyObject *_self, PyObject *_args)
|
||||||
|
{
|
||||||
|
PyObject *_res = NULL;
|
||||||
|
OSStatus _err;
|
||||||
|
OptionBits inOptions;
|
||||||
|
MenuHandle outMenu;
|
||||||
|
#ifndef CreateStandardWindowMenu
|
||||||
|
PyMac_PRECHECK(CreateStandardWindowMenu);
|
||||||
|
#endif
|
||||||
|
if (!PyArg_ParseTuple(_args, "l",
|
||||||
|
&inOptions))
|
||||||
|
return NULL;
|
||||||
|
_err = CreateStandardWindowMenu(inOptions,
|
||||||
|
&outMenu);
|
||||||
|
if (_err != noErr) return PyMac_Error(_err);
|
||||||
|
_res = Py_BuildValue("O&",
|
||||||
|
MenuObj_New, outMenu);
|
||||||
|
return _res;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#if !TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
|
|
||||||
static PyObject *Win_InitWindows(PyObject *_self, PyObject *_args)
|
static PyObject *Win_InitWindows(PyObject *_self, PyObject *_args)
|
||||||
|
@ -2999,6 +3510,67 @@ static PyObject *Win_CollapseAllWindows(PyObject *_self, PyObject *_args)
|
||||||
return _res;
|
return _res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if !TARGET_API_MAC_OS8
|
||||||
|
|
||||||
|
static PyObject *Win_GetAvailableWindowPositioningBounds(PyObject *_self, PyObject *_args)
|
||||||
|
{
|
||||||
|
PyObject *_res = NULL;
|
||||||
|
OSStatus _err;
|
||||||
|
GDHandle inDevice;
|
||||||
|
Rect availableRect;
|
||||||
|
#ifndef GetAvailableWindowPositioningBounds
|
||||||
|
PyMac_PRECHECK(GetAvailableWindowPositioningBounds);
|
||||||
|
#endif
|
||||||
|
if (!PyArg_ParseTuple(_args, "O&",
|
||||||
|
ResObj_Convert, &inDevice))
|
||||||
|
return NULL;
|
||||||
|
_err = GetAvailableWindowPositioningBounds(inDevice,
|
||||||
|
&availableRect);
|
||||||
|
if (_err != noErr) return PyMac_Error(_err);
|
||||||
|
_res = Py_BuildValue("O&",
|
||||||
|
PyMac_BuildRect, &availableRect);
|
||||||
|
return _res;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !TARGET_API_MAC_OS8
|
||||||
|
|
||||||
|
static PyObject *Win_DisableScreenUpdates(PyObject *_self, PyObject *_args)
|
||||||
|
{
|
||||||
|
PyObject *_res = NULL;
|
||||||
|
OSStatus _err;
|
||||||
|
#ifndef DisableScreenUpdates
|
||||||
|
PyMac_PRECHECK(DisableScreenUpdates);
|
||||||
|
#endif
|
||||||
|
if (!PyArg_ParseTuple(_args, ""))
|
||||||
|
return NULL;
|
||||||
|
_err = DisableScreenUpdates();
|
||||||
|
if (_err != noErr) return PyMac_Error(_err);
|
||||||
|
Py_INCREF(Py_None);
|
||||||
|
_res = Py_None;
|
||||||
|
return _res;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !TARGET_API_MAC_OS8
|
||||||
|
|
||||||
|
static PyObject *Win_EnableScreenUpdates(PyObject *_self, PyObject *_args)
|
||||||
|
{
|
||||||
|
PyObject *_res = NULL;
|
||||||
|
OSStatus _err;
|
||||||
|
#ifndef EnableScreenUpdates
|
||||||
|
PyMac_PRECHECK(EnableScreenUpdates);
|
||||||
|
#endif
|
||||||
|
if (!PyArg_ParseTuple(_args, ""))
|
||||||
|
return NULL;
|
||||||
|
_err = EnableScreenUpdates();
|
||||||
|
if (_err != noErr) return PyMac_Error(_err);
|
||||||
|
Py_INCREF(Py_None);
|
||||||
|
_res = Py_None;
|
||||||
|
return _res;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static PyObject *Win_PinRect(PyObject *_self, PyObject *_args)
|
static PyObject *Win_PinRect(PyObject *_self, PyObject *_args)
|
||||||
{
|
{
|
||||||
PyObject *_res = NULL;
|
PyObject *_res = NULL;
|
||||||
|
@ -3117,16 +3689,21 @@ static PyMethodDef Win_methods[] = {
|
||||||
{"FrontNonFloatingWindow", (PyCFunction)Win_FrontNonFloatingWindow, 1,
|
{"FrontNonFloatingWindow", (PyCFunction)Win_FrontNonFloatingWindow, 1,
|
||||||
"() -> (WindowPtr _rv)"},
|
"() -> (WindowPtr _rv)"},
|
||||||
|
|
||||||
#if TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_OS8
|
||||||
{"GetFrontWindowOfClass", (PyCFunction)Win_GetFrontWindowOfClass, 1,
|
{"GetFrontWindowOfClass", (PyCFunction)Win_GetFrontWindowOfClass, 1,
|
||||||
"(WindowClass inWindowClass, Boolean mustBeVisible) -> (WindowPtr _rv)"},
|
"(WindowClass inWindowClass, Boolean mustBeVisible) -> (WindowPtr _rv)"},
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_OS8
|
||||||
{"FindWindowOfClass", (PyCFunction)Win_FindWindowOfClass, 1,
|
{"FindWindowOfClass", (PyCFunction)Win_FindWindowOfClass, 1,
|
||||||
"(Point where, WindowClass inWindowClass) -> (WindowPtr outWindow, WindowPartCode outWindowPart)"},
|
"(Point where, WindowClass inWindowClass) -> (WindowPtr outWindow, WindowPartCode outWindowPart)"},
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if !TARGET_API_MAC_OS8
|
||||||
|
{"CreateStandardWindowMenu", (PyCFunction)Win_CreateStandardWindowMenu, 1,
|
||||||
|
"(OptionBits inOptions) -> (MenuHandle outMenu)"},
|
||||||
|
#endif
|
||||||
|
|
||||||
#if !TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
{"InitWindows", (PyCFunction)Win_InitWindows, 1,
|
{"InitWindows", (PyCFunction)Win_InitWindows, 1,
|
||||||
"() -> None"},
|
"() -> None"},
|
||||||
|
@ -3168,6 +3745,21 @@ static PyMethodDef Win_methods[] = {
|
||||||
#endif
|
#endif
|
||||||
{"CollapseAllWindows", (PyCFunction)Win_CollapseAllWindows, 1,
|
{"CollapseAllWindows", (PyCFunction)Win_CollapseAllWindows, 1,
|
||||||
"(Boolean collapse) -> None"},
|
"(Boolean collapse) -> None"},
|
||||||
|
|
||||||
|
#if !TARGET_API_MAC_OS8
|
||||||
|
{"GetAvailableWindowPositioningBounds", (PyCFunction)Win_GetAvailableWindowPositioningBounds, 1,
|
||||||
|
"(GDHandle inDevice) -> (Rect availableRect)"},
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !TARGET_API_MAC_OS8
|
||||||
|
{"DisableScreenUpdates", (PyCFunction)Win_DisableScreenUpdates, 1,
|
||||||
|
"() -> None"},
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !TARGET_API_MAC_OS8
|
||||||
|
{"EnableScreenUpdates", (PyCFunction)Win_EnableScreenUpdates, 1,
|
||||||
|
"() -> None"},
|
||||||
|
#endif
|
||||||
{"PinRect", (PyCFunction)Win_PinRect, 1,
|
{"PinRect", (PyCFunction)Win_PinRect, 1,
|
||||||
"(Rect theRect, Point thePt) -> (long _rv)"},
|
"(Rect theRect, Point thePt) -> (long _rv)"},
|
||||||
{"GetGrayRgn", (PyCFunction)Win_GetGrayRgn, 1,
|
{"GetGrayRgn", (PyCFunction)Win_GetGrayRgn, 1,
|
||||||
|
|
|
@ -71,7 +71,7 @@ class MyScanner(Scanner):
|
||||||
'GetWindowGoAwayFlag',
|
'GetWindowGoAwayFlag',
|
||||||
'GetWindowSpareFlag',
|
'GetWindowSpareFlag',
|
||||||
]),
|
]),
|
||||||
('#if TARGET_API_MAC_CARBON', [
|
('#if !TARGET_API_MAC_OS8', [
|
||||||
'IsWindowUpdatePending',
|
'IsWindowUpdatePending',
|
||||||
'FindWindowOfClass',
|
'FindWindowOfClass',
|
||||||
'GetFrontWindowOfClass',
|
'GetFrontWindowOfClass',
|
||||||
|
@ -82,6 +82,28 @@ class MyScanner(Scanner):
|
||||||
'ScrollWindowRect',
|
'ScrollWindowRect',
|
||||||
'ChangeWindowAttributes',
|
'ChangeWindowAttributes',
|
||||||
'ReshapeCustomWindow',
|
'ReshapeCustomWindow',
|
||||||
|
'EnableScreenUpdates',
|
||||||
|
'DisableScreenUpdates',
|
||||||
|
'GetAvailableWindowPositioningBounds',
|
||||||
|
'CreateStandardWindowMenu',
|
||||||
|
'GetSheetWindowParent',
|
||||||
|
'HideSheetWindow',
|
||||||
|
'ShowSheetWindow',
|
||||||
|
'ConstrainWindowToScreen',
|
||||||
|
'GetWindowGreatestAreaDevice',
|
||||||
|
'CopyWindowTitleAsCFString',
|
||||||
|
'SetWindowTitleWithCFString',
|
||||||
|
'CopyWindowAlternateTitle',
|
||||||
|
'SetWindowAlternateTitle',
|
||||||
|
'GetWindowModality',
|
||||||
|
'SetWindowModality',
|
||||||
|
'SetWindowClass',
|
||||||
|
'ReleaseWindow',
|
||||||
|
'RetainWindow',
|
||||||
|
'GetWindowRetainCount',
|
||||||
|
]),
|
||||||
|
('#if TARGET_API_MAC_OSX', [
|
||||||
|
'TransitionWindowAndParent',
|
||||||
])]
|
])]
|
||||||
|
|
||||||
def makeblacklisttypes(self):
|
def makeblacklisttypes(self):
|
||||||
|
@ -92,6 +114,7 @@ class MyScanner(Scanner):
|
||||||
'Collection', # For now, to be done later
|
'Collection', # For now, to be done later
|
||||||
'WindowDefSpec', # Too difficult for now
|
'WindowDefSpec', # Too difficult for now
|
||||||
'WindowDefSpec_ptr',
|
'WindowDefSpec_ptr',
|
||||||
|
'EventRef', #TBD
|
||||||
]
|
]
|
||||||
|
|
||||||
def makerepairinstructions(self):
|
def makerepairinstructions(self):
|
||||||
|
|
|
@ -49,6 +49,11 @@ RGBColor = OpaqueType("RGBColor", "QdRGB")
|
||||||
RGBColor_ptr = RGBColor
|
RGBColor_ptr = RGBColor
|
||||||
ScrollWindowOptions = Type("ScrollWindowOptions", "l")
|
ScrollWindowOptions = Type("ScrollWindowOptions", "l")
|
||||||
WindowPartCode = Type("WindowPartCode", "h")
|
WindowPartCode = Type("WindowPartCode", "h")
|
||||||
|
WindowDefPartCode = Type("WindowDefPartCode", "h")
|
||||||
|
WindowModality = Type("WindowModality", "l")
|
||||||
|
CFStringRef = OpaqueByValueType("CFStringRef", "CFStringRefObj")
|
||||||
|
GDHandle = OpaqueByValueType("GDHandle", "ResObj")
|
||||||
|
WindowConstrainOptions = Type("WindowConstrainOptions", "l")
|
||||||
|
|
||||||
PropertyCreator = OSTypeType("PropertyCreator")
|
PropertyCreator = OSTypeType("PropertyCreator")
|
||||||
PropertyTag = OSTypeType("PropertyTag")
|
PropertyTag = OSTypeType("PropertyTag")
|
||||||
|
|
Loading…
Reference in New Issue