-- | Copyright  : Will Thompson and Iñaki García Etxebarria
-- License    : LGPL-2.1
-- Maintainer : Iñaki García Etxebarria

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

module GI.GES.Flags
    ( 

 -- * Flags


-- ** MarkerFlags #flag:MarkerFlags#

    MarkerFlags(..)                         ,


-- ** MetaFlag #flag:MetaFlag#

    MetaFlag(..)                            ,


-- ** PipelineFlags #flag:PipelineFlags#

    PipelineFlags(..)                       ,


-- ** TrackType #flag:TrackType#

    TrackType(..)                           ,




    ) where

import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P

import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.BasicTypes as B.Types
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GArray as B.GArray
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GHashTable as B.GHT
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Control.Monad.IO.Class as MIO
import qualified Data.Coerce as Coerce
import qualified Data.Text as T
import qualified Data.Kind as DK
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GHC.Records as R


-- Flags TrackType
-- | Types of content handled by a track. If the content is not one of
-- /@gESTRACKTYPEAUDIO@/, /@gESTRACKTYPEVIDEO@/ or /@gESTRACKTYPETEXT@/,
-- the user of the t'GI.GES.Objects.Track.Track' must set the type to /@gESTRACKTYPECUSTOM@/.
-- 
-- /@gESTRACKTYPEUNKNOWN@/ is for internal purposes and should not be used
-- by users
data TrackType = 
      TrackTypeUnknown
    -- ^ A track of unknown type (i.e. invalid)
    | TrackTypeAudio
    -- ^ An audio track
    | TrackTypeVideo
    -- ^ A video track
    | TrackTypeText
    -- ^ A text (subtitle) track
    | TrackTypeCustom
    -- ^ A custom-content track
    | AnotherTrackType Int
    -- ^ Catch-all for unknown values
    deriving (Int -> TrackType -> ShowS
[TrackType] -> ShowS
TrackType -> String
(Int -> TrackType -> ShowS)
-> (TrackType -> String)
-> ([TrackType] -> ShowS)
-> Show TrackType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> TrackType -> ShowS
showsPrec :: Int -> TrackType -> ShowS
$cshow :: TrackType -> String
show :: TrackType -> String
$cshowList :: [TrackType] -> ShowS
showList :: [TrackType] -> ShowS
Show, TrackType -> TrackType -> Bool
(TrackType -> TrackType -> Bool)
-> (TrackType -> TrackType -> Bool) -> Eq TrackType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TrackType -> TrackType -> Bool
== :: TrackType -> TrackType -> Bool
$c/= :: TrackType -> TrackType -> Bool
/= :: TrackType -> TrackType -> Bool
Eq)

instance P.Enum TrackType where
    fromEnum :: TrackType -> Int
fromEnum TrackType
TrackTypeUnknown = Int
1
    fromEnum TrackType
TrackTypeAudio = Int
2
    fromEnum TrackType
TrackTypeVideo = Int
4
    fromEnum TrackType
TrackTypeText = Int
8
    fromEnum TrackType
TrackTypeCustom = Int
16
    fromEnum (AnotherTrackType Int
k) = Int
k

    toEnum :: Int -> TrackType
toEnum Int
1 = TrackType
TrackTypeUnknown
    toEnum Int
2 = TrackType
TrackTypeAudio
    toEnum Int
4 = TrackType
TrackTypeVideo
    toEnum Int
8 = TrackType
TrackTypeText
    toEnum Int
16 = TrackType
TrackTypeCustom
    toEnum Int
k = Int -> TrackType
AnotherTrackType Int
k

instance P.Ord TrackType where
    compare :: TrackType -> TrackType -> Ordering
compare TrackType
a TrackType
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (TrackType -> Int
forall a. Enum a => a -> Int
P.fromEnum TrackType
a) (TrackType -> Int
forall a. Enum a => a -> Int
P.fromEnum TrackType
b)

type instance O.ParentTypes TrackType = '[]
instance O.HasParentTypes TrackType

foreign import ccall "ges_track_type_get_type" c_ges_track_type_get_type :: 
    IO GType

instance B.Types.TypedObject TrackType where
    glibType :: IO GType
glibType = IO GType
c_ges_track_type_get_type

instance B.Types.BoxedFlags TrackType

instance IsGFlag TrackType

-- Flags PipelineFlags
-- | The various modes a t'GI.GES.Objects.Pipeline.Pipeline' can be configured to.
data PipelineFlags = 
      PipelineFlagsAudioPreview
    -- ^ Output the [Pipeline:timeline]("GI.GES.Objects.Pipeline#g:attr:timeline")\'s
    -- audio to the soundcard
    | PipelineFlagsVideoPreview
    -- ^ Output the [Pipeline:timeline]("GI.GES.Objects.Pipeline#g:attr:timeline")\'s
    -- video to the screen
    | PipelineFlagsFullPreview
    -- ^ Output both the [Pipeline:timeline]("GI.GES.Objects.Pipeline#g:attr:timeline")\'s
    -- audio and video to the soundcard and screen (default)
    | PipelineFlagsRender
    -- ^ Render the [Pipeline:timeline]("GI.GES.Objects.Pipeline#g:attr:timeline") with
    -- forced decoding (the underlying @/encodebin/@ has its
    -- @/encodebin:avoid-reencoding/@ property set to 'P.False')
    | PipelineFlagsSmartRender
    -- ^ Render the [Pipeline:timeline]("GI.GES.Objects.Pipeline#g:attr:timeline"),
    -- avoiding decoding\/reencoding (the underlying @/encodebin/@ has its
    -- @/encodebin:avoid-reencoding/@ property set to 'P.True').
    -- > NOTE: Smart rendering can not work in tracks where [Track:mixing]("GI.GES.Objects.Track#g:attr:mixing")
    -- > is enabled.
    | AnotherPipelineFlags Int
    -- ^ Catch-all for unknown values
    deriving (Int -> PipelineFlags -> ShowS
[PipelineFlags] -> ShowS
PipelineFlags -> String
(Int -> PipelineFlags -> ShowS)
-> (PipelineFlags -> String)
-> ([PipelineFlags] -> ShowS)
-> Show PipelineFlags
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> PipelineFlags -> ShowS
showsPrec :: Int -> PipelineFlags -> ShowS
$cshow :: PipelineFlags -> String
show :: PipelineFlags -> String
$cshowList :: [PipelineFlags] -> ShowS
showList :: [PipelineFlags] -> ShowS
Show, PipelineFlags -> PipelineFlags -> Bool
(PipelineFlags -> PipelineFlags -> Bool)
-> (PipelineFlags -> PipelineFlags -> Bool) -> Eq PipelineFlags
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PipelineFlags -> PipelineFlags -> Bool
== :: PipelineFlags -> PipelineFlags -> Bool
$c/= :: PipelineFlags -> PipelineFlags -> Bool
/= :: PipelineFlags -> PipelineFlags -> Bool
Eq)

instance P.Enum PipelineFlags where
    fromEnum :: PipelineFlags -> Int
fromEnum PipelineFlags
PipelineFlagsAudioPreview = Int
1
    fromEnum PipelineFlags
PipelineFlagsVideoPreview = Int
2
    fromEnum PipelineFlags
PipelineFlagsFullPreview = Int
3
    fromEnum PipelineFlags
PipelineFlagsRender = Int
4
    fromEnum PipelineFlags
PipelineFlagsSmartRender = Int
8
    fromEnum (AnotherPipelineFlags Int
k) = Int
k

    toEnum :: Int -> PipelineFlags
toEnum Int
1 = PipelineFlags
PipelineFlagsAudioPreview
    toEnum Int
2 = PipelineFlags
PipelineFlagsVideoPreview
    toEnum Int
3 = PipelineFlags
PipelineFlagsFullPreview
    toEnum Int
4 = PipelineFlags
PipelineFlagsRender
    toEnum Int
8 = PipelineFlags
PipelineFlagsSmartRender
    toEnum Int
k = Int -> PipelineFlags
AnotherPipelineFlags Int
k

instance P.Ord PipelineFlags where
    compare :: PipelineFlags -> PipelineFlags -> Ordering
compare PipelineFlags
a PipelineFlags
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (PipelineFlags -> Int
forall a. Enum a => a -> Int
P.fromEnum PipelineFlags
a) (PipelineFlags -> Int
forall a. Enum a => a -> Int
P.fromEnum PipelineFlags
b)

type instance O.ParentTypes PipelineFlags = '[]
instance O.HasParentTypes PipelineFlags

foreign import ccall "ges_pipeline_flags_get_type" c_ges_pipeline_flags_get_type :: 
    IO GType

instance B.Types.TypedObject PipelineFlags where
    glibType :: IO GType
glibType = IO GType
c_ges_pipeline_flags_get_type

instance B.Types.BoxedFlags PipelineFlags

instance IsGFlag PipelineFlags

-- Flags MetaFlag
-- | /No description available in the introspection data./
data MetaFlag = 
      MetaFlagReadable
    -- ^ The metadata is readable
    | MetaFlagWritable
    -- ^ The metadata is writable
    | MetaFlagReadwrite
    -- ^ The metadata is readable and writable
    | AnotherMetaFlag Int
    -- ^ Catch-all for unknown values
    deriving (Int -> MetaFlag -> ShowS
[MetaFlag] -> ShowS
MetaFlag -> String
(Int -> MetaFlag -> ShowS)
-> (MetaFlag -> String) -> ([MetaFlag] -> ShowS) -> Show MetaFlag
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> MetaFlag -> ShowS
showsPrec :: Int -> MetaFlag -> ShowS
$cshow :: MetaFlag -> String
show :: MetaFlag -> String
$cshowList :: [MetaFlag] -> ShowS
showList :: [MetaFlag] -> ShowS
Show, MetaFlag -> MetaFlag -> Bool
(MetaFlag -> MetaFlag -> Bool)
-> (MetaFlag -> MetaFlag -> Bool) -> Eq MetaFlag
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: MetaFlag -> MetaFlag -> Bool
== :: MetaFlag -> MetaFlag -> Bool
$c/= :: MetaFlag -> MetaFlag -> Bool
/= :: MetaFlag -> MetaFlag -> Bool
Eq)

instance P.Enum MetaFlag where
    fromEnum :: MetaFlag -> Int
fromEnum MetaFlag
MetaFlagReadable = Int
1
    fromEnum MetaFlag
MetaFlagWritable = Int
2
    fromEnum MetaFlag
MetaFlagReadwrite = Int
3
    fromEnum (AnotherMetaFlag Int
k) = Int
k

    toEnum :: Int -> MetaFlag
toEnum Int
1 = MetaFlag
MetaFlagReadable
    toEnum Int
2 = MetaFlag
MetaFlagWritable
    toEnum Int
3 = MetaFlag
MetaFlagReadwrite
    toEnum Int
k = Int -> MetaFlag
AnotherMetaFlag Int
k

instance P.Ord MetaFlag where
    compare :: MetaFlag -> MetaFlag -> Ordering
compare MetaFlag
a MetaFlag
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (MetaFlag -> Int
forall a. Enum a => a -> Int
P.fromEnum MetaFlag
a) (MetaFlag -> Int
forall a. Enum a => a -> Int
P.fromEnum MetaFlag
b)

type instance O.ParentTypes MetaFlag = '[]
instance O.HasParentTypes MetaFlag

foreign import ccall "ges_meta_flag_get_type" c_ges_meta_flag_get_type :: 
    IO GType

instance B.Types.TypedObject MetaFlag where
    glibType :: IO GType
glibType = IO GType
c_ges_meta_flag_get_type

instance B.Types.BoxedFlags MetaFlag

instance IsGFlag MetaFlag

-- Flags MarkerFlags
-- | /No description available in the introspection data./
-- 
-- /Since: 1.20/
data MarkerFlags = 
      MarkerFlagsNone
    -- ^ Marker does not serve any special purpose.
    | MarkerFlagsSnappable
    -- ^ Marker can be a snapping target.
    | AnotherMarkerFlags Int
    -- ^ Catch-all for unknown values
    deriving (Int -> MarkerFlags -> ShowS
[MarkerFlags] -> ShowS
MarkerFlags -> String
(Int -> MarkerFlags -> ShowS)
-> (MarkerFlags -> String)
-> ([MarkerFlags] -> ShowS)
-> Show MarkerFlags
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> MarkerFlags -> ShowS
showsPrec :: Int -> MarkerFlags -> ShowS
$cshow :: MarkerFlags -> String
show :: MarkerFlags -> String
$cshowList :: [MarkerFlags] -> ShowS
showList :: [MarkerFlags] -> ShowS
Show, MarkerFlags -> MarkerFlags -> Bool
(MarkerFlags -> MarkerFlags -> Bool)
-> (MarkerFlags -> MarkerFlags -> Bool) -> Eq MarkerFlags
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: MarkerFlags -> MarkerFlags -> Bool
== :: MarkerFlags -> MarkerFlags -> Bool
$c/= :: MarkerFlags -> MarkerFlags -> Bool
/= :: MarkerFlags -> MarkerFlags -> Bool
Eq)

instance P.Enum MarkerFlags where
    fromEnum :: MarkerFlags -> Int
fromEnum MarkerFlags
MarkerFlagsNone = Int
0
    fromEnum MarkerFlags
MarkerFlagsSnappable = Int
1
    fromEnum (AnotherMarkerFlags Int
k) = Int
k

    toEnum :: Int -> MarkerFlags
toEnum Int
0 = MarkerFlags
MarkerFlagsNone
    toEnum Int
1 = MarkerFlags
MarkerFlagsSnappable
    toEnum Int
k = Int -> MarkerFlags
AnotherMarkerFlags Int
k

instance P.Ord MarkerFlags where
    compare :: MarkerFlags -> MarkerFlags -> Ordering
compare MarkerFlags
a MarkerFlags
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (MarkerFlags -> Int
forall a. Enum a => a -> Int
P.fromEnum MarkerFlags
a) (MarkerFlags -> Int
forall a. Enum a => a -> Int
P.fromEnum MarkerFlags
b)

type instance O.ParentTypes MarkerFlags = '[]
instance O.HasParentTypes MarkerFlags

foreign import ccall "ges_marker_flags_get_type" c_ges_marker_flags_get_type :: 
    IO GType

instance B.Types.TypedObject MarkerFlags where
    glibType :: IO GType
glibType = IO GType
c_ges_marker_flags_get_type

instance B.Types.BoxedFlags MarkerFlags

instance IsGFlag MarkerFlags