#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \
&& !defined(__HADDOCK_VERSION__))
module GI.GstVideo.Structs.VideoCropMeta
(
VideoCropMeta(..) ,
newZeroVideoCropMeta ,
noVideoCropMeta ,
videoCropMetaGetInfo ,
getVideoCropMetaHeight ,
setVideoCropMetaHeight ,
#if ENABLE_OVERLOADING
videoCropMeta_height ,
#endif
getVideoCropMetaMeta ,
#if ENABLE_OVERLOADING
videoCropMeta_meta ,
#endif
getVideoCropMetaWidth ,
setVideoCropMetaWidth ,
#if ENABLE_OVERLOADING
videoCropMeta_width ,
#endif
getVideoCropMetaX ,
setVideoCropMetaX ,
#if ENABLE_OVERLOADING
videoCropMeta_x ,
#endif
getVideoCropMetaY ,
setVideoCropMetaY ,
#if ENABLE_OVERLOADING
videoCropMeta_y ,
#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
import qualified GI.Gst.Structs.Meta as Gst.Meta
import qualified GI.Gst.Structs.MetaInfo as Gst.MetaInfo
newtype VideoCropMeta = VideoCropMeta (ManagedPtr VideoCropMeta)
instance WrappedPtr VideoCropMeta where
wrappedPtrCalloc = callocBytes 32
wrappedPtrCopy = \p -> withManagedPtr p (copyBytes 32 >=> wrapPtr VideoCropMeta)
wrappedPtrFree = Just ptr_to_g_free
newZeroVideoCropMeta :: MonadIO m => m VideoCropMeta
newZeroVideoCropMeta = liftIO $ wrappedPtrCalloc >>= wrapPtr VideoCropMeta
instance tag ~ 'AttrSet => Constructible VideoCropMeta tag where
new _ attrs = do
o <- newZeroVideoCropMeta
GI.Attributes.set o attrs
return o
noVideoCropMeta :: Maybe VideoCropMeta
noVideoCropMeta = Nothing
getVideoCropMetaMeta :: MonadIO m => VideoCropMeta -> m Gst.Meta.Meta
getVideoCropMetaMeta s = liftIO $ withManagedPtr s $ \ptr -> do
let val = ptr `plusPtr` 0 :: (Ptr Gst.Meta.Meta)
val' <- (newPtr Gst.Meta.Meta) val
return val'
#if ENABLE_OVERLOADING
data VideoCropMetaMetaFieldInfo
instance AttrInfo VideoCropMetaMetaFieldInfo where
type AttrAllowedOps VideoCropMetaMetaFieldInfo = '[ 'AttrGet]
type AttrSetTypeConstraint VideoCropMetaMetaFieldInfo = (~) (Ptr Gst.Meta.Meta)
type AttrBaseTypeConstraint VideoCropMetaMetaFieldInfo = (~) VideoCropMeta
type AttrGetType VideoCropMetaMetaFieldInfo = Gst.Meta.Meta
type AttrLabel VideoCropMetaMetaFieldInfo = "meta"
type AttrOrigin VideoCropMetaMetaFieldInfo = VideoCropMeta
attrGet _ = getVideoCropMetaMeta
attrSet _ = undefined
attrConstruct = undefined
attrClear _ = undefined
videoCropMeta_meta :: AttrLabelProxy "meta"
videoCropMeta_meta = AttrLabelProxy
#endif
getVideoCropMetaX :: MonadIO m => VideoCropMeta -> m Word32
getVideoCropMetaX s = liftIO $ withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 16) :: IO Word32
return val
setVideoCropMetaX :: MonadIO m => VideoCropMeta -> Word32 -> m ()
setVideoCropMetaX s val = liftIO $ withManagedPtr s $ \ptr -> do
poke (ptr `plusPtr` 16) (val :: Word32)
#if ENABLE_OVERLOADING
data VideoCropMetaXFieldInfo
instance AttrInfo VideoCropMetaXFieldInfo where
type AttrAllowedOps VideoCropMetaXFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint VideoCropMetaXFieldInfo = (~) Word32
type AttrBaseTypeConstraint VideoCropMetaXFieldInfo = (~) VideoCropMeta
type AttrGetType VideoCropMetaXFieldInfo = Word32
type AttrLabel VideoCropMetaXFieldInfo = "x"
type AttrOrigin VideoCropMetaXFieldInfo = VideoCropMeta
attrGet _ = getVideoCropMetaX
attrSet _ = setVideoCropMetaX
attrConstruct = undefined
attrClear _ = undefined
videoCropMeta_x :: AttrLabelProxy "x"
videoCropMeta_x = AttrLabelProxy
#endif
getVideoCropMetaY :: MonadIO m => VideoCropMeta -> m Word32
getVideoCropMetaY s = liftIO $ withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 20) :: IO Word32
return val
setVideoCropMetaY :: MonadIO m => VideoCropMeta -> Word32 -> m ()
setVideoCropMetaY s val = liftIO $ withManagedPtr s $ \ptr -> do
poke (ptr `plusPtr` 20) (val :: Word32)
#if ENABLE_OVERLOADING
data VideoCropMetaYFieldInfo
instance AttrInfo VideoCropMetaYFieldInfo where
type AttrAllowedOps VideoCropMetaYFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint VideoCropMetaYFieldInfo = (~) Word32
type AttrBaseTypeConstraint VideoCropMetaYFieldInfo = (~) VideoCropMeta
type AttrGetType VideoCropMetaYFieldInfo = Word32
type AttrLabel VideoCropMetaYFieldInfo = "y"
type AttrOrigin VideoCropMetaYFieldInfo = VideoCropMeta
attrGet _ = getVideoCropMetaY
attrSet _ = setVideoCropMetaY
attrConstruct = undefined
attrClear _ = undefined
videoCropMeta_y :: AttrLabelProxy "y"
videoCropMeta_y = AttrLabelProxy
#endif
getVideoCropMetaWidth :: MonadIO m => VideoCropMeta -> m Word32
getVideoCropMetaWidth s = liftIO $ withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 24) :: IO Word32
return val
setVideoCropMetaWidth :: MonadIO m => VideoCropMeta -> Word32 -> m ()
setVideoCropMetaWidth s val = liftIO $ withManagedPtr s $ \ptr -> do
poke (ptr `plusPtr` 24) (val :: Word32)
#if ENABLE_OVERLOADING
data VideoCropMetaWidthFieldInfo
instance AttrInfo VideoCropMetaWidthFieldInfo where
type AttrAllowedOps VideoCropMetaWidthFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint VideoCropMetaWidthFieldInfo = (~) Word32
type AttrBaseTypeConstraint VideoCropMetaWidthFieldInfo = (~) VideoCropMeta
type AttrGetType VideoCropMetaWidthFieldInfo = Word32
type AttrLabel VideoCropMetaWidthFieldInfo = "width"
type AttrOrigin VideoCropMetaWidthFieldInfo = VideoCropMeta
attrGet _ = getVideoCropMetaWidth
attrSet _ = setVideoCropMetaWidth
attrConstruct = undefined
attrClear _ = undefined
videoCropMeta_width :: AttrLabelProxy "width"
videoCropMeta_width = AttrLabelProxy
#endif
getVideoCropMetaHeight :: MonadIO m => VideoCropMeta -> m Word32
getVideoCropMetaHeight s = liftIO $ withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 28) :: IO Word32
return val
setVideoCropMetaHeight :: MonadIO m => VideoCropMeta -> Word32 -> m ()
setVideoCropMetaHeight s val = liftIO $ withManagedPtr s $ \ptr -> do
poke (ptr `plusPtr` 28) (val :: Word32)
#if ENABLE_OVERLOADING
data VideoCropMetaHeightFieldInfo
instance AttrInfo VideoCropMetaHeightFieldInfo where
type AttrAllowedOps VideoCropMetaHeightFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint VideoCropMetaHeightFieldInfo = (~) Word32
type AttrBaseTypeConstraint VideoCropMetaHeightFieldInfo = (~) VideoCropMeta
type AttrGetType VideoCropMetaHeightFieldInfo = Word32
type AttrLabel VideoCropMetaHeightFieldInfo = "height"
type AttrOrigin VideoCropMetaHeightFieldInfo = VideoCropMeta
attrGet _ = getVideoCropMetaHeight
attrSet _ = setVideoCropMetaHeight
attrConstruct = undefined
attrClear _ = undefined
videoCropMeta_height :: AttrLabelProxy "height"
videoCropMeta_height = AttrLabelProxy
#endif
#if ENABLE_OVERLOADING
instance O.HasAttributeList VideoCropMeta
type instance O.AttributeList VideoCropMeta = VideoCropMetaAttributeList
type VideoCropMetaAttributeList = ('[ '("meta", VideoCropMetaMetaFieldInfo), '("x", VideoCropMetaXFieldInfo), '("y", VideoCropMetaYFieldInfo), '("width", VideoCropMetaWidthFieldInfo), '("height", VideoCropMetaHeightFieldInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "gst_video_crop_meta_get_info" gst_video_crop_meta_get_info ::
IO (Ptr Gst.MetaInfo.MetaInfo)
videoCropMetaGetInfo ::
(B.CallStack.HasCallStack, MonadIO m) =>
m Gst.MetaInfo.MetaInfo
videoCropMetaGetInfo = liftIO $ do
result <- gst_video_crop_meta_get_info
checkUnexpectedReturnNULL "videoCropMetaGetInfo" result
result' <- (newPtr Gst.MetaInfo.MetaInfo) result
return result'
#if ENABLE_OVERLOADING
#endif
#if ENABLE_OVERLOADING
type family ResolveVideoCropMetaMethod (t :: Symbol) (o :: *) :: * where
ResolveVideoCropMetaMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveVideoCropMetaMethod t VideoCropMeta, O.MethodInfo info VideoCropMeta p) => OL.IsLabel t (VideoCropMeta -> 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