{-# language CPP #-}
-- No documentation found for Chapter "EnvironmentBlendMode"
module OpenXR.Core10.Enums.EnvironmentBlendMode  (EnvironmentBlendMode( ENVIRONMENT_BLEND_MODE_OPAQUE
                                                                      , ENVIRONMENT_BLEND_MODE_ADDITIVE
                                                                      , ENVIRONMENT_BLEND_MODE_ALPHA_BLEND
                                                                      , ..
                                                                      )) where

import OpenXR.Internal.Utils (enumReadPrec)
import OpenXR.Internal.Utils (enumShowsPrec)
import GHC.Show (showsPrec)
import OpenXR.Zero (Zero)
import Foreign.Storable (Storable)
import Data.Int (Int32)
import GHC.Read (Read(readPrec))
import GHC.Show (Show(showsPrec))

-- | XrEnvironmentBlendMode - Environment blend modes
--
-- == Enumerant Descriptions
--
-- = See Also
--
-- 'OpenXR.Core10.DisplayTiming.FrameEndInfo',
-- 'OpenXR.Extensions.XR_MSFT_secondary_view_configuration.SecondaryViewConfigurationLayerInfoMSFT',
-- 'OpenXR.Core10.Device.enumerateEnvironmentBlendModes'
newtype EnvironmentBlendMode = EnvironmentBlendMode Int32
  deriving newtype (EnvironmentBlendMode -> EnvironmentBlendMode -> Bool
(EnvironmentBlendMode -> EnvironmentBlendMode -> Bool)
-> (EnvironmentBlendMode -> EnvironmentBlendMode -> Bool)
-> Eq EnvironmentBlendMode
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: EnvironmentBlendMode -> EnvironmentBlendMode -> Bool
$c/= :: EnvironmentBlendMode -> EnvironmentBlendMode -> Bool
== :: EnvironmentBlendMode -> EnvironmentBlendMode -> Bool
$c== :: EnvironmentBlendMode -> EnvironmentBlendMode -> Bool
Eq, Eq EnvironmentBlendMode
Eq EnvironmentBlendMode =>
(EnvironmentBlendMode -> EnvironmentBlendMode -> Ordering)
-> (EnvironmentBlendMode -> EnvironmentBlendMode -> Bool)
-> (EnvironmentBlendMode -> EnvironmentBlendMode -> Bool)
-> (EnvironmentBlendMode -> EnvironmentBlendMode -> Bool)
-> (EnvironmentBlendMode -> EnvironmentBlendMode -> Bool)
-> (EnvironmentBlendMode
    -> EnvironmentBlendMode -> EnvironmentBlendMode)
-> (EnvironmentBlendMode
    -> EnvironmentBlendMode -> EnvironmentBlendMode)
-> Ord EnvironmentBlendMode
EnvironmentBlendMode -> EnvironmentBlendMode -> Bool
EnvironmentBlendMode -> EnvironmentBlendMode -> Ordering
EnvironmentBlendMode
-> EnvironmentBlendMode -> EnvironmentBlendMode
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: EnvironmentBlendMode
-> EnvironmentBlendMode -> EnvironmentBlendMode
$cmin :: EnvironmentBlendMode
-> EnvironmentBlendMode -> EnvironmentBlendMode
max :: EnvironmentBlendMode
-> EnvironmentBlendMode -> EnvironmentBlendMode
$cmax :: EnvironmentBlendMode
-> EnvironmentBlendMode -> EnvironmentBlendMode
>= :: EnvironmentBlendMode -> EnvironmentBlendMode -> Bool
$c>= :: EnvironmentBlendMode -> EnvironmentBlendMode -> Bool
> :: EnvironmentBlendMode -> EnvironmentBlendMode -> Bool
$c> :: EnvironmentBlendMode -> EnvironmentBlendMode -> Bool
<= :: EnvironmentBlendMode -> EnvironmentBlendMode -> Bool
$c<= :: EnvironmentBlendMode -> EnvironmentBlendMode -> Bool
< :: EnvironmentBlendMode -> EnvironmentBlendMode -> Bool
$c< :: EnvironmentBlendMode -> EnvironmentBlendMode -> Bool
compare :: EnvironmentBlendMode -> EnvironmentBlendMode -> Ordering
$ccompare :: EnvironmentBlendMode -> EnvironmentBlendMode -> Ordering
$cp1Ord :: Eq EnvironmentBlendMode
Ord, Ptr b -> Int -> IO EnvironmentBlendMode
Ptr b -> Int -> EnvironmentBlendMode -> IO ()
Ptr EnvironmentBlendMode -> IO EnvironmentBlendMode
Ptr EnvironmentBlendMode -> Int -> IO EnvironmentBlendMode
Ptr EnvironmentBlendMode -> Int -> EnvironmentBlendMode -> IO ()
Ptr EnvironmentBlendMode -> EnvironmentBlendMode -> IO ()
EnvironmentBlendMode -> Int
(EnvironmentBlendMode -> Int)
-> (EnvironmentBlendMode -> Int)
-> (Ptr EnvironmentBlendMode -> Int -> IO EnvironmentBlendMode)
-> (Ptr EnvironmentBlendMode
    -> Int -> EnvironmentBlendMode -> IO ())
-> (forall b. Ptr b -> Int -> IO EnvironmentBlendMode)
-> (forall b. Ptr b -> Int -> EnvironmentBlendMode -> IO ())
-> (Ptr EnvironmentBlendMode -> IO EnvironmentBlendMode)
-> (Ptr EnvironmentBlendMode -> EnvironmentBlendMode -> IO ())
-> Storable EnvironmentBlendMode
forall b. Ptr b -> Int -> IO EnvironmentBlendMode
forall b. Ptr b -> Int -> EnvironmentBlendMode -> IO ()
forall a.
(a -> Int)
-> (a -> Int)
-> (Ptr a -> Int -> IO a)
-> (Ptr a -> Int -> a -> IO ())
-> (forall b. Ptr b -> Int -> IO a)
-> (forall b. Ptr b -> Int -> a -> IO ())
-> (Ptr a -> IO a)
-> (Ptr a -> a -> IO ())
-> Storable a
poke :: Ptr EnvironmentBlendMode -> EnvironmentBlendMode -> IO ()
$cpoke :: Ptr EnvironmentBlendMode -> EnvironmentBlendMode -> IO ()
peek :: Ptr EnvironmentBlendMode -> IO EnvironmentBlendMode
$cpeek :: Ptr EnvironmentBlendMode -> IO EnvironmentBlendMode
pokeByteOff :: Ptr b -> Int -> EnvironmentBlendMode -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> EnvironmentBlendMode -> IO ()
peekByteOff :: Ptr b -> Int -> IO EnvironmentBlendMode
$cpeekByteOff :: forall b. Ptr b -> Int -> IO EnvironmentBlendMode
pokeElemOff :: Ptr EnvironmentBlendMode -> Int -> EnvironmentBlendMode -> IO ()
$cpokeElemOff :: Ptr EnvironmentBlendMode -> Int -> EnvironmentBlendMode -> IO ()
peekElemOff :: Ptr EnvironmentBlendMode -> Int -> IO EnvironmentBlendMode
$cpeekElemOff :: Ptr EnvironmentBlendMode -> Int -> IO EnvironmentBlendMode
alignment :: EnvironmentBlendMode -> Int
$calignment :: EnvironmentBlendMode -> Int
sizeOf :: EnvironmentBlendMode -> Int
$csizeOf :: EnvironmentBlendMode -> Int
Storable, EnvironmentBlendMode
EnvironmentBlendMode -> Zero EnvironmentBlendMode
forall a. a -> Zero a
zero :: EnvironmentBlendMode
$czero :: EnvironmentBlendMode
Zero)
-- Note that the zero instance does not produce a valid value, passing 'zero' to Vulkan will result in an error

-- | 'ENVIRONMENT_BLEND_MODE_OPAQUE'. The composition layers will be
-- displayed with no view of the physical world behind them. The composited
-- image will be interpreted as an RGB image, ignoring the composited alpha
-- channel. This is the typical mode for VR experiences, although this mode
-- can also be supported on devices that support video passthrough.
pattern $bENVIRONMENT_BLEND_MODE_OPAQUE :: EnvironmentBlendMode
$mENVIRONMENT_BLEND_MODE_OPAQUE :: forall r. EnvironmentBlendMode -> (Void# -> r) -> (Void# -> r) -> r
ENVIRONMENT_BLEND_MODE_OPAQUE      = EnvironmentBlendMode 1
-- | 'ENVIRONMENT_BLEND_MODE_ADDITIVE'. The composition layers will be
-- additively blended with the real world behind the display. The
-- composited image will be interpreted as an RGB image, ignoring the
-- composited alpha channel during the additive blending. This will cause
-- black composited pixels to appear transparent. This is the typical mode
-- for an AR experience on a see-through headset with an additive display,
-- although this mode can also be supported on devices that support video
-- passthrough.
pattern $bENVIRONMENT_BLEND_MODE_ADDITIVE :: EnvironmentBlendMode
$mENVIRONMENT_BLEND_MODE_ADDITIVE :: forall r. EnvironmentBlendMode -> (Void# -> r) -> (Void# -> r) -> r
ENVIRONMENT_BLEND_MODE_ADDITIVE    = EnvironmentBlendMode 2
-- | 'ENVIRONMENT_BLEND_MODE_ALPHA_BLEND'. The composition layers will be
-- alpha-blended with the real world behind the display. The composited
-- image will be interpreted as an RGBA image, with the composited alpha
-- channel determining each pixel’s level of blending with the real world
-- behind the display. This is the typical mode for an AR experience on a
-- phone or headset that supports video passthrough.
pattern $bENVIRONMENT_BLEND_MODE_ALPHA_BLEND :: EnvironmentBlendMode
$mENVIRONMENT_BLEND_MODE_ALPHA_BLEND :: forall r. EnvironmentBlendMode -> (Void# -> r) -> (Void# -> r) -> r
ENVIRONMENT_BLEND_MODE_ALPHA_BLEND = EnvironmentBlendMode 3
{-# complete ENVIRONMENT_BLEND_MODE_OPAQUE,
             ENVIRONMENT_BLEND_MODE_ADDITIVE,
             ENVIRONMENT_BLEND_MODE_ALPHA_BLEND :: EnvironmentBlendMode #-}

conNameEnvironmentBlendMode :: String
conNameEnvironmentBlendMode :: String
conNameEnvironmentBlendMode = "EnvironmentBlendMode"

enumPrefixEnvironmentBlendMode :: String
enumPrefixEnvironmentBlendMode :: String
enumPrefixEnvironmentBlendMode = "ENVIRONMENT_BLEND_MODE_"

showTableEnvironmentBlendMode :: [(EnvironmentBlendMode, String)]
showTableEnvironmentBlendMode :: [(EnvironmentBlendMode, String)]
showTableEnvironmentBlendMode =
  [ (EnvironmentBlendMode
ENVIRONMENT_BLEND_MODE_OPAQUE     , "OPAQUE")
  , (EnvironmentBlendMode
ENVIRONMENT_BLEND_MODE_ADDITIVE   , "ADDITIVE")
  , (EnvironmentBlendMode
ENVIRONMENT_BLEND_MODE_ALPHA_BLEND, "ALPHA_BLEND")
  ]

instance Show EnvironmentBlendMode where
  showsPrec :: Int -> EnvironmentBlendMode -> ShowS
showsPrec = String
-> [(EnvironmentBlendMode, String)]
-> String
-> (EnvironmentBlendMode -> Int32)
-> (Int32 -> ShowS)
-> Int
-> EnvironmentBlendMode
-> ShowS
forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec String
enumPrefixEnvironmentBlendMode
                            [(EnvironmentBlendMode, String)]
showTableEnvironmentBlendMode
                            String
conNameEnvironmentBlendMode
                            (\(EnvironmentBlendMode x :: Int32
x) -> Int32
x)
                            (Int -> Int32 -> ShowS
forall a. Show a => Int -> a -> ShowS
showsPrec 11)

instance Read EnvironmentBlendMode where
  readPrec :: ReadPrec EnvironmentBlendMode
readPrec = String
-> [(EnvironmentBlendMode, String)]
-> String
-> (Int32 -> EnvironmentBlendMode)
-> ReadPrec EnvironmentBlendMode
forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec String
enumPrefixEnvironmentBlendMode
                          [(EnvironmentBlendMode, String)]
showTableEnvironmentBlendMode
                          String
conNameEnvironmentBlendMode
                          Int32 -> EnvironmentBlendMode
EnvironmentBlendMode