#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.GdkPixbuf.Callbacks
(
C_PixbufDestroyNotify ,
PixbufDestroyNotify ,
PixbufDestroyNotify_WithClosures ,
drop_closures_PixbufDestroyNotify ,
dynamic_PixbufDestroyNotify ,
genClosure_PixbufDestroyNotify ,
mk_PixbufDestroyNotify ,
noPixbufDestroyNotify ,
noPixbufDestroyNotify_WithClosures ,
wrap_PixbufDestroyNotify ,
C_PixbufModuleFillInfoFunc ,
PixbufModuleFillInfoFunc ,
dynamic_PixbufModuleFillInfoFunc ,
genClosure_PixbufModuleFillInfoFunc ,
mk_PixbufModuleFillInfoFunc ,
noPixbufModuleFillInfoFunc ,
wrap_PixbufModuleFillInfoFunc ,
C_PixbufModuleFillVtableFunc ,
PixbufModuleFillVtableFunc ,
dynamic_PixbufModuleFillVtableFunc ,
genClosure_PixbufModuleFillVtableFunc ,
mk_PixbufModuleFillVtableFunc ,
noPixbufModuleFillVtableFunc ,
wrap_PixbufModuleFillVtableFunc ,
C_PixbufModuleIncrementLoadFunc ,
PixbufModuleIncrementLoadFunc ,
dynamic_PixbufModuleIncrementLoadFunc ,
mk_PixbufModuleIncrementLoadFunc ,
noPixbufModuleIncrementLoadFunc ,
C_PixbufModuleLoadAnimationFunc ,
PixbufModuleLoadAnimationFunc ,
dynamic_PixbufModuleLoadAnimationFunc ,
mk_PixbufModuleLoadAnimationFunc ,
noPixbufModuleLoadAnimationFunc ,
C_PixbufModuleLoadFunc ,
PixbufModuleLoadFunc ,
dynamic_PixbufModuleLoadFunc ,
mk_PixbufModuleLoadFunc ,
noPixbufModuleLoadFunc ,
C_PixbufModuleLoadXpmDataFunc ,
PixbufModuleLoadXpmDataFunc ,
dynamic_PixbufModuleLoadXpmDataFunc ,
genClosure_PixbufModuleLoadXpmDataFunc ,
mk_PixbufModuleLoadXpmDataFunc ,
noPixbufModuleLoadXpmDataFunc ,
wrap_PixbufModuleLoadXpmDataFunc ,
C_PixbufModulePreparedFunc ,
PixbufModulePreparedFunc ,
PixbufModulePreparedFunc_WithClosures ,
drop_closures_PixbufModulePreparedFunc ,
dynamic_PixbufModulePreparedFunc ,
genClosure_PixbufModulePreparedFunc ,
mk_PixbufModulePreparedFunc ,
noPixbufModulePreparedFunc ,
noPixbufModulePreparedFunc_WithClosures ,
wrap_PixbufModulePreparedFunc ,
C_PixbufModuleSaveFunc ,
PixbufModuleSaveFunc ,
dynamic_PixbufModuleSaveFunc ,
mk_PixbufModuleSaveFunc ,
noPixbufModuleSaveFunc ,
C_PixbufModuleSaveOptionSupportedFunc ,
PixbufModuleSaveOptionSupportedFunc ,
dynamic_PixbufModuleSaveOptionSupportedFunc,
genClosure_PixbufModuleSaveOptionSupportedFunc,
mk_PixbufModuleSaveOptionSupportedFunc ,
noPixbufModuleSaveOptionSupportedFunc ,
wrap_PixbufModuleSaveOptionSupportedFunc,
C_PixbufModuleSizeFunc ,
PixbufModuleSizeFunc ,
PixbufModuleSizeFunc_WithClosures ,
drop_closures_PixbufModuleSizeFunc ,
dynamic_PixbufModuleSizeFunc ,
genClosure_PixbufModuleSizeFunc ,
mk_PixbufModuleSizeFunc ,
noPixbufModuleSizeFunc ,
noPixbufModuleSizeFunc_WithClosures ,
wrap_PixbufModuleSizeFunc ,
C_PixbufModuleStopLoadFunc ,
PixbufModuleStopLoadFunc ,
dynamic_PixbufModuleStopLoadFunc ,
mk_PixbufModuleStopLoadFunc ,
noPixbufModuleStopLoadFunc ,
C_PixbufModuleUpdatedFunc ,
PixbufModuleUpdatedFunc ,
PixbufModuleUpdatedFunc_WithClosures ,
drop_closures_PixbufModuleUpdatedFunc ,
dynamic_PixbufModuleUpdatedFunc ,
genClosure_PixbufModuleUpdatedFunc ,
mk_PixbufModuleUpdatedFunc ,
noPixbufModuleUpdatedFunc ,
noPixbufModuleUpdatedFunc_WithClosures ,
wrap_PixbufModuleUpdatedFunc ,
C_PixbufSaveFunc ,
PixbufSaveFunc ,
PixbufSaveFunc_WithClosures ,
drop_closures_PixbufSaveFunc ,
dynamic_PixbufSaveFunc ,
genClosure_PixbufSaveFunc ,
mk_PixbufSaveFunc ,
noPixbufSaveFunc ,
noPixbufSaveFunc_WithClosures ,
wrap_PixbufSaveFunc ,
) 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 {-# SOURCE #-} qualified GI.GdkPixbuf.Objects.Pixbuf as GdkPixbuf.Pixbuf
import {-# SOURCE #-} qualified GI.GdkPixbuf.Objects.PixbufAnimation as GdkPixbuf.PixbufAnimation
import {-# SOURCE #-} qualified GI.GdkPixbuf.Structs.PixbufFormat as GdkPixbuf.PixbufFormat
import {-# SOURCE #-} qualified GI.GdkPixbuf.Structs.PixbufModule as GdkPixbuf.PixbufModule
type C_PixbufSaveFunc =
Ptr Word8 ->
Word64 ->
Ptr (Ptr GError) ->
Ptr () ->
IO CInt
foreign import ccall "dynamic" __dynamic_C_PixbufSaveFunc :: FunPtr C_PixbufSaveFunc -> C_PixbufSaveFunc
dynamic_PixbufSaveFunc ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_PixbufSaveFunc
-> ByteString
-> Ptr ()
-> m ((Bool, GError))
dynamic_PixbufSaveFunc :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_PixbufSaveFunc -> ByteString -> Ptr () -> m (Bool, GError)
dynamic_PixbufSaveFunc FunPtr C_PixbufSaveFunc
__funPtr ByteString
buf Ptr ()
data_ = IO (Bool, GError) -> m (Bool, GError)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Bool, GError) -> m (Bool, GError))
-> IO (Bool, GError) -> m (Bool, GError)
forall a b. (a -> b) -> a -> b
$ do
let count :: Word64
count = Int -> Word64
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> Word64) -> Int -> Word64
forall a b. (a -> b) -> a -> b
$ ByteString -> Int
B.length ByteString
buf
Ptr Word8
buf' <- ByteString -> IO (Ptr Word8)
packByteString ByteString
buf
Ptr (Ptr GError)
error_ <- IO (Ptr (Ptr GError))
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (Ptr GError))
CInt
result <- (FunPtr C_PixbufSaveFunc -> C_PixbufSaveFunc
__dynamic_C_PixbufSaveFunc FunPtr C_PixbufSaveFunc
__funPtr) Ptr Word8
buf' Word64
count Ptr (Ptr GError)
error_ Ptr ()
data_
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
Ptr GError
error_' <- Ptr (Ptr GError) -> IO (Ptr GError)
forall a. Storable a => Ptr a -> IO a
peek Ptr (Ptr GError)
error_
GError
error_'' <- ((ManagedPtr GError -> GError) -> Ptr GError -> IO GError
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr GError -> GError
GError) Ptr GError
error_'
Ptr Word8 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word8
buf'
Ptr (Ptr GError) -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr GError)
error_
(Bool, GError) -> IO (Bool, GError)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return (Bool
result', GError
error_'')
foreign import ccall "wrapper"
mk_PixbufSaveFunc :: C_PixbufSaveFunc -> IO (FunPtr C_PixbufSaveFunc)
type PixbufSaveFunc =
ByteString
-> IO ((Bool, GError))
noPixbufSaveFunc :: Maybe PixbufSaveFunc
noPixbufSaveFunc :: Maybe PixbufSaveFunc
noPixbufSaveFunc = Maybe PixbufSaveFunc
forall a. Maybe a
Nothing
type PixbufSaveFunc_WithClosures =
ByteString
-> Ptr ()
-> IO ((Bool, GError))
noPixbufSaveFunc_WithClosures :: Maybe PixbufSaveFunc_WithClosures
noPixbufSaveFunc_WithClosures :: Maybe PixbufSaveFunc_WithClosures
noPixbufSaveFunc_WithClosures = Maybe PixbufSaveFunc_WithClosures
forall a. Maybe a
Nothing
drop_closures_PixbufSaveFunc :: PixbufSaveFunc -> PixbufSaveFunc_WithClosures
drop_closures_PixbufSaveFunc :: PixbufSaveFunc -> PixbufSaveFunc_WithClosures
drop_closures_PixbufSaveFunc PixbufSaveFunc
_f ByteString
buf Ptr ()
_ = PixbufSaveFunc
_f ByteString
buf
genClosure_PixbufSaveFunc :: MonadIO m => PixbufSaveFunc -> m (GClosure C_PixbufSaveFunc)
genClosure_PixbufSaveFunc :: forall (m :: * -> *).
MonadIO m =>
PixbufSaveFunc -> m (GClosure C_PixbufSaveFunc)
genClosure_PixbufSaveFunc PixbufSaveFunc
cb = IO (GClosure C_PixbufSaveFunc) -> m (GClosure C_PixbufSaveFunc)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_PixbufSaveFunc) -> m (GClosure C_PixbufSaveFunc))
-> IO (GClosure C_PixbufSaveFunc) -> m (GClosure C_PixbufSaveFunc)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: PixbufSaveFunc_WithClosures
cb' = PixbufSaveFunc -> PixbufSaveFunc_WithClosures
drop_closures_PixbufSaveFunc PixbufSaveFunc
cb
let cb'' :: C_PixbufSaveFunc
cb'' = Maybe (Ptr (FunPtr C_PixbufSaveFunc))
-> PixbufSaveFunc_WithClosures -> C_PixbufSaveFunc
wrap_PixbufSaveFunc Maybe (Ptr (FunPtr C_PixbufSaveFunc))
forall a. Maybe a
Nothing PixbufSaveFunc_WithClosures
cb'
C_PixbufSaveFunc -> IO (FunPtr C_PixbufSaveFunc)
mk_PixbufSaveFunc C_PixbufSaveFunc
cb'' IO (FunPtr C_PixbufSaveFunc)
-> (FunPtr C_PixbufSaveFunc -> IO (GClosure C_PixbufSaveFunc))
-> IO (GClosure C_PixbufSaveFunc)
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_PixbufSaveFunc -> IO (GClosure C_PixbufSaveFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_PixbufSaveFunc ::
Maybe (Ptr (FunPtr C_PixbufSaveFunc)) ->
PixbufSaveFunc_WithClosures ->
C_PixbufSaveFunc
wrap_PixbufSaveFunc :: Maybe (Ptr (FunPtr C_PixbufSaveFunc))
-> PixbufSaveFunc_WithClosures -> C_PixbufSaveFunc
wrap_PixbufSaveFunc Maybe (Ptr (FunPtr C_PixbufSaveFunc))
gi'funptrptr PixbufSaveFunc_WithClosures
gi'cb Ptr Word8
buf Word64
count Ptr (Ptr GError)
error_ Ptr ()
data_ = do
ByteString
buf' <- (Word64 -> Ptr Word8 -> IO ByteString
forall a. Integral a => a -> Ptr Word8 -> IO ByteString
unpackByteStringWithLength Word64
count) Ptr Word8
buf
(Bool
result, GError
outerror_) <- PixbufSaveFunc_WithClosures
gi'cb ByteString
buf' Ptr ()
data_
Ptr GError
outerror_' <- GError -> IO (Ptr GError)
forall a. (HasCallStack, GBoxed a) => a -> IO (Ptr a)
B.ManagedPtr.disownBoxed GError
outerror_
Ptr (Ptr GError) -> Ptr GError -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke Ptr (Ptr GError)
error_ Ptr GError
outerror_'
Maybe (Ptr (FunPtr C_PixbufSaveFunc)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_PixbufSaveFunc))
gi'funptrptr
let result' :: CInt
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
CInt -> IO CInt
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CInt
result'
type C_PixbufModuleUpdatedFunc =
Ptr GdkPixbuf.Pixbuf.Pixbuf ->
Int32 ->
Int32 ->
Int32 ->
Int32 ->
Ptr () ->
IO ()
foreign import ccall "dynamic" __dynamic_C_PixbufModuleUpdatedFunc :: FunPtr C_PixbufModuleUpdatedFunc -> C_PixbufModuleUpdatedFunc
dynamic_PixbufModuleUpdatedFunc ::
(B.CallStack.HasCallStack, MonadIO m, GdkPixbuf.Pixbuf.IsPixbuf a) =>
FunPtr C_PixbufModuleUpdatedFunc
-> a
-> Int32
-> Int32
-> Int32
-> Int32
-> Ptr ()
-> m ()
dynamic_PixbufModuleUpdatedFunc :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPixbuf a) =>
FunPtr C_PixbufModuleUpdatedFunc
-> a -> Int32 -> Int32 -> Int32 -> Int32 -> Ptr () -> m ()
dynamic_PixbufModuleUpdatedFunc FunPtr C_PixbufModuleUpdatedFunc
__funPtr a
pixbuf Int32
x Int32
y Int32
width Int32
height 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
Ptr Pixbuf
pixbuf' <- a -> IO (Ptr Pixbuf)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
pixbuf
(FunPtr C_PixbufModuleUpdatedFunc -> C_PixbufModuleUpdatedFunc
__dynamic_C_PixbufModuleUpdatedFunc FunPtr C_PixbufModuleUpdatedFunc
__funPtr) Ptr Pixbuf
pixbuf' Int32
x Int32
y Int32
width Int32
height Ptr ()
userData
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
pixbuf
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
foreign import ccall "wrapper"
mk_PixbufModuleUpdatedFunc :: C_PixbufModuleUpdatedFunc -> IO (FunPtr C_PixbufModuleUpdatedFunc)
type PixbufModuleUpdatedFunc =
GdkPixbuf.Pixbuf.Pixbuf
-> Int32
-> Int32
-> Int32
-> Int32
-> IO ()
noPixbufModuleUpdatedFunc :: Maybe PixbufModuleUpdatedFunc
noPixbufModuleUpdatedFunc :: Maybe PixbufModuleUpdatedFunc
noPixbufModuleUpdatedFunc = Maybe PixbufModuleUpdatedFunc
forall a. Maybe a
Nothing
type PixbufModuleUpdatedFunc_WithClosures =
GdkPixbuf.Pixbuf.Pixbuf
-> Int32
-> Int32
-> Int32
-> Int32
-> Ptr ()
-> IO ()
noPixbufModuleUpdatedFunc_WithClosures :: Maybe PixbufModuleUpdatedFunc_WithClosures
noPixbufModuleUpdatedFunc_WithClosures :: Maybe PixbufModuleUpdatedFunc_WithClosures
noPixbufModuleUpdatedFunc_WithClosures = Maybe PixbufModuleUpdatedFunc_WithClosures
forall a. Maybe a
Nothing
drop_closures_PixbufModuleUpdatedFunc :: PixbufModuleUpdatedFunc -> PixbufModuleUpdatedFunc_WithClosures
drop_closures_PixbufModuleUpdatedFunc :: PixbufModuleUpdatedFunc -> PixbufModuleUpdatedFunc_WithClosures
drop_closures_PixbufModuleUpdatedFunc PixbufModuleUpdatedFunc
_f Pixbuf
pixbuf Int32
x Int32
y Int32
width Int32
height Ptr ()
_ = PixbufModuleUpdatedFunc
_f Pixbuf
pixbuf Int32
x Int32
y Int32
width Int32
height
genClosure_PixbufModuleUpdatedFunc :: MonadIO m => PixbufModuleUpdatedFunc -> m (GClosure C_PixbufModuleUpdatedFunc)
genClosure_PixbufModuleUpdatedFunc :: forall (m :: * -> *).
MonadIO m =>
PixbufModuleUpdatedFunc -> m (GClosure C_PixbufModuleUpdatedFunc)
genClosure_PixbufModuleUpdatedFunc PixbufModuleUpdatedFunc
cb = IO (GClosure C_PixbufModuleUpdatedFunc)
-> m (GClosure C_PixbufModuleUpdatedFunc)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_PixbufModuleUpdatedFunc)
-> m (GClosure C_PixbufModuleUpdatedFunc))
-> IO (GClosure C_PixbufModuleUpdatedFunc)
-> m (GClosure C_PixbufModuleUpdatedFunc)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: PixbufModuleUpdatedFunc_WithClosures
cb' = PixbufModuleUpdatedFunc -> PixbufModuleUpdatedFunc_WithClosures
drop_closures_PixbufModuleUpdatedFunc PixbufModuleUpdatedFunc
cb
let cb'' :: C_PixbufModuleUpdatedFunc
cb'' = Maybe (Ptr (FunPtr C_PixbufModuleUpdatedFunc))
-> PixbufModuleUpdatedFunc_WithClosures
-> C_PixbufModuleUpdatedFunc
wrap_PixbufModuleUpdatedFunc Maybe (Ptr (FunPtr C_PixbufModuleUpdatedFunc))
forall a. Maybe a
Nothing PixbufModuleUpdatedFunc_WithClosures
cb'
C_PixbufModuleUpdatedFunc -> IO (FunPtr C_PixbufModuleUpdatedFunc)
mk_PixbufModuleUpdatedFunc C_PixbufModuleUpdatedFunc
cb'' IO (FunPtr C_PixbufModuleUpdatedFunc)
-> (FunPtr C_PixbufModuleUpdatedFunc
-> IO (GClosure C_PixbufModuleUpdatedFunc))
-> IO (GClosure C_PixbufModuleUpdatedFunc)
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_PixbufModuleUpdatedFunc
-> IO (GClosure C_PixbufModuleUpdatedFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_PixbufModuleUpdatedFunc ::
Maybe (Ptr (FunPtr C_PixbufModuleUpdatedFunc)) ->
PixbufModuleUpdatedFunc_WithClosures ->
C_PixbufModuleUpdatedFunc
wrap_PixbufModuleUpdatedFunc :: Maybe (Ptr (FunPtr C_PixbufModuleUpdatedFunc))
-> PixbufModuleUpdatedFunc_WithClosures
-> C_PixbufModuleUpdatedFunc
wrap_PixbufModuleUpdatedFunc Maybe (Ptr (FunPtr C_PixbufModuleUpdatedFunc))
gi'funptrptr PixbufModuleUpdatedFunc_WithClosures
gi'cb Ptr Pixbuf
pixbuf Int32
x Int32
y Int32
width Int32
height Ptr ()
userData = do
Pixbuf
pixbuf' <- ((ManagedPtr Pixbuf -> Pixbuf) -> Ptr Pixbuf -> IO Pixbuf
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Pixbuf -> Pixbuf
GdkPixbuf.Pixbuf.Pixbuf) Ptr Pixbuf
pixbuf
PixbufModuleUpdatedFunc_WithClosures
gi'cb Pixbuf
pixbuf' Int32
x Int32
y Int32
width Int32
height Ptr ()
userData
Maybe (Ptr (FunPtr C_PixbufModuleUpdatedFunc)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_PixbufModuleUpdatedFunc))
gi'funptrptr
type C_PixbufModuleStopLoadFunc =
Ptr () ->
Ptr (Ptr GError) ->
IO CInt
foreign import ccall "dynamic" __dynamic_C_PixbufModuleStopLoadFunc :: FunPtr C_PixbufModuleStopLoadFunc -> C_PixbufModuleStopLoadFunc
dynamic_PixbufModuleStopLoadFunc ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_PixbufModuleStopLoadFunc
-> Ptr ()
-> m ()
dynamic_PixbufModuleStopLoadFunc :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_PixbufModuleStopLoadFunc -> Ptr () -> m ()
dynamic_PixbufModuleStopLoadFunc FunPtr C_PixbufModuleStopLoadFunc
__funPtr Ptr ()
context = 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
IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ (FunPtr C_PixbufModuleStopLoadFunc -> C_PixbufModuleStopLoadFunc
__dynamic_C_PixbufModuleStopLoadFunc FunPtr C_PixbufModuleStopLoadFunc
__funPtr) Ptr ()
context
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
foreign import ccall "wrapper"
mk_PixbufModuleStopLoadFunc :: C_PixbufModuleStopLoadFunc -> IO (FunPtr C_PixbufModuleStopLoadFunc)
type PixbufModuleStopLoadFunc =
Ptr ()
-> IO ()
noPixbufModuleStopLoadFunc :: Maybe PixbufModuleStopLoadFunc
noPixbufModuleStopLoadFunc :: Maybe PixbufModuleStopLoadFunc
noPixbufModuleStopLoadFunc = Maybe PixbufModuleStopLoadFunc
forall a. Maybe a
Nothing
type C_PixbufModuleSizeFunc =
Int32 ->
Int32 ->
Ptr () ->
IO ()
foreign import ccall "dynamic" __dynamic_C_PixbufModuleSizeFunc :: FunPtr C_PixbufModuleSizeFunc -> C_PixbufModuleSizeFunc
dynamic_PixbufModuleSizeFunc ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_PixbufModuleSizeFunc
-> Int32
-> Int32
-> Ptr ()
-> m ()
dynamic_PixbufModuleSizeFunc :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_PixbufModuleSizeFunc -> Int32 -> Int32 -> Ptr () -> m ()
dynamic_PixbufModuleSizeFunc FunPtr C_PixbufModuleSizeFunc
__funPtr Int32
width Int32
height 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
(FunPtr C_PixbufModuleSizeFunc -> C_PixbufModuleSizeFunc
__dynamic_C_PixbufModuleSizeFunc FunPtr C_PixbufModuleSizeFunc
__funPtr) Int32
width Int32
height Ptr ()
userData
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
foreign import ccall "wrapper"
mk_PixbufModuleSizeFunc :: C_PixbufModuleSizeFunc -> IO (FunPtr C_PixbufModuleSizeFunc)
type PixbufModuleSizeFunc =
Int32
-> Int32
-> IO ()
noPixbufModuleSizeFunc :: Maybe PixbufModuleSizeFunc
noPixbufModuleSizeFunc :: Maybe PixbufModuleSizeFunc
noPixbufModuleSizeFunc = Maybe PixbufModuleSizeFunc
forall a. Maybe a
Nothing
type PixbufModuleSizeFunc_WithClosures =
Int32
-> Int32
-> Ptr ()
-> IO ()
noPixbufModuleSizeFunc_WithClosures :: Maybe PixbufModuleSizeFunc_WithClosures
noPixbufModuleSizeFunc_WithClosures :: Maybe C_PixbufModuleSizeFunc
noPixbufModuleSizeFunc_WithClosures = Maybe C_PixbufModuleSizeFunc
forall a. Maybe a
Nothing
drop_closures_PixbufModuleSizeFunc :: PixbufModuleSizeFunc -> PixbufModuleSizeFunc_WithClosures
drop_closures_PixbufModuleSizeFunc :: PixbufModuleSizeFunc -> C_PixbufModuleSizeFunc
drop_closures_PixbufModuleSizeFunc PixbufModuleSizeFunc
_f Int32
width Int32
height Ptr ()
_ = PixbufModuleSizeFunc
_f Int32
width Int32
height
genClosure_PixbufModuleSizeFunc :: MonadIO m => PixbufModuleSizeFunc -> m (GClosure C_PixbufModuleSizeFunc)
genClosure_PixbufModuleSizeFunc :: forall (m :: * -> *).
MonadIO m =>
PixbufModuleSizeFunc -> m (GClosure C_PixbufModuleSizeFunc)
genClosure_PixbufModuleSizeFunc PixbufModuleSizeFunc
cb = IO (GClosure C_PixbufModuleSizeFunc)
-> m (GClosure C_PixbufModuleSizeFunc)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_PixbufModuleSizeFunc)
-> m (GClosure C_PixbufModuleSizeFunc))
-> IO (GClosure C_PixbufModuleSizeFunc)
-> m (GClosure C_PixbufModuleSizeFunc)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_PixbufModuleSizeFunc
cb' = PixbufModuleSizeFunc -> C_PixbufModuleSizeFunc
drop_closures_PixbufModuleSizeFunc PixbufModuleSizeFunc
cb
let cb'' :: C_PixbufModuleSizeFunc
cb'' = Maybe (Ptr (FunPtr C_PixbufModuleSizeFunc))
-> C_PixbufModuleSizeFunc -> C_PixbufModuleSizeFunc
wrap_PixbufModuleSizeFunc Maybe (Ptr (FunPtr C_PixbufModuleSizeFunc))
forall a. Maybe a
Nothing C_PixbufModuleSizeFunc
cb'
C_PixbufModuleSizeFunc -> IO (FunPtr C_PixbufModuleSizeFunc)
mk_PixbufModuleSizeFunc C_PixbufModuleSizeFunc
cb'' IO (FunPtr C_PixbufModuleSizeFunc)
-> (FunPtr C_PixbufModuleSizeFunc
-> IO (GClosure C_PixbufModuleSizeFunc))
-> IO (GClosure C_PixbufModuleSizeFunc)
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_PixbufModuleSizeFunc
-> IO (GClosure C_PixbufModuleSizeFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_PixbufModuleSizeFunc ::
Maybe (Ptr (FunPtr C_PixbufModuleSizeFunc)) ->
PixbufModuleSizeFunc_WithClosures ->
C_PixbufModuleSizeFunc
wrap_PixbufModuleSizeFunc :: Maybe (Ptr (FunPtr C_PixbufModuleSizeFunc))
-> C_PixbufModuleSizeFunc -> C_PixbufModuleSizeFunc
wrap_PixbufModuleSizeFunc Maybe (Ptr (FunPtr C_PixbufModuleSizeFunc))
gi'funptrptr C_PixbufModuleSizeFunc
gi'cb Int32
width Int32
height Ptr ()
userData = do
C_PixbufModuleSizeFunc
gi'cb Int32
width Int32
height Ptr ()
userData
Maybe (Ptr (FunPtr C_PixbufModuleSizeFunc)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_PixbufModuleSizeFunc))
gi'funptrptr
type C_PixbufModuleSaveOptionSupportedFunc =
CString ->
IO CInt
foreign import ccall "dynamic" __dynamic_C_PixbufModuleSaveOptionSupportedFunc :: FunPtr C_PixbufModuleSaveOptionSupportedFunc -> C_PixbufModuleSaveOptionSupportedFunc
dynamic_PixbufModuleSaveOptionSupportedFunc ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_PixbufModuleSaveOptionSupportedFunc
-> T.Text
-> m Bool
dynamic_PixbufModuleSaveOptionSupportedFunc :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_PixbufModuleSaveOptionSupportedFunc -> Text -> m Bool
dynamic_PixbufModuleSaveOptionSupportedFunc FunPtr C_PixbufModuleSaveOptionSupportedFunc
__funPtr Text
optionKey = 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
CString
optionKey' <- Text -> IO CString
textToCString Text
optionKey
CInt
result <- (FunPtr C_PixbufModuleSaveOptionSupportedFunc
-> C_PixbufModuleSaveOptionSupportedFunc
__dynamic_C_PixbufModuleSaveOptionSupportedFunc FunPtr C_PixbufModuleSaveOptionSupportedFunc
__funPtr) CString
optionKey'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
optionKey'
Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
foreign import ccall "wrapper"
mk_PixbufModuleSaveOptionSupportedFunc :: C_PixbufModuleSaveOptionSupportedFunc -> IO (FunPtr C_PixbufModuleSaveOptionSupportedFunc)
type PixbufModuleSaveOptionSupportedFunc =
T.Text
-> IO Bool
noPixbufModuleSaveOptionSupportedFunc :: Maybe PixbufModuleSaveOptionSupportedFunc
noPixbufModuleSaveOptionSupportedFunc :: Maybe PixbufModuleSaveOptionSupportedFunc
noPixbufModuleSaveOptionSupportedFunc = Maybe PixbufModuleSaveOptionSupportedFunc
forall a. Maybe a
Nothing
genClosure_PixbufModuleSaveOptionSupportedFunc :: MonadIO m => PixbufModuleSaveOptionSupportedFunc -> m (GClosure C_PixbufModuleSaveOptionSupportedFunc)
genClosure_PixbufModuleSaveOptionSupportedFunc :: forall (m :: * -> *).
MonadIO m =>
PixbufModuleSaveOptionSupportedFunc
-> m (GClosure C_PixbufModuleSaveOptionSupportedFunc)
genClosure_PixbufModuleSaveOptionSupportedFunc PixbufModuleSaveOptionSupportedFunc
cb = IO (GClosure C_PixbufModuleSaveOptionSupportedFunc)
-> m (GClosure C_PixbufModuleSaveOptionSupportedFunc)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_PixbufModuleSaveOptionSupportedFunc)
-> m (GClosure C_PixbufModuleSaveOptionSupportedFunc))
-> IO (GClosure C_PixbufModuleSaveOptionSupportedFunc)
-> m (GClosure C_PixbufModuleSaveOptionSupportedFunc)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_PixbufModuleSaveOptionSupportedFunc
cb' = Maybe (Ptr (FunPtr C_PixbufModuleSaveOptionSupportedFunc))
-> PixbufModuleSaveOptionSupportedFunc
-> C_PixbufModuleSaveOptionSupportedFunc
wrap_PixbufModuleSaveOptionSupportedFunc Maybe (Ptr (FunPtr C_PixbufModuleSaveOptionSupportedFunc))
forall a. Maybe a
Nothing PixbufModuleSaveOptionSupportedFunc
cb
C_PixbufModuleSaveOptionSupportedFunc
-> IO (FunPtr C_PixbufModuleSaveOptionSupportedFunc)
mk_PixbufModuleSaveOptionSupportedFunc C_PixbufModuleSaveOptionSupportedFunc
cb' IO (FunPtr C_PixbufModuleSaveOptionSupportedFunc)
-> (FunPtr C_PixbufModuleSaveOptionSupportedFunc
-> IO (GClosure C_PixbufModuleSaveOptionSupportedFunc))
-> IO (GClosure C_PixbufModuleSaveOptionSupportedFunc)
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_PixbufModuleSaveOptionSupportedFunc
-> IO (GClosure C_PixbufModuleSaveOptionSupportedFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_PixbufModuleSaveOptionSupportedFunc ::
Maybe (Ptr (FunPtr C_PixbufModuleSaveOptionSupportedFunc)) ->
PixbufModuleSaveOptionSupportedFunc ->
C_PixbufModuleSaveOptionSupportedFunc
wrap_PixbufModuleSaveOptionSupportedFunc :: Maybe (Ptr (FunPtr C_PixbufModuleSaveOptionSupportedFunc))
-> PixbufModuleSaveOptionSupportedFunc
-> C_PixbufModuleSaveOptionSupportedFunc
wrap_PixbufModuleSaveOptionSupportedFunc Maybe (Ptr (FunPtr C_PixbufModuleSaveOptionSupportedFunc))
gi'funptrptr PixbufModuleSaveOptionSupportedFunc
gi'cb CString
optionKey = do
Text
optionKey' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
optionKey
Bool
result <- PixbufModuleSaveOptionSupportedFunc
gi'cb Text
optionKey'
Maybe (Ptr (FunPtr C_PixbufModuleSaveOptionSupportedFunc)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_PixbufModuleSaveOptionSupportedFunc))
gi'funptrptr
let result' :: CInt
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
CInt -> IO CInt
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CInt
result'
type C_PixbufModuleSaveFunc =
Ptr () ->
Ptr GdkPixbuf.Pixbuf.Pixbuf ->
Ptr CString ->
Ptr CString ->
Ptr (Ptr GError) ->
IO CInt
foreign import ccall "dynamic" __dynamic_C_PixbufModuleSaveFunc :: FunPtr C_PixbufModuleSaveFunc -> C_PixbufModuleSaveFunc
dynamic_PixbufModuleSaveFunc ::
(B.CallStack.HasCallStack, MonadIO m, GdkPixbuf.Pixbuf.IsPixbuf a) =>
FunPtr C_PixbufModuleSaveFunc
-> Ptr ()
-> a
-> Maybe ([T.Text])
-> Maybe ([T.Text])
-> m ()
dynamic_PixbufModuleSaveFunc :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPixbuf a) =>
FunPtr C_PixbufModuleSaveFunc
-> Ptr () -> a -> Maybe [Text] -> Maybe [Text] -> m ()
dynamic_PixbufModuleSaveFunc FunPtr C_PixbufModuleSaveFunc
__funPtr Ptr ()
f a
pixbuf Maybe [Text]
paramKeys Maybe [Text]
paramValues = 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
Ptr Pixbuf
pixbuf' <- a -> IO (Ptr Pixbuf)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
pixbuf
Ptr CString
maybeParamKeys <- case Maybe [Text]
paramKeys of
Maybe [Text]
Nothing -> Ptr CString -> IO (Ptr CString)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CString
forall a. Ptr a
nullPtr
Just [Text]
jParamKeys -> do
Ptr CString
jParamKeys' <- [Text] -> IO (Ptr CString)
packZeroTerminatedUTF8CArray [Text]
jParamKeys
Ptr CString -> IO (Ptr CString)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CString
jParamKeys'
Ptr CString
maybeParamValues <- case Maybe [Text]
paramValues of
Maybe [Text]
Nothing -> Ptr CString -> IO (Ptr CString)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CString
forall a. Ptr a
nullPtr
Just [Text]
jParamValues -> do
Ptr CString
jParamValues' <- [Text] -> IO (Ptr CString)
packZeroTerminatedUTF8CArray [Text]
jParamValues
Ptr CString -> IO (Ptr CString)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CString
jParamValues'
IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ (FunPtr C_PixbufModuleSaveFunc -> C_PixbufModuleSaveFunc
__dynamic_C_PixbufModuleSaveFunc FunPtr C_PixbufModuleSaveFunc
__funPtr) Ptr ()
f Ptr Pixbuf
pixbuf' Ptr CString
maybeParamKeys Ptr CString
maybeParamValues
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
pixbuf
(CString -> IO ()) -> Ptr CString -> IO ()
forall a b. (Ptr a -> IO b) -> Ptr (Ptr a) -> IO ()
mapZeroTerminatedCArray CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
maybeParamKeys
Ptr CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
maybeParamKeys
(CString -> IO ()) -> Ptr CString -> IO ()
forall a b. (Ptr a -> IO b) -> Ptr (Ptr a) -> IO ()
mapZeroTerminatedCArray CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
maybeParamValues
Ptr CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
maybeParamValues
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
(CString -> IO ()) -> Ptr CString -> IO ()
forall a b. (Ptr a -> IO b) -> Ptr (Ptr a) -> IO ()
mapZeroTerminatedCArray CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
maybeParamKeys
Ptr CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
maybeParamKeys
(CString -> IO ()) -> Ptr CString -> IO ()
forall a b. (Ptr a -> IO b) -> Ptr (Ptr a) -> IO ()
mapZeroTerminatedCArray CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
maybeParamValues
Ptr CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
maybeParamValues
)
foreign import ccall "wrapper"
mk_PixbufModuleSaveFunc :: C_PixbufModuleSaveFunc -> IO (FunPtr C_PixbufModuleSaveFunc)
type PixbufModuleSaveFunc =
Ptr ()
-> GdkPixbuf.Pixbuf.Pixbuf
-> Maybe [T.Text]
-> Maybe [T.Text]
-> IO ()
noPixbufModuleSaveFunc :: Maybe PixbufModuleSaveFunc
noPixbufModuleSaveFunc :: Maybe PixbufModuleSaveFunc
noPixbufModuleSaveFunc = Maybe PixbufModuleSaveFunc
forall a. Maybe a
Nothing
type C_PixbufModulePreparedFunc =
Ptr GdkPixbuf.Pixbuf.Pixbuf ->
Ptr GdkPixbuf.PixbufAnimation.PixbufAnimation ->
Ptr () ->
IO ()
foreign import ccall "dynamic" __dynamic_C_PixbufModulePreparedFunc :: FunPtr C_PixbufModulePreparedFunc -> C_PixbufModulePreparedFunc
dynamic_PixbufModulePreparedFunc ::
(B.CallStack.HasCallStack, MonadIO m, GdkPixbuf.Pixbuf.IsPixbuf a, GdkPixbuf.PixbufAnimation.IsPixbufAnimation b) =>
FunPtr C_PixbufModulePreparedFunc
-> a
-> b
-> Ptr ()
-> m ()
dynamic_PixbufModulePreparedFunc :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsPixbuf a, IsPixbufAnimation b) =>
FunPtr C_PixbufModulePreparedFunc -> a -> b -> Ptr () -> m ()
dynamic_PixbufModulePreparedFunc FunPtr C_PixbufModulePreparedFunc
__funPtr a
pixbuf b
anim 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
Ptr Pixbuf
pixbuf' <- a -> IO (Ptr Pixbuf)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
pixbuf
Ptr PixbufAnimation
anim' <- b -> IO (Ptr PixbufAnimation)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
anim
(FunPtr C_PixbufModulePreparedFunc -> C_PixbufModulePreparedFunc
__dynamic_C_PixbufModulePreparedFunc FunPtr C_PixbufModulePreparedFunc
__funPtr) Ptr Pixbuf
pixbuf' Ptr PixbufAnimation
anim' Ptr ()
userData
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
pixbuf
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
anim
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
foreign import ccall "wrapper"
mk_PixbufModulePreparedFunc :: C_PixbufModulePreparedFunc -> IO (FunPtr C_PixbufModulePreparedFunc)
type PixbufModulePreparedFunc =
GdkPixbuf.Pixbuf.Pixbuf
-> GdkPixbuf.PixbufAnimation.PixbufAnimation
-> IO ()
noPixbufModulePreparedFunc :: Maybe PixbufModulePreparedFunc
noPixbufModulePreparedFunc :: Maybe PixbufModulePreparedFunc
noPixbufModulePreparedFunc = Maybe PixbufModulePreparedFunc
forall a. Maybe a
Nothing
type PixbufModulePreparedFunc_WithClosures =
GdkPixbuf.Pixbuf.Pixbuf
-> GdkPixbuf.PixbufAnimation.PixbufAnimation
-> Ptr ()
-> IO ()
noPixbufModulePreparedFunc_WithClosures :: Maybe PixbufModulePreparedFunc_WithClosures
noPixbufModulePreparedFunc_WithClosures :: Maybe PixbufModulePreparedFunc_WithClosures
noPixbufModulePreparedFunc_WithClosures = Maybe PixbufModulePreparedFunc_WithClosures
forall a. Maybe a
Nothing
drop_closures_PixbufModulePreparedFunc :: PixbufModulePreparedFunc -> PixbufModulePreparedFunc_WithClosures
drop_closures_PixbufModulePreparedFunc :: PixbufModulePreparedFunc -> PixbufModulePreparedFunc_WithClosures
drop_closures_PixbufModulePreparedFunc PixbufModulePreparedFunc
_f Pixbuf
pixbuf PixbufAnimation
anim Ptr ()
_ = PixbufModulePreparedFunc
_f Pixbuf
pixbuf PixbufAnimation
anim
genClosure_PixbufModulePreparedFunc :: MonadIO m => PixbufModulePreparedFunc -> m (GClosure C_PixbufModulePreparedFunc)
genClosure_PixbufModulePreparedFunc :: forall (m :: * -> *).
MonadIO m =>
PixbufModulePreparedFunc -> m (GClosure C_PixbufModulePreparedFunc)
genClosure_PixbufModulePreparedFunc PixbufModulePreparedFunc
cb = IO (GClosure C_PixbufModulePreparedFunc)
-> m (GClosure C_PixbufModulePreparedFunc)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_PixbufModulePreparedFunc)
-> m (GClosure C_PixbufModulePreparedFunc))
-> IO (GClosure C_PixbufModulePreparedFunc)
-> m (GClosure C_PixbufModulePreparedFunc)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: PixbufModulePreparedFunc_WithClosures
cb' = PixbufModulePreparedFunc -> PixbufModulePreparedFunc_WithClosures
drop_closures_PixbufModulePreparedFunc PixbufModulePreparedFunc
cb
let cb'' :: C_PixbufModulePreparedFunc
cb'' = Maybe (Ptr (FunPtr C_PixbufModulePreparedFunc))
-> PixbufModulePreparedFunc_WithClosures
-> C_PixbufModulePreparedFunc
wrap_PixbufModulePreparedFunc Maybe (Ptr (FunPtr C_PixbufModulePreparedFunc))
forall a. Maybe a
Nothing PixbufModulePreparedFunc_WithClosures
cb'
C_PixbufModulePreparedFunc
-> IO (FunPtr C_PixbufModulePreparedFunc)
mk_PixbufModulePreparedFunc C_PixbufModulePreparedFunc
cb'' IO (FunPtr C_PixbufModulePreparedFunc)
-> (FunPtr C_PixbufModulePreparedFunc
-> IO (GClosure C_PixbufModulePreparedFunc))
-> IO (GClosure C_PixbufModulePreparedFunc)
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_PixbufModulePreparedFunc
-> IO (GClosure C_PixbufModulePreparedFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_PixbufModulePreparedFunc ::
Maybe (Ptr (FunPtr C_PixbufModulePreparedFunc)) ->
PixbufModulePreparedFunc_WithClosures ->
C_PixbufModulePreparedFunc
wrap_PixbufModulePreparedFunc :: Maybe (Ptr (FunPtr C_PixbufModulePreparedFunc))
-> PixbufModulePreparedFunc_WithClosures
-> C_PixbufModulePreparedFunc
wrap_PixbufModulePreparedFunc Maybe (Ptr (FunPtr C_PixbufModulePreparedFunc))
gi'funptrptr PixbufModulePreparedFunc_WithClosures
gi'cb Ptr Pixbuf
pixbuf Ptr PixbufAnimation
anim Ptr ()
userData = do
Pixbuf
pixbuf' <- ((ManagedPtr Pixbuf -> Pixbuf) -> Ptr Pixbuf -> IO Pixbuf
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Pixbuf -> Pixbuf
GdkPixbuf.Pixbuf.Pixbuf) Ptr Pixbuf
pixbuf
PixbufAnimation
anim' <- ((ManagedPtr PixbufAnimation -> PixbufAnimation)
-> Ptr PixbufAnimation -> IO PixbufAnimation
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr PixbufAnimation -> PixbufAnimation
GdkPixbuf.PixbufAnimation.PixbufAnimation) Ptr PixbufAnimation
anim
PixbufModulePreparedFunc_WithClosures
gi'cb Pixbuf
pixbuf' PixbufAnimation
anim' Ptr ()
userData
Maybe (Ptr (FunPtr C_PixbufModulePreparedFunc)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_PixbufModulePreparedFunc))
gi'funptrptr
type C_PixbufModuleLoadXpmDataFunc =
Ptr CString ->
IO (Ptr GdkPixbuf.Pixbuf.Pixbuf)
foreign import ccall "dynamic" __dynamic_C_PixbufModuleLoadXpmDataFunc :: FunPtr C_PixbufModuleLoadXpmDataFunc -> C_PixbufModuleLoadXpmDataFunc
dynamic_PixbufModuleLoadXpmDataFunc ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_PixbufModuleLoadXpmDataFunc
-> [T.Text]
-> m GdkPixbuf.Pixbuf.Pixbuf
dynamic_PixbufModuleLoadXpmDataFunc :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_PixbufModuleLoadXpmDataFunc -> [Text] -> m Pixbuf
dynamic_PixbufModuleLoadXpmDataFunc FunPtr C_PixbufModuleLoadXpmDataFunc
__funPtr [Text]
data_ = IO Pixbuf -> m Pixbuf
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Pixbuf -> m Pixbuf) -> IO Pixbuf -> m Pixbuf
forall a b. (a -> b) -> a -> b
$ do
Ptr CString
data_' <- [Text] -> IO (Ptr CString)
packZeroTerminatedUTF8CArray [Text]
data_
Ptr Pixbuf
result <- (FunPtr C_PixbufModuleLoadXpmDataFunc
-> C_PixbufModuleLoadXpmDataFunc
__dynamic_C_PixbufModuleLoadXpmDataFunc FunPtr C_PixbufModuleLoadXpmDataFunc
__funPtr) Ptr CString
data_'
Text -> Ptr Pixbuf -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"pixbufModuleLoadXpmDataFunc" Ptr Pixbuf
result
Pixbuf
result' <- ((ManagedPtr Pixbuf -> Pixbuf) -> Ptr Pixbuf -> IO Pixbuf
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Pixbuf -> Pixbuf
GdkPixbuf.Pixbuf.Pixbuf) Ptr Pixbuf
result
(CString -> IO ()) -> Ptr CString -> IO ()
forall a b. (Ptr a -> IO b) -> Ptr (Ptr a) -> IO ()
mapZeroTerminatedCArray CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
data_'
Ptr CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
data_'
Pixbuf -> IO Pixbuf
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Pixbuf
result'
foreign import ccall "wrapper"
mk_PixbufModuleLoadXpmDataFunc :: C_PixbufModuleLoadXpmDataFunc -> IO (FunPtr C_PixbufModuleLoadXpmDataFunc)
type PixbufModuleLoadXpmDataFunc =
[T.Text]
-> IO GdkPixbuf.Pixbuf.Pixbuf
noPixbufModuleLoadXpmDataFunc :: Maybe PixbufModuleLoadXpmDataFunc
noPixbufModuleLoadXpmDataFunc :: Maybe PixbufModuleLoadXpmDataFunc
noPixbufModuleLoadXpmDataFunc = Maybe PixbufModuleLoadXpmDataFunc
forall a. Maybe a
Nothing
genClosure_PixbufModuleLoadXpmDataFunc :: MonadIO m => PixbufModuleLoadXpmDataFunc -> m (GClosure C_PixbufModuleLoadXpmDataFunc)
genClosure_PixbufModuleLoadXpmDataFunc :: forall (m :: * -> *).
MonadIO m =>
PixbufModuleLoadXpmDataFunc
-> m (GClosure C_PixbufModuleLoadXpmDataFunc)
genClosure_PixbufModuleLoadXpmDataFunc PixbufModuleLoadXpmDataFunc
cb = IO (GClosure C_PixbufModuleLoadXpmDataFunc)
-> m (GClosure C_PixbufModuleLoadXpmDataFunc)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_PixbufModuleLoadXpmDataFunc)
-> m (GClosure C_PixbufModuleLoadXpmDataFunc))
-> IO (GClosure C_PixbufModuleLoadXpmDataFunc)
-> m (GClosure C_PixbufModuleLoadXpmDataFunc)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_PixbufModuleLoadXpmDataFunc
cb' = Maybe (Ptr (FunPtr C_PixbufModuleLoadXpmDataFunc))
-> PixbufModuleLoadXpmDataFunc -> C_PixbufModuleLoadXpmDataFunc
wrap_PixbufModuleLoadXpmDataFunc Maybe (Ptr (FunPtr C_PixbufModuleLoadXpmDataFunc))
forall a. Maybe a
Nothing PixbufModuleLoadXpmDataFunc
cb
C_PixbufModuleLoadXpmDataFunc
-> IO (FunPtr C_PixbufModuleLoadXpmDataFunc)
mk_PixbufModuleLoadXpmDataFunc C_PixbufModuleLoadXpmDataFunc
cb' IO (FunPtr C_PixbufModuleLoadXpmDataFunc)
-> (FunPtr C_PixbufModuleLoadXpmDataFunc
-> IO (GClosure C_PixbufModuleLoadXpmDataFunc))
-> IO (GClosure C_PixbufModuleLoadXpmDataFunc)
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_PixbufModuleLoadXpmDataFunc
-> IO (GClosure C_PixbufModuleLoadXpmDataFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_PixbufModuleLoadXpmDataFunc ::
Maybe (Ptr (FunPtr C_PixbufModuleLoadXpmDataFunc)) ->
PixbufModuleLoadXpmDataFunc ->
C_PixbufModuleLoadXpmDataFunc
wrap_PixbufModuleLoadXpmDataFunc :: Maybe (Ptr (FunPtr C_PixbufModuleLoadXpmDataFunc))
-> PixbufModuleLoadXpmDataFunc -> C_PixbufModuleLoadXpmDataFunc
wrap_PixbufModuleLoadXpmDataFunc Maybe (Ptr (FunPtr C_PixbufModuleLoadXpmDataFunc))
gi'funptrptr PixbufModuleLoadXpmDataFunc
gi'cb Ptr CString
data_ = do
[Text]
data_' <- HasCallStack => Ptr CString -> IO [Text]
Ptr CString -> IO [Text]
unpackZeroTerminatedUTF8CArray Ptr CString
data_
Pixbuf
result <- PixbufModuleLoadXpmDataFunc
gi'cb [Text]
data_'
Maybe (Ptr (FunPtr C_PixbufModuleLoadXpmDataFunc)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_PixbufModuleLoadXpmDataFunc))
gi'funptrptr
Ptr Pixbuf
result' <- Pixbuf -> IO (Ptr Pixbuf)
forall a b. (HasCallStack, GObject a) => a -> IO (Ptr b)
B.ManagedPtr.disownObject Pixbuf
result
Ptr Pixbuf -> IO (Ptr Pixbuf)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Pixbuf
result'
type C_PixbufModuleLoadFunc =
Ptr () ->
Ptr (Ptr GError) ->
IO (Ptr GdkPixbuf.Pixbuf.Pixbuf)
foreign import ccall "dynamic" __dynamic_C_PixbufModuleLoadFunc :: FunPtr C_PixbufModuleLoadFunc -> C_PixbufModuleLoadFunc
dynamic_PixbufModuleLoadFunc ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_PixbufModuleLoadFunc
-> Ptr ()
-> m GdkPixbuf.Pixbuf.Pixbuf
dynamic_PixbufModuleLoadFunc :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_PixbufModuleLoadFunc -> Ptr () -> m Pixbuf
dynamic_PixbufModuleLoadFunc FunPtr C_PixbufModuleLoadFunc
__funPtr Ptr ()
f = IO Pixbuf -> m Pixbuf
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Pixbuf -> m Pixbuf) -> IO Pixbuf -> m Pixbuf
forall a b. (a -> b) -> a -> b
$ do
IO Pixbuf -> IO () -> IO Pixbuf
forall a b. IO a -> IO b -> IO a
onException (do
Ptr Pixbuf
result <- (Ptr (Ptr GError) -> IO (Ptr Pixbuf)) -> IO (Ptr Pixbuf)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr Pixbuf)) -> IO (Ptr Pixbuf))
-> (Ptr (Ptr GError) -> IO (Ptr Pixbuf)) -> IO (Ptr Pixbuf)
forall a b. (a -> b) -> a -> b
$ (FunPtr C_PixbufModuleLoadFunc -> C_PixbufModuleLoadFunc
__dynamic_C_PixbufModuleLoadFunc FunPtr C_PixbufModuleLoadFunc
__funPtr) Ptr ()
f
Text -> Ptr Pixbuf -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"pixbufModuleLoadFunc" Ptr Pixbuf
result
Pixbuf
result' <- ((ManagedPtr Pixbuf -> Pixbuf) -> Ptr Pixbuf -> IO Pixbuf
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Pixbuf -> Pixbuf
GdkPixbuf.Pixbuf.Pixbuf) Ptr Pixbuf
result
Pixbuf -> IO Pixbuf
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Pixbuf
result'
) (do
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
foreign import ccall "wrapper"
mk_PixbufModuleLoadFunc :: C_PixbufModuleLoadFunc -> IO (FunPtr C_PixbufModuleLoadFunc)
type PixbufModuleLoadFunc =
Ptr ()
-> IO GdkPixbuf.Pixbuf.Pixbuf
noPixbufModuleLoadFunc :: Maybe PixbufModuleLoadFunc
noPixbufModuleLoadFunc :: Maybe PixbufModuleLoadFunc
noPixbufModuleLoadFunc = Maybe PixbufModuleLoadFunc
forall a. Maybe a
Nothing
type C_PixbufModuleLoadAnimationFunc =
Ptr () ->
Ptr (Ptr GError) ->
IO (Ptr GdkPixbuf.PixbufAnimation.PixbufAnimation)
foreign import ccall "dynamic" __dynamic_C_PixbufModuleLoadAnimationFunc :: FunPtr C_PixbufModuleLoadAnimationFunc -> C_PixbufModuleLoadAnimationFunc
dynamic_PixbufModuleLoadAnimationFunc ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_PixbufModuleLoadAnimationFunc
-> Ptr ()
-> m GdkPixbuf.PixbufAnimation.PixbufAnimation
dynamic_PixbufModuleLoadAnimationFunc :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_PixbufModuleLoadAnimationFunc
-> Ptr () -> m PixbufAnimation
dynamic_PixbufModuleLoadAnimationFunc FunPtr C_PixbufModuleLoadAnimationFunc
__funPtr Ptr ()
f = IO PixbufAnimation -> m PixbufAnimation
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO PixbufAnimation -> m PixbufAnimation)
-> IO PixbufAnimation -> m PixbufAnimation
forall a b. (a -> b) -> a -> b
$ do
IO PixbufAnimation -> IO () -> IO PixbufAnimation
forall a b. IO a -> IO b -> IO a
onException (do
Ptr PixbufAnimation
result <- (Ptr (Ptr GError) -> IO (Ptr PixbufAnimation))
-> IO (Ptr PixbufAnimation)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr PixbufAnimation))
-> IO (Ptr PixbufAnimation))
-> (Ptr (Ptr GError) -> IO (Ptr PixbufAnimation))
-> IO (Ptr PixbufAnimation)
forall a b. (a -> b) -> a -> b
$ (FunPtr C_PixbufModuleLoadAnimationFunc
-> C_PixbufModuleLoadAnimationFunc
__dynamic_C_PixbufModuleLoadAnimationFunc FunPtr C_PixbufModuleLoadAnimationFunc
__funPtr) Ptr ()
f
Text -> Ptr PixbufAnimation -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"pixbufModuleLoadAnimationFunc" Ptr PixbufAnimation
result
PixbufAnimation
result' <- ((ManagedPtr PixbufAnimation -> PixbufAnimation)
-> Ptr PixbufAnimation -> IO PixbufAnimation
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr PixbufAnimation -> PixbufAnimation
GdkPixbuf.PixbufAnimation.PixbufAnimation) Ptr PixbufAnimation
result
PixbufAnimation -> IO PixbufAnimation
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return PixbufAnimation
result'
) (do
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
foreign import ccall "wrapper"
mk_PixbufModuleLoadAnimationFunc :: C_PixbufModuleLoadAnimationFunc -> IO (FunPtr C_PixbufModuleLoadAnimationFunc)
type PixbufModuleLoadAnimationFunc =
Ptr ()
-> IO GdkPixbuf.PixbufAnimation.PixbufAnimation
noPixbufModuleLoadAnimationFunc :: Maybe PixbufModuleLoadAnimationFunc
noPixbufModuleLoadAnimationFunc :: Maybe PixbufModuleLoadAnimationFunc
noPixbufModuleLoadAnimationFunc = Maybe PixbufModuleLoadAnimationFunc
forall a. Maybe a
Nothing
type C_PixbufModuleIncrementLoadFunc =
Ptr () ->
Ptr Word8 ->
Word32 ->
Ptr (Ptr GError) ->
IO CInt
foreign import ccall "dynamic" __dynamic_C_PixbufModuleIncrementLoadFunc :: FunPtr C_PixbufModuleIncrementLoadFunc -> C_PixbufModuleIncrementLoadFunc
dynamic_PixbufModuleIncrementLoadFunc ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_PixbufModuleIncrementLoadFunc
-> Ptr ()
-> ByteString
-> m ()
dynamic_PixbufModuleIncrementLoadFunc :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_PixbufModuleIncrementLoadFunc
-> Ptr () -> ByteString -> m ()
dynamic_PixbufModuleIncrementLoadFunc FunPtr C_PixbufModuleIncrementLoadFunc
__funPtr Ptr ()
context ByteString
buf = 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
let size :: Word32
size = Int -> Word32
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> Word32) -> Int -> Word32
forall a b. (a -> b) -> a -> b
$ ByteString -> Int
B.length ByteString
buf
Ptr Word8
buf' <- ByteString -> IO (Ptr Word8)
packByteString ByteString
buf
IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ (FunPtr C_PixbufModuleIncrementLoadFunc
-> C_PixbufModuleIncrementLoadFunc
__dynamic_C_PixbufModuleIncrementLoadFunc FunPtr C_PixbufModuleIncrementLoadFunc
__funPtr) Ptr ()
context Ptr Word8
buf' Word32
size
Ptr Word8 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word8
buf'
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
Ptr Word8 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word8
buf'
)
foreign import ccall "wrapper"
mk_PixbufModuleIncrementLoadFunc :: C_PixbufModuleIncrementLoadFunc -> IO (FunPtr C_PixbufModuleIncrementLoadFunc)
type PixbufModuleIncrementLoadFunc =
Ptr ()
-> ByteString
-> IO ()
noPixbufModuleIncrementLoadFunc :: Maybe PixbufModuleIncrementLoadFunc
noPixbufModuleIncrementLoadFunc :: Maybe PixbufModuleIncrementLoadFunc
noPixbufModuleIncrementLoadFunc = Maybe PixbufModuleIncrementLoadFunc
forall a. Maybe a
Nothing
type C_PixbufModuleFillVtableFunc =
Ptr GdkPixbuf.PixbufModule.PixbufModule ->
IO ()
foreign import ccall "dynamic" __dynamic_C_PixbufModuleFillVtableFunc :: FunPtr C_PixbufModuleFillVtableFunc -> C_PixbufModuleFillVtableFunc
dynamic_PixbufModuleFillVtableFunc ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_PixbufModuleFillVtableFunc
-> GdkPixbuf.PixbufModule.PixbufModule
-> m ()
dynamic_PixbufModuleFillVtableFunc :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_PixbufModuleFillVtableFunc -> PixbufModule -> m ()
dynamic_PixbufModuleFillVtableFunc FunPtr C_PixbufModuleFillVtableFunc
__funPtr PixbufModule
module_ = 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
Ptr PixbufModule
module_' <- PixbufModule -> IO (Ptr PixbufModule)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr PixbufModule
module_
(FunPtr C_PixbufModuleFillVtableFunc -> C_PixbufModuleFillVtableFunc
__dynamic_C_PixbufModuleFillVtableFunc FunPtr C_PixbufModuleFillVtableFunc
__funPtr) Ptr PixbufModule
module_'
PixbufModule -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr PixbufModule
module_
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
foreign import ccall "wrapper"
mk_PixbufModuleFillVtableFunc :: C_PixbufModuleFillVtableFunc -> IO (FunPtr C_PixbufModuleFillVtableFunc)
type PixbufModuleFillVtableFunc =
GdkPixbuf.PixbufModule.PixbufModule
-> IO ()
noPixbufModuleFillVtableFunc :: Maybe PixbufModuleFillVtableFunc
noPixbufModuleFillVtableFunc :: Maybe (PixbufModule -> IO ())
noPixbufModuleFillVtableFunc = Maybe (PixbufModule -> IO ())
forall a. Maybe a
Nothing
genClosure_PixbufModuleFillVtableFunc :: MonadIO m => PixbufModuleFillVtableFunc -> m (GClosure C_PixbufModuleFillVtableFunc)
genClosure_PixbufModuleFillVtableFunc :: forall (m :: * -> *).
MonadIO m =>
(PixbufModule -> IO ())
-> m (GClosure C_PixbufModuleFillVtableFunc)
genClosure_PixbufModuleFillVtableFunc PixbufModule -> IO ()
cb = IO (GClosure C_PixbufModuleFillVtableFunc)
-> m (GClosure C_PixbufModuleFillVtableFunc)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_PixbufModuleFillVtableFunc)
-> m (GClosure C_PixbufModuleFillVtableFunc))
-> IO (GClosure C_PixbufModuleFillVtableFunc)
-> m (GClosure C_PixbufModuleFillVtableFunc)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_PixbufModuleFillVtableFunc
cb' = Maybe (Ptr (FunPtr C_PixbufModuleFillVtableFunc))
-> (PixbufModule -> IO ()) -> C_PixbufModuleFillVtableFunc
wrap_PixbufModuleFillVtableFunc Maybe (Ptr (FunPtr C_PixbufModuleFillVtableFunc))
forall a. Maybe a
Nothing PixbufModule -> IO ()
cb
C_PixbufModuleFillVtableFunc
-> IO (FunPtr C_PixbufModuleFillVtableFunc)
mk_PixbufModuleFillVtableFunc C_PixbufModuleFillVtableFunc
cb' IO (FunPtr C_PixbufModuleFillVtableFunc)
-> (FunPtr C_PixbufModuleFillVtableFunc
-> IO (GClosure C_PixbufModuleFillVtableFunc))
-> IO (GClosure C_PixbufModuleFillVtableFunc)
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_PixbufModuleFillVtableFunc
-> IO (GClosure C_PixbufModuleFillVtableFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_PixbufModuleFillVtableFunc ::
Maybe (Ptr (FunPtr C_PixbufModuleFillVtableFunc)) ->
PixbufModuleFillVtableFunc ->
C_PixbufModuleFillVtableFunc
wrap_PixbufModuleFillVtableFunc :: Maybe (Ptr (FunPtr C_PixbufModuleFillVtableFunc))
-> (PixbufModule -> IO ()) -> C_PixbufModuleFillVtableFunc
wrap_PixbufModuleFillVtableFunc Maybe (Ptr (FunPtr C_PixbufModuleFillVtableFunc))
gi'funptrptr PixbufModule -> IO ()
gi'cb Ptr PixbufModule
module_ = do
PixbufModule
module_' <- ((ManagedPtr PixbufModule -> PixbufModule)
-> Ptr PixbufModule -> IO PixbufModule
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr PixbufModule -> PixbufModule
GdkPixbuf.PixbufModule.PixbufModule) Ptr PixbufModule
module_
PixbufModule -> IO ()
gi'cb PixbufModule
module_'
Maybe (Ptr (FunPtr C_PixbufModuleFillVtableFunc)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_PixbufModuleFillVtableFunc))
gi'funptrptr
type C_PixbufModuleFillInfoFunc =
Ptr GdkPixbuf.PixbufFormat.PixbufFormat ->
IO ()
foreign import ccall "dynamic" __dynamic_C_PixbufModuleFillInfoFunc :: FunPtr C_PixbufModuleFillInfoFunc -> C_PixbufModuleFillInfoFunc
dynamic_PixbufModuleFillInfoFunc ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_PixbufModuleFillInfoFunc
-> GdkPixbuf.PixbufFormat.PixbufFormat
-> m ()
dynamic_PixbufModuleFillInfoFunc :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_PixbufModuleFillInfoFunc -> PixbufFormat -> m ()
dynamic_PixbufModuleFillInfoFunc FunPtr C_PixbufModuleFillInfoFunc
__funPtr PixbufFormat
info = 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
Ptr PixbufFormat
info' <- PixbufFormat -> IO (Ptr PixbufFormat)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr PixbufFormat
info
(FunPtr C_PixbufModuleFillInfoFunc -> C_PixbufModuleFillInfoFunc
__dynamic_C_PixbufModuleFillInfoFunc FunPtr C_PixbufModuleFillInfoFunc
__funPtr) Ptr PixbufFormat
info'
PixbufFormat -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr PixbufFormat
info
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
foreign import ccall "wrapper"
mk_PixbufModuleFillInfoFunc :: C_PixbufModuleFillInfoFunc -> IO (FunPtr C_PixbufModuleFillInfoFunc)
type PixbufModuleFillInfoFunc =
GdkPixbuf.PixbufFormat.PixbufFormat
-> IO ()
noPixbufModuleFillInfoFunc :: Maybe PixbufModuleFillInfoFunc
noPixbufModuleFillInfoFunc :: Maybe (PixbufFormat -> IO ())
noPixbufModuleFillInfoFunc = Maybe (PixbufFormat -> IO ())
forall a. Maybe a
Nothing
genClosure_PixbufModuleFillInfoFunc :: MonadIO m => PixbufModuleFillInfoFunc -> m (GClosure C_PixbufModuleFillInfoFunc)
genClosure_PixbufModuleFillInfoFunc :: forall (m :: * -> *).
MonadIO m =>
(PixbufFormat -> IO ()) -> m (GClosure C_PixbufModuleFillInfoFunc)
genClosure_PixbufModuleFillInfoFunc PixbufFormat -> IO ()
cb = IO (GClosure C_PixbufModuleFillInfoFunc)
-> m (GClosure C_PixbufModuleFillInfoFunc)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_PixbufModuleFillInfoFunc)
-> m (GClosure C_PixbufModuleFillInfoFunc))
-> IO (GClosure C_PixbufModuleFillInfoFunc)
-> m (GClosure C_PixbufModuleFillInfoFunc)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_PixbufModuleFillInfoFunc
cb' = Maybe (Ptr (FunPtr C_PixbufModuleFillInfoFunc))
-> (PixbufFormat -> IO ()) -> C_PixbufModuleFillInfoFunc
wrap_PixbufModuleFillInfoFunc Maybe (Ptr (FunPtr C_PixbufModuleFillInfoFunc))
forall a. Maybe a
Nothing PixbufFormat -> IO ()
cb
C_PixbufModuleFillInfoFunc
-> IO (FunPtr C_PixbufModuleFillInfoFunc)
mk_PixbufModuleFillInfoFunc C_PixbufModuleFillInfoFunc
cb' IO (FunPtr C_PixbufModuleFillInfoFunc)
-> (FunPtr C_PixbufModuleFillInfoFunc
-> IO (GClosure C_PixbufModuleFillInfoFunc))
-> IO (GClosure C_PixbufModuleFillInfoFunc)
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_PixbufModuleFillInfoFunc
-> IO (GClosure C_PixbufModuleFillInfoFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_PixbufModuleFillInfoFunc ::
Maybe (Ptr (FunPtr C_PixbufModuleFillInfoFunc)) ->
PixbufModuleFillInfoFunc ->
C_PixbufModuleFillInfoFunc
wrap_PixbufModuleFillInfoFunc :: Maybe (Ptr (FunPtr C_PixbufModuleFillInfoFunc))
-> (PixbufFormat -> IO ()) -> C_PixbufModuleFillInfoFunc
wrap_PixbufModuleFillInfoFunc Maybe (Ptr (FunPtr C_PixbufModuleFillInfoFunc))
gi'funptrptr PixbufFormat -> IO ()
gi'cb Ptr PixbufFormat
info = do
Ptr PixbufFormat -> (PixbufFormat -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr PixbufFormat
info ((PixbufFormat -> IO ()) -> IO ())
-> (PixbufFormat -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \PixbufFormat
info' -> do
PixbufFormat -> IO ()
gi'cb PixbufFormat
info'
Maybe (Ptr (FunPtr C_PixbufModuleFillInfoFunc)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_PixbufModuleFillInfoFunc))
gi'funptrptr
type C_PixbufDestroyNotify =
Ptr Word8 ->
Ptr () ->
IO ()
foreign import ccall "dynamic" __dynamic_C_PixbufDestroyNotify :: FunPtr C_PixbufDestroyNotify -> C_PixbufDestroyNotify
dynamic_PixbufDestroyNotify ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_PixbufDestroyNotify
-> Ptr Word8
-> Ptr ()
-> m ()
dynamic_PixbufDestroyNotify :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_PixbufDestroyNotify -> Ptr Word8 -> Ptr () -> m ()
dynamic_PixbufDestroyNotify FunPtr C_PixbufDestroyNotify
__funPtr Ptr Word8
pixels Ptr ()
data_ = 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
(FunPtr C_PixbufDestroyNotify -> C_PixbufDestroyNotify
__dynamic_C_PixbufDestroyNotify FunPtr C_PixbufDestroyNotify
__funPtr) Ptr Word8
pixels Ptr ()
data_
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
foreign import ccall "wrapper"
mk_PixbufDestroyNotify :: C_PixbufDestroyNotify -> IO (FunPtr C_PixbufDestroyNotify)
type PixbufDestroyNotify =
Ptr Word8
-> IO ()
noPixbufDestroyNotify :: Maybe PixbufDestroyNotify
noPixbufDestroyNotify :: Maybe (Ptr Word8 -> IO ())
noPixbufDestroyNotify = Maybe (Ptr Word8 -> IO ())
forall a. Maybe a
Nothing
type PixbufDestroyNotify_WithClosures =
Ptr Word8
-> Ptr ()
-> IO ()
noPixbufDestroyNotify_WithClosures :: Maybe PixbufDestroyNotify_WithClosures
noPixbufDestroyNotify_WithClosures :: Maybe C_PixbufDestroyNotify
noPixbufDestroyNotify_WithClosures = Maybe C_PixbufDestroyNotify
forall a. Maybe a
Nothing
drop_closures_PixbufDestroyNotify :: PixbufDestroyNotify -> PixbufDestroyNotify_WithClosures
drop_closures_PixbufDestroyNotify :: (Ptr Word8 -> IO ()) -> C_PixbufDestroyNotify
drop_closures_PixbufDestroyNotify Ptr Word8 -> IO ()
_f Ptr Word8
pixels Ptr ()
_ = Ptr Word8 -> IO ()
_f Ptr Word8
pixels
genClosure_PixbufDestroyNotify :: MonadIO m => PixbufDestroyNotify -> m (GClosure C_PixbufDestroyNotify)
genClosure_PixbufDestroyNotify :: forall (m :: * -> *).
MonadIO m =>
(Ptr Word8 -> IO ()) -> m (GClosure C_PixbufDestroyNotify)
genClosure_PixbufDestroyNotify Ptr Word8 -> IO ()
cb = IO (GClosure C_PixbufDestroyNotify)
-> m (GClosure C_PixbufDestroyNotify)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_PixbufDestroyNotify)
-> m (GClosure C_PixbufDestroyNotify))
-> IO (GClosure C_PixbufDestroyNotify)
-> m (GClosure C_PixbufDestroyNotify)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_PixbufDestroyNotify
cb' = (Ptr Word8 -> IO ()) -> C_PixbufDestroyNotify
drop_closures_PixbufDestroyNotify Ptr Word8 -> IO ()
cb
let cb'' :: C_PixbufDestroyNotify
cb'' = Maybe (Ptr (FunPtr C_PixbufDestroyNotify))
-> C_PixbufDestroyNotify -> C_PixbufDestroyNotify
wrap_PixbufDestroyNotify Maybe (Ptr (FunPtr C_PixbufDestroyNotify))
forall a. Maybe a
Nothing C_PixbufDestroyNotify
cb'
C_PixbufDestroyNotify -> IO (FunPtr C_PixbufDestroyNotify)
mk_PixbufDestroyNotify C_PixbufDestroyNotify
cb'' IO (FunPtr C_PixbufDestroyNotify)
-> (FunPtr C_PixbufDestroyNotify
-> IO (GClosure C_PixbufDestroyNotify))
-> IO (GClosure C_PixbufDestroyNotify)
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_PixbufDestroyNotify -> IO (GClosure C_PixbufDestroyNotify)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_PixbufDestroyNotify ::
Maybe (Ptr (FunPtr C_PixbufDestroyNotify)) ->
PixbufDestroyNotify_WithClosures ->
C_PixbufDestroyNotify
wrap_PixbufDestroyNotify :: Maybe (Ptr (FunPtr C_PixbufDestroyNotify))
-> C_PixbufDestroyNotify -> C_PixbufDestroyNotify
wrap_PixbufDestroyNotify Maybe (Ptr (FunPtr C_PixbufDestroyNotify))
gi'funptrptr C_PixbufDestroyNotify
gi'cb Ptr Word8
pixels Ptr ()
data_ = do
C_PixbufDestroyNotify
gi'cb Ptr Word8
pixels Ptr ()
data_
Maybe (Ptr (FunPtr C_PixbufDestroyNotify)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_PixbufDestroyNotify))
gi'funptrptr