{-# LANGUAGE TypeApplications #-}


-- | Copyright  : Will Thompson, Iñaki García Etxebarria and Jonas Platte
-- License    : LGPL-2.1
-- Maintainer : Iñaki García Etxebarria
-- 
-- The interface allows unified access to control flipping and autocenter
-- operation of video-sources or operators.

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

module GI.GstVideo.Interfaces.VideoOrientation
    ( 

-- * Exported types
    VideoOrientation(..)                    ,
    IsVideoOrientation                      ,


 -- * Methods
-- ** Overloaded methods #method:Overloaded methods#

#if defined(ENABLE_OVERLOADING)
    ResolveVideoOrientationMethod           ,
#endif


-- ** getHcenter #method:getHcenter#

#if defined(ENABLE_OVERLOADING)
    VideoOrientationGetHcenterMethodInfo    ,
#endif
    videoOrientationGetHcenter              ,


-- ** getHflip #method:getHflip#

#if defined(ENABLE_OVERLOADING)
    VideoOrientationGetHflipMethodInfo      ,
#endif
    videoOrientationGetHflip                ,


-- ** getVcenter #method:getVcenter#

#if defined(ENABLE_OVERLOADING)
    VideoOrientationGetVcenterMethodInfo    ,
#endif
    videoOrientationGetVcenter              ,


-- ** getVflip #method:getVflip#

#if defined(ENABLE_OVERLOADING)
    VideoOrientationGetVflipMethodInfo      ,
#endif
    videoOrientationGetVflip                ,


-- ** setHcenter #method:setHcenter#

#if defined(ENABLE_OVERLOADING)
    VideoOrientationSetHcenterMethodInfo    ,
#endif
    videoOrientationSetHcenter              ,


-- ** setHflip #method:setHflip#

#if defined(ENABLE_OVERLOADING)
    VideoOrientationSetHflipMethodInfo      ,
#endif
    videoOrientationSetHflip                ,


-- ** setVcenter #method:setVcenter#

#if defined(ENABLE_OVERLOADING)
    VideoOrientationSetVcenterMethodInfo    ,
#endif
    videoOrientationSetVcenter              ,


-- ** setVflip #method:setVflip#

#if defined(ENABLE_OVERLOADING)
    VideoOrientationSetVflipMethodInfo      ,
#endif
    videoOrientationSetVflip                ,




    ) 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.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.GI.Base.Signals as B.Signals
import qualified Control.Monad.IO.Class as MIO
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


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

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

-- | Type class for types which implement `VideoOrientation`.
class (ManagedPtrNewtype o, O.IsDescendantOf VideoOrientation o) => IsVideoOrientation o
instance (ManagedPtrNewtype o, O.IsDescendantOf VideoOrientation o) => IsVideoOrientation o
-- XXX Wrapping a foreign struct/union with no known destructor or size, leak?
instance BoxedPtr VideoOrientation where
    boxedPtrCopy :: VideoOrientation -> IO VideoOrientation
boxedPtrCopy = VideoOrientation -> IO VideoOrientation
forall (m :: * -> *) a. Monad m => a -> m a
return
    boxedPtrFree :: VideoOrientation -> IO ()
boxedPtrFree = \VideoOrientation
_x -> () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()


#if defined(ENABLE_OVERLOADING)
type family ResolveVideoOrientationMethod (t :: Symbol) (o :: *) :: * where
    ResolveVideoOrientationMethod "getHcenter" o = VideoOrientationGetHcenterMethodInfo
    ResolveVideoOrientationMethod "getHflip" o = VideoOrientationGetHflipMethodInfo
    ResolveVideoOrientationMethod "getVcenter" o = VideoOrientationGetVcenterMethodInfo
    ResolveVideoOrientationMethod "getVflip" o = VideoOrientationGetVflipMethodInfo
    ResolveVideoOrientationMethod "setHcenter" o = VideoOrientationSetHcenterMethodInfo
    ResolveVideoOrientationMethod "setHflip" o = VideoOrientationSetHflipMethodInfo
    ResolveVideoOrientationMethod "setVcenter" o = VideoOrientationSetVcenterMethodInfo
    ResolveVideoOrientationMethod "setVflip" o = VideoOrientationSetVflipMethodInfo
    ResolveVideoOrientationMethod l o = O.MethodResolutionFailed l o

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

#endif

-- method VideoOrientation::get_hcenter
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "video_orientation"
--           , argType =
--               TInterface
--                 Name { namespace = "GstVideo" , name = "VideoOrientation" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "#GstVideoOrientation interface of a #GstElement"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "center"
--           , argType = TBasicType TInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "return location for the result"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "gst_video_orientation_get_hcenter" gst_video_orientation_get_hcenter :: 
    Ptr VideoOrientation ->                 -- video_orientation : TInterface (Name {namespace = "GstVideo", name = "VideoOrientation"})
    Ptr Int32 ->                            -- center : TBasicType TInt
    IO CInt

-- | Get the horizontal centering offset from the given object.
videoOrientationGetHcenter ::
    (B.CallStack.HasCallStack, MonadIO m, IsVideoOrientation a) =>
    a
    -- ^ /@videoOrientation@/: t'GI.GstVideo.Interfaces.VideoOrientation.VideoOrientation' interface of a t'GI.Gst.Objects.Element.Element'
    -> m ((Bool, Int32))
    -- ^ __Returns:__ 'P.True' in case the element supports centering
videoOrientationGetHcenter :: a -> m (Bool, Int32)
videoOrientationGetHcenter a
videoOrientation = IO (Bool, Int32) -> m (Bool, Int32)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Bool, Int32) -> m (Bool, Int32))
-> IO (Bool, Int32) -> m (Bool, Int32)
forall a b. (a -> b) -> a -> b
$ do
    Ptr VideoOrientation
videoOrientation' <- a -> IO (Ptr VideoOrientation)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
videoOrientation
    Ptr Int32
center <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
    CInt
result <- Ptr VideoOrientation -> Ptr Int32 -> IO CInt
gst_video_orientation_get_hcenter Ptr VideoOrientation
videoOrientation' Ptr Int32
center
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    Int32
center' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
center
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
videoOrientation
    Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
center
    (Bool, Int32) -> IO (Bool, Int32)
forall (m :: * -> *) a. Monad m => a -> m a
return (Bool
result', Int32
center')

#if defined(ENABLE_OVERLOADING)
data VideoOrientationGetHcenterMethodInfo
instance (signature ~ (m ((Bool, Int32))), MonadIO m, IsVideoOrientation a) => O.MethodInfo VideoOrientationGetHcenterMethodInfo a signature where
    overloadedMethod = videoOrientationGetHcenter

#endif

-- method VideoOrientation::get_hflip
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "video_orientation"
--           , argType =
--               TInterface
--                 Name { namespace = "GstVideo" , name = "VideoOrientation" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "#GstVideoOrientation interface of a #GstElement"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "flip"
--           , argType = TBasicType TBoolean
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "return location for the result"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "gst_video_orientation_get_hflip" gst_video_orientation_get_hflip :: 
    Ptr VideoOrientation ->                 -- video_orientation : TInterface (Name {namespace = "GstVideo", name = "VideoOrientation"})
    Ptr CInt ->                             -- flip : TBasicType TBoolean
    IO CInt

-- | Get the horizontal flipping state ('P.True' for flipped) from the given object.
videoOrientationGetHflip ::
    (B.CallStack.HasCallStack, MonadIO m, IsVideoOrientation a) =>
    a
    -- ^ /@videoOrientation@/: t'GI.GstVideo.Interfaces.VideoOrientation.VideoOrientation' interface of a t'GI.Gst.Objects.Element.Element'
    -> m ((Bool, Bool))
    -- ^ __Returns:__ 'P.True' in case the element supports flipping
videoOrientationGetHflip :: a -> m (Bool, Bool)
videoOrientationGetHflip a
videoOrientation = IO (Bool, Bool) -> m (Bool, Bool)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Bool, Bool) -> m (Bool, Bool))
-> IO (Bool, Bool) -> m (Bool, Bool)
forall a b. (a -> b) -> a -> b
$ do
    Ptr VideoOrientation
videoOrientation' <- a -> IO (Ptr VideoOrientation)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
videoOrientation
    Ptr CInt
flip <- IO (Ptr CInt)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr CInt)
    CInt
result <- Ptr VideoOrientation -> Ptr CInt -> IO CInt
gst_video_orientation_get_hflip Ptr VideoOrientation
videoOrientation' Ptr CInt
flip
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    CInt
flip' <- Ptr CInt -> IO CInt
forall a. Storable a => Ptr a -> IO a
peek Ptr CInt
flip
    let flip'' :: Bool
flip'' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
flip'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
videoOrientation
    Ptr CInt -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CInt
flip
    (Bool, Bool) -> IO (Bool, Bool)
forall (m :: * -> *) a. Monad m => a -> m a
return (Bool
result', Bool
flip'')

#if defined(ENABLE_OVERLOADING)
data VideoOrientationGetHflipMethodInfo
instance (signature ~ (m ((Bool, Bool))), MonadIO m, IsVideoOrientation a) => O.MethodInfo VideoOrientationGetHflipMethodInfo a signature where
    overloadedMethod = videoOrientationGetHflip

#endif

-- method VideoOrientation::get_vcenter
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "video_orientation"
--           , argType =
--               TInterface
--                 Name { namespace = "GstVideo" , name = "VideoOrientation" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "#GstVideoOrientation interface of a #GstElement"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "center"
--           , argType = TBasicType TInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "return location for the result"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "gst_video_orientation_get_vcenter" gst_video_orientation_get_vcenter :: 
    Ptr VideoOrientation ->                 -- video_orientation : TInterface (Name {namespace = "GstVideo", name = "VideoOrientation"})
    Ptr Int32 ->                            -- center : TBasicType TInt
    IO CInt

-- | Get the vertical centering offset from the given object.
videoOrientationGetVcenter ::
    (B.CallStack.HasCallStack, MonadIO m, IsVideoOrientation a) =>
    a
    -- ^ /@videoOrientation@/: t'GI.GstVideo.Interfaces.VideoOrientation.VideoOrientation' interface of a t'GI.Gst.Objects.Element.Element'
    -> m ((Bool, Int32))
    -- ^ __Returns:__ 'P.True' in case the element supports centering
videoOrientationGetVcenter :: a -> m (Bool, Int32)
videoOrientationGetVcenter a
videoOrientation = IO (Bool, Int32) -> m (Bool, Int32)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Bool, Int32) -> m (Bool, Int32))
-> IO (Bool, Int32) -> m (Bool, Int32)
forall a b. (a -> b) -> a -> b
$ do
    Ptr VideoOrientation
videoOrientation' <- a -> IO (Ptr VideoOrientation)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
videoOrientation
    Ptr Int32
center <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
    CInt
result <- Ptr VideoOrientation -> Ptr Int32 -> IO CInt
gst_video_orientation_get_vcenter Ptr VideoOrientation
videoOrientation' Ptr Int32
center
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    Int32
center' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
center
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
videoOrientation
    Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
center
    (Bool, Int32) -> IO (Bool, Int32)
forall (m :: * -> *) a. Monad m => a -> m a
return (Bool
result', Int32
center')

#if defined(ENABLE_OVERLOADING)
data VideoOrientationGetVcenterMethodInfo
instance (signature ~ (m ((Bool, Int32))), MonadIO m, IsVideoOrientation a) => O.MethodInfo VideoOrientationGetVcenterMethodInfo a signature where
    overloadedMethod = videoOrientationGetVcenter

#endif

-- method VideoOrientation::get_vflip
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "video_orientation"
--           , argType =
--               TInterface
--                 Name { namespace = "GstVideo" , name = "VideoOrientation" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "#GstVideoOrientation interface of a #GstElement"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "flip"
--           , argType = TBasicType TBoolean
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "return location for the result"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "gst_video_orientation_get_vflip" gst_video_orientation_get_vflip :: 
    Ptr VideoOrientation ->                 -- video_orientation : TInterface (Name {namespace = "GstVideo", name = "VideoOrientation"})
    Ptr CInt ->                             -- flip : TBasicType TBoolean
    IO CInt

-- | Get the vertical flipping state ('P.True' for flipped) from the given object.
videoOrientationGetVflip ::
    (B.CallStack.HasCallStack, MonadIO m, IsVideoOrientation a) =>
    a
    -- ^ /@videoOrientation@/: t'GI.GstVideo.Interfaces.VideoOrientation.VideoOrientation' interface of a t'GI.Gst.Objects.Element.Element'
    -> m ((Bool, Bool))
    -- ^ __Returns:__ 'P.True' in case the element supports flipping
videoOrientationGetVflip :: a -> m (Bool, Bool)
videoOrientationGetVflip a
videoOrientation = IO (Bool, Bool) -> m (Bool, Bool)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Bool, Bool) -> m (Bool, Bool))
-> IO (Bool, Bool) -> m (Bool, Bool)
forall a b. (a -> b) -> a -> b
$ do
    Ptr VideoOrientation
videoOrientation' <- a -> IO (Ptr VideoOrientation)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
videoOrientation
    Ptr CInt
flip <- IO (Ptr CInt)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr CInt)
    CInt
result <- Ptr VideoOrientation -> Ptr CInt -> IO CInt
gst_video_orientation_get_vflip Ptr VideoOrientation
videoOrientation' Ptr CInt
flip
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    CInt
flip' <- Ptr CInt -> IO CInt
forall a. Storable a => Ptr a -> IO a
peek Ptr CInt
flip
    let flip'' :: Bool
flip'' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
flip'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
videoOrientation
    Ptr CInt -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CInt
flip
    (Bool, Bool) -> IO (Bool, Bool)
forall (m :: * -> *) a. Monad m => a -> m a
return (Bool
result', Bool
flip'')

#if defined(ENABLE_OVERLOADING)
data VideoOrientationGetVflipMethodInfo
instance (signature ~ (m ((Bool, Bool))), MonadIO m, IsVideoOrientation a) => O.MethodInfo VideoOrientationGetVflipMethodInfo a signature where
    overloadedMethod = videoOrientationGetVflip

#endif

-- method VideoOrientation::set_hcenter
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "video_orientation"
--           , argType =
--               TInterface
--                 Name { namespace = "GstVideo" , name = "VideoOrientation" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "#GstVideoOrientation interface of a #GstElement"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "center"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "centering offset" , 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 "gst_video_orientation_set_hcenter" gst_video_orientation_set_hcenter :: 
    Ptr VideoOrientation ->                 -- video_orientation : TInterface (Name {namespace = "GstVideo", name = "VideoOrientation"})
    Int32 ->                                -- center : TBasicType TInt
    IO CInt

-- | Set the horizontal centering offset for the given object.
videoOrientationSetHcenter ::
    (B.CallStack.HasCallStack, MonadIO m, IsVideoOrientation a) =>
    a
    -- ^ /@videoOrientation@/: t'GI.GstVideo.Interfaces.VideoOrientation.VideoOrientation' interface of a t'GI.Gst.Objects.Element.Element'
    -> Int32
    -- ^ /@center@/: centering offset
    -> m Bool
    -- ^ __Returns:__ 'P.True' in case the element supports centering
videoOrientationSetHcenter :: a -> Int32 -> m Bool
videoOrientationSetHcenter a
videoOrientation Int32
center = IO Bool -> m Bool
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 VideoOrientation
videoOrientation' <- a -> IO (Ptr VideoOrientation)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
videoOrientation
    CInt
result <- Ptr VideoOrientation -> Int32 -> IO CInt
gst_video_orientation_set_hcenter Ptr VideoOrientation
videoOrientation' Int32
center
    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
videoOrientation
    Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data VideoOrientationSetHcenterMethodInfo
instance (signature ~ (Int32 -> m Bool), MonadIO m, IsVideoOrientation a) => O.MethodInfo VideoOrientationSetHcenterMethodInfo a signature where
    overloadedMethod = videoOrientationSetHcenter

#endif

-- method VideoOrientation::set_hflip
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "video_orientation"
--           , argType =
--               TInterface
--                 Name { namespace = "GstVideo" , name = "VideoOrientation" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "#GstVideoOrientation interface of a #GstElement"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "flip"
--           , argType = TBasicType TBoolean
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "use flipping" , 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 "gst_video_orientation_set_hflip" gst_video_orientation_set_hflip :: 
    Ptr VideoOrientation ->                 -- video_orientation : TInterface (Name {namespace = "GstVideo", name = "VideoOrientation"})
    CInt ->                                 -- flip : TBasicType TBoolean
    IO CInt

-- | Set the horizontal flipping state ('P.True' for flipped) for the given object.
videoOrientationSetHflip ::
    (B.CallStack.HasCallStack, MonadIO m, IsVideoOrientation a) =>
    a
    -- ^ /@videoOrientation@/: t'GI.GstVideo.Interfaces.VideoOrientation.VideoOrientation' interface of a t'GI.Gst.Objects.Element.Element'
    -> Bool
    -- ^ /@flip@/: use flipping
    -> m Bool
    -- ^ __Returns:__ 'P.True' in case the element supports flipping
videoOrientationSetHflip :: a -> Bool -> m Bool
videoOrientationSetHflip a
videoOrientation Bool
flip = IO Bool -> m Bool
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 VideoOrientation
videoOrientation' <- a -> IO (Ptr VideoOrientation)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
videoOrientation
    let flip' :: CInt
flip' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
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
fromEnum) Bool
flip
    CInt
result <- Ptr VideoOrientation -> CInt -> IO CInt
gst_video_orientation_set_hflip Ptr VideoOrientation
videoOrientation' CInt
flip'
    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
videoOrientation
    Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data VideoOrientationSetHflipMethodInfo
instance (signature ~ (Bool -> m Bool), MonadIO m, IsVideoOrientation a) => O.MethodInfo VideoOrientationSetHflipMethodInfo a signature where
    overloadedMethod = videoOrientationSetHflip

#endif

-- method VideoOrientation::set_vcenter
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "video_orientation"
--           , argType =
--               TInterface
--                 Name { namespace = "GstVideo" , name = "VideoOrientation" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "#GstVideoOrientation interface of a #GstElement"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "center"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "centering offset" , 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 "gst_video_orientation_set_vcenter" gst_video_orientation_set_vcenter :: 
    Ptr VideoOrientation ->                 -- video_orientation : TInterface (Name {namespace = "GstVideo", name = "VideoOrientation"})
    Int32 ->                                -- center : TBasicType TInt
    IO CInt

-- | Set the vertical centering offset for the given object.
videoOrientationSetVcenter ::
    (B.CallStack.HasCallStack, MonadIO m, IsVideoOrientation a) =>
    a
    -- ^ /@videoOrientation@/: t'GI.GstVideo.Interfaces.VideoOrientation.VideoOrientation' interface of a t'GI.Gst.Objects.Element.Element'
    -> Int32
    -- ^ /@center@/: centering offset
    -> m Bool
    -- ^ __Returns:__ 'P.True' in case the element supports centering
videoOrientationSetVcenter :: a -> Int32 -> m Bool
videoOrientationSetVcenter a
videoOrientation Int32
center = IO Bool -> m Bool
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 VideoOrientation
videoOrientation' <- a -> IO (Ptr VideoOrientation)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
videoOrientation
    CInt
result <- Ptr VideoOrientation -> Int32 -> IO CInt
gst_video_orientation_set_vcenter Ptr VideoOrientation
videoOrientation' Int32
center
    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
videoOrientation
    Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data VideoOrientationSetVcenterMethodInfo
instance (signature ~ (Int32 -> m Bool), MonadIO m, IsVideoOrientation a) => O.MethodInfo VideoOrientationSetVcenterMethodInfo a signature where
    overloadedMethod = videoOrientationSetVcenter

#endif

-- method VideoOrientation::set_vflip
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "video_orientation"
--           , argType =
--               TInterface
--                 Name { namespace = "GstVideo" , name = "VideoOrientation" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "#GstVideoOrientation interface of a #GstElement"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "flip"
--           , argType = TBasicType TBoolean
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "use flipping" , 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 "gst_video_orientation_set_vflip" gst_video_orientation_set_vflip :: 
    Ptr VideoOrientation ->                 -- video_orientation : TInterface (Name {namespace = "GstVideo", name = "VideoOrientation"})
    CInt ->                                 -- flip : TBasicType TBoolean
    IO CInt

-- | Set the vertical flipping state ('P.True' for flipped) for the given object.
videoOrientationSetVflip ::
    (B.CallStack.HasCallStack, MonadIO m, IsVideoOrientation a) =>
    a
    -- ^ /@videoOrientation@/: t'GI.GstVideo.Interfaces.VideoOrientation.VideoOrientation' interface of a t'GI.Gst.Objects.Element.Element'
    -> Bool
    -- ^ /@flip@/: use flipping
    -> m Bool
    -- ^ __Returns:__ 'P.True' in case the element supports flipping
videoOrientationSetVflip :: a -> Bool -> m Bool
videoOrientationSetVflip a
videoOrientation Bool
flip = IO Bool -> m Bool
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 VideoOrientation
videoOrientation' <- a -> IO (Ptr VideoOrientation)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
videoOrientation
    let flip' :: CInt
flip' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
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
fromEnum) Bool
flip
    CInt
result <- Ptr VideoOrientation -> CInt -> IO CInt
gst_video_orientation_set_vflip Ptr VideoOrientation
videoOrientation' CInt
flip'
    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
videoOrientation
    Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data VideoOrientationSetVflipMethodInfo
instance (signature ~ (Bool -> m Bool), MonadIO m, IsVideoOrientation a) => O.MethodInfo VideoOrientationSetVflipMethodInfo a signature where
    overloadedMethod = videoOrientationSetVflip

#endif

#if defined(ENABLE_OVERLOADING)
type instance O.SignalList VideoOrientation = VideoOrientationSignalList
type VideoOrientationSignalList = ('[ ] :: [(Symbol, *)])

#endif