gi-gsk-4.0.8: Gsk bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
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.

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.

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

-> CSize

nPts: The number of points

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

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

op: The operation

-> Point

pts: The points of the operation

-> CSize

nPts: The number of points

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

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

op: The operation

-> Point

pts: The points of the operation

-> CSize

nPts: The number of points

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