{- |
Copyright  : Will Thompson, Iñaki García Etxebarria and Jonas Platte
License    : LGPL-2.1
Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)

A representation of a difference between two 'GI.GstVideo.Structs.VideoTimeCode.VideoTimeCode' instances.
Will not necessarily correspond to a real timecode (e.g. 00:00:10;00)

/Since: 1.12/
-}

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

module GI.GstVideo.Structs.VideoTimeCodeInterval
    (

-- * Exported types
    VideoTimeCodeInterval(..)               ,
    newZeroVideoTimeCodeInterval            ,
    noVideoTimeCodeInterval                 ,


 -- * Methods
-- ** clear #method:clear#

#if ENABLE_OVERLOADING
    VideoTimeCodeIntervalClearMethodInfo    ,
#endif
    videoTimeCodeIntervalClear              ,


-- ** copy #method:copy#

#if ENABLE_OVERLOADING
    VideoTimeCodeIntervalCopyMethodInfo     ,
#endif
    videoTimeCodeIntervalCopy               ,


-- ** free #method:free#

#if ENABLE_OVERLOADING
    VideoTimeCodeIntervalFreeMethodInfo     ,
#endif
    videoTimeCodeIntervalFree               ,


-- ** init #method:init#

#if ENABLE_OVERLOADING
    VideoTimeCodeIntervalInitMethodInfo     ,
#endif
    videoTimeCodeIntervalInit               ,


-- ** new #method:new#

    videoTimeCodeIntervalNew                ,


-- ** newFromString #method:newFromString#

    videoTimeCodeIntervalNewFromString      ,




 -- * Properties
-- ** frames #attr:frames#
{- | the frames field of 'GI.GstVideo.Structs.VideoTimeCodeInterval.VideoTimeCodeInterval'
-}
    getVideoTimeCodeIntervalFrames          ,
    setVideoTimeCodeIntervalFrames          ,
#if ENABLE_OVERLOADING
    videoTimeCodeInterval_frames            ,
#endif


-- ** hours #attr:hours#
{- | the hours field of 'GI.GstVideo.Structs.VideoTimeCodeInterval.VideoTimeCodeInterval'
-}
    getVideoTimeCodeIntervalHours           ,
    setVideoTimeCodeIntervalHours           ,
#if ENABLE_OVERLOADING
    videoTimeCodeInterval_hours             ,
#endif


-- ** minutes #attr:minutes#
{- | the minutes field of 'GI.GstVideo.Structs.VideoTimeCodeInterval.VideoTimeCodeInterval'
-}
    getVideoTimeCodeIntervalMinutes         ,
    setVideoTimeCodeIntervalMinutes         ,
#if ENABLE_OVERLOADING
    videoTimeCodeInterval_minutes           ,
#endif


-- ** seconds #attr:seconds#
{- | the seconds field of 'GI.GstVideo.Structs.VideoTimeCodeInterval.VideoTimeCodeInterval'
-}
    getVideoTimeCodeIntervalSeconds         ,
    setVideoTimeCodeIntervalSeconds         ,
#if ENABLE_OVERLOADING
    videoTimeCodeInterval_seconds           ,
#endif




    ) 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.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
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.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


-- | Memory-managed wrapper type.
newtype VideoTimeCodeInterval = VideoTimeCodeInterval (ManagedPtr VideoTimeCodeInterval)
foreign import ccall "gst_video_time_code_interval_get_type" c_gst_video_time_code_interval_get_type ::
    IO GType

instance BoxedObject VideoTimeCodeInterval where
    boxedType _ = c_gst_video_time_code_interval_get_type

-- | Construct a `VideoTimeCodeInterval` struct initialized to zero.
newZeroVideoTimeCodeInterval :: MonadIO m => m VideoTimeCodeInterval
newZeroVideoTimeCodeInterval = liftIO $ callocBoxedBytes 16 >>= wrapBoxed VideoTimeCodeInterval

instance tag ~ 'AttrSet => Constructible VideoTimeCodeInterval tag where
    new _ attrs = do
        o <- newZeroVideoTimeCodeInterval
        GI.Attributes.set o attrs
        return o


-- | A convenience alias for `Nothing` :: `Maybe` `VideoTimeCodeInterval`.
noVideoTimeCodeInterval :: Maybe VideoTimeCodeInterval
noVideoTimeCodeInterval = Nothing

{- |
Get the value of the “@hours@” field.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Attributes.get' videoTimeCodeInterval #hours
@
-}
getVideoTimeCodeIntervalHours :: MonadIO m => VideoTimeCodeInterval -> m Word32
getVideoTimeCodeIntervalHours s = liftIO $ withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 0) :: IO Word32
    return val

{- |
Set the value of the “@hours@” field.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Attributes.set' videoTimeCodeInterval [ #hours 'Data.GI.Base.Attributes.:=' value ]
@
-}
setVideoTimeCodeIntervalHours :: MonadIO m => VideoTimeCodeInterval -> Word32 -> m ()
setVideoTimeCodeIntervalHours s val = liftIO $ withManagedPtr s $ \ptr -> do
    poke (ptr `plusPtr` 0) (val :: Word32)

#if ENABLE_OVERLOADING
data VideoTimeCodeIntervalHoursFieldInfo
instance AttrInfo VideoTimeCodeIntervalHoursFieldInfo where
    type AttrAllowedOps VideoTimeCodeIntervalHoursFieldInfo = '[ 'AttrSet, 'AttrGet]
    type AttrSetTypeConstraint VideoTimeCodeIntervalHoursFieldInfo = (~) Word32
    type AttrBaseTypeConstraint VideoTimeCodeIntervalHoursFieldInfo = (~) VideoTimeCodeInterval
    type AttrGetType VideoTimeCodeIntervalHoursFieldInfo = Word32
    type AttrLabel VideoTimeCodeIntervalHoursFieldInfo = "hours"
    type AttrOrigin VideoTimeCodeIntervalHoursFieldInfo = VideoTimeCodeInterval
    attrGet _ = getVideoTimeCodeIntervalHours
    attrSet _ = setVideoTimeCodeIntervalHours
    attrConstruct = undefined
    attrClear _ = undefined

videoTimeCodeInterval_hours :: AttrLabelProxy "hours"
videoTimeCodeInterval_hours = AttrLabelProxy

#endif


{- |
Get the value of the “@minutes@” field.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Attributes.get' videoTimeCodeInterval #minutes
@
-}
getVideoTimeCodeIntervalMinutes :: MonadIO m => VideoTimeCodeInterval -> m Word32
getVideoTimeCodeIntervalMinutes s = liftIO $ withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 4) :: IO Word32
    return val

{- |
Set the value of the “@minutes@” field.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Attributes.set' videoTimeCodeInterval [ #minutes 'Data.GI.Base.Attributes.:=' value ]
@
-}
setVideoTimeCodeIntervalMinutes :: MonadIO m => VideoTimeCodeInterval -> Word32 -> m ()
setVideoTimeCodeIntervalMinutes s val = liftIO $ withManagedPtr s $ \ptr -> do
    poke (ptr `plusPtr` 4) (val :: Word32)

#if ENABLE_OVERLOADING
data VideoTimeCodeIntervalMinutesFieldInfo
instance AttrInfo VideoTimeCodeIntervalMinutesFieldInfo where
    type AttrAllowedOps VideoTimeCodeIntervalMinutesFieldInfo = '[ 'AttrSet, 'AttrGet]
    type AttrSetTypeConstraint VideoTimeCodeIntervalMinutesFieldInfo = (~) Word32
    type AttrBaseTypeConstraint VideoTimeCodeIntervalMinutesFieldInfo = (~) VideoTimeCodeInterval
    type AttrGetType VideoTimeCodeIntervalMinutesFieldInfo = Word32
    type AttrLabel VideoTimeCodeIntervalMinutesFieldInfo = "minutes"
    type AttrOrigin VideoTimeCodeIntervalMinutesFieldInfo = VideoTimeCodeInterval
    attrGet _ = getVideoTimeCodeIntervalMinutes
    attrSet _ = setVideoTimeCodeIntervalMinutes
    attrConstruct = undefined
    attrClear _ = undefined

videoTimeCodeInterval_minutes :: AttrLabelProxy "minutes"
videoTimeCodeInterval_minutes = AttrLabelProxy

#endif


{- |
Get the value of the “@seconds@” field.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Attributes.get' videoTimeCodeInterval #seconds
@
-}
getVideoTimeCodeIntervalSeconds :: MonadIO m => VideoTimeCodeInterval -> m Word32
getVideoTimeCodeIntervalSeconds s = liftIO $ withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 8) :: IO Word32
    return val

{- |
Set the value of the “@seconds@” field.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Attributes.set' videoTimeCodeInterval [ #seconds 'Data.GI.Base.Attributes.:=' value ]
@
-}
setVideoTimeCodeIntervalSeconds :: MonadIO m => VideoTimeCodeInterval -> Word32 -> m ()
setVideoTimeCodeIntervalSeconds s val = liftIO $ withManagedPtr s $ \ptr -> do
    poke (ptr `plusPtr` 8) (val :: Word32)

#if ENABLE_OVERLOADING
data VideoTimeCodeIntervalSecondsFieldInfo
instance AttrInfo VideoTimeCodeIntervalSecondsFieldInfo where
    type AttrAllowedOps VideoTimeCodeIntervalSecondsFieldInfo = '[ 'AttrSet, 'AttrGet]
    type AttrSetTypeConstraint VideoTimeCodeIntervalSecondsFieldInfo = (~) Word32
    type AttrBaseTypeConstraint VideoTimeCodeIntervalSecondsFieldInfo = (~) VideoTimeCodeInterval
    type AttrGetType VideoTimeCodeIntervalSecondsFieldInfo = Word32
    type AttrLabel VideoTimeCodeIntervalSecondsFieldInfo = "seconds"
    type AttrOrigin VideoTimeCodeIntervalSecondsFieldInfo = VideoTimeCodeInterval
    attrGet _ = getVideoTimeCodeIntervalSeconds
    attrSet _ = setVideoTimeCodeIntervalSeconds
    attrConstruct = undefined
    attrClear _ = undefined

videoTimeCodeInterval_seconds :: AttrLabelProxy "seconds"
videoTimeCodeInterval_seconds = AttrLabelProxy

#endif


{- |
Get the value of the “@frames@” field.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Attributes.get' videoTimeCodeInterval #frames
@
-}
getVideoTimeCodeIntervalFrames :: MonadIO m => VideoTimeCodeInterval -> m Word32
getVideoTimeCodeIntervalFrames s = liftIO $ withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 12) :: IO Word32
    return val

{- |
Set the value of the “@frames@” field.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Attributes.set' videoTimeCodeInterval [ #frames 'Data.GI.Base.Attributes.:=' value ]
@
-}
setVideoTimeCodeIntervalFrames :: MonadIO m => VideoTimeCodeInterval -> Word32 -> m ()
setVideoTimeCodeIntervalFrames s val = liftIO $ withManagedPtr s $ \ptr -> do
    poke (ptr `plusPtr` 12) (val :: Word32)

#if ENABLE_OVERLOADING
data VideoTimeCodeIntervalFramesFieldInfo
instance AttrInfo VideoTimeCodeIntervalFramesFieldInfo where
    type AttrAllowedOps VideoTimeCodeIntervalFramesFieldInfo = '[ 'AttrSet, 'AttrGet]
    type AttrSetTypeConstraint VideoTimeCodeIntervalFramesFieldInfo = (~) Word32
    type AttrBaseTypeConstraint VideoTimeCodeIntervalFramesFieldInfo = (~) VideoTimeCodeInterval
    type AttrGetType VideoTimeCodeIntervalFramesFieldInfo = Word32
    type AttrLabel VideoTimeCodeIntervalFramesFieldInfo = "frames"
    type AttrOrigin VideoTimeCodeIntervalFramesFieldInfo = VideoTimeCodeInterval
    attrGet _ = getVideoTimeCodeIntervalFrames
    attrSet _ = setVideoTimeCodeIntervalFrames
    attrConstruct = undefined
    attrClear _ = undefined

videoTimeCodeInterval_frames :: AttrLabelProxy "frames"
videoTimeCodeInterval_frames = AttrLabelProxy

#endif



#if ENABLE_OVERLOADING
instance O.HasAttributeList VideoTimeCodeInterval
type instance O.AttributeList VideoTimeCodeInterval = VideoTimeCodeIntervalAttributeList
type VideoTimeCodeIntervalAttributeList = ('[ '("hours", VideoTimeCodeIntervalHoursFieldInfo), '("minutes", VideoTimeCodeIntervalMinutesFieldInfo), '("seconds", VideoTimeCodeIntervalSecondsFieldInfo), '("frames", VideoTimeCodeIntervalFramesFieldInfo)] :: [(Symbol, *)])
#endif

-- method VideoTimeCodeInterval::new
-- method type : Constructor
-- Args : [Arg {argCName = "hours", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the hours field of #GstVideoTimeCodeInterval", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "minutes", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the minutes field of #GstVideoTimeCodeInterval", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "seconds", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the seconds field of #GstVideoTimeCodeInterval", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "frames", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the frames field of #GstVideoTimeCodeInterval", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "GstVideo", name = "VideoTimeCodeInterval"}))
-- throws : False
-- Skip return : False

foreign import ccall "gst_video_time_code_interval_new" gst_video_time_code_interval_new ::
    Word32 ->                               -- hours : TBasicType TUInt
    Word32 ->                               -- minutes : TBasicType TUInt
    Word32 ->                               -- seconds : TBasicType TUInt
    Word32 ->                               -- frames : TBasicType TUInt
    IO (Ptr VideoTimeCodeInterval)

{- |
/No description available in the introspection data./

/Since: 1.12/
-}
videoTimeCodeIntervalNew ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Word32
    {- ^ /@hours@/: the hours field of 'GI.GstVideo.Structs.VideoTimeCodeInterval.VideoTimeCodeInterval' -}
    -> Word32
    {- ^ /@minutes@/: the minutes field of 'GI.GstVideo.Structs.VideoTimeCodeInterval.VideoTimeCodeInterval' -}
    -> Word32
    {- ^ /@seconds@/: the seconds field of 'GI.GstVideo.Structs.VideoTimeCodeInterval.VideoTimeCodeInterval' -}
    -> Word32
    {- ^ /@frames@/: the frames field of 'GI.GstVideo.Structs.VideoTimeCodeInterval.VideoTimeCodeInterval' -}
    -> m VideoTimeCodeInterval
    {- ^ __Returns:__ a new 'GI.GstVideo.Structs.VideoTimeCodeInterval.VideoTimeCodeInterval' with the given values. -}
videoTimeCodeIntervalNew hours minutes seconds frames = liftIO $ do
    result <- gst_video_time_code_interval_new hours minutes seconds frames
    checkUnexpectedReturnNULL "videoTimeCodeIntervalNew" result
    result' <- (wrapBoxed VideoTimeCodeInterval) result
    return result'

#if ENABLE_OVERLOADING
#endif

-- method VideoTimeCodeInterval::new_from_string
-- method type : Constructor
-- Args : [Arg {argCName = "tc_inter_str", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The string that represents the #GstVideoTimeCodeInterval", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "GstVideo", name = "VideoTimeCodeInterval"}))
-- throws : False
-- Skip return : False

foreign import ccall "gst_video_time_code_interval_new_from_string" gst_video_time_code_interval_new_from_string ::
    CString ->                              -- tc_inter_str : TBasicType TUTF8
    IO (Ptr VideoTimeCodeInterval)

{- |
/@tcInterStr@/ must only have \":\" as separators.

/Since: 1.12/
-}
videoTimeCodeIntervalNewFromString ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    T.Text
    {- ^ /@tcInterStr@/: The string that represents the 'GI.GstVideo.Structs.VideoTimeCodeInterval.VideoTimeCodeInterval' -}
    -> m (Maybe VideoTimeCodeInterval)
    {- ^ __Returns:__ a new 'GI.GstVideo.Structs.VideoTimeCodeInterval.VideoTimeCodeInterval' from the given string
  or 'Nothing' if the string could not be passed. -}
videoTimeCodeIntervalNewFromString tcInterStr = liftIO $ do
    tcInterStr' <- textToCString tcInterStr
    result <- gst_video_time_code_interval_new_from_string tcInterStr'
    maybeResult <- convertIfNonNull result $ \result' -> do
        result'' <- (wrapBoxed VideoTimeCodeInterval) result'
        return result''
    freeMem tcInterStr'
    return maybeResult

#if ENABLE_OVERLOADING
#endif

-- method VideoTimeCodeInterval::clear
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "tc", argType = TInterface (Name {namespace = "GstVideo", name = "VideoTimeCodeInterval"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GstVideoTimeCodeInterval", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gst_video_time_code_interval_clear" gst_video_time_code_interval_clear ::
    Ptr VideoTimeCodeInterval ->            -- tc : TInterface (Name {namespace = "GstVideo", name = "VideoTimeCodeInterval"})
    IO ()

{- |
Initializes /@tc@/ with empty\/zero\/NULL values.

/Since: 1.12/
-}
videoTimeCodeIntervalClear ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    VideoTimeCodeInterval
    {- ^ /@tc@/: a 'GI.GstVideo.Structs.VideoTimeCodeInterval.VideoTimeCodeInterval' -}
    -> m ()
videoTimeCodeIntervalClear tc = liftIO $ do
    tc' <- unsafeManagedPtrGetPtr tc
    gst_video_time_code_interval_clear tc'
    touchManagedPtr tc
    return ()

#if ENABLE_OVERLOADING
data VideoTimeCodeIntervalClearMethodInfo
instance (signature ~ (m ()), MonadIO m) => O.MethodInfo VideoTimeCodeIntervalClearMethodInfo VideoTimeCodeInterval signature where
    overloadedMethod _ = videoTimeCodeIntervalClear

#endif

-- method VideoTimeCodeInterval::copy
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "tc", argType = TInterface (Name {namespace = "GstVideo", name = "VideoTimeCodeInterval"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GstVideoTimeCodeInterval", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "GstVideo", name = "VideoTimeCodeInterval"}))
-- throws : False
-- Skip return : False

foreign import ccall "gst_video_time_code_interval_copy" gst_video_time_code_interval_copy ::
    Ptr VideoTimeCodeInterval ->            -- tc : TInterface (Name {namespace = "GstVideo", name = "VideoTimeCodeInterval"})
    IO (Ptr VideoTimeCodeInterval)

{- |
/No description available in the introspection data./

/Since: 1.12/
-}
videoTimeCodeIntervalCopy ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    VideoTimeCodeInterval
    {- ^ /@tc@/: a 'GI.GstVideo.Structs.VideoTimeCodeInterval.VideoTimeCodeInterval' -}
    -> m VideoTimeCodeInterval
    {- ^ __Returns:__ a new 'GI.GstVideo.Structs.VideoTimeCodeInterval.VideoTimeCodeInterval' with the same values as /@tc@/. -}
videoTimeCodeIntervalCopy tc = liftIO $ do
    tc' <- unsafeManagedPtrGetPtr tc
    result <- gst_video_time_code_interval_copy tc'
    checkUnexpectedReturnNULL "videoTimeCodeIntervalCopy" result
    result' <- (wrapBoxed VideoTimeCodeInterval) result
    touchManagedPtr tc
    return result'

#if ENABLE_OVERLOADING
data VideoTimeCodeIntervalCopyMethodInfo
instance (signature ~ (m VideoTimeCodeInterval), MonadIO m) => O.MethodInfo VideoTimeCodeIntervalCopyMethodInfo VideoTimeCodeInterval signature where
    overloadedMethod _ = videoTimeCodeIntervalCopy

#endif

-- method VideoTimeCodeInterval::free
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "tc", argType = TInterface (Name {namespace = "GstVideo", name = "VideoTimeCodeInterval"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GstVideoTimeCodeInterval", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gst_video_time_code_interval_free" gst_video_time_code_interval_free ::
    Ptr VideoTimeCodeInterval ->            -- tc : TInterface (Name {namespace = "GstVideo", name = "VideoTimeCodeInterval"})
    IO ()

{- |
Frees /@tc@/.

/Since: 1.12/
-}
videoTimeCodeIntervalFree ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    VideoTimeCodeInterval
    {- ^ /@tc@/: a 'GI.GstVideo.Structs.VideoTimeCodeInterval.VideoTimeCodeInterval' -}
    -> m ()
videoTimeCodeIntervalFree tc = liftIO $ do
    tc' <- unsafeManagedPtrGetPtr tc
    gst_video_time_code_interval_free tc'
    touchManagedPtr tc
    return ()

#if ENABLE_OVERLOADING
data VideoTimeCodeIntervalFreeMethodInfo
instance (signature ~ (m ()), MonadIO m) => O.MethodInfo VideoTimeCodeIntervalFreeMethodInfo VideoTimeCodeInterval signature where
    overloadedMethod _ = videoTimeCodeIntervalFree

#endif

-- method VideoTimeCodeInterval::init
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "tc", argType = TInterface (Name {namespace = "GstVideo", name = "VideoTimeCodeInterval"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GstVideoTimeCodeInterval", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "hours", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the hours field of #GstVideoTimeCodeInterval", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "minutes", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the minutes field of #GstVideoTimeCodeInterval", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "seconds", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the seconds field of #GstVideoTimeCodeInterval", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "frames", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the frames field of #GstVideoTimeCodeInterval", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gst_video_time_code_interval_init" gst_video_time_code_interval_init ::
    Ptr VideoTimeCodeInterval ->            -- tc : TInterface (Name {namespace = "GstVideo", name = "VideoTimeCodeInterval"})
    Word32 ->                               -- hours : TBasicType TUInt
    Word32 ->                               -- minutes : TBasicType TUInt
    Word32 ->                               -- seconds : TBasicType TUInt
    Word32 ->                               -- frames : TBasicType TUInt
    IO ()

{- |
Initializes /@tc@/ with the given values.

/Since: 1.12/
-}
videoTimeCodeIntervalInit ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    VideoTimeCodeInterval
    {- ^ /@tc@/: a 'GI.GstVideo.Structs.VideoTimeCodeInterval.VideoTimeCodeInterval' -}
    -> Word32
    {- ^ /@hours@/: the hours field of 'GI.GstVideo.Structs.VideoTimeCodeInterval.VideoTimeCodeInterval' -}
    -> Word32
    {- ^ /@minutes@/: the minutes field of 'GI.GstVideo.Structs.VideoTimeCodeInterval.VideoTimeCodeInterval' -}
    -> Word32
    {- ^ /@seconds@/: the seconds field of 'GI.GstVideo.Structs.VideoTimeCodeInterval.VideoTimeCodeInterval' -}
    -> Word32
    {- ^ /@frames@/: the frames field of 'GI.GstVideo.Structs.VideoTimeCodeInterval.VideoTimeCodeInterval' -}
    -> m ()
videoTimeCodeIntervalInit tc hours minutes seconds frames = liftIO $ do
    tc' <- unsafeManagedPtrGetPtr tc
    gst_video_time_code_interval_init tc' hours minutes seconds frames
    touchManagedPtr tc
    return ()

#if ENABLE_OVERLOADING
data VideoTimeCodeIntervalInitMethodInfo
instance (signature ~ (Word32 -> Word32 -> Word32 -> Word32 -> m ()), MonadIO m) => O.MethodInfo VideoTimeCodeIntervalInitMethodInfo VideoTimeCodeInterval signature where
    overloadedMethod _ = videoTimeCodeIntervalInit

#endif

#if ENABLE_OVERLOADING
type family ResolveVideoTimeCodeIntervalMethod (t :: Symbol) (o :: *) :: * where
    ResolveVideoTimeCodeIntervalMethod "clear" o = VideoTimeCodeIntervalClearMethodInfo
    ResolveVideoTimeCodeIntervalMethod "copy" o = VideoTimeCodeIntervalCopyMethodInfo
    ResolveVideoTimeCodeIntervalMethod "free" o = VideoTimeCodeIntervalFreeMethodInfo
    ResolveVideoTimeCodeIntervalMethod "init" o = VideoTimeCodeIntervalInitMethodInfo
    ResolveVideoTimeCodeIntervalMethod l o = O.MethodResolutionFailed l o

instance (info ~ ResolveVideoTimeCodeIntervalMethod t VideoTimeCodeInterval, O.MethodInfo info VideoTimeCodeInterval p) => OL.IsLabel t (VideoTimeCodeInterval -> p) where
#if MIN_VERSION_base(4,10,0)
    fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#else
    fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#endif

#endif