| 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 |
GI.Gsk.Callbacks
Contents
Description
Synopsis
- type C_ParseErrorFunc = Ptr ParseLocation -> Ptr ParseLocation -> Ptr GError -> Ptr () -> IO ()
- type ParseErrorFunc = ParseLocation -> ParseLocation -> GError -> IO ()
- type ParseErrorFunc_WithClosures = ParseLocation -> ParseLocation -> GError -> Ptr () -> IO ()
- drop_closures_ParseErrorFunc :: ParseErrorFunc -> ParseErrorFunc_WithClosures
- dynamic_ParseErrorFunc :: (HasCallStack, MonadIO m) => FunPtr C_ParseErrorFunc -> ParseLocation -> ParseLocation -> GError -> Ptr () -> m ()
- genClosure_ParseErrorFunc :: MonadIO m => ParseErrorFunc -> m (GClosure C_ParseErrorFunc)
- mk_ParseErrorFunc :: C_ParseErrorFunc -> IO (FunPtr C_ParseErrorFunc)
- noParseErrorFunc :: Maybe ParseErrorFunc
- noParseErrorFunc_WithClosures :: Maybe ParseErrorFunc_WithClosures
- wrap_ParseErrorFunc :: Maybe (Ptr (FunPtr C_ParseErrorFunc)) -> ParseErrorFunc_WithClosures -> C_ParseErrorFunc
- type C_PathForeachFunc = CUInt -> Ptr Point -> CSize -> CFloat -> Ptr () -> IO CInt
- type PathForeachFunc = PathOperation -> Point -> CSize -> Float -> IO Bool
- type PathForeachFunc_WithClosures = PathOperation -> Point -> CSize -> Float -> Ptr () -> IO Bool
- drop_closures_PathForeachFunc :: PathForeachFunc -> PathForeachFunc_WithClosures
- dynamic_PathForeachFunc :: (HasCallStack, MonadIO m) => FunPtr C_PathForeachFunc -> PathOperation -> Point -> CSize -> Float -> Ptr () -> m Bool
- genClosure_PathForeachFunc :: MonadIO m => PathForeachFunc -> m (GClosure C_PathForeachFunc)
- mk_PathForeachFunc :: C_PathForeachFunc -> IO (FunPtr C_PathForeachFunc)
- noPathForeachFunc :: Maybe PathForeachFunc
- noPathForeachFunc_WithClosures :: Maybe PathForeachFunc_WithClosures
- wrap_PathForeachFunc :: Maybe (Ptr (FunPtr C_PathForeachFunc)) -> PathForeachFunc_WithClosures -> C_PathForeachFunc
Signals
ParseErrorFunc
type C_ParseErrorFunc = Ptr ParseLocation -> Ptr ParseLocation -> Ptr GError -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type ParseErrorFunc Source #
Arguments
| = ParseLocation |
|
| -> ParseLocation |
|
| -> GError |
|
| -> IO () |
Type of callback that is called when an error occurs during node deserialization.
type ParseErrorFunc_WithClosures Source #
Arguments
| = ParseLocation |
|
| -> ParseLocation |
|
| -> GError |
|
| -> Ptr () |
|
| -> IO () |
Type of callback that is called when an error occurs during node deserialization.
drop_closures_ParseErrorFunc :: ParseErrorFunc -> ParseErrorFunc_WithClosures Source #
A simple wrapper that ignores the closure arguments.
dynamic_ParseErrorFunc Source #
Arguments
| :: (HasCallStack, MonadIO m) | |
| => FunPtr C_ParseErrorFunc | |
| -> ParseLocation |
|
| -> ParseLocation |
|
| -> GError |
|
| -> Ptr () |
|
| -> m () |
Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
genClosure_ParseErrorFunc :: MonadIO m => ParseErrorFunc -> m (GClosure C_ParseErrorFunc) Source #
Wrap the callback into a GClosure.
mk_ParseErrorFunc :: C_ParseErrorFunc -> IO (FunPtr C_ParseErrorFunc) Source #
Generate a function pointer callable from C code, from a C_ParseErrorFunc.
noParseErrorFunc :: Maybe ParseErrorFunc Source #
A convenience synonym for .Nothing :: Maybe ParseErrorFunc
noParseErrorFunc_WithClosures :: Maybe ParseErrorFunc_WithClosures Source #
A convenience synonym for .Nothing :: Maybe ParseErrorFunc_WithClosures
wrap_ParseErrorFunc :: Maybe (Ptr (FunPtr C_ParseErrorFunc)) -> ParseErrorFunc_WithClosures -> C_ParseErrorFunc Source #
Wrap a ParseErrorFunc into a C_ParseErrorFunc.
PathForeachFunc
type C_PathForeachFunc = CUInt -> Ptr Point -> CSize -> CFloat -> Ptr () -> IO CInt Source #
Type for the callback on the (unwrapped) C side.
type PathForeachFunc Source #
Arguments
| = PathOperation |
|
| -> Point |
|
| -> CSize |
|
| -> Float |
|
| -> IO Bool | Returns: |
Prototype of the callback to iterate through the operations of a path.
For each operation, the callback is given the op itself, the points
that the operation is applied to in pts, and a weight for conic
curves. The nPts argument is somewhat redundant, since the number
of points can be inferred from the operation.
Each contour of the path starts with a gSKPATHMOVE operation.
Closed contours end with a gSKPATHCLOSE operation.
type PathForeachFunc_WithClosures Source #
Arguments
| = PathOperation |
|
| -> Point |
|
| -> CSize |
|
| -> Float |
|
| -> Ptr () |
|
| -> IO Bool | Returns: |
Prototype of the callback to iterate through the operations of a path.
For each operation, the callback is given the op itself, the points
that the operation is applied to in pts, and a weight for conic
curves. The nPts argument is somewhat redundant, since the number
of points can be inferred from the operation.
Each contour of the path starts with a gSKPATHMOVE operation.
Closed contours end with a gSKPATHCLOSE operation.
drop_closures_PathForeachFunc :: PathForeachFunc -> PathForeachFunc_WithClosures Source #
A simple wrapper that ignores the closure arguments.
dynamic_PathForeachFunc Source #
Arguments
| :: (HasCallStack, MonadIO m) | |
| => FunPtr C_PathForeachFunc | |
| -> PathOperation |
|
| -> Point |
|
| -> CSize |
|
| -> Float |
|
| -> Ptr () |
|
| -> m Bool | Returns: |
Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
genClosure_PathForeachFunc :: MonadIO m => PathForeachFunc -> m (GClosure C_PathForeachFunc) Source #
Wrap the callback into a GClosure.
mk_PathForeachFunc :: C_PathForeachFunc -> IO (FunPtr C_PathForeachFunc) Source #
Generate a function pointer callable from C code, from a C_PathForeachFunc.
noPathForeachFunc :: Maybe PathForeachFunc Source #
A convenience synonym for .Nothing :: Maybe PathForeachFunc
noPathForeachFunc_WithClosures :: Maybe PathForeachFunc_WithClosures Source #
A convenience synonym for .Nothing :: Maybe PathForeachFunc_WithClosures
wrap_PathForeachFunc :: Maybe (Ptr (FunPtr C_PathForeachFunc)) -> PathForeachFunc_WithClosures -> C_PathForeachFunc Source #
Wrap a PathForeachFunc into a C_PathForeachFunc.