summaryrefslogtreecommitdiff
path: root/src/Gtk/State.dcl
blob: d75090040901affddf89fac350e657b17ffceeed (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
definition module Gtk.State

from StdMaybe import :: Maybe

from Control.Applicative import class pure
from Control.Monad.State import :: State, :: StateT,
	instance pure (StateT m s)
from Control.Monad.Identity import :: Identity,
	instance pure Identity
from Data.Map import :: Map

from Gtk.Signal import :: GSignalHandlerInternal

:: GtkState =
	{ world           :: !()
	, return          :: !Bool
	, signal_handlers :: !Map Int GSignalHandlerInternal
	, signal_counter  :: !Int
	}

newGtkState :: GtkState

runGtk :: !(State GtkState a) !*World -> (!a, !*World)

toState :: !(A.a: a -> a) -> State GtkState ()
toStateR :: !(A.a: a -> (r,a)) -> State GtkState r

quit :: State GtkState ()