Update of /cvsroot/hoc/hoc/Bindings/AdditionalCode/Foundation
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12043/Bindings/AdditionalCode/Foundation
Modified Files:
NSGeometry.hs
Log Message:
A monster commit, brought to you by the Greater Toronto Airport Authority
and Czech Airlines.
HOC now supports:
* Marshalling of exceptions
NSExceptions get marshalled into Haskell exceptions that can be caught
using Foundation.NSException.catchNS.
Haskell exceptions get wrapped in a (private) subclass of NSException
and marshalled back if they re-enter Haskell land.
* importing of extern constants
$(declareExternConst "NSDeviceRGBColorSpace" [t| NSString () |])
* importing of global functions (e.g. NSRectFill) using HOC marshalling:
$(declareExternFun "NSRectFill" [t| NSRect -> IO () |])
* ifgen generates constant & function declarations automatically from
Foundation and AppKit headers.
Index: NSGeometry.hs
===================================================================
RCS file: /cvsroot/hoc/hoc/Bindings/AdditionalCode/Foundation/NSGeometry.hs,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- NSGeometry.hs 27 Feb 2004 12:23:03 -0000 1.1
+++ NSGeometry.hs 27 Sep 2005 11:55:22 -0000 1.2
@@ -6,9 +6,6 @@
--X NSPoint(..)
--X NSSize(..)
--X NSRect(..)
---X nsZeroPoint
---X nsZeroSize
---X nsZeroRect
--X nsMaxX
--X nsMaxY
--X nsMidX
@@ -29,9 +26,12 @@
data NSSize = NSSize Float Float deriving(Read, Show, Eq)
data NSRect = NSRect NSPoint NSSize deriving(Read, Show, Eq)
+{-
+-- They're imported automatically now.
nsZeroPoint = NSPoint 0 0
nsZeroSize = NSSize 0 0
nsZeroRect = NSRect nsZeroPoint nsZeroSize
+-}
nsMaxX (NSRect (NSPoint x y) (NSSize w h)) = x + w
nsMaxY (NSRect (NSPoint x y) (NSSize w h)) = y + h
|