{-# 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.Marker.Marker' can be colored by setting the 'GI.GES.Constants.META_MARKER_COLOR' meta.
-- 
-- /Since: 1.18/

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

module GI.GES.Objects.MarkerList
    ( 

-- * Exported types
    MarkerList(..)                          ,
    IsMarkerList                            ,
    toMarkerList                            ,


 -- * Methods
-- | 
-- 
--  === __Click to display all available methods, including inherited ones__
-- ==== Methods
-- [add]("GI.GES.Objects.MarkerList#g:method:add"), [bindProperty]("GI.GObject.Objects.Object#g:method:bindProperty"), [bindPropertyFull]("GI.GObject.Objects.Object#g:method:bindPropertyFull"), [forceFloating]("GI.GObject.Objects.Object#g:method:forceFloating"), [freezeNotify]("GI.GObject.Objects.Object#g:method:freezeNotify"), [getv]("GI.GObject.Objects.Object#g:method:getv"), [isFloating]("GI.GObject.Objects.Object#g:method:isFloating"), [move]("GI.GES.Objects.MarkerList#g:method:move"), [notify]("GI.GObject.Objects.Object#g:method:notify"), [notifyByPspec]("GI.GObject.Objects.Object#g:method:notifyByPspec"), [ref]("GI.GObject.Objects.Object#g:method:ref"), [refSink]("GI.GObject.Objects.Object#g:method:refSink"), [remove]("GI.GES.Objects.MarkerList#g:method:remove"), [runDispose]("GI.GObject.Objects.Object#g:method:runDispose"), [size]("GI.GES.Objects.MarkerList#g:method:size"), [stealData]("GI.GObject.Objects.Object#g:method:stealData"), [stealQdata]("GI.GObject.Objects.Object#g:method:stealQdata"), [thawNotify]("GI.GObject.Objects.Object#g:method:thawNotify"), [unref]("GI.GObject.Objects.Object#g:method:unref"), [watchClosure]("GI.GObject.Objects.Object#g:method:watchClosure").
-- 
-- ==== Getters
-- [getData]("GI.GObject.Objects.Object#g:method:getData"), [getMarkers]("GI.GES.Objects.MarkerList#g:method:getMarkers"), [getProperty]("GI.GObject.Objects.Object#g:method:getProperty"), [getQdata]("GI.GObject.Objects.Object#g:method:getQdata").
-- 
-- ==== Setters
-- [setData]("GI.GObject.Objects.Object#g:method:setData"), [setDataFull]("GI.GObject.Objects.Object#g:method:setDataFull"), [setProperty]("GI.GObject.Objects.Object#g:method:setProperty").

#if defined(ENABLE_OVERLOADING)
    ResolveMarkerListMethod                 ,
#endif

-- ** add #method:add#

#if defined(ENABLE_OVERLOADING)
    MarkerListAddMethodInfo                 ,
#endif
    markerListAdd                           ,


-- ** getMarkers #method:getMarkers#

#if defined(ENABLE_OVERLOADING)
    MarkerListGetMarkersMethodInfo          ,
#endif
    markerListGetMarkers                    ,


-- ** move #method:move#

#if defined(ENABLE_OVERLOADING)
    MarkerListMoveMethodInfo                ,
#endif
    markerListMove                          ,


-- ** new #method:new#

    markerListNew                           ,


-- ** remove #method:remove#

#if defined(ENABLE_OVERLOADING)
    MarkerListRemoveMethodInfo              ,
#endif
    markerListRemove                        ,


-- ** size #method:size#

#if defined(ENABLE_OVERLOADING)
    MarkerListSizeMethodInfo                ,
#endif
    markerListSize                          ,




 -- * Properties


-- ** flags #attr:flags#
-- | Flags indicating how markers on the list should be treated.
-- 
-- /Since: 1.20/

#if defined(ENABLE_OVERLOADING)
    MarkerListFlagsPropertyInfo             ,
#endif
    constructMarkerListFlags                ,
    getMarkerListFlags                      ,
#if defined(ENABLE_OVERLOADING)
    markerListFlags                         ,
#endif
    setMarkerListFlags                      ,




 -- * Signals


-- ** markerAdded #signal:markerAdded#

    MarkerListMarkerAddedCallback           ,
#if defined(ENABLE_OVERLOADING)
    MarkerListMarkerAddedSignalInfo         ,
#endif
    afterMarkerListMarkerAdded              ,
    onMarkerListMarkerAdded                 ,


-- ** markerMoved #signal:markerMoved#

    MarkerListMarkerMovedCallback           ,
#if defined(ENABLE_OVERLOADING)
    MarkerListMarkerMovedSignalInfo         ,
#endif
    afterMarkerListMarkerMoved              ,
    onMarkerListMarkerMoved                 ,


-- ** markerRemoved #signal:markerRemoved#

    MarkerListMarkerRemovedCallback         ,
#if defined(ENABLE_OVERLOADING)
    MarkerListMarkerRemovedSignalInfo       ,
#endif
    afterMarkerListMarkerRemoved            ,
    onMarkerListMarkerRemoved               ,




    ) 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.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.Flags as GES.Flags
import {-# SOURCE #-} qualified GI.GES.Objects.Marker as GES.Marker
import qualified GI.GObject.Objects.Object as GObject.Object

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

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

foreign import ccall "ges_marker_list_get_type"
    c_ges_marker_list_get_type :: IO B.Types.GType

instance B.Types.TypedObject MarkerList where
    glibType :: IO GType
glibType = IO GType
c_ges_marker_list_get_type

instance B.Types.GObject MarkerList

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

instance O.HasParentTypes MarkerList
type instance O.ParentTypes MarkerList = '[GObject.Object.Object]

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

-- | Convert 'MarkerList' 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 MarkerList) where
    gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_ges_marker_list_get_type
    gvalueSet_ :: Ptr GValue -> Maybe MarkerList -> IO ()
gvalueSet_ Ptr GValue
gv Maybe MarkerList
P.Nothing = forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (forall a. Ptr a
FP.nullPtr :: FP.Ptr MarkerList)
    gvalueSet_ Ptr GValue
gv (P.Just MarkerList
obj) = forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr MarkerList
obj (forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
    gvalueGet_ :: Ptr GValue -> IO (Maybe MarkerList)
gvalueGet_ Ptr GValue
gv = do
        Ptr MarkerList
ptr <- forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr MarkerList)
        if Ptr MarkerList
ptr forall a. Eq a => a -> a -> Bool
/= forall a. Ptr a
FP.nullPtr
        then forall a. a -> Maybe a
P.Just forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr MarkerList -> MarkerList
MarkerList Ptr MarkerList
ptr
        else forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Maybe a
P.Nothing
        
    

#if defined(ENABLE_OVERLOADING)
type family ResolveMarkerListMethod (t :: Symbol) (o :: *) :: * where
    ResolveMarkerListMethod "add" o = MarkerListAddMethodInfo
    ResolveMarkerListMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
    ResolveMarkerListMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
    ResolveMarkerListMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
    ResolveMarkerListMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
    ResolveMarkerListMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
    ResolveMarkerListMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
    ResolveMarkerListMethod "move" o = MarkerListMoveMethodInfo
    ResolveMarkerListMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
    ResolveMarkerListMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
    ResolveMarkerListMethod "ref" o = GObject.Object.ObjectRefMethodInfo
    ResolveMarkerListMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
    ResolveMarkerListMethod "remove" o = MarkerListRemoveMethodInfo
    ResolveMarkerListMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
    ResolveMarkerListMethod "size" o = MarkerListSizeMethodInfo
    ResolveMarkerListMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
    ResolveMarkerListMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
    ResolveMarkerListMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
    ResolveMarkerListMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
    ResolveMarkerListMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
    ResolveMarkerListMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
    ResolveMarkerListMethod "getMarkers" o = MarkerListGetMarkersMethodInfo
    ResolveMarkerListMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
    ResolveMarkerListMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
    ResolveMarkerListMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
    ResolveMarkerListMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
    ResolveMarkerListMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
    ResolveMarkerListMethod l o = O.MethodResolutionFailed l o

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

#endif

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

#endif

-- signal MarkerList::marker-added
-- | Will be emitted after the marker was added to the marker-list.
-- 
-- /Since: 1.18/
type MarkerListMarkerAddedCallback =
    Word64
    -- ^ /@position@/: the position of the added marker
    -> GES.Marker.Marker
    -- ^ /@marker@/: the t'GI.GES.Objects.Marker.Marker' that was added.
    -> IO ()

type C_MarkerListMarkerAddedCallback =
    Ptr MarkerList ->                       -- object
    Word64 ->
    Ptr GES.Marker.Marker ->
    Ptr () ->                               -- user_data
    IO ()

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

wrap_MarkerListMarkerAddedCallback :: 
    GObject a => (a -> MarkerListMarkerAddedCallback) ->
    C_MarkerListMarkerAddedCallback
wrap_MarkerListMarkerAddedCallback :: forall a.
GObject a =>
(a -> MarkerListMarkerAddedCallback)
-> C_MarkerListMarkerAddedCallback
wrap_MarkerListMarkerAddedCallback a -> MarkerListMarkerAddedCallback
gi'cb Ptr MarkerList
gi'selfPtr Word64
position Ptr Marker
marker Ptr ()
_ = do
    Marker
marker' <- (forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Marker -> Marker
GES.Marker.Marker) Ptr Marker
marker
    forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr MarkerList
gi'selfPtr forall a b. (a -> b) -> a -> b
$ \MarkerList
gi'self -> a -> MarkerListMarkerAddedCallback
gi'cb (coerce :: forall a b. Coercible a b => a -> b
Coerce.coerce MarkerList
gi'self)  Word64
position Marker
marker'


-- | Connect a signal handler for the [markerAdded](#signal:markerAdded) 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' markerList #markerAdded callback
-- @
-- 
-- 
onMarkerListMarkerAdded :: (IsMarkerList a, MonadIO m) => a -> ((?self :: a) => MarkerListMarkerAddedCallback) -> m SignalHandlerId
onMarkerListMarkerAdded :: forall a (m :: * -> *).
(IsMarkerList a, MonadIO m) =>
a
-> ((?self::a) => MarkerListMarkerAddedCallback)
-> m SignalHandlerId
onMarkerListMarkerAdded a
obj (?self::a) => MarkerListMarkerAddedCallback
cb = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
    let wrapped :: a -> MarkerListMarkerAddedCallback
wrapped a
self = let ?self = a
self in (?self::a) => MarkerListMarkerAddedCallback
cb
    let wrapped' :: C_MarkerListMarkerAddedCallback
wrapped' = forall a.
GObject a =>
(a -> MarkerListMarkerAddedCallback)
-> C_MarkerListMarkerAddedCallback
wrap_MarkerListMarkerAddedCallback a -> MarkerListMarkerAddedCallback
wrapped
    FunPtr C_MarkerListMarkerAddedCallback
wrapped'' <- C_MarkerListMarkerAddedCallback
-> IO (FunPtr C_MarkerListMarkerAddedCallback)
mk_MarkerListMarkerAddedCallback C_MarkerListMarkerAddedCallback
wrapped'
    forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"marker-added" FunPtr C_MarkerListMarkerAddedCallback
wrapped'' SignalConnectMode
SignalConnectBefore forall a. Maybe a
Nothing

-- | Connect a signal handler for the [markerAdded](#signal:markerAdded) 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' markerList #markerAdded 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.
-- 
afterMarkerListMarkerAdded :: (IsMarkerList a, MonadIO m) => a -> ((?self :: a) => MarkerListMarkerAddedCallback) -> m SignalHandlerId
afterMarkerListMarkerAdded :: forall a (m :: * -> *).
(IsMarkerList a, MonadIO m) =>
a
-> ((?self::a) => MarkerListMarkerAddedCallback)
-> m SignalHandlerId
afterMarkerListMarkerAdded a
obj (?self::a) => MarkerListMarkerAddedCallback
cb = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
    let wrapped :: a -> MarkerListMarkerAddedCallback
wrapped a
self = let ?self = a
self in (?self::a) => MarkerListMarkerAddedCallback
cb
    let wrapped' :: C_MarkerListMarkerAddedCallback
wrapped' = forall a.
GObject a =>
(a -> MarkerListMarkerAddedCallback)
-> C_MarkerListMarkerAddedCallback
wrap_MarkerListMarkerAddedCallback a -> MarkerListMarkerAddedCallback
wrapped
    FunPtr C_MarkerListMarkerAddedCallback
wrapped'' <- C_MarkerListMarkerAddedCallback
-> IO (FunPtr C_MarkerListMarkerAddedCallback)
mk_MarkerListMarkerAddedCallback C_MarkerListMarkerAddedCallback
wrapped'
    forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"marker-added" FunPtr C_MarkerListMarkerAddedCallback
wrapped'' SignalConnectMode
SignalConnectAfter forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data MarkerListMarkerAddedSignalInfo
instance SignalInfo MarkerListMarkerAddedSignalInfo where
    type HaskellCallbackType MarkerListMarkerAddedSignalInfo = MarkerListMarkerAddedCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_MarkerListMarkerAddedCallback cb
        cb'' <- mk_MarkerListMarkerAddedCallback cb'
        connectSignalFunPtr obj "marker-added" cb'' connectMode detail
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.GES.Objects.MarkerList::marker-added"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ges-1.0.1/docs/GI-GES-Objects-MarkerList.html#g:signal:markerAdded"})

#endif

-- signal MarkerList::marker-moved
-- | Will be emitted after the marker was moved to.
-- 
-- /Since: 1.18/
type MarkerListMarkerMovedCallback =
    Word64
    -- ^ /@previousPosition@/: the previous position of the marker
    -> Word64
    -- ^ /@newPosition@/: the new position of the marker
    -> GES.Marker.Marker
    -- ^ /@marker@/: the t'GI.GES.Objects.Marker.Marker' that was moved.
    -> IO ()

type C_MarkerListMarkerMovedCallback =
    Ptr MarkerList ->                       -- object
    Word64 ->
    Word64 ->
    Ptr GES.Marker.Marker ->
    Ptr () ->                               -- user_data
    IO ()

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

wrap_MarkerListMarkerMovedCallback :: 
    GObject a => (a -> MarkerListMarkerMovedCallback) ->
    C_MarkerListMarkerMovedCallback
wrap_MarkerListMarkerMovedCallback :: forall a.
GObject a =>
(a -> MarkerListMarkerMovedCallback)
-> C_MarkerListMarkerMovedCallback
wrap_MarkerListMarkerMovedCallback a -> MarkerListMarkerMovedCallback
gi'cb Ptr MarkerList
gi'selfPtr Word64
previousPosition Word64
newPosition Ptr Marker
marker Ptr ()
_ = do
    Marker
marker' <- (forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Marker -> Marker
GES.Marker.Marker) Ptr Marker
marker
    forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr MarkerList
gi'selfPtr forall a b. (a -> b) -> a -> b
$ \MarkerList
gi'self -> a -> MarkerListMarkerMovedCallback
gi'cb (coerce :: forall a b. Coercible a b => a -> b
Coerce.coerce MarkerList
gi'self)  Word64
previousPosition Word64
newPosition Marker
marker'


-- | Connect a signal handler for the [markerMoved](#signal:markerMoved) 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' markerList #markerMoved callback
-- @
-- 
-- 
onMarkerListMarkerMoved :: (IsMarkerList a, MonadIO m) => a -> ((?self :: a) => MarkerListMarkerMovedCallback) -> m SignalHandlerId
onMarkerListMarkerMoved :: forall a (m :: * -> *).
(IsMarkerList a, MonadIO m) =>
a
-> ((?self::a) => MarkerListMarkerMovedCallback)
-> m SignalHandlerId
onMarkerListMarkerMoved a
obj (?self::a) => MarkerListMarkerMovedCallback
cb = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
    let wrapped :: a -> MarkerListMarkerMovedCallback
wrapped a
self = let ?self = a
self in (?self::a) => MarkerListMarkerMovedCallback
cb
    let wrapped' :: C_MarkerListMarkerMovedCallback
wrapped' = forall a.
GObject a =>
(a -> MarkerListMarkerMovedCallback)
-> C_MarkerListMarkerMovedCallback
wrap_MarkerListMarkerMovedCallback a -> MarkerListMarkerMovedCallback
wrapped
    FunPtr C_MarkerListMarkerMovedCallback
wrapped'' <- C_MarkerListMarkerMovedCallback
-> IO (FunPtr C_MarkerListMarkerMovedCallback)
mk_MarkerListMarkerMovedCallback C_MarkerListMarkerMovedCallback
wrapped'
    forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"marker-moved" FunPtr C_MarkerListMarkerMovedCallback
wrapped'' SignalConnectMode
SignalConnectBefore forall a. Maybe a
Nothing

-- | Connect a signal handler for the [markerMoved](#signal:markerMoved) 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' markerList #markerMoved 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.
-- 
afterMarkerListMarkerMoved :: (IsMarkerList a, MonadIO m) => a -> ((?self :: a) => MarkerListMarkerMovedCallback) -> m SignalHandlerId
afterMarkerListMarkerMoved :: forall a (m :: * -> *).
(IsMarkerList a, MonadIO m) =>
a
-> ((?self::a) => MarkerListMarkerMovedCallback)
-> m SignalHandlerId
afterMarkerListMarkerMoved a
obj (?self::a) => MarkerListMarkerMovedCallback
cb = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
    let wrapped :: a -> MarkerListMarkerMovedCallback
wrapped a
self = let ?self = a
self in (?self::a) => MarkerListMarkerMovedCallback
cb
    let wrapped' :: C_MarkerListMarkerMovedCallback
wrapped' = forall a.
GObject a =>
(a -> MarkerListMarkerMovedCallback)
-> C_MarkerListMarkerMovedCallback
wrap_MarkerListMarkerMovedCallback a -> MarkerListMarkerMovedCallback
wrapped
    FunPtr C_MarkerListMarkerMovedCallback
wrapped'' <- C_MarkerListMarkerMovedCallback
-> IO (FunPtr C_MarkerListMarkerMovedCallback)
mk_MarkerListMarkerMovedCallback C_MarkerListMarkerMovedCallback
wrapped'
    forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"marker-moved" FunPtr C_MarkerListMarkerMovedCallback
wrapped'' SignalConnectMode
SignalConnectAfter forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data MarkerListMarkerMovedSignalInfo
instance SignalInfo MarkerListMarkerMovedSignalInfo where
    type HaskellCallbackType MarkerListMarkerMovedSignalInfo = MarkerListMarkerMovedCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_MarkerListMarkerMovedCallback cb
        cb'' <- mk_MarkerListMarkerMovedCallback cb'
        connectSignalFunPtr obj "marker-moved" cb'' connectMode detail
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.GES.Objects.MarkerList::marker-moved"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ges-1.0.1/docs/GI-GES-Objects-MarkerList.html#g:signal:markerMoved"})

#endif

-- signal MarkerList::marker-removed
-- | Will be emitted after the marker was removed the marker-list.
-- 
-- /Since: 1.18/
type MarkerListMarkerRemovedCallback =
    GES.Marker.Marker
    -- ^ /@marker@/: the t'GI.GES.Objects.Marker.Marker' that was removed.
    -> IO ()

type C_MarkerListMarkerRemovedCallback =
    Ptr MarkerList ->                       -- object
    Ptr GES.Marker.Marker ->
    Ptr () ->                               -- user_data
    IO ()

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

wrap_MarkerListMarkerRemovedCallback :: 
    GObject a => (a -> MarkerListMarkerRemovedCallback) ->
    C_MarkerListMarkerRemovedCallback
wrap_MarkerListMarkerRemovedCallback :: forall a.
GObject a =>
(a -> MarkerListMarkerRemovedCallback)
-> C_MarkerListMarkerRemovedCallback
wrap_MarkerListMarkerRemovedCallback a -> MarkerListMarkerRemovedCallback
gi'cb Ptr MarkerList
gi'selfPtr Ptr Marker
marker Ptr ()
_ = do
    Marker
marker' <- (forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Marker -> Marker
GES.Marker.Marker) Ptr Marker
marker
    forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr MarkerList
gi'selfPtr forall a b. (a -> b) -> a -> b
$ \MarkerList
gi'self -> a -> MarkerListMarkerRemovedCallback
gi'cb (coerce :: forall a b. Coercible a b => a -> b
Coerce.coerce MarkerList
gi'self)  Marker
marker'


-- | Connect a signal handler for the [markerRemoved](#signal:markerRemoved) 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' markerList #markerRemoved callback
-- @
-- 
-- 
onMarkerListMarkerRemoved :: (IsMarkerList a, MonadIO m) => a -> ((?self :: a) => MarkerListMarkerRemovedCallback) -> m SignalHandlerId
onMarkerListMarkerRemoved :: forall a (m :: * -> *).
(IsMarkerList a, MonadIO m) =>
a
-> ((?self::a) => MarkerListMarkerRemovedCallback)
-> m SignalHandlerId
onMarkerListMarkerRemoved a
obj (?self::a) => MarkerListMarkerRemovedCallback
cb = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
    let wrapped :: a -> MarkerListMarkerRemovedCallback
wrapped a
self = let ?self = a
self in (?self::a) => MarkerListMarkerRemovedCallback
cb
    let wrapped' :: C_MarkerListMarkerRemovedCallback
wrapped' = forall a.
GObject a =>
(a -> MarkerListMarkerRemovedCallback)
-> C_MarkerListMarkerRemovedCallback
wrap_MarkerListMarkerRemovedCallback a -> MarkerListMarkerRemovedCallback
wrapped
    FunPtr C_MarkerListMarkerRemovedCallback
wrapped'' <- C_MarkerListMarkerRemovedCallback
-> IO (FunPtr C_MarkerListMarkerRemovedCallback)
mk_MarkerListMarkerRemovedCallback C_MarkerListMarkerRemovedCallback
wrapped'
    forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"marker-removed" FunPtr C_MarkerListMarkerRemovedCallback
wrapped'' SignalConnectMode
SignalConnectBefore forall a. Maybe a
Nothing

-- | Connect a signal handler for the [markerRemoved](#signal:markerRemoved) 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' markerList #markerRemoved 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.
-- 
afterMarkerListMarkerRemoved :: (IsMarkerList a, MonadIO m) => a -> ((?self :: a) => MarkerListMarkerRemovedCallback) -> m SignalHandlerId
afterMarkerListMarkerRemoved :: forall a (m :: * -> *).
(IsMarkerList a, MonadIO m) =>
a
-> ((?self::a) => MarkerListMarkerRemovedCallback)
-> m SignalHandlerId
afterMarkerListMarkerRemoved a
obj (?self::a) => MarkerListMarkerRemovedCallback
cb = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
    let wrapped :: a -> MarkerListMarkerRemovedCallback
wrapped a
self = let ?self = a
self in (?self::a) => MarkerListMarkerRemovedCallback
cb
    let wrapped' :: C_MarkerListMarkerRemovedCallback
wrapped' = forall a.
GObject a =>
(a -> MarkerListMarkerRemovedCallback)
-> C_MarkerListMarkerRemovedCallback
wrap_MarkerListMarkerRemovedCallback a -> MarkerListMarkerRemovedCallback
wrapped
    FunPtr C_MarkerListMarkerRemovedCallback
wrapped'' <- C_MarkerListMarkerRemovedCallback
-> IO (FunPtr C_MarkerListMarkerRemovedCallback)
mk_MarkerListMarkerRemovedCallback C_MarkerListMarkerRemovedCallback
wrapped'
    forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"marker-removed" FunPtr C_MarkerListMarkerRemovedCallback
wrapped'' SignalConnectMode
SignalConnectAfter forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data MarkerListMarkerRemovedSignalInfo
instance SignalInfo MarkerListMarkerRemovedSignalInfo where
    type HaskellCallbackType MarkerListMarkerRemovedSignalInfo = MarkerListMarkerRemovedCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_MarkerListMarkerRemovedCallback cb
        cb'' <- mk_MarkerListMarkerRemovedCallback cb'
        connectSignalFunPtr obj "marker-removed" cb'' connectMode detail
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.GES.Objects.MarkerList::marker-removed"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ges-1.0.1/docs/GI-GES-Objects-MarkerList.html#g:signal:markerRemoved"})

#endif

-- VVV Prop "flags"
   -- Type: TInterface (Name {namespace = "GES", name = "MarkerFlags"})
   -- Flags: [PropertyReadable,PropertyWritable,PropertyConstruct]
   -- Nullable: (Nothing,Nothing)

-- | Get the value of the “@flags@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' markerList #flags
-- @
getMarkerListFlags :: (MonadIO m, IsMarkerList o) => o -> m [GES.Flags.MarkerFlags]
getMarkerListFlags :: forall (m :: * -> *) o.
(MonadIO m, IsMarkerList o) =>
o -> m [MarkerFlags]
getMarkerListFlags o
obj = forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO forall a b. (a -> b) -> a -> b
$ forall a b.
(GObject a, IsGFlag b, BoxedFlags b) =>
a -> String -> IO [b]
B.Properties.getObjectPropertyFlags o
obj String
"flags"

-- | Set the value of the “@flags@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' markerList [ #flags 'Data.GI.Base.Attributes.:=' value ]
-- @
setMarkerListFlags :: (MonadIO m, IsMarkerList o) => o -> [GES.Flags.MarkerFlags] -> m ()
setMarkerListFlags :: forall (m :: * -> *) o.
(MonadIO m, IsMarkerList o) =>
o -> [MarkerFlags] -> m ()
setMarkerListFlags o
obj [MarkerFlags]
val = forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO forall a b. (a -> b) -> a -> b
$ do
    forall a b.
(IsGFlag b, BoxedFlags b, GObject a) =>
a -> String -> [b] -> IO ()
B.Properties.setObjectPropertyFlags o
obj String
"flags" [MarkerFlags]
val

-- | Construct a `GValueConstruct` with valid value for the “@flags@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructMarkerListFlags :: (IsMarkerList o, MIO.MonadIO m) => [GES.Flags.MarkerFlags] -> m (GValueConstruct o)
constructMarkerListFlags :: forall o (m :: * -> *).
(IsMarkerList o, MonadIO m) =>
[MarkerFlags] -> m (GValueConstruct o)
constructMarkerListFlags [MarkerFlags]
val = forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO forall a b. (a -> b) -> a -> b
$ do
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO forall a b. (a -> b) -> a -> b
$ forall a o.
(IsGFlag a, BoxedFlags a) =>
String -> [a] -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyFlags String
"flags" [MarkerFlags]
val

#if defined(ENABLE_OVERLOADING)
data MarkerListFlagsPropertyInfo
instance AttrInfo MarkerListFlagsPropertyInfo where
    type AttrAllowedOps MarkerListFlagsPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint MarkerListFlagsPropertyInfo = IsMarkerList
    type AttrSetTypeConstraint MarkerListFlagsPropertyInfo = (~) [GES.Flags.MarkerFlags]
    type AttrTransferTypeConstraint MarkerListFlagsPropertyInfo = (~) [GES.Flags.MarkerFlags]
    type AttrTransferType MarkerListFlagsPropertyInfo = [GES.Flags.MarkerFlags]
    type AttrGetType MarkerListFlagsPropertyInfo = [GES.Flags.MarkerFlags]
    type AttrLabel MarkerListFlagsPropertyInfo = "flags"
    type AttrOrigin MarkerListFlagsPropertyInfo = MarkerList
    attrGet = getMarkerListFlags
    attrSet = setMarkerListFlags
    attrTransfer _ v = do
        return v
    attrConstruct = constructMarkerListFlags
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.GES.Objects.MarkerList.flags"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ges-1.0.1/docs/GI-GES-Objects-MarkerList.html#g:attr:flags"
        })
#endif

#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList MarkerList
type instance O.AttributeList MarkerList = MarkerListAttributeList
type MarkerListAttributeList = ('[ '("flags", MarkerListFlagsPropertyInfo)] :: [(Symbol, *)])
#endif

#if defined(ENABLE_OVERLOADING)
markerListFlags :: AttrLabelProxy "flags"
markerListFlags = AttrLabelProxy

#endif

#if defined(ENABLE_OVERLOADING)
type instance O.SignalList MarkerList = MarkerListSignalList
type MarkerListSignalList = ('[ '("markerAdded", MarkerListMarkerAddedSignalInfo), '("markerMoved", MarkerListMarkerMovedSignalInfo), '("markerRemoved", MarkerListMarkerRemovedSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])

#endif

-- method MarkerList::new
-- method type : Constructor
-- Args: []
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "GES" , name = "MarkerList" })
-- throws : False
-- Skip return : False

foreign import ccall "ges_marker_list_new" ges_marker_list_new :: 
    IO (Ptr MarkerList)

-- | Creates a new t'GI.GES.Objects.MarkerList.MarkerList'.
-- 
-- /Since: 1.18/
markerListNew ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    m MarkerList
    -- ^ __Returns:__ A new t'GI.GES.Objects.MarkerList.MarkerList'
markerListNew :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m MarkerList
markerListNew  = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
    Ptr MarkerList
result <- IO (Ptr MarkerList)
ges_marker_list_new
    forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"markerListNew" Ptr MarkerList
result
    MarkerList
result' <- (forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr MarkerList -> MarkerList
MarkerList) Ptr MarkerList
result
    forall (m :: * -> *) a. Monad m => a -> m a
return MarkerList
result'

#if defined(ENABLE_OVERLOADING)
#endif

-- method MarkerList::add
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "list"
--           , argType =
--               TInterface Name { namespace = "GES" , name = "MarkerList" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , 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 position of the new marker"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "GES" , name = "Marker" })
-- throws : False
-- Skip return : False

foreign import ccall "ges_marker_list_add" ges_marker_list_add :: 
    Ptr MarkerList ->                       -- list : TInterface (Name {namespace = "GES", name = "MarkerList"})
    Word64 ->                               -- position : TBasicType TUInt64
    IO (Ptr GES.Marker.Marker)

-- | /No description available in the introspection data./
-- 
-- /Since: 1.18/
markerListAdd ::
    (B.CallStack.HasCallStack, MonadIO m, IsMarkerList a) =>
    a
    -> Word64
    -- ^ /@position@/: The position of the new marker
    -> m GES.Marker.Marker
    -- ^ __Returns:__ The newly-added marker, the list keeps ownership
    -- of the marker
markerListAdd :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsMarkerList a) =>
a -> Word64 -> m Marker
markerListAdd a
list Word64
position = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
    Ptr MarkerList
list' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
list
    Ptr Marker
result <- Ptr MarkerList -> Word64 -> IO (Ptr Marker)
ges_marker_list_add Ptr MarkerList
list' Word64
position
    forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"markerListAdd" Ptr Marker
result
    Marker
result' <- (forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Marker -> Marker
GES.Marker.Marker) Ptr Marker
result
    forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
list
    forall (m :: * -> *) a. Monad m => a -> m a
return Marker
result'

#if defined(ENABLE_OVERLOADING)
data MarkerListAddMethodInfo
instance (signature ~ (Word64 -> m GES.Marker.Marker), MonadIO m, IsMarkerList a) => O.OverloadedMethod MarkerListAddMethodInfo a signature where
    overloadedMethod = markerListAdd

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


#endif

-- method MarkerList::get_markers
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "list"
--           , argType =
--               TInterface Name { namespace = "GES" , name = "MarkerList" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TGList (TInterface Name { namespace = "GES" , name = "Marker" }))
-- throws : False
-- Skip return : False

foreign import ccall "ges_marker_list_get_markers" ges_marker_list_get_markers :: 
    Ptr MarkerList ->                       -- list : TInterface (Name {namespace = "GES", name = "MarkerList"})
    IO (Ptr (GList (Ptr GES.Marker.Marker)))

-- | /No description available in the introspection data./
-- 
-- /Since: 1.18/
markerListGetMarkers ::
    (B.CallStack.HasCallStack, MonadIO m, IsMarkerList a) =>
    a
    -> m [GES.Marker.Marker]
    -- ^ __Returns:__ a t'GI.GLib.Structs.List.List'
    -- of the t'GI.GES.Objects.Marker.Marker' within the GESMarkerList. The user will have
    -- to unref each t'GI.GES.Objects.Marker.Marker' and free the t'GI.GLib.Structs.List.List'.
markerListGetMarkers :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsMarkerList a) =>
a -> m [Marker]
markerListGetMarkers a
list = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
    Ptr MarkerList
list' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
list
    Ptr (GList (Ptr Marker))
result <- Ptr MarkerList -> IO (Ptr (GList (Ptr Marker)))
ges_marker_list_get_markers Ptr MarkerList
list'
    [Ptr Marker]
result' <- forall a. Ptr (GList (Ptr a)) -> IO [Ptr a]
unpackGList Ptr (GList (Ptr Marker))
result
    [Marker]
result'' <- forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM (forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Marker -> Marker
GES.Marker.Marker) [Ptr Marker]
result'
    forall a. Ptr (GList a) -> IO ()
g_list_free Ptr (GList (Ptr Marker))
result
    forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
list
    forall (m :: * -> *) a. Monad m => a -> m a
return [Marker]
result''

#if defined(ENABLE_OVERLOADING)
data MarkerListGetMarkersMethodInfo
instance (signature ~ (m [GES.Marker.Marker]), MonadIO m, IsMarkerList a) => O.OverloadedMethod MarkerListGetMarkersMethodInfo a signature where
    overloadedMethod = markerListGetMarkers

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


#endif

-- method MarkerList::move
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "list"
--           , argType =
--               TInterface Name { namespace = "GES" , name = "MarkerList" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "marker"
--           , argType = TInterface Name { namespace = "GES" , name = "Marker" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , 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 = Nothing , 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_marker_list_move" ges_marker_list_move :: 
    Ptr MarkerList ->                       -- list : TInterface (Name {namespace = "GES", name = "MarkerList"})
    Ptr GES.Marker.Marker ->                -- marker : TInterface (Name {namespace = "GES", name = "Marker"})
    Word64 ->                               -- position : TBasicType TUInt64
    IO CInt

-- | Moves a /@marker@/ in a /@list@/ to a new /@position@/
-- 
-- /Since: 1.18/
markerListMove ::
    (B.CallStack.HasCallStack, MonadIO m, IsMarkerList a, GES.Marker.IsMarker b) =>
    a
    -> b
    -> Word64
    -> m Bool
    -- ^ __Returns:__ 'P.True' if the marker could be moved, 'P.False' otherwise
    --   (if the marker was not present in the list for example)
markerListMove :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsMarkerList a, IsMarker b) =>
a -> b -> Word64 -> m Bool
markerListMove a
list b
marker Word64
position = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
    Ptr MarkerList
list' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
list
    Ptr Marker
marker' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
marker
    CInt
result <- Ptr MarkerList -> Ptr Marker -> Word64 -> IO CInt
ges_marker_list_move Ptr MarkerList
list' Ptr Marker
marker' Word64
position
    let result' :: Bool
result' = (forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
list
    forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
marker
    forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data MarkerListMoveMethodInfo
instance (signature ~ (b -> Word64 -> m Bool), MonadIO m, IsMarkerList a, GES.Marker.IsMarker b) => O.OverloadedMethod MarkerListMoveMethodInfo a signature where
    overloadedMethod = markerListMove

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


#endif

-- method MarkerList::remove
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "list"
--           , argType =
--               TInterface Name { namespace = "GES" , name = "MarkerList" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "marker"
--           , argType = TInterface Name { namespace = "GES" , name = "Marker" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , 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_marker_list_remove" ges_marker_list_remove :: 
    Ptr MarkerList ->                       -- list : TInterface (Name {namespace = "GES", name = "MarkerList"})
    Ptr GES.Marker.Marker ->                -- marker : TInterface (Name {namespace = "GES", name = "Marker"})
    IO CInt

-- | Removes /@marker@/ from /@list@/, this decreases the refcount of the
-- marker by 1.
-- 
-- /Since: 1.18/
markerListRemove ::
    (B.CallStack.HasCallStack, MonadIO m, IsMarkerList a, GES.Marker.IsMarker b) =>
    a
    -> b
    -> m Bool
    -- ^ __Returns:__ 'P.True' if the marker could be removed, 'P.False' otherwise
    --   (if the marker was not present in the list for example)
markerListRemove :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsMarkerList a, IsMarker b) =>
a -> b -> m Bool
markerListRemove a
list b
marker = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
    Ptr MarkerList
list' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
list
    Ptr Marker
marker' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
marker
    CInt
result <- Ptr MarkerList -> Ptr Marker -> IO CInt
ges_marker_list_remove Ptr MarkerList
list' Ptr Marker
marker'
    let result' :: Bool
result' = (forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
list
    forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
marker
    forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data MarkerListRemoveMethodInfo
instance (signature ~ (b -> m Bool), MonadIO m, IsMarkerList a, GES.Marker.IsMarker b) => O.OverloadedMethod MarkerListRemoveMethodInfo a signature where
    overloadedMethod = markerListRemove

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


#endif

-- method MarkerList::size
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "list"
--           , argType =
--               TInterface Name { namespace = "GES" , name = "MarkerList" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUInt)
-- throws : False
-- Skip return : False

foreign import ccall "ges_marker_list_size" ges_marker_list_size :: 
    Ptr MarkerList ->                       -- list : TInterface (Name {namespace = "GES", name = "MarkerList"})
    IO Word32

-- | /No description available in the introspection data./
-- 
-- /Since: 1.18/
markerListSize ::
    (B.CallStack.HasCallStack, MonadIO m, IsMarkerList a) =>
    a
    -> m Word32
    -- ^ __Returns:__ The number of markers in /@list@/
markerListSize :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsMarkerList a) =>
a -> m Word32
markerListSize a
list = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
    Ptr MarkerList
list' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
list
    Word32
result <- Ptr MarkerList -> IO Word32
ges_marker_list_size Ptr MarkerList
list'
    forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
list
    forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result

#if defined(ENABLE_OVERLOADING)
data MarkerListSizeMethodInfo
instance (signature ~ (m Word32), MonadIO m, IsMarkerList a) => O.OverloadedMethod MarkerListSizeMethodInfo a signature where
    overloadedMethod = markerListSize

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


#endif