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