{-# LANGUAGE ImplicitParams, RankNTypes, TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Clutter.Objects.State
(
State(..) ,
IsState ,
toState ,
#if defined(ENABLE_OVERLOADING)
ResolveStateMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
StateGetAnimatorMethodInfo ,
#endif
stateGetAnimator ,
#if defined(ENABLE_OVERLOADING)
StateGetDurationMethodInfo ,
#endif
stateGetDuration ,
#if defined(ENABLE_OVERLOADING)
StateGetKeysMethodInfo ,
#endif
stateGetKeys ,
#if defined(ENABLE_OVERLOADING)
StateGetStateMethodInfo ,
#endif
stateGetState ,
#if defined(ENABLE_OVERLOADING)
StateGetStatesMethodInfo ,
#endif
stateGetStates ,
#if defined(ENABLE_OVERLOADING)
StateGetTimelineMethodInfo ,
#endif
stateGetTimeline ,
stateNew ,
#if defined(ENABLE_OVERLOADING)
StateRemoveKeyMethodInfo ,
#endif
stateRemoveKey ,
#if defined(ENABLE_OVERLOADING)
StateSetAnimatorMethodInfo ,
#endif
stateSetAnimator ,
#if defined(ENABLE_OVERLOADING)
StateSetDurationMethodInfo ,
#endif
stateSetDuration ,
#if defined(ENABLE_OVERLOADING)
StateSetKeyMethodInfo ,
#endif
stateSetKey ,
#if defined(ENABLE_OVERLOADING)
StateSetStateMethodInfo ,
#endif
stateSetState ,
#if defined(ENABLE_OVERLOADING)
StateWarpToStateMethodInfo ,
#endif
stateWarpToState ,
#if defined(ENABLE_OVERLOADING)
StateDurationPropertyInfo ,
#endif
constructStateDuration ,
getStateDuration ,
setStateDuration ,
#if defined(ENABLE_OVERLOADING)
stateDuration ,
#endif
#if defined(ENABLE_OVERLOADING)
StateStatePropertyInfo ,
#endif
clearStateState ,
constructStateState ,
getStateState ,
setStateState ,
#if defined(ENABLE_OVERLOADING)
stateState ,
#endif
StateCompletedCallback ,
#if defined(ENABLE_OVERLOADING)
StateCompletedSignalInfo ,
#endif
afterStateCompleted ,
onStateCompleted ,
) 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.Interfaces.Scriptable as Clutter.Scriptable
import {-# SOURCE #-} qualified GI.Clutter.Objects.Animator as Clutter.Animator
import {-# SOURCE #-} qualified GI.Clutter.Objects.Timeline as Clutter.Timeline
import {-# SOURCE #-} qualified GI.Clutter.Structs.StateKey as Clutter.StateKey
import qualified GI.GObject.Objects.Object as GObject.Object
newtype State = State (SP.ManagedPtr State)
deriving (State -> State -> Bool
(State -> State -> Bool) -> (State -> State -> Bool) -> Eq State
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: State -> State -> Bool
== :: State -> State -> Bool
$c/= :: State -> State -> Bool
/= :: State -> State -> Bool
Eq)
instance SP.ManagedPtrNewtype State where
toManagedPtr :: State -> ManagedPtr State
toManagedPtr (State ManagedPtr State
p) = ManagedPtr State
p
foreign import ccall "clutter_state_get_type"
c_clutter_state_get_type :: IO B.Types.GType
instance B.Types.TypedObject State where
glibType :: IO GType
glibType = IO GType
c_clutter_state_get_type
instance B.Types.GObject State
class (SP.GObject o, O.IsDescendantOf State o) => IsState o
instance (SP.GObject o, O.IsDescendantOf State o) => IsState o
instance O.HasParentTypes State
type instance O.ParentTypes State = '[GObject.Object.Object, Clutter.Scriptable.Scriptable]
toState :: (MIO.MonadIO m, IsState o) => o -> m State
toState :: forall (m :: * -> *) o. (MonadIO m, IsState o) => o -> m State
toState = IO State -> m State
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO State -> m State) -> (o -> IO State) -> o -> m State
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr State -> State) -> o -> IO State
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr State -> State
State
instance B.GValue.IsGValue (Maybe State) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_clutter_state_get_type
gvalueSet_ :: Ptr GValue -> Maybe State -> IO ()
gvalueSet_ Ptr GValue
gv Maybe State
P.Nothing = Ptr GValue -> Ptr State -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr State
forall a. Ptr a
FP.nullPtr :: FP.Ptr State)
gvalueSet_ Ptr GValue
gv (P.Just State
obj) = State -> (Ptr State -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr State
obj (Ptr GValue -> Ptr State -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe State)
gvalueGet_ Ptr GValue
gv = do
Ptr State
ptr <- Ptr GValue -> IO (Ptr State)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr State)
if Ptr State
ptr Ptr State -> Ptr State -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr State
forall a. Ptr a
FP.nullPtr
then State -> Maybe State
forall a. a -> Maybe a
P.Just (State -> Maybe State) -> IO State -> IO (Maybe State)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr State -> State) -> Ptr State -> IO State
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr State -> State
State Ptr State
ptr
else Maybe State -> IO (Maybe State)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe State
forall a. Maybe a
P.Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolveStateMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
ResolveStateMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveStateMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveStateMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveStateMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveStateMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveStateMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveStateMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveStateMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveStateMethod "parseCustomNode" o = Clutter.Scriptable.ScriptableParseCustomNodeMethodInfo
ResolveStateMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveStateMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveStateMethod "removeKey" o = StateRemoveKeyMethodInfo
ResolveStateMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveStateMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveStateMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveStateMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveStateMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveStateMethod "warpToState" o = StateWarpToStateMethodInfo
ResolveStateMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveStateMethod "getAnimator" o = StateGetAnimatorMethodInfo
ResolveStateMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveStateMethod "getDuration" o = StateGetDurationMethodInfo
ResolveStateMethod "getId" o = Clutter.Scriptable.ScriptableGetIdMethodInfo
ResolveStateMethod "getKeys" o = StateGetKeysMethodInfo
ResolveStateMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveStateMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveStateMethod "getState" o = StateGetStateMethodInfo
ResolveStateMethod "getStates" o = StateGetStatesMethodInfo
ResolveStateMethod "getTimeline" o = StateGetTimelineMethodInfo
ResolveStateMethod "setAnimator" o = StateSetAnimatorMethodInfo
ResolveStateMethod "setCustomProperty" o = Clutter.Scriptable.ScriptableSetCustomPropertyMethodInfo
ResolveStateMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveStateMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveStateMethod "setDuration" o = StateSetDurationMethodInfo
ResolveStateMethod "setId" o = Clutter.Scriptable.ScriptableSetIdMethodInfo
ResolveStateMethod "setKey" o = StateSetKeyMethodInfo
ResolveStateMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveStateMethod "setState" o = StateSetStateMethodInfo
ResolveStateMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveStateMethod t State, O.OverloadedMethod info State p) => OL.IsLabel t (State -> 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 ~ ResolveStateMethod t State, O.OverloadedMethod info State p, R.HasField t State p) => R.HasField t State p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveStateMethod t State, O.OverloadedMethodInfo info State) => OL.IsLabel t (O.MethodProxy info State) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif
{-# DEPRECATED StateCompletedCallback ["(Since version 1.12)","Use t'GI.Clutter.Objects.KeyframeTransition.KeyframeTransition' and"," t'GI.Clutter.Objects.TransitionGroup.TransitionGroup' instead"] #-}
type StateCompletedCallback =
IO ()
type C_StateCompletedCallback =
Ptr State ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_StateCompletedCallback :: C_StateCompletedCallback -> IO (FunPtr C_StateCompletedCallback)
wrap_StateCompletedCallback ::
GObject a => (a -> StateCompletedCallback) ->
C_StateCompletedCallback
wrap_StateCompletedCallback :: forall a. GObject a => (a -> IO ()) -> C_StateCompletedCallback
wrap_StateCompletedCallback a -> IO ()
gi'cb Ptr State
gi'selfPtr Ptr ()
_ = do
Ptr State -> (State -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr State
gi'selfPtr ((State -> IO ()) -> IO ()) -> (State -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \State
gi'self -> a -> IO ()
gi'cb (State -> a
forall a b. Coercible a b => a -> b
Coerce.coerce State
gi'self)
onStateCompleted :: (IsState a, MonadIO m) => a -> ((?self :: a) => StateCompletedCallback) -> m SignalHandlerId
onStateCompleted :: forall a (m :: * -> *).
(IsState a, MonadIO m) =>
a -> ((?self::a) => IO ()) -> m SignalHandlerId
onStateCompleted a
obj (?self::a) => IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> IO ()
wrapped a
self = let ?self = a
?self::a
self in IO ()
(?self::a) => IO ()
cb
let wrapped' :: C_StateCompletedCallback
wrapped' = (a -> IO ()) -> C_StateCompletedCallback
forall a. GObject a => (a -> IO ()) -> C_StateCompletedCallback
wrap_StateCompletedCallback a -> IO ()
wrapped
FunPtr C_StateCompletedCallback
wrapped'' <- C_StateCompletedCallback -> IO (FunPtr C_StateCompletedCallback)
mk_StateCompletedCallback C_StateCompletedCallback
wrapped'
a
-> Text
-> FunPtr C_StateCompletedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"completed" FunPtr C_StateCompletedCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterStateCompleted :: (IsState a, MonadIO m) => a -> ((?self :: a) => StateCompletedCallback) -> m SignalHandlerId
afterStateCompleted :: forall a (m :: * -> *).
(IsState a, MonadIO m) =>
a -> ((?self::a) => IO ()) -> m SignalHandlerId
afterStateCompleted a
obj (?self::a) => IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> IO ()
wrapped a
self = let ?self = a
?self::a
self in IO ()
(?self::a) => IO ()
cb
let wrapped' :: C_StateCompletedCallback
wrapped' = (a -> IO ()) -> C_StateCompletedCallback
forall a. GObject a => (a -> IO ()) -> C_StateCompletedCallback
wrap_StateCompletedCallback a -> IO ()
wrapped
FunPtr C_StateCompletedCallback
wrapped'' <- C_StateCompletedCallback -> IO (FunPtr C_StateCompletedCallback)
mk_StateCompletedCallback C_StateCompletedCallback
wrapped'
a
-> Text
-> FunPtr C_StateCompletedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"completed" FunPtr C_StateCompletedCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data StateCompletedSignalInfo
instance SignalInfo StateCompletedSignalInfo where
type HaskellCallbackType StateCompletedSignalInfo = StateCompletedCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_StateCompletedCallback cb
cb'' <- mk_StateCompletedCallback cb'
connectSignalFunPtr obj "completed" cb'' connectMode detail
dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Clutter.Objects.State::completed"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-clutter-1.0.5/docs/GI-Clutter-Objects-State.html#g:signal:completed"})
#endif
getStateDuration :: (MonadIO m, IsState o) => o -> m Word32
getStateDuration :: forall (m :: * -> *) o. (MonadIO m, IsState o) => o -> m Word32
getStateDuration 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"
setStateDuration :: (MonadIO m, IsState o) => o -> Word32 -> m ()
setStateDuration :: forall (m :: * -> *) o.
(MonadIO m, IsState o) =>
o -> Word32 -> m ()
setStateDuration 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
constructStateDuration :: (IsState o, MIO.MonadIO m) => Word32 -> m (GValueConstruct o)
constructStateDuration :: forall o (m :: * -> *).
(IsState o, MonadIO m) =>
Word32 -> m (GValueConstruct o)
constructStateDuration 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 StateDurationPropertyInfo
instance AttrInfo StateDurationPropertyInfo where
type AttrAllowedOps StateDurationPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint StateDurationPropertyInfo = IsState
type AttrSetTypeConstraint StateDurationPropertyInfo = (~) Word32
type AttrTransferTypeConstraint StateDurationPropertyInfo = (~) Word32
type AttrTransferType StateDurationPropertyInfo = Word32
type AttrGetType StateDurationPropertyInfo = Word32
type AttrLabel StateDurationPropertyInfo = "duration"
type AttrOrigin StateDurationPropertyInfo = State
attrGet = getStateDuration
attrSet = setStateDuration
attrTransfer _ v = do
return v
attrConstruct = constructStateDuration
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Clutter.Objects.State.duration"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-clutter-1.0.5/docs/GI-Clutter-Objects-State.html#g:attr:duration"
})
#endif
getStateState :: (MonadIO m, IsState o) => o -> m T.Text
getStateState :: forall (m :: * -> *) o. (MonadIO m, IsState o) => o -> m Text
getStateState o
obj = IO Text -> m Text
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ Text -> IO (Maybe Text) -> IO Text
forall a. HasCallStack => Text -> IO (Maybe a) -> IO a
checkUnexpectedNothing Text
"getStateState" (IO (Maybe Text) -> IO Text) -> IO (Maybe Text) -> IO Text
forall a b. (a -> b) -> a -> b
$ o -> String -> IO (Maybe Text)
forall a. GObject a => a -> String -> IO (Maybe Text)
B.Properties.getObjectPropertyString o
obj String
"state"
setStateState :: (MonadIO m, IsState o) => o -> T.Text -> m ()
setStateState :: forall (m :: * -> *) o. (MonadIO m, IsState o) => o -> Text -> m ()
setStateState o
obj Text
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 Text -> IO ()
forall a. GObject a => a -> String -> Maybe Text -> IO ()
B.Properties.setObjectPropertyString o
obj String
"state" (Text -> Maybe Text
forall a. a -> Maybe a
Just Text
val)
constructStateState :: (IsState o, MIO.MonadIO m) => T.Text -> m (GValueConstruct o)
constructStateState :: forall o (m :: * -> *).
(IsState o, MonadIO m) =>
Text -> m (GValueConstruct o)
constructStateState Text
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 Text -> IO (GValueConstruct o)
forall o. String -> Maybe Text -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyString String
"state" (Text -> Maybe Text
forall a. a -> Maybe a
P.Just Text
val)
clearStateState :: (MonadIO m, IsState o) => o -> m ()
clearStateState :: forall (m :: * -> *) o. (MonadIO m, IsState o) => o -> m ()
clearStateState o
obj = 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
$ o -> String -> Maybe Text -> IO ()
forall a. GObject a => a -> String -> Maybe Text -> IO ()
B.Properties.setObjectPropertyString o
obj String
"state" (Maybe Text
forall a. Maybe a
Nothing :: Maybe T.Text)
#if defined(ENABLE_OVERLOADING)
data StateStatePropertyInfo
instance AttrInfo StateStatePropertyInfo where
type AttrAllowedOps StateStatePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint StateStatePropertyInfo = IsState
type AttrSetTypeConstraint StateStatePropertyInfo = (~) T.Text
type AttrTransferTypeConstraint StateStatePropertyInfo = (~) T.Text
type AttrTransferType StateStatePropertyInfo = T.Text
type AttrGetType StateStatePropertyInfo = T.Text
type AttrLabel StateStatePropertyInfo = "state"
type AttrOrigin StateStatePropertyInfo = State
attrGet = getStateState
attrSet = setStateState
attrTransfer _ v = do
return v
attrConstruct = constructStateState
attrClear = clearStateState
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Clutter.Objects.State.state"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-clutter-1.0.5/docs/GI-Clutter-Objects-State.html#g:attr:state"
})
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList State
type instance O.AttributeList State = StateAttributeList
type StateAttributeList = ('[ '("duration", StateDurationPropertyInfo), '("state", StateStatePropertyInfo)] :: [(Symbol, DK.Type)])
#endif
#if defined(ENABLE_OVERLOADING)
stateDuration :: AttrLabelProxy "duration"
stateDuration = AttrLabelProxy
stateState :: AttrLabelProxy "state"
stateState = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList State = StateSignalList
type StateSignalList = ('[ '("completed", StateCompletedSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, DK.Type)])
#endif
foreign import ccall "clutter_state_new" clutter_state_new ::
IO (Ptr State)
{-# DEPRECATED stateNew ["(Since version 1.12)","Use t'GI.Clutter.Objects.KeyframeTransition.KeyframeTransition' and"," t'GI.Clutter.Objects.TransitionGroup.TransitionGroup' instead"] #-}
stateNew ::
(B.CallStack.HasCallStack, MonadIO m) =>
m State
stateNew :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m State
stateNew = IO State -> m State
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO State -> m State) -> IO State -> m State
forall a b. (a -> b) -> a -> b
$ do
Ptr State
result <- IO (Ptr State)
clutter_state_new
Text -> Ptr State -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"stateNew" Ptr State
result
State
result' <- ((ManagedPtr State -> State) -> Ptr State -> IO State
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr State -> State
State) Ptr State
result
State -> IO State
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return State
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "clutter_state_get_animator" clutter_state_get_animator ::
Ptr State ->
CString ->
CString ->
IO (Ptr Clutter.Animator.Animator)
{-# DEPRECATED stateGetAnimator ["(Since version 1.12)","Use t'GI.Clutter.Objects.KeyframeTransition.KeyframeTransition' and"," t'GI.Clutter.Objects.TransitionGroup.TransitionGroup' instead"] #-}
stateGetAnimator ::
(B.CallStack.HasCallStack, MonadIO m, IsState a) =>
a
-> T.Text
-> T.Text
-> m Clutter.Animator.Animator
stateGetAnimator :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsState a) =>
a -> Text -> Text -> m Animator
stateGetAnimator a
state Text
sourceStateName Text
targetStateName = 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 State
state' <- a -> IO (Ptr State)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
state
CString
sourceStateName' <- Text -> IO CString
textToCString Text
sourceStateName
CString
targetStateName' <- Text -> IO CString
textToCString Text
targetStateName
Ptr Animator
result <- Ptr State -> CString -> CString -> IO (Ptr Animator)
clutter_state_get_animator Ptr State
state' CString
sourceStateName' CString
targetStateName'
Text -> Ptr Animator -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"stateGetAnimator" 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
Clutter.Animator.Animator) Ptr Animator
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
state
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
sourceStateName'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
targetStateName'
Animator -> IO Animator
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Animator
result'
#if defined(ENABLE_OVERLOADING)
data StateGetAnimatorMethodInfo
instance (signature ~ (T.Text -> T.Text -> m Clutter.Animator.Animator), MonadIO m, IsState a) => O.OverloadedMethod StateGetAnimatorMethodInfo a signature where
overloadedMethod = stateGetAnimator
instance O.OverloadedMethodInfo StateGetAnimatorMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Clutter.Objects.State.stateGetAnimator",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-clutter-1.0.5/docs/GI-Clutter-Objects-State.html#v:stateGetAnimator"
})
#endif
foreign import ccall "clutter_state_get_duration" clutter_state_get_duration ::
Ptr State ->
CString ->
CString ->
IO Word32
{-# DEPRECATED stateGetDuration ["(Since version 1.12)","Use t'GI.Clutter.Objects.KeyframeTransition.KeyframeTransition' and"," t'GI.Clutter.Objects.TransitionGroup.TransitionGroup' instead"] #-}
stateGetDuration ::
(B.CallStack.HasCallStack, MonadIO m, IsState a) =>
a
-> Maybe (T.Text)
-> Maybe (T.Text)
-> m Word32
stateGetDuration :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsState a) =>
a -> Maybe Text -> Maybe Text -> m Word32
stateGetDuration a
state Maybe Text
sourceStateName Maybe Text
targetStateName = 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 State
state' <- a -> IO (Ptr State)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
state
CString
maybeSourceStateName <- case Maybe Text
sourceStateName 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
jSourceStateName -> do
CString
jSourceStateName' <- Text -> IO CString
textToCString Text
jSourceStateName
CString -> IO CString
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jSourceStateName'
CString
maybeTargetStateName <- case Maybe Text
targetStateName 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
jTargetStateName -> do
CString
jTargetStateName' <- Text -> IO CString
textToCString Text
jTargetStateName
CString -> IO CString
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jTargetStateName'
Word32
result <- Ptr State -> CString -> CString -> IO Word32
clutter_state_get_duration Ptr State
state' CString
maybeSourceStateName CString
maybeTargetStateName
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
state
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeSourceStateName
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeTargetStateName
Word32 -> IO Word32
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result
#if defined(ENABLE_OVERLOADING)
data StateGetDurationMethodInfo
instance (signature ~ (Maybe (T.Text) -> Maybe (T.Text) -> m Word32), MonadIO m, IsState a) => O.OverloadedMethod StateGetDurationMethodInfo a signature where
overloadedMethod = stateGetDuration
instance O.OverloadedMethodInfo StateGetDurationMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Clutter.Objects.State.stateGetDuration",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-clutter-1.0.5/docs/GI-Clutter-Objects-State.html#v:stateGetDuration"
})
#endif
foreign import ccall "clutter_state_get_keys" clutter_state_get_keys ::
Ptr State ->
CString ->
CString ->
Ptr GObject.Object.Object ->
CString ->
IO (Ptr (GList (Ptr Clutter.StateKey.StateKey)))
{-# DEPRECATED stateGetKeys ["(Since version 1.12)","Use t'GI.Clutter.Objects.KeyframeTransition.KeyframeTransition' and"," t'GI.Clutter.Objects.TransitionGroup.TransitionGroup' instead"] #-}
stateGetKeys ::
(B.CallStack.HasCallStack, MonadIO m, IsState a, GObject.Object.IsObject b) =>
a
-> Maybe (T.Text)
-> Maybe (T.Text)
-> Maybe (b)
-> Maybe (T.Text)
-> m [Clutter.StateKey.StateKey]
stateGetKeys :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsState a, IsObject b) =>
a
-> Maybe Text
-> Maybe Text
-> Maybe b
-> Maybe Text
-> m [StateKey]
stateGetKeys a
state Maybe Text
sourceStateName Maybe Text
targetStateName Maybe b
object Maybe Text
propertyName = IO [StateKey] -> m [StateKey]
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [StateKey] -> m [StateKey]) -> IO [StateKey] -> m [StateKey]
forall a b. (a -> b) -> a -> b
$ do
Ptr State
state' <- a -> IO (Ptr State)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
state
CString
maybeSourceStateName <- case Maybe Text
sourceStateName 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
jSourceStateName -> do
CString
jSourceStateName' <- Text -> IO CString
textToCString Text
jSourceStateName
CString -> IO CString
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jSourceStateName'
CString
maybeTargetStateName <- case Maybe Text
targetStateName 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
jTargetStateName -> do
CString
jTargetStateName' <- Text -> IO CString
textToCString Text
jTargetStateName
CString -> IO CString
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jTargetStateName'
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'
Ptr (GList (Ptr StateKey))
result <- Ptr State
-> CString
-> CString
-> Ptr Object
-> CString
-> IO (Ptr (GList (Ptr StateKey)))
clutter_state_get_keys Ptr State
state' CString
maybeSourceStateName CString
maybeTargetStateName Ptr Object
maybeObject CString
maybePropertyName
[Ptr StateKey]
result' <- Ptr (GList (Ptr StateKey)) -> IO [Ptr StateKey]
forall a. Ptr (GList (Ptr a)) -> IO [Ptr a]
unpackGList Ptr (GList (Ptr StateKey))
result
[StateKey]
result'' <- (Ptr StateKey -> IO StateKey) -> [Ptr StateKey] -> IO [StateKey]
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 StateKey -> StateKey) -> Ptr StateKey -> IO StateKey
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newBoxed ManagedPtr StateKey -> StateKey
Clutter.StateKey.StateKey) [Ptr StateKey]
result'
Ptr (GList (Ptr StateKey)) -> IO ()
forall a. Ptr (GList a) -> IO ()
g_list_free Ptr (GList (Ptr StateKey))
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
state
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
maybeSourceStateName
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeTargetStateName
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybePropertyName
[StateKey] -> IO [StateKey]
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return [StateKey]
result''
#if defined(ENABLE_OVERLOADING)
data StateGetKeysMethodInfo
instance (signature ~ (Maybe (T.Text) -> Maybe (T.Text) -> Maybe (b) -> Maybe (T.Text) -> m [Clutter.StateKey.StateKey]), MonadIO m, IsState a, GObject.Object.IsObject b) => O.OverloadedMethod StateGetKeysMethodInfo a signature where
overloadedMethod = stateGetKeys
instance O.OverloadedMethodInfo StateGetKeysMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Clutter.Objects.State.stateGetKeys",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-clutter-1.0.5/docs/GI-Clutter-Objects-State.html#v:stateGetKeys"
})
#endif
foreign import ccall "clutter_state_get_state" clutter_state_get_state ::
Ptr State ->
IO CString
{-# DEPRECATED stateGetState ["(Since version 1.12)","Use t'GI.Clutter.Objects.KeyframeTransition.KeyframeTransition' and"," t'GI.Clutter.Objects.TransitionGroup.TransitionGroup' instead"] #-}
stateGetState ::
(B.CallStack.HasCallStack, MonadIO m, IsState a) =>
a
-> m T.Text
stateGetState :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsState a) =>
a -> m Text
stateGetState a
state = IO Text -> m Text
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
Ptr State
state' <- a -> IO (Ptr State)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
state
CString
result <- Ptr State -> IO CString
clutter_state_get_state Ptr State
state'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"stateGetState" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
state
Text -> IO Text
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data StateGetStateMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsState a) => O.OverloadedMethod StateGetStateMethodInfo a signature where
overloadedMethod = stateGetState
instance O.OverloadedMethodInfo StateGetStateMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Clutter.Objects.State.stateGetState",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-clutter-1.0.5/docs/GI-Clutter-Objects-State.html#v:stateGetState"
})
#endif
foreign import ccall "clutter_state_get_states" clutter_state_get_states ::
Ptr State ->
IO (Ptr (GList CString))
{-# DEPRECATED stateGetStates ["(Since version 1.12)","Use t'GI.Clutter.Objects.KeyframeTransition.KeyframeTransition' and"," t'GI.Clutter.Objects.TransitionGroup.TransitionGroup' instead"] #-}
stateGetStates ::
(B.CallStack.HasCallStack, MonadIO m, IsState a) =>
a
-> m [T.Text]
stateGetStates :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsState a) =>
a -> m [Text]
stateGetStates a
state = IO [Text] -> m [Text]
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [Text] -> m [Text]) -> IO [Text] -> m [Text]
forall a b. (a -> b) -> a -> b
$ do
Ptr State
state' <- a -> IO (Ptr State)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
state
Ptr (GList CString)
result <- Ptr State -> IO (Ptr (GList CString))
clutter_state_get_states Ptr State
state'
[CString]
result' <- Ptr (GList CString) -> IO [CString]
forall a. Ptr (GList (Ptr a)) -> IO [Ptr a]
unpackGList Ptr (GList CString)
result
[Text]
result'' <- (CString -> IO Text) -> [CString] -> IO [Text]
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 HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText [CString]
result'
Ptr (GList CString) -> IO ()
forall a. Ptr (GList a) -> IO ()
g_list_free Ptr (GList CString)
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
state
[Text] -> IO [Text]
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return [Text]
result''
#if defined(ENABLE_OVERLOADING)
data StateGetStatesMethodInfo
instance (signature ~ (m [T.Text]), MonadIO m, IsState a) => O.OverloadedMethod StateGetStatesMethodInfo a signature where
overloadedMethod = stateGetStates
instance O.OverloadedMethodInfo StateGetStatesMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Clutter.Objects.State.stateGetStates",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-clutter-1.0.5/docs/GI-Clutter-Objects-State.html#v:stateGetStates"
})
#endif
foreign import ccall "clutter_state_get_timeline" clutter_state_get_timeline ::
Ptr State ->
IO (Ptr Clutter.Timeline.Timeline)
{-# DEPRECATED stateGetTimeline ["(Since version 1.12)","Use t'GI.Clutter.Objects.KeyframeTransition.KeyframeTransition' and"," t'GI.Clutter.Objects.TransitionGroup.TransitionGroup' instead"] #-}
stateGetTimeline ::
(B.CallStack.HasCallStack, MonadIO m, IsState a) =>
a
-> m Clutter.Timeline.Timeline
stateGetTimeline :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsState a) =>
a -> m Timeline
stateGetTimeline a
state = 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 State
state' <- a -> IO (Ptr State)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
state
Ptr Timeline
result <- Ptr State -> IO (Ptr Timeline)
clutter_state_get_timeline Ptr State
state'
Text -> Ptr Timeline -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"stateGetTimeline" 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
state
Timeline -> IO Timeline
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Timeline
result'
#if defined(ENABLE_OVERLOADING)
data StateGetTimelineMethodInfo
instance (signature ~ (m Clutter.Timeline.Timeline), MonadIO m, IsState a) => O.OverloadedMethod StateGetTimelineMethodInfo a signature where
overloadedMethod = stateGetTimeline
instance O.OverloadedMethodInfo StateGetTimelineMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Clutter.Objects.State.stateGetTimeline",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-clutter-1.0.5/docs/GI-Clutter-Objects-State.html#v:stateGetTimeline"
})
#endif
foreign import ccall "clutter_state_remove_key" clutter_state_remove_key ::
Ptr State ->
CString ->
CString ->
Ptr GObject.Object.Object ->
CString ->
IO ()
{-# DEPRECATED stateRemoveKey ["(Since version 1.12)","Use t'GI.Clutter.Objects.KeyframeTransition.KeyframeTransition' and"," t'GI.Clutter.Objects.TransitionGroup.TransitionGroup' instead"] #-}
stateRemoveKey ::
(B.CallStack.HasCallStack, MonadIO m, IsState a, GObject.Object.IsObject b) =>
a
-> Maybe (T.Text)
-> Maybe (T.Text)
-> Maybe (b)
-> Maybe (T.Text)
-> m ()
stateRemoveKey :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsState a, IsObject b) =>
a -> Maybe Text -> Maybe Text -> Maybe b -> Maybe Text -> m ()
stateRemoveKey a
state Maybe Text
sourceStateName Maybe Text
targetStateName Maybe b
object Maybe Text
propertyName = 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 State
state' <- a -> IO (Ptr State)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
state
CString
maybeSourceStateName <- case Maybe Text
sourceStateName 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
jSourceStateName -> do
CString
jSourceStateName' <- Text -> IO CString
textToCString Text
jSourceStateName
CString -> IO CString
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jSourceStateName'
CString
maybeTargetStateName <- case Maybe Text
targetStateName 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
jTargetStateName -> do
CString
jTargetStateName' <- Text -> IO CString
textToCString Text
jTargetStateName
CString -> IO CString
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jTargetStateName'
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'
Ptr State -> CString -> CString -> Ptr Object -> CString -> IO ()
clutter_state_remove_key Ptr State
state' CString
maybeSourceStateName CString
maybeTargetStateName Ptr Object
maybeObject CString
maybePropertyName
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
state
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
maybeSourceStateName
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeTargetStateName
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 StateRemoveKeyMethodInfo
instance (signature ~ (Maybe (T.Text) -> Maybe (T.Text) -> Maybe (b) -> Maybe (T.Text) -> m ()), MonadIO m, IsState a, GObject.Object.IsObject b) => O.OverloadedMethod StateRemoveKeyMethodInfo a signature where
overloadedMethod = stateRemoveKey
instance O.OverloadedMethodInfo StateRemoveKeyMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Clutter.Objects.State.stateRemoveKey",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-clutter-1.0.5/docs/GI-Clutter-Objects-State.html#v:stateRemoveKey"
})
#endif
foreign import ccall "clutter_state_set_animator" clutter_state_set_animator ::
Ptr State ->
CString ->
CString ->
Ptr Clutter.Animator.Animator ->
IO ()
{-# DEPRECATED stateSetAnimator ["(Since version 1.12)","Use t'GI.Clutter.Objects.KeyframeTransition.KeyframeTransition' and"," t'GI.Clutter.Objects.TransitionGroup.TransitionGroup' instead"] #-}
stateSetAnimator ::
(B.CallStack.HasCallStack, MonadIO m, IsState a, Clutter.Animator.IsAnimator b) =>
a
-> T.Text
-> T.Text
-> Maybe (b)
-> m ()
stateSetAnimator :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsState a, IsAnimator b) =>
a -> Text -> Text -> Maybe b -> m ()
stateSetAnimator a
state Text
sourceStateName Text
targetStateName Maybe b
animator = 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 State
state' <- a -> IO (Ptr State)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
state
CString
sourceStateName' <- Text -> IO CString
textToCString Text
sourceStateName
CString
targetStateName' <- Text -> IO CString
textToCString Text
targetStateName
Ptr Animator
maybeAnimator <- case Maybe b
animator of
Maybe b
Nothing -> Ptr Animator -> IO (Ptr Animator)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Animator
forall a. Ptr a
nullPtr
Just b
jAnimator -> do
Ptr Animator
jAnimator' <- b -> IO (Ptr Animator)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jAnimator
Ptr Animator -> IO (Ptr Animator)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Animator
jAnimator'
Ptr State -> CString -> CString -> Ptr Animator -> IO ()
clutter_state_set_animator Ptr State
state' CString
sourceStateName' CString
targetStateName' Ptr Animator
maybeAnimator
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
state
Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
animator b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
sourceStateName'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
targetStateName'
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data StateSetAnimatorMethodInfo
instance (signature ~ (T.Text -> T.Text -> Maybe (b) -> m ()), MonadIO m, IsState a, Clutter.Animator.IsAnimator b) => O.OverloadedMethod StateSetAnimatorMethodInfo a signature where
overloadedMethod = stateSetAnimator
instance O.OverloadedMethodInfo StateSetAnimatorMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Clutter.Objects.State.stateSetAnimator",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-clutter-1.0.5/docs/GI-Clutter-Objects-State.html#v:stateSetAnimator"
})
#endif
foreign import ccall "clutter_state_set_duration" clutter_state_set_duration ::
Ptr State ->
CString ->
CString ->
Word32 ->
IO ()
{-# DEPRECATED stateSetDuration ["(Since version 1.12)","Use t'GI.Clutter.Objects.KeyframeTransition.KeyframeTransition' and"," t'GI.Clutter.Objects.TransitionGroup.TransitionGroup' instead"] #-}
stateSetDuration ::
(B.CallStack.HasCallStack, MonadIO m, IsState a) =>
a
-> Maybe (T.Text)
-> Maybe (T.Text)
-> Word32
-> m ()
stateSetDuration :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsState a) =>
a -> Maybe Text -> Maybe Text -> Word32 -> m ()
stateSetDuration a
state Maybe Text
sourceStateName Maybe Text
targetStateName 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 State
state' <- a -> IO (Ptr State)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
state
CString
maybeSourceStateName <- case Maybe Text
sourceStateName 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
jSourceStateName -> do
CString
jSourceStateName' <- Text -> IO CString
textToCString Text
jSourceStateName
CString -> IO CString
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jSourceStateName'
CString
maybeTargetStateName <- case Maybe Text
targetStateName 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
jTargetStateName -> do
CString
jTargetStateName' <- Text -> IO CString
textToCString Text
jTargetStateName
CString -> IO CString
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jTargetStateName'
Ptr State -> CString -> CString -> Word32 -> IO ()
clutter_state_set_duration Ptr State
state' CString
maybeSourceStateName CString
maybeTargetStateName Word32
duration
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
state
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeSourceStateName
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeTargetStateName
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data StateSetDurationMethodInfo
instance (signature ~ (Maybe (T.Text) -> Maybe (T.Text) -> Word32 -> m ()), MonadIO m, IsState a) => O.OverloadedMethod StateSetDurationMethodInfo a signature where
overloadedMethod = stateSetDuration
instance O.OverloadedMethodInfo StateSetDurationMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Clutter.Objects.State.stateSetDuration",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-clutter-1.0.5/docs/GI-Clutter-Objects-State.html#v:stateSetDuration"
})
#endif
foreign import ccall "clutter_state_set_key" clutter_state_set_key ::
Ptr State ->
CString ->
CString ->
Ptr GObject.Object.Object ->
CString ->
Word32 ->
Ptr GValue ->
CDouble ->
CDouble ->
IO (Ptr State)
{-# DEPRECATED stateSetKey ["(Since version 1.12)","Use t'GI.Clutter.Objects.KeyframeTransition.KeyframeTransition' and"," t'GI.Clutter.Objects.TransitionGroup.TransitionGroup' instead"] #-}
stateSetKey ::
(B.CallStack.HasCallStack, MonadIO m, IsState a, GObject.Object.IsObject b) =>
a
-> Maybe (T.Text)
-> T.Text
-> b
-> T.Text
-> Word32
-> GValue
-> Double
-> Double
-> m State
stateSetKey :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsState a, IsObject b) =>
a
-> Maybe Text
-> Text
-> b
-> Text
-> Word32
-> GValue
-> Double
-> Double
-> m State
stateSetKey a
state Maybe Text
sourceStateName Text
targetStateName b
object Text
propertyName Word32
mode GValue
value Double
preDelay Double
postDelay = IO State -> m State
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO State -> m State) -> IO State -> m State
forall a b. (a -> b) -> a -> b
$ do
Ptr State
state' <- a -> IO (Ptr State)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
state
CString
maybeSourceStateName <- case Maybe Text
sourceStateName 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
jSourceStateName -> do
CString
jSourceStateName' <- Text -> IO CString
textToCString Text
jSourceStateName
CString -> IO CString
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jSourceStateName'
CString
targetStateName' <- Text -> IO CString
textToCString Text
targetStateName
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
Ptr GValue
value' <- GValue -> IO (Ptr GValue)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GValue
value
let preDelay' :: CDouble
preDelay' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
preDelay
let postDelay' :: CDouble
postDelay' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
postDelay
Ptr State
result <- Ptr State
-> CString
-> CString
-> Ptr Object
-> CString
-> Word32
-> Ptr GValue
-> CDouble
-> CDouble
-> IO (Ptr State)
clutter_state_set_key Ptr State
state' CString
maybeSourceStateName CString
targetStateName' Ptr Object
object' CString
propertyName' Word32
mode Ptr GValue
value' CDouble
preDelay' CDouble
postDelay'
Text -> Ptr State -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"stateSetKey" Ptr State
result
State
result' <- ((ManagedPtr State -> State) -> Ptr State -> IO State
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr State -> State
State) Ptr State
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
state
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
maybeSourceStateName
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
targetStateName'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
propertyName'
State -> IO State
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return State
result'
#if defined(ENABLE_OVERLOADING)
data StateSetKeyMethodInfo
instance (signature ~ (Maybe (T.Text) -> T.Text -> b -> T.Text -> Word32 -> GValue -> Double -> Double -> m State), MonadIO m, IsState a, GObject.Object.IsObject b) => O.OverloadedMethod StateSetKeyMethodInfo a signature where
overloadedMethod = stateSetKey
instance O.OverloadedMethodInfo StateSetKeyMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Clutter.Objects.State.stateSetKey",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-clutter-1.0.5/docs/GI-Clutter-Objects-State.html#v:stateSetKey"
})
#endif
foreign import ccall "clutter_state_set_state" clutter_state_set_state ::
Ptr State ->
CString ->
IO (Ptr Clutter.Timeline.Timeline)
{-# DEPRECATED stateSetState ["(Since version 1.12)","Use t'GI.Clutter.Objects.KeyframeTransition.KeyframeTransition' and"," t'GI.Clutter.Objects.TransitionGroup.TransitionGroup' instead"] #-}
stateSetState ::
(B.CallStack.HasCallStack, MonadIO m, IsState a) =>
a
-> T.Text
-> m Clutter.Timeline.Timeline
stateSetState :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsState a) =>
a -> Text -> m Timeline
stateSetState a
state Text
targetStateName = 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 State
state' <- a -> IO (Ptr State)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
state
CString
targetStateName' <- Text -> IO CString
textToCString Text
targetStateName
Ptr Timeline
result <- Ptr State -> CString -> IO (Ptr Timeline)
clutter_state_set_state Ptr State
state' CString
targetStateName'
Text -> Ptr Timeline -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"stateSetState" 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
state
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
targetStateName'
Timeline -> IO Timeline
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Timeline
result'
#if defined(ENABLE_OVERLOADING)
data StateSetStateMethodInfo
instance (signature ~ (T.Text -> m Clutter.Timeline.Timeline), MonadIO m, IsState a) => O.OverloadedMethod StateSetStateMethodInfo a signature where
overloadedMethod = stateSetState
instance O.OverloadedMethodInfo StateSetStateMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Clutter.Objects.State.stateSetState",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-clutter-1.0.5/docs/GI-Clutter-Objects-State.html#v:stateSetState"
})
#endif
foreign import ccall "clutter_state_warp_to_state" clutter_state_warp_to_state ::
Ptr State ->
CString ->
IO (Ptr Clutter.Timeline.Timeline)
{-# DEPRECATED stateWarpToState ["(Since version 1.12)","Use t'GI.Clutter.Objects.KeyframeTransition.KeyframeTransition' and"," t'GI.Clutter.Objects.TransitionGroup.TransitionGroup' instead"] #-}
stateWarpToState ::
(B.CallStack.HasCallStack, MonadIO m, IsState a) =>
a
-> T.Text
-> m Clutter.Timeline.Timeline
stateWarpToState :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsState a) =>
a -> Text -> m Timeline
stateWarpToState a
state Text
targetStateName = 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 State
state' <- a -> IO (Ptr State)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
state
CString
targetStateName' <- Text -> IO CString
textToCString Text
targetStateName
Ptr Timeline
result <- Ptr State -> CString -> IO (Ptr Timeline)
clutter_state_warp_to_state Ptr State
state' CString
targetStateName'
Text -> Ptr Timeline -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"stateWarpToState" 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
state
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
targetStateName'
Timeline -> IO Timeline
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Timeline
result'
#if defined(ENABLE_OVERLOADING)
data StateWarpToStateMethodInfo
instance (signature ~ (T.Text -> m Clutter.Timeline.Timeline), MonadIO m, IsState a) => O.OverloadedMethod StateWarpToStateMethodInfo a signature where
overloadedMethod = stateWarpToState
instance O.OverloadedMethodInfo StateWarpToStateMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Clutter.Objects.State.stateWarpToState",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-clutter-1.0.5/docs/GI-Clutter-Objects-State.html#v:stateWarpToState"
})
#endif