{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Clutter.Objects.Animator
(
Animator(..) ,
IsAnimator ,
toAnimator ,
#if defined(ENABLE_OVERLOADING)
ResolveAnimatorMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
AnimatorComputeValueMethodInfo ,
#endif
animatorComputeValue ,
#if defined(ENABLE_OVERLOADING)
AnimatorGetDurationMethodInfo ,
#endif
animatorGetDuration ,
#if defined(ENABLE_OVERLOADING)
AnimatorGetKeysMethodInfo ,
#endif
animatorGetKeys ,
#if defined(ENABLE_OVERLOADING)
AnimatorGetTimelineMethodInfo ,
#endif
animatorGetTimeline ,
animatorNew ,
#if defined(ENABLE_OVERLOADING)
AnimatorPropertyGetEaseInMethodInfo ,
#endif
animatorPropertyGetEaseIn ,
#if defined(ENABLE_OVERLOADING)
AnimatorPropertyGetInterpolationMethodInfo,
#endif
animatorPropertyGetInterpolation ,
#if defined(ENABLE_OVERLOADING)
AnimatorPropertySetEaseInMethodInfo ,
#endif
animatorPropertySetEaseIn ,
#if defined(ENABLE_OVERLOADING)
AnimatorPropertySetInterpolationMethodInfo,
#endif
animatorPropertySetInterpolation ,
#if defined(ENABLE_OVERLOADING)
AnimatorRemoveKeyMethodInfo ,
#endif
animatorRemoveKey ,
#if defined(ENABLE_OVERLOADING)
AnimatorSetDurationMethodInfo ,
#endif
animatorSetDuration ,
#if defined(ENABLE_OVERLOADING)
AnimatorSetKeyMethodInfo ,
#endif
animatorSetKey ,
#if defined(ENABLE_OVERLOADING)
AnimatorSetTimelineMethodInfo ,
#endif
animatorSetTimeline ,
#if defined(ENABLE_OVERLOADING)
AnimatorStartMethodInfo ,
#endif
animatorStart ,
#if defined(ENABLE_OVERLOADING)
AnimatorDurationPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
animatorDuration ,
#endif
constructAnimatorDuration ,
getAnimatorDuration ,
setAnimatorDuration ,
#if defined(ENABLE_OVERLOADING)
AnimatorTimelinePropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
animatorTimeline ,
#endif
constructAnimatorTimeline ,
getAnimatorTimeline ,
setAnimatorTimeline ,
) 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 {-# SOURCE #-} qualified GI.Clutter.Enums as Clutter.Enums
import {-# SOURCE #-} qualified GI.Clutter.Interfaces.Scriptable as Clutter.Scriptable
import {-# SOURCE #-} qualified GI.Clutter.Objects.Timeline as Clutter.Timeline
import {-# SOURCE #-} qualified GI.Clutter.Structs.AnimatorKey as Clutter.AnimatorKey
import qualified GI.GObject.Objects.Object as GObject.Object
newtype Animator = Animator (SP.ManagedPtr Animator)
deriving (Animator -> Animator -> Bool
(Animator -> Animator -> Bool)
-> (Animator -> Animator -> Bool) -> Eq Animator
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Animator -> Animator -> Bool
== :: Animator -> Animator -> Bool
$c/= :: Animator -> Animator -> Bool
/= :: Animator -> Animator -> Bool
Eq)
instance SP.ManagedPtrNewtype Animator where
toManagedPtr :: Animator -> ManagedPtr Animator
toManagedPtr (Animator ManagedPtr Animator
p) = ManagedPtr Animator
p
foreign import ccall "clutter_animator_get_type"
c_clutter_animator_get_type :: IO B.Types.GType
instance B.Types.TypedObject Animator where
glibType :: IO GType
glibType = IO GType
c_clutter_animator_get_type
instance B.Types.GObject Animator
class (SP.GObject o, O.IsDescendantOf Animator o) => IsAnimator o
instance (SP.GObject o, O.IsDescendantOf Animator o) => IsAnimator o
instance O.HasParentTypes Animator
type instance O.ParentTypes Animator = '[GObject.Object.Object, Clutter.Scriptable.Scriptable]
toAnimator :: (MIO.MonadIO m, IsAnimator o) => o -> m Animator
toAnimator :: forall (m :: * -> *) o.
(MonadIO m, IsAnimator o) =>
o -> m Animator
toAnimator = IO Animator -> m Animator
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Animator -> m Animator)
-> (o -> IO Animator) -> o -> m Animator
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr Animator -> Animator) -> o -> IO Animator
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr Animator -> Animator
Animator
instance B.GValue.IsGValue (Maybe Animator) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_clutter_animator_get_type
gvalueSet_ :: Ptr GValue -> Maybe Animator -> IO ()
gvalueSet_ Ptr GValue
gv Maybe Animator
P.Nothing = Ptr GValue -> Ptr Animator -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr Animator
forall a. Ptr a
FP.nullPtr :: FP.Ptr Animator)
gvalueSet_ Ptr GValue
gv (P.Just Animator
obj) = Animator -> (Ptr Animator -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr Animator
obj (Ptr GValue -> Ptr Animator -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe Animator)
gvalueGet_ Ptr GValue
gv = do
Ptr Animator
ptr <- Ptr GValue -> IO (Ptr Animator)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr Animator)
if Ptr Animator
ptr Ptr Animator -> Ptr Animator -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr Animator
forall a. Ptr a
FP.nullPtr
then Animator -> Maybe Animator
forall a. a -> Maybe a
P.Just (Animator -> Maybe Animator) -> IO Animator -> IO (Maybe Animator)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr Animator -> Animator) -> Ptr Animator -> IO Animator
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr Animator -> Animator
Animator Ptr Animator
ptr
else Maybe Animator -> IO (Maybe Animator)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Animator
forall a. Maybe a
P.Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolveAnimatorMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
ResolveAnimatorMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveAnimatorMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveAnimatorMethod "computeValue" o = AnimatorComputeValueMethodInfo
ResolveAnimatorMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveAnimatorMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveAnimatorMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveAnimatorMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveAnimatorMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveAnimatorMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveAnimatorMethod "parseCustomNode" o = Clutter.Scriptable.ScriptableParseCustomNodeMethodInfo
ResolveAnimatorMethod "propertyGetEaseIn" o = AnimatorPropertyGetEaseInMethodInfo
ResolveAnimatorMethod "propertyGetInterpolation" o = AnimatorPropertyGetInterpolationMethodInfo
ResolveAnimatorMethod "propertySetEaseIn" o = AnimatorPropertySetEaseInMethodInfo
ResolveAnimatorMethod "propertySetInterpolation" o = AnimatorPropertySetInterpolationMethodInfo
ResolveAnimatorMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveAnimatorMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveAnimatorMethod "removeKey" o = AnimatorRemoveKeyMethodInfo
ResolveAnimatorMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveAnimatorMethod "start" o = AnimatorStartMethodInfo
ResolveAnimatorMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveAnimatorMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveAnimatorMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveAnimatorMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveAnimatorMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveAnimatorMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveAnimatorMethod "getDuration" o = AnimatorGetDurationMethodInfo
ResolveAnimatorMethod "getId" o = Clutter.Scriptable.ScriptableGetIdMethodInfo
ResolveAnimatorMethod "getKeys" o = AnimatorGetKeysMethodInfo
ResolveAnimatorMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveAnimatorMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveAnimatorMethod "getTimeline" o = AnimatorGetTimelineMethodInfo
ResolveAnimatorMethod "setCustomProperty" o = Clutter.Scriptable.ScriptableSetCustomPropertyMethodInfo
ResolveAnimatorMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveAnimatorMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveAnimatorMethod "setDuration" o = AnimatorSetDurationMethodInfo
ResolveAnimatorMethod "setId" o = Clutter.Scriptable.ScriptableSetIdMethodInfo
ResolveAnimatorMethod "setKey" o = AnimatorSetKeyMethodInfo
ResolveAnimatorMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveAnimatorMethod "setTimeline" o = AnimatorSetTimelineMethodInfo
ResolveAnimatorMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveAnimatorMethod t Animator, O.OverloadedMethod info Animator p) => OL.IsLabel t (Animator -> 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 ~ ResolveAnimatorMethod t Animator, O.OverloadedMethod info Animator p, R.HasField t Animator p) => R.HasField t Animator p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveAnimatorMethod t Animator, O.OverloadedMethodInfo info Animator) => OL.IsLabel t (O.MethodProxy info Animator) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif
getAnimatorDuration :: (MonadIO m, IsAnimator o) => o -> m Word32
getAnimatorDuration :: forall (m :: * -> *) o. (MonadIO m, IsAnimator o) => o -> m Word32
getAnimatorDuration o
obj = IO Word32 -> m Word32
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Word32
forall a. GObject a => a -> String -> IO Word32
B.Properties.getObjectPropertyUInt32 o
obj String
"duration"
setAnimatorDuration :: (MonadIO m, IsAnimator o) => o -> Word32 -> m ()
setAnimatorDuration :: forall (m :: * -> *) o.
(MonadIO m, IsAnimator o) =>
o -> Word32 -> m ()
setAnimatorDuration o
obj Word32
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
o -> String -> Word32 -> IO ()
forall a. GObject a => a -> String -> Word32 -> IO ()
B.Properties.setObjectPropertyUInt32 o
obj String
"duration" Word32
val
constructAnimatorDuration :: (IsAnimator o, MIO.MonadIO m) => Word32 -> m (GValueConstruct o)
constructAnimatorDuration :: forall o (m :: * -> *).
(IsAnimator o, MonadIO m) =>
Word32 -> m (GValueConstruct o)
constructAnimatorDuration Word32
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a. IO a -> IO a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Word32 -> IO (GValueConstruct o)
forall o. String -> Word32 -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyUInt32 String
"duration" Word32
val
#if defined(ENABLE_OVERLOADING)
data AnimatorDurationPropertyInfo
instance AttrInfo AnimatorDurationPropertyInfo where
type AttrAllowedOps AnimatorDurationPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint AnimatorDurationPropertyInfo = IsAnimator
type AttrSetTypeConstraint AnimatorDurationPropertyInfo = (~) Word32
type AttrTransferTypeConstraint AnimatorDurationPropertyInfo = (~) Word32
type AttrTransferType AnimatorDurationPropertyInfo = Word32
type AttrGetType AnimatorDurationPropertyInfo = Word32
type AttrLabel AnimatorDurationPropertyInfo = "duration"
type AttrOrigin AnimatorDurationPropertyInfo = Animator
attrGet = getAnimatorDuration
attrSet = setAnimatorDuration
attrTransfer _ v = do
return v
attrConstruct = constructAnimatorDuration
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Clutter.Objects.Animator.duration"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-clutter-1.0.5/docs/GI-Clutter-Objects-Animator.html#g:attr:duration"
})
#endif
getAnimatorTimeline :: (MonadIO m, IsAnimator o) => o -> m Clutter.Timeline.Timeline
getAnimatorTimeline :: forall (m :: * -> *) o.
(MonadIO m, IsAnimator o) =>
o -> m Timeline
getAnimatorTimeline o
obj = IO Timeline -> m Timeline
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Timeline -> m Timeline) -> IO Timeline -> m Timeline
forall a b. (a -> b) -> a -> b
$ Text -> IO (Maybe Timeline) -> IO Timeline
forall a. HasCallStack => Text -> IO (Maybe a) -> IO a
checkUnexpectedNothing Text
"getAnimatorTimeline" (IO (Maybe Timeline) -> IO Timeline)
-> IO (Maybe Timeline) -> IO Timeline
forall a b. (a -> b) -> a -> b
$ o
-> String
-> (ManagedPtr Timeline -> Timeline)
-> IO (Maybe Timeline)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj String
"timeline" ManagedPtr Timeline -> Timeline
Clutter.Timeline.Timeline
setAnimatorTimeline :: (MonadIO m, IsAnimator o, Clutter.Timeline.IsTimeline a) => o -> a -> m ()
setAnimatorTimeline :: forall (m :: * -> *) o a.
(MonadIO m, IsAnimator o, IsTimeline a) =>
o -> a -> m ()
setAnimatorTimeline o
obj a
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
o -> String -> Maybe a -> IO ()
forall a b.
(GObject a, GObject b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyObject o
obj String
"timeline" (a -> Maybe a
forall a. a -> Maybe a
Just a
val)
constructAnimatorTimeline :: (IsAnimator o, MIO.MonadIO m, Clutter.Timeline.IsTimeline a) => a -> m (GValueConstruct o)
constructAnimatorTimeline :: forall o (m :: * -> *) a.
(IsAnimator o, MonadIO m, IsTimeline a) =>
a -> m (GValueConstruct o)
constructAnimatorTimeline a
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a. IO a -> IO a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe a -> IO (GValueConstruct o)
forall a o.
GObject a =>
String -> Maybe a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyObject String
"timeline" (a -> Maybe a
forall a. a -> Maybe a
P.Just a
val)
#if defined(ENABLE_OVERLOADING)
data AnimatorTimelinePropertyInfo
instance AttrInfo AnimatorTimelinePropertyInfo where
type AttrAllowedOps AnimatorTimelinePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint AnimatorTimelinePropertyInfo = IsAnimator
type AttrSetTypeConstraint AnimatorTimelinePropertyInfo = Clutter.Timeline.IsTimeline
type AttrTransferTypeConstraint AnimatorTimelinePropertyInfo = Clutter.Timeline.IsTimeline
type AttrTransferType AnimatorTimelinePropertyInfo = Clutter.Timeline.Timeline
type AttrGetType AnimatorTimelinePropertyInfo = Clutter.Timeline.Timeline
type AttrLabel AnimatorTimelinePropertyInfo = "timeline"
type AttrOrigin AnimatorTimelinePropertyInfo = Animator
attrGet = getAnimatorTimeline
attrSet = setAnimatorTimeline
attrTransfer _ v = do
unsafeCastTo Clutter.Timeline.Timeline v
attrConstruct = constructAnimatorTimeline
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Clutter.Objects.Animator.timeline"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-clutter-1.0.5/docs/GI-Clutter-Objects-Animator.html#g:attr:timeline"
})
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList Animator
type instance O.AttributeList Animator = AnimatorAttributeList
type AnimatorAttributeList = ('[ '("duration", AnimatorDurationPropertyInfo), '("timeline", AnimatorTimelinePropertyInfo)] :: [(Symbol, DK.Type)])
#endif
#if defined(ENABLE_OVERLOADING)
animatorDuration :: AttrLabelProxy "duration"
animatorDuration = AttrLabelProxy
animatorTimeline :: AttrLabelProxy "timeline"
animatorTimeline = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList Animator = AnimatorSignalList
type AnimatorSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, DK.Type)])
#endif
foreign import ccall "clutter_animator_new" clutter_animator_new ::
IO (Ptr Animator)
{-# DEPRECATED animatorNew ["(Since version 1.12)","Use t'GI.Clutter.Objects.KeyframeTransition.KeyframeTransition' instead"] #-}
animatorNew ::
(B.CallStack.HasCallStack, MonadIO m) =>
m Animator
animatorNew :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m Animator
animatorNew = IO Animator -> m Animator
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Animator -> m Animator) -> IO Animator -> m Animator
forall a b. (a -> b) -> a -> b
$ do
Ptr Animator
result <- IO (Ptr Animator)
clutter_animator_new
Text -> Ptr Animator -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"animatorNew" Ptr Animator
result
Animator
result' <- ((ManagedPtr Animator -> Animator) -> Ptr Animator -> IO Animator
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Animator -> Animator
Animator) Ptr Animator
result
Animator -> IO Animator
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Animator
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "clutter_animator_compute_value" clutter_animator_compute_value ::
Ptr Animator ->
Ptr GObject.Object.Object ->
CString ->
CDouble ->
Ptr GValue ->
IO CInt
{-# DEPRECATED animatorComputeValue ["(Since version 1.12)","Use t'GI.Clutter.Objects.KeyframeTransition.KeyframeTransition' instead"] #-}
animatorComputeValue ::
(B.CallStack.HasCallStack, MonadIO m, IsAnimator a, GObject.Object.IsObject b) =>
a
-> b
-> T.Text
-> Double
-> GValue
-> m Bool
animatorComputeValue :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsAnimator a, IsObject b) =>
a -> b -> Text -> Double -> GValue -> m Bool
animatorComputeValue a
animator b
object Text
propertyName Double
progress GValue
value = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr Animator
animator' <- a -> IO (Ptr Animator)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
animator
Ptr Object
object' <- b -> IO (Ptr Object)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
object
CString
propertyName' <- Text -> IO CString
textToCString Text
propertyName
let progress' :: CDouble
progress' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
progress
Ptr GValue
value' <- GValue -> IO (Ptr GValue)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GValue
value
CInt
result <- Ptr Animator
-> Ptr Object -> CString -> CDouble -> Ptr GValue -> IO CInt
clutter_animator_compute_value Ptr Animator
animator' Ptr Object
object' CString
propertyName' CDouble
progress' Ptr GValue
value'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
animator
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
object
GValue -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr GValue
value
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
propertyName'
Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data AnimatorComputeValueMethodInfo
instance (signature ~ (b -> T.Text -> Double -> GValue -> m Bool), MonadIO m, IsAnimator a, GObject.Object.IsObject b) => O.OverloadedMethod AnimatorComputeValueMethodInfo a signature where
overloadedMethod = animatorComputeValue
instance O.OverloadedMethodInfo AnimatorComputeValueMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Clutter.Objects.Animator.animatorComputeValue",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-clutter-1.0.5/docs/GI-Clutter-Objects-Animator.html#v:animatorComputeValue"
})
#endif
foreign import ccall "clutter_animator_get_duration" clutter_animator_get_duration ::
Ptr Animator ->
IO Word32
{-# DEPRECATED animatorGetDuration ["(Since version 1.12)","Use t'GI.Clutter.Objects.KeyframeTransition.KeyframeTransition' instead"] #-}
animatorGetDuration ::
(B.CallStack.HasCallStack, MonadIO m, IsAnimator a) =>
a
-> m Word32
animatorGetDuration :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAnimator a) =>
a -> m Word32
animatorGetDuration a
animator = IO Word32 -> m Word32
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ do
Ptr Animator
animator' <- a -> IO (Ptr Animator)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
animator
Word32
result <- Ptr Animator -> IO Word32
clutter_animator_get_duration Ptr Animator
animator'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
animator
Word32 -> IO Word32
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result
#if defined(ENABLE_OVERLOADING)
data AnimatorGetDurationMethodInfo
instance (signature ~ (m Word32), MonadIO m, IsAnimator a) => O.OverloadedMethod AnimatorGetDurationMethodInfo a signature where
overloadedMethod = animatorGetDuration
instance O.OverloadedMethodInfo AnimatorGetDurationMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Clutter.Objects.Animator.animatorGetDuration",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-clutter-1.0.5/docs/GI-Clutter-Objects-Animator.html#v:animatorGetDuration"
})
#endif
foreign import ccall "clutter_animator_get_keys" clutter_animator_get_keys ::
Ptr Animator ->
Ptr GObject.Object.Object ->
CString ->
CDouble ->
IO (Ptr (GList (Ptr Clutter.AnimatorKey.AnimatorKey)))
{-# DEPRECATED animatorGetKeys ["(Since version 1.12)","Use t'GI.Clutter.Objects.KeyframeTransition.KeyframeTransition' instead"] #-}
animatorGetKeys ::
(B.CallStack.HasCallStack, MonadIO m, IsAnimator a, GObject.Object.IsObject b) =>
a
-> Maybe (b)
-> Maybe (T.Text)
-> Double
-> m [Clutter.AnimatorKey.AnimatorKey]
animatorGetKeys :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsAnimator a, IsObject b) =>
a -> Maybe b -> Maybe Text -> Double -> m [AnimatorKey]
animatorGetKeys a
animator Maybe b
object Maybe Text
propertyName Double
progress = IO [AnimatorKey] -> m [AnimatorKey]
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [AnimatorKey] -> m [AnimatorKey])
-> IO [AnimatorKey] -> m [AnimatorKey]
forall a b. (a -> b) -> a -> b
$ do
Ptr Animator
animator' <- a -> IO (Ptr Animator)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
animator
Ptr Object
maybeObject <- case Maybe b
object of
Maybe b
Nothing -> Ptr Object -> IO (Ptr Object)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Object
forall a. Ptr a
nullPtr
Just b
jObject -> do
Ptr Object
jObject' <- b -> IO (Ptr Object)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jObject
Ptr Object -> IO (Ptr Object)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Object
jObject'
CString
maybePropertyName <- case Maybe Text
propertyName of
Maybe Text
Nothing -> CString -> IO CString
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
Just Text
jPropertyName -> do
CString
jPropertyName' <- Text -> IO CString
textToCString Text
jPropertyName
CString -> IO CString
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jPropertyName'
let progress' :: CDouble
progress' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
progress
Ptr (GList (Ptr AnimatorKey))
result <- Ptr Animator
-> Ptr Object
-> CString
-> CDouble
-> IO (Ptr (GList (Ptr AnimatorKey)))
clutter_animator_get_keys Ptr Animator
animator' Ptr Object
maybeObject CString
maybePropertyName CDouble
progress'
[Ptr AnimatorKey]
result' <- Ptr (GList (Ptr AnimatorKey)) -> IO [Ptr AnimatorKey]
forall a. Ptr (GList (Ptr a)) -> IO [Ptr a]
unpackGList Ptr (GList (Ptr AnimatorKey))
result
[AnimatorKey]
result'' <- (Ptr AnimatorKey -> IO AnimatorKey)
-> [Ptr AnimatorKey] -> IO [AnimatorKey]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
forall (m :: * -> *) a b. Monad m => (a -> m b) -> [a] -> m [b]
mapM ((ManagedPtr AnimatorKey -> AnimatorKey)
-> Ptr AnimatorKey -> IO AnimatorKey
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newBoxed ManagedPtr AnimatorKey -> AnimatorKey
Clutter.AnimatorKey.AnimatorKey) [Ptr AnimatorKey]
result'
Ptr (GList (Ptr AnimatorKey)) -> IO ()
forall a. Ptr (GList a) -> IO ()
g_list_free Ptr (GList (Ptr AnimatorKey))
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
animator
Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
object b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybePropertyName
[AnimatorKey] -> IO [AnimatorKey]
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return [AnimatorKey]
result''
#if defined(ENABLE_OVERLOADING)
data AnimatorGetKeysMethodInfo
instance (signature ~ (Maybe (b) -> Maybe (T.Text) -> Double -> m [Clutter.AnimatorKey.AnimatorKey]), MonadIO m, IsAnimator a, GObject.Object.IsObject b) => O.OverloadedMethod AnimatorGetKeysMethodInfo a signature where
overloadedMethod = animatorGetKeys
instance O.OverloadedMethodInfo AnimatorGetKeysMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Clutter.Objects.Animator.animatorGetKeys",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-clutter-1.0.5/docs/GI-Clutter-Objects-Animator.html#v:animatorGetKeys"
})
#endif
foreign import ccall "clutter_animator_get_timeline" clutter_animator_get_timeline ::
Ptr Animator ->
IO (Ptr Clutter.Timeline.Timeline)
{-# DEPRECATED animatorGetTimeline ["(Since version 1.12)","Use t'GI.Clutter.Objects.KeyframeTransition.KeyframeTransition' instead"] #-}
animatorGetTimeline ::
(B.CallStack.HasCallStack, MonadIO m, IsAnimator a) =>
a
-> m Clutter.Timeline.Timeline
animatorGetTimeline :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAnimator a) =>
a -> m Timeline
animatorGetTimeline a
animator = IO Timeline -> m Timeline
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Timeline -> m Timeline) -> IO Timeline -> m Timeline
forall a b. (a -> b) -> a -> b
$ do
Ptr Animator
animator' <- a -> IO (Ptr Animator)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
animator
Ptr Timeline
result <- Ptr Animator -> IO (Ptr Timeline)
clutter_animator_get_timeline Ptr Animator
animator'
Text -> Ptr Timeline -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"animatorGetTimeline" Ptr Timeline
result
Timeline
result' <- ((ManagedPtr Timeline -> Timeline) -> Ptr Timeline -> IO Timeline
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Timeline -> Timeline
Clutter.Timeline.Timeline) Ptr Timeline
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
animator
Timeline -> IO Timeline
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Timeline
result'
#if defined(ENABLE_OVERLOADING)
data AnimatorGetTimelineMethodInfo
instance (signature ~ (m Clutter.Timeline.Timeline), MonadIO m, IsAnimator a) => O.OverloadedMethod AnimatorGetTimelineMethodInfo a signature where
overloadedMethod = animatorGetTimeline
instance O.OverloadedMethodInfo AnimatorGetTimelineMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Clutter.Objects.Animator.animatorGetTimeline",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-clutter-1.0.5/docs/GI-Clutter-Objects-Animator.html#v:animatorGetTimeline"
})
#endif
foreign import ccall "clutter_animator_property_get_ease_in" clutter_animator_property_get_ease_in ::
Ptr Animator ->
Ptr GObject.Object.Object ->
CString ->
IO CInt
{-# DEPRECATED animatorPropertyGetEaseIn ["(Since version 1.12)","Use t'GI.Clutter.Objects.KeyframeTransition.KeyframeTransition' instead"] #-}
animatorPropertyGetEaseIn ::
(B.CallStack.HasCallStack, MonadIO m, IsAnimator a, GObject.Object.IsObject b) =>
a
-> b
-> T.Text
-> m Bool
animatorPropertyGetEaseIn :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsAnimator a, IsObject b) =>
a -> b -> Text -> m Bool
animatorPropertyGetEaseIn a
animator b
object Text
propertyName = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr Animator
animator' <- a -> IO (Ptr Animator)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
animator
Ptr Object
object' <- b -> IO (Ptr Object)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
object
CString
propertyName' <- Text -> IO CString
textToCString Text
propertyName
CInt
result <- Ptr Animator -> Ptr Object -> CString -> IO CInt
clutter_animator_property_get_ease_in Ptr Animator
animator' Ptr Object
object' CString
propertyName'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
animator
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
object
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
propertyName'
Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data AnimatorPropertyGetEaseInMethodInfo
instance (signature ~ (b -> T.Text -> m Bool), MonadIO m, IsAnimator a, GObject.Object.IsObject b) => O.OverloadedMethod AnimatorPropertyGetEaseInMethodInfo a signature where
overloadedMethod = animatorPropertyGetEaseIn
instance O.OverloadedMethodInfo AnimatorPropertyGetEaseInMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Clutter.Objects.Animator.animatorPropertyGetEaseIn",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-clutter-1.0.5/docs/GI-Clutter-Objects-Animator.html#v:animatorPropertyGetEaseIn"
})
#endif
foreign import ccall "clutter_animator_property_get_interpolation" clutter_animator_property_get_interpolation ::
Ptr Animator ->
Ptr GObject.Object.Object ->
CString ->
IO CUInt
{-# DEPRECATED animatorPropertyGetInterpolation ["(Since version 1.12)","Use t'GI.Clutter.Objects.KeyframeTransition.KeyframeTransition' instead"] #-}
animatorPropertyGetInterpolation ::
(B.CallStack.HasCallStack, MonadIO m, IsAnimator a, GObject.Object.IsObject b) =>
a
-> b
-> T.Text
-> m Clutter.Enums.Interpolation
animatorPropertyGetInterpolation :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsAnimator a, IsObject b) =>
a -> b -> Text -> m Interpolation
animatorPropertyGetInterpolation a
animator b
object Text
propertyName = IO Interpolation -> m Interpolation
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Interpolation -> m Interpolation)
-> IO Interpolation -> m Interpolation
forall a b. (a -> b) -> a -> b
$ do
Ptr Animator
animator' <- a -> IO (Ptr Animator)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
animator
Ptr Object
object' <- b -> IO (Ptr Object)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
object
CString
propertyName' <- Text -> IO CString
textToCString Text
propertyName
CUInt
result <- Ptr Animator -> Ptr Object -> CString -> IO CUInt
clutter_animator_property_get_interpolation Ptr Animator
animator' Ptr Object
object' CString
propertyName'
let result' :: Interpolation
result' = (Int -> Interpolation
forall a. Enum a => Int -> a
toEnum (Int -> Interpolation) -> (CUInt -> Int) -> CUInt -> Interpolation
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
animator
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
object
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
propertyName'
Interpolation -> IO Interpolation
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Interpolation
result'
#if defined(ENABLE_OVERLOADING)
data AnimatorPropertyGetInterpolationMethodInfo
instance (signature ~ (b -> T.Text -> m Clutter.Enums.Interpolation), MonadIO m, IsAnimator a, GObject.Object.IsObject b) => O.OverloadedMethod AnimatorPropertyGetInterpolationMethodInfo a signature where
overloadedMethod = animatorPropertyGetInterpolation
instance O.OverloadedMethodInfo AnimatorPropertyGetInterpolationMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Clutter.Objects.Animator.animatorPropertyGetInterpolation",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-clutter-1.0.5/docs/GI-Clutter-Objects-Animator.html#v:animatorPropertyGetInterpolation"
})
#endif
foreign import ccall "clutter_animator_property_set_ease_in" clutter_animator_property_set_ease_in ::
Ptr Animator ->
Ptr GObject.Object.Object ->
CString ->
CInt ->
IO ()
{-# DEPRECATED animatorPropertySetEaseIn ["(Since version 1.12)","Use t'GI.Clutter.Objects.KeyframeTransition.KeyframeTransition' instead"] #-}
animatorPropertySetEaseIn ::
(B.CallStack.HasCallStack, MonadIO m, IsAnimator a, GObject.Object.IsObject b) =>
a
-> b
-> T.Text
-> Bool
-> m ()
animatorPropertySetEaseIn :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsAnimator a, IsObject b) =>
a -> b -> Text -> Bool -> m ()
animatorPropertySetEaseIn a
animator b
object Text
propertyName Bool
easeIn = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Animator
animator' <- a -> IO (Ptr Animator)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
animator
Ptr Object
object' <- b -> IO (Ptr Object)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
object
CString
propertyName' <- Text -> IO CString
textToCString Text
propertyName
let easeIn' :: CInt
easeIn' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
P.fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
P.fromEnum) Bool
easeIn
Ptr Animator -> Ptr Object -> CString -> CInt -> IO ()
clutter_animator_property_set_ease_in Ptr Animator
animator' Ptr Object
object' CString
propertyName' CInt
easeIn'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
animator
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
object
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
propertyName'
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data AnimatorPropertySetEaseInMethodInfo
instance (signature ~ (b -> T.Text -> Bool -> m ()), MonadIO m, IsAnimator a, GObject.Object.IsObject b) => O.OverloadedMethod AnimatorPropertySetEaseInMethodInfo a signature where
overloadedMethod = animatorPropertySetEaseIn
instance O.OverloadedMethodInfo AnimatorPropertySetEaseInMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Clutter.Objects.Animator.animatorPropertySetEaseIn",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-clutter-1.0.5/docs/GI-Clutter-Objects-Animator.html#v:animatorPropertySetEaseIn"
})
#endif
foreign import ccall "clutter_animator_property_set_interpolation" clutter_animator_property_set_interpolation ::
Ptr Animator ->
Ptr GObject.Object.Object ->
CString ->
CUInt ->
IO ()
{-# DEPRECATED animatorPropertySetInterpolation ["(Since version 1.12)","Use t'GI.Clutter.Objects.KeyframeTransition.KeyframeTransition' instead"] #-}
animatorPropertySetInterpolation ::
(B.CallStack.HasCallStack, MonadIO m, IsAnimator a, GObject.Object.IsObject b) =>
a
-> b
-> T.Text
-> Clutter.Enums.Interpolation
-> m ()
animatorPropertySetInterpolation :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsAnimator a, IsObject b) =>
a -> b -> Text -> Interpolation -> m ()
animatorPropertySetInterpolation a
animator b
object Text
propertyName Interpolation
interpolation = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Animator
animator' <- a -> IO (Ptr Animator)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
animator
Ptr Object
object' <- b -> IO (Ptr Object)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
object
CString
propertyName' <- Text -> IO CString
textToCString Text
propertyName
let interpolation' :: CUInt
interpolation' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (Interpolation -> Int) -> Interpolation -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Interpolation -> Int
forall a. Enum a => a -> Int
fromEnum) Interpolation
interpolation
Ptr Animator -> Ptr Object -> CString -> CUInt -> IO ()
clutter_animator_property_set_interpolation Ptr Animator
animator' Ptr Object
object' CString
propertyName' CUInt
interpolation'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
animator
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
object
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
propertyName'
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data AnimatorPropertySetInterpolationMethodInfo
instance (signature ~ (b -> T.Text -> Clutter.Enums.Interpolation -> m ()), MonadIO m, IsAnimator a, GObject.Object.IsObject b) => O.OverloadedMethod AnimatorPropertySetInterpolationMethodInfo a signature where
overloadedMethod = animatorPropertySetInterpolation
instance O.OverloadedMethodInfo AnimatorPropertySetInterpolationMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Clutter.Objects.Animator.animatorPropertySetInterpolation",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-clutter-1.0.5/docs/GI-Clutter-Objects-Animator.html#v:animatorPropertySetInterpolation"
})
#endif
foreign import ccall "clutter_animator_remove_key" clutter_animator_remove_key ::
Ptr Animator ->
Ptr GObject.Object.Object ->
CString ->
CDouble ->
IO ()
{-# DEPRECATED animatorRemoveKey ["(Since version 1.12)","Use t'GI.Clutter.Objects.KeyframeTransition.KeyframeTransition' instead"] #-}
animatorRemoveKey ::
(B.CallStack.HasCallStack, MonadIO m, IsAnimator a, GObject.Object.IsObject b) =>
a
-> Maybe (b)
-> Maybe (T.Text)
-> Double
-> m ()
animatorRemoveKey :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsAnimator a, IsObject b) =>
a -> Maybe b -> Maybe Text -> Double -> m ()
animatorRemoveKey a
animator Maybe b
object Maybe Text
propertyName Double
progress = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Animator
animator' <- a -> IO (Ptr Animator)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
animator
Ptr Object
maybeObject <- case Maybe b
object of
Maybe b
Nothing -> Ptr Object -> IO (Ptr Object)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Object
forall a. Ptr a
nullPtr
Just b
jObject -> do
Ptr Object
jObject' <- b -> IO (Ptr Object)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jObject
Ptr Object -> IO (Ptr Object)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Object
jObject'
CString
maybePropertyName <- case Maybe Text
propertyName of
Maybe Text
Nothing -> CString -> IO CString
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
Just Text
jPropertyName -> do
CString
jPropertyName' <- Text -> IO CString
textToCString Text
jPropertyName
CString -> IO CString
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jPropertyName'
let progress' :: CDouble
progress' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
progress
Ptr Animator -> Ptr Object -> CString -> CDouble -> IO ()
clutter_animator_remove_key Ptr Animator
animator' Ptr Object
maybeObject CString
maybePropertyName CDouble
progress'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
animator
Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
object b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybePropertyName
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data AnimatorRemoveKeyMethodInfo
instance (signature ~ (Maybe (b) -> Maybe (T.Text) -> Double -> m ()), MonadIO m, IsAnimator a, GObject.Object.IsObject b) => O.OverloadedMethod AnimatorRemoveKeyMethodInfo a signature where
overloadedMethod = animatorRemoveKey
instance O.OverloadedMethodInfo AnimatorRemoveKeyMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Clutter.Objects.Animator.animatorRemoveKey",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-clutter-1.0.5/docs/GI-Clutter-Objects-Animator.html#v:animatorRemoveKey"
})
#endif
foreign import ccall "clutter_animator_set_duration" clutter_animator_set_duration ::
Ptr Animator ->
Word32 ->
IO ()
{-# DEPRECATED animatorSetDuration ["(Since version 1.12)","Use t'GI.Clutter.Objects.KeyframeTransition.KeyframeTransition' instead"] #-}
animatorSetDuration ::
(B.CallStack.HasCallStack, MonadIO m, IsAnimator a) =>
a
-> Word32
-> m ()
animatorSetDuration :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAnimator a) =>
a -> Word32 -> m ()
animatorSetDuration a
animator Word32
duration = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Animator
animator' <- a -> IO (Ptr Animator)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
animator
Ptr Animator -> Word32 -> IO ()
clutter_animator_set_duration Ptr Animator
animator' Word32
duration
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
animator
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data AnimatorSetDurationMethodInfo
instance (signature ~ (Word32 -> m ()), MonadIO m, IsAnimator a) => O.OverloadedMethod AnimatorSetDurationMethodInfo a signature where
overloadedMethod = animatorSetDuration
instance O.OverloadedMethodInfo AnimatorSetDurationMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Clutter.Objects.Animator.animatorSetDuration",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-clutter-1.0.5/docs/GI-Clutter-Objects-Animator.html#v:animatorSetDuration"
})
#endif
foreign import ccall "clutter_animator_set_key" clutter_animator_set_key ::
Ptr Animator ->
Ptr GObject.Object.Object ->
CString ->
Word32 ->
CDouble ->
Ptr GValue ->
IO (Ptr Animator)
{-# DEPRECATED animatorSetKey ["(Since version 1.12)","Use t'GI.Clutter.Objects.KeyframeTransition.KeyframeTransition' instead"] #-}
animatorSetKey ::
(B.CallStack.HasCallStack, MonadIO m, IsAnimator a, GObject.Object.IsObject b) =>
a
-> b
-> T.Text
-> Word32
-> Double
-> GValue
-> m Animator
animatorSetKey :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsAnimator a, IsObject b) =>
a -> b -> Text -> Word32 -> Double -> GValue -> m Animator
animatorSetKey a
animator b
object Text
propertyName Word32
mode Double
progress GValue
value = IO Animator -> m Animator
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Animator -> m Animator) -> IO Animator -> m Animator
forall a b. (a -> b) -> a -> b
$ do
Ptr Animator
animator' <- a -> IO (Ptr Animator)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
animator
Ptr Object
object' <- b -> IO (Ptr Object)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
object
CString
propertyName' <- Text -> IO CString
textToCString Text
propertyName
let progress' :: CDouble
progress' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
progress
Ptr GValue
value' <- GValue -> IO (Ptr GValue)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GValue
value
Ptr Animator
result <- Ptr Animator
-> Ptr Object
-> CString
-> Word32
-> CDouble
-> Ptr GValue
-> IO (Ptr Animator)
clutter_animator_set_key Ptr Animator
animator' Ptr Object
object' CString
propertyName' Word32
mode CDouble
progress' Ptr GValue
value'
Text -> Ptr Animator -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"animatorSetKey" Ptr Animator
result
Animator
result' <- ((ManagedPtr Animator -> Animator) -> Ptr Animator -> IO Animator
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Animator -> Animator
Animator) Ptr Animator
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
animator
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
object
GValue -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr GValue
value
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
propertyName'
Animator -> IO Animator
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Animator
result'
#if defined(ENABLE_OVERLOADING)
data AnimatorSetKeyMethodInfo
instance (signature ~ (b -> T.Text -> Word32 -> Double -> GValue -> m Animator), MonadIO m, IsAnimator a, GObject.Object.IsObject b) => O.OverloadedMethod AnimatorSetKeyMethodInfo a signature where
overloadedMethod = animatorSetKey
instance O.OverloadedMethodInfo AnimatorSetKeyMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Clutter.Objects.Animator.animatorSetKey",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-clutter-1.0.5/docs/GI-Clutter-Objects-Animator.html#v:animatorSetKey"
})
#endif
foreign import ccall "clutter_animator_set_timeline" clutter_animator_set_timeline ::
Ptr Animator ->
Ptr Clutter.Timeline.Timeline ->
IO ()
{-# DEPRECATED animatorSetTimeline ["(Since version 1.12)","Use t'GI.Clutter.Objects.KeyframeTransition.KeyframeTransition' instead"] #-}
animatorSetTimeline ::
(B.CallStack.HasCallStack, MonadIO m, IsAnimator a, Clutter.Timeline.IsTimeline b) =>
a
-> b
-> m ()
animatorSetTimeline :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsAnimator a, IsTimeline b) =>
a -> b -> m ()
animatorSetTimeline a
animator b
timeline = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Animator
animator' <- a -> IO (Ptr Animator)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
animator
Ptr Timeline
timeline' <- b -> IO (Ptr Timeline)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
timeline
Ptr Animator -> Ptr Timeline -> IO ()
clutter_animator_set_timeline Ptr Animator
animator' Ptr Timeline
timeline'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
animator
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
timeline
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data AnimatorSetTimelineMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsAnimator a, Clutter.Timeline.IsTimeline b) => O.OverloadedMethod AnimatorSetTimelineMethodInfo a signature where
overloadedMethod = animatorSetTimeline
instance O.OverloadedMethodInfo AnimatorSetTimelineMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Clutter.Objects.Animator.animatorSetTimeline",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-clutter-1.0.5/docs/GI-Clutter-Objects-Animator.html#v:animatorSetTimeline"
})
#endif
foreign import ccall "clutter_animator_start" clutter_animator_start ::
Ptr Animator ->
IO (Ptr Clutter.Timeline.Timeline)
{-# DEPRECATED animatorStart ["(Since version 1.12)","Use t'GI.Clutter.Objects.KeyframeTransition.KeyframeTransition' instead"] #-}
animatorStart ::
(B.CallStack.HasCallStack, MonadIO m, IsAnimator a) =>
a
-> m Clutter.Timeline.Timeline
animatorStart :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAnimator a) =>
a -> m Timeline
animatorStart a
animator = IO Timeline -> m Timeline
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Timeline -> m Timeline) -> IO Timeline -> m Timeline
forall a b. (a -> b) -> a -> b
$ do
Ptr Animator
animator' <- a -> IO (Ptr Animator)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
animator
Ptr Timeline
result <- Ptr Animator -> IO (Ptr Timeline)
clutter_animator_start Ptr Animator
animator'
Text -> Ptr Timeline -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"animatorStart" Ptr Timeline
result
Timeline
result' <- ((ManagedPtr Timeline -> Timeline) -> Ptr Timeline -> IO Timeline
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Timeline -> Timeline
Clutter.Timeline.Timeline) Ptr Timeline
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
animator
Timeline -> IO Timeline
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Timeline
result'
#if defined(ENABLE_OVERLOADING)
data AnimatorStartMethodInfo
instance (signature ~ (m Clutter.Timeline.Timeline), MonadIO m, IsAnimator a) => O.OverloadedMethod AnimatorStartMethodInfo a signature where
overloadedMethod = animatorStart
instance O.OverloadedMethodInfo AnimatorStartMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Clutter.Objects.Animator.animatorStart",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-clutter-1.0.5/docs/GI-Clutter-Objects-Animator.html#v:animatorStart"
})
#endif