Update of /cvsroot/htoolkit/port/src/Port
In directory sc8-pr-cvs1:/tmp/cvs-serv30280/port/src/Port
Modified Files:
ToolBar.hs Types.hs
Log Message:
The DockPlace type is renamed to PositionType. The new type should be used for both ToolBar and Notebook control.
Index: ToolBar.hs
===================================================================
RCS file: /cvsroot/htoolkit/port/src/Port/ToolBar.hs,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** ToolBar.hs 17 Aug 2003 18:15:08 -0000 1.4
--- ToolBar.hs 23 Aug 2003 11:05:58 -0000 1.5
***************
*** 18,22 ****
, destroyToolBar
- , DockPlace(..)
, insertToolButton
, insertToolCheckButton
--- 18,21 ----
***************
*** 43,58 ****
import System.IO.Unsafe( unsafePerformIO )
! data DockPlace = DockLeft | DockTop | DockRight | DockBottom
!
! toCDockPlace :: DockPlace -> Int
! toCDockPlace DockLeft = 0
! toCDockPlace DockTop = 1
! toCDockPlace DockRight = 2
! toCDockPlace DockBottom = 3
!
! createToolBar :: String -> DockPlace -> Int -> Int -> Int -> IO WindowHandle
createToolBar name place band_num band_position offset =
! withCString name (\cname -> osCreateToolBar cname (toCDockPlace place) band_num band_position offset)
! foreign import ccall osCreateToolBar :: CString -> Int -> Int -> Int -> Int -> IO WindowHandle
foreign import ccall "osDestroyToolBar" destroyToolBar :: WindowHandle -> IO ()
--- 42,49 ----
import System.IO.Unsafe( unsafePerformIO )
! createToolBar :: String -> PositionType -> Int -> Int -> Int -> IO WindowHandle
createToolBar name place band_num band_position offset =
! withCString name (\cname -> osCreateToolBar cname (toCPositionType place) band_num band_position offset)
! foreign import ccall osCreateToolBar :: CString -> CInt -> Int -> Int -> Int -> IO WindowHandle
foreign import ccall "osDestroyToolBar" destroyToolBar :: WindowHandle -> IO ()
Index: Types.hs
===================================================================
RCS file: /cvsroot/htoolkit/port/src/Port/Types.hs,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -d -r1.26 -r1.27
*** Types.hs 15 Jul 2003 19:00:28 -0000 1.26
--- Types.hs 23 Aug 2003 11:05:58 -0000 1.27
***************
*** 71,74 ****
--- 71,77 ----
-- * Document interface
, DocumentInterface(..)
+
+ -- * PositionType
+ , PositionType(..)
-- * Primitive Handles
***************
*** 103,106 ****
--- 106,111 ----
, toCDocumentInterface
+
+ , toCPositionType
, fromCInt, toCInt
***************
*** 703,706 ****
--- 708,719 ----
DrawXor -> 2
+
+ data PositionType = PosLeft | PosTop | PosRight | PosBottom
+
+ toCPositionType :: PositionType -> CInt
+ toCPositionType PosLeft = 0
+ toCPositionType PosTop = 1
+ toCPositionType PosRight = 2
+ toCPositionType PosBottom = 3
{-----------------------------------------------------------------------------------------
|