| Copyright | Will Thompson and Iñaki García Etxebarria | 
|---|---|
| License | LGPL-2.1 | 
| Maintainer | Iñaki García Etxebarria | 
| Safe Haskell | Safe-Inferred | 
| Language | Haskell2010 | 
GI.Clutter.Objects.State
Description
The State structure contains only
 private data and should be accessed using the provided API
Since: 1.4
Synopsis
- newtype State = State (ManagedPtr State)
 - class (GObject o, IsDescendantOf State o) => IsState o
 - toState :: (MonadIO m, IsState o) => o -> m State
 - stateGetAnimator :: (HasCallStack, MonadIO m, IsState a) => a -> Text -> Text -> m Animator
 - stateGetDuration :: (HasCallStack, MonadIO m, IsState a) => a -> Maybe Text -> Maybe Text -> m Word32
 - stateGetKeys :: (HasCallStack, MonadIO m, IsState a, IsObject b) => a -> Maybe Text -> Maybe Text -> Maybe b -> Maybe Text -> m [StateKey]
 - stateGetState :: (HasCallStack, MonadIO m, IsState a) => a -> m Text
 - stateGetStates :: (HasCallStack, MonadIO m, IsState a) => a -> m [Text]
 - stateGetTimeline :: (HasCallStack, MonadIO m, IsState a) => a -> m Timeline
 - stateNew :: (HasCallStack, MonadIO m) => m State
 - stateRemoveKey :: (HasCallStack, MonadIO m, IsState a, IsObject b) => a -> Maybe Text -> Maybe Text -> Maybe b -> Maybe Text -> m ()
 - stateSetAnimator :: (HasCallStack, MonadIO m, IsState a, IsAnimator b) => a -> Text -> Text -> Maybe b -> m ()
 - stateSetDuration :: (HasCallStack, MonadIO m, IsState a) => a -> Maybe Text -> Maybe Text -> Word32 -> m ()
 - stateSetKey :: (HasCallStack, MonadIO m, IsState a, IsObject b) => a -> Maybe Text -> Text -> b -> Text -> Word32 -> GValue -> Double -> Double -> m State
 - stateSetState :: (HasCallStack, MonadIO m, IsState a) => a -> Text -> m Timeline
 - stateWarpToState :: (HasCallStack, MonadIO m, IsState a) => a -> Text -> m Timeline
 - constructStateDuration :: (IsState o, MonadIO m) => Word32 -> m (GValueConstruct o)
 - getStateDuration :: (MonadIO m, IsState o) => o -> m Word32
 - setStateDuration :: (MonadIO m, IsState o) => o -> Word32 -> m ()
 - clearStateState :: (MonadIO m, IsState o) => o -> m ()
 - constructStateState :: (IsState o, MonadIO m) => Text -> m (GValueConstruct o)
 - getStateState :: (MonadIO m, IsState o) => o -> m Text
 - setStateState :: (MonadIO m, IsState o) => o -> Text -> m ()
 - type StateCompletedCallback = IO ()
 - afterStateCompleted :: (IsState a, MonadIO m) => a -> ((?self :: a) => StateCompletedCallback) -> m SignalHandlerId
 - onStateCompleted :: (IsState a, MonadIO m) => a -> ((?self :: a) => StateCompletedCallback) -> m SignalHandlerId
 
Exported types
Memory-managed wrapper type.
Instances
| Eq State Source # | |
| GObject State Source # | |
Defined in GI.Clutter.Objects.State  | |
| ManagedPtrNewtype State Source # | |
Defined in GI.Clutter.Objects.State Methods toManagedPtr :: State -> ManagedPtr State  | |
| TypedObject State Source # | |
Defined in GI.Clutter.Objects.State  | |
| HasParentTypes State Source # | |
Defined in GI.Clutter.Objects.State  | |
| IsGValue (Maybe State) Source # | Convert   | 
Defined in GI.Clutter.Objects.State Methods gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe State -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe State)  | |
| type ParentTypes State Source # | |
Defined in GI.Clutter.Objects.State  | |
class (GObject o, IsDescendantOf State o) => IsState o Source #
Instances
| (GObject o, IsDescendantOf State o) => IsState o Source # | |
Defined in GI.Clutter.Objects.State  | |
Methods
Click to display all available methods, including inherited ones
Methods
bindProperty, bindPropertyFull, forceFloating, freezeNotify, getv, isFloating, notify, notifyByPspec, parseCustomNode, ref, refSink, removeKey, runDispose, stealData, stealQdata, thawNotify, unref, warpToState, watchClosure.
Getters
getAnimator, getData, getDuration, getId, getKeys, getProperty, getQdata, getState, getStates, getTimeline.
Setters
setAnimator, setCustomProperty, setData, setDataFull, setDuration, setId, setKey, setProperty, setState.
getAnimator
Arguments
| :: (HasCallStack, MonadIO m, IsState a) | |
| => a | 
  | 
| -> Text | 
  | 
| -> Text | 
  | 
| -> m Animator | 
Deprecated: (Since version 1.12)Use KeyframeTransition and  TransitionGroup instead
Retrieves the Animator that is being used for transitioning
 between the two states, if any has been set
Since: 1.4
getDuration
Arguments
| :: (HasCallStack, MonadIO m, IsState a) | |
| => a | 
  | 
| -> Maybe Text | 
  | 
| -> Maybe Text | 
  | 
| -> m Word32 | Returns: the duration, in milliseconds  | 
Deprecated: (Since version 1.12)Use KeyframeTransition and  TransitionGroup instead
Queries the duration used for transitions between a source and target state pair
The semantics for the query are the same as the semantics used for
 setting the duration with stateSetDuration
Since: 1.4
getKeys
Arguments
| :: (HasCallStack, MonadIO m, IsState a, IsObject b) | |
| => a | 
  | 
| -> Maybe Text | 
  | 
| -> Maybe Text | 
  | 
| -> Maybe b | 
  | 
| -> Maybe Text | 
  | 
| -> m [StateKey] | Returns: a
   newly allocated   | 
Deprecated: (Since version 1.12)Use KeyframeTransition and  TransitionGroup instead
Returns a list of pointers to opaque structures with accessor functions that describe the keys added to an animator.
Since: 1.4
getState
Arguments
| :: (HasCallStack, MonadIO m, IsState a) | |
| => a | 
  | 
| -> m Text | Returns: a string containing the target state. The returned string
   is owned by the   | 
Deprecated: (Since version 1.12)Use KeyframeTransition and  TransitionGroup instead
Queries the currently set target state.
During a transition this function will return the target of the transition.
This function is useful when called from handlers of the State::completed signal.
Since: 1.4
getStates
Arguments
| :: (HasCallStack, MonadIO m, IsState a) | |
| => a | 
  | 
| -> m [Text] | Returns: a newly allocated
     | 
Deprecated: (Since version 1.12)Use KeyframeTransition and  TransitionGroup instead
Gets a list of all the state names managed by this State.
Since: 1.4
getTimeline
Arguments
| :: (HasCallStack, MonadIO m, IsState a) | |
| => a | 
  | 
| -> m Timeline | Returns: the   | 
Deprecated: (Since version 1.12)Use KeyframeTransition and  TransitionGroup instead
Gets the timeline driving the State
Since: 1.4
new
Arguments
| :: (HasCallStack, MonadIO m) | |
| => m State | Returns: the newly create   | 
Deprecated: (Since version 1.12)Use KeyframeTransition and  TransitionGroup instead
Creates a new State
Since: 1.4
removeKey
Arguments
| :: (HasCallStack, MonadIO m, IsState a, IsObject b) | |
| => a | 
  | 
| -> Maybe Text | 
  | 
| -> Maybe Text | 
  | 
| -> Maybe b | 
  | 
| -> Maybe Text | 
  | 
| -> m () | 
Deprecated: (Since version 1.12)Use KeyframeTransition and  TransitionGroup instead
Removes all keys matching the search criteria passed in arguments.
Since: 1.4
setAnimator
Arguments
| :: (HasCallStack, MonadIO m, IsState a, IsAnimator b) | |
| => a | 
  | 
| -> Text | 
  | 
| -> Text | 
  | 
| -> Maybe b | 
  | 
| -> m () | 
Deprecated: (Since version 1.12)Use KeyframeTransition and  TransitionGroup instead
Specifies a Animator to be used when transitioning between
 the two named states.
The animator allows specifying a transition between the state that is
 more elaborate than the basic transitions allowed by the tweening of
 properties defined in the State keys.
If animator is Nothing it will unset an existing animator.
State will take a reference on the passed animator, if any
Since: 1.4
setDuration
Arguments
| :: (HasCallStack, MonadIO m, IsState a) | |
| => a | 
  | 
| -> Maybe Text | 
  | 
| -> Maybe Text | 
  | 
| -> Word32 | 
  | 
| -> m () | 
Deprecated: (Since version 1.12)Use KeyframeTransition and  TransitionGroup instead
Sets the duration of a transition.
If both state names are Nothing the default duration for state is set.
If only targetStateName is specified, the passed duration becomes
 the default duration for transitions to the target state.
If both states names are specified, the passed duration only applies
 to the specified transition.
Since: 1.4
setKey
Arguments
| :: (HasCallStack, MonadIO m, IsState a, IsObject b) | |
| => a | 
  | 
| -> Maybe Text | 
  | 
| -> Text | 
  | 
| -> b | 
  | 
| -> Text | 
  | 
| -> Word32 | 
  | 
| -> GValue | 
  | 
| -> Double | 
  | 
| -> Double | 
  | 
| -> m State | Returns: the   | 
Deprecated: (Since version 1.12)Use KeyframeTransition and  TransitionGroup instead
Sets one specific end key for a state name, object, propertyName
 combination.
Since: 1.4
setState
Arguments
| :: (HasCallStack, MonadIO m, IsState a) | |
| => a | 
  | 
| -> Text | 
  | 
| -> m Timeline | Returns: the   | 
Deprecated: (Since version 1.12)Use KeyframeTransition and  TransitionGroup instead
Change the current state of State to targetStateName.
The state will animate during its transition, see
 clutter_state_warp_to_state for animation-free state switching.
Setting a Nothing state will stop the current animation and unset
 the current state, but keys will be left intact.
Since: 1.4
warpToState
Arguments
| :: (HasCallStack, MonadIO m, IsState a) | |
| => a | 
  | 
| -> Text | 
  | 
| -> m Timeline | Returns: the   | 
Deprecated: (Since version 1.12)Use KeyframeTransition and  TransitionGroup instead
Change to the specified target state immediately with no animation.
See stateSetState.
Since: 1.4
Properties
duration
Default duration used if an duration has not been specified for a specific source/target state pair. The values is in milliseconds.
Since: 1.4
constructStateDuration :: (IsState o, MonadIO m) => Word32 -> m (GValueConstruct o) Source #
Construct a GValueConstruct with valid value for the “duration” property. This is rarely needed directly, but it is used by new.
getStateDuration :: (MonadIO m, IsState o) => o -> m Word32 Source #
Get the value of the “duration” property.
 When overloading is enabled, this is equivalent to
get state #duration
setStateDuration :: (MonadIO m, IsState o) => o -> Word32 -> m () Source #
Set the value of the “duration” property.
 When overloading is enabled, this is equivalent to
setstate [ #duration:=value ]
state
The currently set target state, setting it causes the
 state machine to transition to the new state, use
 stateWarpToState to change state without
 a transition.
Since: 1.4
clearStateState :: (MonadIO m, IsState o) => o -> m () Source #
Set the value of the “state” property to Nothing.
 When overloading is enabled, this is equivalent to
clear #state
constructStateState :: (IsState o, MonadIO m) => Text -> m (GValueConstruct o) Source #
Construct a GValueConstruct with valid value for the “state” property. This is rarely needed directly, but it is used by new.
getStateState :: (MonadIO m, IsState o) => o -> m Text Source #
Get the value of the “state” property.
 When overloading is enabled, this is equivalent to
get state #state
setStateState :: (MonadIO m, IsState o) => o -> Text -> m () Source #
Set the value of the “state” property.
 When overloading is enabled, this is equivalent to
setstate [ #state:=value ]
Signals
completed
type StateCompletedCallback = IO () Source #
Deprecated: (Since version 1.12)Use KeyframeTransition and  TransitionGroup instead
The completed signal is emitted when a State reaches
 the target state specified by stateSetState or
 stateWarpToState.
Since: 1.4
afterStateCompleted :: (IsState a, MonadIO m) => a -> ((?self :: a) => StateCompletedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the completed signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after state #completed callback
By default the object invoking the signal is not passed to the callback.
 If you need to access it, you can use the implit ?self parameter.
 Note that this requires activating the ImplicitParams GHC extension.
onStateCompleted :: (IsState a, MonadIO m) => a -> ((?self :: a) => StateCompletedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the completed signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on state #completed callback