{-# LANGUAGE ImplicitParams, RankNTypes, TypeApplications #-}


-- | Copyright  : Will Thompson and Iñaki García Etxebarria
-- License    : LGPL-2.1
-- Maintainer : Iñaki García Etxebarria
-- 
-- A t'GI.GES.Objects.Container.Container' is a timeline element that controls other
-- t'GI.GES.Objects.TimelineElement.TimelineElement'-s, which are its children. In particular, it is
-- responsible for maintaining the relative [TimelineElement:start]("GI.GES.Objects.TimelineElement#g:attr:start") and
-- [TimelineElement:duration]("GI.GES.Objects.TimelineElement#g:attr: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.

#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif

module GI.GES.Objects.Container
    ( 

-- * Exported types
    Container(..)                           ,
    IsContainer                             ,
    toContainer                             ,


 -- * Methods
-- | 
-- 
--  === __Click to display all available methods, including inherited ones__
-- ==== Methods
-- [add]("GI.GES.Objects.Container#g:method:add"), [addChildProperty]("GI.GES.Objects.TimelineElement#g:method:addChildProperty"), [addMetasFromString]("GI.GES.Interfaces.MetaContainer#g:method:addMetasFromString"), [bindProperty]("GI.GObject.Objects.Object#g:method:bindProperty"), [bindPropertyFull]("GI.GObject.Objects.Object#g:method:bindPropertyFull"), [checkMetaRegistered]("GI.GES.Interfaces.MetaContainer#g:method:checkMetaRegistered"), [copy]("GI.GES.Objects.TimelineElement#g:method:copy"), [edit]("GI.GES.Objects.Container#g:method:edit"), [editFull]("GI.GES.Objects.TimelineElement#g:method:editFull"), [forceFloating]("GI.GObject.Objects.Object#g:method:forceFloating"), [foreach]("GI.GES.Interfaces.MetaContainer#g:method:foreach"), [freezeNotify]("GI.GObject.Objects.Object#g:method:freezeNotify"), [getv]("GI.GObject.Objects.Object#g:method:getv"), [isFloating]("GI.GObject.Objects.Object#g:method:isFloating"), [listChildrenProperties]("GI.GES.Objects.TimelineElement#g:method:listChildrenProperties"), [lookupChild]("GI.GES.Objects.TimelineElement#g:method:lookupChild"), [metasToString]("GI.GES.Interfaces.MetaContainer#g:method:metasToString"), [notify]("GI.GObject.Objects.Object#g:method:notify"), [notifyByPspec]("GI.GObject.Objects.Object#g:method:notifyByPspec"), [paste]("GI.GES.Objects.TimelineElement#g:method:paste"), [ref]("GI.GObject.Objects.Object#g:method:ref"), [refSink]("GI.GObject.Objects.Object#g:method:refSink"), [registerMeta]("GI.GES.Interfaces.MetaContainer#g:method:registerMeta"), [registerMetaBoolean]("GI.GES.Interfaces.MetaContainer#g:method:registerMetaBoolean"), [registerMetaDate]("GI.GES.Interfaces.MetaContainer#g:method:registerMetaDate"), [registerMetaDateTime]("GI.GES.Interfaces.MetaContainer#g:method:registerMetaDateTime"), [registerMetaDouble]("GI.GES.Interfaces.MetaContainer#g:method:registerMetaDouble"), [registerMetaFloat]("GI.GES.Interfaces.MetaContainer#g:method:registerMetaFloat"), [registerMetaInt]("GI.GES.Interfaces.MetaContainer#g:method:registerMetaInt"), [registerMetaInt64]("GI.GES.Interfaces.MetaContainer#g:method:registerMetaInt64"), [registerMetaString]("GI.GES.Interfaces.MetaContainer#g:method:registerMetaString"), [registerMetaUint]("GI.GES.Interfaces.MetaContainer#g:method:registerMetaUint"), [registerMetaUint64]("GI.GES.Interfaces.MetaContainer#g:method:registerMetaUint64"), [registerStaticMeta]("GI.GES.Interfaces.MetaContainer#g:method:registerStaticMeta"), [remove]("GI.GES.Objects.Container#g:method:remove"), [removeChildProperty]("GI.GES.Objects.TimelineElement#g:method:removeChildProperty"), [ripple]("GI.GES.Objects.TimelineElement#g:method:ripple"), [rippleEnd]("GI.GES.Objects.TimelineElement#g:method:rippleEnd"), [rollEnd]("GI.GES.Objects.TimelineElement#g:method:rollEnd"), [rollStart]("GI.GES.Objects.TimelineElement#g:method:rollStart"), [runDispose]("GI.GObject.Objects.Object#g:method:runDispose"), [stealData]("GI.GObject.Objects.Object#g:method:stealData"), [stealQdata]("GI.GObject.Objects.Object#g:method:stealQdata"), [thawNotify]("GI.GObject.Objects.Object#g:method:thawNotify"), [trim]("GI.GES.Objects.TimelineElement#g:method:trim"), [ungroup]("GI.GES.Objects.Container#g:method:ungroup"), [unref]("GI.GObject.Objects.Object#g:method:unref"), [watchClosure]("GI.GObject.Objects.Object#g:method:watchClosure").
-- 
-- ==== Getters
-- [getAsset]("GI.GES.Interfaces.Extractable#g:method:getAsset"), [getBoolean]("GI.GES.Interfaces.MetaContainer#g:method:getBoolean"), [getChildProperty]("GI.GES.Objects.TimelineElement#g:method:getChildProperty"), [getChildPropertyByPspec]("GI.GES.Objects.TimelineElement#g:method:getChildPropertyByPspec"), [getChildren]("GI.GES.Objects.Container#g:method:getChildren"), [getData]("GI.GObject.Objects.Object#g:method:getData"), [getDate]("GI.GES.Interfaces.MetaContainer#g:method:getDate"), [getDateTime]("GI.GES.Interfaces.MetaContainer#g:method:getDateTime"), [getDouble]("GI.GES.Interfaces.MetaContainer#g:method:getDouble"), [getDuration]("GI.GES.Objects.TimelineElement#g:method:getDuration"), [getFloat]("GI.GES.Interfaces.MetaContainer#g:method:getFloat"), [getId]("GI.GES.Interfaces.Extractable#g:method:getId"), [getInpoint]("GI.GES.Objects.TimelineElement#g:method:getInpoint"), [getInt]("GI.GES.Interfaces.MetaContainer#g:method:getInt"), [getInt64]("GI.GES.Interfaces.MetaContainer#g:method:getInt64"), [getLayerPriority]("GI.GES.Objects.TimelineElement#g:method:getLayerPriority"), [getMarkerList]("GI.GES.Interfaces.MetaContainer#g:method:getMarkerList"), [getMaxDuration]("GI.GES.Objects.TimelineElement#g:method:getMaxDuration"), [getMeta]("GI.GES.Interfaces.MetaContainer#g:method:getMeta"), [getName]("GI.GES.Objects.TimelineElement#g:method:getName"), [getNaturalFramerate]("GI.GES.Objects.TimelineElement#g:method:getNaturalFramerate"), [getParent]("GI.GES.Objects.TimelineElement#g:method:getParent"), [getPriority]("GI.GES.Objects.TimelineElement#g:method:getPriority"), [getProperty]("GI.GObject.Objects.Object#g:method:getProperty"), [getQdata]("GI.GObject.Objects.Object#g:method:getQdata"), [getStart]("GI.GES.Objects.TimelineElement#g:method:getStart"), [getString]("GI.GES.Interfaces.MetaContainer#g:method:getString"), [getTimeline]("GI.GES.Objects.TimelineElement#g:method:getTimeline"), [getToplevelParent]("GI.GES.Objects.TimelineElement#g:method:getToplevelParent"), [getTrackTypes]("GI.GES.Objects.TimelineElement#g:method:getTrackTypes"), [getUint]("GI.GES.Interfaces.MetaContainer#g:method:getUint"), [getUint64]("GI.GES.Interfaces.MetaContainer#g:method:getUint64").
-- 
-- ==== Setters
-- [setAsset]("GI.GES.Interfaces.Extractable#g:method:setAsset"), [setBoolean]("GI.GES.Interfaces.MetaContainer#g:method:setBoolean"), [setChildProperty]("GI.GES.Objects.TimelineElement#g:method:setChildProperty"), [setChildPropertyByPspec]("GI.GES.Objects.TimelineElement#g:method:setChildPropertyByPspec"), [setChildPropertyFull]("GI.GES.Objects.TimelineElement#g:method:setChildPropertyFull"), [setData]("GI.GObject.Objects.Object#g:method:setData"), [setDataFull]("GI.GObject.Objects.Object#g:method:setDataFull"), [setDate]("GI.GES.Interfaces.MetaContainer#g:method:setDate"), [setDateTime]("GI.GES.Interfaces.MetaContainer#g:method:setDateTime"), [setDouble]("GI.GES.Interfaces.MetaContainer#g:method:setDouble"), [setDuration]("GI.GES.Objects.TimelineElement#g:method:setDuration"), [setFloat]("GI.GES.Interfaces.MetaContainer#g:method:setFloat"), [setInpoint]("GI.GES.Objects.TimelineElement#g:method:setInpoint"), [setInt]("GI.GES.Interfaces.MetaContainer#g:method:setInt"), [setInt64]("GI.GES.Interfaces.MetaContainer#g:method:setInt64"), [setMarkerList]("GI.GES.Interfaces.MetaContainer#g:method:setMarkerList"), [setMaxDuration]("GI.GES.Objects.TimelineElement#g:method:setMaxDuration"), [setMeta]("GI.GES.Interfaces.MetaContainer#g:method:setMeta"), [setName]("GI.GES.Objects.TimelineElement#g:method:setName"), [setParent]("GI.GES.Objects.TimelineElement#g:method:setParent"), [setPriority]("GI.GES.Objects.TimelineElement#g:method:setPriority"), [setProperty]("GI.GObject.Objects.Object#g:method:setProperty"), [setStart]("GI.GES.Objects.TimelineElement#g:method:setStart"), [setString]("GI.GES.Interfaces.MetaContainer#g:method:setString"), [setTimeline]("GI.GES.Objects.TimelineElement#g:method:setTimeline"), [setUint]("GI.GES.Interfaces.MetaContainer#g:method:setUint"), [setUint64]("GI.GES.Interfaces.MetaContainer#g:method:setUint64").

#if defined(ENABLE_OVERLOADING)
    ResolveContainerMethod                  ,
#endif

-- ** add #method:add#

#if defined(ENABLE_OVERLOADING)
    ContainerAddMethodInfo                  ,
#endif
    containerAdd                            ,


-- ** edit #method:edit#

#if defined(ENABLE_OVERLOADING)
    ContainerEditMethodInfo                 ,
#endif
    containerEdit                           ,


-- ** getChildren #method:getChildren#

#if defined(ENABLE_OVERLOADING)
    ContainerGetChildrenMethodInfo          ,
#endif
    containerGetChildren                    ,


-- ** group #method:group#

    containerGroup                          ,


-- ** remove #method:remove#

#if defined(ENABLE_OVERLOADING)
    ContainerRemoveMethodInfo               ,
#endif
    containerRemove                         ,


-- ** ungroup #method:ungroup#

#if defined(ENABLE_OVERLOADING)
    ContainerUngroupMethodInfo              ,
#endif
    containerUngroup                        ,




 -- * Properties


-- ** height #attr:height#
-- | The span of the container\'s children\'s [TimelineElement:priority]("GI.GES.Objects.TimelineElement#g:attr: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).

#if defined(ENABLE_OVERLOADING)
    ContainerHeightPropertyInfo             ,
#endif
#if defined(ENABLE_OVERLOADING)
    containerHeight                         ,
#endif
    getContainerHeight                      ,




 -- * Signals


-- ** childAdded #signal:childAdded#

    ContainerChildAddedCallback             ,
#if defined(ENABLE_OVERLOADING)
    ContainerChildAddedSignalInfo           ,
#endif
    afterContainerChildAdded                ,
    onContainerChildAdded                   ,


-- ** childRemoved #signal:childRemoved#

    ContainerChildRemovedCallback           ,
#if defined(ENABLE_OVERLOADING)
    ContainerChildRemovedSignalInfo         ,
#endif
    afterContainerChildRemoved              ,
    onContainerChildRemoved                 ,




    ) 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.GES.Enums as GES.Enums
import {-# SOURCE #-} qualified GI.GES.Interfaces.Extractable as GES.Extractable
import {-# SOURCE #-} qualified GI.GES.Interfaces.MetaContainer as GES.MetaContainer
import {-# SOURCE #-} qualified GI.GES.Objects.Layer as GES.Layer
import {-# SOURCE #-} qualified GI.GES.Objects.TimelineElement as GES.TimelineElement
import qualified GI.GObject.Objects.Object as GObject.Object

-- | Memory-managed wrapper type.
newtype Container = Container (SP.ManagedPtr Container)
    deriving (Container -> Container -> Bool
(Container -> Container -> Bool)
-> (Container -> Container -> Bool) -> Eq Container
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Container -> Container -> Bool
== :: Container -> Container -> Bool
$c/= :: Container -> Container -> Bool
/= :: Container -> Container -> Bool
Eq)

instance SP.ManagedPtrNewtype Container where
    toManagedPtr :: Container -> ManagedPtr Container
toManagedPtr (Container ManagedPtr Container
p) = ManagedPtr Container
p

foreign import ccall "ges_container_get_type"
    c_ges_container_get_type :: IO B.Types.GType

instance B.Types.TypedObject Container where
    glibType :: IO GType
glibType = IO GType
c_ges_container_get_type

instance B.Types.GObject Container

-- | Type class for types which can be safely cast to `Container`, for instance with `toContainer`.
class (SP.GObject o, O.IsDescendantOf Container o) => IsContainer o
instance (SP.GObject o, O.IsDescendantOf Container o) => IsContainer o

instance O.HasParentTypes Container
type instance O.ParentTypes Container = '[GES.TimelineElement.TimelineElement, GObject.Object.Object, GES.Extractable.Extractable, GES.MetaContainer.MetaContainer]

-- | Cast to `Container`, for types for which this is known to be safe. For general casts, use `Data.GI.Base.ManagedPtr.castTo`.
toContainer :: (MIO.MonadIO m, IsContainer o) => o -> m Container
toContainer :: forall (m :: * -> *) o.
(MonadIO m, IsContainer o) =>
o -> m Container
toContainer = IO Container -> m Container
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Container -> m Container)
-> (o -> IO Container) -> o -> m Container
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr Container -> Container) -> o -> IO Container
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
 ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr Container -> Container
Container

-- | Convert 'Container' to and from 'Data.GI.Base.GValue.GValue'. See 'Data.GI.Base.GValue.toGValue' and 'Data.GI.Base.GValue.fromGValue'.
instance B.GValue.IsGValue (Maybe Container) where
    gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_ges_container_get_type
    gvalueSet_ :: Ptr GValue -> Maybe Container -> IO ()
gvalueSet_ Ptr GValue
gv Maybe Container
P.Nothing = Ptr GValue -> Ptr Container -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr Container
forall a. Ptr a
FP.nullPtr :: FP.Ptr Container)
    gvalueSet_ Ptr GValue
gv (P.Just Container
obj) = Container -> (Ptr Container -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr Container
obj (Ptr GValue -> Ptr Container -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
    gvalueGet_ :: Ptr GValue -> IO (Maybe Container)
gvalueGet_ Ptr GValue
gv = do
        Ptr Container
ptr <- Ptr GValue -> IO (Ptr Container)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr Container)
        if Ptr Container
ptr Ptr Container -> Ptr Container -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr Container
forall a. Ptr a
FP.nullPtr
        then Container -> Maybe Container
forall a. a -> Maybe a
P.Just (Container -> Maybe Container)
-> IO Container -> IO (Maybe Container)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr Container -> Container)
-> Ptr Container -> IO Container
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr Container -> Container
Container Ptr Container
ptr
        else Maybe Container -> IO (Maybe Container)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Container
forall a. Maybe a
P.Nothing
        
    

#if defined(ENABLE_OVERLOADING)
type family ResolveContainerMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
    ResolveContainerMethod "add" o = ContainerAddMethodInfo
    ResolveContainerMethod "addChildProperty" o = GES.TimelineElement.TimelineElementAddChildPropertyMethodInfo
    ResolveContainerMethod "addMetasFromString" o = GES.MetaContainer.MetaContainerAddMetasFromStringMethodInfo
    ResolveContainerMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
    ResolveContainerMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
    ResolveContainerMethod "checkMetaRegistered" o = GES.MetaContainer.MetaContainerCheckMetaRegisteredMethodInfo
    ResolveContainerMethod "copy" o = GES.TimelineElement.TimelineElementCopyMethodInfo
    ResolveContainerMethod "edit" o = ContainerEditMethodInfo
    ResolveContainerMethod "editFull" o = GES.TimelineElement.TimelineElementEditFullMethodInfo
    ResolveContainerMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
    ResolveContainerMethod "foreach" o = GES.MetaContainer.MetaContainerForeachMethodInfo
    ResolveContainerMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
    ResolveContainerMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
    ResolveContainerMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
    ResolveContainerMethod "listChildrenProperties" o = GES.TimelineElement.TimelineElementListChildrenPropertiesMethodInfo
    ResolveContainerMethod "lookupChild" o = GES.TimelineElement.TimelineElementLookupChildMethodInfo
    ResolveContainerMethod "metasToString" o = GES.MetaContainer.MetaContainerMetasToStringMethodInfo
    ResolveContainerMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
    ResolveContainerMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
    ResolveContainerMethod "paste" o = GES.TimelineElement.TimelineElementPasteMethodInfo
    ResolveContainerMethod "ref" o = GObject.Object.ObjectRefMethodInfo
    ResolveContainerMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
    ResolveContainerMethod "registerMeta" o = GES.MetaContainer.MetaContainerRegisterMetaMethodInfo
    ResolveContainerMethod "registerMetaBoolean" o = GES.MetaContainer.MetaContainerRegisterMetaBooleanMethodInfo
    ResolveContainerMethod "registerMetaDate" o = GES.MetaContainer.MetaContainerRegisterMetaDateMethodInfo
    ResolveContainerMethod "registerMetaDateTime" o = GES.MetaContainer.MetaContainerRegisterMetaDateTimeMethodInfo
    ResolveContainerMethod "registerMetaDouble" o = GES.MetaContainer.MetaContainerRegisterMetaDoubleMethodInfo
    ResolveContainerMethod "registerMetaFloat" o = GES.MetaContainer.MetaContainerRegisterMetaFloatMethodInfo
    ResolveContainerMethod "registerMetaInt" o = GES.MetaContainer.MetaContainerRegisterMetaIntMethodInfo
    ResolveContainerMethod "registerMetaInt64" o = GES.MetaContainer.MetaContainerRegisterMetaInt64MethodInfo
    ResolveContainerMethod "registerMetaString" o = GES.MetaContainer.MetaContainerRegisterMetaStringMethodInfo
    ResolveContainerMethod "registerMetaUint" o = GES.MetaContainer.MetaContainerRegisterMetaUintMethodInfo
    ResolveContainerMethod "registerMetaUint64" o = GES.MetaContainer.MetaContainerRegisterMetaUint64MethodInfo
    ResolveContainerMethod "registerStaticMeta" o = GES.MetaContainer.MetaContainerRegisterStaticMetaMethodInfo
    ResolveContainerMethod "remove" o = ContainerRemoveMethodInfo
    ResolveContainerMethod "removeChildProperty" o = GES.TimelineElement.TimelineElementRemoveChildPropertyMethodInfo
    ResolveContainerMethod "ripple" o = GES.TimelineElement.TimelineElementRippleMethodInfo
    ResolveContainerMethod "rippleEnd" o = GES.TimelineElement.TimelineElementRippleEndMethodInfo
    ResolveContainerMethod "rollEnd" o = GES.TimelineElement.TimelineElementRollEndMethodInfo
    ResolveContainerMethod "rollStart" o = GES.TimelineElement.TimelineElementRollStartMethodInfo
    ResolveContainerMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
    ResolveContainerMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
    ResolveContainerMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
    ResolveContainerMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
    ResolveContainerMethod "trim" o = GES.TimelineElement.TimelineElementTrimMethodInfo
    ResolveContainerMethod "ungroup" o = ContainerUngroupMethodInfo
    ResolveContainerMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
    ResolveContainerMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
    ResolveContainerMethod "getAsset" o = GES.Extractable.ExtractableGetAssetMethodInfo
    ResolveContainerMethod "getBoolean" o = GES.MetaContainer.MetaContainerGetBooleanMethodInfo
    ResolveContainerMethod "getChildProperty" o = GES.TimelineElement.TimelineElementGetChildPropertyMethodInfo
    ResolveContainerMethod "getChildPropertyByPspec" o = GES.TimelineElement.TimelineElementGetChildPropertyByPspecMethodInfo
    ResolveContainerMethod "getChildren" o = ContainerGetChildrenMethodInfo
    ResolveContainerMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
    ResolveContainerMethod "getDate" o = GES.MetaContainer.MetaContainerGetDateMethodInfo
    ResolveContainerMethod "getDateTime" o = GES.MetaContainer.MetaContainerGetDateTimeMethodInfo
    ResolveContainerMethod "getDouble" o = GES.MetaContainer.MetaContainerGetDoubleMethodInfo
    ResolveContainerMethod "getDuration" o = GES.TimelineElement.TimelineElementGetDurationMethodInfo
    ResolveContainerMethod "getFloat" o = GES.MetaContainer.MetaContainerGetFloatMethodInfo
    ResolveContainerMethod "getId" o = GES.Extractable.ExtractableGetIdMethodInfo
    ResolveContainerMethod "getInpoint" o = GES.TimelineElement.TimelineElementGetInpointMethodInfo
    ResolveContainerMethod "getInt" o = GES.MetaContainer.MetaContainerGetIntMethodInfo
    ResolveContainerMethod "getInt64" o = GES.MetaContainer.MetaContainerGetInt64MethodInfo
    ResolveContainerMethod "getLayerPriority" o = GES.TimelineElement.TimelineElementGetLayerPriorityMethodInfo
    ResolveContainerMethod "getMarkerList" o = GES.MetaContainer.MetaContainerGetMarkerListMethodInfo
    ResolveContainerMethod "getMaxDuration" o = GES.TimelineElement.TimelineElementGetMaxDurationMethodInfo
    ResolveContainerMethod "getMeta" o = GES.MetaContainer.MetaContainerGetMetaMethodInfo
    ResolveContainerMethod "getName" o = GES.TimelineElement.TimelineElementGetNameMethodInfo
    ResolveContainerMethod "getNaturalFramerate" o = GES.TimelineElement.TimelineElementGetNaturalFramerateMethodInfo
    ResolveContainerMethod "getParent" o = GES.TimelineElement.TimelineElementGetParentMethodInfo
    ResolveContainerMethod "getPriority" o = GES.TimelineElement.TimelineElementGetPriorityMethodInfo
    ResolveContainerMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
    ResolveContainerMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
    ResolveContainerMethod "getStart" o = GES.TimelineElement.TimelineElementGetStartMethodInfo
    ResolveContainerMethod "getString" o = GES.MetaContainer.MetaContainerGetStringMethodInfo
    ResolveContainerMethod "getTimeline" o = GES.TimelineElement.TimelineElementGetTimelineMethodInfo
    ResolveContainerMethod "getToplevelParent" o = GES.TimelineElement.TimelineElementGetToplevelParentMethodInfo
    ResolveContainerMethod "getTrackTypes" o = GES.TimelineElement.TimelineElementGetTrackTypesMethodInfo
    ResolveContainerMethod "getUint" o = GES.MetaContainer.MetaContainerGetUintMethodInfo
    ResolveContainerMethod "getUint64" o = GES.MetaContainer.MetaContainerGetUint64MethodInfo
    ResolveContainerMethod "setAsset" o = GES.Extractable.ExtractableSetAssetMethodInfo
    ResolveContainerMethod "setBoolean" o = GES.MetaContainer.MetaContainerSetBooleanMethodInfo
    ResolveContainerMethod "setChildProperty" o = GES.TimelineElement.TimelineElementSetChildPropertyMethodInfo
    ResolveContainerMethod "setChildPropertyByPspec" o = GES.TimelineElement.TimelineElementSetChildPropertyByPspecMethodInfo
    ResolveContainerMethod "setChildPropertyFull" o = GES.TimelineElement.TimelineElementSetChildPropertyFullMethodInfo
    ResolveContainerMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
    ResolveContainerMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
    ResolveContainerMethod "setDate" o = GES.MetaContainer.MetaContainerSetDateMethodInfo
    ResolveContainerMethod "setDateTime" o = GES.MetaContainer.MetaContainerSetDateTimeMethodInfo
    ResolveContainerMethod "setDouble" o = GES.MetaContainer.MetaContainerSetDoubleMethodInfo
    ResolveContainerMethod "setDuration" o = GES.TimelineElement.TimelineElementSetDurationMethodInfo
    ResolveContainerMethod "setFloat" o = GES.MetaContainer.MetaContainerSetFloatMethodInfo
    ResolveContainerMethod "setInpoint" o = GES.TimelineElement.TimelineElementSetInpointMethodInfo
    ResolveContainerMethod "setInt" o = GES.MetaContainer.MetaContainerSetIntMethodInfo
    ResolveContainerMethod "setInt64" o = GES.MetaContainer.MetaContainerSetInt64MethodInfo
    ResolveContainerMethod "setMarkerList" o = GES.MetaContainer.MetaContainerSetMarkerListMethodInfo
    ResolveContainerMethod "setMaxDuration" o = GES.TimelineElement.TimelineElementSetMaxDurationMethodInfo
    ResolveContainerMethod "setMeta" o = GES.MetaContainer.MetaContainerSetMetaMethodInfo
    ResolveContainerMethod "setName" o = GES.TimelineElement.TimelineElementSetNameMethodInfo
    ResolveContainerMethod "setParent" o = GES.TimelineElement.TimelineElementSetParentMethodInfo
    ResolveContainerMethod "setPriority" o = GES.TimelineElement.TimelineElementSetPriorityMethodInfo
    ResolveContainerMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
    ResolveContainerMethod "setStart" o = GES.TimelineElement.TimelineElementSetStartMethodInfo
    ResolveContainerMethod "setString" o = GES.MetaContainer.MetaContainerSetStringMethodInfo
    ResolveContainerMethod "setTimeline" o = GES.TimelineElement.TimelineElementSetTimelineMethodInfo
    ResolveContainerMethod "setUint" o = GES.MetaContainer.MetaContainerSetUintMethodInfo
    ResolveContainerMethod "setUint64" o = GES.MetaContainer.MetaContainerSetUint64MethodInfo
    ResolveContainerMethod l o = O.MethodResolutionFailed l o

instance (info ~ ResolveContainerMethod t Container, O.OverloadedMethod info Container p) => OL.IsLabel t (Container -> 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 ~ ResolveContainerMethod t Container, O.OverloadedMethod info Container p, R.HasField t Container p) => R.HasField t Container p where
    getField = O.overloadedMethod @info

#endif

instance (info ~ ResolveContainerMethod t Container, O.OverloadedMethodInfo info Container) => OL.IsLabel t (O.MethodProxy info Container) where
#if MIN_VERSION_base(4,10,0)
    fromLabel = O.MethodProxy
#else
    fromLabel _ = O.MethodProxy
#endif

#endif

-- signal Container::child-added
-- | 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.
type ContainerChildAddedCallback =
    GES.TimelineElement.TimelineElement
    -- ^ /@element@/: The child that was added
    -> IO ()

type C_ContainerChildAddedCallback =
    Ptr Container ->                        -- object
    Ptr GES.TimelineElement.TimelineElement ->
    Ptr () ->                               -- user_data
    IO ()

-- | Generate a function pointer callable from C code, from a `C_ContainerChildAddedCallback`.
foreign import ccall "wrapper"
    mk_ContainerChildAddedCallback :: C_ContainerChildAddedCallback -> IO (FunPtr C_ContainerChildAddedCallback)

wrap_ContainerChildAddedCallback :: 
    GObject a => (a -> ContainerChildAddedCallback) ->
    C_ContainerChildAddedCallback
wrap_ContainerChildAddedCallback :: forall a.
GObject a =>
(a -> ContainerChildAddedCallback) -> C_ContainerChildAddedCallback
wrap_ContainerChildAddedCallback a -> ContainerChildAddedCallback
gi'cb Ptr Container
gi'selfPtr Ptr TimelineElement
element Ptr ()
_ = do
    TimelineElement
element' <- ((ManagedPtr TimelineElement -> TimelineElement)
-> Ptr TimelineElement -> IO TimelineElement
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr TimelineElement -> TimelineElement
GES.TimelineElement.TimelineElement) Ptr TimelineElement
element
    Ptr Container -> (Container -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr Container
gi'selfPtr ((Container -> IO ()) -> IO ()) -> (Container -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Container
gi'self -> a -> ContainerChildAddedCallback
gi'cb (Container -> a
forall a b. Coercible a b => a -> b
Coerce.coerce Container
gi'self)  TimelineElement
element'


-- | Connect a signal handler for the [childAdded](#signal:childAdded) signal, to be run before the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.on' container #childAdded callback
-- @
-- 
-- 
onContainerChildAdded :: (IsContainer a, MonadIO m) => a -> ((?self :: a) => ContainerChildAddedCallback) -> m SignalHandlerId
onContainerChildAdded :: forall a (m :: * -> *).
(IsContainer a, MonadIO m) =>
a
-> ((?self::a) => ContainerChildAddedCallback) -> m SignalHandlerId
onContainerChildAdded a
obj (?self::a) => ContainerChildAddedCallback
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 -> ContainerChildAddedCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => ContainerChildAddedCallback
ContainerChildAddedCallback
cb
    let wrapped' :: C_ContainerChildAddedCallback
wrapped' = (a -> ContainerChildAddedCallback) -> C_ContainerChildAddedCallback
forall a.
GObject a =>
(a -> ContainerChildAddedCallback) -> C_ContainerChildAddedCallback
wrap_ContainerChildAddedCallback a -> ContainerChildAddedCallback
wrapped
    FunPtr C_ContainerChildAddedCallback
wrapped'' <- C_ContainerChildAddedCallback
-> IO (FunPtr C_ContainerChildAddedCallback)
mk_ContainerChildAddedCallback C_ContainerChildAddedCallback
wrapped'
    a
-> Text
-> FunPtr C_ContainerChildAddedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"child-added" FunPtr C_ContainerChildAddedCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [childAdded](#signal:childAdded) signal, to be run after the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.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.
-- 
afterContainerChildAdded :: (IsContainer a, MonadIO m) => a -> ((?self :: a) => ContainerChildAddedCallback) -> m SignalHandlerId
afterContainerChildAdded :: forall a (m :: * -> *).
(IsContainer a, MonadIO m) =>
a
-> ((?self::a) => ContainerChildAddedCallback) -> m SignalHandlerId
afterContainerChildAdded a
obj (?self::a) => ContainerChildAddedCallback
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 -> ContainerChildAddedCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => ContainerChildAddedCallback
ContainerChildAddedCallback
cb
    let wrapped' :: C_ContainerChildAddedCallback
wrapped' = (a -> ContainerChildAddedCallback) -> C_ContainerChildAddedCallback
forall a.
GObject a =>
(a -> ContainerChildAddedCallback) -> C_ContainerChildAddedCallback
wrap_ContainerChildAddedCallback a -> ContainerChildAddedCallback
wrapped
    FunPtr C_ContainerChildAddedCallback
wrapped'' <- C_ContainerChildAddedCallback
-> IO (FunPtr C_ContainerChildAddedCallback)
mk_ContainerChildAddedCallback C_ContainerChildAddedCallback
wrapped'
    a
-> Text
-> FunPtr C_ContainerChildAddedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"child-added" FunPtr C_ContainerChildAddedCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data ContainerChildAddedSignalInfo
instance SignalInfo ContainerChildAddedSignalInfo where
    type HaskellCallbackType ContainerChildAddedSignalInfo = ContainerChildAddedCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_ContainerChildAddedCallback cb
        cb'' <- mk_ContainerChildAddedCallback cb'
        connectSignalFunPtr obj "child-added" cb'' connectMode detail
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.GES.Objects.Container::child-added"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ges-1.0.4/docs/GI-GES-Objects-Container.html#g:signal:childAdded"})

#endif

-- signal Container::child-removed
-- | Will be emitted after a child is removed from the container.
type ContainerChildRemovedCallback =
    GES.TimelineElement.TimelineElement
    -- ^ /@element@/: The child that was removed
    -> IO ()

type C_ContainerChildRemovedCallback =
    Ptr Container ->                        -- object
    Ptr GES.TimelineElement.TimelineElement ->
    Ptr () ->                               -- user_data
    IO ()

-- | Generate a function pointer callable from C code, from a `C_ContainerChildRemovedCallback`.
foreign import ccall "wrapper"
    mk_ContainerChildRemovedCallback :: C_ContainerChildRemovedCallback -> IO (FunPtr C_ContainerChildRemovedCallback)

wrap_ContainerChildRemovedCallback :: 
    GObject a => (a -> ContainerChildRemovedCallback) ->
    C_ContainerChildRemovedCallback
wrap_ContainerChildRemovedCallback :: forall a.
GObject a =>
(a -> ContainerChildAddedCallback) -> C_ContainerChildAddedCallback
wrap_ContainerChildRemovedCallback a -> ContainerChildAddedCallback
gi'cb Ptr Container
gi'selfPtr Ptr TimelineElement
element Ptr ()
_ = do
    TimelineElement
element' <- ((ManagedPtr TimelineElement -> TimelineElement)
-> Ptr TimelineElement -> IO TimelineElement
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr TimelineElement -> TimelineElement
GES.TimelineElement.TimelineElement) Ptr TimelineElement
element
    Ptr Container -> (Container -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr Container
gi'selfPtr ((Container -> IO ()) -> IO ()) -> (Container -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Container
gi'self -> a -> ContainerChildAddedCallback
gi'cb (Container -> a
forall a b. Coercible a b => a -> b
Coerce.coerce Container
gi'self)  TimelineElement
element'


-- | Connect a signal handler for the [childRemoved](#signal:childRemoved) signal, to be run before the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.on' container #childRemoved callback
-- @
-- 
-- 
onContainerChildRemoved :: (IsContainer a, MonadIO m) => a -> ((?self :: a) => ContainerChildRemovedCallback) -> m SignalHandlerId
onContainerChildRemoved :: forall a (m :: * -> *).
(IsContainer a, MonadIO m) =>
a
-> ((?self::a) => ContainerChildAddedCallback) -> m SignalHandlerId
onContainerChildRemoved a
obj (?self::a) => ContainerChildAddedCallback
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 -> ContainerChildAddedCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => ContainerChildAddedCallback
ContainerChildAddedCallback
cb
    let wrapped' :: C_ContainerChildAddedCallback
wrapped' = (a -> ContainerChildAddedCallback) -> C_ContainerChildAddedCallback
forall a.
GObject a =>
(a -> ContainerChildAddedCallback) -> C_ContainerChildAddedCallback
wrap_ContainerChildRemovedCallback a -> ContainerChildAddedCallback
wrapped
    FunPtr C_ContainerChildAddedCallback
wrapped'' <- C_ContainerChildAddedCallback
-> IO (FunPtr C_ContainerChildAddedCallback)
mk_ContainerChildRemovedCallback C_ContainerChildAddedCallback
wrapped'
    a
-> Text
-> FunPtr C_ContainerChildAddedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"child-removed" FunPtr C_ContainerChildAddedCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [childRemoved](#signal:childRemoved) signal, to be run after the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.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.
-- 
afterContainerChildRemoved :: (IsContainer a, MonadIO m) => a -> ((?self :: a) => ContainerChildRemovedCallback) -> m SignalHandlerId
afterContainerChildRemoved :: forall a (m :: * -> *).
(IsContainer a, MonadIO m) =>
a
-> ((?self::a) => ContainerChildAddedCallback) -> m SignalHandlerId
afterContainerChildRemoved a
obj (?self::a) => ContainerChildAddedCallback
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 -> ContainerChildAddedCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => ContainerChildAddedCallback
ContainerChildAddedCallback
cb
    let wrapped' :: C_ContainerChildAddedCallback
wrapped' = (a -> ContainerChildAddedCallback) -> C_ContainerChildAddedCallback
forall a.
GObject a =>
(a -> ContainerChildAddedCallback) -> C_ContainerChildAddedCallback
wrap_ContainerChildRemovedCallback a -> ContainerChildAddedCallback
wrapped
    FunPtr C_ContainerChildAddedCallback
wrapped'' <- C_ContainerChildAddedCallback
-> IO (FunPtr C_ContainerChildAddedCallback)
mk_ContainerChildRemovedCallback C_ContainerChildAddedCallback
wrapped'
    a
-> Text
-> FunPtr C_ContainerChildAddedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"child-removed" FunPtr C_ContainerChildAddedCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data ContainerChildRemovedSignalInfo
instance SignalInfo ContainerChildRemovedSignalInfo where
    type HaskellCallbackType ContainerChildRemovedSignalInfo = ContainerChildRemovedCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_ContainerChildRemovedCallback cb
        cb'' <- mk_ContainerChildRemovedCallback cb'
        connectSignalFunPtr obj "child-removed" cb'' connectMode detail
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.GES.Objects.Container::child-removed"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ges-1.0.4/docs/GI-GES-Objects-Container.html#g:signal:childRemoved"})

#endif

-- VVV Prop "height"
   -- Type: TBasicType TUInt
   -- Flags: [PropertyReadable]
   -- Nullable: (Nothing,Nothing)

-- | Get the value of the “@height@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' container #height
-- @
getContainerHeight :: (MonadIO m, IsContainer o) => o -> m Word32
getContainerHeight :: forall (m :: * -> *) o. (MonadIO m, IsContainer o) => o -> m Word32
getContainerHeight 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
"height"

#if defined(ENABLE_OVERLOADING)
data ContainerHeightPropertyInfo
instance AttrInfo ContainerHeightPropertyInfo where
    type AttrAllowedOps ContainerHeightPropertyInfo = '[ 'AttrGet]
    type AttrBaseTypeConstraint ContainerHeightPropertyInfo = IsContainer
    type AttrSetTypeConstraint ContainerHeightPropertyInfo = (~) ()
    type AttrTransferTypeConstraint ContainerHeightPropertyInfo = (~) ()
    type AttrTransferType ContainerHeightPropertyInfo = ()
    type AttrGetType ContainerHeightPropertyInfo = Word32
    type AttrLabel ContainerHeightPropertyInfo = "height"
    type AttrOrigin ContainerHeightPropertyInfo = Container
    attrGet = getContainerHeight
    attrSet = undefined
    attrTransfer _ = undefined
    attrConstruct = undefined
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.GES.Objects.Container.height"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ges-1.0.4/docs/GI-GES-Objects-Container.html#g:attr:height"
        })
#endif

#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList Container
type instance O.AttributeList Container = ContainerAttributeList
type ContainerAttributeList = ('[ '("duration", GES.TimelineElement.TimelineElementDurationPropertyInfo), '("height", ContainerHeightPropertyInfo), '("inPoint", GES.TimelineElement.TimelineElementInPointPropertyInfo), '("maxDuration", GES.TimelineElement.TimelineElementMaxDurationPropertyInfo), '("name", GES.TimelineElement.TimelineElementNamePropertyInfo), '("parent", GES.TimelineElement.TimelineElementParentPropertyInfo), '("priority", GES.TimelineElement.TimelineElementPriorityPropertyInfo), '("serialize", GES.TimelineElement.TimelineElementSerializePropertyInfo), '("start", GES.TimelineElement.TimelineElementStartPropertyInfo), '("timeline", GES.TimelineElement.TimelineElementTimelinePropertyInfo)] :: [(Symbol, DK.Type)])
#endif

#if defined(ENABLE_OVERLOADING)
containerHeight :: AttrLabelProxy "height"
containerHeight = AttrLabelProxy

#endif

#if defined(ENABLE_OVERLOADING)
type instance O.SignalList Container = ContainerSignalList
type ContainerSignalList = ('[ '("childAdded", ContainerChildAddedSignalInfo), '("childPropertyAdded", GES.TimelineElement.TimelineElementChildPropertyAddedSignalInfo), '("childPropertyRemoved", GES.TimelineElement.TimelineElementChildPropertyRemovedSignalInfo), '("childRemoved", ContainerChildRemovedSignalInfo), '("deepNotify", GES.TimelineElement.TimelineElementDeepNotifySignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo), '("notifyMeta", GES.MetaContainer.MetaContainerNotifyMetaSignalInfo)] :: [(Symbol, DK.Type)])

#endif

-- method Container::add
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "container"
--           , argType =
--               TInterface Name { namespace = "GES" , name = "Container" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "A #GESContainer" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "child"
--           , argType =
--               TInterface Name { namespace = "GES" , name = "TimelineElement" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The element to add as a child"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "ges_container_add" ges_container_add :: 
    Ptr Container ->                        -- container : TInterface (Name {namespace = "GES", name = "Container"})
    Ptr GES.TimelineElement.TimelineElement -> -- child : TInterface (Name {namespace = "GES", name = "TimelineElement"})
    IO CInt

-- | 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]("GI.GES.Objects.TimelineElement#g:attr: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 'GI.GES.Objects.TimelineElement.timelineElementGetChildProperty' and
-- 'GI.GES.Objects.TimelineElement.timelineElementSetChildProperty' on the container.
containerAdd ::
    (B.CallStack.HasCallStack, MonadIO m, IsContainer a, GES.TimelineElement.IsTimelineElement b) =>
    a
    -- ^ /@container@/: A t'GI.GES.Objects.Container.Container'
    -> b
    -- ^ /@child@/: The element to add as a child
    -> m Bool
    -- ^ __Returns:__ 'P.True' if /@child@/ was successfully added to /@container@/.
containerAdd :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsContainer a, IsTimelineElement b) =>
a -> b -> m Bool
containerAdd a
container b
child = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr Container
container' <- a -> IO (Ptr Container)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
container
    Ptr TimelineElement
child' <- b -> IO (Ptr TimelineElement)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
child
    CInt
result <- Ptr Container -> Ptr TimelineElement -> IO CInt
ges_container_add Ptr Container
container' Ptr TimelineElement
child'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
container
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
child
    Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data ContainerAddMethodInfo
instance (signature ~ (b -> m Bool), MonadIO m, IsContainer a, GES.TimelineElement.IsTimelineElement b) => O.OverloadedMethod ContainerAddMethodInfo a signature where
    overloadedMethod = containerAdd

instance O.OverloadedMethodInfo ContainerAddMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.GES.Objects.Container.containerAdd",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ges-1.0.4/docs/GI-GES-Objects-Container.html#v:containerAdd"
        })


#endif

-- method Container::edit
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "container"
--           , argType =
--               TInterface Name { namespace = "GES" , name = "Container" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The #GESContainer to edit"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "layers"
--           , argType =
--               TGList (TInterface Name { namespace = "GES" , name = "Layer" })
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "A whitelist of layers\nwhere the edit can be performed, %NULL allows all layers in the\ntimeline"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "new_layer_priority"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "The priority/index of the layer @container should\nbe moved to. -1 means no move"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "mode"
--           , argType =
--               TInterface Name { namespace = "GES" , name = "EditMode" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The edit mode" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "edge"
--           , argType = TInterface Name { namespace = "GES" , name = "Edge" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "The edge of @container where the edit should occur"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "position"
--           , argType = TBasicType TUInt64
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "The edit position: a new location for the edge of @container\n(in nanoseconds)"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "ges_container_edit" ges_container_edit :: 
    Ptr Container ->                        -- container : TInterface (Name {namespace = "GES", name = "Container"})
    Ptr (GList (Ptr GES.Layer.Layer)) ->    -- layers : TGList (TInterface (Name {namespace = "GES", name = "Layer"}))
    Int32 ->                                -- new_layer_priority : TBasicType TInt
    CUInt ->                                -- mode : TInterface (Name {namespace = "GES", name = "EditMode"})
    CUInt ->                                -- edge : TInterface (Name {namespace = "GES", name = "Edge"})
    Word64 ->                               -- position : TBasicType TUInt64
    IO CInt

{-# DEPRECATED containerEdit ["(Since version 1.18)","use @/ges_timeline_element_edit/@ instead."] #-}
-- | Edits the container within its timeline.
containerEdit ::
    (B.CallStack.HasCallStack, MonadIO m, IsContainer a, GES.Layer.IsLayer b) =>
    a
    -- ^ /@container@/: The t'GI.GES.Objects.Container.Container' to edit
    -> [b]
    -- ^ /@layers@/: A whitelist of layers
    -- where the edit can be performed, 'P.Nothing' allows all layers in the
    -- timeline
    -> Int32
    -- ^ /@newLayerPriority@/: The priority\/index of the layer /@container@/ should
    -- be moved to. -1 means no move
    -> GES.Enums.EditMode
    -- ^ /@mode@/: The edit mode
    -> GES.Enums.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:__ 'P.True' if the edit of /@container@/ completed, 'P.False' on failure.
containerEdit :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsContainer a, IsLayer b) =>
a -> [b] -> Int32 -> EditMode -> Edge -> Word64 -> m Bool
containerEdit a
container [b]
layers Int32
newLayerPriority EditMode
mode Edge
edge Word64
position = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr Container
container' <- a -> IO (Ptr Container)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
container
    [Ptr Layer]
layers' <- (b -> IO (Ptr Layer)) -> [b] -> IO [Ptr Layer]
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 b -> IO (Ptr Layer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr [b]
layers
    Ptr (GList (Ptr Layer))
layers'' <- [Ptr Layer] -> IO (Ptr (GList (Ptr Layer)))
forall a. [Ptr a] -> IO (Ptr (GList (Ptr a)))
packGList [Ptr Layer]
layers'
    let mode' :: CUInt
mode' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (EditMode -> Int) -> EditMode -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. EditMode -> Int
forall a. Enum a => a -> Int
fromEnum) EditMode
mode
    let edge' :: CUInt
edge' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (Edge -> Int) -> Edge -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Edge -> Int
forall a. Enum a => a -> Int
fromEnum) Edge
edge
    CInt
result <- Ptr Container
-> Ptr (GList (Ptr Layer))
-> Int32
-> CUInt
-> CUInt
-> Word64
-> IO CInt
ges_container_edit Ptr Container
container' Ptr (GList (Ptr Layer))
layers'' Int32
newLayerPriority CUInt
mode' CUInt
edge' Word64
position
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
container
    (b -> IO ()) -> [b] -> IO ()
forall (t :: * -> *) (m :: * -> *) a b.
(Foldable t, Monad m) =>
(a -> m b) -> t a -> m ()
mapM_ b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr [b]
layers
    Ptr (GList (Ptr Layer)) -> IO ()
forall a. Ptr (GList a) -> IO ()
g_list_free Ptr (GList (Ptr Layer))
layers''
    Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data ContainerEditMethodInfo
instance (signature ~ ([b] -> Int32 -> GES.Enums.EditMode -> GES.Enums.Edge -> Word64 -> m Bool), MonadIO m, IsContainer a, GES.Layer.IsLayer b) => O.OverloadedMethod ContainerEditMethodInfo a signature where
    overloadedMethod = containerEdit

instance O.OverloadedMethodInfo ContainerEditMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.GES.Objects.Container.containerEdit",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ges-1.0.4/docs/GI-GES-Objects-Container.html#v:containerEdit"
        })


#endif

-- method Container::get_children
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "container"
--           , argType =
--               TInterface Name { namespace = "GES" , name = "Container" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "A #GESContainer" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "recursive"
--           , argType = TBasicType TBoolean
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "Whether to recursively get children in @container"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TGList
--                  (TInterface Name { namespace = "GES" , name = "TimelineElement" }))
-- throws : False
-- Skip return : False

foreign import ccall "ges_container_get_children" ges_container_get_children :: 
    Ptr Container ->                        -- container : TInterface (Name {namespace = "GES", name = "Container"})
    CInt ->                                 -- recursive : TBasicType TBoolean
    IO (Ptr (GList (Ptr GES.TimelineElement.TimelineElement)))

-- | Get the list of timeline elements contained in the container. If
-- /@recursive@/ is 'P.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.
containerGetChildren ::
    (B.CallStack.HasCallStack, MonadIO m, IsContainer a) =>
    a
    -- ^ /@container@/: A t'GI.GES.Objects.Container.Container'
    -> Bool
    -- ^ /@recursive@/: Whether to recursively get children in /@container@/
    -> m [GES.TimelineElement.TimelineElement]
    -- ^ __Returns:__ The list of
    -- t'GI.GES.Objects.TimelineElement.TimelineElement'-s contained in /@container@/.
containerGetChildren :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsContainer a) =>
a -> Bool -> m [TimelineElement]
containerGetChildren a
container Bool
recursive = IO [TimelineElement] -> m [TimelineElement]
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [TimelineElement] -> m [TimelineElement])
-> IO [TimelineElement] -> m [TimelineElement]
forall a b. (a -> b) -> a -> b
$ do
    Ptr Container
container' <- a -> IO (Ptr Container)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
container
    let recursive' :: CInt
recursive' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
P.fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
P.fromEnum) Bool
recursive
    Ptr (GList (Ptr TimelineElement))
result <- Ptr Container -> CInt -> IO (Ptr (GList (Ptr TimelineElement)))
ges_container_get_children Ptr Container
container' CInt
recursive'
    [Ptr TimelineElement]
result' <- Ptr (GList (Ptr TimelineElement)) -> IO [Ptr TimelineElement]
forall a. Ptr (GList (Ptr a)) -> IO [Ptr a]
unpackGList Ptr (GList (Ptr TimelineElement))
result
    [TimelineElement]
result'' <- (Ptr TimelineElement -> IO TimelineElement)
-> [Ptr TimelineElement] -> IO [TimelineElement]
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 TimelineElement -> TimelineElement)
-> Ptr TimelineElement -> IO TimelineElement
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr TimelineElement -> TimelineElement
GES.TimelineElement.TimelineElement) [Ptr TimelineElement]
result'
    Ptr (GList (Ptr TimelineElement)) -> IO ()
forall a. Ptr (GList a) -> IO ()
g_list_free Ptr (GList (Ptr TimelineElement))
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
container
    [TimelineElement] -> IO [TimelineElement]
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return [TimelineElement]
result''

#if defined(ENABLE_OVERLOADING)
data ContainerGetChildrenMethodInfo
instance (signature ~ (Bool -> m [GES.TimelineElement.TimelineElement]), MonadIO m, IsContainer a) => O.OverloadedMethod ContainerGetChildrenMethodInfo a signature where
    overloadedMethod = containerGetChildren

instance O.OverloadedMethodInfo ContainerGetChildrenMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.GES.Objects.Container.containerGetChildren",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ges-1.0.4/docs/GI-GES-Objects-Container.html#v:containerGetChildren"
        })


#endif

-- method Container::remove
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "container"
--           , argType =
--               TInterface Name { namespace = "GES" , name = "Container" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "A #GESContainer" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "child"
--           , argType =
--               TInterface Name { namespace = "GES" , name = "TimelineElement" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The child to remove"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "ges_container_remove" ges_container_remove :: 
    Ptr Container ->                        -- container : TInterface (Name {namespace = "GES", name = "Container"})
    Ptr GES.TimelineElement.TimelineElement -> -- child : TInterface (Name {namespace = "GES", name = "TimelineElement"})
    IO CInt

-- | Removes a timeline element from the container. The element will no
-- longer be controlled by the container.
containerRemove ::
    (B.CallStack.HasCallStack, MonadIO m, IsContainer a, GES.TimelineElement.IsTimelineElement b) =>
    a
    -- ^ /@container@/: A t'GI.GES.Objects.Container.Container'
    -> b
    -- ^ /@child@/: The child to remove
    -> m Bool
    -- ^ __Returns:__ 'P.True' if /@child@/ was successfully removed from /@container@/.
containerRemove :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsContainer a, IsTimelineElement b) =>
a -> b -> m Bool
containerRemove a
container b
child = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr Container
container' <- a -> IO (Ptr Container)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
container
    Ptr TimelineElement
child' <- b -> IO (Ptr TimelineElement)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
child
    CInt
result <- Ptr Container -> Ptr TimelineElement -> IO CInt
ges_container_remove Ptr Container
container' Ptr TimelineElement
child'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
container
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
child
    Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data ContainerRemoveMethodInfo
instance (signature ~ (b -> m Bool), MonadIO m, IsContainer a, GES.TimelineElement.IsTimelineElement b) => O.OverloadedMethod ContainerRemoveMethodInfo a signature where
    overloadedMethod = containerRemove

instance O.OverloadedMethodInfo ContainerRemoveMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.GES.Objects.Container.containerRemove",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ges-1.0.4/docs/GI-GES-Objects-Container.html#v:containerRemove"
        })


#endif

-- method Container::ungroup
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "container"
--           , argType =
--               TInterface Name { namespace = "GES" , name = "Container" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The container to ungroup"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "recursive"
--           , argType = TBasicType TBoolean
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Whether to recursively ungroup @container"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TGList
--                  (TInterface Name { namespace = "GES" , name = "Container" }))
-- throws : False
-- Skip return : False

foreign import ccall "ges_container_ungroup" ges_container_ungroup :: 
    Ptr Container ->                        -- container : TInterface (Name {namespace = "GES", name = "Container"})
    CInt ->                                 -- recursive : TBasicType TBoolean
    IO (Ptr (GList (Ptr 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 t'GI.GES.Objects.Group.Group' will simply split
-- into its children. A t'GI.GES.Objects.Clip.Clip' will split into one t'GI.GES.Objects.Clip.Clip' per
-- t'GI.GES.Flags.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
-- t'GI.GES.Objects.TrackElement.TrackElement'-s from the original clip with a matching
-- [TrackElement:trackType]("GI.GES.Objects.TrackElement#g:attr:trackType").
-- 
-- If /@recursive@/ is 'P.True', and the container contains other containers as
-- children, then they will also be ungrouped, and so on.
containerUngroup ::
    (B.CallStack.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 t'GI.GES.Objects.Container.Container'-s created from the splitting of /@container@/.
containerUngroup :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsContainer a) =>
a -> Bool -> m [Container]
containerUngroup a
container Bool
recursive = IO [Container] -> m [Container]
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [Container] -> m [Container])
-> IO [Container] -> m [Container]
forall a b. (a -> b) -> a -> b
$ do
    Ptr Container
container' <- a -> IO (Ptr Container)
forall a b. (HasCallStack, GObject a) => a -> IO (Ptr b)
B.ManagedPtr.disownObject a
container
    let recursive' :: CInt
recursive' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
P.fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
P.fromEnum) Bool
recursive
    Ptr (GList (Ptr Container))
result <- Ptr Container -> CInt -> IO (Ptr (GList (Ptr Container)))
ges_container_ungroup Ptr Container
container' CInt
recursive'
    [Ptr Container]
result' <- Ptr (GList (Ptr Container)) -> IO [Ptr Container]
forall a. Ptr (GList (Ptr a)) -> IO [Ptr a]
unpackGList Ptr (GList (Ptr Container))
result
    [Container]
result'' <- (Ptr Container -> IO Container)
-> [Ptr Container] -> IO [Container]
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 Container -> Container)
-> Ptr Container -> IO Container
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Container -> Container
Container) [Ptr Container]
result'
    Ptr (GList (Ptr Container)) -> IO ()
forall a. Ptr (GList a) -> IO ()
g_list_free Ptr (GList (Ptr Container))
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
container
    [Container] -> IO [Container]
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return [Container]
result''

#if defined(ENABLE_OVERLOADING)
data ContainerUngroupMethodInfo
instance (signature ~ (Bool -> m [Container]), MonadIO m, IsContainer a) => O.OverloadedMethod ContainerUngroupMethodInfo a signature where
    overloadedMethod = containerUngroup

instance O.OverloadedMethodInfo ContainerUngroupMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.GES.Objects.Container.containerUngroup",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ges-1.0.4/docs/GI-GES-Objects-Container.html#v:containerUngroup"
        })


#endif

-- method Container::group
-- method type : MemberFunction
-- Args: [ Arg
--           { argCName = "containers"
--           , argType =
--               TGList (TInterface Name { namespace = "GES" , name = "Container" })
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "\nThe #GESContainer-s to group"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "GES" , name = "Container" })
-- throws : False
-- Skip return : False

foreign import ccall "ges_container_group" ges_container_group :: 
    Ptr (GList (Ptr Container)) ->          -- containers : TGList (TInterface (Name {namespace = "GES", name = "Container"}))
    IO (Ptr Container)

-- | Groups the containers into a single container by merging them. The
-- containers must all belong to the same [TimelineElement:timeline]("GI.GES.Objects.TimelineElement#g:attr:timeline").
-- 
-- If the elements are all t'GI.GES.Objects.Clip.Clip'-s then this method will attempt to
-- combine them all into a single t'GI.GES.Objects.Clip.Clip'. This should succeed if they:
-- share the same [TimelineElement:start]("GI.GES.Objects.TimelineElement#g:attr:start"), [TimelineElement:duration]("GI.GES.Objects.TimelineElement#g:attr:duration")
-- and [TimelineElement:inPoint]("GI.GES.Objects.TimelineElement#g:attr:inPoint"); exist in the same layer; and all of
-- the sources share the same t'GI.GES.Objects.Asset.Asset'. If this fails, or one of the
-- elements is not a t'GI.GES.Objects.Clip.Clip', this method will try to create a t'GI.GES.Objects.Group.Group'
-- instead.
containerGroup ::
    (B.CallStack.HasCallStack, MonadIO m, IsContainer a) =>
    [a]
    -- ^ /@containers@/: 
    -- The t'GI.GES.Objects.Container.Container'-s to group
    -> m (Maybe Container)
    -- ^ __Returns:__ The container created by merging
    -- /@containers@/, or 'P.Nothing' if they could not be merged into a single
    -- container.
containerGroup :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsContainer a) =>
[a] -> m (Maybe Container)
containerGroup [a]
containers = IO (Maybe Container) -> m (Maybe Container)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Container) -> m (Maybe Container))
-> IO (Maybe Container) -> m (Maybe Container)
forall a b. (a -> b) -> a -> b
$ do
    [Ptr Container]
containers' <- (a -> IO (Ptr Container)) -> [a] -> IO [Ptr Container]
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 a -> IO (Ptr Container)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr [a]
containers
    Ptr (GList (Ptr Container))
containers'' <- [Ptr Container] -> IO (Ptr (GList (Ptr Container)))
forall a. [Ptr a] -> IO (Ptr (GList (Ptr a)))
packGList [Ptr Container]
containers'
    Ptr Container
result <- Ptr (GList (Ptr Container)) -> IO (Ptr Container)
ges_container_group Ptr (GList (Ptr Container))
containers''
    Maybe Container
maybeResult <- Ptr Container
-> (Ptr Container -> IO Container) -> IO (Maybe Container)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Container
result ((Ptr Container -> IO Container) -> IO (Maybe Container))
-> (Ptr Container -> IO Container) -> IO (Maybe Container)
forall a b. (a -> b) -> a -> b
$ \Ptr Container
result' -> do
        Container
result'' <- ((ManagedPtr Container -> Container)
-> Ptr Container -> IO Container
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Container -> Container
Container) Ptr Container
result'
        Container -> IO Container
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Container
result''
    (a -> IO ()) -> [a] -> IO ()
forall (t :: * -> *) (m :: * -> *) a b.
(Foldable t, Monad m) =>
(a -> m b) -> t a -> m ()
mapM_ a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr [a]
containers
    Ptr (GList (Ptr Container)) -> IO ()
forall a. Ptr (GList a) -> IO ()
g_list_free Ptr (GList (Ptr Container))
containers''
    Maybe Container -> IO (Maybe Container)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Container
maybeResult

#if defined(ENABLE_OVERLOADING)
#endif