{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Adw.Objects.AnimationTarget
(
AnimationTarget(..) ,
IsAnimationTarget ,
toAnimationTarget ,
#if defined(ENABLE_OVERLOADING)
ResolveAnimationTargetMethod ,
#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.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
newtype AnimationTarget = AnimationTarget (SP.ManagedPtr AnimationTarget)
deriving (AnimationTarget -> AnimationTarget -> Bool
(AnimationTarget -> AnimationTarget -> Bool)
-> (AnimationTarget -> AnimationTarget -> Bool)
-> Eq AnimationTarget
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: AnimationTarget -> AnimationTarget -> Bool
== :: AnimationTarget -> AnimationTarget -> Bool
$c/= :: AnimationTarget -> AnimationTarget -> Bool
/= :: AnimationTarget -> AnimationTarget -> Bool
Eq)
instance SP.ManagedPtrNewtype AnimationTarget where
toManagedPtr :: AnimationTarget -> ManagedPtr AnimationTarget
toManagedPtr (AnimationTarget ManagedPtr AnimationTarget
p) = ManagedPtr AnimationTarget
p
foreign import ccall "adw_animation_target_get_type"
c_adw_animation_target_get_type :: IO B.Types.GType
instance B.Types.TypedObject AnimationTarget where
glibType :: IO GType
glibType = IO GType
c_adw_animation_target_get_type
instance B.Types.GObject AnimationTarget
class (SP.GObject o, O.IsDescendantOf AnimationTarget o) => IsAnimationTarget o
instance (SP.GObject o, O.IsDescendantOf AnimationTarget o) => IsAnimationTarget o
instance O.HasParentTypes AnimationTarget
type instance O.ParentTypes AnimationTarget = '[GObject.Object.Object]
toAnimationTarget :: (MIO.MonadIO m, IsAnimationTarget o) => o -> m AnimationTarget
toAnimationTarget :: forall (m :: * -> *) o.
(MonadIO m, IsAnimationTarget o) =>
o -> m AnimationTarget
toAnimationTarget = IO AnimationTarget -> m AnimationTarget
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO AnimationTarget -> m AnimationTarget)
-> (o -> IO AnimationTarget) -> o -> m AnimationTarget
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr AnimationTarget -> AnimationTarget)
-> o -> IO AnimationTarget
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr AnimationTarget -> AnimationTarget
AnimationTarget
instance B.GValue.IsGValue (Maybe AnimationTarget) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_adw_animation_target_get_type
gvalueSet_ :: Ptr GValue -> Maybe AnimationTarget -> IO ()
gvalueSet_ Ptr GValue
gv Maybe AnimationTarget
P.Nothing = Ptr GValue -> Ptr AnimationTarget -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr AnimationTarget
forall a. Ptr a
FP.nullPtr :: FP.Ptr AnimationTarget)
gvalueSet_ Ptr GValue
gv (P.Just AnimationTarget
obj) = AnimationTarget -> (Ptr AnimationTarget -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr AnimationTarget
obj (Ptr GValue -> Ptr AnimationTarget -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe AnimationTarget)
gvalueGet_ Ptr GValue
gv = do
Ptr AnimationTarget
ptr <- Ptr GValue -> IO (Ptr AnimationTarget)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr AnimationTarget)
if Ptr AnimationTarget
ptr Ptr AnimationTarget -> Ptr AnimationTarget -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr AnimationTarget
forall a. Ptr a
FP.nullPtr
then AnimationTarget -> Maybe AnimationTarget
forall a. a -> Maybe a
P.Just (AnimationTarget -> Maybe AnimationTarget)
-> IO AnimationTarget -> IO (Maybe AnimationTarget)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr AnimationTarget -> AnimationTarget)
-> Ptr AnimationTarget -> IO AnimationTarget
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr AnimationTarget -> AnimationTarget
AnimationTarget Ptr AnimationTarget
ptr
else Maybe AnimationTarget -> IO (Maybe AnimationTarget)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe AnimationTarget
forall a. Maybe a
P.Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolveAnimationTargetMethod (t :: Symbol) (o :: *) :: * where
ResolveAnimationTargetMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveAnimationTargetMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveAnimationTargetMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveAnimationTargetMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveAnimationTargetMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveAnimationTargetMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveAnimationTargetMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveAnimationTargetMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveAnimationTargetMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveAnimationTargetMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveAnimationTargetMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveAnimationTargetMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveAnimationTargetMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveAnimationTargetMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveAnimationTargetMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveAnimationTargetMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveAnimationTargetMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveAnimationTargetMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveAnimationTargetMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveAnimationTargetMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveAnimationTargetMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveAnimationTargetMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveAnimationTargetMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveAnimationTargetMethod t AnimationTarget, O.OverloadedMethod info AnimationTarget p) => OL.IsLabel t (AnimationTarget -> 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 ~ ResolveAnimationTargetMethod t AnimationTarget, O.OverloadedMethod info AnimationTarget p, R.HasField t AnimationTarget p) => R.HasField t AnimationTarget p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveAnimationTargetMethod t AnimationTarget, O.OverloadedMethodInfo info AnimationTarget) => OL.IsLabel t (O.MethodProxy info AnimationTarget) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList AnimationTarget
type instance O.AttributeList AnimationTarget = AnimationTargetAttributeList
type AnimationTargetAttributeList = ('[ ] :: [(Symbol, *)])
#endif
#if defined(ENABLE_OVERLOADING)
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList AnimationTarget = AnimationTargetSignalList
type AnimationTargetSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])
#endif