gi-ges-1.0.4: libges bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.GES.Objects.Container

Description

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

Exported types

newtype Container Source #

Memory-managed wrapper type.

Constructors

Container (ManagedPtr Container) 

Instances

Instances details
Eq Container Source # 
Instance details

Defined in GI.GES.Objects.Container

GObject Container Source # 
Instance details

Defined in GI.GES.Objects.Container

ManagedPtrNewtype Container Source # 
Instance details

Defined in GI.GES.Objects.Container

Methods

toManagedPtr :: Container -> ManagedPtr Container

TypedObject Container Source # 
Instance details

Defined in GI.GES.Objects.Container

Methods

glibType :: IO GType

HasParentTypes Container Source # 
Instance details

Defined in GI.GES.Objects.Container

IsGValue (Maybe Container) Source #

Convert Container to and from GValue. See toGValue and fromGValue.

Instance details

Defined in GI.GES.Objects.Container

Methods

gvalueGType_ :: IO GType

gvalueSet_ :: Ptr GValue -> Maybe Container -> IO ()

gvalueGet_ :: Ptr GValue -> IO (Maybe Container)

type ParentTypes Container Source # 
Instance details

Defined in GI.GES.Objects.Container

type ParentTypes Container = '[TimelineElement, Object, Extractable, MetaContainer]

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

Instances details
(GObject o, IsDescendantOf Container o) => IsContainer o Source # 
Instance details

Defined in GI.GES.Objects.Container

toContainer :: (MonadIO m, IsContainer o) => o -> m Container Source #

Cast to Container, for types for which this is known to be safe. For general casts, use castTo.

Methods

add

containerAdd Source #

Arguments

:: (HasCallStack, MonadIO m, IsContainer a, IsTimelineElement b) 
=> a

container: A Container

-> b

child: The element to add as a child

-> m Bool

Returns: True if child was successfully added to container.

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

containerEdit Source #

Arguments

:: (HasCallStack, MonadIO m, IsContainer a, IsLayer b) 
=> a

container: The Container to edit

-> [b]

layers: A whitelist of layers where the edit can be performed, Nothing allows all layers in the timeline

-> Int32

newLayerPriority: The priority/index of the layer container should be moved to. -1 means no move

-> EditMode

mode: The edit mode

-> Edge

edge: The edge of container where the edit should occur

-> Word64

position: The edit position: a new location for the edge of container (in nanoseconds)

-> m Bool

Returns: True if the edit of container completed, False on failure.

Deprecated: (Since version 1.18)use ges_timeline_element_edit instead.

Edits the container within its timeline.

getChildren

containerGetChildren Source #

Arguments

:: (HasCallStack, MonadIO m, IsContainer a) 
=> a

container: A Container

-> Bool

recursive: Whether to recursively get children in container

-> m [TimelineElement]

Returns: The list of TimelineElement-s contained in container.

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

containerGroup Source #

Arguments

:: (HasCallStack, MonadIO m, IsContainer a) 
=> [a]

containers: The Container-s to group

-> m (Maybe Container)

Returns: The container created by merging containers, or Nothing if they could not be merged into a single container.

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

containerRemove Source #

Arguments

:: (HasCallStack, MonadIO m, IsContainer a, IsTimelineElement b) 
=> a

container: A Container

-> b

child: The child to remove

-> m Bool

Returns: True if child was successfully removed from container.

Removes a timeline element from the container. The element will no longer be controlled by the container.

ungroup

containerUngroup Source #

Arguments

:: (HasCallStack, MonadIO m, IsContainer a) 
=> a

container: The container to ungroup

-> Bool

recursive: Whether to recursively ungroup container

-> m [Container]

Returns: The list of new Container-s created from the splitting of container.

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 #

Arguments

 = TimelineElement

element: The child that was added

-> 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 #

Arguments

 = TimelineElement

element: The child that was removed

-> 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