#if !defined(__HADDOCK_VERSION__)
#define ENABLE_OVERLOADING
#endif
module GI.Gsk.Callbacks
(
C_ParseErrorFunc ,
ParseErrorFunc ,
ParseErrorFunc_WithClosures ,
drop_closures_ParseErrorFunc ,
dynamic_ParseErrorFunc ,
genClosure_ParseErrorFunc ,
mk_ParseErrorFunc ,
noParseErrorFunc ,
noParseErrorFunc_WithClosures ,
wrap_ParseErrorFunc ,
C_PathForeachFunc ,
PathForeachFunc ,
PathForeachFunc_WithClosures ,
drop_closures_PathForeachFunc ,
dynamic_PathForeachFunc ,
genClosure_PathForeachFunc ,
mk_PathForeachFunc ,
noPathForeachFunc ,
noPathForeachFunc_WithClosures ,
wrap_PathForeachFunc ,
C_PathIntersectionFunc ,
PathIntersectionFunc ,
PathIntersectionFunc_WithClosures ,
drop_closures_PathIntersectionFunc ,
dynamic_PathIntersectionFunc ,
genClosure_PathIntersectionFunc ,
mk_PathIntersectionFunc ,
noPathIntersectionFunc ,
noPathIntersectionFunc_WithClosures ,
wrap_PathIntersectionFunc ,
C_RenderReplayFontFilter ,
RenderReplayFontFilter ,
RenderReplayFontFilter_WithClosures ,
drop_closures_RenderReplayFontFilter ,
dynamic_RenderReplayFontFilter ,
genClosure_RenderReplayFontFilter ,
mk_RenderReplayFontFilter ,
noRenderReplayFontFilter ,
noRenderReplayFontFilter_WithClosures ,
wrap_RenderReplayFontFilter ,
C_RenderReplayNodeFilter ,
RenderReplayNodeFilter ,
RenderReplayNodeFilter_WithClosures ,
drop_closures_RenderReplayNodeFilter ,
dynamic_RenderReplayNodeFilter ,
genClosure_RenderReplayNodeFilter ,
mk_RenderReplayNodeFilter ,
noRenderReplayNodeFilter ,
noRenderReplayNodeFilter_WithClosures ,
wrap_RenderReplayNodeFilter ,
C_RenderReplayNodeForeach ,
RenderReplayNodeForeach ,
RenderReplayNodeForeach_WithClosures ,
drop_closures_RenderReplayNodeForeach ,
dynamic_RenderReplayNodeForeach ,
genClosure_RenderReplayNodeForeach ,
mk_RenderReplayNodeForeach ,
noRenderReplayNodeForeach ,
noRenderReplayNodeForeach_WithClosures ,
wrap_RenderReplayNodeForeach ,
C_RenderReplayTextureFilter ,
RenderReplayTextureFilter ,
RenderReplayTextureFilter_WithClosures ,
drop_closures_RenderReplayTextureFilter ,
dynamic_RenderReplayTextureFilter ,
genClosure_RenderReplayTextureFilter ,
mk_RenderReplayTextureFilter ,
noRenderReplayTextureFilter ,
noRenderReplayTextureFilter_WithClosures,
wrap_RenderReplayTextureFilter ,
) where
import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P
import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.BasicTypes as B.Types
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GArray as B.GArray
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GHashTable as B.GHT
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Control.Monad.IO.Class as MIO
import qualified Data.Coerce as Coerce
import qualified Data.Text as T
import qualified Data.Kind as DK
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GHC.Records as R
import qualified Data.Word as DW
import qualified Data.Int as DI
import qualified System.Posix.Types as SPT
import qualified Foreign.C.Types as FCT
#if MIN_VERSION_base(4,18,0)
import qualified GI.Cairo.Structs.Context as Cairo.Context
import qualified GI.GLib.Callbacks as GLib.Callbacks
import qualified GI.GLib.Structs.Bytes as GLib.Bytes
import qualified GI.GLib.Structs.String as GLib.String
import qualified GI.Gdk.Objects.Texture as Gdk.Texture
import qualified GI.Graphene.Structs.Point as Graphene.Point
import qualified GI.Graphene.Structs.Rect as Graphene.Rect
import qualified GI.Graphene.Structs.Vec2 as Graphene.Vec2
import {-# SOURCE #-} qualified GI.Gsk.Enums as Gsk.Enums
import {-# SOURCE #-} qualified GI.Gsk.Flags as Gsk.Flags
import {-# SOURCE #-} qualified GI.Gsk.Objects.RenderNode as Gsk.RenderNode
import {-# SOURCE #-} qualified GI.Gsk.Structs.ParseLocation as Gsk.ParseLocation
import {-# SOURCE #-} qualified GI.Gsk.Structs.Path as Gsk.Path
import {-# SOURCE #-} qualified GI.Gsk.Structs.PathMeasure as Gsk.PathMeasure
import {-# SOURCE #-} qualified GI.Gsk.Structs.PathPoint as Gsk.PathPoint
import {-# SOURCE #-} qualified GI.Gsk.Structs.RenderReplay as Gsk.RenderReplay
import {-# SOURCE #-} qualified GI.Gsk.Structs.Stroke as Gsk.Stroke
import qualified GI.Pango.Objects.Font as Pango.Font
#else
import qualified GI.Gdk.Objects.Texture as Gdk.Texture
import qualified GI.Graphene.Structs.Point as Graphene.Point
import {-# SOURCE #-} qualified GI.Gsk.Enums as Gsk.Enums
import {-# SOURCE #-} qualified GI.Gsk.Objects.RenderNode as Gsk.RenderNode
import {-# SOURCE #-} qualified GI.Gsk.Structs.ParseLocation as Gsk.ParseLocation
import {-# SOURCE #-} qualified GI.Gsk.Structs.Path as Gsk.Path
import {-# SOURCE #-} qualified GI.Gsk.Structs.PathPoint as Gsk.PathPoint
import {-# SOURCE #-} qualified GI.Gsk.Structs.RenderReplay as Gsk.RenderReplay
import qualified GI.Pango.Objects.Font as Pango.Font
#endif
type C_RenderReplayTextureFilter =
Ptr Gsk.RenderReplay.RenderReplay ->
Ptr Gdk.Texture.Texture ->
Ptr () ->
IO (Ptr Gdk.Texture.Texture)
foreign import ccall "dynamic" __dynamic_C_RenderReplayTextureFilter :: FunPtr C_RenderReplayTextureFilter -> C_RenderReplayTextureFilter
dynamic_RenderReplayTextureFilter ::
(B.CallStack.HasCallStack, MonadIO m, Gdk.Texture.IsTexture a) =>
FunPtr C_RenderReplayTextureFilter
-> Gsk.RenderReplay.RenderReplay
-> a
-> Ptr ()
-> m Gdk.Texture.Texture
dynamic_RenderReplayTextureFilter :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTexture a) =>
FunPtr C_RenderReplayTextureFilter
-> RenderReplay -> a -> Ptr () -> m Texture
dynamic_RenderReplayTextureFilter FunPtr C_RenderReplayTextureFilter
__funPtr RenderReplay
replay a
texture Ptr ()
userData = IO Texture -> m Texture
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Texture -> m Texture) -> IO Texture -> m Texture
forall a b. (a -> b) -> a -> b
$ do
replay' <- RenderReplay -> IO (Ptr RenderReplay)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr RenderReplay
replay
texture' <- unsafeManagedPtrCastPtr texture
result <- (__dynamic_C_RenderReplayTextureFilter __funPtr) replay' texture' userData
checkUnexpectedReturnNULL "renderReplayTextureFilter" result
result' <- (wrapObject Gdk.Texture.Texture) result
touchManagedPtr replay
touchManagedPtr texture
return result'
foreign import ccall "wrapper"
mk_RenderReplayTextureFilter :: C_RenderReplayTextureFilter -> IO (FunPtr C_RenderReplayTextureFilter)
type RenderReplayTextureFilter =
Gsk.RenderReplay.RenderReplay
-> Gdk.Texture.Texture
-> IO Gdk.Texture.Texture
noRenderReplayTextureFilter :: Maybe RenderReplayTextureFilter
noRenderReplayTextureFilter :: Maybe RenderReplayTextureFilter
noRenderReplayTextureFilter = Maybe RenderReplayTextureFilter
forall a. Maybe a
Nothing
type RenderReplayTextureFilter_WithClosures =
Gsk.RenderReplay.RenderReplay
-> Gdk.Texture.Texture
-> Ptr ()
-> IO Gdk.Texture.Texture
noRenderReplayTextureFilter_WithClosures :: Maybe RenderReplayTextureFilter_WithClosures
noRenderReplayTextureFilter_WithClosures :: Maybe RenderReplayTextureFilter_WithClosures
noRenderReplayTextureFilter_WithClosures = Maybe RenderReplayTextureFilter_WithClosures
forall a. Maybe a
Nothing
drop_closures_RenderReplayTextureFilter :: RenderReplayTextureFilter -> RenderReplayTextureFilter_WithClosures
drop_closures_RenderReplayTextureFilter :: RenderReplayTextureFilter -> RenderReplayTextureFilter_WithClosures
drop_closures_RenderReplayTextureFilter RenderReplayTextureFilter
_f RenderReplay
replay Texture
texture Ptr ()
_ = RenderReplayTextureFilter
_f RenderReplay
replay Texture
texture
genClosure_RenderReplayTextureFilter :: MonadIO m => RenderReplayTextureFilter -> m (GClosure C_RenderReplayTextureFilter)
genClosure_RenderReplayTextureFilter :: forall (m :: * -> *).
MonadIO m =>
RenderReplayTextureFilter
-> m (GClosure C_RenderReplayTextureFilter)
genClosure_RenderReplayTextureFilter RenderReplayTextureFilter
cb = IO (GClosure C_RenderReplayTextureFilter)
-> m (GClosure C_RenderReplayTextureFilter)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_RenderReplayTextureFilter)
-> m (GClosure C_RenderReplayTextureFilter))
-> IO (GClosure C_RenderReplayTextureFilter)
-> m (GClosure C_RenderReplayTextureFilter)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: RenderReplayTextureFilter_WithClosures
cb' = RenderReplayTextureFilter -> RenderReplayTextureFilter_WithClosures
drop_closures_RenderReplayTextureFilter RenderReplayTextureFilter
cb
let cb'' :: C_RenderReplayTextureFilter
cb'' = Maybe (Ptr (FunPtr C_RenderReplayTextureFilter))
-> RenderReplayTextureFilter_WithClosures
-> C_RenderReplayTextureFilter
wrap_RenderReplayTextureFilter Maybe (Ptr (FunPtr C_RenderReplayTextureFilter))
forall a. Maybe a
Nothing RenderReplayTextureFilter_WithClosures
cb'
C_RenderReplayTextureFilter
-> IO (FunPtr C_RenderReplayTextureFilter)
mk_RenderReplayTextureFilter C_RenderReplayTextureFilter
cb'' IO (FunPtr C_RenderReplayTextureFilter)
-> (FunPtr C_RenderReplayTextureFilter
-> IO (GClosure C_RenderReplayTextureFilter))
-> IO (GClosure C_RenderReplayTextureFilter)
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_RenderReplayTextureFilter
-> IO (GClosure C_RenderReplayTextureFilter)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_RenderReplayTextureFilter ::
Maybe (Ptr (FunPtr C_RenderReplayTextureFilter)) ->
RenderReplayTextureFilter_WithClosures ->
C_RenderReplayTextureFilter
wrap_RenderReplayTextureFilter :: Maybe (Ptr (FunPtr C_RenderReplayTextureFilter))
-> RenderReplayTextureFilter_WithClosures
-> C_RenderReplayTextureFilter
wrap_RenderReplayTextureFilter Maybe (Ptr (FunPtr C_RenderReplayTextureFilter))
gi'funptrptr RenderReplayTextureFilter_WithClosures
gi'cb Ptr RenderReplay
replay Ptr Texture
texture Ptr ()
userData = do
replay' <- ((ManagedPtr RenderReplay -> RenderReplay)
-> Ptr RenderReplay -> IO RenderReplay
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr RenderReplay -> RenderReplay
Gsk.RenderReplay.RenderReplay) Ptr RenderReplay
replay
texture' <- (newObject Gdk.Texture.Texture) texture
result <- gi'cb replay' texture' userData
maybeReleaseFunPtr gi'funptrptr
result' <- B.ManagedPtr.disownObject result
return result'
type C_RenderReplayNodeForeach =
Ptr Gsk.RenderReplay.RenderReplay ->
Ptr Gsk.RenderNode.RenderNode ->
Ptr () ->
IO CInt
foreign import ccall "dynamic" __dynamic_C_RenderReplayNodeForeach :: FunPtr C_RenderReplayNodeForeach -> C_RenderReplayNodeForeach
dynamic_RenderReplayNodeForeach ::
(B.CallStack.HasCallStack, MonadIO m, Gsk.RenderNode.IsRenderNode a) =>
FunPtr C_RenderReplayNodeForeach
-> Gsk.RenderReplay.RenderReplay
-> a
-> Ptr ()
-> m Bool
dynamic_RenderReplayNodeForeach :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRenderNode a) =>
FunPtr C_RenderReplayNodeForeach
-> RenderReplay -> a -> Ptr () -> m Bool
dynamic_RenderReplayNodeForeach FunPtr C_RenderReplayNodeForeach
__funPtr RenderReplay
replay a
node Ptr ()
userData = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
replay' <- RenderReplay -> IO (Ptr RenderReplay)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr RenderReplay
replay
node' <- unsafeManagedPtrCastPtr node
result <- (__dynamic_C_RenderReplayNodeForeach __funPtr) replay' node' userData
let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
touchManagedPtr replay
touchManagedPtr node
return result'
foreign import ccall "wrapper"
mk_RenderReplayNodeForeach :: C_RenderReplayNodeForeach -> IO (FunPtr C_RenderReplayNodeForeach)
type RenderReplayNodeForeach =
Gsk.RenderReplay.RenderReplay
-> Gsk.RenderNode.RenderNode
-> IO Bool
noRenderReplayNodeForeach :: Maybe RenderReplayNodeForeach
noRenderReplayNodeForeach :: Maybe RenderReplayNodeForeach
noRenderReplayNodeForeach = Maybe RenderReplayNodeForeach
forall a. Maybe a
Nothing
type RenderReplayNodeForeach_WithClosures =
Gsk.RenderReplay.RenderReplay
-> Gsk.RenderNode.RenderNode
-> Ptr ()
-> IO Bool
noRenderReplayNodeForeach_WithClosures :: Maybe RenderReplayNodeForeach_WithClosures
noRenderReplayNodeForeach_WithClosures :: Maybe RenderReplayNodeForeach_WithClosures
noRenderReplayNodeForeach_WithClosures = Maybe RenderReplayNodeForeach_WithClosures
forall a. Maybe a
Nothing
drop_closures_RenderReplayNodeForeach :: RenderReplayNodeForeach -> RenderReplayNodeForeach_WithClosures
drop_closures_RenderReplayNodeForeach :: RenderReplayNodeForeach -> RenderReplayNodeForeach_WithClosures
drop_closures_RenderReplayNodeForeach RenderReplayNodeForeach
_f RenderReplay
replay RenderNode
node Ptr ()
_ = RenderReplayNodeForeach
_f RenderReplay
replay RenderNode
node
genClosure_RenderReplayNodeForeach :: MonadIO m => RenderReplayNodeForeach -> m (GClosure C_RenderReplayNodeForeach)
genClosure_RenderReplayNodeForeach :: forall (m :: * -> *).
MonadIO m =>
RenderReplayNodeForeach -> m (GClosure C_RenderReplayNodeForeach)
genClosure_RenderReplayNodeForeach RenderReplayNodeForeach
cb = IO (GClosure C_RenderReplayNodeForeach)
-> m (GClosure C_RenderReplayNodeForeach)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_RenderReplayNodeForeach)
-> m (GClosure C_RenderReplayNodeForeach))
-> IO (GClosure C_RenderReplayNodeForeach)
-> m (GClosure C_RenderReplayNodeForeach)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: RenderReplayNodeForeach_WithClosures
cb' = RenderReplayNodeForeach -> RenderReplayNodeForeach_WithClosures
drop_closures_RenderReplayNodeForeach RenderReplayNodeForeach
cb
let cb'' :: C_RenderReplayNodeForeach
cb'' = Maybe (Ptr (FunPtr C_RenderReplayNodeForeach))
-> RenderReplayNodeForeach_WithClosures
-> C_RenderReplayNodeForeach
wrap_RenderReplayNodeForeach Maybe (Ptr (FunPtr C_RenderReplayNodeForeach))
forall a. Maybe a
Nothing RenderReplayNodeForeach_WithClosures
cb'
C_RenderReplayNodeForeach -> IO (FunPtr C_RenderReplayNodeForeach)
mk_RenderReplayNodeForeach C_RenderReplayNodeForeach
cb'' IO (FunPtr C_RenderReplayNodeForeach)
-> (FunPtr C_RenderReplayNodeForeach
-> IO (GClosure C_RenderReplayNodeForeach))
-> IO (GClosure C_RenderReplayNodeForeach)
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_RenderReplayNodeForeach
-> IO (GClosure C_RenderReplayNodeForeach)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_RenderReplayNodeForeach ::
Maybe (Ptr (FunPtr C_RenderReplayNodeForeach)) ->
RenderReplayNodeForeach_WithClosures ->
C_RenderReplayNodeForeach
wrap_RenderReplayNodeForeach :: Maybe (Ptr (FunPtr C_RenderReplayNodeForeach))
-> RenderReplayNodeForeach_WithClosures
-> C_RenderReplayNodeForeach
wrap_RenderReplayNodeForeach Maybe (Ptr (FunPtr C_RenderReplayNodeForeach))
gi'funptrptr RenderReplayNodeForeach_WithClosures
gi'cb Ptr RenderReplay
replay Ptr RenderNode
node Ptr ()
userData = do
replay' <- ((ManagedPtr RenderReplay -> RenderReplay)
-> Ptr RenderReplay -> IO RenderReplay
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr RenderReplay -> RenderReplay
Gsk.RenderReplay.RenderReplay) Ptr RenderReplay
replay
node' <- (newPtr Gsk.RenderNode.RenderNode) node
result <- gi'cb replay' node' userData
maybeReleaseFunPtr gi'funptrptr
let result' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
P.fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
P.fromEnum) Bool
result
return result'
type C_RenderReplayNodeFilter =
Ptr Gsk.RenderReplay.RenderReplay ->
Ptr Gsk.RenderNode.RenderNode ->
Ptr () ->
IO (Ptr Gsk.RenderNode.RenderNode)
foreign import ccall "dynamic" __dynamic_C_RenderReplayNodeFilter :: FunPtr C_RenderReplayNodeFilter -> C_RenderReplayNodeFilter
dynamic_RenderReplayNodeFilter ::
(B.CallStack.HasCallStack, MonadIO m, Gsk.RenderNode.IsRenderNode a) =>
FunPtr C_RenderReplayNodeFilter
-> Gsk.RenderReplay.RenderReplay
-> a
-> Ptr ()
-> m (Maybe Gsk.RenderNode.RenderNode)
dynamic_RenderReplayNodeFilter :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsRenderNode a) =>
FunPtr C_RenderReplayNodeFilter
-> RenderReplay -> a -> Ptr () -> m (Maybe RenderNode)
dynamic_RenderReplayNodeFilter FunPtr C_RenderReplayNodeFilter
__funPtr RenderReplay
replay a
node Ptr ()
userData = IO (Maybe RenderNode) -> m (Maybe RenderNode)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe RenderNode) -> m (Maybe RenderNode))
-> IO (Maybe RenderNode) -> m (Maybe RenderNode)
forall a b. (a -> b) -> a -> b
$ do
replay' <- RenderReplay -> IO (Ptr RenderReplay)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr RenderReplay
replay
node' <- unsafeManagedPtrCastPtr node
result <- (__dynamic_C_RenderReplayNodeFilter __funPtr) replay' node' userData
maybeResult <- convertIfNonNull result $ \Ptr RenderNode
result' -> do
result'' <- ((ManagedPtr RenderNode -> RenderNode)
-> Ptr RenderNode -> IO RenderNode
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapPtr ManagedPtr RenderNode -> RenderNode
Gsk.RenderNode.RenderNode) Ptr RenderNode
result'
return result''
touchManagedPtr replay
touchManagedPtr node
return maybeResult
foreign import ccall "wrapper"
mk_RenderReplayNodeFilter :: C_RenderReplayNodeFilter -> IO (FunPtr C_RenderReplayNodeFilter)
type RenderReplayNodeFilter =
Gsk.RenderReplay.RenderReplay
-> Gsk.RenderNode.RenderNode
-> IO (Maybe Gsk.RenderNode.RenderNode)
noRenderReplayNodeFilter :: Maybe RenderReplayNodeFilter
noRenderReplayNodeFilter :: Maybe RenderReplayNodeFilter
noRenderReplayNodeFilter = Maybe RenderReplayNodeFilter
forall a. Maybe a
Nothing
type RenderReplayNodeFilter_WithClosures =
Gsk.RenderReplay.RenderReplay
-> Gsk.RenderNode.RenderNode
-> Ptr ()
-> IO (Maybe Gsk.RenderNode.RenderNode)
noRenderReplayNodeFilter_WithClosures :: Maybe RenderReplayNodeFilter_WithClosures
noRenderReplayNodeFilter_WithClosures :: Maybe RenderReplayNodeFilter_WithClosures
noRenderReplayNodeFilter_WithClosures = Maybe RenderReplayNodeFilter_WithClosures
forall a. Maybe a
Nothing
drop_closures_RenderReplayNodeFilter :: RenderReplayNodeFilter -> RenderReplayNodeFilter_WithClosures
drop_closures_RenderReplayNodeFilter :: RenderReplayNodeFilter -> RenderReplayNodeFilter_WithClosures
drop_closures_RenderReplayNodeFilter RenderReplayNodeFilter
_f RenderReplay
replay RenderNode
node Ptr ()
_ = RenderReplayNodeFilter
_f RenderReplay
replay RenderNode
node
genClosure_RenderReplayNodeFilter :: MonadIO m => RenderReplayNodeFilter -> m (GClosure C_RenderReplayNodeFilter)
genClosure_RenderReplayNodeFilter :: forall (m :: * -> *).
MonadIO m =>
RenderReplayNodeFilter -> m (GClosure C_RenderReplayNodeFilter)
genClosure_RenderReplayNodeFilter RenderReplayNodeFilter
cb = IO (GClosure C_RenderReplayNodeFilter)
-> m (GClosure C_RenderReplayNodeFilter)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_RenderReplayNodeFilter)
-> m (GClosure C_RenderReplayNodeFilter))
-> IO (GClosure C_RenderReplayNodeFilter)
-> m (GClosure C_RenderReplayNodeFilter)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: RenderReplayNodeFilter_WithClosures
cb' = RenderReplayNodeFilter -> RenderReplayNodeFilter_WithClosures
drop_closures_RenderReplayNodeFilter RenderReplayNodeFilter
cb
let cb'' :: C_RenderReplayNodeFilter
cb'' = Maybe (Ptr (FunPtr C_RenderReplayNodeFilter))
-> RenderReplayNodeFilter_WithClosures -> C_RenderReplayNodeFilter
wrap_RenderReplayNodeFilter Maybe (Ptr (FunPtr C_RenderReplayNodeFilter))
forall a. Maybe a
Nothing RenderReplayNodeFilter_WithClosures
cb'
C_RenderReplayNodeFilter -> IO (FunPtr C_RenderReplayNodeFilter)
mk_RenderReplayNodeFilter C_RenderReplayNodeFilter
cb'' IO (FunPtr C_RenderReplayNodeFilter)
-> (FunPtr C_RenderReplayNodeFilter
-> IO (GClosure C_RenderReplayNodeFilter))
-> IO (GClosure C_RenderReplayNodeFilter)
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_RenderReplayNodeFilter
-> IO (GClosure C_RenderReplayNodeFilter)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_RenderReplayNodeFilter ::
Maybe (Ptr (FunPtr C_RenderReplayNodeFilter)) ->
RenderReplayNodeFilter_WithClosures ->
C_RenderReplayNodeFilter
wrap_RenderReplayNodeFilter :: Maybe (Ptr (FunPtr C_RenderReplayNodeFilter))
-> RenderReplayNodeFilter_WithClosures -> C_RenderReplayNodeFilter
wrap_RenderReplayNodeFilter Maybe (Ptr (FunPtr C_RenderReplayNodeFilter))
gi'funptrptr RenderReplayNodeFilter_WithClosures
gi'cb Ptr RenderReplay
replay Ptr RenderNode
node Ptr ()
userData = do
replay' <- ((ManagedPtr RenderReplay -> RenderReplay)
-> Ptr RenderReplay -> IO RenderReplay
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr RenderReplay -> RenderReplay
Gsk.RenderReplay.RenderReplay) Ptr RenderReplay
replay
node' <- (newPtr Gsk.RenderNode.RenderNode) node
result <- gi'cb replay' node' userData
maybeReleaseFunPtr gi'funptrptr
maybeM FP.nullPtr result $ \RenderNode
result' -> do
result'' <- RenderNode -> IO (Ptr RenderNode)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
B.ManagedPtr.disownManagedPtr RenderNode
result'
return result''
type C_RenderReplayFontFilter =
Ptr Gsk.RenderReplay.RenderReplay ->
Ptr Pango.Font.Font ->
Ptr () ->
IO (Ptr Pango.Font.Font)
foreign import ccall "dynamic" __dynamic_C_RenderReplayFontFilter :: FunPtr C_RenderReplayFontFilter -> C_RenderReplayFontFilter
dynamic_RenderReplayFontFilter ::
(B.CallStack.HasCallStack, MonadIO m, Pango.Font.IsFont a) =>
FunPtr C_RenderReplayFontFilter
-> Gsk.RenderReplay.RenderReplay
-> a
-> Ptr ()
-> m Pango.Font.Font
dynamic_RenderReplayFontFilter :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsFont a) =>
FunPtr C_RenderReplayFontFilter
-> RenderReplay -> a -> Ptr () -> m Font
dynamic_RenderReplayFontFilter FunPtr C_RenderReplayFontFilter
__funPtr RenderReplay
replay a
font Ptr ()
userData = IO Font -> m Font
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Font -> m Font) -> IO Font -> m Font
forall a b. (a -> b) -> a -> b
$ do
replay' <- RenderReplay -> IO (Ptr RenderReplay)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr RenderReplay
replay
font' <- unsafeManagedPtrCastPtr font
result <- (__dynamic_C_RenderReplayFontFilter __funPtr) replay' font' userData
checkUnexpectedReturnNULL "renderReplayFontFilter" result
result' <- (wrapObject Pango.Font.Font) result
touchManagedPtr replay
touchManagedPtr font
return result'
foreign import ccall "wrapper"
mk_RenderReplayFontFilter :: C_RenderReplayFontFilter -> IO (FunPtr C_RenderReplayFontFilter)
type RenderReplayFontFilter =
Gsk.RenderReplay.RenderReplay
-> Pango.Font.Font
-> IO Pango.Font.Font
noRenderReplayFontFilter :: Maybe RenderReplayFontFilter
noRenderReplayFontFilter :: Maybe RenderReplayFontFilter
noRenderReplayFontFilter = Maybe RenderReplayFontFilter
forall a. Maybe a
Nothing
type RenderReplayFontFilter_WithClosures =
Gsk.RenderReplay.RenderReplay
-> Pango.Font.Font
-> Ptr ()
-> IO Pango.Font.Font
noRenderReplayFontFilter_WithClosures :: Maybe RenderReplayFontFilter_WithClosures
noRenderReplayFontFilter_WithClosures :: Maybe RenderReplayFontFilter_WithClosures
noRenderReplayFontFilter_WithClosures = Maybe RenderReplayFontFilter_WithClosures
forall a. Maybe a
Nothing
drop_closures_RenderReplayFontFilter :: RenderReplayFontFilter -> RenderReplayFontFilter_WithClosures
drop_closures_RenderReplayFontFilter :: RenderReplayFontFilter -> RenderReplayFontFilter_WithClosures
drop_closures_RenderReplayFontFilter RenderReplayFontFilter
_f RenderReplay
replay Font
font Ptr ()
_ = RenderReplayFontFilter
_f RenderReplay
replay Font
font
genClosure_RenderReplayFontFilter :: MonadIO m => RenderReplayFontFilter -> m (GClosure C_RenderReplayFontFilter)
genClosure_RenderReplayFontFilter :: forall (m :: * -> *).
MonadIO m =>
RenderReplayFontFilter -> m (GClosure C_RenderReplayFontFilter)
genClosure_RenderReplayFontFilter RenderReplayFontFilter
cb = IO (GClosure C_RenderReplayFontFilter)
-> m (GClosure C_RenderReplayFontFilter)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_RenderReplayFontFilter)
-> m (GClosure C_RenderReplayFontFilter))
-> IO (GClosure C_RenderReplayFontFilter)
-> m (GClosure C_RenderReplayFontFilter)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: RenderReplayFontFilter_WithClosures
cb' = RenderReplayFontFilter -> RenderReplayFontFilter_WithClosures
drop_closures_RenderReplayFontFilter RenderReplayFontFilter
cb
let cb'' :: C_RenderReplayFontFilter
cb'' = Maybe (Ptr (FunPtr C_RenderReplayFontFilter))
-> RenderReplayFontFilter_WithClosures -> C_RenderReplayFontFilter
wrap_RenderReplayFontFilter Maybe (Ptr (FunPtr C_RenderReplayFontFilter))
forall a. Maybe a
Nothing RenderReplayFontFilter_WithClosures
cb'
C_RenderReplayFontFilter -> IO (FunPtr C_RenderReplayFontFilter)
mk_RenderReplayFontFilter C_RenderReplayFontFilter
cb'' IO (FunPtr C_RenderReplayFontFilter)
-> (FunPtr C_RenderReplayFontFilter
-> IO (GClosure C_RenderReplayFontFilter))
-> IO (GClosure C_RenderReplayFontFilter)
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_RenderReplayFontFilter
-> IO (GClosure C_RenderReplayFontFilter)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_RenderReplayFontFilter ::
Maybe (Ptr (FunPtr C_RenderReplayFontFilter)) ->
RenderReplayFontFilter_WithClosures ->
C_RenderReplayFontFilter
wrap_RenderReplayFontFilter :: Maybe (Ptr (FunPtr C_RenderReplayFontFilter))
-> RenderReplayFontFilter_WithClosures -> C_RenderReplayFontFilter
wrap_RenderReplayFontFilter Maybe (Ptr (FunPtr C_RenderReplayFontFilter))
gi'funptrptr RenderReplayFontFilter_WithClosures
gi'cb Ptr RenderReplay
replay Ptr Font
font Ptr ()
userData = do
replay' <- ((ManagedPtr RenderReplay -> RenderReplay)
-> Ptr RenderReplay -> IO RenderReplay
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr RenderReplay -> RenderReplay
Gsk.RenderReplay.RenderReplay) Ptr RenderReplay
replay
font' <- (newObject Pango.Font.Font) font
result <- gi'cb replay' font' userData
maybeReleaseFunPtr gi'funptrptr
result' <- B.ManagedPtr.disownObject result
return result'
type C_PathIntersectionFunc =
Ptr Gsk.Path.Path ->
Ptr Gsk.PathPoint.PathPoint ->
Ptr Gsk.Path.Path ->
Ptr Gsk.PathPoint.PathPoint ->
CUInt ->
Ptr () ->
IO CInt
foreign import ccall "dynamic" __dynamic_C_PathIntersectionFunc :: FunPtr C_PathIntersectionFunc -> C_PathIntersectionFunc
dynamic_PathIntersectionFunc ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_PathIntersectionFunc
-> Gsk.Path.Path
-> Gsk.PathPoint.PathPoint
-> Gsk.Path.Path
-> Gsk.PathPoint.PathPoint
-> Gsk.Enums.PathIntersection
-> Ptr ()
-> m Bool
dynamic_PathIntersectionFunc :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_PathIntersectionFunc
-> Path
-> PathPoint
-> Path
-> PathPoint
-> PathIntersection
-> Ptr ()
-> m Bool
dynamic_PathIntersectionFunc FunPtr C_PathIntersectionFunc
__funPtr Path
path1 PathPoint
point1 Path
path2 PathPoint
point2 PathIntersection
kind Ptr ()
userData = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
path1' <- Path -> IO (Ptr Path)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Path
path1
point1' <- unsafeManagedPtrGetPtr point1
path2' <- unsafeManagedPtrGetPtr path2
point2' <- unsafeManagedPtrGetPtr point2
let kind' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt)
-> (PathIntersection -> Int) -> PathIntersection -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. PathIntersection -> Int
forall a. Enum a => a -> Int
fromEnum) PathIntersection
kind
result <- (__dynamic_C_PathIntersectionFunc __funPtr) path1' point1' path2' point2' kind' userData
let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
touchManagedPtr path1
touchManagedPtr point1
touchManagedPtr path2
touchManagedPtr point2
return result'
foreign import ccall "wrapper"
mk_PathIntersectionFunc :: C_PathIntersectionFunc -> IO (FunPtr C_PathIntersectionFunc)
type PathIntersectionFunc =
Gsk.Path.Path
-> Gsk.PathPoint.PathPoint
-> Gsk.Path.Path
-> Gsk.PathPoint.PathPoint
-> Gsk.Enums.PathIntersection
-> IO Bool
noPathIntersectionFunc :: Maybe PathIntersectionFunc
noPathIntersectionFunc :: Maybe PathIntersectionFunc
noPathIntersectionFunc = Maybe PathIntersectionFunc
forall a. Maybe a
Nothing
type PathIntersectionFunc_WithClosures =
Gsk.Path.Path
-> Gsk.PathPoint.PathPoint
-> Gsk.Path.Path
-> Gsk.PathPoint.PathPoint
-> Gsk.Enums.PathIntersection
-> Ptr ()
-> IO Bool
noPathIntersectionFunc_WithClosures :: Maybe PathIntersectionFunc_WithClosures
noPathIntersectionFunc_WithClosures :: Maybe PathIntersectionFunc_WithClosures
noPathIntersectionFunc_WithClosures = Maybe PathIntersectionFunc_WithClosures
forall a. Maybe a
Nothing
drop_closures_PathIntersectionFunc :: PathIntersectionFunc -> PathIntersectionFunc_WithClosures
drop_closures_PathIntersectionFunc :: PathIntersectionFunc -> PathIntersectionFunc_WithClosures
drop_closures_PathIntersectionFunc PathIntersectionFunc
_f Path
path1 PathPoint
point1 Path
path2 PathPoint
point2 PathIntersection
kind Ptr ()
_ = PathIntersectionFunc
_f Path
path1 PathPoint
point1 Path
path2 PathPoint
point2 PathIntersection
kind
genClosure_PathIntersectionFunc :: MonadIO m => PathIntersectionFunc -> m (GClosure C_PathIntersectionFunc)
genClosure_PathIntersectionFunc :: forall (m :: * -> *).
MonadIO m =>
PathIntersectionFunc -> m (GClosure C_PathIntersectionFunc)
genClosure_PathIntersectionFunc PathIntersectionFunc
cb = IO (GClosure C_PathIntersectionFunc)
-> m (GClosure C_PathIntersectionFunc)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_PathIntersectionFunc)
-> m (GClosure C_PathIntersectionFunc))
-> IO (GClosure C_PathIntersectionFunc)
-> m (GClosure C_PathIntersectionFunc)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: PathIntersectionFunc_WithClosures
cb' = PathIntersectionFunc -> PathIntersectionFunc_WithClosures
drop_closures_PathIntersectionFunc PathIntersectionFunc
cb
let cb'' :: C_PathIntersectionFunc
cb'' = Maybe (Ptr (FunPtr C_PathIntersectionFunc))
-> PathIntersectionFunc_WithClosures -> C_PathIntersectionFunc
wrap_PathIntersectionFunc Maybe (Ptr (FunPtr C_PathIntersectionFunc))
forall a. Maybe a
Nothing PathIntersectionFunc_WithClosures
cb'
C_PathIntersectionFunc -> IO (FunPtr C_PathIntersectionFunc)
mk_PathIntersectionFunc C_PathIntersectionFunc
cb'' IO (FunPtr C_PathIntersectionFunc)
-> (FunPtr C_PathIntersectionFunc
-> IO (GClosure C_PathIntersectionFunc))
-> IO (GClosure C_PathIntersectionFunc)
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_PathIntersectionFunc
-> IO (GClosure C_PathIntersectionFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_PathIntersectionFunc ::
Maybe (Ptr (FunPtr C_PathIntersectionFunc)) ->
PathIntersectionFunc_WithClosures ->
C_PathIntersectionFunc
wrap_PathIntersectionFunc :: Maybe (Ptr (FunPtr C_PathIntersectionFunc))
-> PathIntersectionFunc_WithClosures -> C_PathIntersectionFunc
wrap_PathIntersectionFunc Maybe (Ptr (FunPtr C_PathIntersectionFunc))
gi'funptrptr PathIntersectionFunc_WithClosures
gi'cb Ptr Path
path1 Ptr PathPoint
point1 Ptr Path
path2 Ptr PathPoint
point2 CUInt
kind Ptr ()
userData = do
Ptr Path -> (Path -> IO CInt) -> IO CInt
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr Path
path1 ((Path -> IO CInt) -> IO CInt) -> (Path -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Path
path1' -> do
Ptr PathPoint -> (PathPoint -> IO CInt) -> IO CInt
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr PathPoint
point1 ((PathPoint -> IO CInt) -> IO CInt)
-> (PathPoint -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \PathPoint
point1' -> do
Ptr Path -> (Path -> IO CInt) -> IO CInt
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr Path
path2 ((Path -> IO CInt) -> IO CInt) -> (Path -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Path
path2' -> do
Ptr PathPoint -> (PathPoint -> IO CInt) -> IO CInt
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr PathPoint
point2 ((PathPoint -> IO CInt) -> IO CInt)
-> (PathPoint -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \PathPoint
point2' -> do
let kind' :: PathIntersection
kind' = (Int -> PathIntersection
forall a. Enum a => Int -> a
toEnum (Int -> PathIntersection)
-> (CUInt -> Int) -> CUInt -> PathIntersection
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
kind
result <- PathIntersectionFunc_WithClosures
gi'cb Path
path1' PathPoint
point1' Path
path2' PathPoint
point2' PathIntersection
kind' Ptr ()
userData
maybeReleaseFunPtr gi'funptrptr
let result' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
P.fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
P.fromEnum) Bool
result
return result'
type C_PathForeachFunc =
CUInt ->
Ptr Graphene.Point.Point ->
FCT.CSize ->
CFloat ->
Ptr () ->
IO CInt
foreign import ccall "dynamic" __dynamic_C_PathForeachFunc :: FunPtr C_PathForeachFunc -> C_PathForeachFunc
dynamic_PathForeachFunc ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_PathForeachFunc
-> Gsk.Enums.PathOperation
-> [Graphene.Point.Point]
-> Float
-> Ptr ()
-> m Bool
dynamic_PathForeachFunc :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_PathForeachFunc
-> PathOperation -> [Point] -> Float -> Ptr () -> m Bool
dynamic_PathForeachFunc FunPtr C_PathForeachFunc
__funPtr PathOperation
op [Point]
pts Float
weight Ptr ()
userData = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
let nPts :: CSize
nPts = Int -> CSize
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CSize) -> Int -> CSize
forall a b. (a -> b) -> a -> b
$ [Point] -> Int
forall a. [a] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
P.length [Point]
pts
let op' :: CUInt
op' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (PathOperation -> Int) -> PathOperation -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. PathOperation -> Int
forall a. Enum a => a -> Int
fromEnum) PathOperation
op
pts' <- (Point -> IO (Ptr Point)) -> [Point] -> IO [Ptr Point]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
forall (m :: * -> *) a b. Monad m => (a -> m b) -> [a] -> m [b]
mapM Point -> IO (Ptr Point)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr [Point]
pts
pts'' <- packBlockArray 8 pts'
let weight' = Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
weight
result <- (__dynamic_C_PathForeachFunc __funPtr) op' pts'' nPts weight' userData
let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
mapM_ touchManagedPtr pts
freeMem pts''
return result'
foreign import ccall "wrapper"
mk_PathForeachFunc :: C_PathForeachFunc -> IO (FunPtr C_PathForeachFunc)
type PathForeachFunc =
Gsk.Enums.PathOperation
-> [Graphene.Point.Point]
-> Float
-> IO Bool
noPathForeachFunc :: Maybe PathForeachFunc
noPathForeachFunc :: Maybe PathForeachFunc
noPathForeachFunc = Maybe PathForeachFunc
forall a. Maybe a
Nothing
type PathForeachFunc_WithClosures =
Gsk.Enums.PathOperation
-> [Graphene.Point.Point]
-> Float
-> Ptr ()
-> IO Bool
noPathForeachFunc_WithClosures :: Maybe PathForeachFunc_WithClosures
noPathForeachFunc_WithClosures :: Maybe PathForeachFunc_WithClosures
noPathForeachFunc_WithClosures = Maybe PathForeachFunc_WithClosures
forall a. Maybe a
Nothing
drop_closures_PathForeachFunc :: PathForeachFunc -> PathForeachFunc_WithClosures
drop_closures_PathForeachFunc :: PathForeachFunc -> PathForeachFunc_WithClosures
drop_closures_PathForeachFunc PathForeachFunc
_f PathOperation
op [Point]
pts Float
weight Ptr ()
_ = PathForeachFunc
_f PathOperation
op [Point]
pts Float
weight
genClosure_PathForeachFunc :: MonadIO m => PathForeachFunc -> m (GClosure C_PathForeachFunc)
genClosure_PathForeachFunc :: forall (m :: * -> *).
MonadIO m =>
PathForeachFunc -> m (GClosure C_PathForeachFunc)
genClosure_PathForeachFunc PathForeachFunc
cb = IO (GClosure C_PathForeachFunc) -> m (GClosure C_PathForeachFunc)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_PathForeachFunc) -> m (GClosure C_PathForeachFunc))
-> IO (GClosure C_PathForeachFunc)
-> m (GClosure C_PathForeachFunc)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: PathForeachFunc_WithClosures
cb' = PathForeachFunc -> PathForeachFunc_WithClosures
drop_closures_PathForeachFunc PathForeachFunc
cb
let cb'' :: C_PathForeachFunc
cb'' = Maybe (Ptr (FunPtr C_PathForeachFunc))
-> PathForeachFunc_WithClosures -> C_PathForeachFunc
wrap_PathForeachFunc Maybe (Ptr (FunPtr C_PathForeachFunc))
forall a. Maybe a
Nothing PathForeachFunc_WithClosures
cb'
C_PathForeachFunc -> IO (FunPtr C_PathForeachFunc)
mk_PathForeachFunc C_PathForeachFunc
cb'' IO (FunPtr C_PathForeachFunc)
-> (FunPtr C_PathForeachFunc -> IO (GClosure C_PathForeachFunc))
-> IO (GClosure C_PathForeachFunc)
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_PathForeachFunc -> IO (GClosure C_PathForeachFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_PathForeachFunc ::
Maybe (Ptr (FunPtr C_PathForeachFunc)) ->
PathForeachFunc_WithClosures ->
C_PathForeachFunc
wrap_PathForeachFunc :: Maybe (Ptr (FunPtr C_PathForeachFunc))
-> PathForeachFunc_WithClosures -> C_PathForeachFunc
wrap_PathForeachFunc Maybe (Ptr (FunPtr C_PathForeachFunc))
gi'funptrptr PathForeachFunc_WithClosures
gi'cb CUInt
op Ptr Point
pts CSize
nPts CFloat
weight Ptr ()
userData = do
let op' :: PathOperation
op' = (Int -> PathOperation
forall a. Enum a => Int -> a
toEnum (Int -> PathOperation) -> (CUInt -> Int) -> CUInt -> PathOperation
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
op
pts' <- (Int -> CSize -> Ptr Point -> IO [Ptr Point]
forall a b.
(Integral a, GBoxed b) =>
Int -> a -> Ptr b -> IO [Ptr b]
unpackBoxedArrayWithLength Int
8 CSize
nPts) Ptr Point
pts
pts'' <- mapM (newBoxed Graphene.Point.Point) pts'
let weight' = CFloat -> Float
forall a b. (Real a, Fractional b) => a -> b
realToFrac CFloat
weight
result <- gi'cb op' pts'' weight' userData
maybeReleaseFunPtr gi'funptrptr
let result' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
P.fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
P.fromEnum) Bool
result
return result'
type C_ParseErrorFunc =
Ptr Gsk.ParseLocation.ParseLocation ->
Ptr Gsk.ParseLocation.ParseLocation ->
Ptr GError ->
Ptr () ->
IO ()
foreign import ccall "dynamic" __dynamic_C_ParseErrorFunc :: FunPtr C_ParseErrorFunc -> C_ParseErrorFunc
dynamic_ParseErrorFunc ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_ParseErrorFunc
-> Gsk.ParseLocation.ParseLocation
-> Gsk.ParseLocation.ParseLocation
-> GError
-> Ptr ()
-> m ()
dynamic_ParseErrorFunc :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_ParseErrorFunc
-> ParseLocation -> ParseLocation -> GError -> Ptr () -> m ()
dynamic_ParseErrorFunc FunPtr C_ParseErrorFunc
__funPtr ParseLocation
start ParseLocation
end GError
error_ Ptr ()
userData = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
start' <- ParseLocation -> IO (Ptr ParseLocation)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr ParseLocation
start
end' <- unsafeManagedPtrGetPtr end
error_' <- unsafeManagedPtrGetPtr error_
(__dynamic_C_ParseErrorFunc __funPtr) start' end' error_' userData
touchManagedPtr start
touchManagedPtr end
touchManagedPtr error_
return ()
foreign import ccall "wrapper"
mk_ParseErrorFunc :: C_ParseErrorFunc -> IO (FunPtr C_ParseErrorFunc)
type ParseErrorFunc =
Gsk.ParseLocation.ParseLocation
-> Gsk.ParseLocation.ParseLocation
-> GError
-> IO ()
noParseErrorFunc :: Maybe ParseErrorFunc
noParseErrorFunc :: Maybe ParseErrorFunc
noParseErrorFunc = Maybe ParseErrorFunc
forall a. Maybe a
Nothing
type ParseErrorFunc_WithClosures =
Gsk.ParseLocation.ParseLocation
-> Gsk.ParseLocation.ParseLocation
-> GError
-> Ptr ()
-> IO ()
noParseErrorFunc_WithClosures :: Maybe ParseErrorFunc_WithClosures
noParseErrorFunc_WithClosures :: Maybe ParseErrorFunc_WithClosures
noParseErrorFunc_WithClosures = Maybe ParseErrorFunc_WithClosures
forall a. Maybe a
Nothing
drop_closures_ParseErrorFunc :: ParseErrorFunc -> ParseErrorFunc_WithClosures
drop_closures_ParseErrorFunc :: ParseErrorFunc -> ParseErrorFunc_WithClosures
drop_closures_ParseErrorFunc ParseErrorFunc
_f ParseLocation
start ParseLocation
end GError
error_ Ptr ()
_ = ParseErrorFunc
_f ParseLocation
start ParseLocation
end GError
error_
genClosure_ParseErrorFunc :: MonadIO m => ParseErrorFunc -> m (GClosure C_ParseErrorFunc)
genClosure_ParseErrorFunc :: forall (m :: * -> *).
MonadIO m =>
ParseErrorFunc -> m (GClosure C_ParseErrorFunc)
genClosure_ParseErrorFunc ParseErrorFunc
cb = IO (GClosure C_ParseErrorFunc) -> m (GClosure C_ParseErrorFunc)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_ParseErrorFunc) -> m (GClosure C_ParseErrorFunc))
-> IO (GClosure C_ParseErrorFunc) -> m (GClosure C_ParseErrorFunc)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: ParseErrorFunc_WithClosures
cb' = ParseErrorFunc -> ParseErrorFunc_WithClosures
drop_closures_ParseErrorFunc ParseErrorFunc
cb
let cb'' :: C_ParseErrorFunc
cb'' = Maybe (Ptr (FunPtr C_ParseErrorFunc))
-> ParseErrorFunc_WithClosures -> C_ParseErrorFunc
wrap_ParseErrorFunc Maybe (Ptr (FunPtr C_ParseErrorFunc))
forall a. Maybe a
Nothing ParseErrorFunc_WithClosures
cb'
C_ParseErrorFunc -> IO (FunPtr C_ParseErrorFunc)
mk_ParseErrorFunc C_ParseErrorFunc
cb'' IO (FunPtr C_ParseErrorFunc)
-> (FunPtr C_ParseErrorFunc -> IO (GClosure C_ParseErrorFunc))
-> IO (GClosure C_ParseErrorFunc)
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_ParseErrorFunc -> IO (GClosure C_ParseErrorFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_ParseErrorFunc ::
Maybe (Ptr (FunPtr C_ParseErrorFunc)) ->
ParseErrorFunc_WithClosures ->
C_ParseErrorFunc
wrap_ParseErrorFunc :: Maybe (Ptr (FunPtr C_ParseErrorFunc))
-> ParseErrorFunc_WithClosures -> C_ParseErrorFunc
wrap_ParseErrorFunc Maybe (Ptr (FunPtr C_ParseErrorFunc))
gi'funptrptr ParseErrorFunc_WithClosures
gi'cb Ptr ParseLocation
start Ptr ParseLocation
end Ptr GError
error_ Ptr ()
userData = do
start' <- ((ManagedPtr ParseLocation -> ParseLocation)
-> Ptr ParseLocation -> IO ParseLocation
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr ParseLocation -> ParseLocation
Gsk.ParseLocation.ParseLocation) Ptr ParseLocation
start
end' <- (newPtr Gsk.ParseLocation.ParseLocation) end
error_' <- (newBoxed GError) error_
gi'cb start' end' error_' userData
maybeReleaseFunPtr gi'funptrptr