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
46d9e79d
Commit
46d9e79d
authored
Apr 12, 1996
by
Jack Jansen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bgen-generators now drop the python definition file straight in the
Lib:toolbox folder.
parent
819fa1a7
Changes
33
Hide whitespace changes
Inline
Side-by-side
Showing
33 changed files
with
114 additions
and
29 deletions
+114
-29
Mac/Modules/ae/AEmodule.c
Mac/Modules/ae/AEmodule.c
+3
-0
Mac/Modules/ae/aegen.py
Mac/Modules/ae/aegen.py
+1
-1
Mac/Modules/ae/aescan.py
Mac/Modules/ae/aescan.py
+4
-3
Mac/Modules/cm/Cmgen.py
Mac/Modules/cm/Cmgen.py
+1
-1
Mac/Modules/cm/Cmmodule.c
Mac/Modules/cm/Cmmodule.c
+3
-0
Mac/Modules/cm/cmscan.py
Mac/Modules/cm/cmscan.py
+2
-1
Mac/Modules/dlg/dlggen.py
Mac/Modules/dlg/dlggen.py
+1
-1
Mac/Modules/dlg/dlgscan.py
Mac/Modules/dlg/dlgscan.py
+2
-1
Mac/Modules/evt/evtgen.py
Mac/Modules/evt/evtgen.py
+1
-1
Mac/Modules/evt/evtscan.py
Mac/Modules/evt/evtscan.py
+2
-1
Mac/Modules/fm/Fmgen.py
Mac/Modules/fm/Fmgen.py
+1
-1
Mac/Modules/fm/fmscan.py
Mac/Modules/fm/fmscan.py
+2
-1
Mac/Modules/list/listgen.py
Mac/Modules/list/listgen.py
+1
-1
Mac/Modules/list/listscan.py
Mac/Modules/list/listscan.py
+2
-1
Mac/Modules/menu/menugen.py
Mac/Modules/menu/menugen.py
+1
-1
Mac/Modules/menu/menuscan.py
Mac/Modules/menu/menuscan.py
+2
-1
Mac/Modules/qd/qdgen.py
Mac/Modules/qd/qdgen.py
+2
-2
Mac/Modules/qd/qdscan.py
Mac/Modules/qd/qdscan.py
+3
-2
Mac/Modules/qt/Qtmodule.c
Mac/Modules/qt/Qtmodule.c
+3
-0
Mac/Modules/qt/qtgen.py
Mac/Modules/qt/qtgen.py
+1
-1
Mac/Modules/qt/qtscan.py
Mac/Modules/qt/qtscan.py
+2
-1
Mac/Modules/res/Resmodule.c
Mac/Modules/res/Resmodule.c
+3
-0
Mac/Modules/res/resgen.py
Mac/Modules/res/resgen.py
+1
-1
Mac/Modules/res/resscan.py
Mac/Modules/res/resscan.py
+2
-1
Mac/Modules/snd/Sndmodule.c
Mac/Modules/snd/Sndmodule.c
+3
-0
Mac/Modules/snd/sndgen.py
Mac/Modules/snd/sndgen.py
+1
-1
Mac/Modules/snd/sndscan.py
Mac/Modules/snd/sndscan.py
+2
-1
Mac/Modules/te/TEmodule.c
Mac/Modules/te/TEmodule.c
+26
-0
Mac/Modules/te/tescan.py
Mac/Modules/te/tescan.py
+2
-1
Mac/Modules/te/tesupport.py
Mac/Modules/te/tesupport.py
+28
-0
Mac/Modules/win/Winmodule.c
Mac/Modules/win/Winmodule.c
+3
-0
Mac/Modules/win/wingen.py
Mac/Modules/win/wingen.py
+1
-1
Mac/Modules/win/winscan.py
Mac/Modules/win/winscan.py
+2
-1
No files found.
Mac/Modules/ae/AEmodule.c
View file @
46d9e79d
...
...
@@ -40,6 +40,9 @@ extern int GrafObj_Convert(PyObject *, GrafPtr *);
extern
PyObject
*
BMObj_New
(
BitMapPtr
);
extern
int
BMObj_Convert
(
PyObject
*
,
BitMapPtr
*
);
extern
PyObject
*
PMObj_New
(
PixMapHandle
);
extern
int
PMObj_Convert
(
PyObject
*
,
PixMapHandle
*
);
extern
PyObject
*
WinObj_WhichWindow
(
WindowPtr
);
#include <AppleEvents.h>
...
...
Mac/Modules/ae/aegen.py
View file @
46d9e79d
# Generated from 'Sap:C
odeWarrior7
:Metrowerks CodeWarrior:MacOS Support:Headers:Universal Headers:AppleEvents.h'
# Generated from 'Sap:C
W8 Gold
:Metrowerks CodeWarrior:MacOS Support:Headers:Universal Headers:AppleEvents.h'
f
=
AEFunction
(
OSErr
,
'AECreateDesc'
,
(
DescType
,
'typeCode'
,
InMode
),
...
...
Mac/Modules/ae/aescan.py
View file @
46d9e79d
...
...
@@ -10,6 +10,7 @@ import string
import
regex
import
regsub
import
MacOS
from
bgenlocations
import
TOOLBOXDIR
from
scantools
import
Scanner
...
...
@@ -17,7 +18,7 @@ def main():
print
"=== Scanning AERegistry.h for defines ==="
input
=
"AERegistry.h"
output
=
"@dummy-registry.py"
defsoutput
=
"AERegistry.py"
defsoutput
=
TOOLBOXDIR
+
"AERegistry.py"
scanner
=
AppleEventsScanner
(
input
,
output
,
defsoutput
)
scanner
.
scan
()
scanner
.
close
()
...
...
@@ -27,14 +28,14 @@ def main():
# once we start writing servers in python.
input
=
"AEObjects.h"
output
=
"@dummy-objects.py"
defsoutput
=
"AEObjects.py"
defsoutput
=
TOOLBOXDIR
+
"AEObjects.py"
scanner
=
AppleEventsScanner
(
input
,
output
,
defsoutput
)
scanner
.
scan
()
scanner
.
close
()
print
"=== Scanning AppleEvents.py ==="
input
=
"AppleEvents.h"
output
=
"aegen.py"
defsoutput
=
"AppleEvents.py"
defsoutput
=
TOOLBOXDIR
+
"AppleEvents.py"
scanner
=
AppleEventsScanner
(
input
,
output
,
defsoutput
)
scanner
.
scan
()
scanner
.
close
()
...
...
Mac/Modules/cm/Cmgen.py
View file @
46d9e79d
# Generated from 'Sap:C
odeWarrior7
:Metrowerks CodeWarrior:MacOS Support:Headers:Universal Headers:Components.h'
# Generated from 'Sap:C
W8 Gold
:Metrowerks CodeWarrior:MacOS Support:Headers:Universal Headers:Components.h'
f
=
Function
(
Component
,
'RegisterComponentResource'
,
(
ComponentResourceHandle
,
'tr'
,
InMode
),
...
...
Mac/Modules/cm/Cmmodule.c
View file @
46d9e79d
...
...
@@ -40,6 +40,9 @@ extern int GrafObj_Convert(PyObject *, GrafPtr *);
extern
PyObject
*
BMObj_New
(
BitMapPtr
);
extern
int
BMObj_Convert
(
PyObject
*
,
BitMapPtr
*
);
extern
PyObject
*
PMObj_New
(
PixMapHandle
);
extern
int
PMObj_Convert
(
PyObject
*
,
PixMapHandle
*
);
extern
PyObject
*
WinObj_WhichWindow
(
WindowPtr
);
#include <Components.h>
...
...
Mac/Modules/cm/cmscan.py
View file @
46d9e79d
...
...
@@ -3,6 +3,7 @@
import
addpack
addpack
.
addpack
(
':tools:bgen:bgen'
)
from
scantools
import
Scanner
from
bgenlocations
import
TOOLBOXDIR
LONG
=
"Components"
SHORT
=
"Cm"
...
...
@@ -10,7 +11,7 @@ SHORT = "Cm"
def
main
():
input
=
"Components.h"
output
=
SHORT
+
"gen.py"
defsoutput
=
LONG
+
".py"
defsoutput
=
TOOLBOXDIR
+
LONG
+
".py"
scanner
=
MyScanner
(
input
,
output
,
defsoutput
)
scanner
.
scan
()
scanner
.
close
()
...
...
Mac/Modules/dlg/dlggen.py
View file @
46d9e79d
# Generated from '
fl
ap:CW8 Gold:Metrowerks CodeWarrior:MacOS Support:Headers:Universal Headers:Dialogs.h'
# Generated from '
S
ap:CW8 Gold:Metrowerks CodeWarrior:MacOS Support:Headers:Universal Headers:Dialogs.h'
f
=
Function
(
DialogRef
,
'NewDialog'
,
(
NullStorage
,
'wStorage'
,
InMode
),
...
...
Mac/Modules/dlg/dlgscan.py
View file @
46d9e79d
...
...
@@ -4,6 +4,7 @@ import addpack
addpack
.
addpack
(
':Tools:bgen:bgen'
)
from
scantools
import
Scanner
from
bgenlocations
import
TOOLBOXDIR
LONG
=
"Dialogs"
SHORT
=
"dlg"
...
...
@@ -12,7 +13,7 @@ OBJECT = "DialogPtr"
def
main
():
input
=
LONG
+
".h"
output
=
SHORT
+
"gen.py"
defsoutput
=
LONG
+
".py"
defsoutput
=
TOOLBOXDIR
+
LONG
+
".py"
scanner
=
MyScanner
(
input
,
output
,
defsoutput
)
scanner
.
scan
()
scanner
.
close
()
...
...
Mac/Modules/evt/evtgen.py
View file @
46d9e79d
# Generated from '
fl
ap:CW8 Gold:Metrowerks CodeWarrior:MacOS Support:Headers:Universal Headers:Events.h'
# Generated from '
S
ap:CW8 Gold:Metrowerks CodeWarrior:MacOS Support:Headers:Universal Headers:Events.h'
f
=
Function
(
UInt32
,
'GetCaretTime'
,
)
...
...
Mac/Modules/evt/evtscan.py
View file @
46d9e79d
...
...
@@ -3,6 +3,7 @@
import
addpack
addpack
.
addpack
(
':tools:bgen:bgen'
)
from
scantools
import
Scanner
from
bgenlocations
import
TOOLBOXDIR
LONG
=
"Events"
SHORT
=
"evt"
...
...
@@ -11,7 +12,7 @@ OBJECT = "NOTUSED"
def
main
():
input
=
LONG
+
".h"
output
=
SHORT
+
"gen.py"
defsoutput
=
LONG
+
".py"
defsoutput
=
TOOLBOXDIR
+
LONG
+
".py"
scanner
=
MyScanner
(
input
,
output
,
defsoutput
)
scanner
.
scan
()
scanner
.
close
()
...
...
Mac/Modules/fm/Fmgen.py
View file @
46d9e79d
# Generated from '
fl
ap:CW8 Gold:Metrowerks CodeWarrior:MacOS Support:Headers:Universal Headers:Fonts.h'
# Generated from '
S
ap:CW8 Gold:Metrowerks CodeWarrior:MacOS Support:Headers:Universal Headers:Fonts.h'
f
=
Function
(
void
,
'InitFonts'
,
)
...
...
Mac/Modules/fm/fmscan.py
View file @
46d9e79d
...
...
@@ -3,6 +3,7 @@
import
addpack
addpack
.
addpack
(
':tools:bgen:bgen'
)
from
scantools
import
Scanner
from
bgenlocations
import
TOOLBOXDIR
LONG
=
"Fonts"
SHORT
=
"Fm"
...
...
@@ -10,7 +11,7 @@ SHORT = "Fm"
def
main
():
input
=
"Fonts.h"
output
=
SHORT
+
"gen.py"
defsoutput
=
LONG
+
".py"
defsoutput
=
TOOLBOXDIR
+
LONG
+
".py"
scanner
=
MyScanner
(
input
,
output
,
defsoutput
)
scanner
.
scan
()
scanner
.
close
()
...
...
Mac/Modules/list/listgen.py
View file @
46d9e79d
# Generated from '
fl
ap:CW8 Gold:Metrowerks CodeWarrior:MacOS Support:Headers:Universal Headers:Lists.h'
# Generated from '
S
ap:CW8 Gold:Metrowerks CodeWarrior:MacOS Support:Headers:Universal Headers:Lists.h'
f
=
Function
(
ListRef
,
'LNew'
,
(
Rect_ptr
,
'rView'
,
InMode
),
...
...
Mac/Modules/list/listscan.py
View file @
46d9e79d
...
...
@@ -3,6 +3,7 @@
import
addpack
addpack
.
addpack
(
':tools:bgen:bgen'
)
from
scantools
import
Scanner
from
bgenlocations
import
TOOLBOXDIR
LONG
=
"Lists"
SHORT
=
"list"
...
...
@@ -11,7 +12,7 @@ OBJECT = "ListRef"
def
main
():
input
=
LONG
+
".h"
output
=
SHORT
+
"gen.py"
defsoutput
=
LONG
+
".py"
defsoutput
=
TOOLBOXDIR
+
LONG
+
".py"
scanner
=
MyScanner
(
input
,
output
,
defsoutput
)
scanner
.
scan
()
scanner
.
close
()
...
...
Mac/Modules/menu/menugen.py
View file @
46d9e79d
# Generated from '
fl
ap:CW8 Gold:Metrowerks CodeWarrior:MacOS Support:Headers:Universal Headers:Menus.h'
# Generated from '
S
ap:CW8 Gold:Metrowerks CodeWarrior:MacOS Support:Headers:Universal Headers:Menus.h'
f
=
Function
(
short
,
'GetMBarHeight'
,
)
...
...
Mac/Modules/menu/menuscan.py
View file @
46d9e79d
...
...
@@ -3,11 +3,12 @@ import addpack
addpack
.
addpack
(
':Tools:bgen:bgen'
)
from
scantools
import
Scanner
from
bgenlocations
import
TOOLBOXDIR
def
main
():
input
=
"Menus.h"
output
=
"menugen.py"
defsoutput
=
"Menus.py"
defsoutput
=
TOOLBOXDIR
+
"Menus.py"
scanner
=
MyScanner
(
input
,
output
,
defsoutput
)
scanner
.
scan
()
scanner
.
close
()
...
...
Mac/Modules/qd/qdgen.py
View file @
46d9e79d
# Generated from '
flap:CodeWarrior
:Metrowerks CodeWarrior:MacOS Support:Headers:Universal Headers:QuickDraw.h'
# Generated from '
Sap:CW8 Gold
:Metrowerks CodeWarrior:MacOS Support:Headers:Universal Headers:QuickDraw.h'
f
=
Function
(
void
,
'SetPort'
,
(
GrafPtr
,
'port'
,
InMode
),
...
...
@@ -926,7 +926,7 @@ f = Function(void, 'GetIndPattern',
)
functions
.
append
(
f
)
# Generated from '
flap:CodeWarrior
:Metrowerks CodeWarrior:MacOS Support:Headers:Universal Headers:QuickDrawText.h'
# Generated from '
Sap:CW8 Gold
:Metrowerks CodeWarrior:MacOS Support:Headers:Universal Headers:QuickDrawText.h'
f
=
Function
(
void
,
'TextFont'
,
(
short
,
'font'
,
InMode
),
...
...
Mac/Modules/qd/qdscan.py
View file @
46d9e79d
...
...
@@ -4,11 +4,12 @@ import addpack
addpack
.
addpack
(
':Tools:bgen:bgen'
)
from
scantools
import
Scanner
from
bgenlocations
import
TOOLBOXDIR
def
main
():
input
=
"QuickDraw.h"
output
=
"qdgen.py"
defsoutput
=
"QuickDraw.py"
defsoutput
=
TOOLBOXDIR
+
"QuickDraw.py"
scanner
=
MyScanner
(
input
,
output
,
defsoutput
)
scanner
.
scan
()
scanner
.
close
()
...
...
@@ -33,7 +34,7 @@ def main():
ifp
.
close
()
ofp
.
close
()
ifp
=
open
(
"@QuickDrawText.py"
)
ofp
=
open
(
"QuickDraw.py"
,
"a"
)
ofp
=
open
(
TOOLBOXDIR
+
"QuickDraw.py"
,
"a"
)
ofp
.
write
(
ifp
.
read
())
ifp
.
close
()
ofp
.
close
()
...
...
Mac/Modules/qt/Qtmodule.c
View file @
46d9e79d
...
...
@@ -40,6 +40,9 @@ extern int GrafObj_Convert(PyObject *, GrafPtr *);
extern
PyObject
*
BMObj_New
(
BitMapPtr
);
extern
int
BMObj_Convert
(
PyObject
*
,
BitMapPtr
*
);
extern
PyObject
*
PMObj_New
(
PixMapHandle
);
extern
int
PMObj_Convert
(
PyObject
*
,
PixMapHandle
*
);
extern
PyObject
*
WinObj_WhichWindow
(
WindowPtr
);
#include <Movies.h>
...
...
Mac/Modules/qt/qtgen.py
View file @
46d9e79d
# Generated from 'Sap:C
odeWarrior7
:Metrowerks CodeWarrior:MacOS Support:Headers:Universal Headers:Movies.h'
# Generated from 'Sap:C
W8 Gold
:Metrowerks CodeWarrior:MacOS Support:Headers:Universal Headers:Movies.h'
f
=
Function
(
OSErr
,
'EnterMovies'
,
)
...
...
Mac/Modules/qt/qtscan.py
View file @
46d9e79d
...
...
@@ -3,6 +3,7 @@
import
addpack
addpack
.
addpack
(
':tools:bgen:bgen'
)
from
scantools
import
Scanner
from
bgenlocations
import
TOOLBOXDIR
LONG
=
"QuickTime"
SHORT
=
"qt"
...
...
@@ -11,7 +12,7 @@ OBJECTS = ("Movie", "Track", "Media", "UserData", "TimeBase", "MovieController")
def
main
():
input
=
"Movies.h"
output
=
SHORT
+
"gen.py"
defsoutput
=
LONG
+
".py"
defsoutput
=
TOOLBOXDIR
+
LONG
+
".py"
scanner
=
MyScanner
(
input
,
output
,
defsoutput
)
scanner
.
scan
()
scanner
.
close
()
...
...
Mac/Modules/res/Resmodule.c
View file @
46d9e79d
...
...
@@ -40,6 +40,9 @@ extern int GrafObj_Convert(PyObject *, GrafPtr *);
extern
PyObject
*
BMObj_New
(
BitMapPtr
);
extern
int
BMObj_Convert
(
PyObject
*
,
BitMapPtr
*
);
extern
PyObject
*
PMObj_New
(
PixMapHandle
);
extern
int
PMObj_Convert
(
PyObject
*
,
PixMapHandle
*
);
extern
PyObject
*
WinObj_WhichWindow
(
WindowPtr
);
#include <Resources.h>
...
...
Mac/Modules/res/resgen.py
View file @
46d9e79d
# Generated from 'Sap:C
odeWarrior7
:Metrowerks CodeWarrior:MacOS Support:Headers:Universal Headers:Resources.h'
# Generated from 'Sap:C
W8 Gold
:Metrowerks CodeWarrior:MacOS Support:Headers:Universal Headers:Resources.h'
f
=
ResFunction
(
short
,
'InitResources'
,
)
...
...
Mac/Modules/res/resscan.py
View file @
46d9e79d
...
...
@@ -10,13 +10,14 @@ import regsub
import
MacOS
import
addpack
addpack
.
addpack
(
':Tools:bgen:bgen'
)
from
bgenlocations
import
TOOLBOXDIR
from
scantools
import
Scanner
def
main
():
input
=
"Resources.h"
output
=
"resgen.py"
defsoutput
=
"Resources.py"
defsoutput
=
TOOLBOXDIR
+
"Resources.py"
scanner
=
ResourcesScanner
(
input
,
output
,
defsoutput
)
scanner
.
scan
()
scanner
.
close
()
...
...
Mac/Modules/snd/Sndmodule.c
View file @
46d9e79d
...
...
@@ -40,6 +40,9 @@ extern int GrafObj_Convert(PyObject *, GrafPtr *);
extern
PyObject
*
BMObj_New
(
BitMapPtr
);
extern
int
BMObj_Convert
(
PyObject
*
,
BitMapPtr
*
);
extern
PyObject
*
PMObj_New
(
PixMapHandle
);
extern
int
PMObj_Convert
(
PyObject
*
,
PixMapHandle
*
);
extern
PyObject
*
WinObj_WhichWindow
(
WindowPtr
);
#include <Sound.h>
...
...
Mac/Modules/snd/sndgen.py
View file @
46d9e79d
# Generated from 'Sap:C
odeWarrior7
:Metrowerks CodeWarrior:MacOS Support:Headers:Universal Headers:Sound.h'
# Generated from 'Sap:C
W8 Gold
:Metrowerks CodeWarrior:MacOS Support:Headers:Universal Headers:Sound.h'
f
=
SndFunction
(
void
,
'SetSoundVol'
,
(
short
,
'level'
,
InMode
),
...
...
Mac/Modules/snd/sndscan.py
View file @
46d9e79d
...
...
@@ -4,13 +4,14 @@
import
addpack
addpack
.
addpack
(
':Tools:bgen:bgen'
)
from
bgenlocations
import
TOOLBOXDIR
from
scantools
import
Scanner
def
main
():
input
=
"Sound.h"
output
=
"sndgen.py"
defsoutput
=
"Sound.py"
defsoutput
=
TOOLBOXDIR
+
"Sound.py"
scanner
=
SoundScanner
(
input
,
output
,
defsoutput
)
scanner
.
scan
()
scanner
.
close
()
...
...
Mac/Modules/te/TEmodule.c
View file @
46d9e79d
...
...
@@ -805,6 +805,32 @@ static PyObject *TEObj_getattr(self, name)
TEObject
*
self
;
char
*
name
;
{
if
(
strcmp
(
name
,
"destRect"
)
==
0
)
return
Py_BuildValue
(
"O&"
,
PyMac_BuildRect
,
(
*
self
->
ob_itself
)
->
destRect
);
if
(
strcmp
(
name
,
"viewRect"
)
==
0
)
return
Py_BuildValue
(
"O&"
,
PyMac_BuildRect
,
(
*
self
->
ob_itself
)
->
viewRect
);
if
(
strcmp
(
name
,
"selRect"
)
==
0
)
return
Py_BuildValue
(
"O&"
,
PyMac_BuildRect
,
(
*
self
->
ob_itself
)
->
selRect
);
if
(
strcmp
(
name
,
"lineHeight"
)
==
0
)
return
Py_BuildValue
(
"h"
,
(
*
self
->
ob_itself
)
->
lineHeight
);
if
(
strcmp
(
name
,
"fontAscent"
)
==
0
)
return
Py_BuildValue
(
"h"
,
(
*
self
->
ob_itself
)
->
fontAscent
);
if
(
strcmp
(
name
,
"selPoint"
)
==
0
)
return
Py_BuildValue
(
"O&"
,
PyMac_BuildPoint
,
(
*
self
->
ob_itself
)
->
selPoint
);
if
(
strcmp
(
name
,
"selStart"
)
==
0
)
return
Py_BuildValue
(
"h"
,
(
*
self
->
ob_itself
)
->
selStart
);
if
(
strcmp
(
name
,
"selEnd"
)
==
0
)
return
Py_BuildValue
(
"h"
,
(
*
self
->
ob_itself
)
->
selEnd
);
if
(
strcmp
(
name
,
"active"
)
==
0
)
return
Py_BuildValue
(
"h"
,
(
*
self
->
ob_itself
)
->
active
);
if
(
strcmp
(
name
,
"teLength"
)
==
0
)
return
Py_BuildValue
(
"h"
,
(
*
self
->
ob_itself
)
->
teLength
);
return
Py_FindMethodInChain
(
&
TEObj_chain
,
(
PyObject
*
)
self
,
name
);
}
...
...
Mac/Modules/te/tescan.py
View file @
46d9e79d
...
...
@@ -3,6 +3,7 @@
import
addpack
addpack
.
addpack
(
':tools:bgen:bgen'
)
from
scantools
import
Scanner
from
bgenlocations
import
TOOLBOXDIR
LONG
=
"TextEdit"
SHORT
=
"te"
...
...
@@ -11,7 +12,7 @@ OBJECT = "TEHandle"
def
main
():
input
=
LONG
+
".h"
output
=
SHORT
+
"gen.py"
defsoutput
=
LONG
+
".py"
defsoutput
=
TOOLBOXDIR
+
LONG
+
".py"
scanner
=
MyScanner
(
input
,
output
,
defsoutput
)
scanner
.
scan
()
scanner
.
close
()
...
...
Mac/Modules/te/tesupport.py
View file @
46d9e79d
...
...
@@ -86,6 +86,34 @@ class MyObjectDefinition(GlobalObjectDefinition):
}"""
)
def
outputFreeIt
(
self
,
itselfname
):
Output
(
"TEDispose(%s);"
,
itselfname
)
def
outputGetattrHook
(
self
):
Output
(
"""
if( strcmp(name, "destRect") == 0 )
return Py_BuildValue("O&", PyMac_BuildRect,
(*self->ob_itself)->destRect);
if( strcmp(name, "viewRect") == 0 )
return Py_BuildValue("O&", PyMac_BuildRect,
(*self->ob_itself)->viewRect);
if( strcmp(name, "selRect") == 0 )
return Py_BuildValue("O&", PyMac_BuildRect,
(*self->ob_itself)->selRect);
if( strcmp(name, "lineHeight") == 0 )
return Py_BuildValue("h", (*self->ob_itself)->lineHeight);
if( strcmp(name, "fontAscent") == 0 )
return Py_BuildValue("h", (*self->ob_itself)->fontAscent);
if( strcmp(name, "selPoint") == 0 )
return Py_BuildValue("O&", PyMac_BuildPoint,
(*self->ob_itself)->selPoint);
if( strcmp(name, "selStart") == 0 )
return Py_BuildValue("h", (*self->ob_itself)->selStart);
if( strcmp(name, "selEnd") == 0 )
return Py_BuildValue("h", (*self->ob_itself)->selEnd);
if( strcmp(name, "active") == 0 )
return Py_BuildValue("h", (*self->ob_itself)->active);
if( strcmp(name, "teLength") == 0 )
return Py_BuildValue("h", (*self->ob_itself)->teLength);
"""
)
# From here on it's basically all boiler plate...
...
...
Mac/Modules/win/Winmodule.c
View file @
46d9e79d
...
...
@@ -40,6 +40,9 @@ extern int GrafObj_Convert(PyObject *, GrafPtr *);
extern
PyObject
*
BMObj_New
(
BitMapPtr
);
extern
int
BMObj_Convert
(
PyObject
*
,
BitMapPtr
*
);
extern
PyObject
*
PMObj_New
(
PixMapHandle
);
extern
int
PMObj_Convert
(
PyObject
*
,
PixMapHandle
*
);
extern
PyObject
*
WinObj_WhichWindow
(
WindowPtr
);
#include <Windows.h>
...
...
Mac/Modules/win/wingen.py
View file @
46d9e79d
# Generated from 'Sap:C
odeWarrior7
:Metrowerks CodeWarrior:MacOS Support:Headers:Universal Headers:Windows.h'
# Generated from 'Sap:C
W8 Gold
:Metrowerks CodeWarrior:MacOS Support:Headers:Universal Headers:Windows.h'
f
=
Function
(
RgnHandle
,
'GetGrayRgn'
,
)
...
...
Mac/Modules/win/winscan.py
View file @
46d9e79d
# Scan an Apple header file, generating a Python file of generator calls.
import
addpack
addpack
.
addpack
(
':Tools:bgen:bgen'
)
from
bgenlocations
import
TOOLBOXDIR
from
scantools
import
Scanner
def
main
():
input
=
"Windows.h"
output
=
"wingen.py"
defsoutput
=
"Windows.py"
defsoutput
=
TOOLBOXDIR
+
"Windows.py"
scanner
=
MyScanner
(
input
,
output
,
defsoutput
)
scanner
.
scan
()
scanner
.
close
()
...
...
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