From: <kr_...@us...> - 2003-04-14 17:57:42
|
Update of /cvsroot/htoolkit/gio/src/Graphics/UI/GIO In directory sc8-pr-cvs1:/tmp/cvs-serv12351/src/Graphics/UI/GIO Modified Files: Events.hs Process.hs Window.hs Timer.hs Log Message: Split the Deadly class into Deadly and Dismissible classes Index: Events.hs =================================================================== RCS file: /cvsroot/htoolkit/gio/src/Graphics/UI/GIO/Events.hs,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Events.hs 1 Apr 2003 22:46:36 -0000 1.9 --- Events.hs 14 Apr 2003 17:57:31 -0000 1.10 *************** *** 73,79 **** , Form, activate, deactivate, scroll, resize ! -- ** Deadly ! , Deadly , dismissWidget, dismiss , destroyWidget, destroy --- 73,82 ---- , Form, activate, deactivate, scroll, resize ! -- ** Dismissible ! , Dismissible , dismissWidget, dismiss + + -- ** Deadly + , Deadly , destroyWidget, destroy *************** *** 167,178 **** resize :: Event w (Size -> IO ()) ! -- | The Deadly widgets can be destroyed and dissmissed ! class Deadly w where ! -- | Close a widget dismissWidget :: w -> IO Bool -- | The 'dismiss' event is called when the user tries to close the form. dismiss :: Event w (IO ()) ! destroyWidget :: w -> IO () --- 170,183 ---- resize :: Event w (Size -> IO ()) ! -- | The Dismissible widgets can be dissmissed ! class Dismissible w where ! -- | Dismiss a widget dismissWidget :: w -> IO Bool -- | The 'dismiss' event is called when the user tries to close the form. dismiss :: Event w (IO ()) ! ! -- | The Deadly widgets can be destroyed. ! class Deadly w where destroyWidget :: w -> IO () Index: Process.hs =================================================================== RCS file: /cvsroot/htoolkit/gio/src/Graphics/UI/GIO/Process.hs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Process.hs 30 Mar 2003 18:49:07 -0000 1.1 --- Process.hs 14 Apr 2003 17:57:32 -0000 1.2 *************** *** 30,36 **** pc = error "The Process is an abstract object and cannot be evaluated" ! instance Deadly Process where dismissWidget p = quit dismiss = newEvent (const Lib.getProcessDismissHandler) (const Lib.setProcessDismissHandler) (const Lib.setProcessDismissDefHandler) destroyWidget p = halt destroy = newEvent (const Lib.getProcessDestroyHandler) (const Lib.setProcessDestroyHandler) (const Lib.setProcessDestroyDefHandler) --- 30,38 ---- pc = error "The Process is an abstract object and cannot be evaluated" ! instance Dismissible Process where dismissWidget p = quit dismiss = newEvent (const Lib.getProcessDismissHandler) (const Lib.setProcessDismissHandler) (const Lib.setProcessDismissDefHandler) + + instance Deadly Process where destroyWidget p = halt destroy = newEvent (const Lib.getProcessDestroyHandler) (const Lib.setProcessDestroyHandler) (const Lib.setProcessDestroyDefHandler) Index: Window.hs =================================================================== RCS file: /cvsroot/htoolkit/gio/src/Graphics/UI/GIO/Window.hs,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** Window.hs 12 Apr 2003 07:30:58 -0000 1.11 --- Window.hs 14 Apr 2003 17:57:33 -0000 1.12 *************** *** 150,156 **** (\w sz-> Lib.setWindowViewSize (hwindow w) sz) ! instance Deadly Window where dismissWidget w = Lib.dismissWindow (hwindow w) dismiss = newDismissEvent hwindow destroyWidget w = Lib.destroyWindow (hwindow w) destroy = newDestroyEvent hwindow --- 150,158 ---- (\w sz-> Lib.setWindowViewSize (hwindow w) sz) ! instance Dismissible Window where dismissWidget w = Lib.dismissWindow (hwindow w) dismiss = newDismissEvent hwindow + + instance Deadly Window where destroyWidget w = Lib.destroyWindow (hwindow w) destroy = newDestroyEvent hwindow Index: Timer.hs =================================================================== RCS file: /cvsroot/htoolkit/gio/src/Graphics/UI/GIO/Timer.hs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Timer.hs 14 Apr 2003 17:49:56 -0000 1.6 --- Timer.hs 14 Apr 2003 17:57:33 -0000 1.7 *************** *** 12,16 **** ----------------------------------------------------------------------------------------- module Graphics.UI.GIO.Timer ! ( Timer, timer, interval, destroyTimer ) where --- 12,16 ---- ----------------------------------------------------------------------------------------- module Graphics.UI.GIO.Timer ! ( Timer, timer, interval ) where *************** *** 48,51 **** command = newEvent (Lib.getTimerHandler . getTimerHandle) (Lib.setTimerHandler . getTimerHandle) (Lib.setTimerDefHandler . getTimerHandle) ! destroyTimer :: Timer -> IO () ! destroyTimer = Lib.destroyTimer . getTimerHandle \ No newline at end of file --- 48,52 ---- command = newEvent (Lib.getTimerHandler . getTimerHandle) (Lib.setTimerHandler . getTimerHandle) (Lib.setTimerDefHandler . getTimerHandle) ! instance Deadly Timer where ! destroyWidget t = Lib.destroyTimer (getTimerHandle t) ! destroy = newEvent (const Lib.getTimerDestroyHandler) (const Lib.setTimerDestroyHandler) (const Lib.setTimerDestroyDefHandler) |