From: <kr_...@us...> - 2003-08-26 15:11:57
|
Update of /cvsroot/htoolkit/port/src/Port In directory sc8-pr-cvs1:/tmp/cvs-serv29596/src/Port Modified Files: Handlers.hs Log Message: Merge DialogActivate and DialogDeactivateEvents to WindowActivate and DialogActivate Index: Handlers.hs =================================================================== RCS file: /cvsroot/htoolkit/port/src/Port/Handlers.hs,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** Handlers.hs 24 Aug 2003 21:07:48 -0000 1.27 --- Handlers.hs 25 Aug 2003 17:35:49 -0000 1.28 *************** *** 10,27 **** Portability : portable ! Event handlers are registered with @registerXXX@ for a particular widget. Allthough event handlers can be unregistered explicitly, all registered widget handlers will be automatically unregistered when a widget is destroyed. - Menu command handlers are unregistered automatically if the menu itself - has been associated with a particular window, via the 'registerWindowMenu' function. - - If an event handler is registered with a 'nullHandle', the handler will be called - on every occurrence of that event (after the handler for the specific widget has - been called). - When 'quit' is called, it will close all windows, unregister all event handlers ! and destroy all timers. 'quit' is called automatically when the last window ! is destroyed. -} ----------------------------------------------------------------------------------------- --- 10,19 ---- Portability : portable ! Event handlers are registered with @setXXXHandler@ for a particular widget. Allthough event handlers can be unregistered explicitly, all registered widget handlers will be automatically unregistered when a widget is destroyed. When 'quit' is called, it will close all windows, unregister all event handlers ! and destroy all timers. -} ----------------------------------------------------------------------------------------- *************** *** 101,107 **** Just x -> safeio (f x) Nothing -> return () - case lookup nullHandle map of -- always invoke null-handler - Just x -> safeio (f x) - Nothing -> return () setHandler :: Ptr a -> b -> MVar (PtrMap a b) -> IO () --- 93,96 ---- *************** *** 152,157 **** -- | 'registerWindow' should be called by all top-level window creation functions. ! -- The windows are automatically unregistered when destroyed. The registration is used to ! -- implement the automatic quit when all top-level windows are closed. registerWindow :: WindowHandle -> IO () registerWindow hwnd --- 141,145 ---- -- | 'registerWindow' should be called by all top-level window creation functions. ! -- The windows are automatically unregistered when destroyed. registerWindow :: WindowHandle -> IO () registerWindow hwnd *************** *** 307,314 **** = invokeHandler hwnd handlersWindowDeactivate id - handleDialogDeactivate :: WindowHandle -> IO () - handleDialogDeactivate hwnd - = invokeHandler hwnd handlersWindowDeactivate id - ----------------------------------------------------------------------------------------- -- WindowActivate --- 295,298 ---- *************** *** 338,345 **** invokeHandler hwnd handlersWindowActivate id - handleDialogActivate :: WindowHandle -> IO () - handleDialogActivate hwnd = - invokeHandler hwnd handlersWindowActivate id - ----------------------------------------------------------------------------------------- -- WindowPaint --- 322,325 ---- *************** *** 783,788 **** foreign export ccall handleWindowActivate :: WindowHandle -> IO () foreign export ccall handleContainerReLayout :: WindowHandle -> IO () - foreign export ccall handleDialogDeactivate :: WindowHandle -> IO () - foreign export ccall handleDialogActivate :: WindowHandle -> IO () foreign export ccall handleWindowContextMenu :: WindowHandle -> CInt -> CInt -> CWord -> IO () foreign export ccall handleControlCommand :: WindowHandle -> IO () --- 763,766 ---- |