summaryrefslogtreecommitdiffstats
path: root/Mac/Modules/qd
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2000-12-12 22:10:21 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>2000-12-12 22:10:21 (GMT)
commit723ad8ae738e02a5b6f6f1d172cf297db1c11b26 (patch)
tree91ee498f2630c951058201fd7ede2bdb42409637 /Mac/Modules/qd
parent8ed81303f68fe3be5b4afa77d1ffd03a066ba3dc (diff)
downloadcpython-723ad8ae738e02a5b6f6f1d172cf297db1c11b26.zip
cpython-723ad8ae738e02a5b6f6f1d172cf297db1c11b26.tar.gz
cpython-723ad8ae738e02a5b6f6f1d172cf297db1c11b26.tar.bz2
More toolbox modules adapted to Universal Headers 3.3.2.
Diffstat (limited to 'Mac/Modules/qd')
-rw-r--r--Mac/Modules/qd/qdscan.py16
-rw-r--r--Mac/Modules/qd/qdsupport.py44
2 files changed, 55 insertions, 5 deletions
diff --git a/Mac/Modules/qd/qdscan.py b/Mac/Modules/qd/qdscan.py
index 969baf3..7d2b57b 100644
--- a/Mac/Modules/qd/qdscan.py
+++ b/Mac/Modules/qd/qdscan.py
@@ -100,17 +100,24 @@ extend = 0x40
'GetPortHWND',
'GetHWNDPort',
'GetPICTFromDIB',
-
+ 'GetPortBitMapForCopyBits', # Something funny in the declaration
]
+ def makegreylist(self):
+ return [
+ ('#if !TARGET_API_MAC_CARBON', [
+ ]),
+ ('#if TARGET_API_MAC_CARBON', [
+ ])]
+
+
def makeblacklisttypes(self):
return [
-## 'CCrsrHandle',
'CIconHandle', # Obsolete
'CQDProcs',
+ 'CQDProcsPtr',
'CSpecArray',
-## 'CTabHandle',
'ColorComplementProcPtr',
'ColorComplementUPP',
'ColorSearchProcPtr',
@@ -118,14 +125,13 @@ extend = 0x40
'ConstPatternParam',
'DeviceLoopDrawingProcPtr',
'DeviceLoopFlags',
-## 'FontInfo',
-## 'GDHandle',
'GrafVerb',
'OpenCPicParams_ptr',
'Ptr',
'QDProcs',
'ReqListRec',
'void_ptr',
+ 'CustomXFerProcPtr',
]
def makerepairinstructions(self):
diff --git a/Mac/Modules/qd/qdsupport.py b/Mac/Modules/qd/qdsupport.py
index 9364a0b..abd1e3e 100644
--- a/Mac/Modules/qd/qdsupport.py
+++ b/Mac/Modules/qd/qdsupport.py
@@ -45,9 +45,12 @@ GDHandle = OpaqueByValueType("GDHandle", "ResObj")
CGrafPtr = OpaqueByValueType("CGrafPtr", "GrafObj")
GrafPtr = OpaqueByValueType("GrafPtr", "GrafObj")
BitMap_ptr = OpaqueByValueType("BitMapPtr", "BMObj")
+BitMap = BitMap_ptr
RGBColor = OpaqueType('RGBColor', 'QdRGB')
RGBColor_ptr = RGBColor
FontInfo = OpaqueType('FontInfo', 'QdFI')
+Component = OpaqueByValueType('Component', 'CmpObj')
+ComponentInstance = OpaqueByValueType('ComponentInstance', 'CmpInstObj')
Cursor_ptr = StructInputBufferType('Cursor')
Pattern = StructOutputBufferType('Pattern')
@@ -58,6 +61,47 @@ PenState_ptr = StructInputBufferType('PenState')
includestuff = includestuff + """
#include <%s>""" % MACHEADERFILE + """
+#if !ACCESSOR_CALLS_ARE_FUNCTIONS
+#define GetPortBitMapForCopyBits(port) (((GrafPort)(port))->portBits)
+#define GetPortBounds(port, bounds) (*(bounds) = (port)->portRect, (bounds))
+#define GetPortForeColor(port, color) (*(color) = (port)->rgbFgColor, (color))
+#define GetPortBackColor(port, color) (*(color) = (port)->rgbBkColor, (color))
+#define GetPortOpColor(port, color) (*(color) = (*((port)->grafVars))->rgbOpColor, (color))
+#define GetPortHiliteColor(port, color) (*(color) = (*((port)->grafVars))->rgbHiliteColor, (color))
+#define GetPortTextFont(port) ((port)->txFont)
+#define GetPortTextFace(port) ((port)->txFace)
+#define GetPortTextMode(port) ((port)->txMode)
+#define GetPortTextSize(port) ((port)->txSize)
+#define GetPortChExtra(port) ((port)->chExtra)
+#define GetPortFracHPenLocation(port) ((port)->pnLocHFrac)
+#define GetPortSpExtra(port) ((port)->spExtra)
+#define GetPortPenVisibility(port) ((port)->pnVis)
+#define GetPortVisibleRegion(port, rgn) ((rgn) = (port)->visRgn, (rgn))
+#define GetPortClipRegion(port, rgn) ((rgn) = (port)->clipRgn, (rgn))
+#define GetPortBackPixPat(port, pat) ((pat) = (port)->bkPixPat, (pat))
+#define GetPortPenPixPat(port, pat) ((pat) = (port)->pnPixPat, (pat))
+#define GetPortFillPixPat(port, pat) ((pat) = (port)->fillPixPat, (pat))
+#define GetPortPenSize(port, pensize) (*(pensize) = (port)->pnSize, (pensize))
+#define GetPortPenMode(port) ((port)->pnMode)
+#define GetPortPenLocation(port, location) ((*location) = (port)->pnLoc, (location))
+#define IsPortRegionBeingDefined(port) ((port)->rgnSave)
+#define IsPortPictureBeingDefined(port) ((port)->picSave)
+/* #define IsPortOffscreen(port) */
+/* #define IsPortColor(port) */
+
+#define SetPortBounds(port, bounds) ((port)->portRect = *(bounds))
+#define SetPortOpColor(port, color) ((*((port)->grafVars))->rgbOpColor = *(color))
+#define SetPortVisibleRegion(port, rgn) ((port)->visRgn = (rgn))
+#define SetPortClipRegion(port, rgn) ((port)->clipRgn = (rgn))
+#define SetPortBackPixPat(port, pat) ((port)->bkPixPat = (pat))
+#define SetPortPenPixPat(port, pat) ((port)->pnPixPat = (pat))
+#define GetPortFillPixPat(port, pat) ((port)->fillPixPat = (pat))
+#define SetPortPenSize(port, pensize) ((port)->pnSize = (pensize))
+#define SetPortPenMode(port, mode) ((port)->pnMode = (mode))
+#define SetPortFracHPenLocation(port, frac) ((port)->pnLocHFrac = (frac))
+
+#endif
+
/*
** Parse/generate RGB records
*/