Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Synopsis
- type C_SizeFunc = Ptr Int32 -> Ptr Int32 -> Ptr () -> IO ()
- type SizeFunc = IO (Int32, Int32)
- type SizeFunc_WithClosures = Ptr () -> IO (Int32, Int32)
- drop_closures_SizeFunc :: SizeFunc -> SizeFunc_WithClosures
- dynamic_SizeFunc :: (HasCallStack, MonadIO m) => FunPtr C_SizeFunc -> Ptr () -> m (Int32, Int32)
- genClosure_SizeFunc :: MonadIO m => SizeFunc -> m (GClosure C_SizeFunc)
- mk_SizeFunc :: C_SizeFunc -> IO (FunPtr C_SizeFunc)
- noSizeFunc :: Maybe SizeFunc
- noSizeFunc_WithClosures :: Maybe SizeFunc_WithClosures
- wrap_SizeFunc :: Maybe (Ptr (FunPtr C_SizeFunc)) -> SizeFunc_WithClosures -> C_SizeFunc
Signals
SizeFunc
type C_SizeFunc = Ptr Int32 -> Ptr Int32 -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type SizeFunc = IO (Int32, Int32) Source #
Deprecated: (Since version 2.14.)Use handleRenderDocument
instead, which lets you specifya viewport size in which to render the SVG document.
Function to let a user of the library specify the SVG's dimensions
See the documentation for handleSetSizeCallback
for an example, and
for the reasons for deprecation.
type SizeFunc_WithClosures Source #
Function to let a user of the library specify the SVG's dimensions
See the documentation for handleSetSizeCallback
for an example, and
for the reasons for deprecation.
drop_closures_SizeFunc :: SizeFunc -> SizeFunc_WithClosures Source #
A simple wrapper that ignores the closure arguments.
:: (HasCallStack, MonadIO m) | |
=> FunPtr C_SizeFunc | |
-> Ptr () |
|
-> m (Int32, Int32) |
Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
genClosure_SizeFunc :: MonadIO m => SizeFunc -> m (GClosure C_SizeFunc) Source #
Wrap the callback into a GClosure
.
mk_SizeFunc :: C_SizeFunc -> IO (FunPtr C_SizeFunc) Source #
Generate a function pointer callable from C code, from a C_SizeFunc
.
noSizeFunc_WithClosures :: Maybe SizeFunc_WithClosures Source #
A convenience synonym for
.Nothing
:: Maybe
SizeFunc_WithClosures
wrap_SizeFunc :: Maybe (Ptr (FunPtr C_SizeFunc)) -> SizeFunc_WithClosures -> C_SizeFunc Source #
Wrap a SizeFunc
into a C_SizeFunc
.