{-# language CPP #-}
module Vulkan.Core10.Enums.ImageViewType (ImageViewType( IMAGE_VIEW_TYPE_1D
, IMAGE_VIEW_TYPE_2D
, IMAGE_VIEW_TYPE_3D
, IMAGE_VIEW_TYPE_CUBE
, IMAGE_VIEW_TYPE_1D_ARRAY
, IMAGE_VIEW_TYPE_2D_ARRAY
, IMAGE_VIEW_TYPE_CUBE_ARRAY
, ..
)) 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 ImageViewType = ImageViewType Int32
deriving newtype (ImageViewType -> ImageViewType -> Bool
(ImageViewType -> ImageViewType -> Bool)
-> (ImageViewType -> ImageViewType -> Bool) -> Eq ImageViewType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ImageViewType -> ImageViewType -> Bool
$c/= :: ImageViewType -> ImageViewType -> Bool
== :: ImageViewType -> ImageViewType -> Bool
$c== :: ImageViewType -> ImageViewType -> Bool
Eq, Eq ImageViewType
Eq ImageViewType =>
(ImageViewType -> ImageViewType -> Ordering)
-> (ImageViewType -> ImageViewType -> Bool)
-> (ImageViewType -> ImageViewType -> Bool)
-> (ImageViewType -> ImageViewType -> Bool)
-> (ImageViewType -> ImageViewType -> Bool)
-> (ImageViewType -> ImageViewType -> ImageViewType)
-> (ImageViewType -> ImageViewType -> ImageViewType)
-> Ord ImageViewType
ImageViewType -> ImageViewType -> Bool
ImageViewType -> ImageViewType -> Ordering
ImageViewType -> ImageViewType -> ImageViewType
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 :: ImageViewType -> ImageViewType -> ImageViewType
$cmin :: ImageViewType -> ImageViewType -> ImageViewType
max :: ImageViewType -> ImageViewType -> ImageViewType
$cmax :: ImageViewType -> ImageViewType -> ImageViewType
>= :: ImageViewType -> ImageViewType -> Bool
$c>= :: ImageViewType -> ImageViewType -> Bool
> :: ImageViewType -> ImageViewType -> Bool
$c> :: ImageViewType -> ImageViewType -> Bool
<= :: ImageViewType -> ImageViewType -> Bool
$c<= :: ImageViewType -> ImageViewType -> Bool
< :: ImageViewType -> ImageViewType -> Bool
$c< :: ImageViewType -> ImageViewType -> Bool
compare :: ImageViewType -> ImageViewType -> Ordering
$ccompare :: ImageViewType -> ImageViewType -> Ordering
$cp1Ord :: Eq ImageViewType
Ord, Ptr b -> Int -> IO ImageViewType
Ptr b -> Int -> ImageViewType -> IO ()
Ptr ImageViewType -> IO ImageViewType
Ptr ImageViewType -> Int -> IO ImageViewType
Ptr ImageViewType -> Int -> ImageViewType -> IO ()
Ptr ImageViewType -> ImageViewType -> IO ()
ImageViewType -> Int
(ImageViewType -> Int)
-> (ImageViewType -> Int)
-> (Ptr ImageViewType -> Int -> IO ImageViewType)
-> (Ptr ImageViewType -> Int -> ImageViewType -> IO ())
-> (forall b. Ptr b -> Int -> IO ImageViewType)
-> (forall b. Ptr b -> Int -> ImageViewType -> IO ())
-> (Ptr ImageViewType -> IO ImageViewType)
-> (Ptr ImageViewType -> ImageViewType -> IO ())
-> Storable ImageViewType
forall b. Ptr b -> Int -> IO ImageViewType
forall b. Ptr b -> Int -> ImageViewType -> 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 ImageViewType -> ImageViewType -> IO ()
$cpoke :: Ptr ImageViewType -> ImageViewType -> IO ()
peek :: Ptr ImageViewType -> IO ImageViewType
$cpeek :: Ptr ImageViewType -> IO ImageViewType
pokeByteOff :: Ptr b -> Int -> ImageViewType -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> ImageViewType -> IO ()
peekByteOff :: Ptr b -> Int -> IO ImageViewType
$cpeekByteOff :: forall b. Ptr b -> Int -> IO ImageViewType
pokeElemOff :: Ptr ImageViewType -> Int -> ImageViewType -> IO ()
$cpokeElemOff :: Ptr ImageViewType -> Int -> ImageViewType -> IO ()
peekElemOff :: Ptr ImageViewType -> Int -> IO ImageViewType
$cpeekElemOff :: Ptr ImageViewType -> Int -> IO ImageViewType
alignment :: ImageViewType -> Int
$calignment :: ImageViewType -> Int
sizeOf :: ImageViewType -> Int
$csizeOf :: ImageViewType -> Int
Storable, ImageViewType
ImageViewType -> Zero ImageViewType
forall a. a -> Zero a
zero :: ImageViewType
$czero :: ImageViewType
Zero)
pattern $bIMAGE_VIEW_TYPE_1D :: ImageViewType
$mIMAGE_VIEW_TYPE_1D :: forall r. ImageViewType -> (Void# -> r) -> (Void# -> r) -> r
IMAGE_VIEW_TYPE_1D = ImageViewType 0
pattern $bIMAGE_VIEW_TYPE_2D :: ImageViewType
$mIMAGE_VIEW_TYPE_2D :: forall r. ImageViewType -> (Void# -> r) -> (Void# -> r) -> r
IMAGE_VIEW_TYPE_2D = ImageViewType 1
pattern $bIMAGE_VIEW_TYPE_3D :: ImageViewType
$mIMAGE_VIEW_TYPE_3D :: forall r. ImageViewType -> (Void# -> r) -> (Void# -> r) -> r
IMAGE_VIEW_TYPE_3D = ImageViewType 2
pattern $bIMAGE_VIEW_TYPE_CUBE :: ImageViewType
$mIMAGE_VIEW_TYPE_CUBE :: forall r. ImageViewType -> (Void# -> r) -> (Void# -> r) -> r
IMAGE_VIEW_TYPE_CUBE = ImageViewType 3
pattern $bIMAGE_VIEW_TYPE_1D_ARRAY :: ImageViewType
$mIMAGE_VIEW_TYPE_1D_ARRAY :: forall r. ImageViewType -> (Void# -> r) -> (Void# -> r) -> r
IMAGE_VIEW_TYPE_1D_ARRAY = ImageViewType 4
pattern $bIMAGE_VIEW_TYPE_2D_ARRAY :: ImageViewType
$mIMAGE_VIEW_TYPE_2D_ARRAY :: forall r. ImageViewType -> (Void# -> r) -> (Void# -> r) -> r
IMAGE_VIEW_TYPE_2D_ARRAY = ImageViewType 5
pattern $bIMAGE_VIEW_TYPE_CUBE_ARRAY :: ImageViewType
$mIMAGE_VIEW_TYPE_CUBE_ARRAY :: forall r. ImageViewType -> (Void# -> r) -> (Void# -> r) -> r
IMAGE_VIEW_TYPE_CUBE_ARRAY = ImageViewType 6
{-# complete IMAGE_VIEW_TYPE_1D,
IMAGE_VIEW_TYPE_2D,
IMAGE_VIEW_TYPE_3D,
IMAGE_VIEW_TYPE_CUBE,
IMAGE_VIEW_TYPE_1D_ARRAY,
IMAGE_VIEW_TYPE_2D_ARRAY,
IMAGE_VIEW_TYPE_CUBE_ARRAY :: ImageViewType #-}
instance Show ImageViewType where
showsPrec :: Int -> ImageViewType -> ShowS
showsPrec p :: Int
p = \case
IMAGE_VIEW_TYPE_1D -> String -> ShowS
showString "IMAGE_VIEW_TYPE_1D"
IMAGE_VIEW_TYPE_2D -> String -> ShowS
showString "IMAGE_VIEW_TYPE_2D"
IMAGE_VIEW_TYPE_3D -> String -> ShowS
showString "IMAGE_VIEW_TYPE_3D"
IMAGE_VIEW_TYPE_CUBE -> String -> ShowS
showString "IMAGE_VIEW_TYPE_CUBE"
IMAGE_VIEW_TYPE_1D_ARRAY -> String -> ShowS
showString "IMAGE_VIEW_TYPE_1D_ARRAY"
IMAGE_VIEW_TYPE_2D_ARRAY -> String -> ShowS
showString "IMAGE_VIEW_TYPE_2D_ARRAY"
IMAGE_VIEW_TYPE_CUBE_ARRAY -> String -> ShowS
showString "IMAGE_VIEW_TYPE_CUBE_ARRAY"
ImageViewType x :: Int32
x -> Bool -> ShowS -> ShowS
showParen (Int
p Int -> Int -> Bool
forall a. Ord a => a -> a -> Bool
>= 11) (String -> ShowS
showString "ImageViewType " 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 ImageViewType where
readPrec :: ReadPrec ImageViewType
readPrec = ReadPrec ImageViewType -> ReadPrec ImageViewType
forall a. ReadPrec a -> ReadPrec a
parens ([(String, ReadPrec ImageViewType)] -> ReadPrec ImageViewType
forall a. [(String, ReadPrec a)] -> ReadPrec a
choose [("IMAGE_VIEW_TYPE_1D", ImageViewType -> ReadPrec ImageViewType
forall (f :: * -> *) a. Applicative f => a -> f a
pure ImageViewType
IMAGE_VIEW_TYPE_1D)
, ("IMAGE_VIEW_TYPE_2D", ImageViewType -> ReadPrec ImageViewType
forall (f :: * -> *) a. Applicative f => a -> f a
pure ImageViewType
IMAGE_VIEW_TYPE_2D)
, ("IMAGE_VIEW_TYPE_3D", ImageViewType -> ReadPrec ImageViewType
forall (f :: * -> *) a. Applicative f => a -> f a
pure ImageViewType
IMAGE_VIEW_TYPE_3D)
, ("IMAGE_VIEW_TYPE_CUBE", ImageViewType -> ReadPrec ImageViewType
forall (f :: * -> *) a. Applicative f => a -> f a
pure ImageViewType
IMAGE_VIEW_TYPE_CUBE)
, ("IMAGE_VIEW_TYPE_1D_ARRAY", ImageViewType -> ReadPrec ImageViewType
forall (f :: * -> *) a. Applicative f => a -> f a
pure ImageViewType
IMAGE_VIEW_TYPE_1D_ARRAY)
, ("IMAGE_VIEW_TYPE_2D_ARRAY", ImageViewType -> ReadPrec ImageViewType
forall (f :: * -> *) a. Applicative f => a -> f a
pure ImageViewType
IMAGE_VIEW_TYPE_2D_ARRAY)
, ("IMAGE_VIEW_TYPE_CUBE_ARRAY", ImageViewType -> ReadPrec ImageViewType
forall (f :: * -> *) a. Applicative f => a -> f a
pure ImageViewType
IMAGE_VIEW_TYPE_CUBE_ARRAY)]
ReadPrec ImageViewType
-> ReadPrec ImageViewType -> ReadPrec ImageViewType
forall a. ReadPrec a -> ReadPrec a -> ReadPrec a
+++
Int -> ReadPrec ImageViewType -> ReadPrec ImageViewType
forall a. Int -> ReadPrec a -> ReadPrec a
prec 10 (do
Lexeme -> ReadPrec ()
expectP (String -> Lexeme
Ident "ImageViewType")
Int32
v <- ReadPrec Int32 -> ReadPrec Int32
forall a. ReadPrec a -> ReadPrec a
step ReadPrec Int32
forall a. Read a => ReadPrec a
readPrec
ImageViewType -> ReadPrec ImageViewType
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Int32 -> ImageViewType
ImageViewType Int32
v)))