#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \
&& !defined(__HADDOCK_VERSION__))
module GI.GdkPixbuf.Objects.PixbufSimpleAnim
(
PixbufSimpleAnim(..) ,
IsPixbufSimpleAnim ,
toPixbufSimpleAnim ,
noPixbufSimpleAnim ,
#if ENABLE_OVERLOADING
PixbufSimpleAnimAddFrameMethodInfo ,
#endif
pixbufSimpleAnimAddFrame ,
#if ENABLE_OVERLOADING
PixbufSimpleAnimGetLoopMethodInfo ,
#endif
pixbufSimpleAnimGetLoop ,
pixbufSimpleAnimNew ,
#if ENABLE_OVERLOADING
PixbufSimpleAnimSetLoopMethodInfo ,
#endif
pixbufSimpleAnimSetLoop ,
#if ENABLE_OVERLOADING
PixbufSimpleAnimLoopPropertyInfo ,
#endif
constructPixbufSimpleAnimLoop ,
getPixbufSimpleAnimLoop ,
#if ENABLE_OVERLOADING
pixbufSimpleAnimLoop ,
#endif
setPixbufSimpleAnimLoop ,
) 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.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
newtype PixbufSimpleAnim = PixbufSimpleAnim (ManagedPtr PixbufSimpleAnim)
foreign import ccall "gdk_pixbuf_simple_anim_get_type"
c_gdk_pixbuf_simple_anim_get_type :: IO GType
instance GObject PixbufSimpleAnim where
gobjectType = c_gdk_pixbuf_simple_anim_get_type
class (GObject o, O.IsDescendantOf PixbufSimpleAnim o) => IsPixbufSimpleAnim o
instance (GObject o, O.IsDescendantOf PixbufSimpleAnim o) => IsPixbufSimpleAnim o
instance O.HasParentTypes PixbufSimpleAnim
type instance O.ParentTypes PixbufSimpleAnim = '[GdkPixbuf.PixbufAnimation.PixbufAnimation, GObject.Object.Object]
toPixbufSimpleAnim :: (MonadIO m, IsPixbufSimpleAnim o) => o -> m PixbufSimpleAnim
toPixbufSimpleAnim = liftIO . unsafeCastTo PixbufSimpleAnim
noPixbufSimpleAnim :: Maybe PixbufSimpleAnim
noPixbufSimpleAnim = Nothing
#if ENABLE_OVERLOADING
type family ResolvePixbufSimpleAnimMethod (t :: Symbol) (o :: *) :: * where
ResolvePixbufSimpleAnimMethod "addFrame" o = PixbufSimpleAnimAddFrameMethodInfo
ResolvePixbufSimpleAnimMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolvePixbufSimpleAnimMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolvePixbufSimpleAnimMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolvePixbufSimpleAnimMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolvePixbufSimpleAnimMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolvePixbufSimpleAnimMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolvePixbufSimpleAnimMethod "isStaticImage" o = GdkPixbuf.PixbufAnimation.PixbufAnimationIsStaticImageMethodInfo
ResolvePixbufSimpleAnimMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolvePixbufSimpleAnimMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolvePixbufSimpleAnimMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolvePixbufSimpleAnimMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolvePixbufSimpleAnimMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolvePixbufSimpleAnimMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolvePixbufSimpleAnimMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolvePixbufSimpleAnimMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolvePixbufSimpleAnimMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolvePixbufSimpleAnimMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolvePixbufSimpleAnimMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolvePixbufSimpleAnimMethod "getHeight" o = GdkPixbuf.PixbufAnimation.PixbufAnimationGetHeightMethodInfo
ResolvePixbufSimpleAnimMethod "getIter" o = GdkPixbuf.PixbufAnimation.PixbufAnimationGetIterMethodInfo
ResolvePixbufSimpleAnimMethod "getLoop" o = PixbufSimpleAnimGetLoopMethodInfo
ResolvePixbufSimpleAnimMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolvePixbufSimpleAnimMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolvePixbufSimpleAnimMethod "getStaticImage" o = GdkPixbuf.PixbufAnimation.PixbufAnimationGetStaticImageMethodInfo
ResolvePixbufSimpleAnimMethod "getWidth" o = GdkPixbuf.PixbufAnimation.PixbufAnimationGetWidthMethodInfo
ResolvePixbufSimpleAnimMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolvePixbufSimpleAnimMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolvePixbufSimpleAnimMethod "setLoop" o = PixbufSimpleAnimSetLoopMethodInfo
ResolvePixbufSimpleAnimMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolvePixbufSimpleAnimMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolvePixbufSimpleAnimMethod t PixbufSimpleAnim, O.MethodInfo info PixbufSimpleAnim p) => OL.IsLabel t (PixbufSimpleAnim -> 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
getPixbufSimpleAnimLoop :: (MonadIO m, IsPixbufSimpleAnim o) => o -> m Bool
getPixbufSimpleAnimLoop obj = liftIO $ B.Properties.getObjectPropertyBool obj "loop"
setPixbufSimpleAnimLoop :: (MonadIO m, IsPixbufSimpleAnim o) => o -> Bool -> m ()
setPixbufSimpleAnimLoop obj val = liftIO $ B.Properties.setObjectPropertyBool obj "loop" val
constructPixbufSimpleAnimLoop :: (IsPixbufSimpleAnim o) => Bool -> IO (GValueConstruct o)
constructPixbufSimpleAnimLoop val = B.Properties.constructObjectPropertyBool "loop" val
#if ENABLE_OVERLOADING
data PixbufSimpleAnimLoopPropertyInfo
instance AttrInfo PixbufSimpleAnimLoopPropertyInfo where
type AttrAllowedOps PixbufSimpleAnimLoopPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint PixbufSimpleAnimLoopPropertyInfo = (~) Bool
type AttrBaseTypeConstraint PixbufSimpleAnimLoopPropertyInfo = IsPixbufSimpleAnim
type AttrGetType PixbufSimpleAnimLoopPropertyInfo = Bool
type AttrLabel PixbufSimpleAnimLoopPropertyInfo = "loop"
type AttrOrigin PixbufSimpleAnimLoopPropertyInfo = PixbufSimpleAnim
attrGet _ = getPixbufSimpleAnimLoop
attrSet _ = setPixbufSimpleAnimLoop
attrConstruct _ = constructPixbufSimpleAnimLoop
attrClear _ = undefined
#endif
#if ENABLE_OVERLOADING
instance O.HasAttributeList PixbufSimpleAnim
type instance O.AttributeList PixbufSimpleAnim = PixbufSimpleAnimAttributeList
type PixbufSimpleAnimAttributeList = ('[ '("loop", PixbufSimpleAnimLoopPropertyInfo)] :: [(Symbol, *)])
#endif
#if ENABLE_OVERLOADING
pixbufSimpleAnimLoop :: AttrLabelProxy "loop"
pixbufSimpleAnimLoop = AttrLabelProxy
#endif
#if ENABLE_OVERLOADING
type instance O.SignalList PixbufSimpleAnim = PixbufSimpleAnimSignalList
type PixbufSimpleAnimSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "gdk_pixbuf_simple_anim_new" gdk_pixbuf_simple_anim_new ::
Int32 ->
Int32 ->
CFloat ->
IO (Ptr PixbufSimpleAnim)
pixbufSimpleAnimNew ::
(B.CallStack.HasCallStack, MonadIO m) =>
Int32
-> Int32
-> Float
-> m PixbufSimpleAnim
pixbufSimpleAnimNew width height rate = liftIO $ do
let rate' = realToFrac rate
result <- gdk_pixbuf_simple_anim_new width height rate'
checkUnexpectedReturnNULL "pixbufSimpleAnimNew" result
result' <- (wrapObject PixbufSimpleAnim) result
return result'
#if ENABLE_OVERLOADING
#endif
foreign import ccall "gdk_pixbuf_simple_anim_add_frame" gdk_pixbuf_simple_anim_add_frame ::
Ptr PixbufSimpleAnim ->
Ptr GdkPixbuf.Pixbuf.Pixbuf ->
IO ()
pixbufSimpleAnimAddFrame ::
(B.CallStack.HasCallStack, MonadIO m, IsPixbufSimpleAnim a, GdkPixbuf.Pixbuf.IsPixbuf b) =>
a
-> b
-> m ()
pixbufSimpleAnimAddFrame animation pixbuf = liftIO $ do
animation' <- unsafeManagedPtrCastPtr animation
pixbuf' <- unsafeManagedPtrCastPtr pixbuf
gdk_pixbuf_simple_anim_add_frame animation' pixbuf'
touchManagedPtr animation
touchManagedPtr pixbuf
return ()
#if ENABLE_OVERLOADING
data PixbufSimpleAnimAddFrameMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsPixbufSimpleAnim a, GdkPixbuf.Pixbuf.IsPixbuf b) => O.MethodInfo PixbufSimpleAnimAddFrameMethodInfo a signature where
overloadedMethod _ = pixbufSimpleAnimAddFrame
#endif
foreign import ccall "gdk_pixbuf_simple_anim_get_loop" gdk_pixbuf_simple_anim_get_loop ::
Ptr PixbufSimpleAnim ->
IO CInt
pixbufSimpleAnimGetLoop ::
(B.CallStack.HasCallStack, MonadIO m, IsPixbufSimpleAnim a) =>
a
-> m Bool
pixbufSimpleAnimGetLoop animation = liftIO $ do
animation' <- unsafeManagedPtrCastPtr animation
result <- gdk_pixbuf_simple_anim_get_loop animation'
let result' = (/= 0) result
touchManagedPtr animation
return result'
#if ENABLE_OVERLOADING
data PixbufSimpleAnimGetLoopMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsPixbufSimpleAnim a) => O.MethodInfo PixbufSimpleAnimGetLoopMethodInfo a signature where
overloadedMethod _ = pixbufSimpleAnimGetLoop
#endif
foreign import ccall "gdk_pixbuf_simple_anim_set_loop" gdk_pixbuf_simple_anim_set_loop ::
Ptr PixbufSimpleAnim ->
CInt ->
IO ()
pixbufSimpleAnimSetLoop ::
(B.CallStack.HasCallStack, MonadIO m, IsPixbufSimpleAnim a) =>
a
-> Bool
-> m ()
pixbufSimpleAnimSetLoop animation loop = liftIO $ do
animation' <- unsafeManagedPtrCastPtr animation
let loop' = (fromIntegral . fromEnum) loop
gdk_pixbuf_simple_anim_set_loop animation' loop'
touchManagedPtr animation
return ()
#if ENABLE_OVERLOADING
data PixbufSimpleAnimSetLoopMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsPixbufSimpleAnim a) => O.MethodInfo PixbufSimpleAnimSetLoopMethodInfo a signature where
overloadedMethod _ = pixbufSimpleAnimSetLoop
#endif