{-# language CPP #-}
module Vulkan.Core11.Enums.ChromaLocation (ChromaLocation( CHROMA_LOCATION_COSITED_EVEN
, CHROMA_LOCATION_MIDPOINT
, ..
)) where
import GHC.Read (choose)
import GHC.Read (expectP)
import GHC.Read (parens)
import GHC.Show (showParen)
import GHC.Show (showString)
import GHC.Show (showsPrec)
import Text.ParserCombinators.ReadPrec ((+++))
import Text.ParserCombinators.ReadPrec (prec)
import Text.ParserCombinators.ReadPrec (step)
import Foreign.Storable (Storable)
import Data.Int (Int32)
import GHC.Read (Read(readPrec))
import Text.Read.Lex (Lexeme(Ident))
import Vulkan.Zero (Zero)
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)
pattern $bCHROMA_LOCATION_COSITED_EVEN :: ChromaLocation
$mCHROMA_LOCATION_COSITED_EVEN :: forall r. ChromaLocation -> (Void# -> r) -> (Void# -> r) -> r
CHROMA_LOCATION_COSITED_EVEN = ChromaLocation 0
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 #-}
instance Show ChromaLocation where
showsPrec :: Int -> ChromaLocation -> ShowS
showsPrec p :: Int
p = \case
CHROMA_LOCATION_COSITED_EVEN -> String -> ShowS
showString "CHROMA_LOCATION_COSITED_EVEN"
CHROMA_LOCATION_MIDPOINT -> String -> ShowS
showString "CHROMA_LOCATION_MIDPOINT"
ChromaLocation x :: Int32
x -> Bool -> ShowS -> ShowS
showParen (Int
p Int -> Int -> Bool
forall a. Ord a => a -> a -> Bool
>= 11) (String -> ShowS
showString "ChromaLocation " ShowS -> ShowS -> ShowS
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Int -> Int32 -> ShowS
forall a. Show a => Int -> a -> ShowS
showsPrec 11 Int32
x)
instance Read ChromaLocation where
readPrec :: ReadPrec ChromaLocation
readPrec = ReadPrec ChromaLocation -> ReadPrec ChromaLocation
forall a. ReadPrec a -> ReadPrec a
parens ([(String, ReadPrec ChromaLocation)] -> ReadPrec ChromaLocation
forall a. [(String, ReadPrec a)] -> ReadPrec a
choose [("CHROMA_LOCATION_COSITED_EVEN", ChromaLocation -> ReadPrec ChromaLocation
forall (f :: * -> *) a. Applicative f => a -> f a
pure ChromaLocation
CHROMA_LOCATION_COSITED_EVEN)
, ("CHROMA_LOCATION_MIDPOINT", ChromaLocation -> ReadPrec ChromaLocation
forall (f :: * -> *) a. Applicative f => a -> f a
pure ChromaLocation
CHROMA_LOCATION_MIDPOINT)]
ReadPrec ChromaLocation
-> ReadPrec ChromaLocation -> ReadPrec ChromaLocation
forall a. ReadPrec a -> ReadPrec a -> ReadPrec a
+++
Int -> ReadPrec ChromaLocation -> ReadPrec ChromaLocation
forall a. Int -> ReadPrec a -> ReadPrec a
prec 10 (do
Lexeme -> ReadPrec ()
expectP (String -> Lexeme
Ident "ChromaLocation")
Int32
v <- ReadPrec Int32 -> ReadPrec Int32
forall a. ReadPrec a -> ReadPrec a
step ReadPrec Int32
forall a. Read a => ReadPrec a
readPrec
ChromaLocation -> ReadPrec ChromaLocation
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Int32 -> ChromaLocation
ChromaLocation Int32
v)))