| Safe Haskell | None | 
|---|---|
| Language | Haskell2010 | 
MiniLight.Light
Contents
Synopsis
- class HasLightEnv c where
 - newtype LightT env m a = LightT {
- runLightT' :: ReaderT env m a
 
 - data LightEnv = LightEnv {}
 - type MiniLight = LightT LightEnv IO
 - liftMiniLight :: (HasLightEnv env, MonadIO m) => MiniLight a -> LightT env m a
 - envLightT :: (env' -> env) -> LightT env m a -> LightT env' m a
 - mapLightT :: (m a -> n a) -> LightT env m a -> LightT env n a
 - class HasLoopEnv c where
 - data LoopEnv = LoopEnv {}
 - data FontDescriptor = FontDescriptor {}
 - data FontStyle = FontStyle {
- _fontStyleBold :: !Bool
 - _fontStyleItalic :: !Bool
 
 - loadFontCache :: MonadIO m => m FontMap
 - loadFont :: (HasLightEnv env, MonadIO m) => FontDescriptor -> Int -> LightT env m Font
 - withFont :: (HasLightEnv env, MonadIO m, MonadMask m) => FontDescriptor -> Int -> (Font -> LightT env m a) -> LightT env m a
 - class Monad m => MonadIO (m :: Type -> Type) where
 
Documentation
class HasLightEnv c where Source #
Minimal complete definition
Methods
lightEnv :: Lens' c LightEnv Source #
_fontCache :: Lens' c FontMap Source #
Instances
newtype LightT env m a Source #
Constructors
| LightT | |
Fields 
  | |
Instances
The environment for LightT monad.
Constructors
| LightEnv | |
Instances
| HasLightEnv LightEnv Source # | |
| Rendering Figure MiniLight Source # | |
Defined in MiniLight.Figure Methods translate :: V2 Int -> Figure -> Figure Source # clip :: Rectangle Int -> Figure -> Figure Source # rotate :: Double -> Figure -> Figure Source # text :: Font -> V4 Word8 -> Text -> MiniLight Figure Source # picture :: FilePath -> MiniLight Figure Source # fromTexture :: Texture -> MiniLight Figure Source # rectangleOutline :: V4 Word8 -> V2 Int -> MiniLight Figure Source # rectangleFilled :: V4 Word8 -> V2 Int -> MiniLight Figure Source # triangleOutline :: V4 Word8 -> V2 Int -> MiniLight Figure Source #  | |
liftMiniLight :: (HasLightEnv env, MonadIO m) => MiniLight a -> LightT env m a Source #
class HasLoopEnv c where Source #
Minimal complete definition
Methods
loopEnv :: Lens' c LoopEnv Source #
_events :: Lens' c (MVar [Event]) Source #
Instances
Constructors
| LoopEnv | |
data FontDescriptor #
A font descriptor is a key used to find a font in a font cache.
Constructors
| FontDescriptor | |
Fields 
  | |
Instances
Describe the basic stylistic properties of a font.
Constructors
| FontStyle | |
Fields 
  | |
Instances
| Eq FontStyle | |
| Ord FontStyle | |
| Show FontStyle | |
| Binary FontStyle | |
loadFontCache :: MonadIO m => m FontMap Source #
loadFont :: (HasLightEnv env, MonadIO m) => FontDescriptor -> Int -> LightT env m Font Source #
withFont :: (HasLightEnv env, MonadIO m, MonadMask m) => FontDescriptor -> Int -> (Font -> LightT env m a) -> LightT env m a Source #
Re-exports
class Monad m => MonadIO (m :: Type -> Type) where #
Monads in which IO computations may be embedded.
 Any monad built by applying a sequence of monad transformers to the
 IO monad will be an instance of this class.
Instances should satisfy the following laws, which state that liftIO
 is a transformer of monads: