{-# LANGUAGE TypeApplications #-}


-- | Copyright  : Will Thompson and Iñaki García Etxebarria
-- License    : LGPL-2.1
-- Maintainer : Iñaki García Etxebarria
-- 
-- /No description available in the introspection data./

#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif

module GI.GdkPixbuf.Objects.PixbufSimpleAnimIter
    ( 

-- * Exported types
    PixbufSimpleAnimIter(..)                ,
    IsPixbufSimpleAnimIter                  ,
    toPixbufSimpleAnimIter                  ,


 -- * Methods
-- | 
-- 
--  === __Click to display all available methods, including inherited ones__
-- ==== Methods
-- [advance]("GI.GdkPixbuf.Objects.PixbufAnimationIter#g:method:advance"), [bindProperty]("GI.GObject.Objects.Object#g:method:bindProperty"), [bindPropertyFull]("GI.GObject.Objects.Object#g:method:bindPropertyFull"), [forceFloating]("GI.GObject.Objects.Object#g:method:forceFloating"), [freezeNotify]("GI.GObject.Objects.Object#g:method:freezeNotify"), [getv]("GI.GObject.Objects.Object#g:method:getv"), [isFloating]("GI.GObject.Objects.Object#g:method:isFloating"), [notify]("GI.GObject.Objects.Object#g:method:notify"), [notifyByPspec]("GI.GObject.Objects.Object#g:method:notifyByPspec"), [onCurrentlyLoadingFrame]("GI.GdkPixbuf.Objects.PixbufAnimationIter#g:method:onCurrentlyLoadingFrame"), [ref]("GI.GObject.Objects.Object#g:method:ref"), [refSink]("GI.GObject.Objects.Object#g:method:refSink"), [runDispose]("GI.GObject.Objects.Object#g:method:runDispose"), [stealData]("GI.GObject.Objects.Object#g:method:stealData"), [stealQdata]("GI.GObject.Objects.Object#g:method:stealQdata"), [thawNotify]("GI.GObject.Objects.Object#g:method:thawNotify"), [unref]("GI.GObject.Objects.Object#g:method:unref"), [watchClosure]("GI.GObject.Objects.Object#g:method:watchClosure").
-- 
-- ==== Getters
-- [getData]("GI.GObject.Objects.Object#g:method:getData"), [getDelayTime]("GI.GdkPixbuf.Objects.PixbufAnimationIter#g:method:getDelayTime"), [getPixbuf]("GI.GdkPixbuf.Objects.PixbufAnimationIter#g:method:getPixbuf"), [getProperty]("GI.GObject.Objects.Object#g:method:getProperty"), [getQdata]("GI.GObject.Objects.Object#g:method:getQdata").
-- 
-- ==== Setters
-- [setData]("GI.GObject.Objects.Object#g:method:setData"), [setDataFull]("GI.GObject.Objects.Object#g:method:setDataFull"), [setProperty]("GI.GObject.Objects.Object#g:method:setProperty").

#if defined(ENABLE_OVERLOADING)
    ResolvePixbufSimpleAnimIterMethod       ,
#endif



    ) where

import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P

import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.BasicTypes as B.Types
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GArray as B.GArray
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GHashTable as B.GHT
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Control.Monad.IO.Class as MIO
import qualified Data.Coerce as Coerce
import qualified Data.Text as T
import qualified Data.Kind as DK
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GHC.Records as R

import qualified GI.GObject.Objects.Object as GObject.Object
import {-# SOURCE #-} qualified GI.GdkPixbuf.Objects.PixbufAnimationIter as GdkPixbuf.PixbufAnimationIter

-- | Memory-managed wrapper type.
newtype PixbufSimpleAnimIter = PixbufSimpleAnimIter (SP.ManagedPtr PixbufSimpleAnimIter)
    deriving (PixbufSimpleAnimIter -> PixbufSimpleAnimIter -> Bool
(PixbufSimpleAnimIter -> PixbufSimpleAnimIter -> Bool)
-> (PixbufSimpleAnimIter -> PixbufSimpleAnimIter -> Bool)
-> Eq PixbufSimpleAnimIter
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PixbufSimpleAnimIter -> PixbufSimpleAnimIter -> Bool
== :: PixbufSimpleAnimIter -> PixbufSimpleAnimIter -> Bool
$c/= :: PixbufSimpleAnimIter -> PixbufSimpleAnimIter -> Bool
/= :: PixbufSimpleAnimIter -> PixbufSimpleAnimIter -> Bool
Eq)

instance SP.ManagedPtrNewtype PixbufSimpleAnimIter where
    toManagedPtr :: PixbufSimpleAnimIter -> ManagedPtr PixbufSimpleAnimIter
toManagedPtr (PixbufSimpleAnimIter ManagedPtr PixbufSimpleAnimIter
p) = ManagedPtr PixbufSimpleAnimIter
p

foreign import ccall "gdk_pixbuf_simple_anim_iter_get_type"
    c_gdk_pixbuf_simple_anim_iter_get_type :: IO B.Types.GType

instance B.Types.TypedObject PixbufSimpleAnimIter where
    glibType :: IO GType
glibType = IO GType
c_gdk_pixbuf_simple_anim_iter_get_type

instance B.Types.GObject PixbufSimpleAnimIter

-- | Type class for types which can be safely cast to `PixbufSimpleAnimIter`, for instance with `toPixbufSimpleAnimIter`.
class (SP.GObject o, O.IsDescendantOf PixbufSimpleAnimIter o) => IsPixbufSimpleAnimIter o
instance (SP.GObject o, O.IsDescendantOf PixbufSimpleAnimIter o) => IsPixbufSimpleAnimIter o

instance O.HasParentTypes PixbufSimpleAnimIter
type instance O.ParentTypes PixbufSimpleAnimIter = '[GdkPixbuf.PixbufAnimationIter.PixbufAnimationIter, GObject.Object.Object]

-- | Cast to `PixbufSimpleAnimIter`, for types for which this is known to be safe. For general casts, use `Data.GI.Base.ManagedPtr.castTo`.
toPixbufSimpleAnimIter :: (MIO.MonadIO m, IsPixbufSimpleAnimIter o) => o -> m PixbufSimpleAnimIter
toPixbufSimpleAnimIter :: forall (m :: * -> *) o.
(MonadIO m, IsPixbufSimpleAnimIter o) =>
o -> m PixbufSimpleAnimIter
toPixbufSimpleAnimIter = IO PixbufSimpleAnimIter -> m PixbufSimpleAnimIter
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO PixbufSimpleAnimIter -> m PixbufSimpleAnimIter)
-> (o -> IO PixbufSimpleAnimIter) -> o -> m PixbufSimpleAnimIter
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr PixbufSimpleAnimIter -> PixbufSimpleAnimIter)
-> o -> IO PixbufSimpleAnimIter
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
 ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr PixbufSimpleAnimIter -> PixbufSimpleAnimIter
PixbufSimpleAnimIter

-- | Convert 'PixbufSimpleAnimIter' to and from 'Data.GI.Base.GValue.GValue'. See 'Data.GI.Base.GValue.toGValue' and 'Data.GI.Base.GValue.fromGValue'.
instance B.GValue.IsGValue (Maybe PixbufSimpleAnimIter) where
    gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_gdk_pixbuf_simple_anim_iter_get_type
    gvalueSet_ :: Ptr GValue -> Maybe PixbufSimpleAnimIter -> IO ()
gvalueSet_ Ptr GValue
gv Maybe PixbufSimpleAnimIter
P.Nothing = Ptr GValue -> Ptr PixbufSimpleAnimIter -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr PixbufSimpleAnimIter
forall a. Ptr a
FP.nullPtr :: FP.Ptr PixbufSimpleAnimIter)
    gvalueSet_ Ptr GValue
gv (P.Just PixbufSimpleAnimIter
obj) = PixbufSimpleAnimIter
-> (Ptr PixbufSimpleAnimIter -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr PixbufSimpleAnimIter
obj (Ptr GValue -> Ptr PixbufSimpleAnimIter -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
    gvalueGet_ :: Ptr GValue -> IO (Maybe PixbufSimpleAnimIter)
gvalueGet_ Ptr GValue
gv = do
        Ptr PixbufSimpleAnimIter
ptr <- Ptr GValue -> IO (Ptr PixbufSimpleAnimIter)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr PixbufSimpleAnimIter)
        if Ptr PixbufSimpleAnimIter
ptr Ptr PixbufSimpleAnimIter -> Ptr PixbufSimpleAnimIter -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr PixbufSimpleAnimIter
forall a. Ptr a
FP.nullPtr
        then PixbufSimpleAnimIter -> Maybe PixbufSimpleAnimIter
forall a. a -> Maybe a
P.Just (PixbufSimpleAnimIter -> Maybe PixbufSimpleAnimIter)
-> IO PixbufSimpleAnimIter -> IO (Maybe PixbufSimpleAnimIter)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr PixbufSimpleAnimIter -> PixbufSimpleAnimIter)
-> Ptr PixbufSimpleAnimIter -> IO PixbufSimpleAnimIter
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr PixbufSimpleAnimIter -> PixbufSimpleAnimIter
PixbufSimpleAnimIter Ptr PixbufSimpleAnimIter
ptr
        else Maybe PixbufSimpleAnimIter -> IO (Maybe PixbufSimpleAnimIter)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe PixbufSimpleAnimIter
forall a. Maybe a
P.Nothing
        
    

#if defined(ENABLE_OVERLOADING)
type family ResolvePixbufSimpleAnimIterMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
    ResolvePixbufSimpleAnimIterMethod "advance" o = GdkPixbuf.PixbufAnimationIter.PixbufAnimationIterAdvanceMethodInfo
    ResolvePixbufSimpleAnimIterMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
    ResolvePixbufSimpleAnimIterMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
    ResolvePixbufSimpleAnimIterMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
    ResolvePixbufSimpleAnimIterMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
    ResolvePixbufSimpleAnimIterMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
    ResolvePixbufSimpleAnimIterMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
    ResolvePixbufSimpleAnimIterMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
    ResolvePixbufSimpleAnimIterMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
    ResolvePixbufSimpleAnimIterMethod "onCurrentlyLoadingFrame" o = GdkPixbuf.PixbufAnimationIter.PixbufAnimationIterOnCurrentlyLoadingFrameMethodInfo
    ResolvePixbufSimpleAnimIterMethod "ref" o = GObject.Object.ObjectRefMethodInfo
    ResolvePixbufSimpleAnimIterMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
    ResolvePixbufSimpleAnimIterMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
    ResolvePixbufSimpleAnimIterMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
    ResolvePixbufSimpleAnimIterMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
    ResolvePixbufSimpleAnimIterMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
    ResolvePixbufSimpleAnimIterMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
    ResolvePixbufSimpleAnimIterMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
    ResolvePixbufSimpleAnimIterMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
    ResolvePixbufSimpleAnimIterMethod "getDelayTime" o = GdkPixbuf.PixbufAnimationIter.PixbufAnimationIterGetDelayTimeMethodInfo
    ResolvePixbufSimpleAnimIterMethod "getPixbuf" o = GdkPixbuf.PixbufAnimationIter.PixbufAnimationIterGetPixbufMethodInfo
    ResolvePixbufSimpleAnimIterMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
    ResolvePixbufSimpleAnimIterMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
    ResolvePixbufSimpleAnimIterMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
    ResolvePixbufSimpleAnimIterMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
    ResolvePixbufSimpleAnimIterMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
    ResolvePixbufSimpleAnimIterMethod l o = O.MethodResolutionFailed l o

instance (info ~ ResolvePixbufSimpleAnimIterMethod t PixbufSimpleAnimIter, O.OverloadedMethod info PixbufSimpleAnimIter p) => OL.IsLabel t (PixbufSimpleAnimIter -> p) where
#if MIN_VERSION_base(4,10,0)
    fromLabel = O.overloadedMethod @info
#else
    fromLabel _ = O.overloadedMethod @info
#endif

#if MIN_VERSION_base(4,13,0)
instance (info ~ ResolvePixbufSimpleAnimIterMethod t PixbufSimpleAnimIter, O.OverloadedMethod info PixbufSimpleAnimIter p, R.HasField t PixbufSimpleAnimIter p) => R.HasField t PixbufSimpleAnimIter p where
    getField = O.overloadedMethod @info

#endif

instance (info ~ ResolvePixbufSimpleAnimIterMethod t PixbufSimpleAnimIter, O.OverloadedMethodInfo info PixbufSimpleAnimIter) => OL.IsLabel t (O.MethodProxy info PixbufSimpleAnimIter) where
#if MIN_VERSION_base(4,10,0)
    fromLabel = O.MethodProxy
#else
    fromLabel _ = O.MethodProxy
#endif

#endif

#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList PixbufSimpleAnimIter
type instance O.AttributeList PixbufSimpleAnimIter = PixbufSimpleAnimIterAttributeList
type PixbufSimpleAnimIterAttributeList = ('[ ] :: [(Symbol, DK.Type)])
#endif

#if defined(ENABLE_OVERLOADING)
#endif

#if defined(ENABLE_OVERLOADING)
type instance O.SignalList PixbufSimpleAnimIter = PixbufSimpleAnimIterSignalList
type PixbufSimpleAnimIterSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, DK.Type)])

#endif