#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \
&& !defined(__HADDOCK_VERSION__))
module GI.GdkPixbuf.Objects.PixbufLoader
(
PixbufLoader(..) ,
IsPixbufLoader ,
toPixbufLoader ,
noPixbufLoader ,
#if ENABLE_OVERLOADING
PixbufLoaderCloseMethodInfo ,
#endif
pixbufLoaderClose ,
#if ENABLE_OVERLOADING
PixbufLoaderGetAnimationMethodInfo ,
#endif
pixbufLoaderGetAnimation ,
#if ENABLE_OVERLOADING
PixbufLoaderGetFormatMethodInfo ,
#endif
pixbufLoaderGetFormat ,
#if ENABLE_OVERLOADING
PixbufLoaderGetPixbufMethodInfo ,
#endif
pixbufLoaderGetPixbuf ,
pixbufLoaderNew ,
pixbufLoaderNewWithMimeType ,
pixbufLoaderNewWithType ,
#if ENABLE_OVERLOADING
PixbufLoaderSetSizeMethodInfo ,
#endif
pixbufLoaderSetSize ,
#if ENABLE_OVERLOADING
PixbufLoaderWriteMethodInfo ,
#endif
pixbufLoaderWrite ,
#if ENABLE_OVERLOADING
PixbufLoaderWriteBytesMethodInfo ,
#endif
pixbufLoaderWriteBytes ,
C_PixbufLoaderAreaPreparedCallback ,
PixbufLoaderAreaPreparedCallback ,
#if ENABLE_OVERLOADING
PixbufLoaderAreaPreparedSignalInfo ,
#endif
afterPixbufLoaderAreaPrepared ,
genClosure_PixbufLoaderAreaPrepared ,
mk_PixbufLoaderAreaPreparedCallback ,
noPixbufLoaderAreaPreparedCallback ,
onPixbufLoaderAreaPrepared ,
wrap_PixbufLoaderAreaPreparedCallback ,
C_PixbufLoaderAreaUpdatedCallback ,
PixbufLoaderAreaUpdatedCallback ,
#if ENABLE_OVERLOADING
PixbufLoaderAreaUpdatedSignalInfo ,
#endif
afterPixbufLoaderAreaUpdated ,
genClosure_PixbufLoaderAreaUpdated ,
mk_PixbufLoaderAreaUpdatedCallback ,
noPixbufLoaderAreaUpdatedCallback ,
onPixbufLoaderAreaUpdated ,
wrap_PixbufLoaderAreaUpdatedCallback ,
C_PixbufLoaderClosedCallback ,
PixbufLoaderClosedCallback ,
#if ENABLE_OVERLOADING
PixbufLoaderClosedSignalInfo ,
#endif
afterPixbufLoaderClosed ,
genClosure_PixbufLoaderClosed ,
mk_PixbufLoaderClosedCallback ,
noPixbufLoaderClosedCallback ,
onPixbufLoaderClosed ,
wrap_PixbufLoaderClosedCallback ,
C_PixbufLoaderSizePreparedCallback ,
PixbufLoaderSizePreparedCallback ,
#if ENABLE_OVERLOADING
PixbufLoaderSizePreparedSignalInfo ,
#endif
afterPixbufLoaderSizePrepared ,
genClosure_PixbufLoaderSizePrepared ,
mk_PixbufLoaderSizePreparedCallback ,
noPixbufLoaderSizePreparedCallback ,
onPixbufLoaderSizePrepared ,
wrap_PixbufLoaderSizePreparedCallback ,
) 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.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
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.Text as T
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 GI.GLib.Structs.Bytes as GLib.Bytes
import qualified GI.GObject.Objects.Object as GObject.Object
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
newtype PixbufLoader = PixbufLoader (ManagedPtr PixbufLoader)
foreign import ccall "gdk_pixbuf_loader_get_type"
c_gdk_pixbuf_loader_get_type :: IO GType
instance GObject PixbufLoader where
gobjectType = c_gdk_pixbuf_loader_get_type
class (GObject o, O.IsDescendantOf PixbufLoader o) => IsPixbufLoader o
instance (GObject o, O.IsDescendantOf PixbufLoader o) => IsPixbufLoader o
instance O.HasParentTypes PixbufLoader
type instance O.ParentTypes PixbufLoader = '[GObject.Object.Object]
toPixbufLoader :: (MonadIO m, IsPixbufLoader o) => o -> m PixbufLoader
toPixbufLoader = liftIO . unsafeCastTo PixbufLoader
noPixbufLoader :: Maybe PixbufLoader
noPixbufLoader = Nothing
#if ENABLE_OVERLOADING
type family ResolvePixbufLoaderMethod (t :: Symbol) (o :: *) :: * where
ResolvePixbufLoaderMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolvePixbufLoaderMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolvePixbufLoaderMethod "close" o = PixbufLoaderCloseMethodInfo
ResolvePixbufLoaderMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolvePixbufLoaderMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolvePixbufLoaderMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolvePixbufLoaderMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolvePixbufLoaderMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolvePixbufLoaderMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolvePixbufLoaderMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolvePixbufLoaderMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolvePixbufLoaderMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolvePixbufLoaderMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolvePixbufLoaderMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolvePixbufLoaderMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolvePixbufLoaderMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolvePixbufLoaderMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolvePixbufLoaderMethod "write" o = PixbufLoaderWriteMethodInfo
ResolvePixbufLoaderMethod "writeBytes" o = PixbufLoaderWriteBytesMethodInfo
ResolvePixbufLoaderMethod "getAnimation" o = PixbufLoaderGetAnimationMethodInfo
ResolvePixbufLoaderMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolvePixbufLoaderMethod "getFormat" o = PixbufLoaderGetFormatMethodInfo
ResolvePixbufLoaderMethod "getPixbuf" o = PixbufLoaderGetPixbufMethodInfo
ResolvePixbufLoaderMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolvePixbufLoaderMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolvePixbufLoaderMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolvePixbufLoaderMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolvePixbufLoaderMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolvePixbufLoaderMethod "setSize" o = PixbufLoaderSetSizeMethodInfo
ResolvePixbufLoaderMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolvePixbufLoaderMethod t PixbufLoader, O.MethodInfo info PixbufLoader p) => OL.IsLabel t (PixbufLoader -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#else
fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#endif
#endif
type PixbufLoaderAreaPreparedCallback =
IO ()
noPixbufLoaderAreaPreparedCallback :: Maybe PixbufLoaderAreaPreparedCallback
noPixbufLoaderAreaPreparedCallback = Nothing
type C_PixbufLoaderAreaPreparedCallback =
Ptr () ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_PixbufLoaderAreaPreparedCallback :: C_PixbufLoaderAreaPreparedCallback -> IO (FunPtr C_PixbufLoaderAreaPreparedCallback)
genClosure_PixbufLoaderAreaPrepared :: MonadIO m => PixbufLoaderAreaPreparedCallback -> m (GClosure C_PixbufLoaderAreaPreparedCallback)
genClosure_PixbufLoaderAreaPrepared cb = liftIO $ do
let cb' = wrap_PixbufLoaderAreaPreparedCallback cb
mk_PixbufLoaderAreaPreparedCallback cb' >>= B.GClosure.newGClosure
wrap_PixbufLoaderAreaPreparedCallback ::
PixbufLoaderAreaPreparedCallback ->
C_PixbufLoaderAreaPreparedCallback
wrap_PixbufLoaderAreaPreparedCallback _cb _ _ = do
_cb
onPixbufLoaderAreaPrepared :: (IsPixbufLoader a, MonadIO m) => a -> PixbufLoaderAreaPreparedCallback -> m SignalHandlerId
onPixbufLoaderAreaPrepared obj cb = liftIO $ do
let cb' = wrap_PixbufLoaderAreaPreparedCallback cb
cb'' <- mk_PixbufLoaderAreaPreparedCallback cb'
connectSignalFunPtr obj "area-prepared" cb'' SignalConnectBefore
afterPixbufLoaderAreaPrepared :: (IsPixbufLoader a, MonadIO m) => a -> PixbufLoaderAreaPreparedCallback -> m SignalHandlerId
afterPixbufLoaderAreaPrepared obj cb = liftIO $ do
let cb' = wrap_PixbufLoaderAreaPreparedCallback cb
cb'' <- mk_PixbufLoaderAreaPreparedCallback cb'
connectSignalFunPtr obj "area-prepared" cb'' SignalConnectAfter
type PixbufLoaderAreaUpdatedCallback =
Int32
-> Int32
-> Int32
-> Int32
-> IO ()
noPixbufLoaderAreaUpdatedCallback :: Maybe PixbufLoaderAreaUpdatedCallback
noPixbufLoaderAreaUpdatedCallback = Nothing
type C_PixbufLoaderAreaUpdatedCallback =
Ptr () ->
Int32 ->
Int32 ->
Int32 ->
Int32 ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_PixbufLoaderAreaUpdatedCallback :: C_PixbufLoaderAreaUpdatedCallback -> IO (FunPtr C_PixbufLoaderAreaUpdatedCallback)
genClosure_PixbufLoaderAreaUpdated :: MonadIO m => PixbufLoaderAreaUpdatedCallback -> m (GClosure C_PixbufLoaderAreaUpdatedCallback)
genClosure_PixbufLoaderAreaUpdated cb = liftIO $ do
let cb' = wrap_PixbufLoaderAreaUpdatedCallback cb
mk_PixbufLoaderAreaUpdatedCallback cb' >>= B.GClosure.newGClosure
wrap_PixbufLoaderAreaUpdatedCallback ::
PixbufLoaderAreaUpdatedCallback ->
C_PixbufLoaderAreaUpdatedCallback
wrap_PixbufLoaderAreaUpdatedCallback _cb _ x y width height _ = do
_cb x y width height
onPixbufLoaderAreaUpdated :: (IsPixbufLoader a, MonadIO m) => a -> PixbufLoaderAreaUpdatedCallback -> m SignalHandlerId
onPixbufLoaderAreaUpdated obj cb = liftIO $ do
let cb' = wrap_PixbufLoaderAreaUpdatedCallback cb
cb'' <- mk_PixbufLoaderAreaUpdatedCallback cb'
connectSignalFunPtr obj "area-updated" cb'' SignalConnectBefore
afterPixbufLoaderAreaUpdated :: (IsPixbufLoader a, MonadIO m) => a -> PixbufLoaderAreaUpdatedCallback -> m SignalHandlerId
afterPixbufLoaderAreaUpdated obj cb = liftIO $ do
let cb' = wrap_PixbufLoaderAreaUpdatedCallback cb
cb'' <- mk_PixbufLoaderAreaUpdatedCallback cb'
connectSignalFunPtr obj "area-updated" cb'' SignalConnectAfter
type PixbufLoaderClosedCallback =
IO ()
noPixbufLoaderClosedCallback :: Maybe PixbufLoaderClosedCallback
noPixbufLoaderClosedCallback = Nothing
type C_PixbufLoaderClosedCallback =
Ptr () ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_PixbufLoaderClosedCallback :: C_PixbufLoaderClosedCallback -> IO (FunPtr C_PixbufLoaderClosedCallback)
genClosure_PixbufLoaderClosed :: MonadIO m => PixbufLoaderClosedCallback -> m (GClosure C_PixbufLoaderClosedCallback)
genClosure_PixbufLoaderClosed cb = liftIO $ do
let cb' = wrap_PixbufLoaderClosedCallback cb
mk_PixbufLoaderClosedCallback cb' >>= B.GClosure.newGClosure
wrap_PixbufLoaderClosedCallback ::
PixbufLoaderClosedCallback ->
C_PixbufLoaderClosedCallback
wrap_PixbufLoaderClosedCallback _cb _ _ = do
_cb
onPixbufLoaderClosed :: (IsPixbufLoader a, MonadIO m) => a -> PixbufLoaderClosedCallback -> m SignalHandlerId
onPixbufLoaderClosed obj cb = liftIO $ do
let cb' = wrap_PixbufLoaderClosedCallback cb
cb'' <- mk_PixbufLoaderClosedCallback cb'
connectSignalFunPtr obj "closed" cb'' SignalConnectBefore
afterPixbufLoaderClosed :: (IsPixbufLoader a, MonadIO m) => a -> PixbufLoaderClosedCallback -> m SignalHandlerId
afterPixbufLoaderClosed obj cb = liftIO $ do
let cb' = wrap_PixbufLoaderClosedCallback cb
cb'' <- mk_PixbufLoaderClosedCallback cb'
connectSignalFunPtr obj "closed" cb'' SignalConnectAfter
type PixbufLoaderSizePreparedCallback =
Int32
-> Int32
-> IO ()
noPixbufLoaderSizePreparedCallback :: Maybe PixbufLoaderSizePreparedCallback
noPixbufLoaderSizePreparedCallback = Nothing
type C_PixbufLoaderSizePreparedCallback =
Ptr () ->
Int32 ->
Int32 ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_PixbufLoaderSizePreparedCallback :: C_PixbufLoaderSizePreparedCallback -> IO (FunPtr C_PixbufLoaderSizePreparedCallback)
genClosure_PixbufLoaderSizePrepared :: MonadIO m => PixbufLoaderSizePreparedCallback -> m (GClosure C_PixbufLoaderSizePreparedCallback)
genClosure_PixbufLoaderSizePrepared cb = liftIO $ do
let cb' = wrap_PixbufLoaderSizePreparedCallback cb
mk_PixbufLoaderSizePreparedCallback cb' >>= B.GClosure.newGClosure
wrap_PixbufLoaderSizePreparedCallback ::
PixbufLoaderSizePreparedCallback ->
C_PixbufLoaderSizePreparedCallback
wrap_PixbufLoaderSizePreparedCallback _cb _ width height _ = do
_cb width height
onPixbufLoaderSizePrepared :: (IsPixbufLoader a, MonadIO m) => a -> PixbufLoaderSizePreparedCallback -> m SignalHandlerId
onPixbufLoaderSizePrepared obj cb = liftIO $ do
let cb' = wrap_PixbufLoaderSizePreparedCallback cb
cb'' <- mk_PixbufLoaderSizePreparedCallback cb'
connectSignalFunPtr obj "size-prepared" cb'' SignalConnectBefore
afterPixbufLoaderSizePrepared :: (IsPixbufLoader a, MonadIO m) => a -> PixbufLoaderSizePreparedCallback -> m SignalHandlerId
afterPixbufLoaderSizePrepared obj cb = liftIO $ do
let cb' = wrap_PixbufLoaderSizePreparedCallback cb
cb'' <- mk_PixbufLoaderSizePreparedCallback cb'
connectSignalFunPtr obj "size-prepared" cb'' SignalConnectAfter
#if ENABLE_OVERLOADING
instance O.HasAttributeList PixbufLoader
type instance O.AttributeList PixbufLoader = PixbufLoaderAttributeList
type PixbufLoaderAttributeList = ('[ ] :: [(Symbol, *)])
#endif
#if ENABLE_OVERLOADING
#endif
#if ENABLE_OVERLOADING
data PixbufLoaderAreaPreparedSignalInfo
instance SignalInfo PixbufLoaderAreaPreparedSignalInfo where
type HaskellCallbackType PixbufLoaderAreaPreparedSignalInfo = PixbufLoaderAreaPreparedCallback
connectSignal _ obj cb connectMode = do
let cb' = wrap_PixbufLoaderAreaPreparedCallback cb
cb'' <- mk_PixbufLoaderAreaPreparedCallback cb'
connectSignalFunPtr obj "area-prepared" cb'' connectMode
data PixbufLoaderAreaUpdatedSignalInfo
instance SignalInfo PixbufLoaderAreaUpdatedSignalInfo where
type HaskellCallbackType PixbufLoaderAreaUpdatedSignalInfo = PixbufLoaderAreaUpdatedCallback
connectSignal _ obj cb connectMode = do
let cb' = wrap_PixbufLoaderAreaUpdatedCallback cb
cb'' <- mk_PixbufLoaderAreaUpdatedCallback cb'
connectSignalFunPtr obj "area-updated" cb'' connectMode
data PixbufLoaderClosedSignalInfo
instance SignalInfo PixbufLoaderClosedSignalInfo where
type HaskellCallbackType PixbufLoaderClosedSignalInfo = PixbufLoaderClosedCallback
connectSignal _ obj cb connectMode = do
let cb' = wrap_PixbufLoaderClosedCallback cb
cb'' <- mk_PixbufLoaderClosedCallback cb'
connectSignalFunPtr obj "closed" cb'' connectMode
data PixbufLoaderSizePreparedSignalInfo
instance SignalInfo PixbufLoaderSizePreparedSignalInfo where
type HaskellCallbackType PixbufLoaderSizePreparedSignalInfo = PixbufLoaderSizePreparedCallback
connectSignal _ obj cb connectMode = do
let cb' = wrap_PixbufLoaderSizePreparedCallback cb
cb'' <- mk_PixbufLoaderSizePreparedCallback cb'
connectSignalFunPtr obj "size-prepared" cb'' connectMode
type instance O.SignalList PixbufLoader = PixbufLoaderSignalList
type PixbufLoaderSignalList = ('[ '("areaPrepared", PixbufLoaderAreaPreparedSignalInfo), '("areaUpdated", PixbufLoaderAreaUpdatedSignalInfo), '("closed", PixbufLoaderClosedSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo), '("sizePrepared", PixbufLoaderSizePreparedSignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "gdk_pixbuf_loader_new" gdk_pixbuf_loader_new ::
IO (Ptr PixbufLoader)
pixbufLoaderNew ::
(B.CallStack.HasCallStack, MonadIO m) =>
m PixbufLoader
pixbufLoaderNew = liftIO $ do
result <- gdk_pixbuf_loader_new
checkUnexpectedReturnNULL "pixbufLoaderNew" result
result' <- (wrapObject PixbufLoader) result
return result'
#if ENABLE_OVERLOADING
#endif
foreign import ccall "gdk_pixbuf_loader_new_with_mime_type" gdk_pixbuf_loader_new_with_mime_type ::
CString ->
Ptr (Ptr GError) ->
IO (Ptr PixbufLoader)
pixbufLoaderNewWithMimeType ::
(B.CallStack.HasCallStack, MonadIO m) =>
T.Text
-> m PixbufLoader
pixbufLoaderNewWithMimeType mimeType = liftIO $ do
mimeType' <- textToCString mimeType
onException (do
result <- propagateGError $ gdk_pixbuf_loader_new_with_mime_type mimeType'
checkUnexpectedReturnNULL "pixbufLoaderNewWithMimeType" result
result' <- (wrapObject PixbufLoader) result
freeMem mimeType'
return result'
) (do
freeMem mimeType'
)
#if ENABLE_OVERLOADING
#endif
foreign import ccall "gdk_pixbuf_loader_new_with_type" gdk_pixbuf_loader_new_with_type ::
CString ->
Ptr (Ptr GError) ->
IO (Ptr PixbufLoader)
pixbufLoaderNewWithType ::
(B.CallStack.HasCallStack, MonadIO m) =>
T.Text
-> m PixbufLoader
pixbufLoaderNewWithType imageType = liftIO $ do
imageType' <- textToCString imageType
onException (do
result <- propagateGError $ gdk_pixbuf_loader_new_with_type imageType'
checkUnexpectedReturnNULL "pixbufLoaderNewWithType" result
result' <- (wrapObject PixbufLoader) result
freeMem imageType'
return result'
) (do
freeMem imageType'
)
#if ENABLE_OVERLOADING
#endif
foreign import ccall "gdk_pixbuf_loader_close" gdk_pixbuf_loader_close ::
Ptr PixbufLoader ->
Ptr (Ptr GError) ->
IO CInt
pixbufLoaderClose ::
(B.CallStack.HasCallStack, MonadIO m, IsPixbufLoader a) =>
a
-> m ()
pixbufLoaderClose loader = liftIO $ do
loader' <- unsafeManagedPtrCastPtr loader
onException (do
_ <- propagateGError $ gdk_pixbuf_loader_close loader'
touchManagedPtr loader
return ()
) (do
return ()
)
#if ENABLE_OVERLOADING
data PixbufLoaderCloseMethodInfo
instance (signature ~ (m ()), MonadIO m, IsPixbufLoader a) => O.MethodInfo PixbufLoaderCloseMethodInfo a signature where
overloadedMethod _ = pixbufLoaderClose
#endif
foreign import ccall "gdk_pixbuf_loader_get_animation" gdk_pixbuf_loader_get_animation ::
Ptr PixbufLoader ->
IO (Ptr GdkPixbuf.PixbufAnimation.PixbufAnimation)
pixbufLoaderGetAnimation ::
(B.CallStack.HasCallStack, MonadIO m, IsPixbufLoader a) =>
a
-> m GdkPixbuf.PixbufAnimation.PixbufAnimation
pixbufLoaderGetAnimation loader = liftIO $ do
loader' <- unsafeManagedPtrCastPtr loader
result <- gdk_pixbuf_loader_get_animation loader'
checkUnexpectedReturnNULL "pixbufLoaderGetAnimation" result
result' <- (newObject GdkPixbuf.PixbufAnimation.PixbufAnimation) result
touchManagedPtr loader
return result'
#if ENABLE_OVERLOADING
data PixbufLoaderGetAnimationMethodInfo
instance (signature ~ (m GdkPixbuf.PixbufAnimation.PixbufAnimation), MonadIO m, IsPixbufLoader a) => O.MethodInfo PixbufLoaderGetAnimationMethodInfo a signature where
overloadedMethod _ = pixbufLoaderGetAnimation
#endif
foreign import ccall "gdk_pixbuf_loader_get_format" gdk_pixbuf_loader_get_format ::
Ptr PixbufLoader ->
IO (Ptr GdkPixbuf.PixbufFormat.PixbufFormat)
pixbufLoaderGetFormat ::
(B.CallStack.HasCallStack, MonadIO m, IsPixbufLoader a) =>
a
-> m (Maybe GdkPixbuf.PixbufFormat.PixbufFormat)
pixbufLoaderGetFormat loader = liftIO $ do
loader' <- unsafeManagedPtrCastPtr loader
result <- gdk_pixbuf_loader_get_format loader'
maybeResult <- convertIfNonNull result $ \result' -> do
result'' <- (newBoxed GdkPixbuf.PixbufFormat.PixbufFormat) result'
return result''
touchManagedPtr loader
return maybeResult
#if ENABLE_OVERLOADING
data PixbufLoaderGetFormatMethodInfo
instance (signature ~ (m (Maybe GdkPixbuf.PixbufFormat.PixbufFormat)), MonadIO m, IsPixbufLoader a) => O.MethodInfo PixbufLoaderGetFormatMethodInfo a signature where
overloadedMethod _ = pixbufLoaderGetFormat
#endif
foreign import ccall "gdk_pixbuf_loader_get_pixbuf" gdk_pixbuf_loader_get_pixbuf ::
Ptr PixbufLoader ->
IO (Ptr GdkPixbuf.Pixbuf.Pixbuf)
pixbufLoaderGetPixbuf ::
(B.CallStack.HasCallStack, MonadIO m, IsPixbufLoader a) =>
a
-> m (Maybe GdkPixbuf.Pixbuf.Pixbuf)
pixbufLoaderGetPixbuf loader = liftIO $ do
loader' <- unsafeManagedPtrCastPtr loader
result <- gdk_pixbuf_loader_get_pixbuf loader'
maybeResult <- convertIfNonNull result $ \result' -> do
result'' <- (newObject GdkPixbuf.Pixbuf.Pixbuf) result'
return result''
touchManagedPtr loader
return maybeResult
#if ENABLE_OVERLOADING
data PixbufLoaderGetPixbufMethodInfo
instance (signature ~ (m (Maybe GdkPixbuf.Pixbuf.Pixbuf)), MonadIO m, IsPixbufLoader a) => O.MethodInfo PixbufLoaderGetPixbufMethodInfo a signature where
overloadedMethod _ = pixbufLoaderGetPixbuf
#endif
foreign import ccall "gdk_pixbuf_loader_set_size" gdk_pixbuf_loader_set_size ::
Ptr PixbufLoader ->
Int32 ->
Int32 ->
IO ()
pixbufLoaderSetSize ::
(B.CallStack.HasCallStack, MonadIO m, IsPixbufLoader a) =>
a
-> Int32
-> Int32
-> m ()
pixbufLoaderSetSize loader width height = liftIO $ do
loader' <- unsafeManagedPtrCastPtr loader
gdk_pixbuf_loader_set_size loader' width height
touchManagedPtr loader
return ()
#if ENABLE_OVERLOADING
data PixbufLoaderSetSizeMethodInfo
instance (signature ~ (Int32 -> Int32 -> m ()), MonadIO m, IsPixbufLoader a) => O.MethodInfo PixbufLoaderSetSizeMethodInfo a signature where
overloadedMethod _ = pixbufLoaderSetSize
#endif
foreign import ccall "gdk_pixbuf_loader_write" gdk_pixbuf_loader_write ::
Ptr PixbufLoader ->
Ptr Word8 ->
Word64 ->
Ptr (Ptr GError) ->
IO CInt
pixbufLoaderWrite ::
(B.CallStack.HasCallStack, MonadIO m, IsPixbufLoader a) =>
a
-> ByteString
-> m ()
pixbufLoaderWrite loader buf = liftIO $ do
let count = fromIntegral $ B.length buf
loader' <- unsafeManagedPtrCastPtr loader
buf' <- packByteString buf
onException (do
_ <- propagateGError $ gdk_pixbuf_loader_write loader' buf' count
touchManagedPtr loader
freeMem buf'
return ()
) (do
freeMem buf'
)
#if ENABLE_OVERLOADING
data PixbufLoaderWriteMethodInfo
instance (signature ~ (ByteString -> m ()), MonadIO m, IsPixbufLoader a) => O.MethodInfo PixbufLoaderWriteMethodInfo a signature where
overloadedMethod _ = pixbufLoaderWrite
#endif
foreign import ccall "gdk_pixbuf_loader_write_bytes" gdk_pixbuf_loader_write_bytes ::
Ptr PixbufLoader ->
Ptr GLib.Bytes.Bytes ->
Ptr (Ptr GError) ->
IO CInt
pixbufLoaderWriteBytes ::
(B.CallStack.HasCallStack, MonadIO m, IsPixbufLoader a) =>
a
-> GLib.Bytes.Bytes
-> m ()
pixbufLoaderWriteBytes loader buffer = liftIO $ do
loader' <- unsafeManagedPtrCastPtr loader
buffer' <- unsafeManagedPtrGetPtr buffer
onException (do
_ <- propagateGError $ gdk_pixbuf_loader_write_bytes loader' buffer'
touchManagedPtr loader
touchManagedPtr buffer
return ()
) (do
return ()
)
#if ENABLE_OVERLOADING
data PixbufLoaderWriteBytesMethodInfo
instance (signature ~ (GLib.Bytes.Bytes -> m ()), MonadIO m, IsPixbufLoader a) => O.MethodInfo PixbufLoaderWriteBytesMethodInfo a signature where
overloadedMethod _ = pixbufLoaderWriteBytes
#endif