gi-gsk-4.0.9: Gsk bindings

Copyright | Will Thompson and Iñaki García Etxebarria
License | LGPL-2.1
Maintainer | Iñaki García Etxebarria
Safe Haskell | None
Language | Haskell2010

GI.Gsk.Callbacks

Contents

- Signals
  - ParseErrorFunc
  - PathForeachFunc
  - PathIntersectionFunc
  - RenderReplayFontFilter
  - RenderReplayNodeFilter
  - RenderReplayNodeForeach
  - RenderReplayTextureFilter

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] -> Float -> IO Bool
- type PathForeachFunc_WithClosures = PathOperation -> [Point] -> Float -> Ptr () -> IO Bool
- drop_closures_PathForeachFunc :: PathForeachFunc -> PathForeachFunc_WithClosures
- dynamic_PathForeachFunc :: (HasCallStack, MonadIO m) => FunPtr C_PathForeachFunc -> PathOperation -> [Point] -> 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
- type C_PathIntersectionFunc = Ptr Path -> Ptr PathPoint -> Ptr Path -> Ptr PathPoint -> CUInt -> Ptr () -> IO CInt
- type PathIntersectionFunc = Path -> PathPoint -> Path -> PathPoint -> PathIntersection -> IO Bool
- type PathIntersectionFunc_WithClosures = Path -> PathPoint -> Path -> PathPoint -> PathIntersection -> Ptr () -> IO Bool
- drop_closures_PathIntersectionFunc :: PathIntersectionFunc -> PathIntersectionFunc_WithClosures
- dynamic_PathIntersectionFunc :: (HasCallStack, MonadIO m) => FunPtr C_PathIntersectionFunc -> Path -> PathPoint -> Path -> PathPoint -> PathIntersection -> Ptr () -> m Bool
- genClosure_PathIntersectionFunc :: MonadIO m => PathIntersectionFunc -> m (GClosure C_PathIntersectionFunc)
- mk_PathIntersectionFunc :: C_PathIntersectionFunc -> IO (FunPtr C_PathIntersectionFunc)
- noPathIntersectionFunc :: Maybe PathIntersectionFunc
- noPathIntersectionFunc_WithClosures :: Maybe PathIntersectionFunc_WithClosures
- wrap_PathIntersectionFunc :: Maybe (Ptr (FunPtr C_PathIntersectionFunc)) -> PathIntersectionFunc_WithClosures -> C_PathIntersectionFunc
- type C_RenderReplayFontFilter = Ptr RenderReplay -> Ptr Font -> Ptr () -> IO (Ptr Font)
- type RenderReplayFontFilter = RenderReplay -> Font -> IO Font
- type RenderReplayFontFilter_WithClosures = RenderReplay -> Font -> Ptr () -> IO Font
- drop_closures_RenderReplayFontFilter :: RenderReplayFontFilter -> RenderReplayFontFilter_WithClosures
- dynamic_RenderReplayFontFilter :: (HasCallStack, MonadIO m, IsFont a) => FunPtr C_RenderReplayFontFilter -> RenderReplay -> a -> Ptr () -> m Font
- genClosure_RenderReplayFontFilter :: MonadIO m => RenderReplayFontFilter -> m (GClosure C_RenderReplayFontFilter)
- mk_RenderReplayFontFilter :: C_RenderReplayFontFilter -> IO (FunPtr C_RenderReplayFontFilter)
- noRenderReplayFontFilter :: Maybe RenderReplayFontFilter
- noRenderReplayFontFilter_WithClosures :: Maybe RenderReplayFontFilter_WithClosures
- wrap_RenderReplayFontFilter :: Maybe (Ptr (FunPtr C_RenderReplayFontFilter)) -> RenderReplayFontFilter_WithClosures -> C_RenderReplayFontFilter
- type C_RenderReplayNodeFilter = Ptr RenderReplay -> Ptr RenderNode -> Ptr () -> IO (Ptr RenderNode)
- type RenderReplayNodeFilter = RenderReplay -> RenderNode -> IO (Maybe RenderNode)
- type RenderReplayNodeFilter_WithClosures = RenderReplay -> RenderNode -> Ptr () -> IO (Maybe RenderNode)
- drop_closures_RenderReplayNodeFilter :: RenderReplayNodeFilter -> RenderReplayNodeFilter_WithClosures
- dynamic_RenderReplayNodeFilter :: (HasCallStack, MonadIO m, IsRenderNode a) => FunPtr C_RenderReplayNodeFilter -> RenderReplay -> a -> Ptr () -> m (Maybe RenderNode)
- genClosure_RenderReplayNodeFilter :: MonadIO m => RenderReplayNodeFilter -> m (GClosure C_RenderReplayNodeFilter)
- mk_RenderReplayNodeFilter :: C_RenderReplayNodeFilter -> IO (FunPtr C_RenderReplayNodeFilter)
- noRenderReplayNodeFilter :: Maybe RenderReplayNodeFilter
- noRenderReplayNodeFilter_WithClosures :: Maybe RenderReplayNodeFilter_WithClosures
- wrap_RenderReplayNodeFilter :: Maybe (Ptr (FunPtr C_RenderReplayNodeFilter)) -> RenderReplayNodeFilter_WithClosures -> C_RenderReplayNodeFilter
- type C_RenderReplayNodeForeach = Ptr RenderReplay -> Ptr RenderNode -> Ptr () -> IO CInt
- type RenderReplayNodeForeach = RenderReplay -> RenderNode -> IO Bool
- type RenderReplayNodeForeach_WithClosures = RenderReplay -> RenderNode -> Ptr () -> IO Bool
- drop_closures_RenderReplayNodeForeach :: RenderReplayNodeForeach -> RenderReplayNodeForeach_WithClosures
- dynamic_RenderReplayNodeForeach :: (HasCallStack, MonadIO m, IsRenderNode a) => FunPtr C_RenderReplayNodeForeach -> RenderReplay -> a -> Ptr () -> m Bool
- genClosure_RenderReplayNodeForeach :: MonadIO m => RenderReplayNodeForeach -> m (GClosure C_RenderReplayNodeForeach)
- mk_RenderReplayNodeForeach :: C_RenderReplayNodeForeach -> IO (FunPtr C_RenderReplayNodeForeach)
- noRenderReplayNodeForeach :: Maybe RenderReplayNodeForeach
- noRenderReplayNodeForeach_WithClosures :: Maybe RenderReplayNodeForeach_WithClosures
- wrap_RenderReplayNodeForeach :: Maybe (Ptr (FunPtr C_RenderReplayNodeForeach)) -> RenderReplayNodeForeach_WithClosures -> C_RenderReplayNodeForeach
- type C_RenderReplayTextureFilter = Ptr RenderReplay -> Ptr Texture -> Ptr () -> IO (Ptr Texture)
- type RenderReplayTextureFilter = RenderReplay -> Texture -> IO Texture
- type RenderReplayTextureFilter_WithClosures = RenderReplay -> Texture -> Ptr () -> IO Texture
- drop_closures_RenderReplayTextureFilter :: RenderReplayTextureFilter -> RenderReplayTextureFilter_WithClosures
- dynamic_RenderReplayTextureFilter :: (HasCallStack, MonadIO m, IsTexture a) => FunPtr C_RenderReplayTextureFilter -> RenderReplay -> a -> Ptr () -> m Texture
- genClosure_RenderReplayTextureFilter :: MonadIO m => RenderReplayTextureFilter -> m (GClosure C_RenderReplayTextureFilter)
- mk_RenderReplayTextureFilter :: C_RenderReplayTextureFilter -> IO (FunPtr C_RenderReplayTextureFilter)
- noRenderReplayTextureFilter :: Maybe RenderReplayTextureFilter
- noRenderReplayTextureFilter_WithClosures :: Maybe RenderReplayTextureFilter_WithClosures
- wrap_RenderReplayTextureFilter :: Maybe (Ptr (FunPtr C_RenderReplayTextureFilter)) -> RenderReplayTextureFilter_WithClosures -> C_RenderReplayTextureFilter

# 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 | `start`: start of the error location
-> ParseLocation | `end`: end of the error location
-> GError | `error`: the error
-> IO () |

Type of callback that is called when an error occurs during node deserialization.

type ParseErrorFunc_WithClosures Source #

Arguments

= ParseLocation | `start`: start of the error location
-> ParseLocation | `end`: end of the error location
-> GError | `error`: the error
-> Ptr () | `userData`: user data
-> 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 | `start`: start of the error location
-> ParseLocation | `end`: end of the error location
-> GError | `error`: the error
-> Ptr () | `userData`: user data
-> 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 | `op`: The operation
-> [Point] | `pts`: The points of the operation
-> Float | `weight`: The weight for conic curves, or unused if not a conic curve
-> IO Bool | Returns: `True` to continue iterating the path, `False` to immediately abort and not call the function again.

Type 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 | `op`: The operation
-> [Point] | `pts`: The points of the operation
-> Float | `weight`: The weight for conic curves, or unused if not a conic curve
-> Ptr () | `userData`: The user data provided with the function
-> IO Bool | Returns: `True` to continue iterating the path, `False` to immediately abort and not call the function again.

Type 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 | `op`: The operation
-> [Point] | `pts`: The points of the operation
-> Float | `weight`: The weight for conic curves, or unused if not a conic curve
-> Ptr () | `userData`: The user data provided with the function
-> m Bool | Returns: `True` to continue iterating the path, `False` to immediately abort and not call the function again.

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`.

## PathIntersectionFunc

type C_PathIntersectionFunc = Ptr Path -> Ptr PathPoint -> Ptr Path -> Ptr PathPoint -> CUInt -> Ptr () -> IO CInt Source #

Type for the callback on the (unwrapped) C side.

type PathIntersectionFunc Source #

Arguments

= Path | `path1`: the first path
-> PathPoint | `point1`: the intersection as point on `path1`
-> Path | `path2`: the second path
-> PathPoint | `point2`: the intersection as point on `path2`
-> PathIntersection | `kind`: the nature of the intersection
-> IO Bool | Returns: true to continue iterating, false to stop the iteration and not call the function again

Prototype of the callback to iterate through the intersections of two paths.

Since: 4.20

type PathIntersectionFunc_WithClosures Source #

Arguments

= Path | `path1`: the first path
-> PathPoint | `point1`: the intersection as point on `path1`
-> Path | `path2`: the second path
-> PathPoint | `point2`: the intersection as point on `path2`
-> PathIntersection | `kind`: the nature of the intersection
-> Ptr () | `userData`: user data
-> IO Bool | Returns: true to continue iterating, false to stop the iteration and not call the function again

Prototype of the callback to iterate through the intersections of two paths.

Since: 4.20

drop_closures_PathIntersectionFunc :: PathIntersectionFunc -> PathIntersectionFunc_WithClosures Source #

A simple wrapper that ignores the closure arguments.

dynamic_PathIntersectionFunc Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FunPtr C_PathIntersectionFunc |
-> Path | `path1`: the first path
-> PathPoint | `point1`: the intersection as point on `path1`
-> Path | `path2`: the second path
-> PathPoint | `point2`: the intersection as point on `path2`
-> PathIntersection | `kind`: the nature of the intersection
-> Ptr () | `userData`: user data
-> m Bool | Returns: true to continue iterating, false to stop the iteration and not call the function again

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

genClosure_PathIntersectionFunc :: MonadIO m => PathIntersectionFunc -> m (GClosure C_PathIntersectionFunc) Source #

Wrap the callback into a `GClosure`.

mk_PathIntersectionFunc :: C_PathIntersectionFunc -> IO (FunPtr C_PathIntersectionFunc) Source #

Generate a function pointer callable from C code, from a `C_PathIntersectionFunc`.

noPathIntersectionFunc :: Maybe PathIntersectionFunc Source #

A convenience synonym for ``Nothing` :: `Maybe` `PathIntersectionFunc``.

noPathIntersectionFunc_WithClosures :: Maybe PathIntersectionFunc_WithClosures Source #

A convenience synonym for ``Nothing` :: `Maybe` `PathIntersectionFunc_WithClosures``.

wrap_PathIntersectionFunc :: Maybe (Ptr (FunPtr C_PathIntersectionFunc)) -> PathIntersectionFunc_WithClosures -> C_PathIntersectionFunc Source #

Wrap a `PathIntersectionFunc` into a `C_PathIntersectionFunc`.

## RenderReplayFontFilter

type C_RenderReplayFontFilter = Ptr RenderReplay -> Ptr Font -> Ptr () -> IO (Ptr Font) Source #

Type for the callback on the (unwrapped) C side.

type RenderReplayFontFilter Source #

Arguments

= RenderReplay | `replay`: The replay object used to replay the node
-> Font | `font`: The font to filter
-> IO Font | Returns: The filtered font

A function that filters fonts.

The function will be called by the default replay function for all nodes with fonts. They will then generate a node using the returned font.

It is valid for the function to return the passed in font if the font shuld not be modified.

Since: 4.22

type RenderReplayFontFilter_WithClosures Source #

Arguments

= RenderReplay | `replay`: The replay object used to replay the node
-> Font | `font`: The font to filter
-> Ptr () | `userData`: The user data
-> IO Font | Returns: The filtered font

A function that filters fonts.

The function will be called by the default replay function for all nodes with fonts. They will then generate a node using the returned font.

It is valid for the function to return the passed in font if the font shuld not be modified.

Since: 4.22

drop_closures_RenderReplayFontFilter :: RenderReplayFontFilter -> RenderReplayFontFilter_WithClosures Source #

A simple wrapper that ignores the closure arguments.

dynamic_RenderReplayFontFilter Source #

Arguments

:: (HasCallStack, MonadIO m, IsFont a) |
=> FunPtr C_RenderReplayFontFilter |
-> RenderReplay | `replay`: The replay object used to replay the node
-> a | `font`: The font to filter
-> Ptr () | `userData`: The user data
-> m Font | Returns: The filtered font

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

genClosure_RenderReplayFontFilter :: MonadIO m => RenderReplayFontFilter -> m (GClosure C_RenderReplayFontFilter) Source #

Wrap the callback into a `GClosure`.

mk_RenderReplayFontFilter :: C_RenderReplayFontFilter -> IO (FunPtr C_RenderReplayFontFilter) Source #

Generate a function pointer callable from C code, from a `C_RenderReplayFontFilter`.

noRenderReplayFontFilter :: Maybe RenderReplayFontFilter Source #

A convenience synonym for ``Nothing` :: `Maybe` `RenderReplayFontFilter``.

noRenderReplayFontFilter_WithClosures :: Maybe RenderReplayFontFilter_WithClosures Source #

A convenience synonym for ``Nothing` :: `Maybe` `RenderReplayFontFilter_WithClosures``.

wrap_RenderReplayFontFilter :: Maybe (Ptr (FunPtr C_RenderReplayFontFilter)) -> RenderReplayFontFilter_WithClosures -> C_RenderReplayFontFilter Source #

Wrap a `RenderReplayFontFilter` into a `C_RenderReplayFontFilter`.

## RenderReplayNodeFilter

type C_RenderReplayNodeFilter = Ptr RenderReplay -> Ptr RenderNode -> Ptr () -> IO (Ptr RenderNode) Source #

Type for the callback on the (unwrapped) C side.

type RenderReplayNodeFilter Source #

Arguments

= RenderReplay | `replay`: The replay object used to replay the node
-> RenderNode | `node`: The node to replay
-> IO (Maybe RenderNode) | Returns: The replayed node

A function to replay a node.

The node may be returned unmodified.

The node may be discarded by returning `Nothing`.

If you do not want to do any handling yourself, call `renderReplayDefault` to use the default handler that calls your function on the children of the node.

Since: 4.22

type RenderReplayNodeFilter_WithClosures Source #

Arguments

= RenderReplay | `replay`: The replay object used to replay the node
-> RenderNode | `node`: The node to replay
-> Ptr () | `userData`: The user data
-> IO (Maybe RenderNode) | Returns: The replayed node

A function to replay a node.

The node may be returned unmodified.

The node may be discarded by returning `Nothing`.

If you do not want to do any handling yourself, call `renderReplayDefault` to use the default handler that calls your function on the children of the node.

Since: 4.22

drop_closures_RenderReplayNodeFilter :: RenderReplayNodeFilter -> RenderReplayNodeFilter_WithClosures Source #

A simple wrapper that ignores the closure arguments.

dynamic_RenderReplayNodeFilter Source #

Arguments

:: (HasCallStack, MonadIO m, IsRenderNode a) |
=> FunPtr C_RenderReplayNodeFilter |
-> RenderReplay | `replay`: The replay object used to replay the node
-> a | `node`: The node to replay
-> Ptr () | `userData`: The user data
-> m (Maybe RenderNode) | Returns: The replayed node

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

genClosure_RenderReplayNodeFilter :: MonadIO m => RenderReplayNodeFilter -> m (GClosure C_RenderReplayNodeFilter) Source #

Wrap the callback into a `GClosure`.

mk_RenderReplayNodeFilter :: C_RenderReplayNodeFilter -> IO (FunPtr C_RenderReplayNodeFilter) Source #

Generate a function pointer callable from C code, from a `C_RenderReplayNodeFilter`.

noRenderReplayNodeFilter :: Maybe RenderReplayNodeFilter Source #

A convenience synonym for ``Nothing` :: `Maybe` `RenderReplayNodeFilter``.

noRenderReplayNodeFilter_WithClosures :: Maybe RenderReplayNodeFilter_WithClosures Source #

A convenience synonym for ``Nothing` :: `Maybe` `RenderReplayNodeFilter_WithClosures``.

wrap_RenderReplayNodeFilter :: Maybe (Ptr (FunPtr C_RenderReplayNodeFilter)) -> RenderReplayNodeFilter_WithClosures -> C_RenderReplayNodeFilter Source #

Wrap a `RenderReplayNodeFilter` into a `C_RenderReplayNodeFilter`.

## RenderReplayNodeForeach

type C_RenderReplayNodeForeach = Ptr RenderReplay -> Ptr RenderNode -> Ptr () -> IO CInt Source #

Type for the callback on the (unwrapped) C side.

type RenderReplayNodeForeach Source #

Arguments

= RenderReplay | `replay`: The replay object used to replay the node
-> RenderNode | `node`: The node to replay
-> IO Bool | Returns: TRUE to descend into this node's child nodes (if any) or FALSE to skip them

A function called for every node.

If this function returns TRUE, the replay will continue and call the filter function.

If it returns FALSE, the filter function will not be called and any child nodes will be skipped.

Since: 4.22

type RenderReplayNodeForeach_WithClosures Source #

Arguments

= RenderReplay | `replay`: The replay object used to replay the node
-> RenderNode | `node`: The node to replay
-> Ptr () | `userData`: The user data
-> IO Bool | Returns: TRUE to descend into this node's child nodes (if any) or FALSE to skip them

A function called for every node.

If this function returns TRUE, the replay will continue and call the filter function.

If it returns FALSE, the filter function will not be called and any child nodes will be skipped.

Since: 4.22

drop_closures_RenderReplayNodeForeach :: RenderReplayNodeForeach -> RenderReplayNodeForeach_WithClosures Source #

A simple wrapper that ignores the closure arguments.

dynamic_RenderReplayNodeForeach Source #

Arguments

:: (HasCallStack, MonadIO m, IsRenderNode a) |
=> FunPtr C_RenderReplayNodeForeach |
-> RenderReplay | `replay`: The replay object used to replay the node
-> a | `node`: The node to replay
-> Ptr () | `userData`: The user data
-> m Bool | Returns: TRUE to descend into this node's child nodes (if any) or FALSE to skip them

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

genClosure_RenderReplayNodeForeach :: MonadIO m => RenderReplayNodeForeach -> m (GClosure C_RenderReplayNodeForeach) Source #

Wrap the callback into a `GClosure`.

mk_RenderReplayNodeForeach :: C_RenderReplayNodeForeach -> IO (FunPtr C_RenderReplayNodeForeach) Source #

Generate a function pointer callable from C code, from a `C_RenderReplayNodeForeach`.

noRenderReplayNodeForeach :: Maybe RenderReplayNodeForeach Source #

A convenience synonym for ``Nothing` :: `Maybe` `RenderReplayNodeForeach``.

noRenderReplayNodeForeach_WithClosures :: Maybe RenderReplayNodeForeach_WithClosures Source #

A convenience synonym for ``Nothing` :: `Maybe` `RenderReplayNodeForeach_WithClosures``.

wrap_RenderReplayNodeForeach :: Maybe (Ptr (FunPtr C_RenderReplayNodeForeach)) -> RenderReplayNodeForeach_WithClosures -> C_RenderReplayNodeForeach Source #

Wrap a `RenderReplayNodeForeach` into a `C_RenderReplayNodeForeach`.

## RenderReplayTextureFilter

type C_RenderReplayTextureFilter = Ptr RenderReplay -> Ptr Texture -> Ptr () -> IO (Ptr Texture) Source #

Type for the callback on the (unwrapped) C side.

type RenderReplayTextureFilter Source #

Arguments

= RenderReplay | `replay`: The replay object used to replay the node
-> Texture | `texture`: The texture to filter
-> IO Texture | Returns: The filtered texture

A function that filters textures.

The function will be called by the default replay function for all nodes with textures. They will then generate a node using the returned texture.

It is valid for the function to return the passed in texture if the texture shuld not be modified.

Since: 4.22

type RenderReplayTextureFilter_WithClosures Source #

Arguments

= RenderReplay | `replay`: The replay object used to replay the node
-> Texture | `texture`: The texture to filter
-> Ptr () | `userData`: The user data
-> IO Texture | Returns: The filtered texture

A function that filters textures.

The function will be called by the default replay function for all nodes with textures. They will then generate a node using the returned texture.

It is valid for the function to return the passed in texture if the texture shuld not be modified.

Since: 4.22

drop_closures_RenderReplayTextureFilter :: RenderReplayTextureFilter -> RenderReplayTextureFilter_WithClosures Source #

A simple wrapper that ignores the closure arguments.

dynamic_RenderReplayTextureFilter Source #

Arguments

:: (HasCallStack, MonadIO m, IsTexture a) |
=> FunPtr C_RenderReplayTextureFilter |
-> RenderReplay | `replay`: The replay object used to replay the node
-> a | `texture`: The texture to filter
-> Ptr () | `userData`: The user data
-> m Texture | Returns: The filtered texture

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

genClosure_RenderReplayTextureFilter :: MonadIO m => RenderReplayTextureFilter -> m (GClosure C_RenderReplayTextureFilter) Source #

Wrap the callback into a `GClosure`.

mk_RenderReplayTextureFilter :: C_RenderReplayTextureFilter -> IO (FunPtr C_RenderReplayTextureFilter) Source #

Generate a function pointer callable from C code, from a `C_RenderReplayTextureFilter`.

noRenderReplayTextureFilter :: Maybe RenderReplayTextureFilter Source #

A convenience synonym for ``Nothing` :: `Maybe` `RenderReplayTextureFilter``.

noRenderReplayTextureFilter_WithClosures :: Maybe RenderReplayTextureFilter_WithClosures Source #

A convenience synonym for ``Nothing` :: `Maybe` `RenderReplayTextureFilter_WithClosures``.

wrap_RenderReplayTextureFilter :: Maybe (Ptr (FunPtr C_RenderReplayTextureFilter)) -> RenderReplayTextureFilter_WithClosures -> C_RenderReplayTextureFilter Source #

Wrap a `RenderReplayTextureFilter` into a `C_RenderReplayTextureFilter`.