You can subscribe to this list here.
| 2003 |
Jan
(30) |
Feb
(20) |
Mar
(151) |
Apr
(86) |
May
(23) |
Jun
(25) |
Jul
(107) |
Aug
(141) |
Sep
(55) |
Oct
(85) |
Nov
(65) |
Dec
(2) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(22) |
Feb
(18) |
Mar
(3) |
Apr
(16) |
May
(69) |
Jun
(3) |
Jul
(1) |
Aug
(3) |
Sep
(1) |
Oct
|
Nov
(6) |
Dec
(1) |
| 2005 |
Jan
(2) |
Feb
(16) |
Mar
|
Apr
|
May
|
Jun
(47) |
Jul
(1) |
Aug
|
Sep
(6) |
Oct
(4) |
Nov
|
Dec
(34) |
| 2006 |
Jan
(39) |
Feb
|
Mar
(2) |
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
(5) |
Oct
|
Nov
(4) |
Dec
|
| 2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
| 2008 |
Jan
|
Feb
|
Mar
(26) |
Apr
(1) |
May
(1) |
Jun
|
Jul
(5) |
Aug
(2) |
Sep
(8) |
Oct
(8) |
Nov
(22) |
Dec
(30) |
| 2009 |
Jan
(10) |
Feb
(13) |
Mar
(14) |
Apr
(14) |
May
(32) |
Jun
(25) |
Jul
(36) |
Aug
(10) |
Sep
(2) |
Oct
|
Nov
|
Dec
(10) |
| 2010 |
Jan
(9) |
Feb
(4) |
Mar
(2) |
Apr
(1) |
May
(2) |
Jun
(2) |
Jul
(1) |
Aug
(4) |
Sep
|
Oct
(1) |
Nov
|
Dec
|
|
From: <dl...@us...> - 2003-01-31 21:06:16
|
Update of /cvsroot/htoolkit/port In directory sc8-pr-cvs1:/tmp/cvs-serv23303 Modified Files: makefile Log Message: changed name of xxxWindowClose to xxxWindowDismiss as that is what is meant. Actually, xxxWindowDestroy should probably be called xxxWindowClose but let's leave that for now. Index: makefile =================================================================== RCS file: /cvsroot/htoolkit/port/makefile,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** makefile 30 Jan 2003 11:36:06 -0000 1.8 --- makefile 31 Jan 2003 21:06:12 -0000 1.9 *************** *** 77,81 **** #-------------------------------------------------------------------------- ! HC-OPTIONS = -O2 CC-OPTIONS = --- 77,81 ---- #-------------------------------------------------------------------------- ! HC-OPTIONS = # -O2 CC-OPTIONS = |
|
From: <dl...@us...> - 2003-01-31 20:55:04
|
Update of /cvsroot/htoolkit/gio/src/examples/simple
In directory sc8-pr-cvs1:/tmp/cvs-serv18269/src/examples/simple
Added Files:
ByeDemo.hs
Log Message:
added the "goodbye" demo as posted by John Meacham on the Haskel
gui mailing list.
--- NEW FILE: ByeDemo.hs ---
{--------------------------------------------------------------------------------
This program implements the "goodbye" demo as posted by John Meacham on
the Haskell GUI mailing list. The program is specified as:
I propose a simple program which pops up a window saying 'Hello World'
with a button saying 'Bye' which you click and it changes the message
to 'Goodbye'. if you click the button again the program exits.
Note that this demo also uses a nice layout: the label and button are centered
in the window with some padding around it. When the button is clicked the
first time, it calls "bye". This function changes the text of the label
and installs another event handler on the button that closes the main window.
--------------------------------------------------------------------------------}
module Main where
import Graphics.UI.GIO
main = start demo -- "start" initializes the GUI.
demo :: IO ()
demo = do w <- window [title =: "Bye!"]
l <- label [text =: "Hello World"] w
b <- button [text =: "Bye"] w
set w [layout =: pad 10 (center l ^^^^ center b)]
set b [on command =: bye w l b]
where
bye w l b
= do set l [text =: "Goodbye"]
set b [on command =: close w]
|
|
From: <dl...@us...> - 2003-01-31 20:54:16
|
Update of /cvsroot/htoolkit/gio/src/Graphics/UI/GIO
In directory sc8-pr-cvs1:/tmp/cvs-serv17887/src/Graphics/UI/GIO
Modified Files:
Window.hs
Log Message:
fixed the relayout mechanism for resizable windows
Index: Window.hs
===================================================================
RCS file: /cvsroot/htoolkit/gio/src/Graphics/UI/GIO/Window.hs,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** Window.hs 31 Jan 2003 01:01:45 -0000 1.4
--- Window.hs 31 Jan 2003 20:54:08 -0000 1.5
***************
*** 127,134 ****
relayoutWindow w
= do lay <- getVar (vlayout w)
- needed <- layoutInWindow (hwindow w) lay
- avail <- get w view
adjust <- get w autosize
! when (adjust && not (sizeEncloses avail needed)) (set w [view =: needed])
recolorWindow w
--- 127,139 ----
relayoutWindow w
= do lay <- getVar (vlayout w)
adjust <- get w autosize
! when adjust (
! do needed <- getLayoutSize lay
! avail <- get w view
! isresize <- get w resizeable
! when ((not isresize && avail /= needed) || (isresize && not (sizeEncloses avail needed)))
! (do set w [view =: needed]))
! layoutInWindow (hwindow w) lay
! return ()
recolorWindow w
***************
*** 141,145 ****
! -- | Controls wheter the window will automatically resize to display all controls.
autosize :: Attr Window Bool
autosize
--- 146,150 ----
! -- | Controls whether the window will automatically resize to display all controls.
autosize :: Attr Window Bool
autosize
***************
*** 172,175 ****
--- 177,181 ----
when (x /= resize) (do Lib.setWindowResizeable (hwindow w) x
setVar (vresizeable w) x))
+
-- | The size of the current view area.
view :: Attr Window Size
|
|
From: <dl...@us...> - 2003-01-31 15:33:19
|
Update of /cvsroot/htoolkit/gio/src/examples/simple
In directory sc8-pr-cvs1:/tmp/cvs-serv25251
Modified Files:
Calculator.hs
Log Message:
niceified the calculator example.
Index: Calculator.hs
===================================================================
RCS file: /cvsroot/htoolkit/gio/src/examples/simple/Calculator.hs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** Calculator.hs 30 Jan 2003 23:49:56 -0000 1.1
--- Calculator.hs 31 Jan 2003 15:33:14 -0000 1.2
***************
*** 10,17 ****
calculator
= do varst <- newVar (0,id)
! w <- window [title =: "calculator", resizeable =: False]
display <- label [text =: "0"] w
keys <- mapM (\c -> button [text =: [c], on command =: cmd varst display c] w) "123+456-789*C0=/"
! set w [layout =: (pad 10 (hglue <<< display)) ^^^ grid (matrix 4 (map (hfix 40) keys))]
where
matrix n [] = []
--- 10,17 ----
calculator
= do varst <- newVar (0,id)
! w <- window [title =: "calculator", resizeable =: True]
display <- label [text =: "0"] w
keys <- mapM (\c -> button [text =: [c], on command =: cmd varst display c] w) "123+456-789*C0=/"
! set w [layout =: (pad 10 (hglue <<< display)) ^^^ grid (matrix 4 (map (hfix 50) keys))]
where
matrix n [] = []
|
|
From: <dl...@us...> - 2003-01-31 15:31:54
|
Update of /cvsroot/htoolkit/port/src/cbits/Win32
In directory sc8-pr-cvs1:/tmp/cvs-serv24402/Win32
Modified Files:
Window.c
Log Message:
fixed bug in "osSetViewSize". Now it holds that:
do osSetViewSize x; y <- osGetViewSize => x==y
Index: Window.c
===================================================================
RCS file: /cvsroot/htoolkit/port/src/cbits/Win32/Window.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** Window.c 30 Jan 2003 23:09:47 -0000 1.3
--- Window.c 31 Jan 2003 15:31:50 -0000 1.4
***************
*** 847,854 ****
SetWindowPos(window,NULL,wrect.left,wrect.top,
! w+(wrect.right-wrect.left)-(crect.right-crect.left)+1,
! h+(wrect.bottom-wrect.top)-(crect.bottom-crect.top)+1,
! SWP_NOZORDER);
! GetClientRect(window,&crect);
}
--- 847,853 ----
SetWindowPos(window,NULL,wrect.left,wrect.top,
! (wrect.right-wrect.left) + (w - (crect.right-crect.left)),
! (wrect.bottom-wrect.top) + (h - (crect.bottom - crect.top)),
! SWP_NOZORDER);
}
***************
*** 1046,1054 ****
}
! void osSetWindowResizeable(WindowHandle ctrl, int resizeable )
{
! LONG style = GetWindowLong(ctrl, GWL_STYLE );
if (resizeable) style |= WS_THICKFRAME;
else style &= ~WS_THICKFRAME;
! SetWindowLong(ctrl, GWL_STYLE, style );
}
--- 1045,1058 ----
}
! void osSetWindowResizeable(WindowHandle hwnd, int resizeable )
{
! RECT rect;
! LONG style = GetWindowLong(hwnd, GWL_STYLE );
if (resizeable) style |= WS_THICKFRAME;
else style &= ~WS_THICKFRAME;
! SetWindowLong(hwnd, GWL_STYLE, style );
!
! GetClientRect(hwnd,&rect);
! handleWindowResize(hwnd,rect.right-rect.left,rect.bottom-rect.top);
! handleWindowReLayout(hwnd);
}
|
|
From: <kr_...@us...> - 2003-01-31 01:02:18
|
Update of /cvsroot/htoolkit/port/src/Port
In directory sc8-pr-cvs1:/tmp/cvs-serv18912/port/src/Port
Modified Files:
Menu.hs Types.hs
Log Message:
Replace definition of Key with its own definition from HToolkit
Index: Menu.hs
===================================================================
RCS file: /cvsroot/htoolkit/port/src/Port/Menu.hs,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** Menu.hs 30 Jan 2003 23:09:46 -0000 1.3
--- Menu.hs 31 Jan 2003 01:01:42 -0000 1.4
***************
*** 55,70 ****
-- short-cut key should be registered. An event handler for a menu item can be
-- installed with 'registerMenuCommand'.
! addMenuItem :: MenuHandle -> Key -> Modifiers -> String -> IO MenuHandle
! addMenuItem hmenu key mod title
= withCString title $ \ctitle ->
! osAddMenuItem hmenu (toCKey key) (toCModifiers mod) ctitle
foreign import ccall osAddMenuItem :: MenuHandle -> CInt -> CWord -> CString -> IO MenuHandle
-- | Add a checkable menu item. An event handler for a menu item can be
-- installed with 'registerMenuCommand'.
! addMenuCheckItem :: MenuHandle -> Key -> Modifiers -> String -> IO MenuHandle
! addMenuCheckItem hmenu key mod title
= withCString title $ \ctitle ->
! osAddMenuCheckItem hmenu (toCKey key) (toCModifiers mod) ctitle
foreign import ccall osAddMenuCheckItem :: MenuHandle -> CInt -> CWord -> CString -> IO MenuHandle
--- 55,72 ----
-- short-cut key should be registered. An event handler for a menu item can be
-- installed with 'registerMenuCommand'.
! addMenuItem :: MenuHandle -> Key -> String -> IO MenuHandle
! addMenuItem hmenu key title
= withCString title $ \ctitle ->
! let (ckey,cmods) = toCKey key
! in osAddMenuItem hmenu ckey cmods ctitle
foreign import ccall osAddMenuItem :: MenuHandle -> CInt -> CWord -> CString -> IO MenuHandle
-- | Add a checkable menu item. An event handler for a menu item can be
-- installed with 'registerMenuCommand'.
! addMenuCheckItem :: MenuHandle -> Key -> String -> IO MenuHandle
! addMenuCheckItem hmenu key title
= withCString title $ \ctitle ->
! let (ckey,cmods) = toCKey key
! in osAddMenuCheckItem hmenu ckey cmods ctitle
foreign import ccall osAddMenuCheckItem :: MenuHandle -> CInt -> CWord -> CString -> IO MenuHandle
***************
*** 76,83 ****
-- | Change the label (and short-cut key) of a menu item (or checkable menu item).
! setMenuItemLabel :: MenuHandle -> MenuHandle -> Key -> Modifiers -> String -> IO ()
! setMenuItemLabel hparent hmenu key mod title
= withCString title $ \ctitle ->
! osSetMenuItemLabel hparent hmenu (toCKey key) (toCModifiers mod) ctitle
foreign import ccall osSetMenuItemLabel :: MenuHandle -> MenuHandle -> CInt -> CWord -> CString -> IO ()
--- 78,86 ----
-- | Change the label (and short-cut key) of a menu item (or checkable menu item).
! setMenuItemLabel :: MenuHandle -> MenuHandle -> Key -> String -> IO ()
! setMenuItemLabel hparent hmenu key title
= withCString title $ \ctitle ->
! let (ckey,cmods) = toCKey key
! in osSetMenuItemLabel hparent hmenu ckey cmods ctitle
foreign import ccall osSetMenuItemLabel :: MenuHandle -> MenuHandle -> CInt -> CWord -> CString -> IO ()
***************
*** 93,100 ****
= osSetCheckMenuItemState parent item (toCBool enable)
foreign import ccall osSetCheckMenuItemState :: MenuHandle -> MenuHandle -> CBool -> IO ()
-
-
-
-
-
-
--- 96,97 ----
Index: Types.hs
===================================================================
RCS file: /cvsroot/htoolkit/port/src/Port/Types.hs,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** Types.hs 30 Jan 2003 23:58:07 -0000 1.11
--- Types.hs 31 Jan 2003 01:01:43 -0000 1.12
***************
*** 75,80 ****
-- ** Keyboard events
! , KeyboardEvent(..), Key(..), keyNull
! , keyboardKey, keyboardModifiers, keyboardRepeat
-- * Primitive Handles
--- 75,80 ----
-- ** Keyboard events
! , KeyboardEvent(..), Key(..), keyModifiers
! , keyboardKey, keyboardRepeat
-- * Primitive Handles
***************
*** 103,107 ****
, withCRect, withCRectResult, fromCRect
- , fromCModifiers, toCModifiers
, fromCKey, toCKey
, fromCMouseEvent
--- 103,106 ----
***************
*** 588,599 ****
KeyboardEvent
-----------------------------------------------------------------------------------------}
! -- | The KeyboardEvent type. Note that the modifiers for 'KeyChar' can only be 'altDown'.
! -- A 'shiftDown' gets translated into an upper-case character and a 'controlDown' in a
! -- control character. Alt-character combinations are normally processed by the system
! -- to handle menu's etc.
data KeyboardEvent
! = KeyDown !Key !Modifiers !IsRepeatKey -- ^ Key is down
! | KeyUp !Key !Modifiers -- ^ Key goes up
! | KeyLost !Key !Modifiers -- ^ The key was down when the widget lost focus
deriving (Eq,Show)
--- 587,595 ----
KeyboardEvent
-----------------------------------------------------------------------------------------}
! -- | The KeyboardEvent type.
data KeyboardEvent
! = KeyDown !Key !IsRepeatKey -- ^ Key is down
! | KeyUp !Key -- ^ Key goes up
! | KeyLost !Key -- ^ The key was down when the widget lost focus
deriving (Eq,Show)
***************
*** 601,625 ****
type IsRepeatKey = Bool
- -- | A /null/ key equals (@KeyChar (toEnum 0)@). It can be used to specify for example
- -- that the menu has no shortcut key.
- keyNull :: Key
- keyNull
- = KeyChar '\0'
-
-- | Extract the key from a 'KeyboardEvent'
keyboardKey :: KeyboardEvent -> Key
keyboardKey event
= case event of
! KeyDown key mod repeat -> key
! KeyUp key mod -> key
! KeyLost key mod -> key
!
! -- | Extract the modifiers from a 'KeyboardEvent'
! keyboardModifiers :: KeyboardEvent -> Modifiers
! keyboardModifiers event
! = case event of
! KeyDown key mod repeat -> mod
! KeyUp key mod -> mod
! KeyLost key mod -> mod
-- | Is this a key that is held down.
--- 597,607 ----
type IsRepeatKey = Bool
-- | Extract the key from a 'KeyboardEvent'
keyboardKey :: KeyboardEvent -> Key
keyboardKey event
= case event of
! KeyDown key repeat -> key
! KeyUp key -> key
! KeyLost key -> key
-- | Is this a key that is held down.
***************
*** 627,756 ****
keyboardRepeat event
= case event of
! KeyDown key mod repeat -> repeat
! other -> False
! -- | Keyboard keys
data Key
! = KeyBegin
! | KeyClear
! | KeyDelete
! | KeyEnd
! | KeyArrowDown
! | KeyArrowLeft
! | KeyArrowRight
! | KeyArrowUp
! | KeyPageDown
! | KeyPageUp
! | KeyEscape
! | KeyEnter
! | KeyTab
! | KeyBackSpace
! | KeyF1
! | KeyF2
! | KeyF3
! | KeyF4
! | KeyF5
! | KeyF6
! | KeyF7
! | KeyF8
! | KeyF9
! | KeyF10
! | KeyF11
! | KeyF12
! | KeyF13
! | KeyF14
! | KeyF15
! | KeyHelp
| KeyChar !Char
deriving (Eq,Show)
- fromCKey :: CInt -> Key
- fromCKey ci
- = case fromCInt ci of
- 8 -> KeyBackSpace
- 9 -> KeyTab
- 13 -> KeyEnter
- 27 -> KeyEscape
- 1003 -> KeyBegin
- 1004 -> KeyClear
- 1005 -> KeyDelete
- 1006 -> KeyArrowDown
- 1007 -> KeyEnd
- 1010 -> KeyF1
- 1011 -> KeyF2
- 1012 -> KeyF3
- 1013 -> KeyF4
- 1014 -> KeyF5
- 1015 -> KeyF6
- 1016 -> KeyF7
- 1017 -> KeyF8
- 1018 -> KeyF9
- 1019 -> KeyF10
- 1020 -> KeyF11
- 1021 -> KeyF12
- 1022 -> KeyF13
- 1023 -> KeyF14
- 1024 -> KeyF15
- 1025 -> KeyHelp
- 1026 -> KeyArrowLeft
- 1027 -> KeyPageDown
- 1028 -> KeyPageUp
- 1029 -> KeyArrowRight
- 1030 -> KeyArrowUp
- i -> KeyChar (toEnum i)
! toCKey :: Key -> CInt
! toCKey key
! = toCInt $
! case key of
! KeyBackSpace -> 8
! KeyTab -> 9
! KeyEnter -> 13
! KeyEscape -> 27
! KeyBegin -> 1003
! KeyClear -> 1004
! KeyDelete -> 1005
! KeyArrowDown -> 1006
! KeyEnd -> 1007
! KeyF1 -> 1010
! KeyF2 -> 1011
! KeyF3 -> 1012
! KeyF4 -> 1013
! KeyF5 -> 1014
! KeyF6 -> 1015
! KeyF7 -> 1016
! KeyF8 -> 1017
! KeyF9 -> 1018
! KeyF10 -> 1019
! KeyF11 -> 1020
! KeyF12 -> 1021
! KeyF13 -> 1022
! KeyF14 -> 1023
! KeyF15 -> 1024
! KeyHelp -> 1025
! KeyArrowLeft -> 1026
! KeyPageDown -> 1027
! KeyPageUp -> 1028
! KeyArrowRight -> 1029
! KeyArrowUp -> 1030
! KeyChar c -> fromEnum c
- adjustKeyAltChar :: Key -> Modifiers -> (Key,Modifiers)
- adjustKeyAltChar (KeyChar c) mods | fromEnum c >= 256
- = (KeyChar (toEnum (fromEnum c - 256)), mods{ altDown = True })
- adjustKeyAltChar key mods
- = (key,mods)
fromCKeyboardEvent :: CInt -> CInt -> CWord -> KeyboardEvent
fromCKeyboardEvent cevent ckey cmodifiers
! = fromCEvent cevent (adjustKeyAltChar (fromCKey ckey) (fromCModifiers cmodifiers))
where
! fromCEvent cevent (key,modifiers)
= case fromCInt cevent of
! 10 -> KeyDown key modifiers False
! 11 -> KeyDown key modifiers True
! 12 -> KeyUp key modifiers
! 13 -> KeyLost key modifiers
--- 609,780 ----
keyboardRepeat event
= case event of
! KeyDown key repeat -> repeat
! other -> False
! -- | Keyboard keys.
! -- A Shift-character combinations gets translated into an upper-case character and a Ctrl-character in a
! -- control character. Alt-character combinations are normally processed by the system
! -- to handle menu's etc.
data Key
! = KeyBegin Modifiers
! | KeyClear Modifiers
! | KeyDelete Modifiers
! | KeyEnd Modifiers
! | KeyArrowDown Modifiers
! | KeyArrowLeft Modifiers
! | KeyArrowRight Modifiers
! | KeyArrowUp Modifiers
! | KeyPageDown Modifiers
! | KeyPageUp Modifiers
! | KeyEscape Modifiers
! | KeyEnter Modifiers
! | KeyTab Modifiers
! | KeyBackSpace Modifiers
! | KeyF1 Modifiers
! | KeyF2 Modifiers
! | KeyF3 Modifiers
! | KeyF4 Modifiers
! | KeyF5 Modifiers
! | KeyF6 Modifiers
! | KeyF7 Modifiers
! | KeyF8 Modifiers
! | KeyF9 Modifiers
! | KeyF10 Modifiers
! | KeyF11 Modifiers
! | KeyF12 Modifiers
! | KeyF13 Modifiers
! | KeyF14 Modifiers
! | KeyF15 Modifiers
! | KeyHelp Modifiers
| KeyChar !Char
+ | KeyAltChar !Char
+ | KeyNull
deriving (Eq,Show)
+
+ -- | Extract the modifiers from a key
+ keyModifiers :: Key -> Modifiers
+ keyModifiers (KeyBegin mods) = mods
+ keyModifiers (KeyClear mods) = mods
+ keyModifiers (KeyDelete mods) = mods
+ keyModifiers (KeyEnd mods) = mods
+ keyModifiers (KeyArrowDown mods) = mods
+ keyModifiers (KeyArrowLeft mods) = mods
+ keyModifiers (KeyArrowRight mods) = mods
+ keyModifiers (KeyArrowUp mods) = mods
+ keyModifiers (KeyPageDown mods) = mods
+ keyModifiers (KeyPageUp mods) = mods
+ keyModifiers (KeyEscape mods) = mods
+ keyModifiers (KeyEnter mods) = mods
+ keyModifiers (KeyTab mods) = mods
+ keyModifiers (KeyBackSpace mods) = mods
+ keyModifiers (KeyF1 mods) = mods
+ keyModifiers (KeyF2 mods) = mods
+ keyModifiers (KeyF3 mods) = mods
+ keyModifiers (KeyF4 mods) = mods
+ keyModifiers (KeyF5 mods) = mods
+ keyModifiers (KeyF6 mods) = mods
+ keyModifiers (KeyF7 mods) = mods
+ keyModifiers (KeyF8 mods) = mods
+ keyModifiers (KeyF9 mods) = mods
+ keyModifiers (KeyF10 mods) = mods
+ keyModifiers (KeyF11 mods) = mods
+ keyModifiers (KeyF12 mods) = mods
+ keyModifiers (KeyF13 mods) = mods
+ keyModifiers (KeyF14 mods) = mods
+ keyModifiers (KeyF15 mods) = mods
+ keyModifiers (KeyHelp mods) = mods
+ keyModifiers (KeyChar _ ) = noModifiers
+ keyModifiers (KeyAltChar _ ) = noModifiers
+ keyModifiers (KeyNull ) = noModifiers
! fromCKey :: CInt -> CWord -> Key
! fromCKey ci cmodifiers =
! let mods = fromCModifiers cmodifiers
! in case fromCInt ci of
! 0 -> KeyNull
! 8 -> KeyBackSpace mods
! 9 -> KeyTab mods
! 13 -> KeyEnter mods
! 27 -> KeyEscape mods
! 1003 -> KeyBegin mods
! 1004 -> KeyClear mods
! 1005 -> KeyDelete mods
! 1006 -> KeyArrowDown mods
! 1007 -> KeyEnd mods
! 1010 -> KeyF1 mods
! 1011 -> KeyF2 mods
! 1012 -> KeyF3 mods
! 1013 -> KeyF4 mods
! 1014 -> KeyF5 mods
! 1015 -> KeyF6 mods
! 1016 -> KeyF7 mods
! 1017 -> KeyF8 mods
! 1018 -> KeyF9 mods
! 1019 -> KeyF10 mods
! 1020 -> KeyF11 mods
! 1021 -> KeyF12 mods
! 1022 -> KeyF13 mods
! 1023 -> KeyF14 mods
! 1024 -> KeyF15 mods
! 1025 -> KeyHelp mods
! 1026 -> KeyArrowLeft mods
! 1027 -> KeyPageDown mods
! 1028 -> KeyPageUp mods
! 1029 -> KeyArrowRight mods
! 1030 -> KeyArrowUp mods
! i -> if i > 256
! then KeyAltChar (toEnum (i-256))
! else KeyChar (toEnum i)
+ toCKey :: Key -> (CInt,CWord)
+ toCKey key = (toCInt keyCode, toCModifiers mods)
+ where
+ (keyCode, mods) = case key of
+ KeyBackSpace mods -> (8, mods)
+ KeyTab mods -> (9, mods)
+ KeyEnter mods -> (13, mods)
+ KeyEscape mods -> (27, mods)
+ KeyBegin mods -> (1003, mods)
+ KeyClear mods -> (1004, mods)
+ KeyDelete mods -> (1005, mods)
+ KeyArrowDown mods -> (1006, mods)
+ KeyEnd mods -> (1007, mods)
+ KeyF1 mods -> (1010, mods)
+ KeyF2 mods -> (1011, mods)
+ KeyF3 mods -> (1012, mods)
+ KeyF4 mods -> (1013, mods)
+ KeyF5 mods -> (1014, mods)
+ KeyF6 mods -> (1015, mods)
+ KeyF7 mods -> (1016, mods)
+ KeyF8 mods -> (1017, mods)
+ KeyF9 mods -> (1018, mods)
+ KeyF10 mods -> (1019, mods)
+ KeyF11 mods -> (1020, mods)
+ KeyF12 mods -> (1021, mods)
+ KeyF13 mods -> (1022, mods)
+ KeyF14 mods -> (1023, mods)
+ KeyF15 mods -> (1024, mods)
+ KeyHelp mods -> (1025, mods)
+ KeyArrowLeft mods -> (1026, mods)
+ KeyPageDown mods -> (1027, mods)
+ KeyPageUp mods -> (1028, mods)
+ KeyArrowRight mods -> (1029, mods)
+ KeyArrowUp mods -> (1030, mods)
+ KeyChar c -> (fromEnum c, noModifiers)
+ KeyAltChar c -> (fromEnum c+256, noModifiers)
+ KeyNull -> (0, noModifiers)
fromCKeyboardEvent :: CInt -> CInt -> CWord -> KeyboardEvent
fromCKeyboardEvent cevent ckey cmodifiers
! = fromCEvent cevent (fromCKey ckey cmodifiers)
where
! fromCEvent cevent key
= case fromCInt cevent of
! 10 -> KeyDown key False
! 11 -> KeyDown key True
! 12 -> KeyUp key
! 13 -> KeyLost key
|
|
From: <kr_...@us...> - 2003-01-31 01:02:17
|
Update of /cvsroot/htoolkit/port/src
In directory sc8-pr-cvs1:/tmp/cvs-serv18912/port/src
Modified Files:
Port.hs
Log Message:
Replace definition of Key with its own definition from HToolkit
Index: Port.hs
===================================================================
RCS file: /cvsroot/htoolkit/port/src/Port.hs,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** Port.hs 30 Jan 2003 11:36:06 -0000 1.5
--- Port.hs 31 Jan 2003 01:01:42 -0000 1.6
***************
*** 53,57 ****
, withCRect, withCRectResult, fromCRect
- , fromCModifiers, toCModifiers
, fromCKey, toCKey
, fromCMouseEvent
--- 53,56 ----
|
|
From: <kr_...@us...> - 2003-01-31 01:01:53
|
Update of /cvsroot/htoolkit/gio/src/Graphics/UI/GIO
In directory sc8-pr-cvs1:/tmp/cvs-serv18912/gio/src/Graphics/UI/GIO
Modified Files:
Events.hs Menu.hs Types.hs Window.hs
Log Message:
Replace definition of Key with its own definition from HToolkit
Index: Events.hs
===================================================================
RCS file: /cvsroot/htoolkit/gio/src/Graphics/UI/GIO/Events.hs,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** Events.hs 27 Jan 2003 22:14:39 -0000 1.2
--- Events.hs 31 Jan 2003 01:01:44 -0000 1.3
***************
*** 266,282 ****
enterKey,tabKey,escKey,helpKey,delKey,homeKey,endKey :: Reactive w => Event w (IO ())
pgupKey,pgdownKey,downKey,upKey,leftKey,rightKey :: Reactive w => Event w (IO ())
! enterKey = key KeyEnter
! tabKey = key KeyTab
! escKey = key KeyEscape
! helpKey = key KeyHelp
! delKey = key KeyDelete
! homeKey = key KeyBegin
! endKey = key KeyEnd
! pgupKey = key KeyPageUp
! pgdownKey = key KeyPageDown
! downKey = key KeyArrowDown
! upKey = key KeyArrowUp
! leftKey = key KeyArrowLeft
! rightKey = key KeyArrowRight
charKey :: Reactive w => Char -> Event w (IO ())
--- 266,282 ----
enterKey,tabKey,escKey,helpKey,delKey,homeKey,endKey :: Reactive w => Event w (IO ())
pgupKey,pgdownKey,downKey,upKey,leftKey,rightKey :: Reactive w => Event w (IO ())
! enterKey = key (KeyEnter noModifiers)
! tabKey = key (KeyTab noModifiers)
! escKey = key (KeyEscape noModifiers)
! helpKey = key (KeyHelp noModifiers)
! delKey = key (KeyDelete noModifiers)
! homeKey = key (KeyBegin noModifiers)
! endKey = key (KeyEnd noModifiers)
! pgupKey = key (KeyPageUp noModifiers)
! pgdownKey = key (KeyPageDown noModifiers)
! downKey = key (KeyArrowDown noModifiers)
! upKey = key (KeyArrowUp noModifiers)
! leftKey = key (KeyArrowLeft noModifiers)
! rightKey = key (KeyArrowRight noModifiers)
charKey :: Reactive w => Char -> Event w (IO ())
***************
*** 288,293 ****
= keyboardFilter "key" filter
where
! filter (KeyDown x mod False) = (k==x) && noneDown mod
! filter other = False
--- 288,293 ----
= keyboardFilter "key" filter
where
! filter (KeyDown x False) = k==x
! filter other = False
***************
*** 296,301 ****
= keyboardFilter1 "anyKey" filter
where
! filter (KeyDown x mod False) = noneDown mod
! filter other = False
--- 296,301 ----
= keyboardFilter1 "anyKey" filter
where
! filter (KeyDown x False) = True
! filter other = False
Index: Menu.hs
===================================================================
RCS file: /cvsroot/htoolkit/gio/src/Graphics/UI/GIO/Menu.hs,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** Menu.hs 26 Jan 2003 12:41:49 -0000 1.1.1.1
--- Menu.hs 31 Jan 2003 01:01:44 -0000 1.2
***************
*** 16,20 ****
-- * Menu items
-- ** Menu item
! , MenuItem, menuitem, menukey, menumod
-- ** Menu separator
, menuline
--- 16,20 ----
-- * Menu items
-- ** Menu item
! , MenuItem, menuitem, menukey
-- ** Menu separator
, menuline
***************
*** 77,81 ****
, mtext :: String
, vkey :: Var Key
- , vmod :: Var Modifiers
, venabled :: Var Bool
, vcommand :: EventHandler (IO ())
--- 77,80 ----
***************
*** 85,95 ****
menuitem :: String -> [Prop MenuItem] -> Menu -> IO MenuItem
menuitem title props menu
! = do mitem <- do hitem <- Lib.addMenuItem (hmenu menu) (KeyChar '\0') noModifiers title
Lib.registerWindowMenu (hwindow menu) hitem
venabled <- newVar True
vcommand <- newEventHandler
! vkey <- newVar (KeyChar '\0')
! vmod <- newVar noModifiers
! return (MenuItem hitem menu title vkey vmod venabled vcommand)
set mitem props
return mitem
--- 84,93 ----
menuitem :: String -> [Prop MenuItem] -> Menu -> IO MenuItem
menuitem title props menu
! = do mitem <- do hitem <- Lib.addMenuItem (hmenu menu) Lib.KeyNull title
Lib.registerWindowMenu (hwindow menu) hitem
venabled <- newVar True
vcommand <- newEventHandler
! vkey <- newVar Lib.KeyNull
! return (MenuItem hitem menu title vkey venabled vcommand)
set mitem props
return mitem
***************
*** 112,131 ****
(\w x -> do setVar (vkey w) x; menuItemUpdateLabel w)
- -- | The modifiers for the short-cut key.
- menumod :: Attr MenuItem Modifiers
- menumod
- = newAttr (\w -> getVar (vmod w))
- (\w x -> do setVar (vmod w) x; menuItemUpdateLabel w)
-
menuItemUpdateLabel m
= do key <- getVar (vkey m)
! mod <- getVar (vmod m)
! let mod' = case key of
! KeyChar c | isLower c && noneDown mod -> mod{ controlDown = True }
! | isUpper c -> mod{ shiftDown = False }
! other -> mod
! Lib.setMenuItemLabel (hmenu (parent m)) (hitem m) key mod' (mtext m)
! setVar (vmod m) mod'
!
{--------------------------------------------------------------------
--- 110,116 ----
(\w x -> do setVar (vkey w) x; menuItemUpdateLabel w)
menuItemUpdateLabel m
= do key <- getVar (vkey m)
! Lib.setMenuItemLabel (hmenu (parent m)) (hitem m) key (mtext m)
{--------------------------------------------------------------------
Index: Types.hs
===================================================================
RCS file: /cvsroot/htoolkit/gio/src/Graphics/UI/GIO/Types.hs,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** Types.hs 30 Jan 2003 23:58:39 -0000 1.5
--- Types.hs 31 Jan 2003 01:01:44 -0000 1.6
***************
*** 56,60 ****
-- ** Keyboard events
, KeyboardEvent(..), Key(..)
! , keyboardKey, keyboardModifiers, keyboardRepeat
-- * Render
--- 56,60 ----
-- ** Keyboard events
, KeyboardEvent(..), Key(..)
! , keyboardKey, keyboardRepeat, keyModifiers
-- * Render
Index: Window.hs
===================================================================
RCS file: /cvsroot/htoolkit/gio/src/Graphics/UI/GIO/Window.hs,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** Window.hs 30 Jan 2003 23:58:40 -0000 1.3
--- Window.hs 31 Jan 2003 01:01:45 -0000 1.4
***************
*** 119,123 ****
! keyboardWindow w (KeyDown KeyF4 mod rep) | altDown mod
= close w
keyboardWindow w kbd
--- 119,123 ----
! keyboardWindow w (KeyDown (KeyF4 mod) rep) | altDown mod
= close w
keyboardWindow w kbd
|
|
From: <kr_...@us...> - 2003-01-31 00:08:07
|
Update of /cvsroot/htoolkit/gio/src/Graphics/UI/GIO In directory sc8-pr-cvs1:/tmp/cvs-serv2298/src/Graphics/UI/GIO Removed Files: Geometry.hs Log Message: Remove Geometry.hs. All combinators are moved to port. --- Geometry.hs DELETED --- |
|
From: <kr_...@us...> - 2003-01-30 23:59:18
|
Update of /cvsroot/htoolkit/gio/src/Graphics/UI/GIO
In directory sc8-pr-cvs1:/tmp/cvs-serv31455/gio/src/Graphics/UI/GIO
Modified Files:
Attributes.hs Canvas.hs Layout.hs Types.hs Window.hs
Log Message:
Move Geometry combinators from gio to port
Index: Attributes.hs
===================================================================
RCS file: /cvsroot/htoolkit/gio/src/Graphics/UI/GIO/Attributes.hs,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** Attributes.hs 30 Jan 2003 21:54:49 -0000 1.3
--- Attributes.hs 30 Jan 2003 23:58:27 -0000 1.4
***************
*** 82,86 ****
import Graphics.UI.GIO.Types
- import Graphics.UI.GIO.Geometry
infixr 0 =:, =::
--- 82,85 ----
Index: Canvas.hs
===================================================================
RCS file: /cvsroot/htoolkit/gio/src/Graphics/UI/GIO/Canvas.hs,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** Canvas.hs 30 Jan 2003 21:54:49 -0000 1.2
--- Canvas.hs 30 Jan 2003 23:58:30 -0000 1.3
***************
*** 70,74 ****
import Graphics.UI.GIO.Types
import Graphics.UI.GIO.Attributes
- import Graphics.UI.GIO.Geometry
import Graphics.UI.GIO.Bitmap
--- 70,73 ----
Index: Layout.hs
===================================================================
RCS file: /cvsroot/htoolkit/gio/src/Graphics/UI/GIO/Layout.hs,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** Layout.hs 29 Jan 2003 16:16:06 -0000 1.3
--- Layout.hs 30 Jan 2003 23:58:33 -0000 1.4
***************
*** 122,126 ****
import Graphics.UI.GIO.Types
import Graphics.UI.GIO.Attributes
- import Graphics.UI.GIO.Geometry
infixl 7 <<<, <<<<
--- 122,125 ----
Index: Types.hs
===================================================================
RCS file: /cvsroot/htoolkit/gio/src/Graphics/UI/GIO/Types.hs,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** Types.hs 30 Jan 2003 11:55:40 -0000 1.4
--- Types.hs 30 Jan 2003 23:58:39 -0000 1.5
***************
*** 16,28 ****
--- 16,35 ----
-- ** Size
Size(..), sz, sw, sh
+ , sizeEncloses
-- ** Point
, Point(..), pt, px, py
+ , pointFromVec
+ , pointMove
-- ** Vector
, Vector(..), vc, vx, vy
+ , vecNegate, vecFromPoint
-- ** Rectangle
, Rect(..)
+ , rectMoveTo, rectStretchTo
+ , rectMove
+ , rectUnion
-- *** Construction
***************
*** 116,124 ****
- justShift, justAlt, justControl :: Modifiers
- justShift = noModifiers{ shiftDown = True }
- justAlt = noModifiers{ altDown = True }
- justControl = noModifiers{ controlDown = True }
-
bounded :: Ord a => a -> a -> a -> a
bounded lo hi x
--- 123,126 ----
***************
*** 148,217 ****
updateVar v f = do x <- takeVar v; putVar v (f x); return x
-
{--------------------------------------------------------------------
! Geometry: points, vectors and sizes.
! --------------------------------------------------------------------}
! -- | A vector with an x and y delta.
! -- data Vector = Vector !Int !Int
!
! -- | Short function to construct a vector.
! vc :: Int -> Int -> Vector
! vc dx dy = Vector dx dy
!
! -- | Get the delta-x component of a vector
! vx :: Vector -> Int
! vx (Vector x y) = x
!
! -- | Get the delta-y component of a vector
! vy :: Vector -> Int
! vy (Vector x y) = y
!
!
! -- | Short function to construct a point.
! pt :: Int -> Int -> Point
! pt x y = Point x y
!
! -- | Get the x component of a point.
! px :: Point -> Int
! px (Point x y) = x
!
! -- | Get the y component of a point.
! py :: Point -> Int
! py (Point x y) = y
!
!
! -- | Short function to construct a size
! sz :: Int -> Int -> Size
! sz w h = Size w h
!
! -- | Get the width of a size
! sw :: Size -> Int
! sw (Size w h) = w
!
! -- | Get the height of a size
! sh :: Size -> Int
! sh (Size w h) = h
!
! {--------------------------------------------------------------------
! Geometry: rectangles
--------------------------------------------------------------------}
- left, right, top, bottom :: Rect -> Int
- left (Rect l t r b) = l
- right (Rect l t r b) = r
- bottom (Rect l t r b) = b
- top (Rect l t r b) = t
-
-
- topLeft, topRight, bottomLeft, bottomRight :: Rect -> Point
- topLeft (Rect l t r b) = Point l t
- topRight (Rect l t r b) = Point r t
- bottomLeft (Rect l t r b) = Point l b
- bottomRight (Rect l t r b) = Point r b
-
- -- | Short function to construct a (positive) rectangle between two (arbitraty) points.
- rect :: Point -> Point -> Rect
- rect p0 p1
- = rectBetween p0 p1
-
getColorRGB :: Color -> (Int,Int,Int)
--- 150,156 ----
updateVar v f = do x <- takeVar v; putVar v (f x); return x
{--------------------------------------------------------------------
! Color
--------------------------------------------------------------------}
getColorRGB :: Color -> (Int,Int,Int)
Index: Window.hs
===================================================================
RCS file: /cvsroot/htoolkit/gio/src/Graphics/UI/GIO/Window.hs,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** Window.hs 27 Jan 2003 22:14:39 -0000 1.2
--- Window.hs 30 Jan 2003 23:58:40 -0000 1.3
***************
*** 21,25 ****
import Graphics.UI.GIO.Types
import Graphics.UI.GIO.Attributes
- import Graphics.UI.GIO.Geometry( sizeEncloses )
import Graphics.UI.GIO.Events
import Graphics.UI.GIO.Canvas
--- 21,24 ----
|
|
From: <kr_...@us...> - 2003-01-30 23:59:17
|
Update of /cvsroot/htoolkit/port/src/Port
In directory sc8-pr-cvs1:/tmp/cvs-serv31455/port/src/Port
Modified Files:
Types.hs
Log Message:
Move Geometry combinators from gio to port
Index: Types.hs
===================================================================
RCS file: /cvsroot/htoolkit/port/src/Port/Types.hs,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** Types.hs 30 Jan 2003 23:09:46 -0000 1.10
--- Types.hs 30 Jan 2003 23:58:07 -0000 1.11
***************
*** 19,32 ****
-- ** Points
! Point(..), pointFromVec, pointMove, pointMoveBySize, pointAdd, pointSub, pointScale
-- ** Sizes
! , Size(..), sizeEncloses, maxSize, addh, addv, sizeDistance
-- ** Vectors
! , Vector(..), vecNegate, vecOrtogonal, vecFromPoint, vecAdd, vecSub, vecScale, vecDistance
-- ** Rectangles
! , Rect(..), rectBetween, rectAt, rectSize, rectOfSize, rectIsEmpty
, pointInRect, rectMoveTo, pointToRect, centralPoint, centralRect, rectStretchTo
, rectMove, disjointRects, rectsDiff, rectUnion, rectSect
--- 19,33 ----
-- ** Points
! Point(..), pt, pointFromVec, pointMove, pointMoveBySize, pointAdd, pointSub, pointScale
-- ** Sizes
! , Size(..), sz, sizeEncloses, maxSize, addh, addv, sizeDistance
-- ** Vectors
! , Vector(..), vc, vecNegate, vecOrtogonal, vecFromPoint, vecAdd, vecSub, vecScale, vecDistance
-- ** Rectangles
! , Rect(..), topLeft, topRight, bottomLeft, bottomRight
! , rect, rectAt, rectSize, rectOfSize, rectIsEmpty
, pointInRect, rectMoveTo, pointToRect, centralPoint, centralRect, rectStretchTo
, rectMove, disjointRects, rectsDiff, rectUnion, rectSect
***************
*** 67,71 ****
-- ** Modifiers
, Modifiers(..)
! , noneDown, noModifiers
-- ** Mouse events
--- 68,72 ----
-- ** Modifiers
, Modifiers(..)
! , noneDown, justShift, justAlt, justControl, noModifiers
-- ** Mouse events
***************
*** 230,235 ****
-- upper-left corner of their view frame, where a positive x goes to the right and
-- a positive y to the bottom of the view.
! data Point = Point !Int !Int -- ^ x and y coordinate
! deriving (Eq,Show)
pointFromVec :: Vector -> Point
--- 231,243 ----
-- upper-left corner of their view frame, where a positive x goes to the right and
-- a positive y to the bottom of the view.
! data Point = Point
! { px :: !Int -- ^ x component of a point.
! , py :: !Int -- ^ y component of a point.
! }
! deriving (Eq,Show)
!
! -- | Short function to construct a point.
! pt :: Int -> Int -> Point
! pt x y = Point x y
pointFromVec :: Vector -> Point
***************
*** 267,273 ****
-----------------------------------------------------------------------------------------}
-- | A @Size@ has a width and height.
! data Size = Size !Int !Int -- ^ width and height.
! deriving (Eq,Show)
!
sizeEncloses :: Size -> Size -> Bool
sizeEncloses (Size w0 h0) (Size w1 h1)
--- 275,288 ----
-----------------------------------------------------------------------------------------}
-- | A @Size@ has a width and height.
! data Size = Size
! { sw :: !Int -- ^ the width of a size
! , sh :: !Int -- ^ the height of a size
! }
! deriving (Eq,Show)
!
! -- | Short function to construct a size
! sz :: Int -> Int -> Size
! sz w h = Size w h
!
sizeEncloses :: Size -> Size -> Bool
sizeEncloses (Size w0 h0) (Size w1 h1)
***************
*** 306,312 ****
Vector
-----------------------------------------------------------------------------------------}
! data Vector = Vector !Int !Int -- ^ x and y coordinate
! deriving (Eq,Show)
vecNegate :: Vector -> Vector
--- 321,334 ----
Vector
-----------------------------------------------------------------------------------------}
+ -- | A vector with an x and y delta.
+ data Vector = Vector
+ { vx :: !Int -- ^ delta-x component of a vector
+ , vy :: !Int -- ^ delta-y component of a vector
+ }
+ deriving (Eq,Show)
! -- | Short function to construct a vector.
! vc :: Int -> Int -> Vector
! vc dx dy = Vector dx dy
vecNegate :: Vector -> Vector
***************
*** 341,352 ****
-- (and not a single pixel). The pixel width of a rectangle is therefore simply the difference
-- between the right and left, or bottom and top coordinate.
! data Rect = Rect !Int !Int !Int !Int
! deriving (Eq,Show)
-- | Construct a (positive) rectangle between two (arbitraty) points.
! rectBetween :: Point -> Point -> Rect
! rectBetween (Point x0 y0) (Point x1 y1)
= Rect (min x0 x1) (min y0 y1) (max x0 x1) (max y0 y1)
--- 363,384 ----
-- (and not a single pixel). The pixel width of a rectangle is therefore simply the difference
-- between the right and left, or bottom and top coordinate.
! data Rect = Rect
! { left :: !Int
! , top :: !Int
! , right :: !Int
! , bottom :: !Int
! }
! deriving (Eq,Show)
+ topLeft, topRight, bottomLeft, bottomRight :: Rect -> Point
+ topLeft (Rect l t r b) = Point l t
+ topRight (Rect l t r b) = Point r t
+ bottomLeft (Rect l t r b) = Point l b
+ bottomRight (Rect l t r b) = Point r b
-- | Construct a (positive) rectangle between two (arbitraty) points.
! rect :: Point -> Point -> Rect
! rect (Point x0 y0) (Point x1 y1)
= Rect (min x0 x1) (min y0 y1) (max x0 x1) (max y0 y1)
***************
*** 459,469 ****
-- | Construct a 'Modifiers' structure with no meta keys pressed.
noModifiers :: Modifiers
! noModifiers
! = Modifiers False False False
-- | Test if no meta key was pressed.
noneDown :: Modifiers -> Bool
! noneDown (Modifiers shift control alt)
! = not (shift || control || alt)
--- 491,512 ----
-- | Construct a 'Modifiers' structure with no meta keys pressed.
noModifiers :: Modifiers
! noModifiers = Modifiers False False False
!
! -- | Construct a 'Modifiers' structure with just Shift meta key pressed.
! justShift :: Modifiers
! justShift = noModifiers{ shiftDown = True }
!
! -- | Construct a 'Modifiers' structure with just Alt meta key pressed.
! justAlt :: Modifiers
! justAlt = noModifiers{ altDown = True }
!
! -- | Construct a 'Modifiers' structure with just Ctrl meta key pressed.
! justControl :: Modifiers
! justControl = noModifiers{ controlDown = True }
-- | Test if no meta key was pressed.
noneDown :: Modifiers -> Bool
! noneDown (Modifiers shift control alt) = not (shift || control || alt)
!
|
|
From: <kr_...@us...> - 2003-01-30 23:59:02
|
Update of /cvsroot/htoolkit/gio/src/Graphics/UI
In directory sc8-pr-cvs1:/tmp/cvs-serv31455/gio/src/Graphics/UI
Modified Files:
GIO.hs
Log Message:
Move Geometry combinators from gio to port
Index: GIO.hs
===================================================================
RCS file: /cvsroot/htoolkit/gio/src/Graphics/UI/GIO.hs,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** GIO.hs 30 Jan 2003 21:54:49 -0000 1.3
--- GIO.hs 30 Jan 2003 23:58:20 -0000 1.4
***************
*** 17,21 ****
module Graphics.UI.GIO.Types
, module Graphics.UI.GIO.Font
- , module Graphics.UI.GIO.Geometry
, module Graphics.UI.GIO.Attributes
, module Graphics.UI.GIO.Bitmap
--- 17,20 ----
***************
*** 36,40 ****
import Graphics.UI.GIO.Font
import Graphics.UI.GIO.Attributes
- import Graphics.UI.GIO.Geometry
import Graphics.UI.GIO.Bitmap
import Graphics.UI.GIO.Canvas
--- 35,38 ----
|
|
From: <kr_...@us...> - 2003-01-30 23:58:54
|
Update of /cvsroot/htoolkit/gio In directory sc8-pr-cvs1:/tmp/cvs-serv31455/gio Modified Files: makefile Log Message: Move Geometry combinators from gio to port Index: makefile =================================================================== RCS file: /cvsroot/htoolkit/gio/makefile,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** makefile 30 Jan 2003 21:54:49 -0000 1.5 --- makefile 30 Jan 2003 23:58:14 -0000 1.6 *************** *** 30,34 **** # haskell (H) and C sources ! HSOURCES = GIO/Types.hs GIO/Font.hs GIO/Geometry.hs GIO/Attributes.hs GIO/Layout.hs \ GIO/Bitmap.hs GIO/Canvas.hs \ GIO/Events.hs GIO/Timer.hs \ --- 30,35 ---- # haskell (H) and C sources ! ! HSOURCES = GIO/Types.hs GIO/Font.hs GIO/Attributes.hs GIO/Layout.hs \ GIO/Bitmap.hs GIO/Canvas.hs \ GIO/Events.hs GIO/Timer.hs \ |
|
From: <dl...@us...> - 2003-01-30 23:50:02
|
Update of /cvsroot/htoolkit/gio/src/examples/simple
In directory sc8-pr-cvs1:/tmp/cvs-serv29218/src/examples/simple
Added Files:
Calculator.hs
Log Message:
The infamous calculator example
--- NEW FILE: Calculator.hs ---
module Main where
import Char( isDigit, digitToInt )
import Graphics.UI.GIO
main
= start calculator
calculator
= do varst <- newVar (0,id)
w <- window [title =: "calculator", resizeable =: False]
display <- label [text =: "0"] w
keys <- mapM (\c -> button [text =: [c], on command =: cmd varst display c] w) "123+456-789*C0=/"
set w [layout =: (pad 10 (hglue <<< display)) ^^^ grid (matrix 4 (map (hfix 40) keys))]
where
matrix n [] = []
matrix n xs = take n xs : matrix n (drop n xs)
cmd varst display c
= do st <- getVar varst
let st' = calc st c
set display [text =: show (fst st')]
setVar varst st'
calc (d,accu) c
= case c of
'C' -> (0,id)
'=' -> (accu d,const (accu d))
'+' -> (0, (d+))
'-' -> (0, (d-))
'*' -> (0, (d*))
'/' -> (0, (\x -> if x==0 then 0 else div d x))
_ | isDigit c -> (10*d + digitToInt c,accu)
| otherwise -> (0,id)
|
|
From: <kr_...@us...> - 2003-01-30 23:09:50
|
Update of /cvsroot/htoolkit/port/src/Port
In directory sc8-pr-cvs1:/tmp/cvs-serv13141/src/Port
Modified Files:
Handlers.hs Menu.hs Types.hs
Log Message:
Types fix
Index: Handlers.hs
===================================================================
RCS file: /cvsroot/htoolkit/port/src/Port/Handlers.hs,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** Handlers.hs 27 Jan 2003 21:18:30 -0000 1.5
--- Handlers.hs 30 Jan 2003 23:09:46 -0000 1.6
***************
*** 535,539 ****
= unregister hwnd handlersWindowMouse
! handleWindowMouse :: WindowHandle -> CInt -> CInt -> CInt -> CInt -> IO ()
handleWindowMouse hwnd cevent cx cy cmodifiers
= invokeHandler hwnd handlersWindowMouse (\f -> f (fromCMouseEvent cevent cx cy cmodifiers))
--- 535,539 ----
= unregister hwnd handlersWindowMouse
! handleWindowMouse :: WindowHandle -> CInt -> CInt -> CInt -> CWord -> IO ()
handleWindowMouse hwnd cevent cx cy cmodifiers
= invokeHandler hwnd handlersWindowMouse (\f -> f (fromCMouseEvent cevent cx cy cmodifiers))
***************
*** 553,557 ****
= unregister hwnd handlersWindowKeyboard
! handleWindowKeyboard :: WindowHandle -> CInt -> CInt -> CInt -> IO ()
handleWindowKeyboard hwnd cevent ckey cmodifiers
= invokeHandler hwnd handlersWindowKeyboard (\f -> f (fromCKeyboardEvent cevent ckey cmodifiers))
--- 553,557 ----
= unregister hwnd handlersWindowKeyboard
! handleWindowKeyboard :: WindowHandle -> CInt -> CInt -> CWord -> IO ()
handleWindowKeyboard hwnd cevent ckey cmodifiers
= invokeHandler hwnd handlersWindowKeyboard (\f -> f (fromCKeyboardEvent cevent ckey cmodifiers))
***************
*** 641,646 ****
foreign export ccall handleWindowResize :: WindowHandle -> CInt -> CInt -> IO ()
foreign export ccall handleWindowScroll :: WindowHandle -> CInt -> CInt -> IO ()
! foreign export ccall handleWindowMouse :: WindowHandle -> CInt -> CInt -> CInt -> CInt -> IO ()
! foreign export ccall handleWindowKeyboard :: WindowHandle -> CInt -> CInt -> CInt -> IO ()
foreign export ccall handleWindowDeactivate :: WindowHandle -> IO ()
foreign export ccall handleWindowActivate :: WindowHandle -> IO ()
--- 641,646 ----
foreign export ccall handleWindowResize :: WindowHandle -> CInt -> CInt -> IO ()
foreign export ccall handleWindowScroll :: WindowHandle -> CInt -> CInt -> IO ()
! foreign export ccall handleWindowMouse :: WindowHandle -> CInt -> CInt -> CInt -> CWord -> IO ()
! foreign export ccall handleWindowKeyboard :: WindowHandle -> CInt -> CInt -> CWord -> IO ()
foreign export ccall handleWindowDeactivate :: WindowHandle -> IO ()
foreign export ccall handleWindowActivate :: WindowHandle -> IO ()
Index: Menu.hs
===================================================================
RCS file: /cvsroot/htoolkit/port/src/Port/Menu.hs,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** Menu.hs 20 Jan 2003 12:22:59 -0000 1.2
--- Menu.hs 30 Jan 2003 23:09:46 -0000 1.3
***************
*** 59,63 ****
= withCString title $ \ctitle ->
osAddMenuItem hmenu (toCKey key) (toCModifiers mod) ctitle
! foreign import ccall osAddMenuItem :: MenuHandle -> CInt -> CInt -> CString -> IO MenuHandle
-- | Add a checkable menu item. An event handler for a menu item can be
--- 59,63 ----
= withCString title $ \ctitle ->
osAddMenuItem hmenu (toCKey key) (toCModifiers mod) ctitle
! foreign import ccall osAddMenuItem :: MenuHandle -> CInt -> CWord -> CString -> IO MenuHandle
-- | Add a checkable menu item. An event handler for a menu item can be
***************
*** 67,71 ****
= withCString title $ \ctitle ->
osAddMenuCheckItem hmenu (toCKey key) (toCModifiers mod) ctitle
! foreign import ccall osAddMenuCheckItem :: MenuHandle -> CInt -> CInt -> CString -> IO MenuHandle
-- | Add a menu item separator line.
--- 67,71 ----
= withCString title $ \ctitle ->
osAddMenuCheckItem hmenu (toCKey key) (toCModifiers mod) ctitle
! foreign import ccall osAddMenuCheckItem :: MenuHandle -> CInt -> CWord -> CString -> IO MenuHandle
-- | Add a menu item separator line.
***************
*** 80,84 ****
= withCString title $ \ctitle ->
osSetMenuItemLabel hparent hmenu (toCKey key) (toCModifiers mod) ctitle
! foreign import ccall osSetMenuItemLabel :: MenuHandle -> MenuHandle -> CInt -> CInt -> CString -> IO ()
-- | Enable or disable a menu item.
--- 80,84 ----
= withCString title $ \ctitle ->
osSetMenuItemLabel hparent hmenu (toCKey key) (toCModifiers mod) ctitle
! foreign import ccall osSetMenuItemLabel :: MenuHandle -> MenuHandle -> CInt -> CWord -> CString -> IO ()
-- | Enable or disable a menu item.
Index: Types.hs
===================================================================
RCS file: /cvsroot/htoolkit/port/src/Port/Types.hs,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** Types.hs 30 Jan 2003 20:04:36 -0000 1.9
--- Types.hs 30 Jan 2003 23:09:46 -0000 1.10
***************
*** 244,255 ****
pointMoveBySize (Size w h) (Point x y) = Point (x + w) (y + h)
! pointAdd :: Vector -> Vector -> Vector
! pointAdd (Vector x1 y1) (Vector x2 y2) = Vector (x1+x2) (y1+y2)
! pointSub :: Vector -> Vector -> Vector
! pointSub (Vector x1 y1) (Vector x2 y2) = Vector (x1-x2) (y1-y2)
! pointScale :: Int -> Vector -> Vector
! pointScale v (Vector x y) = Vector (v*x) (v*y)
--- 244,255 ----
pointMoveBySize (Size w h) (Point x y) = Point (x + w) (y + h)
! pointAdd :: Point -> Point -> Point
! pointAdd (Point x1 y1) (Point x2 y2) = Point (x1+x2) (y1+y2)
! pointSub :: Point -> Point -> Point
! pointSub (Point x1 y1) (Point x2 y2) = Point (x1-x2) (y1-y2)
! pointScale :: Int -> Point -> Point
! pointScale v (Point x y) = Point (v*x) (v*y)
***************
*** 380,384 ****
centralPoint :: Rect -> Point
! centralPoint (Rect l t r b) = Point ((l + r) `div` 2) ((t + b) `div` 2)
centralRect :: Rect -> Size -> Rect
--- 380,384 ----
centralPoint :: Rect -> Point
! centralPoint (Rect l t r b) = Point ((l + r) `quot` 2) ((t + b) `quot` 2)
centralRect :: Rect -> Size -> Rect
***************
*** 387,394 ****
u = r - l
v = b - t
! x = (r + l) `div` 2
! y = (b + t) `div` 2
! dx = (min w u) `div` 2
! dy = (min h v) `div` 2
in
Rect (x - dx) (y - dy) (x + dx) (y + dy)
--- 387,394 ----
u = r - l
v = b - t
! x = (r + l) `quot` 2
! y = (b + t) `quot` 2
! dx = (min w u) `quot` 2
! dy = (min h v) `quot` 2
in
Rect (x - dx) (y - dy) (x + dx) (y + dy)
***************
*** 468,482 ****
! fromCModifiers :: CInt -> Modifiers
fromCModifiers ci
= Modifiers (bitsSet i 0x01) (bitsSet i 0x02) (bitsSet i 0x04)
where
! i = fromCInt ci
! bitsSet x mask = odd (x `div` mask)
!
! toCModifiers :: Modifiers -> CInt
toCModifiers (Modifiers shift control alt)
! = toCInt ((mask 0x01 shift) + (mask 0x02 control) + (mask 0x04 alt))
where
mask m test = if test then m else 0
--- 468,481 ----
! fromCModifiers :: CWord -> Modifiers
fromCModifiers ci
= Modifiers (bitsSet i 0x01) (bitsSet i 0x02) (bitsSet i 0x04)
where
! i = fromCWord ci
! bitsSet x mask = x .&. 0x01 /= 0
! toCModifiers :: Modifiers -> CWord
toCModifiers (Modifiers shift control alt)
! = toCWord ((mask 0x01 shift) + (mask 0x02 control) + (mask 0x04 alt))
where
mask m test = if test then m else 0
***************
*** 497,501 ****
| MouseDoubleClick !Point !Modifiers -- ^ Mouse left button is double clicked
| MouseDrag !Point !Modifiers -- ^ Mouse is moved over the client area of the window and its left button is down
- | MouseUnknown !Int !Point !Modifiers -- ^ Unknown mouse event with identifier.
deriving (Eq,Show)
--- 496,499 ----
***************
*** 513,517 ****
MouseDoubleClick p m-> p
MouseDrag p m -> p
- MouseUnknown i p m -> p
-- | Extract the modifiers from a 'MouseEvent'.
--- 511,514 ----
***************
*** 528,534 ****
MouseDoubleClick p m-> m
MouseDrag p m -> m
- MouseUnknown i p m -> m
! fromCMouseEvent :: CInt -> CInt -> CInt -> CInt -> MouseEvent
fromCMouseEvent cevent cx cy cmodifiers
= fromCEvent cevent (fromCPoint cx cy) (fromCModifiers cmodifiers)
--- 525,530 ----
MouseDoubleClick p m-> m
MouseDrag p m -> m
! fromCMouseEvent :: CInt -> CInt -> CInt -> CWord -> MouseEvent
fromCMouseEvent cevent cx cy cmodifiers
= fromCEvent cevent (fromCPoint cx cy) (fromCModifiers cmodifiers)
***************
*** 545,549 ****
8 -> MouseLeftUp
9 -> MouseRightUp
- _ -> MouseUnknown (fromIntegral cevent)
{-----------------------------------------------------------------------------------------
--- 541,544 ----
***************
*** 558,562 ****
| KeyUp !Key !Modifiers -- ^ Key goes up
| KeyLost !Key !Modifiers -- ^ The key was down when the widget lost focus
- | KeyUnknown !Key !Modifiers -- ^ Unknown keyboard event
deriving (Eq,Show)
--- 553,556 ----
***************
*** 577,581 ****
KeyUp key mod -> key
KeyLost key mod -> key
- KeyUnknown key mod -> key
-- | Extract the modifiers from a 'KeyboardEvent'
--- 571,574 ----
***************
*** 586,590 ****
KeyUp key mod -> mod
KeyLost key mod -> mod
- KeyUnknown key mod -> mod
-- | Is this a key that is held down.
--- 579,582 ----
***************
*** 708,712 ****
= (key,mods)
! fromCKeyboardEvent :: CInt -> CInt -> CInt -> KeyboardEvent
fromCKeyboardEvent cevent ckey cmodifiers
= fromCEvent cevent (adjustKeyAltChar (fromCKey ckey) (fromCModifiers cmodifiers))
--- 700,704 ----
= (key,mods)
! fromCKeyboardEvent :: CInt -> CInt -> CWord -> KeyboardEvent
fromCKeyboardEvent cevent ckey cmodifiers
= fromCEvent cevent (adjustKeyAltChar (fromCKey ckey) (fromCModifiers cmodifiers))
***************
*** 718,722 ****
12 -> KeyUp key modifiers
13 -> KeyLost key modifiers
- _ -> KeyUnknown key modifiers
--- 710,713 ----
***************
*** 785,789 ****
| LineDashDot -- ^ Dash - Dot pattern.
| LineDashDotDot -- ^ Dash - Dot - Dot pattern.
! | LineCustomStyle [Int] -- ^ Custom pattern: each element specifies the pixel length of a dash (between 0 and 127).
deriving (Eq,Show)
--- 776,780 ----
| LineDashDot -- ^ Dash - Dot pattern.
| LineDashDotDot -- ^ Dash - Dot - Dot pattern.
! | LineCustomStyle [Word8] -- ^ Custom pattern: each element specifies the pixel length of a dash.
deriving (Eq,Show)
***************
*** 799,809 ****
-> let n = length xs in
do pstyles <- mallocArray n
! pokeArray pstyles (map (fromIntegral . bounded 0 127) xs)
f 5 (toCInt n) pstyles -- freed by library
! where
! bounded low high x
! | x < low = low
! | x > high = high
! | otherwise = x
-- | The 'HatchStyle' is applied when filling an object.
--- 790,796 ----
-> let n = length xs in
do pstyles <- mallocArray n
! pokeArray pstyles (map fromIntegral xs)
f 5 (toCInt n) pstyles -- freed by library
!
-- | The 'HatchStyle' is applied when filling an object.
|
|
From: <kr_...@us...> - 2003-01-30 23:09:50
|
Update of /cvsroot/htoolkit/port/src/include In directory sc8-pr-cvs1:/tmp/cvs-serv13141/src/include Modified Files: Menu.h Log Message: Types fix Index: Menu.h =================================================================== RCS file: /cvsroot/htoolkit/port/src/include/Menu.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Menu.h 23 Jan 2003 20:19:32 -0000 1.2 --- Menu.h 30 Jan 2003 23:09:47 -0000 1.3 *************** *** 6,11 **** MenuHandle osCreateMenuBar(WindowHandle window); MenuHandle osAddSubMenu(MenuHandle parent, char *title); ! MenuHandle osAddMenuItem(MenuHandle parent, int keyCode, int mods, char *title); ! MenuHandle osAddMenuCheckItem(MenuHandle parent, int keyCode, int mods, char *title); void osAddMenuSeparatorItem(MenuHandle parent); --- 6,11 ---- MenuHandle osCreateMenuBar(WindowHandle window); MenuHandle osAddSubMenu(MenuHandle parent, char *title); ! MenuHandle osAddMenuItem(MenuHandle parent, int keyCode, unsigned int mods, char *title); ! MenuHandle osAddMenuCheckItem(MenuHandle parent, int keyCode, unsigned int mods, char *title); void osAddMenuSeparatorItem(MenuHandle parent); *************** *** 14,18 **** void osSetRadioMenuItemState(MenuHandle parent, MenuHandle item, BOOL bState); ! void osSetMenuItemLabel(MenuHandle menu, MenuHandle item, int nKeyCode, int mods, char* title); void osDrawMenuBar(WindowHandle window); --- 14,18 ---- void osSetRadioMenuItemState(MenuHandle parent, MenuHandle item, BOOL bState); ! void osSetMenuItemLabel(MenuHandle menu, MenuHandle item, int nKeyCode, unsigned int mods, char* title); void osDrawMenuBar(WindowHandle window); |
|
From: <kr_...@us...> - 2003-01-30 23:09:50
|
Update of /cvsroot/htoolkit/port/src/cbits/GTK
In directory sc8-pr-cvs1:/tmp/cvs-serv13141/src/cbits/GTK
Modified Files:
Menu.c
Log Message:
Types fix
Index: Menu.c
===================================================================
RCS file: /cvsroot/htoolkit/port/src/cbits/GTK/Menu.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** Menu.c 23 Jan 2003 20:19:32 -0000 1.2
--- Menu.c 30 Jan 2003 23:09:46 -0000 1.3
***************
*** 25,29 ****
};
! MenuHandle osAddMenuItem(MenuHandle parent, int nKeyCode, int mods, char *title)
{
gchar *szText = toMnemonicString(title);
--- 25,29 ----
};
! MenuHandle osAddMenuItem(MenuHandle parent, int nKeyCode, unsigned int mods, char *title)
{
gchar *szText = toMnemonicString(title);
***************
*** 53,57 ****
}
! MenuHandle osAddMenuCheckItem(MenuHandle parent, int nKeyCode, int mods, char *title)
{
gchar *szText = toMnemonicString(title);
--- 53,57 ----
}
! MenuHandle osAddMenuCheckItem(MenuHandle parent, int nKeyCode, unsigned int mods, char *title)
{
gchar *szText = toMnemonicString(title);
***************
*** 92,96 ****
}
! void osSetMenuItemLabel(MenuHandle menu, MenuHandle item, int nKeyCode, int mods, char* title )
{
/* TODO: nothing yet */
--- 92,96 ----
}
! void osSetMenuItemLabel(MenuHandle menu, MenuHandle item, int nKeyCode, unsigned int mods, char* title )
{
/* TODO: nothing yet */
|
|
From: <kr_...@us...> - 2003-01-30 23:09:50
|
Update of /cvsroot/htoolkit/port/src/cbits/Win32
In directory sc8-pr-cvs1:/tmp/cvs-serv13141/src/cbits/Win32
Modified Files:
Menu.c Window.c
Log Message:
Types fix
Index: Menu.c
===================================================================
RCS file: /cvsroot/htoolkit/port/src/cbits/Win32/Menu.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** Menu.c 23 Jan 2003 20:19:32 -0000 1.2
--- Menu.c 30 Jan 2003 23:09:47 -0000 1.3
***************
*** 97,101 ****
};
! MenuHandle osAddMenuItem(MenuHandle parent, int key, int mods, char *title)
{
UINT nMenuItemID = NextMenuItemID();
--- 97,101 ----
};
! MenuHandle osAddMenuItem(MenuHandle parent, int key, unsigned int mods, char *title)
{
UINT nMenuItemID = NextMenuItemID();
***************
*** 108,112 ****
};
! MenuHandle osAddMenuCheckItem(MenuHandle parent, int key, int mods, char *title)
{
UINT nMenuItemID = NextMenuItemID();
--- 108,112 ----
};
! MenuHandle osAddMenuCheckItem(MenuHandle parent, int key, unsigned int mods, char *title)
{
UINT nMenuItemID = NextMenuItemID();
***************
*** 134,138 ****
};
! void osSetMenuItemLabel(MenuHandle parent, MenuHandle item, int key, int mods, char* title)
{
MENUITEMINFO menuItemInfo;
--- 134,138 ----
};
! void osSetMenuItemLabel(MenuHandle parent, MenuHandle item, int key, unsigned int mods, char* title)
{
MENUITEMINFO menuItemInfo;
Index: Window.c
===================================================================
RCS file: /cvsroot/htoolkit/port/src/cbits/Win32/Window.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** Window.c 23 Jan 2003 20:19:32 -0000 1.2
--- Window.c 30 Jan 2003 23:09:47 -0000 1.3
***************
*** 20,24 ****
} WindowData;
! static int GetModifiers()
{
return (( GetAsyncKeyState (VK_SHIFT) ? shiftBIT : 0) |
--- 20,24 ----
} WindowData;
! static unsigned int GetModifiers()
{
return (( GetAsyncKeyState (VK_SHIFT) ? shiftBIT : 0) |
|
|
From: <kr_...@us...> - 2003-01-30 23:07:26
|
Update of /cvsroot/htoolkit/port/src/Port
In directory sc8-pr-cvs1:/tmp/cvs-serv12527/src/Port
Modified Files:
Canvas.hs
Log Message:
Comments
Index: Canvas.hs
===================================================================
RCS file: /cvsroot/htoolkit/port/src/Port/Canvas.hs,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** Canvas.hs 30 Jan 2003 21:56:14 -0000 1.9
--- Canvas.hs 30 Jan 2003 23:07:23 -0000 1.10
***************
*** 53,56 ****
--- 53,57 ----
, setPenLineStyle
, setPenHatchStyle
+ , setPenBackDrawMode
-- ** Font
***************
*** 66,70 ****
-- * Deprecated ? (undraw\/erase)
, setPenBackColor
- , setPenBackDrawMode
, undrawRect
, eraseRect
--- 67,70 ----
***************
*** 93,97 ****
, penLineStyle :: LineStyle
, penHatchStyle :: HatchStyle
! , penBackColor :: Color -- ^ Deprecated?
}
--- 93,97 ----
, penLineStyle :: LineStyle
, penHatchStyle :: HatchStyle
! , penBackColor :: Color
}
***************
*** 189,192 ****
--- 189,195 ----
foreign import ccall "osSetPenFunction" osSetDrawMode :: CInt -> CanvasHandle -> IO ()
+ -- | When back draw mode is set to @True@ and the hatch style is not solid then
+ -- off segments are drawn with background color. When the mode is @False@ then
+ -- off segments are trasparent.
setPenBackDrawMode :: Bool -> CanvasHandle -> IO ()
setPenBackDrawMode mode canvas
|