keera-hails-mvc-view-0.8.0: Haskell on Gtk rails - Generic View for MVC applications
Safe HaskellSafe-Inferred
LanguageHaskell2010

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.

Copyright : (C) Keera Studios Ltd, 2013 License : BSD3 Maintainer : support@keera.co.uk

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.