Stability | experimental |
---|---|
Maintainer | conal@conal.net |
Safe Haskell | None |
Gtk-based GUIs in the TV (tangible value) framework
This variation eliminates mdo by having MkI' produce a consumer of refresh actions rather than taking a refresh action as argument.
- type In = Input MkI
- type Out = Output MkI MkO
- type GTV = TV MkI MkO
- gtv :: Out a -> a -> GTV a
- runGTV :: GTV a -> IO ()
- runOut :: String -> Out a -> a -> Action
- runOutIO :: String -> Out a -> IO a -> Action
- type R = Float
- sliderRIn :: (R, R) -> R -> In R
- sliderIIn :: (Int, Int) -> Int -> In Int
- clockIn :: In R
- rateSliderIn :: (R, R) -> R -> In R
- integralIn :: (VectorSpace v, Eq v, Scalar v ~ Float) => In v -> In v
- fileNameIn :: FilePath -> In FilePath
- module Interface.TV
- type Action = IO ()
- type Sink a = a -> Action
- data MkI a
- type MkI' a = IO (Widget, IO a, Action, Sink Action)
- data MkO a
- type MkO' a = IO (Widget, Sink a, Action)
- primMkI :: MkI' a -> In a
- primMkO :: MkO' a -> Out a
- forget :: Functor f => f a -> f ()
- forget2 :: Monad m => (w -> a -> m b) -> w -> a -> m ()
TV type specializations
runOutIO :: String -> Out a -> IO a -> ActionSource
Run a visualization on a constructed (IO
-extracted) value. The
action is executed just once, after the visualization is all set up,
which allows for things like OpenGL shader compilation.
UI primitives
rateSliderIn :: (R, R) -> R -> In RSource
Rate slider. Updates result (integral) 60 times per second.
Specialization of rateSliderDtIn
.
integralIn :: (VectorSpace v, Eq v, Scalar v ~ Float) => In v -> In vSource
Integral of an input. Updates result (integral) 60 times per second.
fileNameIn :: FilePath -> In FilePathSource
module Interface.TV