Copyright | Sven Bartscher 2020 |
---|---|
License | MPL-2.0 |
Maintainer | sven.bartscher@weltraumschlangen.de |
Stability | experimental |
Safe Haskell | None |
Language | Haskell2010 |
This module provides the top-level entry-point for running reactive
GTK applications, namely runReflexGtk
.
Synopsis
- runReflexGtk :: Application -> Maybe [String] -> (forall x. HasSpiderTimeline x => ReflexGtk x ()) -> IO Int32
- type ReflexGtk x = ReflexGtkT (SpiderTimeline x) (SpiderHost x)
- data ReflexGtkT (t :: *) (m :: k) a
Documentation
:: Application | The application to run the GTK mainloop on. |
-> Maybe [String] | The arguments to provide to |
-> (forall x. HasSpiderTimeline x => ReflexGtk x ()) | The user-provided monadic action to set up your reactive network. |
-> IO Int32 | The exit code as returned by |
The top-level entry point for reactive GTK applications.
You have to provide an existing Application
which will run the
GTK application. applicationRun
should not be called on
the Application manually, as this function expects to start the
mainloop by itself. However, apart from that, you may use the
Application
as you wish, for example by setting appropriate
ApplicationFlags
, binding to its signals, assigning
Window
s to it or changing its attributes.
type ReflexGtk x = ReflexGtkT (SpiderTimeline x) (SpiderHost x) Source #
This is the monad that reactive GTK code is run in. Notably this
type implements MonadReflexGtk
when run with
runReflexGtk
.
data ReflexGtkT (t :: *) (m :: k) a Source #
A monad providing an implementation for
MonadReflexGtk
given a suitable reflex host
(such as SpiderHost
) as a base monad.
Your probably want to look at ReflexGtk
, as it is the only
specialization of this type that can be executed using
runReflexGtk
.