{-# OPTIONS_HADDOCK ignore-exports#-}
{-# LANGUAGE DataKinds                  #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE PatternSynonyms            #-}
{-# LANGUAGE Strict                     #-}
module Graphics.Vulkan.Types.Enum.FrontFace
       (VkFrontFace(VkFrontFace, VK_FRONT_FACE_COUNTER_CLOCKWISE,
                    VK_FRONT_FACE_CLOCKWISE))
       where
import Foreign.Storable                (Storable)
import GHC.Read                        (choose, expectP)
import Graphics.Vulkan.Marshal         (Int32)
import Text.ParserCombinators.ReadPrec (prec, step, (+++))
import Text.Read                       (Read (..), parens)
import Text.Read.Lex                   (Lexeme (..))

-- | type = @enum@
--
--   <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkFrontFace VkFrontFace registry at www.khronos.org>
newtype VkFrontFace = VkFrontFace Int32
                      deriving (VkFrontFace -> VkFrontFace -> Bool
(VkFrontFace -> VkFrontFace -> Bool)
-> (VkFrontFace -> VkFrontFace -> Bool) -> Eq VkFrontFace
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: VkFrontFace -> VkFrontFace -> Bool
$c/= :: VkFrontFace -> VkFrontFace -> Bool
== :: VkFrontFace -> VkFrontFace -> Bool
$c== :: VkFrontFace -> VkFrontFace -> Bool
Eq, Eq VkFrontFace
Eq VkFrontFace
-> (VkFrontFace -> VkFrontFace -> Ordering)
-> (VkFrontFace -> VkFrontFace -> Bool)
-> (VkFrontFace -> VkFrontFace -> Bool)
-> (VkFrontFace -> VkFrontFace -> Bool)
-> (VkFrontFace -> VkFrontFace -> Bool)
-> (VkFrontFace -> VkFrontFace -> VkFrontFace)
-> (VkFrontFace -> VkFrontFace -> VkFrontFace)
-> Ord VkFrontFace
VkFrontFace -> VkFrontFace -> Bool
VkFrontFace -> VkFrontFace -> Ordering
VkFrontFace -> VkFrontFace -> VkFrontFace
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 :: VkFrontFace -> VkFrontFace -> VkFrontFace
$cmin :: VkFrontFace -> VkFrontFace -> VkFrontFace
max :: VkFrontFace -> VkFrontFace -> VkFrontFace
$cmax :: VkFrontFace -> VkFrontFace -> VkFrontFace
>= :: VkFrontFace -> VkFrontFace -> Bool
$c>= :: VkFrontFace -> VkFrontFace -> Bool
> :: VkFrontFace -> VkFrontFace -> Bool
$c> :: VkFrontFace -> VkFrontFace -> Bool
<= :: VkFrontFace -> VkFrontFace -> Bool
$c<= :: VkFrontFace -> VkFrontFace -> Bool
< :: VkFrontFace -> VkFrontFace -> Bool
$c< :: VkFrontFace -> VkFrontFace -> Bool
compare :: VkFrontFace -> VkFrontFace -> Ordering
$ccompare :: VkFrontFace -> VkFrontFace -> Ordering
Ord, Int -> VkFrontFace
VkFrontFace -> Int
VkFrontFace -> [VkFrontFace]
VkFrontFace -> VkFrontFace
VkFrontFace -> VkFrontFace -> [VkFrontFace]
VkFrontFace -> VkFrontFace -> VkFrontFace -> [VkFrontFace]
(VkFrontFace -> VkFrontFace)
-> (VkFrontFace -> VkFrontFace)
-> (Int -> VkFrontFace)
-> (VkFrontFace -> Int)
-> (VkFrontFace -> [VkFrontFace])
-> (VkFrontFace -> VkFrontFace -> [VkFrontFace])
-> (VkFrontFace -> VkFrontFace -> [VkFrontFace])
-> (VkFrontFace -> VkFrontFace -> VkFrontFace -> [VkFrontFace])
-> Enum VkFrontFace
forall a.
(a -> a)
-> (a -> a)
-> (Int -> a)
-> (a -> Int)
-> (a -> [a])
-> (a -> a -> [a])
-> (a -> a -> [a])
-> (a -> a -> a -> [a])
-> Enum a
enumFromThenTo :: VkFrontFace -> VkFrontFace -> VkFrontFace -> [VkFrontFace]
$cenumFromThenTo :: VkFrontFace -> VkFrontFace -> VkFrontFace -> [VkFrontFace]
enumFromTo :: VkFrontFace -> VkFrontFace -> [VkFrontFace]
$cenumFromTo :: VkFrontFace -> VkFrontFace -> [VkFrontFace]
enumFromThen :: VkFrontFace -> VkFrontFace -> [VkFrontFace]
$cenumFromThen :: VkFrontFace -> VkFrontFace -> [VkFrontFace]
enumFrom :: VkFrontFace -> [VkFrontFace]
$cenumFrom :: VkFrontFace -> [VkFrontFace]
fromEnum :: VkFrontFace -> Int
$cfromEnum :: VkFrontFace -> Int
toEnum :: Int -> VkFrontFace
$ctoEnum :: Int -> VkFrontFace
pred :: VkFrontFace -> VkFrontFace
$cpred :: VkFrontFace -> VkFrontFace
succ :: VkFrontFace -> VkFrontFace
$csucc :: VkFrontFace -> VkFrontFace
Enum, Ptr VkFrontFace -> IO VkFrontFace
Ptr VkFrontFace -> Int -> IO VkFrontFace
Ptr VkFrontFace -> Int -> VkFrontFace -> IO ()
Ptr VkFrontFace -> VkFrontFace -> IO ()
VkFrontFace -> Int
(VkFrontFace -> Int)
-> (VkFrontFace -> Int)
-> (Ptr VkFrontFace -> Int -> IO VkFrontFace)
-> (Ptr VkFrontFace -> Int -> VkFrontFace -> IO ())
-> (forall b. Ptr b -> Int -> IO VkFrontFace)
-> (forall b. Ptr b -> Int -> VkFrontFace -> IO ())
-> (Ptr VkFrontFace -> IO VkFrontFace)
-> (Ptr VkFrontFace -> VkFrontFace -> IO ())
-> Storable VkFrontFace
forall b. Ptr b -> Int -> IO VkFrontFace
forall b. Ptr b -> Int -> VkFrontFace -> 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 VkFrontFace -> VkFrontFace -> IO ()
$cpoke :: Ptr VkFrontFace -> VkFrontFace -> IO ()
peek :: Ptr VkFrontFace -> IO VkFrontFace
$cpeek :: Ptr VkFrontFace -> IO VkFrontFace
pokeByteOff :: forall b. Ptr b -> Int -> VkFrontFace -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> VkFrontFace -> IO ()
peekByteOff :: forall b. Ptr b -> Int -> IO VkFrontFace
$cpeekByteOff :: forall b. Ptr b -> Int -> IO VkFrontFace
pokeElemOff :: Ptr VkFrontFace -> Int -> VkFrontFace -> IO ()
$cpokeElemOff :: Ptr VkFrontFace -> Int -> VkFrontFace -> IO ()
peekElemOff :: Ptr VkFrontFace -> Int -> IO VkFrontFace
$cpeekElemOff :: Ptr VkFrontFace -> Int -> IO VkFrontFace
alignment :: VkFrontFace -> Int
$calignment :: VkFrontFace -> Int
sizeOf :: VkFrontFace -> Int
$csizeOf :: VkFrontFace -> Int
Storable)

instance Show VkFrontFace where
    showsPrec :: Int -> VkFrontFace -> ShowS
showsPrec Int
_ VkFrontFace
VK_FRONT_FACE_COUNTER_CLOCKWISE
      = String -> ShowS
showString String
"VK_FRONT_FACE_COUNTER_CLOCKWISE"
    showsPrec Int
_ VkFrontFace
VK_FRONT_FACE_CLOCKWISE
      = String -> ShowS
showString String
"VK_FRONT_FACE_CLOCKWISE"
    showsPrec Int
p (VkFrontFace Int32
x)
      = Bool -> ShowS -> ShowS
showParen (Int
p Int -> Int -> Bool
forall a. Ord a => a -> a -> Bool
>= Int
11) (String -> ShowS
showString String
"VkFrontFace " ShowS -> ShowS -> ShowS
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Int -> Int32 -> ShowS
forall a. Show a => Int -> a -> ShowS
showsPrec Int
11 Int32
x)

instance Read VkFrontFace where
    readPrec :: ReadPrec VkFrontFace
readPrec
      = ReadPrec VkFrontFace -> ReadPrec VkFrontFace
forall a. ReadPrec a -> ReadPrec a
parens
          ([(String, ReadPrec VkFrontFace)] -> ReadPrec VkFrontFace
forall a. [(String, ReadPrec a)] -> ReadPrec a
choose
             [(String
"VK_FRONT_FACE_COUNTER_CLOCKWISE",
               VkFrontFace -> ReadPrec VkFrontFace
forall (f :: * -> *) a. Applicative f => a -> f a
pure VkFrontFace
VK_FRONT_FACE_COUNTER_CLOCKWISE),
              (String
"VK_FRONT_FACE_CLOCKWISE", VkFrontFace -> ReadPrec VkFrontFace
forall (f :: * -> *) a. Applicative f => a -> f a
pure VkFrontFace
VK_FRONT_FACE_CLOCKWISE)]
             ReadPrec VkFrontFace
-> ReadPrec VkFrontFace -> ReadPrec VkFrontFace
forall a. ReadPrec a -> ReadPrec a -> ReadPrec a
+++
             Int -> ReadPrec VkFrontFace -> ReadPrec VkFrontFace
forall a. Int -> ReadPrec a -> ReadPrec a
prec Int
10
               (Lexeme -> ReadPrec ()
expectP (String -> Lexeme
Ident String
"VkFrontFace") ReadPrec () -> ReadPrec VkFrontFace -> ReadPrec VkFrontFace
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> (Int32 -> VkFrontFace
VkFrontFace (Int32 -> VkFrontFace) -> ReadPrec Int32 -> ReadPrec VkFrontFace
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> ReadPrec Int32 -> ReadPrec Int32
forall a. ReadPrec a -> ReadPrec a
step ReadPrec Int32
forall a. Read a => ReadPrec a
readPrec)))

pattern VK_FRONT_FACE_COUNTER_CLOCKWISE :: VkFrontFace

pattern $bVK_FRONT_FACE_COUNTER_CLOCKWISE :: VkFrontFace
$mVK_FRONT_FACE_COUNTER_CLOCKWISE :: forall {r}. VkFrontFace -> (Void# -> r) -> (Void# -> r) -> r
VK_FRONT_FACE_COUNTER_CLOCKWISE = VkFrontFace 0

pattern VK_FRONT_FACE_CLOCKWISE :: VkFrontFace

pattern $bVK_FRONT_FACE_CLOCKWISE :: VkFrontFace
$mVK_FRONT_FACE_CLOCKWISE :: forall {r}. VkFrontFace -> (Void# -> r) -> (Void# -> r) -> r
VK_FRONT_FACE_CLOCKWISE = VkFrontFace 1