#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \
&& !defined(__HADDOCK_VERSION__))
module GI.GdkPixbuf.Objects.PixbufAnimationIter
(
PixbufAnimationIter(..) ,
IsPixbufAnimationIter ,
toPixbufAnimationIter ,
noPixbufAnimationIter ,
#if ENABLE_OVERLOADING
PixbufAnimationIterAdvanceMethodInfo ,
#endif
pixbufAnimationIterAdvance ,
#if ENABLE_OVERLOADING
PixbufAnimationIterGetDelayTimeMethodInfo,
#endif
pixbufAnimationIterGetDelayTime ,
#if ENABLE_OVERLOADING
PixbufAnimationIterGetPixbufMethodInfo ,
#endif
pixbufAnimationIterGetPixbuf ,
#if ENABLE_OVERLOADING
PixbufAnimationIterOnCurrentlyLoadingFrameMethodInfo,
#endif
pixbufAnimationIterOnCurrentlyLoadingFrame,
) 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.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.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GI.GLib.Structs.TimeVal as GLib.TimeVal
import qualified GI.GObject.Objects.Object as GObject.Object
import {-# SOURCE #-} qualified GI.GdkPixbuf.Objects.Pixbuf as GdkPixbuf.Pixbuf
newtype PixbufAnimationIter = PixbufAnimationIter (ManagedPtr PixbufAnimationIter)
foreign import ccall "gdk_pixbuf_animation_iter_get_type"
c_gdk_pixbuf_animation_iter_get_type :: IO GType
instance GObject PixbufAnimationIter where
gobjectType _ = c_gdk_pixbuf_animation_iter_get_type
class GObject o => IsPixbufAnimationIter o
#if MIN_VERSION_base(4,9,0)
instance {-# OVERLAPPABLE #-} (GObject a, O.UnknownAncestorError PixbufAnimationIter a) =>
IsPixbufAnimationIter a
#endif
instance IsPixbufAnimationIter PixbufAnimationIter
instance GObject.Object.IsObject PixbufAnimationIter
toPixbufAnimationIter :: (MonadIO m, IsPixbufAnimationIter o) => o -> m PixbufAnimationIter
toPixbufAnimationIter = liftIO . unsafeCastTo PixbufAnimationIter
noPixbufAnimationIter :: Maybe PixbufAnimationIter
noPixbufAnimationIter = Nothing
#if ENABLE_OVERLOADING
type family ResolvePixbufAnimationIterMethod (t :: Symbol) (o :: *) :: * where
ResolvePixbufAnimationIterMethod "advance" o = PixbufAnimationIterAdvanceMethodInfo
ResolvePixbufAnimationIterMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolvePixbufAnimationIterMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolvePixbufAnimationIterMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolvePixbufAnimationIterMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolvePixbufAnimationIterMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolvePixbufAnimationIterMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolvePixbufAnimationIterMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolvePixbufAnimationIterMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolvePixbufAnimationIterMethod "onCurrentlyLoadingFrame" o = PixbufAnimationIterOnCurrentlyLoadingFrameMethodInfo
ResolvePixbufAnimationIterMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolvePixbufAnimationIterMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolvePixbufAnimationIterMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolvePixbufAnimationIterMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolvePixbufAnimationIterMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolvePixbufAnimationIterMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolvePixbufAnimationIterMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolvePixbufAnimationIterMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolvePixbufAnimationIterMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolvePixbufAnimationIterMethod "getDelayTime" o = PixbufAnimationIterGetDelayTimeMethodInfo
ResolvePixbufAnimationIterMethod "getPixbuf" o = PixbufAnimationIterGetPixbufMethodInfo
ResolvePixbufAnimationIterMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolvePixbufAnimationIterMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolvePixbufAnimationIterMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolvePixbufAnimationIterMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolvePixbufAnimationIterMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolvePixbufAnimationIterMethod t PixbufAnimationIter, O.MethodInfo info PixbufAnimationIter p) => O.IsLabelProxy t (PixbufAnimationIter -> p) where
fromLabelProxy _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#if MIN_VERSION_base(4,9,0)
instance (info ~ ResolvePixbufAnimationIterMethod t PixbufAnimationIter, O.MethodInfo info PixbufAnimationIter p) => O.IsLabel t (PixbufAnimationIter -> 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
#endif
#if ENABLE_OVERLOADING
instance O.HasAttributeList PixbufAnimationIter
type instance O.AttributeList PixbufAnimationIter = PixbufAnimationIterAttributeList
type PixbufAnimationIterAttributeList = ('[ ] :: [(Symbol, *)])
#endif
#if ENABLE_OVERLOADING
#endif
#if ENABLE_OVERLOADING
type instance O.SignalList PixbufAnimationIter = PixbufAnimationIterSignalList
type PixbufAnimationIterSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "gdk_pixbuf_animation_iter_advance" gdk_pixbuf_animation_iter_advance ::
Ptr PixbufAnimationIter ->
Ptr GLib.TimeVal.TimeVal ->
IO CInt
pixbufAnimationIterAdvance ::
(B.CallStack.HasCallStack, MonadIO m, IsPixbufAnimationIter a) =>
a
-> Maybe (GLib.TimeVal.TimeVal)
-> m Bool
pixbufAnimationIterAdvance iter currentTime = liftIO $ do
iter' <- unsafeManagedPtrCastPtr iter
maybeCurrentTime <- case currentTime of
Nothing -> return nullPtr
Just jCurrentTime -> do
jCurrentTime' <- unsafeManagedPtrGetPtr jCurrentTime
return jCurrentTime'
result <- gdk_pixbuf_animation_iter_advance iter' maybeCurrentTime
let result' = (/= 0) result
touchManagedPtr iter
whenJust currentTime touchManagedPtr
return result'
#if ENABLE_OVERLOADING
data PixbufAnimationIterAdvanceMethodInfo
instance (signature ~ (Maybe (GLib.TimeVal.TimeVal) -> m Bool), MonadIO m, IsPixbufAnimationIter a) => O.MethodInfo PixbufAnimationIterAdvanceMethodInfo a signature where
overloadedMethod _ = pixbufAnimationIterAdvance
#endif
foreign import ccall "gdk_pixbuf_animation_iter_get_delay_time" gdk_pixbuf_animation_iter_get_delay_time ::
Ptr PixbufAnimationIter ->
IO Int32
pixbufAnimationIterGetDelayTime ::
(B.CallStack.HasCallStack, MonadIO m, IsPixbufAnimationIter a) =>
a
-> m Int32
pixbufAnimationIterGetDelayTime iter = liftIO $ do
iter' <- unsafeManagedPtrCastPtr iter
result <- gdk_pixbuf_animation_iter_get_delay_time iter'
touchManagedPtr iter
return result
#if ENABLE_OVERLOADING
data PixbufAnimationIterGetDelayTimeMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsPixbufAnimationIter a) => O.MethodInfo PixbufAnimationIterGetDelayTimeMethodInfo a signature where
overloadedMethod _ = pixbufAnimationIterGetDelayTime
#endif
foreign import ccall "gdk_pixbuf_animation_iter_get_pixbuf" gdk_pixbuf_animation_iter_get_pixbuf ::
Ptr PixbufAnimationIter ->
IO (Ptr GdkPixbuf.Pixbuf.Pixbuf)
pixbufAnimationIterGetPixbuf ::
(B.CallStack.HasCallStack, MonadIO m, IsPixbufAnimationIter a) =>
a
-> m GdkPixbuf.Pixbuf.Pixbuf
pixbufAnimationIterGetPixbuf iter = liftIO $ do
iter' <- unsafeManagedPtrCastPtr iter
result <- gdk_pixbuf_animation_iter_get_pixbuf iter'
checkUnexpectedReturnNULL "pixbufAnimationIterGetPixbuf" result
result' <- (newObject GdkPixbuf.Pixbuf.Pixbuf) result
touchManagedPtr iter
return result'
#if ENABLE_OVERLOADING
data PixbufAnimationIterGetPixbufMethodInfo
instance (signature ~ (m GdkPixbuf.Pixbuf.Pixbuf), MonadIO m, IsPixbufAnimationIter a) => O.MethodInfo PixbufAnimationIterGetPixbufMethodInfo a signature where
overloadedMethod _ = pixbufAnimationIterGetPixbuf
#endif
foreign import ccall "gdk_pixbuf_animation_iter_on_currently_loading_frame" gdk_pixbuf_animation_iter_on_currently_loading_frame ::
Ptr PixbufAnimationIter ->
IO CInt
pixbufAnimationIterOnCurrentlyLoadingFrame ::
(B.CallStack.HasCallStack, MonadIO m, IsPixbufAnimationIter a) =>
a
-> m Bool
pixbufAnimationIterOnCurrentlyLoadingFrame iter = liftIO $ do
iter' <- unsafeManagedPtrCastPtr iter
result <- gdk_pixbuf_animation_iter_on_currently_loading_frame iter'
let result' = (/= 0) result
touchManagedPtr iter
return result'
#if ENABLE_OVERLOADING
data PixbufAnimationIterOnCurrentlyLoadingFrameMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsPixbufAnimationIter a) => O.MethodInfo PixbufAnimationIterOnCurrentlyLoadingFrameMethodInfo a signature where
overloadedMethod _ = pixbufAnimationIterOnCurrentlyLoadingFrame
#endif