summaryrefslogtreecommitdiffstats
path: root/Mac/Modules/win/winsupport.py
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>1995-11-14 10:48:54 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>1995-11-14 10:48:54 (GMT)
commit330f57699fd3e5c22c7f354ea0fb52deb47fa6a7 (patch)
tree826c2d514b845a443198b93d37a22424b656b47e /Mac/Modules/win/winsupport.py
parenta01a8f78cb76242cdc5f6f2ef67678c4172bb7d2 (diff)
downloadcpython-330f57699fd3e5c22c7f354ea0fb52deb47fa6a7.zip
cpython-330f57699fd3e5c22c7f354ea0fb52deb47fa6a7.tar.gz
cpython-330f57699fd3e5c22c7f354ea0fb52deb47fa6a7.tar.bz2
- Added support for PicHandle
- Added (by hand, through winedit.py) support for WindowPeek accessor functions that are currently declared as macros.
Diffstat (limited to 'Mac/Modules/win/winsupport.py')
-rw-r--r--Mac/Modules/win/winsupport.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/Mac/Modules/win/winsupport.py b/Mac/Modules/win/winsupport.py
index 1f07828..39d4b7a 100644
--- a/Mac/Modules/win/winsupport.py
+++ b/Mac/Modules/win/winsupport.py
@@ -18,6 +18,7 @@ MODPREFIX = MODNAME # The prefix for module-wide routines
OBJECTTYPE = OBJECTNAME + 'Ptr' # The C type used to represent them
OBJECTPREFIX = MODPREFIX + 'Obj' # The prefix for object methods
INPUTFILE = string.lower(MODPREFIX) + 'gen.py' # The file generated by the scanner
+EDITFILE = string.lower(MODPREFIX) + 'edit.py' # The manual definitions
OUTPUTFILE = MODNAME + "module.c" # The file generated by this program
from macsupport import *
@@ -28,8 +29,10 @@ WindowPtr = OpaqueByValueType(OBJECTTYPE, OBJECTPREFIX)
WindowRef = WindowPtr
WindowPeek = OpaqueByValueType("WindowPeek", OBJECTPREFIX)
WindowPeek.passInput = lambda name: "(WindowPeek)(%s)" % name
+CGrafPtr = WindowPtr
-#RgnHandle = FakeType("theWindow->updtRgn") # XXX
+#RgnHandle = OpaqueByValueType("RgnHandle", "RgnObj")
+PicHandle = OpaqueByValueType("PicHandle", "ResObj")
includestuff = includestuff + """
#include <%s>""" % MACHEADERFILE + """
@@ -112,6 +115,11 @@ f.docstring = lambda : "Resolve an integer WindowPtr address to a Window object"
functions.append(f)
+# And add the routines that access the internal bits of a window struct. They
+# are currently #defined in Windows.h, they will be real routines in Copland
+# (at which time this execfile can go)
+execfile(EDITFILE)
+
# add the populated lists to the generator groups
# (in a different wordl the scan program would generate this)
for f in functions: module.add(f)