{-# language CPP #-}
module Vulkan.Core10.Enums.PolygonMode (PolygonMode( POLYGON_MODE_FILL
, POLYGON_MODE_LINE
, POLYGON_MODE_POINT
, POLYGON_MODE_FILL_RECTANGLE_NV
, ..
)) 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 PolygonMode = PolygonMode Int32
deriving newtype (PolygonMode -> PolygonMode -> Bool
(PolygonMode -> PolygonMode -> Bool)
-> (PolygonMode -> PolygonMode -> Bool) -> Eq PolygonMode
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PolygonMode -> PolygonMode -> Bool
$c/= :: PolygonMode -> PolygonMode -> Bool
== :: PolygonMode -> PolygonMode -> Bool
$c== :: PolygonMode -> PolygonMode -> Bool
Eq, Eq PolygonMode
Eq PolygonMode =>
(PolygonMode -> PolygonMode -> Ordering)
-> (PolygonMode -> PolygonMode -> Bool)
-> (PolygonMode -> PolygonMode -> Bool)
-> (PolygonMode -> PolygonMode -> Bool)
-> (PolygonMode -> PolygonMode -> Bool)
-> (PolygonMode -> PolygonMode -> PolygonMode)
-> (PolygonMode -> PolygonMode -> PolygonMode)
-> Ord PolygonMode
PolygonMode -> PolygonMode -> Bool
PolygonMode -> PolygonMode -> Ordering
PolygonMode -> PolygonMode -> PolygonMode
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 :: PolygonMode -> PolygonMode -> PolygonMode
$cmin :: PolygonMode -> PolygonMode -> PolygonMode
max :: PolygonMode -> PolygonMode -> PolygonMode
$cmax :: PolygonMode -> PolygonMode -> PolygonMode
>= :: PolygonMode -> PolygonMode -> Bool
$c>= :: PolygonMode -> PolygonMode -> Bool
> :: PolygonMode -> PolygonMode -> Bool
$c> :: PolygonMode -> PolygonMode -> Bool
<= :: PolygonMode -> PolygonMode -> Bool
$c<= :: PolygonMode -> PolygonMode -> Bool
< :: PolygonMode -> PolygonMode -> Bool
$c< :: PolygonMode -> PolygonMode -> Bool
compare :: PolygonMode -> PolygonMode -> Ordering
$ccompare :: PolygonMode -> PolygonMode -> Ordering
$cp1Ord :: Eq PolygonMode
Ord, Ptr b -> Int -> IO PolygonMode
Ptr b -> Int -> PolygonMode -> IO ()
Ptr PolygonMode -> IO PolygonMode
Ptr PolygonMode -> Int -> IO PolygonMode
Ptr PolygonMode -> Int -> PolygonMode -> IO ()
Ptr PolygonMode -> PolygonMode -> IO ()
PolygonMode -> Int
(PolygonMode -> Int)
-> (PolygonMode -> Int)
-> (Ptr PolygonMode -> Int -> IO PolygonMode)
-> (Ptr PolygonMode -> Int -> PolygonMode -> IO ())
-> (forall b. Ptr b -> Int -> IO PolygonMode)
-> (forall b. Ptr b -> Int -> PolygonMode -> IO ())
-> (Ptr PolygonMode -> IO PolygonMode)
-> (Ptr PolygonMode -> PolygonMode -> IO ())
-> Storable PolygonMode
forall b. Ptr b -> Int -> IO PolygonMode
forall b. Ptr b -> Int -> PolygonMode -> 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 PolygonMode -> PolygonMode -> IO ()
$cpoke :: Ptr PolygonMode -> PolygonMode -> IO ()
peek :: Ptr PolygonMode -> IO PolygonMode
$cpeek :: Ptr PolygonMode -> IO PolygonMode
pokeByteOff :: Ptr b -> Int -> PolygonMode -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> PolygonMode -> IO ()
peekByteOff :: Ptr b -> Int -> IO PolygonMode
$cpeekByteOff :: forall b. Ptr b -> Int -> IO PolygonMode
pokeElemOff :: Ptr PolygonMode -> Int -> PolygonMode -> IO ()
$cpokeElemOff :: Ptr PolygonMode -> Int -> PolygonMode -> IO ()
peekElemOff :: Ptr PolygonMode -> Int -> IO PolygonMode
$cpeekElemOff :: Ptr PolygonMode -> Int -> IO PolygonMode
alignment :: PolygonMode -> Int
$calignment :: PolygonMode -> Int
sizeOf :: PolygonMode -> Int
$csizeOf :: PolygonMode -> Int
Storable, PolygonMode
PolygonMode -> Zero PolygonMode
forall a. a -> Zero a
zero :: PolygonMode
$czero :: PolygonMode
Zero)
pattern $bPOLYGON_MODE_FILL :: PolygonMode
$mPOLYGON_MODE_FILL :: forall r. PolygonMode -> (Void# -> r) -> (Void# -> r) -> r
POLYGON_MODE_FILL = PolygonMode 0
pattern $bPOLYGON_MODE_LINE :: PolygonMode
$mPOLYGON_MODE_LINE :: forall r. PolygonMode -> (Void# -> r) -> (Void# -> r) -> r
POLYGON_MODE_LINE = PolygonMode 1
pattern $bPOLYGON_MODE_POINT :: PolygonMode
$mPOLYGON_MODE_POINT :: forall r. PolygonMode -> (Void# -> r) -> (Void# -> r) -> r
POLYGON_MODE_POINT = PolygonMode 2
pattern $bPOLYGON_MODE_FILL_RECTANGLE_NV :: PolygonMode
$mPOLYGON_MODE_FILL_RECTANGLE_NV :: forall r. PolygonMode -> (Void# -> r) -> (Void# -> r) -> r
POLYGON_MODE_FILL_RECTANGLE_NV = PolygonMode 1000153000
{-# complete POLYGON_MODE_FILL,
POLYGON_MODE_LINE,
POLYGON_MODE_POINT,
POLYGON_MODE_FILL_RECTANGLE_NV :: PolygonMode #-}
instance Show PolygonMode where
showsPrec :: Int -> PolygonMode -> ShowS
showsPrec p :: Int
p = \case
POLYGON_MODE_FILL -> String -> ShowS
showString "POLYGON_MODE_FILL"
POLYGON_MODE_LINE -> String -> ShowS
showString "POLYGON_MODE_LINE"
POLYGON_MODE_POINT -> String -> ShowS
showString "POLYGON_MODE_POINT"
POLYGON_MODE_FILL_RECTANGLE_NV -> String -> ShowS
showString "POLYGON_MODE_FILL_RECTANGLE_NV"
PolygonMode x :: Int32
x -> Bool -> ShowS -> ShowS
showParen (Int
p Int -> Int -> Bool
forall a. Ord a => a -> a -> Bool
>= 11) (String -> ShowS
showString "PolygonMode " 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 PolygonMode where
readPrec :: ReadPrec PolygonMode
readPrec = ReadPrec PolygonMode -> ReadPrec PolygonMode
forall a. ReadPrec a -> ReadPrec a
parens ([(String, ReadPrec PolygonMode)] -> ReadPrec PolygonMode
forall a. [(String, ReadPrec a)] -> ReadPrec a
choose [("POLYGON_MODE_FILL", PolygonMode -> ReadPrec PolygonMode
forall (f :: * -> *) a. Applicative f => a -> f a
pure PolygonMode
POLYGON_MODE_FILL)
, ("POLYGON_MODE_LINE", PolygonMode -> ReadPrec PolygonMode
forall (f :: * -> *) a. Applicative f => a -> f a
pure PolygonMode
POLYGON_MODE_LINE)
, ("POLYGON_MODE_POINT", PolygonMode -> ReadPrec PolygonMode
forall (f :: * -> *) a. Applicative f => a -> f a
pure PolygonMode
POLYGON_MODE_POINT)
, ("POLYGON_MODE_FILL_RECTANGLE_NV", PolygonMode -> ReadPrec PolygonMode
forall (f :: * -> *) a. Applicative f => a -> f a
pure PolygonMode
POLYGON_MODE_FILL_RECTANGLE_NV)]
ReadPrec PolygonMode
-> ReadPrec PolygonMode -> ReadPrec PolygonMode
forall a. ReadPrec a -> ReadPrec a -> ReadPrec a
+++
Int -> ReadPrec PolygonMode -> ReadPrec PolygonMode
forall a. Int -> ReadPrec a -> ReadPrec a
prec 10 (do
Lexeme -> ReadPrec ()
expectP (String -> Lexeme
Ident "PolygonMode")
Int32
v <- ReadPrec Int32 -> ReadPrec Int32
forall a. ReadPrec a -> ReadPrec a
step ReadPrec Int32
forall a. Read a => ReadPrec a
readPrec
PolygonMode -> ReadPrec PolygonMode
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Int32 -> PolygonMode
PolygonMode Int32
v)))