keera-hails-mvc-view-0.0.3.3: Haskell on Gtk rails - Generic View for MVC applications

Safe HaskellSafe-Inferred
LanguageHaskell98

Hails.MVC.View

Description

This class encapsulates GUI apis with some basic common operations: initialise the GUI, destroy the GUI, execute in the GUI Thread, etc.

Synopsis

Documentation

data Null a Source

Null is a parametric datatype with a non-parametric constructor.

Constructors

Null 

class View a where Source

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.

Methods

initView :: Null a -> IO () Source

createView :: IO a Source

startView :: a -> IO () Source

onViewSync :: a -> IO b -> IO b Source

onViewAsync :: a -> IO () -> IO () Source

destroyView :: a -> IO () Source

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.