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: <kr_...@us...> - 2003-03-25 23:27:47
|
Update of /cvsroot/htoolkit/gio/src/Graphics/UI In directory sc8-pr-cvs1:/tmp/cvs-serv14080/src/Graphics/UI Modified Files: GIO.hs Log Message: Add application title as argument for start Index: GIO.hs =================================================================== RCS file: /cvsroot/htoolkit/gio/src/Graphics/UI/GIO.hs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** GIO.hs 24 Mar 2003 17:19:50 -0000 1.5 --- GIO.hs 25 Mar 2003 23:27:40 -0000 1.6 *************** *** 1,8 **** ----------------------------------------------------------------------------------------- {-| Module : GIO ! Copyright : (c) Daan Leijen 2003 License : BSD-style ! Maintainer : da...@cs... Stability : provisional Portability : portable --- 1,8 ---- ----------------------------------------------------------------------------------------- {-| Module : GIO ! Copyright : (c) Krasimir Angelov & Daan Leijen 2003 License : BSD-style ! Maintainer : ka2...@ya... da...@cs... Stability : provisional Portability : portable *************** *** 46,53 **** -- | Start the event loop. 'quit' is automatically called all windows are closed. ! start :: DocumentInterface -> IO a -> IO () ! start di io = do curdir <- getCurrentDirectory ! Lib.start di io `catch` \err -> do{ quit; ioError err } setCurrentDirectory curdir --- 46,53 ---- -- | Start the event loop. 'quit' is automatically called all windows are closed. ! start :: String -> DocumentInterface -> IO a -> IO () ! start title di io = do curdir <- getCurrentDirectory ! Lib.start title di io `catch` \err -> do{ quit; ioError err } setCurrentDirectory curdir |
From: <kr_...@us...> - 2003-03-25 23:23:44
|
Update of /cvsroot/htoolkit/port/src/Port In directory sc8-pr-cvs1:/tmp/cvs-serv12746/src/Port Modified Files: Handlers.hs Log Message: Fix functions names Index: Handlers.hs =================================================================== RCS file: /cvsroot/htoolkit/port/src/Port/Handlers.hs,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** Handlers.hs 24 Mar 2003 17:07:08 -0000 1.13 --- Handlers.hs 25 Mar 2003 23:23:34 -0000 1.14 *************** *** 38,42 **** -- ** Events ! ,setWindowReLayoutHandler, setWindowReLayoutDefHandler, getWindowReLayoutDefHandler ,setWindowDismissHandler, setWindowDismissDefHandler, getWindowDismissHandler ,setWindowDestroyHandler, setWindowDestroyDefHandler, getWindowDestroyHandler --- 38,42 ---- -- ** Events ! ,setWindowReLayoutHandler, setWindowReLayoutDefHandler, getWindowReLayoutHandler ,setWindowDismissHandler, setWindowDismissDefHandler, getWindowDismissHandler ,setWindowDestroyHandler, setWindowDestroyDefHandler, getWindowDestroyHandler *************** *** 45,49 **** ,setWindowScrollHandler, setWindowScrollDefHandler, getWindowScrollHandler ,setWindowMouseHandler, setWindowMouseDefHandler, getWindowMouseHandler ! ,setWindowKeyboardHandler, setWindowMouseDefHandler, getWindowMouseHandler ,setWindowActivateHandler, setWindowActivateDefHandler, getWindowActivateHandler ,setWindowDeactivateHandler,setWindowDeactivateDefHandler,getWindowDeactivateHandler --- 45,49 ---- ,setWindowScrollHandler, setWindowScrollDefHandler, getWindowScrollHandler ,setWindowMouseHandler, setWindowMouseDefHandler, getWindowMouseHandler ! ,setWindowKeyboardHandler, setWindowKeyboardDefHandler, getWindowKeyboardHandler ,setWindowActivateHandler, setWindowActivateDefHandler, getWindowActivateHandler ,setWindowDeactivateHandler,setWindowDeactivateDefHandler,getWindowDeactivateHandler *************** *** 234,239 **** = setDefHandler hwnd handlersWindowReLayout ! getWindowReLayoutDefHandler :: WindowHandle -> IO (IO ()) ! getWindowReLayoutDefHandler hwnd = getHandler hwnd (return ()) handlersWindowReLayout --- 234,239 ---- = setDefHandler hwnd handlersWindowReLayout ! getWindowReLayoutHandler :: WindowHandle -> IO (IO ()) ! getWindowReLayoutHandler hwnd = getHandler hwnd (return ()) handlersWindowReLayout |
From: <kr_...@us...> - 2003-03-24 17:19:58
|
Update of /cvsroot/htoolkit/gio/src/examples/simple In directory sc8-pr-cvs1:/tmp/cvs-serv3332/src/examples/simple Modified Files: BitmapViewer.hs BouncingBalls.hs ByeDemo.hs Calculator.hs ConfirmQuit.hs SimpleDrawing.hs SimpleHello.hs SimpleMenu.hs SimpleQuitButton.hs Log Message: Implement the document interface in the GIO Index: BitmapViewer.hs =================================================================== RCS file: /cvsroot/htoolkit/gio/src/examples/simple/BitmapViewer.hs,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** BitmapViewer.hs 26 Jan 2003 12:41:38 -0000 1.1.1.1 --- BitmapViewer.hs 24 Mar 2003 17:19:51 -0000 1.2 *************** *** 4,8 **** main ! = start $ do image <- newVar Nothing w <- window [title =: "Bitmap viewer", view =: sz 300 300, on paint =: paintImage image] --- 4,8 ---- main ! = start SDI $ do image <- newVar Nothing w <- window [title =: "Bitmap viewer", view =: sz 300 300, on paint =: paintImage image] Index: BouncingBalls.hs =================================================================== RCS file: /cvsroot/htoolkit/gio/src/examples/simple/BouncingBalls.hs,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** BouncingBalls.hs 26 Jan 2003 12:41:39 -0000 1.1.1.1 --- BouncingBalls.hs 24 Mar 2003 17:19:51 -0000 1.2 *************** *** 4,8 **** main ! = start balls balls --- 4,8 ---- main ! = start SDI balls balls Index: ByeDemo.hs =================================================================== RCS file: /cvsroot/htoolkit/gio/src/examples/simple/ByeDemo.hs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ByeDemo.hs 31 Jan 2003 23:27:09 -0000 1.2 --- ByeDemo.hs 24 Mar 2003 17:19:51 -0000 1.3 *************** *** 17,21 **** import Graphics.UI.GIO ! main = start demo -- "start" initializes the GUI. demo :: IO () --- 17,21 ---- import Graphics.UI.GIO ! main = start SDI demo -- "start" initializes the GUI. demo :: IO () Index: Calculator.hs =================================================================== RCS file: /cvsroot/htoolkit/gio/src/examples/simple/Calculator.hs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Calculator.hs 31 Jan 2003 15:33:14 -0000 1.2 --- Calculator.hs 24 Mar 2003 17:19:51 -0000 1.3 *************** *** 6,10 **** main ! = start calculator calculator --- 6,10 ---- main ! = start SDI calculator calculator Index: ConfirmQuit.hs =================================================================== RCS file: /cvsroot/htoolkit/gio/src/examples/simple/ConfirmQuit.hs,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** ConfirmQuit.hs 26 Jan 2003 12:41:39 -0000 1.1.1.1 --- ConfirmQuit.hs 24 Mar 2003 17:19:51 -0000 1.2 *************** *** 4,8 **** main ! = start $ do w <- window [title =: "hello world" ,view =: sz 200 200] --- 4,8 ---- main ! = start SDI $ do w <- window [title =: "hello world" ,view =: sz 200 200] Index: SimpleDrawing.hs =================================================================== RCS file: /cvsroot/htoolkit/gio/src/examples/simple/SimpleDrawing.hs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** SimpleDrawing.hs 30 Jan 2003 21:54:49 -0000 1.2 --- SimpleDrawing.hs 24 Mar 2003 17:19:51 -0000 1.3 *************** *** 4,8 **** main ! = start $ do w <- window [title =: "Hello world", width =: 600, height =: 600 ,on paint =: mypaint --- 4,8 ---- main ! = start SDI $ do w <- window [title =: "Hello world", width =: 600, height =: 600 ,on paint =: mypaint Index: SimpleHello.hs =================================================================== RCS file: /cvsroot/htoolkit/gio/src/examples/simple/SimpleHello.hs,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** SimpleHello.hs 26 Jan 2003 12:41:39 -0000 1.1.1.1 --- SimpleHello.hs 24 Mar 2003 17:19:51 -0000 1.2 *************** *** 4,7 **** main ! = start $ do window [title =: "hello world", view =: sz 200 200] --- 4,7 ---- main ! = start SDI $ do window [title =: "hello world", view =: sz 200 200] Index: SimpleMenu.hs =================================================================== RCS file: /cvsroot/htoolkit/gio/src/examples/simple/SimpleMenu.hs,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** SimpleMenu.hs 26 Jan 2003 12:41:39 -0000 1.1.1.1 --- SimpleMenu.hs 24 Mar 2003 17:19:51 -0000 1.2 *************** *** 4,8 **** main ! = start $ do w <- window [title =: "Hello world", view =: sz 200 200] --- 4,8 ---- main ! = start SDI $ do w <- window [title =: "Hello world", view =: sz 200 200] Index: SimpleQuitButton.hs =================================================================== RCS file: /cvsroot/htoolkit/gio/src/examples/simple/SimpleQuitButton.hs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** SimpleQuitButton.hs 30 Jan 2003 11:55:40 -0000 1.1 --- SimpleQuitButton.hs 24 Mar 2003 17:19:51 -0000 1.2 *************** *** 3,7 **** import Graphics.UI.GIO ! main = start demo demo :: IO () --- 3,7 ---- import Graphics.UI.GIO ! main = start SDI demo demo :: IO () |
From: <kr_...@us...> - 2003-03-24 17:19:54
|
Update of /cvsroot/htoolkit/gio/src/Graphics/UI In directory sc8-pr-cvs1:/tmp/cvs-serv3332/src/Graphics/UI Modified Files: GIO.hs Log Message: Implement the document interface in the GIO Index: GIO.hs =================================================================== RCS file: /cvsroot/htoolkit/gio/src/Graphics/UI/GIO.hs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** GIO.hs 30 Jan 2003 23:58:20 -0000 1.4 --- GIO.hs 24 Mar 2003 17:19:50 -0000 1.5 *************** *** 46,54 **** -- | Start the event loop. 'quit' is automatically called all windows are closed. ! start :: IO a -> IO () ! start io = do curdir <- getCurrentDirectory ! io ! Lib.start `catch` \err -> do{ quit; ioError err } setCurrentDirectory curdir --- 46,53 ---- -- | Start the event loop. 'quit' is automatically called all windows are closed. ! start :: DocumentInterface -> IO a -> IO () ! start di io = do curdir <- getCurrentDirectory ! Lib.start di io `catch` \err -> do{ quit; ioError err } setCurrentDirectory curdir |
From: <kr_...@us...> - 2003-03-24 17:18:44
|
Update of /cvsroot/htoolkit/gio/src/Graphics/UI/GIO In directory sc8-pr-cvs1:/tmp/cvs-serv32467/src/Graphics/UI/GIO Modified Files: Types.hs Log Message: Export the entire Port.Colors module instead of small subset of colors Index: Types.hs =================================================================== RCS file: /cvsroot/htoolkit/gio/src/Graphics/UI/GIO/Types.hs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Types.hs 31 Jan 2003 01:01:44 -0000 1.6 --- Types.hs 24 Mar 2003 17:18:37 -0000 1.7 *************** *** 57,70 **** , KeyboardEvent(..), Key(..) , keyboardKey, keyboardRepeat, keyModifiers -- * Render -- ** Colors ! , Color ! , rgbColor, colorRed, colorGreen, colorBlue ! , black, darkgrey, grey, lightgrey, white ! , red, green, blue ! , cyan, magenta, yellow ! , dialoggrey -- ** Bitmaps --- 57,68 ---- , KeyboardEvent(..), Key(..) , keyboardKey, keyboardRepeat, keyModifiers + + -- * Document interface + , DocumentInterface(..) -- * Render -- ** Colors ! , module Graphics.UI.Port.Colors -- ** Bitmaps *************** *** 108,112 **** ) where ! import Graphics.UI.Port.Types import Control.Concurrent.MVar import Control.Monad( when ) --- 106,111 ---- ) where ! import Graphics.UI.Port.Types ! import Graphics.UI.Port.Colors import Control.Concurrent.MVar import Control.Monad( when ) |
From: <kr_...@us...> - 2003-03-24 17:07:42
|
Update of /cvsroot/htoolkit/port/src/cbits/GTK In directory sc8-pr-cvs1:/tmp/cvs-serv19196/src/cbits/GTK Modified Files: CheckBox.c ListBox.c PopUp.c RadioBox.c Log Message: Merge PopUpClick, CheckBoxClick, RadioBoxClick, ListBoxClick and ButtonClick to single event named ControlCommand Index: CheckBox.c =================================================================== RCS file: /cvsroot/htoolkit/port/src/cbits/GTK/CheckBox.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** CheckBox.c 10 Feb 2003 22:42:09 -0000 1.3 --- CheckBox.c 24 Mar 2003 17:07:08 -0000 1.4 *************** *** 11,15 **** gtk_fixed_put(GTK_FIXED(GTK_BIN(GetSW(window)->child)->child), check_btn, 0, 0); gtk_signal_connect (GTK_OBJECT (check_btn), "toggled", ! GTK_SIGNAL_FUNC(handleCheckBoxClick), NULL); gtk_widget_show(check_btn); --- 11,15 ---- gtk_fixed_put(GTK_FIXED(GTK_BIN(GetSW(window)->child)->child), check_btn, 0, 0); gtk_signal_connect (GTK_OBJECT (check_btn), "toggled", ! GTK_SIGNAL_FUNC(handleControlCommand), NULL); gtk_widget_show(check_btn); Index: ListBox.c =================================================================== RCS file: /cvsroot/htoolkit/port/src/cbits/GTK/ListBox.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ListBox.c 10 Feb 2003 22:42:09 -0000 1.3 --- ListBox.c 24 Mar 2003 17:07:09 -0000 1.4 *************** *** 6,10 **** { printf("1\n"); ! handleListBoxClick(w); } --- 6,10 ---- { printf("1\n"); ! handleControlCommand(w); } *************** *** 12,16 **** { printf("2 -> %08X %08X\n", w1, w2); ! handleListBoxClick(w1); } --- 12,16 ---- { printf("2 -> %08X %08X\n", w1, w2); ! handleControlCommand(w1); } *************** *** 18,22 **** { printf("3 -> %08X %08X\n", w1, w2); ! handleListBoxClick(w1); } --- 18,22 ---- { printf("3 -> %08X %08X\n", w1, w2); ! handleControlCommand(w1); } *************** *** 53,57 **** { printf("hh\n"); ! handleListBoxClick((GtkWidget *) user_data); }; --- 53,57 ---- { printf("hh\n"); ! handleControlCommand((GtkWidget *) user_data); }; Index: PopUp.c =================================================================== RCS file: /cvsroot/htoolkit/port/src/cbits/GTK/PopUp.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** PopUp.c 10 Feb 2003 22:42:09 -0000 1.3 --- PopUp.c 24 Mar 2003 17:07:09 -0000 1.4 *************** *** 5,9 **** static void handleLBoxClick(GtkList *list, gpointer user_data) { ! handlePopUpClick((GtkWidget *) user_data); }; --- 5,9 ---- static void handleLBoxClick(GtkList *list, gpointer user_data) { ! handleControlCommand((GtkWidget *) user_data); }; Index: RadioBox.c =================================================================== RCS file: /cvsroot/htoolkit/port/src/cbits/GTK/RadioBox.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** RadioBox.c 10 Feb 2003 22:42:09 -0000 1.3 --- RadioBox.c 24 Mar 2003 17:07:09 -0000 1.4 *************** *** 21,25 **** gtk_fixed_put(GTK_FIXED(GTK_BIN(GetSW(window)->child)->child), radio_btn, 0, 0); gtk_signal_connect (GTK_OBJECT (radio_btn), "toggled", ! GTK_SIGNAL_FUNC(handleRadioBoxClick), NULL); gtk_widget_show(radio_btn); --- 21,25 ---- gtk_fixed_put(GTK_FIXED(GTK_BIN(GetSW(window)->child)->child), radio_btn, 0, 0); gtk_signal_connect (GTK_OBJECT (radio_btn), "toggled", ! GTK_SIGNAL_FUNC(handleControlCommand), NULL); gtk_widget_show(radio_btn); |
From: <kr_...@us...> - 2003-03-24 17:07:42
|
Update of /cvsroot/htoolkit/port/src/Port In directory sc8-pr-cvs1:/tmp/cvs-serv19196/src/Port Modified Files: Handlers.hs Log Message: Merge PopUpClick, CheckBoxClick, RadioBoxClick, ListBoxClick and ButtonClick to single event named ControlCommand Index: Handlers.hs =================================================================== RCS file: /cvsroot/htoolkit/port/src/Port/Handlers.hs,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** Handlers.hs 24 Mar 2003 16:58:33 -0000 1.12 --- Handlers.hs 24 Mar 2003 17:07:08 -0000 1.13 *************** *** 57,66 **** -- * Control commands ! ,setPopUpClickHandler, setPopUpClickDefHandler, getPopUpClickHandler ! ,setListBoxClickHandler, setListBoxClickDefHandler, getListBoxClickHandler ! ,setRadioBoxClickHandler,setRadioBoxClickDefHandler,getRadioBoxClickHandler ! ,setCheckBoxClickHandler,setCheckBoxClickDefHandler,getCheckBoxClickHandler ! ,setButtonClickHandler, setButtonClickDefHandler, getButtonClickHandler ! -- * Menus ,registerWindowMenu --- 57,62 ---- -- * Control commands ! ,setControlCommandHandler, setControlCommandDefHandler, getControlCommandHandler ! -- * Menus ,registerWindowMenu *************** *** 134,142 **** setWindowDeactivateDefHandler hwnd setWindowActivateDefHandler hwnd ! setPopUpClickDefHandler hwnd ! setListBoxClickDefHandler hwnd ! setRadioBoxClickDefHandler hwnd ! setCheckBoxClickDefHandler hwnd ! setButtonClickDefHandler hwnd unregisterWindowMenus hwnd -- unregister all menu command handlers return () --- 130,134 ---- setWindowDeactivateDefHandler hwnd setWindowActivateDefHandler hwnd ! setControlCommandDefHandler hwnd unregisterWindowMenus hwnd -- unregister all menu command handlers return () *************** *** 280,406 **** ----------------------------------------------------------------------------------------- ! -- PopUpClick ! ----------------------------------------------------------------------------------------- ! ! {-# NOINLINE handlersPopUpClick #-} ! handlersPopUpClick :: MVar (PtrMap WindowHandle (IO ())) ! handlersPopUpClick ! = unsafePerformIO (newMVar empty) ! ! setPopUpClickHandler :: WindowHandle -> IO () -> IO () ! setPopUpClickHandler hwnd handler ! = setHandler hwnd handler handlersPopUpClick ! ! setPopUpClickDefHandler :: WindowHandle -> IO () ! setPopUpClickDefHandler hwnd ! = setDefHandler hwnd handlersPopUpClick ! ! getPopUpClickHandler :: WindowHandle -> IO (IO ()) ! getPopUpClickHandler hwnd ! = getHandler hwnd (return ()) handlersPopUpClick ! ! handlePopUpClick :: WindowHandle -> IO () ! handlePopUpClick hwnd ! = invokeHandler hwnd handlersPopUpClick id ! ! ----------------------------------------------------------------------------------------- ! -- ListBoxClick ! ----------------------------------------------------------------------------------------- ! ! {-# NOINLINE handlersListBoxClick #-} ! handlersListBoxClick :: MVar (PtrMap WindowHandle (IO ())) ! handlersListBoxClick ! = unsafePerformIO (newMVar empty) ! ! setListBoxClickHandler :: WindowHandle -> IO () -> IO () ! setListBoxClickHandler hwnd handler ! = setHandler hwnd handler handlersListBoxClick ! ! setListBoxClickDefHandler :: WindowHandle -> IO () ! setListBoxClickDefHandler hwnd ! = setDefHandler hwnd handlersListBoxClick ! ! getListBoxClickHandler :: WindowHandle -> IO (IO ()) ! getListBoxClickHandler hwnd ! = getHandler hwnd (return ()) handlersListBoxClick ! ! handleListBoxClick :: WindowHandle -> IO () ! handleListBoxClick hwnd ! = invokeHandler hwnd handlersListBoxClick id ! ! ----------------------------------------------------------------------------------------- ! -- RadioBoxClick ! ----------------------------------------------------------------------------------------- ! ! {-# NOINLINE handlersRadioBoxClick #-} ! handlersRadioBoxClick :: MVar (PtrMap WindowHandle (IO ())) ! handlersRadioBoxClick ! = unsafePerformIO (newMVar empty) ! ! setRadioBoxClickHandler :: WindowHandle -> IO () -> IO () ! setRadioBoxClickHandler hwnd handler ! = setHandler hwnd handler handlersRadioBoxClick ! ! setRadioBoxClickDefHandler :: WindowHandle -> IO () ! setRadioBoxClickDefHandler hwnd ! = setDefHandler hwnd handlersRadioBoxClick ! ! getRadioBoxClickHandler :: WindowHandle -> IO (IO ()) ! getRadioBoxClickHandler hwnd ! = getHandler hwnd (return ()) handlersRadioBoxClick ! ! handleRadioBoxClick :: WindowHandle -> IO () ! handleRadioBoxClick hwnd ! = invokeHandler hwnd handlersRadioBoxClick id ! ! ----------------------------------------------------------------------------------------- ! -- CheckBoxClick ----------------------------------------------------------------------------------------- ! {-# NOINLINE handlersCheckBoxClick #-} ! handlersCheckBoxClick :: MVar (PtrMap WindowHandle (IO ())) ! handlersCheckBoxClick = unsafePerformIO (newMVar empty) ! setCheckBoxClickHandler :: WindowHandle -> IO () -> IO () ! setCheckBoxClickHandler hwnd handler ! = setHandler hwnd handler handlersCheckBoxClick ! setCheckBoxClickDefHandler :: WindowHandle -> IO () ! setCheckBoxClickDefHandler hwnd ! = setDefHandler hwnd handlersCheckBoxClick ! getCheckBoxClickHandler :: WindowHandle -> IO (IO ()) ! getCheckBoxClickHandler hwnd ! = getHandler hwnd (return ()) handlersCheckBoxClick ! ! handleCheckBoxClick :: WindowHandle -> IO () ! handleCheckBoxClick hwnd ! = invokeHandler hwnd handlersCheckBoxClick id ! ! ----------------------------------------------------------------------------------------- ! -- ButtonClick ! ----------------------------------------------------------------------------------------- ! ! {-# NOINLINE handlersButtonClick #-} ! handlersButtonClick :: MVar (PtrMap WindowHandle (IO ())) ! handlersButtonClick ! = unsafePerformIO (newMVar empty) ! ! setButtonClickHandler :: WindowHandle -> IO () -> IO () ! setButtonClickHandler hwnd handler ! = setHandler hwnd handler handlersButtonClick ! ! setButtonClickDefHandler :: WindowHandle -> IO () ! setButtonClickDefHandler hwnd ! = setDefHandler hwnd handlersButtonClick ! ! getButtonClickHandler :: WindowHandle -> IO (IO ()) ! getButtonClickHandler hwnd ! = getHandler hwnd (return ()) handlersButtonClick ! handleButtonClick :: WindowHandle -> IO () ! handleButtonClick hwnd ! = invokeHandler hwnd handlersButtonClick id ----------------------------------------------------------------------------------------- --- 272,298 ---- ----------------------------------------------------------------------------------------- ! -- ControlCommand ----------------------------------------------------------------------------------------- ! {-# NOINLINE handlersControlCommand #-} ! handlersControlCommand :: MVar (PtrMap WindowHandle (IO ())) ! handlersControlCommand = unsafePerformIO (newMVar empty) ! setControlCommandHandler :: WindowHandle -> IO () -> IO () ! setControlCommandHandler hwnd handler ! = setHandler hwnd handler handlersControlCommand ! setControlCommandDefHandler :: WindowHandle -> IO () ! setControlCommandDefHandler hwnd ! = setDefHandler hwnd handlersControlCommand ! getControlCommandHandler :: WindowHandle -> IO (IO ()) ! getControlCommandHandler hwnd ! = getHandler hwnd (return ()) handlersControlCommand ! handleControlCommand :: WindowHandle -> IO () ! handleControlCommand hwnd ! = invokeHandler hwnd handlersControlCommand id ----------------------------------------------------------------------------------------- *************** *** 721,729 **** foreign export ccall handleWindowDeactivate :: WindowHandle -> IO () foreign export ccall handleWindowActivate :: WindowHandle -> IO () ! foreign export ccall handlePopUpClick :: WindowHandle -> IO () ! foreign export ccall handleListBoxClick :: WindowHandle -> IO () ! foreign export ccall handleRadioBoxClick :: WindowHandle -> IO () ! foreign export ccall handleCheckBoxClick :: WindowHandle -> IO () ! foreign export ccall handleButtonClick :: WindowHandle -> IO () foreign export ccall handleMenuCommand :: MenuHandle -> IO () foreign export ccall handleMenusUpdate :: IO () --- 613,617 ---- foreign export ccall handleWindowDeactivate :: WindowHandle -> IO () foreign export ccall handleWindowActivate :: WindowHandle -> IO () ! foreign export ccall handleControlCommand :: WindowHandle -> IO () foreign export ccall handleMenuCommand :: MenuHandle -> IO () foreign export ccall handleMenusUpdate :: IO () |
From: <kr_...@us...> - 2003-03-24 17:07:16
|
Update of /cvsroot/htoolkit/port/src/cbits/Win32 In directory sc8-pr-cvs1:/tmp/cvs-serv19196/src/cbits/Win32 Modified Files: Window.c Log Message: Merge PopUpClick, CheckBoxClick, RadioBoxClick, ListBoxClick and ButtonClick to single event named ControlCommand Index: Window.c =================================================================== RCS file: /cvsroot/htoolkit/port/src/cbits/Win32/Window.c,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Window.c 3 Mar 2003 21:17:16 -0000 1.9 --- Window.c 24 Mar 2003 17:07:09 -0000 1.10 *************** *** 194,198 **** { if (HIWORD(wParam) == CBN_SELENDOK) ! handlePopUpClick(hCtrl); } else --- 194,198 ---- { if (HIWORD(wParam) == CBN_SELENDOK) ! handleControlCommand(hCtrl); } else *************** *** 200,204 **** { if (HIWORD(wParam) == LBN_SELCHANGE) ! handleListBoxClick(hCtrl); } else --- 200,204 ---- { if (HIWORD(wParam) == LBN_SELCHANGE) ! handleControlCommand(hCtrl); } else *************** *** 206,213 **** { if ((GetWindowLong(hCtrl,GWL_STYLE) & BS_AUTORADIOBUTTON) == BS_AUTORADIOBUTTON) ! handleRadioBoxClick(hCtrl); else if ((GetWindowLong(hCtrl,GWL_STYLE) & BS_AUTOCHECKBOX) == BS_AUTOCHECKBOX) ! handleCheckBoxClick(hCtrl); else handleButtonClick(hCtrl); --- 206,213 ---- { if ((GetWindowLong(hCtrl,GWL_STYLE) & BS_AUTORADIOBUTTON) == BS_AUTORADIOBUTTON) ! handleControlCommand(hCtrl); else if ((GetWindowLong(hCtrl,GWL_STYLE) & BS_AUTOCHECKBOX) == BS_AUTOCHECKBOX) ! handleControlCommand(hCtrl); else handleButtonClick(hCtrl); |
From: <kr_...@us...> - 2003-03-24 17:07:16
|
Update of /cvsroot/htoolkit/port/src/examples In directory sc8-pr-cvs1:/tmp/cvs-serv19196/src/examples Modified Files: ByeDemo.hs Log Message: Merge PopUpClick, CheckBoxClick, RadioBoxClick, ListBoxClick and ButtonClick to single event named ControlCommand Index: ByeDemo.hs =================================================================== RCS file: /cvsroot/htoolkit/port/src/examples/ByeDemo.hs,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** ByeDemo.hs 24 Mar 2003 16:58:33 -0000 1.7 --- ByeDemo.hs 24 Mar 2003 17:07:12 -0000 1.8 *************** *** 29,33 **** moveResizeControl b (rectAt (pt 0 (sh lsize)) bsize) -- position under the label ! setButtonClickHandler b (bye w l b) -- register event handler showWindow w -- show it all where --- 29,33 ---- moveResizeControl b (rectAt (pt 0 (sh lsize)) bsize) -- position under the label ! setControlCommandHandler b (bye w l b) -- register event handler showWindow w -- show it all where *************** *** 35,37 **** bye w l b = do setLabelText l "Goodbye" ! setButtonClickHandler b (destroyWindow w) -- overwrite the old event handler --- 35,37 ---- bye w l b = do setLabelText l "Goodbye" ! setControlCommandHandler b (destroyWindow w) -- overwrite the old event handler |
From: <kr_...@us...> - 2003-03-24 16:58:36
|
Update of /cvsroot/htoolkit/port/src/Port In directory sc8-pr-cvs1:/tmp/cvs-serv10214/src/Port Modified Files: Handlers.hs Window.hs Log Message: All register/unregister functions for all event types are renamed. The new scheme: registerXXX -> setXXXHandler unregisterXXX -> setXXXDefHandler added getXXXHandler functions Index: Handlers.hs =================================================================== RCS file: /cvsroot/htoolkit/port/src/Port/Handlers.hs,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** Handlers.hs 3 Mar 2003 19:47:26 -0000 1.11 --- Handlers.hs 24 Mar 2003 16:58:33 -0000 1.12 *************** *** 37,89 **** ,registerWindow, unregisterWindow, getAllWindowHandles ! -- ** Register events ! ,registerWindowReLayout ! ,registerWindowDismiss ! ,registerWindowDestroy ! ,registerWindowPaint ! ,registerWindowResize ! ,registerWindowScroll ! ,registerWindowMouse [...1007 lines suppressed...] *** 595,603 **** registerTimer :: TimerHandle -> IO () -> IO () registerTimer htimer handler ! = register htimer handler handlersTimer unregisterTimer :: TimerHandle -> IO () unregisterTimer htimer ! = unregister htimer handlersTimer getAllTimerHandles :: IO [TimerHandle] --- 699,707 ---- registerTimer :: TimerHandle -> IO () -> IO () registerTimer htimer handler ! = setHandler htimer handler handlersTimer unregisterTimer :: TimerHandle -> IO () unregisterTimer htimer ! = setDefHandler htimer handlersTimer getAllTimerHandles :: IO [TimerHandle] Index: Window.hs =================================================================== RCS file: /cvsroot/htoolkit/port/src/Port/Window.hs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Window.hs 10 Feb 2003 22:42:09 -0000 1.5 --- Window.hs 24 Mar 2003 16:58:33 -0000 1.6 *************** *** 45,49 **** import Graphics.UI.Port.Types import Graphics.UI.Port.Canvas(initCanvas, doneCanvas, defaultPen, dialogPen) ! import Graphics.UI.Port.Handlers( getAllWindowHandles, registerWindow, registerWindowDismiss, registerWindowPaint ) {----------------------------------------------------------------------------------------- --- 45,49 ---- import Graphics.UI.Port.Types import Graphics.UI.Port.Canvas(initCanvas, doneCanvas, defaultPen, dialogPen) ! import Graphics.UI.Port.Handlers( getAllWindowHandles, registerWindow, setWindowDismissHandler, setWindowPaintHandler ) {----------------------------------------------------------------------------------------- *************** *** 79,84 **** hwnd <- osCreateWindow registerWindow hwnd ! registerWindowPaint hwnd onpaint ! registerWindowDismiss hwnd (destroyWindow hwnd) return hwnd where --- 79,84 ---- hwnd <- osCreateWindow registerWindow hwnd ! setWindowPaintHandler hwnd onpaint ! setWindowDismissHandler hwnd (destroyWindow hwnd) return hwnd where *************** *** 93,98 **** hwnd <- osCreateDialog hparent registerWindow hwnd ! registerWindowPaint hwnd onpaint ! registerWindowDismiss hwnd (destroyWindow hwnd) return hwnd where --- 93,98 ---- hwnd <- osCreateDialog hparent registerWindow hwnd ! setWindowPaintHandler hwnd onpaint ! setWindowDismissHandler hwnd (destroyWindow hwnd) return hwnd where |
From: <kr_...@us...> - 2003-03-24 16:58:36
|
Update of /cvsroot/htoolkit/port/src In directory sc8-pr-cvs1:/tmp/cvs-serv10214/src Modified Files: Port.hs Log Message: All register/unregister functions for all event types are renamed. The new scheme: registerXXX -> setXXXHandler unregisterXXX -> setXXXDefHandler added getXXXHandler functions Index: Port.hs =================================================================== RCS file: /cvsroot/htoolkit/port/src/Port.hs,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** Port.hs 16 Mar 2003 23:48:13 -0000 1.11 --- Port.hs 24 Mar 2003 16:58:32 -0000 1.12 *************** *** 84,88 **** start appName di io = do withCString appName (\s -> osInit s (toCDocumentInterface di)) ! registerDismissProcess quit r <- io osStart --- 84,88 ---- start appName di io = do withCString appName (\s -> osInit s (toCDocumentInterface di)) ! setDismissProcessHandler quit r <- io osStart |
From: <kr_...@us...> - 2003-03-24 16:58:36
|
Update of /cvsroot/htoolkit/port/src/examples In directory sc8-pr-cvs1:/tmp/cvs-serv10214/src/examples Modified Files: ByeDemo.hs Log Message: All register/unregister functions for all event types are renamed. The new scheme: registerXXX -> setXXXHandler unregisterXXX -> setXXXDefHandler added getXXXHandler functions Index: ByeDemo.hs =================================================================== RCS file: /cvsroot/htoolkit/port/src/examples/ByeDemo.hs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** ByeDemo.hs 3 Mar 2003 00:45:15 -0000 1.6 --- ByeDemo.hs 24 Mar 2003 16:58:33 -0000 1.7 *************** *** 29,33 **** moveResizeControl b (rectAt (pt 0 (sh lsize)) bsize) -- position under the label ! registerButtonClick b (bye w l b) -- register event handler showWindow w -- show it all where --- 29,33 ---- moveResizeControl b (rectAt (pt 0 (sh lsize)) bsize) -- position under the label ! setButtonClickHandler b (bye w l b) -- register event handler showWindow w -- show it all where *************** *** 35,37 **** bye w l b = do setLabelText l "Goodbye" ! registerButtonClick b (destroyWindow w) -- overwrite the old event handler --- 35,37 ---- bye w l b = do setLabelText l "Goodbye" ! setButtonClickHandler b (destroyWindow w) -- overwrite the old event handler |
From: <kr_...@us...> - 2003-03-24 15:40:48
|
Update of /cvsroot/htoolkit/port/src/cbits/GTK In directory sc8-pr-cvs1:/tmp/cvs-serv21627/src/cbits/GTK Modified Files: Util.c Log Message: bugfix Index: Util.c =================================================================== RCS file: /cvsroot/htoolkit/port/src/cbits/GTK/Util.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Util.c 14 Mar 2003 18:37:20 -0000 1.7 --- Util.c 24 Mar 2003 15:40:41 -0000 1.8 *************** *** 73,76 **** --- 73,78 ---- handleDestroyProcess(); + + free(gAppName); } *************** *** 84,89 **** printf("WARNING: There are still have active objects\n"); } - - free(gAppName); } --- 86,89 ---- |
From: <kr_...@us...> - 2003-03-24 15:40:48
|
Update of /cvsroot/htoolkit/port/src/cbits/Win32 In directory sc8-pr-cvs1:/tmp/cvs-serv21627/src/cbits/Win32 Modified Files: Util.c Log Message: bugfix Index: Util.c =================================================================== RCS file: /cvsroot/htoolkit/port/src/cbits/Win32/Util.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Util.c 14 Mar 2003 18:37:22 -0000 1.6 --- Util.c 24 Mar 2003 15:40:42 -0000 1.7 *************** *** 201,204 **** --- 201,208 ---- handleDestroyProcess(); + + doneGdiPlus(); + + free(gAppName); }; *************** *** 216,222 **** printf("WARNING: There are still have active objects\n"); } - - doneGdiPlus(); - - free(gAppName); } --- 220,222 ---- |
From: <kr_...@us...> - 2003-03-23 10:17:57
|
Update of /cvsroot/htoolkit/port/src/Port In directory sc8-pr-cvs1:/tmp/cvs-serv27998/src/Port Modified Files: Bitmap.hs Log Message: bugfix Index: Bitmap.hs =================================================================== RCS file: /cvsroot/htoolkit/port/src/Port/Bitmap.hs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Bitmap.hs 31 Jan 2003 23:25:37 -0000 1.3 --- Bitmap.hs 23 Mar 2003 10:17:54 -0000 1.4 *************** *** 116,121 **** = do done <- osSelectNextEncoder enum if (fromCBool done) ! then return [] ! else do name <- resultCString (osGetCurrentEncoderName enum) descr <- resultCString (osGetCurrentEncoderDescription enum) mime <- resultCString (osGetCurrentEncoderMime enum) --- 116,120 ---- = do done <- osSelectNextEncoder enum if (fromCBool done) ! then do name <- resultCString (osGetCurrentEncoderName enum) descr <- resultCString (osGetCurrentEncoderDescription enum) mime <- resultCString (osGetCurrentEncoderMime enum) *************** *** 125,128 **** --- 124,128 ---- codecs<- getCodecs enum return (Codec name descr mime exts (fromCBool cread) (fromCBool cwrite) : codecs) + else return [] type EnumHandle = Ptr EH |
From: <kr_...@us...> - 2003-03-18 11:39:59
|
Update of /cvsroot/htoolkit/port/src/cbits/GTK In directory sc8-pr-cvs1:/tmp/cvs-serv8137/src/cbits/GTK Modified Files: FontDialog.c Log Message: bugfixes Index: FontDialog.c =================================================================== RCS file: /cvsroot/htoolkit/port/src/cbits/GTK/FontDialog.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** FontDialog.c 16 Mar 2003 23:48:13 -0000 1.1 --- FontDialog.c 18 Mar 2003 11:39:56 -0000 1.2 *************** *** 1,38 **** ! #include "FontDialog.h" ! ! BOOL osRunFontDialog(char **fname, int *fsize, int *fweight, int *fstyle, BOOL *funderline, BOOL *fstrikeout) ! { ! GtkWidget *font_dialog; ! ! font_dialog = gtk_font_selection_dialog_new("Font"); ! if (gtk_dialog_run(GTK_DIALOG(font_dialog)) == GTK_RESPONSE_OK) ! { ! gchar font_name; ! PangoFontDescription *font_descr; ! ! font_name = gtk_font_selection_dialog_get_font_name(GTK_FONT_SELECTION_DIALOG(font_dialog)); ! font_descr = pango_font_description_from_string(font_name); ! ! *fname = strdup(pango_font_description_get_family(font_descr)); ! *fsize = pango_font_description_get_size(font_descr)/PANGO_SCALE; ! *fweight = pango_font_description_get_weight(desc); ! ! switch (pango_font_description_get_style(desc)) ! { ! case PANGO_STYLE_NORMAL: *fstyle = 0; break; ! case PANGO_STYLE_OBLIQUE: *fstyle = 1; break; ! case PANGO_STYLE_ITALIC: *fstyle = 2; break; ! default: *fstyle = -1; break; ! } ! ! *funderline = FALSE; ! *fstrikeout = FALSE; ! ! pango_font_description_free(font_descr); ! ! return TRUE; ! } ! gtk_widget_destroy (color_dialog); ! ! return FALSE; ! } \ No newline at end of file --- 1,38 ---- ! #include "FontDialog.h" ! ! BOOL osRunFontDialog(char **fname, int *fsize, int *fweight, int *fstyle, BOOL *funderline, BOOL *fstrikeout) ! { ! GtkWidget *font_dialog; ! ! font_dialog = gtk_font_selection_dialog_new("Font"); ! if (gtk_dialog_run(GTK_DIALOG(font_dialog)) == GTK_RESPONSE_OK) ! { ! gchar font_name; ! PangoFontDescription *font_descr; ! ! font_name = gtk_font_selection_dialog_get_font_name(GTK_FONT_SELECTION_DIALOG(font_dialog)); ! font_descr = pango_font_description_from_string(font_name); ! ! *fname = strdup(pango_font_description_get_family(font_descr)); ! *fsize = pango_font_description_get_size(font_descr)/PANGO_SCALE; ! *fweight = pango_font_description_get_weight(font_descr); ! ! switch (pango_font_description_get_style(font_descr)) ! { ! case PANGO_STYLE_NORMAL: *fstyle = 0; break; ! case PANGO_STYLE_OBLIQUE: *fstyle = 1; break; ! case PANGO_STYLE_ITALIC: *fstyle = 2; break; ! default: *fstyle = -1; break; ! } ! ! *funderline = FALSE; ! *fstrikeout = FALSE; ! ! pango_font_description_free(font_descr); ! ! return TRUE; ! } ! gtk_widget_destroy (font_dialog); ! ! return FALSE; ! } |
From: <kr_...@us...> - 2003-03-17 11:04:44
|
Update of /cvsroot/htoolkit/port/src/include In directory sc8-pr-cvs1:/tmp/cvs-serv8550/src/include Modified Files: HsPort.h Log Message: Add missing headers Index: HsPort.h =================================================================== RCS file: /cvsroot/htoolkit/port/src/include/HsPort.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** HsPort.h 3 Mar 2003 21:19:43 -0000 1.2 --- HsPort.h 17 Mar 2003 11:04:40 -0000 1.3 *************** *** 16,18 **** --- 16,20 ---- #include "Bitmap.h" #include "FileDialog.h" + #include "ColorDialog.h" + #include "FontDialog.h" #include "Message.h" |
From: <kr_...@us...> - 2003-03-16 23:48:22
|
Update of /cvsroot/htoolkit/port/src/cbits/GTK In directory sc8-pr-cvs1:/tmp/cvs-serv16659/src/cbits/GTK Added Files: FontDialog.c Log Message: add implementation for FontDialog --- NEW FILE: FontDialog.c --- #include "FontDialog.h" BOOL osRunFontDialog(char **fname, int *fsize, int *fweight, int *fstyle, BOOL *funderline, BOOL *fstrikeout) { GtkWidget *font_dialog; font_dialog = gtk_font_selection_dialog_new("Font"); if (gtk_dialog_run(GTK_DIALOG(font_dialog)) == GTK_RESPONSE_OK) { gchar font_name; PangoFontDescription *font_descr; font_name = gtk_font_selection_dialog_get_font_name(GTK_FONT_SELECTION_DIALOG(font_dialog)); font_descr = pango_font_description_from_string(font_name); *fname = strdup(pango_font_description_get_family(font_descr)); *fsize = pango_font_description_get_size(font_descr)/PANGO_SCALE; *fweight = pango_font_description_get_weight(desc); switch (pango_font_description_get_style(desc)) { case PANGO_STYLE_NORMAL: *fstyle = 0; break; case PANGO_STYLE_OBLIQUE: *fstyle = 1; break; case PANGO_STYLE_ITALIC: *fstyle = 2; break; default: *fstyle = -1; break; } *funderline = FALSE; *fstrikeout = FALSE; pango_font_description_free(font_descr); return TRUE; } gtk_widget_destroy (color_dialog); return FALSE; } |
From: <kr_...@us...> - 2003-03-16 23:48:20
|
Update of /cvsroot/htoolkit/port/src/Port In directory sc8-pr-cvs1:/tmp/cvs-serv16659/src/Port Added Files: FontDialog.hs Log Message: add implementation for FontDialog --- NEW FILE: FontDialog.hs --- {-# OPTIONS -fglasgow-exts -#include FontDialog.h #-} ----------------------------------------------------------------------------------------- {-| Module : FontDialog Copyright : (c) Krasimir Angelov License : BSD-style Maintainer : ka2...@ya... Stability : provisional Portability : portable Standard font selection dialogs. -} ----------------------------------------------------------------------------------------- module Graphics.UI.Port.FontDialog( runFontDialog ) where import Foreign import Foreign.C import Graphics.UI.Port.Types -- | Run a dialog to select a font. Returns 'Nothing' when cancelled. runFontDialog :: IO (Maybe FontDef) runFontDialog = alloca $ \fnameref -> alloca $ \fsizeref -> alloca $ \fweightref -> alloca $ \fstyleref -> alloca $ \funderlineref -> alloca $ \fstrikeoutref -> do print 1 res <- osRunFontDialog fnameref fsizeref fweightref fstyleref funderlineref fstrikeoutref print 2 if res then do cname <- peek fnameref csize <- peek fsizeref cweight <- peek fweightref cstyle <- peek fstyleref cunderline <- peek funderlineref cstrikeout <- peek fstrikeoutref fontdef <- fromCFontDef cname csize cweight cstyle cunderline cstrikeout free cname return (Just fontdef) else return Nothing foreign import ccall osRunFontDialog :: Ptr CString -> Ptr CInt -> Ptr CInt -> Ptr CInt -> Ptr CBool -> Ptr CBool -> IO Bool |
From: <kr_...@us...> - 2003-03-16 23:48:20
|
Update of /cvsroot/htoolkit/port/src/cbits/Win32 In directory sc8-pr-cvs1:/tmp/cvs-serv16659/src/cbits/Win32 Added Files: FontDialog.c Log Message: add implementation for FontDialog --- NEW FILE: FontDialog.c --- #include "FontDialog.h" BOOL osRunFontDialog(char **fname, int *fsize, int *fweight, int *fstyle, BOOL *funderline, BOOL *fstrikeout) { CHOOSEFONT cf; LOGFONT lf; cf.lStructSize = sizeof(cf); cf.hwndOwner = GetActiveWindow(); cf.hDC = NULL; cf.lpLogFont = &lf; cf.iPointSize = 0; cf.Flags = CF_SCREENFONTS; cf.rgbColors = RGB(0,0,0); cf.lCustData = 0; cf.lpfnHook = NULL; cf.lpTemplateName = NULL; cf.hInstance = NULL; cf.lpszStyle = NULL; cf.nFontType = 0; cf.nSizeMin = 0; cf.nSizeMax = 0; if (!ChooseFont(&cf)) return FALSE; *fname = strdup(lf.lfFaceName); *fsize = -lf.lfHeight; *fweight = lf.lfWeight; *fstyle = lf.lfItalic ? 1 : 0; *funderline = lf.lfUnderline; *fstrikeout = lf.lfStrikeOut; return TRUE; } |
From: <kr_...@us...> - 2003-03-16 23:48:20
|
Update of /cvsroot/htoolkit/port/src In directory sc8-pr-cvs1:/tmp/cvs-serv16659/src Modified Files: Port.hs Log Message: add implementation for FontDialog Index: Port.hs =================================================================== RCS file: /cvsroot/htoolkit/port/src/Port.hs,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** Port.hs 15 Mar 2003 01:22:27 -0000 1.10 --- Port.hs 16 Mar 2003 23:48:13 -0000 1.11 *************** *** 20,23 **** --- 20,24 ---- , module Graphics.UI.Port.FileDialog , module Graphics.UI.Port.ColorDialog + , module Graphics.UI.Port.FontDialog , module Graphics.UI.Port.Message *************** *** 51,54 **** --- 52,56 ---- import Graphics.UI.Port.FileDialog import Graphics.UI.Port.ColorDialog + import Graphics.UI.Port.FontDialog import Graphics.UI.Port.Window import Graphics.UI.Port.Menu |
From: <kr_...@us...> - 2003-03-16 23:48:19
|
Update of /cvsroot/htoolkit/port/src/include In directory sc8-pr-cvs1:/tmp/cvs-serv16659/src/include Added Files: FontDialog.h Log Message: add implementation for FontDialog --- NEW FILE: FontDialog.h --- #ifndef FONTDIALOG_H #define FONTDIALOG_H #include "Types.h" BOOL osRunFontDialog(char **fname, int *fsize, int *fweight, int *fstyle, BOOL *funderline, BOOL *fstrikeout); #endif |
From: <kr_...@us...> - 2003-03-16 23:48:19
|
Update of /cvsroot/htoolkit/port In directory sc8-pr-cvs1:/tmp/cvs-serv16659 Modified Files: makefile Log Message: add implementation for FontDialog Index: makefile =================================================================== RCS file: /cvsroot/htoolkit/port/makefile,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** makefile 15 Mar 2003 01:06:32 -0000 1.13 --- makefile 16 Mar 2003 23:48:12 -0000 1.14 *************** *** 38,42 **** Port/Bitmap.hs Port/Font.hs Port/Canvas.hs \ Port/Controls.hs \ ! Port/FileDialog.hs Port/ColorDialog.hs \ Port/Menu.hs Port/Window.hs \ Port/Timer.hs \ --- 38,42 ---- Port/Bitmap.hs Port/Font.hs Port/Canvas.hs \ Port/Controls.hs \ ! Port/FileDialog.hs Port/ColorDialog.hs Port/FontDialog.hs \ Port/Menu.hs Port/Window.hs \ Port/Timer.hs \ *************** *** 48,52 **** CSRCS = Window.c Util.c Bitmap.c Button.c CheckBox.c EditBox.c \ ! FileDialog.c ColorDialog.c PopUp.c Canvas.c Menu.c ListBox.c \ Label.c Font.c RadioBox.c Timer.c Frame.c Message.c --- 48,52 ---- CSRCS = Window.c Util.c Bitmap.c Button.c CheckBox.c EditBox.c \ ! FileDialog.c ColorDialog.c FontDialog.c PopUp.c Canvas.c Menu.c ListBox.c \ Label.c Font.c RadioBox.c Timer.c Frame.c Message.c |
From: <kr_...@us...> - 2003-03-15 22:33:18
|
Update of /cvsroot/htoolkit/port/src/Port In directory sc8-pr-cvs1:/tmp/cvs-serv27259/src/Port Modified Files: Colors.hs Log Message: Add support for CMY color scheme Index: Colors.hs =================================================================== RCS file: /cvsroot/htoolkit/port/src/Port/Colors.hs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Colors.hs 15 Mar 2003 01:06:32 -0000 1.1 --- Colors.hs 15 Mar 2003 22:33:10 -0000 1.2 *************** *** 18,21 **** --- 18,22 ---- Color , rgbColor, colorRed, colorGreen, colorBlue + , cmyColor, colorCyan, colorMagenta, colorYellow -- * Standard colors. , aliceblue, antiquewhite, aqua, aquamarine, azure, beige *************** *** 222,225 **** --- 223,241 ---- colorBlue (Color c) = fromIntegral ((c `div` 0x10000) .&. 0xFF) + -- | Create a color from a cyan\/magenta\/yellow triple. + cmyColor :: Word8 -> Word8 -> Word8 -> Color + cmyColor c m y = Color ((((fromIntegral y) * 0x10000) .|. ((fromIntegral m) * 0x100) .|. fromIntegral c) `xor` 0xFFFFFF) + + -- | Returns a cyan color component + colorCyan :: Color -> Word8 + colorCyan (Color c) = fromIntegral ((c ) .&. 0xFF) `xor` 0xFF + + -- | Returns a magenta color component + colorMagenta :: Color -> Word8 + colorMagenta (Color c) = fromIntegral ((c `div` 0x100 ) .&. 0xFF) `xor` 0xFF + + -- | Returns a yellow color component + colorYellow :: Color -> Word8 + colorYellow (Color c) = fromIntegral ((c `div` 0x10000) .&. 0xFF) `xor` 0xFF -- Default colors. |
From: <kr_...@us...> - 2003-03-15 01:22:29
|
Update of /cvsroot/htoolkit/port/src In directory sc8-pr-cvs1:/tmp/cvs-serv29990/src Modified Files: Port.hs Log Message: Hide CColor type at high level Index: Port.hs =================================================================== RCS file: /cvsroot/htoolkit/port/src/Port.hs,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Port.hs 14 Mar 2003 18:38:42 -0000 1.9 --- Port.hs 15 Mar 2003 01:22:27 -0000 1.10 *************** *** 57,61 **** import Graphics.UI.Port.Types hiding ! ( fromCColor, toCColor , withCPoint, fromCPoint , withCSize, withCSizeResult, fromCSize --- 57,61 ---- import Graphics.UI.Port.Types hiding ! ( CColor, fromCColor, toCColor , withCPoint, fromCPoint , withCSize, withCSizeResult, fromCSize |