| Copyright | (c) Kilian Kilger Iñaki García Etxebarria 2018 |
|---|---|
| License | LGPL-2.1 |
| Maintainer | kkilger@gmail.com |
| Stability | experimental |
| Portability | portable |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
GI.Cairo.Render.Connector
Description
This library contains glue code to interconnect Haskell GI, i.e. the gi-cairo library and gi-cairo-render, i.e. the hand written cairo bindings for Haskell.
Synopsis
- renderWithContext :: MonadIO m => Render a -> Context -> m a
- getContext :: Render Context
- toRender :: (Context -> IO a) -> Render a
Documentation
Arguments
| :: MonadIO m | |
| => Render a | Render action |
| -> Context | Context from gi-cairo |
| -> m a | Result of the action |
Arguments
| :: Render Context | Underlying GI.Cairo.Context |
This function is used to call back to functions of GI.Pango or GI.PangoCairo
or other Haskell GI libraries from inside the Render action.
Example:
draw :: Cairo.Render ()
draw = do ...
context <- getContext
somePangoFunction context