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 |
Layer
-s are responsible for collecting and ordering Clip
-s.
A layer within a timeline will have an associated priority,
corresponding to their index within the timeline. A layer with the
index/priority 0 will have the highest priority and the layer with the
largest index will have the lowest priority (the order of priorities,
in this sense, is the _reverse_ of the numerical ordering of the
indices). timelineMoveLayer
should be used if you wish to
change how layers are prioritised in a timeline.
Layers with higher priorities will have their content priorities over content from lower priority layers, similar to how layers are used in image editing. For example, if two separate layers both display video content, then the layer with the higher priority will have its images shown first. The other layer will only have its image shown if the higher priority layer has no content at the given playtime, or is transparent in some way. Audio content in separate layers will simply play in addition.
Synopsis
- newtype Layer = Layer (ManagedPtr Layer)
- class (GObject o, IsDescendantOf Layer o) => IsLayer o
- toLayer :: (MonadIO m, IsLayer o) => o -> m Layer
- layerAddAsset :: (HasCallStack, MonadIO m, IsLayer a, IsAsset b) => a -> b -> Word64 -> Word64 -> Word64 -> [TrackType] -> m (Maybe Clip)
- layerAddAssetFull :: (HasCallStack, MonadIO m, IsLayer a, IsAsset b) => a -> b -> Word64 -> Word64 -> Word64 -> [TrackType] -> m Clip
- layerAddClip :: (HasCallStack, MonadIO m, IsLayer a, IsClip b) => a -> b -> m Bool
- layerAddClipFull :: (HasCallStack, MonadIO m, IsLayer a, IsClip b) => a -> b -> m ()
- layerGetActiveForTrack :: (HasCallStack, MonadIO m, IsLayer a, IsTrack b) => a -> b -> m Bool
- layerGetAutoTransition :: (HasCallStack, MonadIO m, IsLayer a) => a -> m Bool
- layerGetClips :: (HasCallStack, MonadIO m, IsLayer a) => a -> m [Clip]
- layerGetClipsInInterval :: (HasCallStack, MonadIO m, IsLayer a) => a -> Word64 -> Word64 -> m [Clip]
- layerGetDuration :: (HasCallStack, MonadIO m, IsLayer a) => a -> m Word64
- layerGetPriority :: (HasCallStack, MonadIO m, IsLayer a) => a -> m Word32
- layerGetTimeline :: (HasCallStack, MonadIO m, IsLayer a) => a -> m (Maybe Timeline)
- layerIsEmpty :: (HasCallStack, MonadIO m, IsLayer a) => a -> m Bool
- layerNew :: (HasCallStack, MonadIO m) => m Layer
- layerRemoveClip :: (HasCallStack, MonadIO m, IsLayer a, IsClip b) => a -> b -> m Bool
- layerSetActiveForTracks :: (HasCallStack, MonadIO m, IsLayer a, IsTrack b) => a -> Bool -> [b] -> m Bool
- layerSetAutoTransition :: (HasCallStack, MonadIO m, IsLayer a) => a -> Bool -> m ()
- layerSetPriority :: (HasCallStack, MonadIO m, IsLayer a) => a -> Word32 -> m ()
- layerSetTimeline :: (HasCallStack, MonadIO m, IsLayer a, IsTimeline b) => a -> b -> m ()
- constructLayerAutoTransition :: (IsLayer o, MonadIO m) => Bool -> m (GValueConstruct o)
- getLayerAutoTransition :: (MonadIO m, IsLayer o) => o -> m Bool
- setLayerAutoTransition :: (MonadIO m, IsLayer o) => o -> Bool -> m ()
- constructLayerPriority :: (IsLayer o, MonadIO m) => Word32 -> m (GValueConstruct o)
- getLayerPriority :: (MonadIO m, IsLayer o) => o -> m Word32
- setLayerPriority :: (MonadIO m, IsLayer o) => o -> Word32 -> m ()
- type LayerActiveChangedCallback = Bool -> [Track] -> IO ()
- afterLayerActiveChanged :: (IsLayer a, MonadIO m) => a -> ((?self :: a) => LayerActiveChangedCallback) -> m SignalHandlerId
- onLayerActiveChanged :: (IsLayer a, MonadIO m) => a -> ((?self :: a) => LayerActiveChangedCallback) -> m SignalHandlerId
- type LayerClipAddedCallback = Clip -> IO ()
- afterLayerClipAdded :: (IsLayer a, MonadIO m) => a -> ((?self :: a) => LayerClipAddedCallback) -> m SignalHandlerId
- onLayerClipAdded :: (IsLayer a, MonadIO m) => a -> ((?self :: a) => LayerClipAddedCallback) -> m SignalHandlerId
- type LayerClipRemovedCallback = Clip -> IO ()
- afterLayerClipRemoved :: (IsLayer a, MonadIO m) => a -> ((?self :: a) => LayerClipRemovedCallback) -> m SignalHandlerId
- onLayerClipRemoved :: (IsLayer a, MonadIO m) => a -> ((?self :: a) => LayerClipRemovedCallback) -> m SignalHandlerId
Exported types
Memory-managed wrapper type.
Instances
Eq Layer Source # | |
GObject Layer Source # | |
Defined in GI.GES.Objects.Layer | |
ManagedPtrNewtype Layer Source # | |
Defined in GI.GES.Objects.Layer toManagedPtr :: Layer -> ManagedPtr Layer | |
TypedObject Layer Source # | |
Defined in GI.GES.Objects.Layer | |
HasParentTypes Layer Source # | |
Defined in GI.GES.Objects.Layer | |
IsGValue (Maybe Layer) Source # | Convert |
Defined in GI.GES.Objects.Layer gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe Layer -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe Layer) | |
type ParentTypes Layer Source # | |
Defined in GI.GES.Objects.Layer |
class (GObject o, IsDescendantOf Layer o) => IsLayer o Source #
Instances
(GObject o, IsDescendantOf Layer o) => IsLayer o Source # | |
Defined in GI.GES.Objects.Layer |
Methods
Click to display all available methods, including inherited ones
Methods
addAsset, addAssetFull, addClip, addClipFull, addMetasFromString, bindProperty, bindPropertyFull, checkMetaRegistered, forceFloating, foreach, freezeNotify, getv, isEmpty, isFloating, metasToString, notify, notifyByPspec, ref, refSink, registerMeta, registerMetaBoolean, registerMetaDate, registerMetaDateTime, registerMetaDouble, registerMetaFloat, registerMetaInt, registerMetaInt64, registerMetaString, registerMetaUint, registerMetaUint64, registerStaticMeta, removeClip, runDispose, stealData, stealQdata, thawNotify, unref, watchClosure.
Getters
getActiveForTrack, getAsset, getAutoTransition, getBoolean, getClips, getClipsInInterval, getData, getDate, getDateTime, getDouble, getDuration, getFloat, getId, getInt, getInt64, getMarkerList, getMeta, getPriority, getProperty, getQdata, getString, getTimeline, getUint, getUint64.
Setters
setActiveForTracks, setAsset, setAutoTransition, setBoolean, setData, setDataFull, setDate, setDateTime, setDouble, setFloat, setInt, setInt64, setMarkerList, setMeta, setPriority, setProperty, setString, setTimeline, setUint, setUint64.
addAsset
:: (HasCallStack, MonadIO m, IsLayer a, IsAsset b) | |
=> a |
|
-> b |
|
-> Word64 |
|
-> Word64 |
|
-> Word64 |
|
-> [TrackType] |
|
-> m (Maybe Clip) | Returns: The newly created clip. |
See layerAddAssetFull
, which also gives an error.
addAssetFull
:: (HasCallStack, MonadIO m, IsLayer a, IsAsset b) | |
=> a |
|
-> b |
|
-> Word64 |
|
-> Word64 |
|
-> Word64 |
|
-> [TrackType] |
|
-> m Clip | Returns: The newly created clip. (Can throw |
Extracts a new clip from an asset and adds it to the layer with the given properties.
Since: 1.18
addClip
:: (HasCallStack, MonadIO m, IsLayer a, IsClip b) | |
=> a |
|
-> b |
|
-> m Bool | Returns: |
See layerAddClipFull
, which also gives an error.
addClipFull
:: (HasCallStack, MonadIO m, IsLayer a, IsClip b) | |
=> a |
|
-> b |
|
-> m () | (Can throw |
Adds the given clip to the layer. If the method succeeds, the layer will take ownership of the clip.
This method will fail and return False
if clip
already resides in
some layer. It can also fail if the additional clip breaks some
compositional rules (see TimelineElement
).
Since: 1.18
getActiveForTrack
layerGetActiveForTrack Source #
:: (HasCallStack, MonadIO m, IsLayer a, IsTrack b) | |
=> a |
|
-> b |
|
-> m Bool | Returns: |
Gets whether the layer is active for the given track. See
layerSetActiveForTracks
.
Since: 1.18
getAutoTransition
layerGetAutoTransition Source #
:: (HasCallStack, MonadIO m, IsLayer a) | |
=> a |
|
-> m Bool | Returns: |
Gets the Layer:autoTransition of the layer.
getClips
:: (HasCallStack, MonadIO m, IsLayer a) | |
=> a |
|
-> m [Clip] | Returns: A list of clips in
|
Get the Clip
-s contained in this layer.
getClipsInInterval
layerGetClipsInInterval Source #
:: (HasCallStack, MonadIO m, IsLayer a) | |
=> a |
|
-> Word64 |
|
-> Word64 |
|
-> m [Clip] | Returns: A list of |
Gets the clips within the layer that appear between start
and end
.
getDuration
:: (HasCallStack, MonadIO m, IsLayer a) | |
=> a |
|
-> m Word64 | Returns: The duration of |
Retrieves the duration of the layer, which is the difference between the start of the layer (always time 0) and the end (which will be the end time of the final clip).
getPriority
:: (HasCallStack, MonadIO m, IsLayer a) | |
=> a |
|
-> m Word32 | Returns: The priority of |
Get the priority of the layer. When inside a timeline, this is its
index in the timeline. See timelineMoveLayer
.
getTimeline
:: (HasCallStack, MonadIO m, IsLayer a) | |
=> a |
|
-> m (Maybe Timeline) | Returns: The timeline that |
Gets the timeline that the layer is a part of.
isEmpty
:: (HasCallStack, MonadIO m, IsLayer a) | |
=> a |
|
-> m Bool | Returns: |
Convenience method to check if the layer is empty (doesn't contain
any Clip
), or not.
new
removeClip
:: (HasCallStack, MonadIO m, IsLayer a, IsClip b) | |
=> a |
|
-> b |
|
-> m Bool | Returns: |
Removes the given clip from the layer.
setActiveForTracks
layerSetActiveForTracks Source #
:: (HasCallStack, MonadIO m, IsLayer a, IsTrack b) | |
=> a |
|
-> Bool |
|
-> [b] |
|
-> m Bool |
Activate or deactivate track elements in tracks
(or in all tracks if tracks
is Nothing
).
When a layer is deactivated for a track, all the TrackElement
-s in
the track that belong to a Clip
in the layer will no longer be
active in the track, regardless of their individual
TrackElement:active value.
Note that by default a layer will be active for all of its timeline's tracks.
Since: 1.18
setAutoTransition
layerSetAutoTransition Source #
:: (HasCallStack, MonadIO m, IsLayer a) | |
=> a |
|
-> Bool |
|
-> m () |
Sets Layer:autoTransition for the layer. Use
timelineSetAutoTransition
if you want all layers within a
Timeline
to have Layer:autoTransition set to True
. Use this
method if you want different values for different layers (and make sure
to keep Timeline:autoTransition as False
for the corresponding
timeline).
setPriority
:: (HasCallStack, MonadIO m, IsLayer a) | |
=> a |
|
-> Word32 |
|
-> m () |
Deprecated: (Since version 1.16.0)use ges_timeline_move_layer
instead. This deprecation meansthat you will not need to handle layer priorities at all yourself, GESwill make sure there is never 'gaps' between layer priorities.
Sets the layer to the given priority. See Layer:priority.
setTimeline
layerSetTimeline :: (HasCallStack, MonadIO m, IsLayer a, IsTimeline b) => a -> b -> m () Source #
No description available in the introspection data.
Properties
autoTransition
Whether to automatically create a TransitionClip
whenever two
Source
-s that both belong to a Clip
in the layer overlap.
See Timeline
for what counts as an overlap.
When a layer is added to a Timeline
, if this property is left as
False
, but the timeline's Timeline:autoTransition is True
, it
will be set to True
as well.
constructLayerAutoTransition :: (IsLayer o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “auto-transition
” property. This is rarely needed directly, but it is used by new
.
getLayerAutoTransition :: (MonadIO m, IsLayer o) => o -> m Bool Source #
Get the value of the “auto-transition
” property.
When overloading is enabled, this is equivalent to
get
layer #autoTransition
setLayerAutoTransition :: (MonadIO m, IsLayer o) => o -> Bool -> m () Source #
Set the value of the “auto-transition
” property.
When overloading is enabled, this is equivalent to
set
layer [ #autoTransition:=
value ]
priority
The priority of the layer in the Timeline
. 0 is the highest
priority. Conceptually, a timeline is a stack of layers,
and the priority of the layer represents its position in the stack. Two
layers should not have the same priority within a given GESTimeline.
Note that the timeline needs to be committed (with ges_timeline_commit
)
for the change to be taken into account.
constructLayerPriority :: (IsLayer o, MonadIO m) => Word32 -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “priority
” property. This is rarely needed directly, but it is used by new
.
getLayerPriority :: (MonadIO m, IsLayer o) => o -> m Word32 Source #
Get the value of the “priority
” property.
When overloading is enabled, this is equivalent to
get
layer #priority
setLayerPriority :: (MonadIO m, IsLayer o) => o -> Word32 -> m () Source #
Set the value of the “priority
” property.
When overloading is enabled, this is equivalent to
set
layer [ #priority:=
value ]
Signals
activeChanged
type LayerActiveChangedCallback Source #
= Bool |
|
-> [Track] |
|
-> IO () |
Will be emitted whenever the layer is activated or deactivated
for some Track
. See layerSetActiveForTracks
.
Since: 1.18
afterLayerActiveChanged :: (IsLayer a, MonadIO m) => a -> ((?self :: a) => LayerActiveChangedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the activeChanged signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
layer #activeChanged 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.
onLayerActiveChanged :: (IsLayer a, MonadIO m) => a -> ((?self :: a) => LayerActiveChangedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the activeChanged signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
layer #activeChanged callback
clipAdded
type LayerClipAddedCallback Source #
Will be emitted after the clip is added to the layer.
afterLayerClipAdded :: (IsLayer a, MonadIO m) => a -> ((?self :: a) => LayerClipAddedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the clipAdded signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
layer #clipAdded 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.
onLayerClipAdded :: (IsLayer a, MonadIO m) => a -> ((?self :: a) => LayerClipAddedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the clipAdded signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
layer #clipAdded callback
clipRemoved
type LayerClipRemovedCallback Source #
Will be emitted after the clip is removed from the layer.
afterLayerClipRemoved :: (IsLayer a, MonadIO m) => a -> ((?self :: a) => LayerClipRemovedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the clipRemoved signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
layer #clipRemoved 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.
onLayerClipRemoved :: (IsLayer a, MonadIO m) => a -> ((?self :: a) => LayerClipRemovedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the clipRemoved signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
layer #clipRemoved callback