Copyright | (c) 2014 Ian-Woo Kim |
---|---|
License | BSD3 |
Maintainer | Ian-Woo Kim <ianwookim@gmail.com> |
Stability | experimental |
Portability | GHC |
Safe Haskell | None |
Language | Haskell98 |
- newtype PDFCommandID = PDFCommandID UUID
- data PDFCommand where
- GetDocFromFile :: ByteString -> TMVar (Maybe Document) -> PDFCommand
- GetDocFromDataURI :: ByteString -> TMVar (Maybe Document) -> PDFCommand
- GetPageFromDoc :: Document -> !Int -> TMVar (Maybe Page) -> PDFCommand
- GetNPages :: !Document -> TMVar Int -> PDFCommand
- RenderPageScaled :: SurfaceID -> Page -> Dimension -> Dimension -> PDFCommand
- newtype GenCommandID = GenCommandID UUID
- data GenCommand where
- BkgSmplScaled :: SurfaceID -> ByteString -> ByteString -> Dimension -> Dimension -> GenCommand
- LayerInit :: SurfaceID -> [RItem] -> GenCommand
- LayerRedraw :: SurfaceID -> [RItem] -> GenCommand
- LayerScaled :: SurfaceID -> [RItem] -> Dimension -> Dimension -> GenCommand
- newtype SurfaceID = SurfaceID UUID
- type CanvasId = Int
- type RenderCache = HashMap SurfaceID (Double, Surface)
- data RendererEvent
- type PDFCommandQueue = TVar (Seq (PDFCommandID, PDFCommand))
- type GenCommandQueue = TVar (Seq (GenCommandID, GenCommand))
- data RendererState = RendererState {}
- getRenderCache :: RendererState -> IO RenderCache
- type Renderer = ReaderT RendererState IO
- issuePDFCommandID :: (Functor m, MonadIO m) => m PDFCommandID
- issueGenCommandID :: (Functor m, MonadIO m) => m GenCommandID
- issueSurfaceID :: (Functor m, MonadIO m) => m SurfaceID
- sendPDFCommand :: PDFCommandQueue -> PDFCommandID -> PDFCommand -> STM ()
- isRemoved :: (PDFCommandID, PDFCommand) -> (PDFCommandID, PDFCommand) -> Bool
- sendGenCommand :: GenCommandQueue -> GenCommandID -> GenCommand -> STM ()
- surfaceID :: GenCommand -> SurfaceID
- isRemovedGen :: (GenCommandID, GenCommand) -> (GenCommandID, GenCommand) -> Bool
Documentation
newtype PDFCommandID Source #
data PDFCommand where Source #
GetDocFromFile :: ByteString -> TMVar (Maybe Document) -> PDFCommand | |
GetDocFromDataURI :: ByteString -> TMVar (Maybe Document) -> PDFCommand | |
GetPageFromDoc :: Document -> !Int -> TMVar (Maybe Page) -> PDFCommand | |
GetNPages :: !Document -> TMVar Int -> PDFCommand | |
RenderPageScaled :: SurfaceID -> Page -> Dimension -> Dimension -> PDFCommand |
newtype GenCommandID Source #
data GenCommand where Source #
BkgSmplScaled :: SurfaceID -> ByteString -> ByteString -> Dimension -> Dimension -> GenCommand | |
LayerInit :: SurfaceID -> [RItem] -> GenCommand | |
LayerRedraw :: SurfaceID -> [RItem] -> GenCommand | |
LayerScaled :: SurfaceID -> [RItem] -> Dimension -> Dimension -> GenCommand |
type RenderCache = HashMap SurfaceID (Double, Surface) Source #
hashmap: key = UUID, value = (original size, view size, surface)
type PDFCommandQueue = TVar (Seq (PDFCommandID, PDFCommand)) Source #
type GenCommandQueue = TVar (Seq (GenCommandID, GenCommand)) Source #
data RendererState Source #
issuePDFCommandID :: (Functor m, MonadIO m) => m PDFCommandID Source #
issueGenCommandID :: (Functor m, MonadIO m) => m GenCommandID Source #
sendPDFCommand :: PDFCommandQueue -> PDFCommandID -> PDFCommand -> STM () Source #
isRemoved :: (PDFCommandID, PDFCommand) -> (PDFCommandID, PDFCommand) -> Bool Source #
sendGenCommand :: GenCommandQueue -> GenCommandID -> GenCommand -> STM () Source #
surfaceID :: GenCommand -> SurfaceID Source #
isRemovedGen :: (GenCommandID, GenCommand) -> (GenCommandID, GenCommand) -> Bool Source #