Update of /cvsroot/htoolkit/gio/src/Graphics/UI/GIO
In directory sc8-pr-cvs1:/tmp/cvs-serv31718/gio/src/Graphics/UI/GIO
Modified Files:
Process.hs
Log Message:
Implementation for persistent configuration keys for both Windows and Linux.
Under Windows they are stored in Windows Registry and under Linux they are
stored in GConf configuration database
Index: Process.hs
===================================================================
RCS file: /cvsroot/htoolkit/gio/src/Graphics/UI/GIO/Process.hs,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** Process.hs 1 May 2003 19:35:37 -0000 1.3
--- Process.hs 4 Jul 2003 17:39:04 -0000 1.4
***************
*** 17,20 ****
--- 17,21 ----
( Process, pc
, start, quit, halt
+ , ConfigKey(..), configKey, configKeyDef
) where
***************
*** 24,27 ****
--- 25,29 ----
import Graphics.UI.GIO.Events
import qualified Graphics.UI.Port as Lib
+ import Graphics.UI.Port(ConfigKey(..))
data Process
***************
*** 57,58 ****
--- 59,66 ----
halt :: IO ()
halt = Lib.halt
+
+ configKey :: ConfigKey a => String -> Attr Process a
+ configKey name = newAttr (\p -> Lib.getConfigKey name) (\p v -> Lib.setConfigKey name v)
+
+ configKeyDef :: ConfigKey a => String -> a -> Attr Process a
+ configKeyDef name defvalue = newAttr (\p -> Lib.getConfigKeyDef name defvalue) (\p v -> Lib.setConfigKey name v)
|