Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
620a7667
Commit
620a7667
authored
Dec 18, 2001
by
Jack Jansen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated to Universal Headers 3.4
parent
f30c3ad0
Changes
31
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
31 changed files
with
1835 additions
and
68 deletions
+1835
-68
Mac/Modules/app/_Appmodule.c
Mac/Modules/app/_Appmodule.c
+4
-0
Mac/Modules/cf/_CFmodule.c
Mac/Modules/cf/_CFmodule.c
+4
-0
Mac/Modules/cg/_CGmodule.c
Mac/Modules/cg/_CGmodule.c
+4
-0
Mac/Modules/cm/_Cmmodule.c
Mac/Modules/cm/_Cmmodule.c
+4
-0
Mac/Modules/ctl/_Ctlmodule.c
Mac/Modules/ctl/_Ctlmodule.c
+4
-0
Mac/Modules/dlg/_Dlgmodule.c
Mac/Modules/dlg/_Dlgmodule.c
+4
-0
Mac/Modules/drag/_Dragmodule.c
Mac/Modules/drag/_Dragmodule.c
+4
-0
Mac/Modules/evt/evtedit.py
Mac/Modules/evt/evtedit.py
+4
-0
Mac/Modules/fm/_Fmmodule.c
Mac/Modules/fm/_Fmmodule.c
+4
-0
Mac/Modules/help/_Helpmodule.c
Mac/Modules/help/_Helpmodule.c
+4
-0
Mac/Modules/icn/_Icnmodule.c
Mac/Modules/icn/_Icnmodule.c
+4
-0
Mac/Modules/list/_Listmodule.c
Mac/Modules/list/_Listmodule.c
+4
-0
Mac/Modules/menu/_Menumodule.c
Mac/Modules/menu/_Menumodule.c
+4
-0
Mac/Modules/mlte/_Mltemodule.c
Mac/Modules/mlte/_Mltemodule.c
+152
-14
Mac/Modules/mlte/mltescan.py
Mac/Modules/mlte/mltescan.py
+8
-1
Mac/Modules/mlte/mltesupport.py
Mac/Modules/mlte/mltesupport.py
+1
-0
Mac/Modules/qd/_Qdmodule.c
Mac/Modules/qd/_Qdmodule.c
+570
-0
Mac/Modules/qd/qdscan.py
Mac/Modules/qd/qdscan.py
+5
-0
Mac/Modules/qd/qdsupport.py
Mac/Modules/qd/qdsupport.py
+1
-0
Mac/Modules/qdoffs/_Qdoffsmodule.c
Mac/Modules/qdoffs/_Qdoffsmodule.c
+4
-0
Mac/Modules/qt/_Qtmodule.c
Mac/Modules/qt/_Qtmodule.c
+305
-12
Mac/Modules/qt/qtscan.py
Mac/Modules/qt/qtscan.py
+5
-0
Mac/Modules/res/_Resmodule.c
Mac/Modules/res/_Resmodule.c
+53
-0
Mac/Modules/res/resscan.py
Mac/Modules/res/resscan.py
+5
-0
Mac/Modules/res/ressupport.py
Mac/Modules/res/ressupport.py
+1
-0
Mac/Modules/snd/_Sndmodule.c
Mac/Modules/snd/_Sndmodule.c
+4
-0
Mac/Modules/te/_TEmodule.c
Mac/Modules/te/_TEmodule.c
+4
-0
Mac/Modules/waste/wastemodule.c
Mac/Modules/waste/wastemodule.c
+4
-0
Mac/Modules/win/_Winmodule.c
Mac/Modules/win/_Winmodule.c
+632
-40
Mac/Modules/win/winscan.py
Mac/Modules/win/winscan.py
+24
-1
Mac/Modules/win/winsupport.py
Mac/Modules/win/winsupport.py
+5
-0
No files found.
Mac/Modules/app/_Appmodule.c
View file @
620a7667
...
...
@@ -5,8 +5,12 @@
#ifdef _WIN32
#include "pywintoolbox.h"
#else
#include "macglue.h"
#include "pymactoolbox.h"
#endif
/* Macro to test whether a weak-loaded CFM function exists */
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
...
...
Mac/Modules/cf/_CFmodule.c
View file @
620a7667
...
...
@@ -5,8 +5,12 @@
#ifdef _WIN32
#include "pywintoolbox.h"
#else
#include "macglue.h"
#include "pymactoolbox.h"
#endif
/* Macro to test whether a weak-loaded CFM function exists */
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
...
...
Mac/Modules/cg/_CGmodule.c
View file @
620a7667
...
...
@@ -5,8 +5,12 @@
#ifdef _WIN32
#include "pywintoolbox.h"
#else
#include "macglue.h"
#include "pymactoolbox.h"
#endif
/* Macro to test whether a weak-loaded CFM function exists */
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
...
...
Mac/Modules/cm/_Cmmodule.c
View file @
620a7667
...
...
@@ -5,8 +5,12 @@
#ifdef _WIN32
#include "pywintoolbox.h"
#else
#include "macglue.h"
#include "pymactoolbox.h"
#endif
/* Macro to test whether a weak-loaded CFM function exists */
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
...
...
Mac/Modules/ctl/_Ctlmodule.c
View file @
620a7667
...
...
@@ -5,8 +5,12 @@
#ifdef _WIN32
#include "pywintoolbox.h"
#else
#include "macglue.h"
#include "pymactoolbox.h"
#endif
/* Macro to test whether a weak-loaded CFM function exists */
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
...
...
Mac/Modules/dlg/_Dlgmodule.c
View file @
620a7667
...
...
@@ -5,8 +5,12 @@
#ifdef _WIN32
#include "pywintoolbox.h"
#else
#include "macglue.h"
#include "pymactoolbox.h"
#endif
/* Macro to test whether a weak-loaded CFM function exists */
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
...
...
Mac/Modules/drag/_Dragmodule.c
View file @
620a7667
...
...
@@ -5,8 +5,12 @@
#ifdef _WIN32
#include "pywintoolbox.h"
#else
#include "macglue.h"
#include "pymactoolbox.h"
#endif
/* Macro to test whether a weak-loaded CFM function exists */
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
...
...
Mac/Modules/evt/evtedit.py
View file @
620a7667
...
...
@@ -4,3 +4,7 @@ f = Function(void, 'SystemClick',
)
functions
.
append
(
f
)
f
=
Function
(
UInt32
,
'TickCount'
,
)
functions
.
append
(
f
)
Mac/Modules/fm/_Fmmodule.c
View file @
620a7667
...
...
@@ -5,8 +5,12 @@
#ifdef _WIN32
#include "pywintoolbox.h"
#else
#include "macglue.h"
#include "pymactoolbox.h"
#endif
/* Macro to test whether a weak-loaded CFM function exists */
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
...
...
Mac/Modules/help/_Helpmodule.c
View file @
620a7667
...
...
@@ -5,8 +5,12 @@
#ifdef _WIN32
#include "pywintoolbox.h"
#else
#include "macglue.h"
#include "pymactoolbox.h"
#endif
/* Macro to test whether a weak-loaded CFM function exists */
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
...
...
Mac/Modules/icn/_Icnmodule.c
View file @
620a7667
...
...
@@ -5,8 +5,12 @@
#ifdef _WIN32
#include "pywintoolbox.h"
#else
#include "macglue.h"
#include "pymactoolbox.h"
#endif
/* Macro to test whether a weak-loaded CFM function exists */
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
...
...
Mac/Modules/list/_Listmodule.c
View file @
620a7667
...
...
@@ -5,8 +5,12 @@
#ifdef _WIN32
#include "pywintoolbox.h"
#else
#include "macglue.h"
#include "pymactoolbox.h"
#endif
/* Macro to test whether a weak-loaded CFM function exists */
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
...
...
Mac/Modules/menu/_Menumodule.c
View file @
620a7667
...
...
@@ -5,8 +5,12 @@
#ifdef _WIN32
#include "pywintoolbox.h"
#else
#include "macglue.h"
#include "pymactoolbox.h"
#endif
/* Macro to test whether a weak-loaded CFM function exists */
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
...
...
Mac/Modules/mlte/_Mltemodule.c
View file @
620a7667
...
...
@@ -5,8 +5,12 @@
#ifdef _WIN32
#include "pywintoolbox.h"
#else
#include "macglue.h"
#include "pymactoolbox.h"
#endif
/* Macro to test whether a weak-loaded CFM function exists */
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
...
...
@@ -241,23 +245,23 @@ static PyObject *TXNObj_TXNClick(TXNObjectObject *_self, PyObject *_args)
return
_res
;
}
#if
0
#if
TARGET_API_MAC_OS8
static
PyObject
*
TXNObj_TXNTSMCheck
(
TXNObjectObject
*
_self
,
PyObject
*
_args
)
{
PyObject
*
_res
=
NULL
;
Boolean
_rv
;
EventRecord iEvent;
EventRecord
i
o
Event
;
#ifndef TXNTSMCheck
PyMac_PRECHECK
(
TXNTSMCheck
);
#endif
if (!PyArg_ParseTuple(_args, "O&",
PyMac_GetEventRecord, &iEvent))
if
(
!
PyArg_ParseTuple
(
_args
,
""
))
return
NULL
;
_rv
=
TXNTSMCheck
(
_self
->
ob_itself
,
&iEvent);
_res = Py_BuildValue("b",
_rv);
&
ioEvent
);
_res
=
Py_BuildValue
(
"bO&"
,
_rv
,
PyMac_BuildEventRecord
,
&
ioEvent
);
return
_res
;
}
#endif
...
...
@@ -606,8 +610,8 @@ static PyObject *TXNObj_TXNCountRunsInRange(TXNObjectObject *_self, PyObject *_a
{
PyObject
*
_res
=
NULL
;
OSStatus
_err
;
UInt32
iStartOffset
;
UInt32
iEndOffset
;
TXNOffset
iStartOffset
;
TXNOffset
iEndOffset
;
ItemCount
oRunCount
;
#ifndef TXNCountRunsInRange
PyMac_PRECHECK
(
TXNCountRunsInRange
);
...
...
@@ -773,7 +777,7 @@ static PyObject *TXNObj_TXNSave(TXNObjectObject *_self, PyObject *_args)
{
PyObject
*
_res
=
NULL
;
OSStatus
_err
;
OS
Type
iType
;
TXNFile
Type
iType
;
OSType
iResType
;
TXNPermanentTextEncodingType
iPermanentEncoding
;
FSSpec
iFileSpecification
;
...
...
@@ -867,6 +871,23 @@ static PyObject *TXNObj_TXNGetViewRect(TXNObjectObject *_self, PyObject *_args)
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
)
{
PyObject
*
_res
=
NULL
;
...
...
@@ -1029,6 +1050,111 @@ static PyObject *TXNObj_TXNPrepareFontMenu(TXNObjectObject *_self, PyObject *_ar
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
[]
=
{
{
"TXNDeleteObject"
,
(
PyCFunction
)
TXNObj_TXNDeleteObject
,
1
,
"() -> None"
},
...
...
@@ -1043,9 +1169,9 @@ static PyMethodDef TXNObj_methods[] = {
{
"TXNClick"
,
(
PyCFunction
)
TXNObj_TXNClick
,
1
,
"(EventRecord iEvent) -> None"
},
#if
0
#if
TARGET_API_MAC_OS8
{
"TXNTSMCheck"
,
(
PyCFunction
)
TXNObj_TXNTSMCheck
,
1
,
"(
EventRecord iEvent) -> (Boolean _rv
)"},
"(
) -> (Boolean _rv, EventRecord ioEvent
)"
},
#endif
{
"TXNSelectAll"
,
(
PyCFunction
)
TXNObj_TXNSelectAll
,
1
,
"() -> None"
},
...
...
@@ -1090,7 +1216,7 @@ static PyMethodDef TXNObj_methods[] = {
{
"TXNSetSelection"
,
(
PyCFunction
)
TXNObj_TXNSetSelection
,
1
,
"(TXNOffset iStartOffset, TXNOffset iEndOffset) -> None"
},
{
"TXNCountRunsInRange"
,
(
PyCFunction
)
TXNObj_TXNCountRunsInRange
,
1
,
"(
UInt32 iStartOffset, UInt32
iEndOffset) -> (ItemCount oRunCount)"
},
"(
TXNOffset iStartOffset, TXNOffset
iEndOffset) -> (ItemCount oRunCount)"
},
{
"TXNDataSize"
,
(
PyCFunction
)
TXNObj_TXNDataSize
,
1
,
"() -> (ByteCount _rv)"
},
{
"TXNGetData"
,
(
PyCFunction
)
TXNObj_TXNGetData
,
1
,
...
...
@@ -1104,7 +1230,7 @@ static PyMethodDef TXNObj_methods[] = {
{
"TXNGetChangeCount"
,
(
PyCFunction
)
TXNObj_TXNGetChangeCount
,
1
,
"() -> (ItemCount _rv)"
},
{
"TXNSave"
,
(
PyCFunction
)
TXNObj_TXNSave
,
1
,
"(
OS
Type iType, OSType iResType, TXNPermanentTextEncodingType iPermanentEncoding, FSSpec iFileSpecification, SInt16 iDataReference, SInt16 iResourceReference) -> None"
},
"(
TXNFile
Type iType, OSType iResType, TXNPermanentTextEncodingType iPermanentEncoding, FSSpec iFileSpecification, SInt16 iDataReference, SInt16 iResourceReference) -> None"
},
{
"TXNRevert"
,
(
PyCFunction
)
TXNObj_TXNRevert
,
1
,
"() -> None"
},
{
"TXNPageSetup"
,
(
PyCFunction
)
TXNObj_TXNPageSetup
,
1
,
...
...
@@ -1113,6 +1239,8 @@ static PyMethodDef TXNObj_methods[] = {
"() -> None"
},
{
"TXNGetViewRect"
,
(
PyCFunction
)
TXNObj_TXNGetViewRect
,
1
,
"() -> (Rect oViewRect)"
},
{
"TXNSetViewRect"
,
(
PyCFunction
)
TXNObj_TXNSetViewRect
,
1
,
"(Rect iViewRect) -> None"
},
{
"TXNAttachObjectToWindow"
,
(
PyCFunction
)
TXNObj_TXNAttachObjectToWindow
,
1
,
"(GWorldPtr iWindow, Boolean iIsActualWindow) -> None"
},
{
"TXNIsObjectAttachedToWindow"
,
(
PyCFunction
)
TXNObj_TXNIsObjectAttachedToWindow
,
1
,
...
...
@@ -1127,6 +1255,16 @@ static PyMethodDef TXNObj_methods[] = {
"(TXNFontMenuObject iTXNFontMenuObject, SInt16 iMenuID, SInt16 iMenuItem) -> None"
},
{
"TXNPrepareFontMenu"
,
(
PyCFunction
)
TXNObj_TXNPrepareFontMenu
,
1
,
"(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
}
};
...
...
Mac/Modules/mlte/mltescan.py
View file @
620a7667
...
...
@@ -77,7 +77,7 @@ MovieFileType = FOUR_CHAR_CODE('moov')
def
makegreylist
(
self
):
return
[
(
'#if
!TARGET_API_MAC_OSX
'
,
[
(
'#if
TARGET_API_MAC_OS8
'
,
[
'TXNTSMCheck'
,
])]
...
...
@@ -94,7 +94,14 @@ MovieFileType = FOUR_CHAR_CODE('moov')
"TXNMatchTextRecord"
,
#TBD
"TXNBackground"
,
#TBD
"UniChar"
,
#TBD
"UniCharCount"
,
#TBD
"UniChar_ptr"
,
#TBD
"TXNFindUPP"
,
"ATSUStyle"
,
#TBD
"TXNActionKeyMapperProcPtr"
,
"TXNActionKeyMapperUPP"
,
"TXNTextBoxOptionsData"
,
"TXNCountOptions"
,
]
def
makerepairinstructions
(
self
):
...
...
Mac/Modules/mlte/mltesupport.py
View file @
620a7667
...
...
@@ -125,6 +125,7 @@ OptRgnHandle = OpaqueByValueType("RgnHandle", "OptResObj")
GWorldPtr
=
OpaqueByValueType
(
"GWorldPtr"
,
"GWorldObj"
)
OptGWorldPtr
=
OpaqueByValueType
(
"GWorldPtr"
,
"OptGWorldObj"
)
MlteInBuffer
=
VarInputBufferType
(
'void *'
,
'ByteCount'
,
'l'
)
CFStringRef
=
OpaqueByValueType
(
"CFStringRef"
,
"CFStringRefObj"
)
OptFSSpecPtr
=
OpaqueByValueType
(
"FSSpec *"
,
"OptFSSpecPtr"
)
OptRectPtr
=
OpaqueByValueType
(
"Rect *"
,
"OptRectPtr"
)
...
...
Mac/Modules/qd/_Qdmodule.c
View file @
620a7667
This diff is collapsed.
Click to expand it.
Mac/Modules/qd/qdscan.py
View file @
620a7667
...
...
@@ -122,6 +122,11 @@ extend = 0x40
'CreateNewPort'
,
'DisposePort'
,
'SetQDError'
,
'IsPortPolyBeingDefined'
,
'QDSetDirtyRegion'
,
'QDGetDirtyRegion'
,
'IsValidPort'
,
'RgnToHandle'
,
])]
...
...
Mac/Modules/qd/qdsupport.py
View file @
620a7667
...
...
@@ -63,6 +63,7 @@ Pattern = StructOutputBufferType('Pattern')
Pattern_ptr
=
StructInputBufferType
(
'Pattern'
)
PenState
=
StructOutputBufferType
(
'PenState'
)
PenState_ptr
=
StructInputBufferType
(
'PenState'
)
TruncCode
=
Type
(
"TruncCode"
,
"h"
)
includestuff
=
includestuff
+
"""
#ifdef WITHOUT_FRAMEWORKS
...
...
Mac/Modules/qdoffs/_Qdoffsmodule.c
View file @
620a7667
...
...
@@ -5,8 +5,12 @@
#ifdef _WIN32
#include "pywintoolbox.h"
#else
#include "macglue.h"
#include "pymactoolbox.h"
#endif
/* Macro to test whether a weak-loaded CFM function exists */
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
...
...
Mac/Modules/qt/_Qtmodule.c
View file @
620a7667
This diff is collapsed.
Click to expand it.
Mac/Modules/qt/qtscan.py
View file @
620a7667
...
...
@@ -144,6 +144,11 @@ class MyScanner(Scanner):
# AddTime and SubtractTime
([(
'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__"
:
...
...
Mac/Modules/res/_Resmodule.c
View file @
620a7667
...
...
@@ -5,8 +5,12 @@
#ifdef _WIN32
#include "pywintoolbox.h"
#else
#include "macglue.h"
#include "pymactoolbox.h"
#endif
/* Macro to test whether a weak-loaded CFM function exists */
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
...
...
@@ -1357,6 +1361,51 @@ static PyObject *Res_GetNextResourceFile(PyObject *_self, PyObject *_args)
}
#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
)
{
PyObject
*
_res
=
NULL
;
...
...
@@ -1518,6 +1567,10 @@ static PyMethodDef Res_methods[] = {
{
"GetNextResourceFile"
,
(
PyCFunction
)
Res_GetNextResourceFile
,
1
,
"(SInt16 curRefNum) -> (OSErr _rv, SInt16 nextRefNum)"
},
#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
,
"Convert a string to a resource object.
\n\n
The created resource object is actually just a handle,
\n
apply AddResource() to write it to a resource file.
\n
See also the Handle() docstring.
\n
"
},
{
"Handle"
,
(
PyCFunction
)
Res_Handle
,
1
,
...
...
Mac/Modules/res/resscan.py
View file @
620a7667
...
...
@@ -46,6 +46,11 @@ class ResourcesScanner(Scanner):
## "MaxSizeRsrc", # GetMaxResourceSize
]
def
makeblacklisttypes
(
self
):
return
[
"UniCharCount"
,
#TBD
]
def
makegreylist
(
self
):
return
[
(
'#if TARGET_API_MAC_OS8'
,
[
...
...
Mac/Modules/res/ressupport.py
View file @
620a7667
...
...
@@ -5,6 +5,7 @@
from
macsupport
import
*
FSRef_ptr
=
OpaqueType
(
"FSRef"
,
"PyMac_BuildFSRef"
,
"PyMac_GetFSRef"
)
class
ResMixIn
:
...
...
Mac/Modules/snd/_Sndmodule.c
View file @
620a7667
...
...
@@ -5,8 +5,12 @@
#ifdef _WIN32
#include "pywintoolbox.h"
#else
#include "macglue.h"
#include "pymactoolbox.h"
#endif
/* Macro to test whether a weak-loaded CFM function exists */
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
...
...
Mac/Modules/te/_TEmodule.c
View file @
620a7667
...
...
@@ -5,8 +5,12 @@
#ifdef _WIN32
#include "pywintoolbox.h"
#else
#include "macglue.h"
#include "pymactoolbox.h"
#endif
/* Macro to test whether a weak-loaded CFM function exists */
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
...
...
Mac/Modules/waste/wastemodule.c
View file @
620a7667
...
...
@@ -5,8 +5,12 @@
#ifdef _WIN32
#include "pywintoolbox.h"
#else
#include "macglue.h"
#include "pymactoolbox.h"
#endif
/* Macro to test whether a weak-loaded CFM function exists */
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
...
...
Mac/Modules/win/_Winmodule.c
View file @
620a7667
This diff is collapsed.
Click to expand it.
Mac/Modules/win/winscan.py
View file @
620a7667
...
...
@@ -71,7 +71,7 @@ class MyScanner(Scanner):
'GetWindowGoAwayFlag'
,
'GetWindowSpareFlag'
,
]),
(
'#if
TARGET_API_MAC_CARBON
'
,
[
(
'#if
!TARGET_API_MAC_OS8
'
,
[
'IsWindowUpdatePending'
,
'FindWindowOfClass'
,
'GetFrontWindowOfClass'
,
...
...
@@ -82,6 +82,28 @@ class MyScanner(Scanner):
'ScrollWindowRect'
,
'ChangeWindowAttributes'
,
'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
):
...
...
@@ -92,6 +114,7 @@ class MyScanner(Scanner):
'Collection'
,
# For now, to be done later
'WindowDefSpec'
,
# Too difficult for now
'WindowDefSpec_ptr'
,
'EventRef'
,
#TBD
]
def
makerepairinstructions
(
self
):
...
...
Mac/Modules/win/winsupport.py
View file @
620a7667
...
...
@@ -49,6 +49,11 @@ RGBColor = OpaqueType("RGBColor", "QdRGB")
RGBColor_ptr
=
RGBColor
ScrollWindowOptions
=
Type
(
"ScrollWindowOptions"
,
"l"
)
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"
)
PropertyTag
=
OSTypeType
(
"PropertyTag"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment