{-# language CPP #-}
-- No documentation found for Chapter "CompareOp"
module Vulkan.Core10.Enums.CompareOp  (CompareOp( COMPARE_OP_NEVER
                                                , COMPARE_OP_LESS
                                                , COMPARE_OP_EQUAL
                                                , COMPARE_OP_LESS_OR_EQUAL
                                                , COMPARE_OP_GREATER
                                                , COMPARE_OP_NOT_EQUAL
                                                , COMPARE_OP_GREATER_OR_EQUAL
                                                , COMPARE_OP_ALWAYS
                                                , ..
                                                )) where

import Vulkan.Internal.Utils (enumReadPrec)
import Vulkan.Internal.Utils (enumShowsPrec)
import GHC.Show (showsPrec)
import Foreign.Storable (Storable)
import Data.Int (Int32)
import GHC.Read (Read(readPrec))
import GHC.Show (Show(showsPrec))
import Vulkan.Zero (Zero)
-- | VkCompareOp - Stencil comparison function
--
-- = See Also
--
-- 'Vulkan.Core10.Pipeline.PipelineDepthStencilStateCreateInfo',
-- 'Vulkan.Core10.Sampler.SamplerCreateInfo',
-- 'Vulkan.Core10.Pipeline.StencilOpState',
-- 'Vulkan.Extensions.VK_EXT_extended_dynamic_state.cmdSetDepthCompareOpEXT',
-- 'Vulkan.Extensions.VK_EXT_extended_dynamic_state.cmdSetStencilOpEXT'
newtype CompareOp = CompareOp Int32
  deriving newtype (CompareOp -> CompareOp -> Bool
(CompareOp -> CompareOp -> Bool)
-> (CompareOp -> CompareOp -> Bool) -> Eq CompareOp
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CompareOp -> CompareOp -> Bool
$c/= :: CompareOp -> CompareOp -> Bool
== :: CompareOp -> CompareOp -> Bool
$c== :: CompareOp -> CompareOp -> Bool
Eq, Eq CompareOp
Eq CompareOp =>
(CompareOp -> CompareOp -> Ordering)
-> (CompareOp -> CompareOp -> Bool)
-> (CompareOp -> CompareOp -> Bool)
-> (CompareOp -> CompareOp -> Bool)
-> (CompareOp -> CompareOp -> Bool)
-> (CompareOp -> CompareOp -> CompareOp)
-> (CompareOp -> CompareOp -> CompareOp)
-> Ord CompareOp
CompareOp -> CompareOp -> Bool
CompareOp -> CompareOp -> Ordering
CompareOp -> CompareOp -> CompareOp
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 :: CompareOp -> CompareOp -> CompareOp
$cmin :: CompareOp -> CompareOp -> CompareOp
max :: CompareOp -> CompareOp -> CompareOp
$cmax :: CompareOp -> CompareOp -> CompareOp
>= :: CompareOp -> CompareOp -> Bool
$c>= :: CompareOp -> CompareOp -> Bool
> :: CompareOp -> CompareOp -> Bool
$c> :: CompareOp -> CompareOp -> Bool
<= :: CompareOp -> CompareOp -> Bool
$c<= :: CompareOp -> CompareOp -> Bool
< :: CompareOp -> CompareOp -> Bool
$c< :: CompareOp -> CompareOp -> Bool
compare :: CompareOp -> CompareOp -> Ordering
$ccompare :: CompareOp -> CompareOp -> Ordering
$cp1Ord :: Eq CompareOp
Ord, Ptr b -> Int -> IO CompareOp
Ptr b -> Int -> CompareOp -> IO ()
Ptr CompareOp -> IO CompareOp
Ptr CompareOp -> Int -> IO CompareOp
Ptr CompareOp -> Int -> CompareOp -> IO ()
Ptr CompareOp -> CompareOp -> IO ()
CompareOp -> Int
(CompareOp -> Int)
-> (CompareOp -> Int)
-> (Ptr CompareOp -> Int -> IO CompareOp)
-> (Ptr CompareOp -> Int -> CompareOp -> IO ())
-> (forall b. Ptr b -> Int -> IO CompareOp)
-> (forall b. Ptr b -> Int -> CompareOp -> IO ())
-> (Ptr CompareOp -> IO CompareOp)
-> (Ptr CompareOp -> CompareOp -> IO ())
-> Storable CompareOp
forall b. Ptr b -> Int -> IO CompareOp
forall b. Ptr b -> Int -> CompareOp -> 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 CompareOp -> CompareOp -> IO ()
$cpoke :: Ptr CompareOp -> CompareOp -> IO ()
peek :: Ptr CompareOp -> IO CompareOp
$cpeek :: Ptr CompareOp -> IO CompareOp
pokeByteOff :: Ptr b -> Int -> CompareOp -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> CompareOp -> IO ()
peekByteOff :: Ptr b -> Int -> IO CompareOp
$cpeekByteOff :: forall b. Ptr b -> Int -> IO CompareOp
pokeElemOff :: Ptr CompareOp -> Int -> CompareOp -> IO ()
$cpokeElemOff :: Ptr CompareOp -> Int -> CompareOp -> IO ()
peekElemOff :: Ptr CompareOp -> Int -> IO CompareOp
$cpeekElemOff :: Ptr CompareOp -> Int -> IO CompareOp
alignment :: CompareOp -> Int
$calignment :: CompareOp -> Int
sizeOf :: CompareOp -> Int
$csizeOf :: CompareOp -> Int
Storable, CompareOp
CompareOp -> Zero CompareOp
forall a. a -> Zero a
zero :: CompareOp
$czero :: CompareOp
Zero)

-- | 'COMPARE_OP_NEVER' specifies that the test evaluates to false.
pattern $bCOMPARE_OP_NEVER :: CompareOp
$mCOMPARE_OP_NEVER :: forall r. CompareOp -> (Void# -> r) -> (Void# -> r) -> r
COMPARE_OP_NEVER            = CompareOp 0
-- | 'COMPARE_OP_LESS' specifies that the test evaluates A \< B.
pattern $bCOMPARE_OP_LESS :: CompareOp
$mCOMPARE_OP_LESS :: forall r. CompareOp -> (Void# -> r) -> (Void# -> r) -> r
COMPARE_OP_LESS             = CompareOp 1
-- | 'COMPARE_OP_EQUAL' specifies that the test evaluates A = B.
pattern $bCOMPARE_OP_EQUAL :: CompareOp
$mCOMPARE_OP_EQUAL :: forall r. CompareOp -> (Void# -> r) -> (Void# -> r) -> r
COMPARE_OP_EQUAL            = CompareOp 2
-- | 'COMPARE_OP_LESS_OR_EQUAL' specifies that the test evaluates A ≤ B.
pattern $bCOMPARE_OP_LESS_OR_EQUAL :: CompareOp
$mCOMPARE_OP_LESS_OR_EQUAL :: forall r. CompareOp -> (Void# -> r) -> (Void# -> r) -> r
COMPARE_OP_LESS_OR_EQUAL    = CompareOp 3
-- | 'COMPARE_OP_GREATER' specifies that the test evaluates A > B.
pattern $bCOMPARE_OP_GREATER :: CompareOp
$mCOMPARE_OP_GREATER :: forall r. CompareOp -> (Void# -> r) -> (Void# -> r) -> r
COMPARE_OP_GREATER          = CompareOp 4
-- | 'COMPARE_OP_NOT_EQUAL' specifies that the test evaluates A ≠ B.
pattern $bCOMPARE_OP_NOT_EQUAL :: CompareOp
$mCOMPARE_OP_NOT_EQUAL :: forall r. CompareOp -> (Void# -> r) -> (Void# -> r) -> r
COMPARE_OP_NOT_EQUAL        = CompareOp 5
-- | 'COMPARE_OP_GREATER_OR_EQUAL' specifies that the test evaluates A ≥ B.
pattern $bCOMPARE_OP_GREATER_OR_EQUAL :: CompareOp
$mCOMPARE_OP_GREATER_OR_EQUAL :: forall r. CompareOp -> (Void# -> r) -> (Void# -> r) -> r
COMPARE_OP_GREATER_OR_EQUAL = CompareOp 6
-- | 'COMPARE_OP_ALWAYS' specifies that the test evaluates to true.
pattern $bCOMPARE_OP_ALWAYS :: CompareOp
$mCOMPARE_OP_ALWAYS :: forall r. CompareOp -> (Void# -> r) -> (Void# -> r) -> r
COMPARE_OP_ALWAYS           = CompareOp 7
{-# complete COMPARE_OP_NEVER,
             COMPARE_OP_LESS,
             COMPARE_OP_EQUAL,
             COMPARE_OP_LESS_OR_EQUAL,
             COMPARE_OP_GREATER,
             COMPARE_OP_NOT_EQUAL,
             COMPARE_OP_GREATER_OR_EQUAL,
             COMPARE_OP_ALWAYS :: CompareOp #-}

conNameCompareOp :: String
conNameCompareOp :: String
conNameCompareOp = "CompareOp"

enumPrefixCompareOp :: String
enumPrefixCompareOp :: String
enumPrefixCompareOp = "COMPARE_OP_"

showTableCompareOp :: [(CompareOp, String)]
showTableCompareOp :: [(CompareOp, String)]
showTableCompareOp =
  [ (CompareOp
COMPARE_OP_NEVER           , "NEVER")
  , (CompareOp
COMPARE_OP_LESS            , "LESS")
  , (CompareOp
COMPARE_OP_EQUAL           , "EQUAL")
  , (CompareOp
COMPARE_OP_LESS_OR_EQUAL   , "LESS_OR_EQUAL")
  , (CompareOp
COMPARE_OP_GREATER         , "GREATER")
  , (CompareOp
COMPARE_OP_NOT_EQUAL       , "NOT_EQUAL")
  , (CompareOp
COMPARE_OP_GREATER_OR_EQUAL, "GREATER_OR_EQUAL")
  , (CompareOp
COMPARE_OP_ALWAYS          , "ALWAYS")
  ]

instance Show CompareOp where
  showsPrec :: Int -> CompareOp -> ShowS
showsPrec =
    String
-> [(CompareOp, String)]
-> String
-> (CompareOp -> Int32)
-> (Int32 -> ShowS)
-> Int
-> CompareOp
-> ShowS
forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec String
enumPrefixCompareOp [(CompareOp, String)]
showTableCompareOp String
conNameCompareOp (\(CompareOp x :: Int32
x) -> Int32
x) (Int -> Int32 -> ShowS
forall a. Show a => Int -> a -> ShowS
showsPrec 11)

instance Read CompareOp where
  readPrec :: ReadPrec CompareOp
readPrec = String
-> [(CompareOp, String)]
-> String
-> (Int32 -> CompareOp)
-> ReadPrec CompareOp
forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec String
enumPrefixCompareOp [(CompareOp, String)]
showTableCompareOp String
conNameCompareOp Int32 -> CompareOp
CompareOp