{-# language CPP #-}
-- No documentation found for Chapter "ChromaLocation"
module Vulkan.Core11.Enums.ChromaLocation  (ChromaLocation( CHROMA_LOCATION_COSITED_EVEN
                                                          , CHROMA_LOCATION_MIDPOINT
                                                          , ..
                                                          )) where

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

-- | VkChromaLocation - Position of downsampled chroma samples
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_VERSION_1_1 VK_VERSION_1_1>,
-- 'Vulkan.Extensions.VK_ANDROID_external_memory_android_hardware_buffer.AndroidHardwareBufferFormatProperties2ANDROID',
-- 'Vulkan.Extensions.VK_ANDROID_external_memory_android_hardware_buffer.AndroidHardwareBufferFormatPropertiesANDROID',
-- 'Vulkan.Extensions.VK_FUCHSIA_buffer_collection.BufferCollectionPropertiesFUCHSIA',
-- 'Vulkan.Core11.Promoted_From_VK_KHR_sampler_ycbcr_conversion.SamplerYcbcrConversionCreateInfo'
newtype ChromaLocation = ChromaLocation Int32
  deriving newtype (ChromaLocation -> ChromaLocation -> Bool
(ChromaLocation -> ChromaLocation -> Bool)
-> (ChromaLocation -> ChromaLocation -> Bool) -> Eq ChromaLocation
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ChromaLocation -> ChromaLocation -> Bool
$c/= :: ChromaLocation -> ChromaLocation -> Bool
== :: ChromaLocation -> ChromaLocation -> Bool
$c== :: ChromaLocation -> ChromaLocation -> Bool
Eq, Eq ChromaLocation
Eq ChromaLocation
-> (ChromaLocation -> ChromaLocation -> Ordering)
-> (ChromaLocation -> ChromaLocation -> Bool)
-> (ChromaLocation -> ChromaLocation -> Bool)
-> (ChromaLocation -> ChromaLocation -> Bool)
-> (ChromaLocation -> ChromaLocation -> Bool)
-> (ChromaLocation -> ChromaLocation -> ChromaLocation)
-> (ChromaLocation -> ChromaLocation -> ChromaLocation)
-> Ord ChromaLocation
ChromaLocation -> ChromaLocation -> Bool
ChromaLocation -> ChromaLocation -> Ordering
ChromaLocation -> ChromaLocation -> ChromaLocation
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 :: ChromaLocation -> ChromaLocation -> ChromaLocation
$cmin :: ChromaLocation -> ChromaLocation -> ChromaLocation
max :: ChromaLocation -> ChromaLocation -> ChromaLocation
$cmax :: ChromaLocation -> ChromaLocation -> ChromaLocation
>= :: ChromaLocation -> ChromaLocation -> Bool
$c>= :: ChromaLocation -> ChromaLocation -> Bool
> :: ChromaLocation -> ChromaLocation -> Bool
$c> :: ChromaLocation -> ChromaLocation -> Bool
<= :: ChromaLocation -> ChromaLocation -> Bool
$c<= :: ChromaLocation -> ChromaLocation -> Bool
< :: ChromaLocation -> ChromaLocation -> Bool
$c< :: ChromaLocation -> ChromaLocation -> Bool
compare :: ChromaLocation -> ChromaLocation -> Ordering
$ccompare :: ChromaLocation -> ChromaLocation -> Ordering
$cp1Ord :: Eq ChromaLocation
Ord, Ptr b -> Int -> IO ChromaLocation
Ptr b -> Int -> ChromaLocation -> IO ()
Ptr ChromaLocation -> IO ChromaLocation
Ptr ChromaLocation -> Int -> IO ChromaLocation
Ptr ChromaLocation -> Int -> ChromaLocation -> IO ()
Ptr ChromaLocation -> ChromaLocation -> IO ()
ChromaLocation -> Int
(ChromaLocation -> Int)
-> (ChromaLocation -> Int)
-> (Ptr ChromaLocation -> Int -> IO ChromaLocation)
-> (Ptr ChromaLocation -> Int -> ChromaLocation -> IO ())
-> (forall b. Ptr b -> Int -> IO ChromaLocation)
-> (forall b. Ptr b -> Int -> ChromaLocation -> IO ())
-> (Ptr ChromaLocation -> IO ChromaLocation)
-> (Ptr ChromaLocation -> ChromaLocation -> IO ())
-> Storable ChromaLocation
forall b. Ptr b -> Int -> IO ChromaLocation
forall b. Ptr b -> Int -> ChromaLocation -> 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 ChromaLocation -> ChromaLocation -> IO ()
$cpoke :: Ptr ChromaLocation -> ChromaLocation -> IO ()
peek :: Ptr ChromaLocation -> IO ChromaLocation
$cpeek :: Ptr ChromaLocation -> IO ChromaLocation
pokeByteOff :: Ptr b -> Int -> ChromaLocation -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> ChromaLocation -> IO ()
peekByteOff :: Ptr b -> Int -> IO ChromaLocation
$cpeekByteOff :: forall b. Ptr b -> Int -> IO ChromaLocation
pokeElemOff :: Ptr ChromaLocation -> Int -> ChromaLocation -> IO ()
$cpokeElemOff :: Ptr ChromaLocation -> Int -> ChromaLocation -> IO ()
peekElemOff :: Ptr ChromaLocation -> Int -> IO ChromaLocation
$cpeekElemOff :: Ptr ChromaLocation -> Int -> IO ChromaLocation
alignment :: ChromaLocation -> Int
$calignment :: ChromaLocation -> Int
sizeOf :: ChromaLocation -> Int
$csizeOf :: ChromaLocation -> Int
Storable, ChromaLocation
ChromaLocation -> Zero ChromaLocation
forall a. a -> Zero a
zero :: ChromaLocation
$czero :: ChromaLocation
Zero)

-- | 'CHROMA_LOCATION_COSITED_EVEN' specifies that downsampled chroma samples
-- are aligned with luma samples with even coordinates.
pattern $bCHROMA_LOCATION_COSITED_EVEN :: ChromaLocation
$mCHROMA_LOCATION_COSITED_EVEN :: forall r. ChromaLocation -> (Void# -> r) -> (Void# -> r) -> r
CHROMA_LOCATION_COSITED_EVEN = ChromaLocation 0
-- | 'CHROMA_LOCATION_MIDPOINT' specifies that downsampled chroma samples are
-- located half way between each even luma sample and the nearest higher
-- odd luma sample.
pattern $bCHROMA_LOCATION_MIDPOINT :: ChromaLocation
$mCHROMA_LOCATION_MIDPOINT :: forall r. ChromaLocation -> (Void# -> r) -> (Void# -> r) -> r
CHROMA_LOCATION_MIDPOINT     = ChromaLocation 1
{-# complete CHROMA_LOCATION_COSITED_EVEN,
             CHROMA_LOCATION_MIDPOINT :: ChromaLocation #-}

conNameChromaLocation :: String
conNameChromaLocation :: String
conNameChromaLocation = String
"ChromaLocation"

enumPrefixChromaLocation :: String
enumPrefixChromaLocation :: String
enumPrefixChromaLocation = String
"CHROMA_LOCATION_"

showTableChromaLocation :: [(ChromaLocation, String)]
showTableChromaLocation :: [(ChromaLocation, String)]
showTableChromaLocation = [(ChromaLocation
CHROMA_LOCATION_COSITED_EVEN, String
"COSITED_EVEN"), (ChromaLocation
CHROMA_LOCATION_MIDPOINT, String
"MIDPOINT")]

instance Show ChromaLocation where
  showsPrec :: Int -> ChromaLocation -> ShowS
showsPrec = String
-> [(ChromaLocation, String)]
-> String
-> (ChromaLocation -> Int32)
-> (Int32 -> ShowS)
-> Int
-> ChromaLocation
-> ShowS
forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec String
enumPrefixChromaLocation
                            [(ChromaLocation, String)]
showTableChromaLocation
                            String
conNameChromaLocation
                            (\(ChromaLocation Int32
x) -> Int32
x)
                            (Int -> Int32 -> ShowS
forall a. Show a => Int -> a -> ShowS
showsPrec Int
11)

instance Read ChromaLocation where
  readPrec :: ReadPrec ChromaLocation
readPrec = String
-> [(ChromaLocation, String)]
-> String
-> (Int32 -> ChromaLocation)
-> ReadPrec ChromaLocation
forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec String
enumPrefixChromaLocation [(ChromaLocation, String)]
showTableChromaLocation String
conNameChromaLocation Int32 -> ChromaLocation
ChromaLocation