gi-gsk-4.0.9: Gsk bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellNone
LanguageHaskell2010

GI.Gsk.Callbacks

Description

 
Synopsis

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.

mk_ParseErrorFunc :: C_ParseErrorFunc -> IO (FunPtr C_ParseErrorFunc) Source #

Generate a function pointer callable from C code, from 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.

mk_PathForeachFunc :: C_PathForeachFunc -> IO (FunPtr C_PathForeachFunc) Source #

Generate a function pointer callable from C code, from 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

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.

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

Generate a function pointer callable from C code, from 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

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.

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

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.

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

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.

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

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.