{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Clutter.Objects.KeyframeTransition
(
KeyframeTransition(..) ,
IsKeyframeTransition ,
toKeyframeTransition ,
#if defined(ENABLE_OVERLOADING)
ResolveKeyframeTransitionMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
KeyframeTransitionClearMethodInfo ,
#endif
keyframeTransitionClear ,
#if defined(ENABLE_OVERLOADING)
KeyframeTransitionGetKeyFrameMethodInfo ,
#endif
keyframeTransitionGetKeyFrame ,
#if defined(ENABLE_OVERLOADING)
KeyframeTransitionGetNKeyFramesMethodInfo,
#endif
keyframeTransitionGetNKeyFrames ,
keyframeTransitionNew ,
#if defined(ENABLE_OVERLOADING)
KeyframeTransitionSetKeyFrameMethodInfo ,
#endif
keyframeTransitionSetKeyFrame ,
#if defined(ENABLE_OVERLOADING)
KeyframeTransitionSetKeyFramesMethodInfo,
#endif
keyframeTransitionSetKeyFrames ,
#if defined(ENABLE_OVERLOADING)
KeyframeTransitionSetModesMethodInfo ,
#endif
keyframeTransitionSetModes ,
#if defined(ENABLE_OVERLOADING)
KeyframeTransitionSetValuesMethodInfo ,
#endif
keyframeTransitionSetValues ,
) 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.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 {-# SOURCE #-} qualified GI.Clutter.Enums as Clutter.Enums
import {-# SOURCE #-} qualified GI.Clutter.Interfaces.Scriptable as Clutter.Scriptable
import {-# SOURCE #-} qualified GI.Clutter.Objects.PropertyTransition as Clutter.PropertyTransition
import {-# SOURCE #-} qualified GI.Clutter.Objects.Timeline as Clutter.Timeline
import {-# SOURCE #-} qualified GI.Clutter.Objects.Transition as Clutter.Transition
import qualified GI.GObject.Objects.Object as GObject.Object
newtype KeyframeTransition = KeyframeTransition (SP.ManagedPtr KeyframeTransition)
deriving (KeyframeTransition -> KeyframeTransition -> Bool
(KeyframeTransition -> KeyframeTransition -> Bool)
-> (KeyframeTransition -> KeyframeTransition -> Bool)
-> Eq KeyframeTransition
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: KeyframeTransition -> KeyframeTransition -> Bool
$c/= :: KeyframeTransition -> KeyframeTransition -> Bool
== :: KeyframeTransition -> KeyframeTransition -> Bool
$c== :: KeyframeTransition -> KeyframeTransition -> Bool
Eq)
instance SP.ManagedPtrNewtype KeyframeTransition where
toManagedPtr :: KeyframeTransition -> ManagedPtr KeyframeTransition
toManagedPtr (KeyframeTransition ManagedPtr KeyframeTransition
p) = ManagedPtr KeyframeTransition
p
foreign import ccall "clutter_keyframe_transition_get_type"
c_clutter_keyframe_transition_get_type :: IO B.Types.GType
instance B.Types.TypedObject KeyframeTransition where
glibType :: IO GType
glibType = IO GType
c_clutter_keyframe_transition_get_type
instance B.Types.GObject KeyframeTransition
class (SP.GObject o, O.IsDescendantOf KeyframeTransition o) => IsKeyframeTransition o
instance (SP.GObject o, O.IsDescendantOf KeyframeTransition o) => IsKeyframeTransition o
instance O.HasParentTypes KeyframeTransition
type instance O.ParentTypes KeyframeTransition = '[Clutter.PropertyTransition.PropertyTransition, Clutter.Transition.Transition, Clutter.Timeline.Timeline, GObject.Object.Object, Clutter.Scriptable.Scriptable]
toKeyframeTransition :: (MIO.MonadIO m, IsKeyframeTransition o) => o -> m KeyframeTransition
toKeyframeTransition :: forall (m :: * -> *) o.
(MonadIO m, IsKeyframeTransition o) =>
o -> m KeyframeTransition
toKeyframeTransition = IO KeyframeTransition -> m KeyframeTransition
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO KeyframeTransition -> m KeyframeTransition)
-> (o -> IO KeyframeTransition) -> o -> m KeyframeTransition
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr KeyframeTransition -> KeyframeTransition)
-> o -> IO KeyframeTransition
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr KeyframeTransition -> KeyframeTransition
KeyframeTransition
instance B.GValue.IsGValue (Maybe KeyframeTransition) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_clutter_keyframe_transition_get_type
gvalueSet_ :: Ptr GValue -> Maybe KeyframeTransition -> IO ()
gvalueSet_ Ptr GValue
gv Maybe KeyframeTransition
P.Nothing = Ptr GValue -> Ptr KeyframeTransition -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr KeyframeTransition
forall a. Ptr a
FP.nullPtr :: FP.Ptr KeyframeTransition)
gvalueSet_ Ptr GValue
gv (P.Just KeyframeTransition
obj) = KeyframeTransition -> (Ptr KeyframeTransition -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr KeyframeTransition
obj (Ptr GValue -> Ptr KeyframeTransition -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe KeyframeTransition)
gvalueGet_ Ptr GValue
gv = do
Ptr KeyframeTransition
ptr <- Ptr GValue -> IO (Ptr KeyframeTransition)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr KeyframeTransition)
if Ptr KeyframeTransition
ptr Ptr KeyframeTransition -> Ptr KeyframeTransition -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr KeyframeTransition
forall a. Ptr a
FP.nullPtr
then KeyframeTransition -> Maybe KeyframeTransition
forall a. a -> Maybe a
P.Just (KeyframeTransition -> Maybe KeyframeTransition)
-> IO KeyframeTransition -> IO (Maybe KeyframeTransition)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr KeyframeTransition -> KeyframeTransition)
-> Ptr KeyframeTransition -> IO KeyframeTransition
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr KeyframeTransition -> KeyframeTransition
KeyframeTransition Ptr KeyframeTransition
ptr
else Maybe KeyframeTransition -> IO (Maybe KeyframeTransition)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe KeyframeTransition
forall a. Maybe a
P.Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolveKeyframeTransitionMethod (t :: Symbol) (o :: *) :: * where
ResolveKeyframeTransitionMethod "addMarker" o = Clutter.Timeline.TimelineAddMarkerMethodInfo
ResolveKeyframeTransitionMethod "addMarkerAtTime" o = Clutter.Timeline.TimelineAddMarkerAtTimeMethodInfo
ResolveKeyframeTransitionMethod "advance" o = Clutter.Timeline.TimelineAdvanceMethodInfo
ResolveKeyframeTransitionMethod "advanceToMarker" o = Clutter.Timeline.TimelineAdvanceToMarkerMethodInfo
ResolveKeyframeTransitionMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveKeyframeTransitionMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveKeyframeTransitionMethod "clear" o = KeyframeTransitionClearMethodInfo
ResolveKeyframeTransitionMethod "clone" o = Clutter.Timeline.TimelineCloneMethodInfo
ResolveKeyframeTransitionMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveKeyframeTransitionMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveKeyframeTransitionMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveKeyframeTransitionMethod "hasMarker" o = Clutter.Timeline.TimelineHasMarkerMethodInfo
ResolveKeyframeTransitionMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveKeyframeTransitionMethod "isPlaying" o = Clutter.Timeline.TimelineIsPlayingMethodInfo
ResolveKeyframeTransitionMethod "listMarkers" o = Clutter.Timeline.TimelineListMarkersMethodInfo
ResolveKeyframeTransitionMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveKeyframeTransitionMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveKeyframeTransitionMethod "parseCustomNode" o = Clutter.Scriptable.ScriptableParseCustomNodeMethodInfo
ResolveKeyframeTransitionMethod "pause" o = Clutter.Timeline.TimelinePauseMethodInfo
ResolveKeyframeTransitionMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveKeyframeTransitionMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveKeyframeTransitionMethod "removeMarker" o = Clutter.Timeline.TimelineRemoveMarkerMethodInfo
ResolveKeyframeTransitionMethod "rewind" o = Clutter.Timeline.TimelineRewindMethodInfo
ResolveKeyframeTransitionMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveKeyframeTransitionMethod "skip" o = Clutter.Timeline.TimelineSkipMethodInfo
ResolveKeyframeTransitionMethod "start" o = Clutter.Timeline.TimelineStartMethodInfo
ResolveKeyframeTransitionMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveKeyframeTransitionMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveKeyframeTransitionMethod "stop" o = Clutter.Timeline.TimelineStopMethodInfo
ResolveKeyframeTransitionMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveKeyframeTransitionMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveKeyframeTransitionMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveKeyframeTransitionMethod "getAnimatable" o = Clutter.Transition.TransitionGetAnimatableMethodInfo
ResolveKeyframeTransitionMethod "getAutoReverse" o = Clutter.Timeline.TimelineGetAutoReverseMethodInfo
ResolveKeyframeTransitionMethod "getCubicBezierProgress" o = Clutter.Timeline.TimelineGetCubicBezierProgressMethodInfo
ResolveKeyframeTransitionMethod "getCurrentRepeat" o = Clutter.Timeline.TimelineGetCurrentRepeatMethodInfo
ResolveKeyframeTransitionMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveKeyframeTransitionMethod "getDelay" o = Clutter.Timeline.TimelineGetDelayMethodInfo
ResolveKeyframeTransitionMethod "getDelta" o = Clutter.Timeline.TimelineGetDeltaMethodInfo
ResolveKeyframeTransitionMethod "getDirection" o = Clutter.Timeline.TimelineGetDirectionMethodInfo
ResolveKeyframeTransitionMethod "getDuration" o = Clutter.Timeline.TimelineGetDurationMethodInfo
ResolveKeyframeTransitionMethod "getDurationHint" o = Clutter.Timeline.TimelineGetDurationHintMethodInfo
ResolveKeyframeTransitionMethod "getElapsedTime" o = Clutter.Timeline.TimelineGetElapsedTimeMethodInfo
ResolveKeyframeTransitionMethod "getId" o = Clutter.Scriptable.ScriptableGetIdMethodInfo
ResolveKeyframeTransitionMethod "getInterval" o = Clutter.Transition.TransitionGetIntervalMethodInfo
ResolveKeyframeTransitionMethod "getKeyFrame" o = KeyframeTransitionGetKeyFrameMethodInfo
ResolveKeyframeTransitionMethod "getLoop" o = Clutter.Timeline.TimelineGetLoopMethodInfo
ResolveKeyframeTransitionMethod "getNKeyFrames" o = KeyframeTransitionGetNKeyFramesMethodInfo
ResolveKeyframeTransitionMethod "getProgress" o = Clutter.Timeline.TimelineGetProgressMethodInfo
ResolveKeyframeTransitionMethod "getProgressMode" o = Clutter.Timeline.TimelineGetProgressModeMethodInfo
ResolveKeyframeTransitionMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveKeyframeTransitionMethod "getPropertyName" o = Clutter.PropertyTransition.PropertyTransitionGetPropertyNameMethodInfo
ResolveKeyframeTransitionMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveKeyframeTransitionMethod "getRemoveOnComplete" o = Clutter.Transition.TransitionGetRemoveOnCompleteMethodInfo
ResolveKeyframeTransitionMethod "getRepeatCount" o = Clutter.Timeline.TimelineGetRepeatCountMethodInfo
ResolveKeyframeTransitionMethod "getStepProgress" o = Clutter.Timeline.TimelineGetStepProgressMethodInfo
ResolveKeyframeTransitionMethod "setAnimatable" o = Clutter.Transition.TransitionSetAnimatableMethodInfo
ResolveKeyframeTransitionMethod "setAutoReverse" o = Clutter.Timeline.TimelineSetAutoReverseMethodInfo
ResolveKeyframeTransitionMethod "setCubicBezierProgress" o = Clutter.Timeline.TimelineSetCubicBezierProgressMethodInfo
ResolveKeyframeTransitionMethod "setCustomProperty" o = Clutter.Scriptable.ScriptableSetCustomPropertyMethodInfo
ResolveKeyframeTransitionMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveKeyframeTransitionMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveKeyframeTransitionMethod "setDelay" o = Clutter.Timeline.TimelineSetDelayMethodInfo
ResolveKeyframeTransitionMethod "setDirection" o = Clutter.Timeline.TimelineSetDirectionMethodInfo
ResolveKeyframeTransitionMethod "setDuration" o = Clutter.Timeline.TimelineSetDurationMethodInfo
ResolveKeyframeTransitionMethod "setFrom" o = Clutter.Transition.TransitionSetFromMethodInfo
ResolveKeyframeTransitionMethod "setId" o = Clutter.Scriptable.ScriptableSetIdMethodInfo
ResolveKeyframeTransitionMethod "setInterval" o = Clutter.Transition.TransitionSetIntervalMethodInfo
ResolveKeyframeTransitionMethod "setKeyFrame" o = KeyframeTransitionSetKeyFrameMethodInfo
ResolveKeyframeTransitionMethod "setKeyFrames" o = KeyframeTransitionSetKeyFramesMethodInfo
ResolveKeyframeTransitionMethod "setLoop" o = Clutter.Timeline.TimelineSetLoopMethodInfo
ResolveKeyframeTransitionMethod "setModes" o = KeyframeTransitionSetModesMethodInfo
ResolveKeyframeTransitionMethod "setProgressFunc" o = Clutter.Timeline.TimelineSetProgressFuncMethodInfo
ResolveKeyframeTransitionMethod "setProgressMode" o = Clutter.Timeline.TimelineSetProgressModeMethodInfo
ResolveKeyframeTransitionMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveKeyframeTransitionMethod "setPropertyName" o = Clutter.PropertyTransition.PropertyTransitionSetPropertyNameMethodInfo
ResolveKeyframeTransitionMethod "setRemoveOnComplete" o = Clutter.Transition.TransitionSetRemoveOnCompleteMethodInfo
ResolveKeyframeTransitionMethod "setRepeatCount" o = Clutter.Timeline.TimelineSetRepeatCountMethodInfo
ResolveKeyframeTransitionMethod "setStepProgress" o = Clutter.Timeline.TimelineSetStepProgressMethodInfo
ResolveKeyframeTransitionMethod "setTo" o = Clutter.Transition.TransitionSetToMethodInfo
ResolveKeyframeTransitionMethod "setValues" o = KeyframeTransitionSetValuesMethodInfo
ResolveKeyframeTransitionMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveKeyframeTransitionMethod t KeyframeTransition, O.OverloadedMethod info KeyframeTransition p) => OL.IsLabel t (KeyframeTransition -> 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 ~ ResolveKeyframeTransitionMethod t KeyframeTransition, O.OverloadedMethod info KeyframeTransition p, R.HasField t KeyframeTransition p) => R.HasField t KeyframeTransition p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveKeyframeTransitionMethod t KeyframeTransition, O.OverloadedMethodInfo info KeyframeTransition) => OL.IsLabel t (O.MethodProxy info KeyframeTransition) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList KeyframeTransition
type instance O.AttributeList KeyframeTransition = KeyframeTransitionAttributeList
type KeyframeTransitionAttributeList = ('[ '("animatable", Clutter.Transition.TransitionAnimatablePropertyInfo), '("autoReverse", Clutter.Timeline.TimelineAutoReversePropertyInfo), '("delay", Clutter.Timeline.TimelineDelayPropertyInfo), '("direction", Clutter.Timeline.TimelineDirectionPropertyInfo), '("duration", Clutter.Timeline.TimelineDurationPropertyInfo), '("interval", Clutter.Transition.TransitionIntervalPropertyInfo), '("loop", Clutter.Timeline.TimelineLoopPropertyInfo), '("progressMode", Clutter.Timeline.TimelineProgressModePropertyInfo), '("propertyName", Clutter.PropertyTransition.PropertyTransitionPropertyNamePropertyInfo), '("removeOnComplete", Clutter.Transition.TransitionRemoveOnCompletePropertyInfo), '("repeatCount", Clutter.Timeline.TimelineRepeatCountPropertyInfo)] :: [(Symbol, *)])
#endif
#if defined(ENABLE_OVERLOADING)
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList KeyframeTransition = KeyframeTransitionSignalList
type KeyframeTransitionSignalList = ('[ '("completed", Clutter.Timeline.TimelineCompletedSignalInfo), '("markerReached", Clutter.Timeline.TimelineMarkerReachedSignalInfo), '("newFrame", Clutter.Timeline.TimelineNewFrameSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo), '("paused", Clutter.Timeline.TimelinePausedSignalInfo), '("started", Clutter.Timeline.TimelineStartedSignalInfo), '("stopped", Clutter.Timeline.TimelineStoppedSignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "clutter_keyframe_transition_new" clutter_keyframe_transition_new ::
CString ->
IO (Ptr KeyframeTransition)
keyframeTransitionNew ::
(B.CallStack.HasCallStack, MonadIO m) =>
T.Text
-> m KeyframeTransition
keyframeTransitionNew :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Text -> m KeyframeTransition
keyframeTransitionNew Text
propertyName = IO KeyframeTransition -> m KeyframeTransition
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO KeyframeTransition -> m KeyframeTransition)
-> IO KeyframeTransition -> m KeyframeTransition
forall a b. (a -> b) -> a -> b
$ do
CString
propertyName' <- Text -> IO CString
textToCString Text
propertyName
Ptr KeyframeTransition
result <- CString -> IO (Ptr KeyframeTransition)
clutter_keyframe_transition_new CString
propertyName'
Text -> Ptr KeyframeTransition -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"keyframeTransitionNew" Ptr KeyframeTransition
result
KeyframeTransition
result' <- ((ManagedPtr KeyframeTransition -> KeyframeTransition)
-> Ptr KeyframeTransition -> IO KeyframeTransition
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr KeyframeTransition -> KeyframeTransition
KeyframeTransition) Ptr KeyframeTransition
result
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
propertyName'
KeyframeTransition -> IO KeyframeTransition
forall (m :: * -> *) a. Monad m => a -> m a
return KeyframeTransition
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "clutter_keyframe_transition_clear" clutter_keyframe_transition_clear ::
Ptr KeyframeTransition ->
IO ()
keyframeTransitionClear ::
(B.CallStack.HasCallStack, MonadIO m, IsKeyframeTransition a) =>
a
-> m ()
keyframeTransitionClear :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsKeyframeTransition a) =>
a -> m ()
keyframeTransitionClear a
transition = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr KeyframeTransition
transition' <- a -> IO (Ptr KeyframeTransition)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
transition
Ptr KeyframeTransition -> IO ()
clutter_keyframe_transition_clear Ptr KeyframeTransition
transition'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
transition
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data KeyframeTransitionClearMethodInfo
instance (signature ~ (m ()), MonadIO m, IsKeyframeTransition a) => O.OverloadedMethod KeyframeTransitionClearMethodInfo a signature where
overloadedMethod = keyframeTransitionClear
instance O.OverloadedMethodInfo KeyframeTransitionClearMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Clutter.Objects.KeyframeTransition.keyframeTransitionClear",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-clutter-1.0.2/docs/GI-Clutter-Objects-KeyframeTransition.html#v:keyframeTransitionClear"
})
#endif
foreign import ccall "clutter_keyframe_transition_get_key_frame" clutter_keyframe_transition_get_key_frame ::
Ptr KeyframeTransition ->
Word32 ->
Ptr CDouble ->
Ptr CUInt ->
Ptr GValue ->
IO ()
keyframeTransitionGetKeyFrame ::
(B.CallStack.HasCallStack, MonadIO m, IsKeyframeTransition a) =>
a
-> Word32
-> m ((Double, Clutter.Enums.AnimationMode, GValue))
keyframeTransitionGetKeyFrame :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsKeyframeTransition a) =>
a -> Word32 -> m (Double, AnimationMode, GValue)
keyframeTransitionGetKeyFrame a
transition Word32
index_ = IO (Double, AnimationMode, GValue)
-> m (Double, AnimationMode, GValue)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Double, AnimationMode, GValue)
-> m (Double, AnimationMode, GValue))
-> IO (Double, AnimationMode, GValue)
-> m (Double, AnimationMode, GValue)
forall a b. (a -> b) -> a -> b
$ do
Ptr KeyframeTransition
transition' <- a -> IO (Ptr KeyframeTransition)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
transition
Ptr CDouble
key <- IO (Ptr CDouble)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr CDouble)
Ptr CUInt
mode <- IO (Ptr CUInt)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr CUInt)
Ptr GValue
value <- Int -> IO (Ptr GValue)
forall a. Int -> IO (Ptr a)
SP.callocBytes Int
24 :: IO (Ptr GValue)
Ptr KeyframeTransition
-> Word32 -> Ptr CDouble -> Ptr CUInt -> Ptr GValue -> IO ()
clutter_keyframe_transition_get_key_frame Ptr KeyframeTransition
transition' Word32
index_ Ptr CDouble
key Ptr CUInt
mode Ptr GValue
value
CDouble
key' <- Ptr CDouble -> IO CDouble
forall a. Storable a => Ptr a -> IO a
peek Ptr CDouble
key
let key'' :: Double
key'' = CDouble -> Double
forall a b. (Real a, Fractional b) => a -> b
realToFrac CDouble
key'
CUInt
mode' <- Ptr CUInt -> IO CUInt
forall a. Storable a => Ptr a -> IO a
peek Ptr CUInt
mode
let mode'' :: AnimationMode
mode'' = (Int -> AnimationMode
forall a. Enum a => Int -> a
toEnum (Int -> AnimationMode) -> (CUInt -> Int) -> CUInt -> AnimationMode
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
mode'
GValue
value' <- Ptr GValue -> IO GValue
B.GValue.wrapGValuePtr Ptr GValue
value
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
transition
Ptr CDouble -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CDouble
key
Ptr CUInt -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CUInt
mode
(Double, AnimationMode, GValue)
-> IO (Double, AnimationMode, GValue)
forall (m :: * -> *) a. Monad m => a -> m a
return (Double
key'', AnimationMode
mode'', GValue
value')
#if defined(ENABLE_OVERLOADING)
data KeyframeTransitionGetKeyFrameMethodInfo
instance (signature ~ (Word32 -> m ((Double, Clutter.Enums.AnimationMode, GValue))), MonadIO m, IsKeyframeTransition a) => O.OverloadedMethod KeyframeTransitionGetKeyFrameMethodInfo a signature where
overloadedMethod = keyframeTransitionGetKeyFrame
instance O.OverloadedMethodInfo KeyframeTransitionGetKeyFrameMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Clutter.Objects.KeyframeTransition.keyframeTransitionGetKeyFrame",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-clutter-1.0.2/docs/GI-Clutter-Objects-KeyframeTransition.html#v:keyframeTransitionGetKeyFrame"
})
#endif
foreign import ccall "clutter_keyframe_transition_get_n_key_frames" clutter_keyframe_transition_get_n_key_frames ::
Ptr KeyframeTransition ->
IO Word32
keyframeTransitionGetNKeyFrames ::
(B.CallStack.HasCallStack, MonadIO m, IsKeyframeTransition a) =>
a
-> m Word32
keyframeTransitionGetNKeyFrames :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsKeyframeTransition a) =>
a -> m Word32
keyframeTransitionGetNKeyFrames a
transition = IO Word32 -> m Word32
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 KeyframeTransition
transition' <- a -> IO (Ptr KeyframeTransition)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
transition
Word32
result <- Ptr KeyframeTransition -> IO Word32
clutter_keyframe_transition_get_n_key_frames Ptr KeyframeTransition
transition'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
transition
Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result
#if defined(ENABLE_OVERLOADING)
data KeyframeTransitionGetNKeyFramesMethodInfo
instance (signature ~ (m Word32), MonadIO m, IsKeyframeTransition a) => O.OverloadedMethod KeyframeTransitionGetNKeyFramesMethodInfo a signature where
overloadedMethod = keyframeTransitionGetNKeyFrames
instance O.OverloadedMethodInfo KeyframeTransitionGetNKeyFramesMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Clutter.Objects.KeyframeTransition.keyframeTransitionGetNKeyFrames",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-clutter-1.0.2/docs/GI-Clutter-Objects-KeyframeTransition.html#v:keyframeTransitionGetNKeyFrames"
})
#endif
foreign import ccall "clutter_keyframe_transition_set_key_frame" clutter_keyframe_transition_set_key_frame ::
Ptr KeyframeTransition ->
Word32 ->
CDouble ->
CUInt ->
Ptr GValue ->
IO ()
keyframeTransitionSetKeyFrame ::
(B.CallStack.HasCallStack, MonadIO m, IsKeyframeTransition a) =>
a
-> Word32
-> Double
-> Clutter.Enums.AnimationMode
-> GValue
-> m ()
keyframeTransitionSetKeyFrame :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsKeyframeTransition a) =>
a -> Word32 -> Double -> AnimationMode -> GValue -> m ()
keyframeTransitionSetKeyFrame a
transition Word32
index_ Double
key AnimationMode
mode GValue
value = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr KeyframeTransition
transition' <- a -> IO (Ptr KeyframeTransition)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
transition
let key' :: CDouble
key' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
key
let mode' :: CUInt
mode' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (AnimationMode -> Int) -> AnimationMode -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. AnimationMode -> Int
forall a. Enum a => a -> Int
fromEnum) AnimationMode
mode
Ptr GValue
value' <- GValue -> IO (Ptr GValue)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GValue
value
Ptr KeyframeTransition
-> Word32 -> CDouble -> CUInt -> Ptr GValue -> IO ()
clutter_keyframe_transition_set_key_frame Ptr KeyframeTransition
transition' Word32
index_ CDouble
key' CUInt
mode' Ptr GValue
value'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
transition
GValue -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr GValue
value
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data KeyframeTransitionSetKeyFrameMethodInfo
instance (signature ~ (Word32 -> Double -> Clutter.Enums.AnimationMode -> GValue -> m ()), MonadIO m, IsKeyframeTransition a) => O.OverloadedMethod KeyframeTransitionSetKeyFrameMethodInfo a signature where
overloadedMethod = keyframeTransitionSetKeyFrame
instance O.OverloadedMethodInfo KeyframeTransitionSetKeyFrameMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Clutter.Objects.KeyframeTransition.keyframeTransitionSetKeyFrame",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-clutter-1.0.2/docs/GI-Clutter-Objects-KeyframeTransition.html#v:keyframeTransitionSetKeyFrame"
})
#endif
foreign import ccall "clutter_keyframe_transition_set_key_frames" clutter_keyframe_transition_set_key_frames ::
Ptr KeyframeTransition ->
Word32 ->
Ptr CDouble ->
IO ()
keyframeTransitionSetKeyFrames ::
(B.CallStack.HasCallStack, MonadIO m, IsKeyframeTransition a) =>
a
-> [Double]
-> m ()
keyframeTransitionSetKeyFrames :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsKeyframeTransition a) =>
a -> [Double] -> m ()
keyframeTransitionSetKeyFrames a
transition [Double]
keyFrames = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
let nKeyFrames :: Word32
nKeyFrames = Int -> Word32
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> Word32) -> Int -> Word32
forall a b. (a -> b) -> a -> b
$ [Double] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
P.length [Double]
keyFrames
Ptr KeyframeTransition
transition' <- a -> IO (Ptr KeyframeTransition)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
transition
Ptr CDouble
keyFrames' <- ((Double -> CDouble) -> [Double] -> IO (Ptr CDouble)
forall a b. Storable b => (a -> b) -> [a] -> IO (Ptr b)
packMapStorableArray Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac) [Double]
keyFrames
Ptr KeyframeTransition -> Word32 -> Ptr CDouble -> IO ()
clutter_keyframe_transition_set_key_frames Ptr KeyframeTransition
transition' Word32
nKeyFrames Ptr CDouble
keyFrames'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
transition
Ptr CDouble -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CDouble
keyFrames'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data KeyframeTransitionSetKeyFramesMethodInfo
instance (signature ~ ([Double] -> m ()), MonadIO m, IsKeyframeTransition a) => O.OverloadedMethod KeyframeTransitionSetKeyFramesMethodInfo a signature where
overloadedMethod = keyframeTransitionSetKeyFrames
instance O.OverloadedMethodInfo KeyframeTransitionSetKeyFramesMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Clutter.Objects.KeyframeTransition.keyframeTransitionSetKeyFrames",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-clutter-1.0.2/docs/GI-Clutter-Objects-KeyframeTransition.html#v:keyframeTransitionSetKeyFrames"
})
#endif
foreign import ccall "clutter_keyframe_transition_set_modes" clutter_keyframe_transition_set_modes ::
Ptr KeyframeTransition ->
Word32 ->
Ptr CUInt ->
IO ()
keyframeTransitionSetModes ::
(B.CallStack.HasCallStack, MonadIO m, IsKeyframeTransition a) =>
a
-> [Clutter.Enums.AnimationMode]
-> m ()
keyframeTransitionSetModes :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsKeyframeTransition a) =>
a -> [AnimationMode] -> m ()
keyframeTransitionSetModes a
transition [AnimationMode]
modes = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
let nModes :: Word32
nModes = Int -> Word32
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> Word32) -> Int -> Word32
forall a b. (a -> b) -> a -> b
$ [AnimationMode] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
P.length [AnimationMode]
modes
Ptr KeyframeTransition
transition' <- a -> IO (Ptr KeyframeTransition)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
transition
let modes' :: [CUInt]
modes' = (AnimationMode -> CUInt) -> [AnimationMode] -> [CUInt]
forall a b. (a -> b) -> [a] -> [b]
map (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (AnimationMode -> Int) -> AnimationMode -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. AnimationMode -> Int
forall a. Enum a => a -> Int
fromEnum) [AnimationMode]
modes
Ptr CUInt
modes'' <- [CUInt] -> IO (Ptr CUInt)
forall a. Storable a => [a] -> IO (Ptr a)
packStorableArray [CUInt]
modes'
Ptr KeyframeTransition -> Word32 -> Ptr CUInt -> IO ()
clutter_keyframe_transition_set_modes Ptr KeyframeTransition
transition' Word32
nModes Ptr CUInt
modes''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
transition
Ptr CUInt -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CUInt
modes''
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data KeyframeTransitionSetModesMethodInfo
instance (signature ~ ([Clutter.Enums.AnimationMode] -> m ()), MonadIO m, IsKeyframeTransition a) => O.OverloadedMethod KeyframeTransitionSetModesMethodInfo a signature where
overloadedMethod = keyframeTransitionSetModes
instance O.OverloadedMethodInfo KeyframeTransitionSetModesMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Clutter.Objects.KeyframeTransition.keyframeTransitionSetModes",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-clutter-1.0.2/docs/GI-Clutter-Objects-KeyframeTransition.html#v:keyframeTransitionSetModes"
})
#endif
foreign import ccall "clutter_keyframe_transition_set_values" clutter_keyframe_transition_set_values ::
Ptr KeyframeTransition ->
Word32 ->
Ptr B.GValue.GValue ->
IO ()
keyframeTransitionSetValues ::
(B.CallStack.HasCallStack, MonadIO m, IsKeyframeTransition a) =>
a
-> [GValue]
-> m ()
keyframeTransitionSetValues :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsKeyframeTransition a) =>
a -> [GValue] -> m ()
keyframeTransitionSetValues a
transition [GValue]
values = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
let nValues :: Word32
nValues = Int -> Word32
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> Word32) -> Int -> Word32
forall a b. (a -> b) -> a -> b
$ [GValue] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
P.length [GValue]
values
Ptr KeyframeTransition
transition' <- a -> IO (Ptr KeyframeTransition)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
transition
Ptr GValue
values' <- [GValue] -> IO (Ptr GValue)
B.GValue.packGValueArray [GValue]
values
Ptr KeyframeTransition -> Word32 -> Ptr GValue -> IO ()
clutter_keyframe_transition_set_values Ptr KeyframeTransition
transition' Word32
nValues Ptr GValue
values'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
transition
(GValue -> IO ()) -> [GValue] -> IO ()
forall (t :: * -> *) (m :: * -> *) a b.
(Foldable t, Monad m) =>
(a -> m b) -> t a -> m ()
mapM_ GValue -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr [GValue]
values
Ptr GValue -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr GValue
values'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data KeyframeTransitionSetValuesMethodInfo
instance (signature ~ ([GValue] -> m ()), MonadIO m, IsKeyframeTransition a) => O.OverloadedMethod KeyframeTransitionSetValuesMethodInfo a signature where
overloadedMethod = keyframeTransitionSetValues
instance O.OverloadedMethodInfo KeyframeTransitionSetValuesMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Clutter.Objects.KeyframeTransition.keyframeTransitionSetValues",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-clutter-1.0.2/docs/GI-Clutter-Objects-KeyframeTransition.html#v:keyframeTransitionSetValues"
})
#endif