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 |
A Container
is a timeline element that controls other
TimelineElement
-s, which are its children. In particular, it is
responsible for maintaining the relative TimelineElement:start and
TimelineElement:duration times of its children. Therefore, if a
container is temporally adjusted or moved to a new layer, it may
accordingly adjust and move its children. Similarly, a change in one of
its children may prompt the parent to correspondingly change its
siblings.
Synopsis
- newtype Container = Container (ManagedPtr Container)
- class (GObject o, IsDescendantOf Container o) => IsContainer o
- toContainer :: (MonadIO m, IsContainer o) => o -> m Container
- containerAdd :: (HasCallStack, MonadIO m, IsContainer a, IsTimelineElement b) => a -> b -> m Bool
- containerEdit :: (HasCallStack, MonadIO m, IsContainer a, IsLayer b) => a -> [b] -> Int32 -> EditMode -> Edge -> Word64 -> m Bool
- containerGetChildren :: (HasCallStack, MonadIO m, IsContainer a) => a -> Bool -> m [TimelineElement]
- containerGroup :: (HasCallStack, MonadIO m, IsContainer a) => [a] -> m (Maybe Container)
- containerRemove :: (HasCallStack, MonadIO m, IsContainer a, IsTimelineElement b) => a -> b -> m Bool
- containerUngroup :: (HasCallStack, MonadIO m, IsContainer a) => a -> Bool -> m [Container]
- getContainerHeight :: (MonadIO m, IsContainer o) => o -> m Word32
- type ContainerChildAddedCallback = TimelineElement -> IO ()
- afterContainerChildAdded :: (IsContainer a, MonadIO m) => a -> ((?self :: a) => ContainerChildAddedCallback) -> m SignalHandlerId
- onContainerChildAdded :: (IsContainer a, MonadIO m) => a -> ((?self :: a) => ContainerChildAddedCallback) -> m SignalHandlerId
- type ContainerChildRemovedCallback = TimelineElement -> IO ()
- afterContainerChildRemoved :: (IsContainer a, MonadIO m) => a -> ((?self :: a) => ContainerChildRemovedCallback) -> m SignalHandlerId
- onContainerChildRemoved :: (IsContainer a, MonadIO m) => a -> ((?self :: a) => ContainerChildRemovedCallback) -> m SignalHandlerId
Exported types
Memory-managed wrapper type.
Instances
Eq Container Source # | |
GObject Container Source # | |
Defined in GI.GES.Objects.Container | |
ManagedPtrNewtype Container Source # | |
Defined in GI.GES.Objects.Container toManagedPtr :: Container -> ManagedPtr Container | |
TypedObject Container Source # | |
Defined in GI.GES.Objects.Container | |
HasParentTypes Container Source # | |
Defined in GI.GES.Objects.Container | |
IsGValue (Maybe Container) Source # | Convert |
Defined in GI.GES.Objects.Container gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe Container -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe Container) | |
type ParentTypes Container Source # | |
Defined in GI.GES.Objects.Container |
class (GObject o, IsDescendantOf Container o) => IsContainer o Source #
Type class for types which can be safely cast to Container
, for instance with toContainer
.
Instances
(GObject o, IsDescendantOf Container o) => IsContainer o Source # | |
Defined in GI.GES.Objects.Container |
toContainer :: (MonadIO m, IsContainer o) => o -> m Container Source #
Methods
Click to display all available methods, including inherited ones
Methods
add, addChildProperty, addMetasFromString, bindProperty, bindPropertyFull, checkMetaRegistered, copy, edit, editFull, forceFloating, foreach, freezeNotify, getv, isFloating, listChildrenProperties, lookupChild, metasToString, notify, notifyByPspec, paste, ref, refSink, registerMeta, registerMetaBoolean, registerMetaDate, registerMetaDateTime, registerMetaDouble, registerMetaFloat, registerMetaInt, registerMetaInt64, registerMetaString, registerMetaUint, registerMetaUint64, registerStaticMeta, remove, removeChildProperty, ripple, rippleEnd, rollEnd, rollStart, runDispose, stealData, stealQdata, thawNotify, trim, ungroup, unref, watchClosure.
Getters
getAsset, getBoolean, getChildProperty, getChildPropertyByPspec, getChildren, getData, getDate, getDateTime, getDouble, getDuration, getFloat, getId, getInpoint, getInt, getInt64, getLayerPriority, getMarkerList, getMaxDuration, getMeta, getName, getNaturalFramerate, getParent, getPriority, getProperty, getQdata, getStart, getString, getTimeline, getToplevelParent, getTrackTypes, getUint, getUint64.
Setters
setAsset, setBoolean, setChildProperty, setChildPropertyByPspec, setChildPropertyFull, setData, setDataFull, setDate, setDateTime, setDouble, setDuration, setFloat, setInpoint, setInt, setInt64, setMarkerList, setMaxDuration, setMeta, setName, setParent, setPriority, setProperty, setStart, setString, setTimeline, setUint, setUint64.
add
:: (HasCallStack, MonadIO m, IsContainer a, IsTimelineElement b) | |
=> a |
|
-> b |
|
-> m Bool | Returns: |
Adds a timeline element to the container. The element will now be a child of the container (and the container will be the TimelineElement:parent of the added element), which means that it is now controlled by the container. This may change the properties of the child or the container, depending on the subclass.
Additionally, the children properties of the newly added element will
be shared with the container, meaning they can also be read and set
using timelineElementGetChildProperty
and
timelineElementSetChildProperty
on the container.
edit
:: (HasCallStack, MonadIO m, IsContainer a, IsLayer b) | |
=> a |
|
-> [b] |
|
-> Int32 |
|
-> EditMode |
|
-> Edge |
|
-> Word64 |
|
-> m Bool | Returns: |
Deprecated: (Since version 1.18)use ges_timeline_element_edit
instead.
Edits the container within its timeline.
getChildren
:: (HasCallStack, MonadIO m, IsContainer a) | |
=> a |
|
-> Bool |
|
-> m [TimelineElement] | Returns: The list of
|
Get the list of timeline elements contained in the container. If
recursive
is True
, and the container contains other containers as
children, then their children will be added to the list, in addition to
themselves, and so on.
group
:: (HasCallStack, MonadIO m, IsContainer a) | |
=> [a] |
|
-> m (Maybe Container) | Returns: The container created by merging
|
Groups the containers into a single container by merging them. The containers must all belong to the same TimelineElement:timeline.
If the elements are all Clip
-s then this method will attempt to
combine them all into a single Clip
. This should succeed if they:
share the same TimelineElement:start, TimelineElement:duration
and TimelineElement:inPoint; exist in the same layer; and all of
the sources share the same Asset
. If this fails, or one of the
elements is not a Clip
, this method will try to create a Group
instead.
remove
:: (HasCallStack, MonadIO m, IsContainer a, IsTimelineElement b) | |
=> a |
|
-> b |
|
-> m Bool | Returns: |
Removes a timeline element from the container. The element will no longer be controlled by the container.
ungroup
:: (HasCallStack, MonadIO m, IsContainer a) | |
=> a |
|
-> Bool |
|
-> m [Container] | Returns: The list of
new |
Ungroups the container by splitting it into several containers
containing various children of the original. The rules for how the
container splits depends on the subclass. A Group
will simply split
into its children. A Clip
will split into one Clip
per
TrackType
it overlaps with (so an audio-video clip will split into
an audio clip and a video clip), where each clip contains all the
TrackElement
-s from the original clip with a matching
TrackElement:trackType.
If recursive
is True
, and the container contains other containers as
children, then they will also be ungrouped, and so on.
Properties
height
The span of the container's children's TimelineElement:priority values, which is the number of integers that lie between (inclusive) the minimum and maximum priorities found amongst the container's children (maximum - minimum + 1).
getContainerHeight :: (MonadIO m, IsContainer o) => o -> m Word32 Source #
Get the value of the “height
” property.
When overloading is enabled, this is equivalent to
get
container #height
Signals
childAdded
type ContainerChildAddedCallback Source #
= TimelineElement |
|
-> IO () |
Will be emitted after a child is added to the container. Usually,
you should connect with g_signal_connect_after()
since the signal
may be stopped internally.
afterContainerChildAdded :: (IsContainer a, MonadIO m) => a -> ((?self :: a) => ContainerChildAddedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the childAdded signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
container #childAdded 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.
onContainerChildAdded :: (IsContainer a, MonadIO m) => a -> ((?self :: a) => ContainerChildAddedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the childAdded signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
container #childAdded callback
childRemoved
type ContainerChildRemovedCallback Source #
= TimelineElement |
|
-> IO () |
Will be emitted after a child is removed from the container.
afterContainerChildRemoved :: (IsContainer a, MonadIO m) => a -> ((?self :: a) => ContainerChildRemovedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the childRemoved signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
container #childRemoved 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.
onContainerChildRemoved :: (IsContainer a, MonadIO m) => a -> ((?self :: a) => ContainerChildRemovedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the childRemoved signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
container #childRemoved callback