Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
This class encapsulates GUI apis with some basic common operations: initialise the GUI, destroy the GUI, execute in the GUI Thread, etc.
Copyright : (C) Keera Studios Ltd, 2013 License : BSD3 Maintainer : support@keera.co.uk
Synopsis
- data Null a = Null
- class View a where
- initView :: Null a -> IO ()
- createView :: IO a
- startView :: a -> IO ()
- onViewSync :: a -> IO b -> IO b
- onViewAsync :: a -> IO () -> IO ()
- destroyView :: a -> IO ()
- type ViewElementAccessor a b = a -> b
- type ViewElementAccessorIO a b = ViewElementAccessor a (IO b)
Documentation
A Class for View (GUI) managers. GUI managers usually have similar operations: initialise, destroy, run operation in the GUI thread, etc. This class encapsulates all these operations to provide a unique interface.
type ViewElementAccessor a b = a -> b Source #
An Element Accessor to access elements of kind b from Views of kind a is a function that takes an a and returns a b.
This type is defined to make signatures shorter and more declarative.
type ViewElementAccessorIO a b = ViewElementAccessor a (IO b) Source #
An Element Accessor to access elements of kind b from Views of kind a is a function that takes an a and returns an IO b.
This is the IO counterpart of the previous type. It is used more often because most element accessors run inside the IO monad.