{-# language CPP #-}
module Vulkan.Core10.Enums.ComponentSwizzle (ComponentSwizzle( COMPONENT_SWIZZLE_IDENTITY
, COMPONENT_SWIZZLE_ZERO
, COMPONENT_SWIZZLE_ONE
, COMPONENT_SWIZZLE_R
, COMPONENT_SWIZZLE_G
, COMPONENT_SWIZZLE_B
, COMPONENT_SWIZZLE_A
, ..
)) where
import Vulkan.Internal.Utils (enumReadPrec)
import Vulkan.Internal.Utils (enumShowsPrec)
import GHC.Show (showsPrec)
import Vulkan.Zero (Zero)
import Foreign.Storable (Storable)
import Data.Int (Int32)
import GHC.Read (Read(readPrec))
import GHC.Show (Show(showsPrec))
newtype ComponentSwizzle = ComponentSwizzle Int32
deriving newtype (ComponentSwizzle -> ComponentSwizzle -> Bool
(ComponentSwizzle -> ComponentSwizzle -> Bool)
-> (ComponentSwizzle -> ComponentSwizzle -> Bool)
-> Eq ComponentSwizzle
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ComponentSwizzle -> ComponentSwizzle -> Bool
$c/= :: ComponentSwizzle -> ComponentSwizzle -> Bool
== :: ComponentSwizzle -> ComponentSwizzle -> Bool
$c== :: ComponentSwizzle -> ComponentSwizzle -> Bool
Eq, Eq ComponentSwizzle
Eq ComponentSwizzle =>
(ComponentSwizzle -> ComponentSwizzle -> Ordering)
-> (ComponentSwizzle -> ComponentSwizzle -> Bool)
-> (ComponentSwizzle -> ComponentSwizzle -> Bool)
-> (ComponentSwizzle -> ComponentSwizzle -> Bool)
-> (ComponentSwizzle -> ComponentSwizzle -> Bool)
-> (ComponentSwizzle -> ComponentSwizzle -> ComponentSwizzle)
-> (ComponentSwizzle -> ComponentSwizzle -> ComponentSwizzle)
-> Ord ComponentSwizzle
ComponentSwizzle -> ComponentSwizzle -> Bool
ComponentSwizzle -> ComponentSwizzle -> Ordering
ComponentSwizzle -> ComponentSwizzle -> ComponentSwizzle
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 :: ComponentSwizzle -> ComponentSwizzle -> ComponentSwizzle
$cmin :: ComponentSwizzle -> ComponentSwizzle -> ComponentSwizzle
max :: ComponentSwizzle -> ComponentSwizzle -> ComponentSwizzle
$cmax :: ComponentSwizzle -> ComponentSwizzle -> ComponentSwizzle
>= :: ComponentSwizzle -> ComponentSwizzle -> Bool
$c>= :: ComponentSwizzle -> ComponentSwizzle -> Bool
> :: ComponentSwizzle -> ComponentSwizzle -> Bool
$c> :: ComponentSwizzle -> ComponentSwizzle -> Bool
<= :: ComponentSwizzle -> ComponentSwizzle -> Bool
$c<= :: ComponentSwizzle -> ComponentSwizzle -> Bool
< :: ComponentSwizzle -> ComponentSwizzle -> Bool
$c< :: ComponentSwizzle -> ComponentSwizzle -> Bool
compare :: ComponentSwizzle -> ComponentSwizzle -> Ordering
$ccompare :: ComponentSwizzle -> ComponentSwizzle -> Ordering
$cp1Ord :: Eq ComponentSwizzle
Ord, Ptr b -> Int -> IO ComponentSwizzle
Ptr b -> Int -> ComponentSwizzle -> IO ()
Ptr ComponentSwizzle -> IO ComponentSwizzle
Ptr ComponentSwizzle -> Int -> IO ComponentSwizzle
Ptr ComponentSwizzle -> Int -> ComponentSwizzle -> IO ()
Ptr ComponentSwizzle -> ComponentSwizzle -> IO ()
ComponentSwizzle -> Int
(ComponentSwizzle -> Int)
-> (ComponentSwizzle -> Int)
-> (Ptr ComponentSwizzle -> Int -> IO ComponentSwizzle)
-> (Ptr ComponentSwizzle -> Int -> ComponentSwizzle -> IO ())
-> (forall b. Ptr b -> Int -> IO ComponentSwizzle)
-> (forall b. Ptr b -> Int -> ComponentSwizzle -> IO ())
-> (Ptr ComponentSwizzle -> IO ComponentSwizzle)
-> (Ptr ComponentSwizzle -> ComponentSwizzle -> IO ())
-> Storable ComponentSwizzle
forall b. Ptr b -> Int -> IO ComponentSwizzle
forall b. Ptr b -> Int -> ComponentSwizzle -> 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 ComponentSwizzle -> ComponentSwizzle -> IO ()
$cpoke :: Ptr ComponentSwizzle -> ComponentSwizzle -> IO ()
peek :: Ptr ComponentSwizzle -> IO ComponentSwizzle
$cpeek :: Ptr ComponentSwizzle -> IO ComponentSwizzle
pokeByteOff :: Ptr b -> Int -> ComponentSwizzle -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> ComponentSwizzle -> IO ()
peekByteOff :: Ptr b -> Int -> IO ComponentSwizzle
$cpeekByteOff :: forall b. Ptr b -> Int -> IO ComponentSwizzle
pokeElemOff :: Ptr ComponentSwizzle -> Int -> ComponentSwizzle -> IO ()
$cpokeElemOff :: Ptr ComponentSwizzle -> Int -> ComponentSwizzle -> IO ()
peekElemOff :: Ptr ComponentSwizzle -> Int -> IO ComponentSwizzle
$cpeekElemOff :: Ptr ComponentSwizzle -> Int -> IO ComponentSwizzle
alignment :: ComponentSwizzle -> Int
$calignment :: ComponentSwizzle -> Int
sizeOf :: ComponentSwizzle -> Int
$csizeOf :: ComponentSwizzle -> Int
Storable, ComponentSwizzle
ComponentSwizzle -> Zero ComponentSwizzle
forall a. a -> Zero a
zero :: ComponentSwizzle
$czero :: ComponentSwizzle
Zero)
pattern $bCOMPONENT_SWIZZLE_IDENTITY :: ComponentSwizzle
$mCOMPONENT_SWIZZLE_IDENTITY :: forall r. ComponentSwizzle -> (Void# -> r) -> (Void# -> r) -> r
COMPONENT_SWIZZLE_IDENTITY = ComponentSwizzle 0
pattern $bCOMPONENT_SWIZZLE_ZERO :: ComponentSwizzle
$mCOMPONENT_SWIZZLE_ZERO :: forall r. ComponentSwizzle -> (Void# -> r) -> (Void# -> r) -> r
COMPONENT_SWIZZLE_ZERO = ComponentSwizzle 1
pattern $bCOMPONENT_SWIZZLE_ONE :: ComponentSwizzle
$mCOMPONENT_SWIZZLE_ONE :: forall r. ComponentSwizzle -> (Void# -> r) -> (Void# -> r) -> r
COMPONENT_SWIZZLE_ONE = ComponentSwizzle 2
pattern $bCOMPONENT_SWIZZLE_R :: ComponentSwizzle
$mCOMPONENT_SWIZZLE_R :: forall r. ComponentSwizzle -> (Void# -> r) -> (Void# -> r) -> r
COMPONENT_SWIZZLE_R = ComponentSwizzle 3
pattern $bCOMPONENT_SWIZZLE_G :: ComponentSwizzle
$mCOMPONENT_SWIZZLE_G :: forall r. ComponentSwizzle -> (Void# -> r) -> (Void# -> r) -> r
COMPONENT_SWIZZLE_G = ComponentSwizzle 4
pattern $bCOMPONENT_SWIZZLE_B :: ComponentSwizzle
$mCOMPONENT_SWIZZLE_B :: forall r. ComponentSwizzle -> (Void# -> r) -> (Void# -> r) -> r
COMPONENT_SWIZZLE_B = ComponentSwizzle 5
pattern $bCOMPONENT_SWIZZLE_A :: ComponentSwizzle
$mCOMPONENT_SWIZZLE_A :: forall r. ComponentSwizzle -> (Void# -> r) -> (Void# -> r) -> r
COMPONENT_SWIZZLE_A = ComponentSwizzle 6
{-# complete COMPONENT_SWIZZLE_IDENTITY,
COMPONENT_SWIZZLE_ZERO,
COMPONENT_SWIZZLE_ONE,
COMPONENT_SWIZZLE_R,
COMPONENT_SWIZZLE_G,
COMPONENT_SWIZZLE_B,
COMPONENT_SWIZZLE_A :: ComponentSwizzle #-}
conNameComponentSwizzle :: String
conNameComponentSwizzle :: String
conNameComponentSwizzle = "ComponentSwizzle"
enumPrefixComponentSwizzle :: String
enumPrefixComponentSwizzle :: String
enumPrefixComponentSwizzle = "COMPONENT_SWIZZLE_"
showTableComponentSwizzle :: [(ComponentSwizzle, String)]
showTableComponentSwizzle :: [(ComponentSwizzle, String)]
showTableComponentSwizzle =
[ (ComponentSwizzle
COMPONENT_SWIZZLE_IDENTITY, "IDENTITY")
, (ComponentSwizzle
COMPONENT_SWIZZLE_ZERO , "ZERO")
, (ComponentSwizzle
COMPONENT_SWIZZLE_ONE , "ONE")
, (ComponentSwizzle
COMPONENT_SWIZZLE_R , "R")
, (ComponentSwizzle
COMPONENT_SWIZZLE_G , "G")
, (ComponentSwizzle
COMPONENT_SWIZZLE_B , "B")
, (ComponentSwizzle
COMPONENT_SWIZZLE_A , "A")
]
instance Show ComponentSwizzle where
showsPrec :: Int -> ComponentSwizzle -> ShowS
showsPrec = String
-> [(ComponentSwizzle, String)]
-> String
-> (ComponentSwizzle -> Int32)
-> (Int32 -> ShowS)
-> Int
-> ComponentSwizzle
-> ShowS
forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec String
enumPrefixComponentSwizzle
[(ComponentSwizzle, String)]
showTableComponentSwizzle
String
conNameComponentSwizzle
(\(ComponentSwizzle x :: Int32
x) -> Int32
x)
(Int -> Int32 -> ShowS
forall a. Show a => Int -> a -> ShowS
showsPrec 11)
instance Read ComponentSwizzle where
readPrec :: ReadPrec ComponentSwizzle
readPrec = String
-> [(ComponentSwizzle, String)]
-> String
-> (Int32 -> ComponentSwizzle)
-> ReadPrec ComponentSwizzle
forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec String
enumPrefixComponentSwizzle [(ComponentSwizzle, String)]
showTableComponentSwizzle String
conNameComponentSwizzle Int32 -> ComponentSwizzle
ComponentSwizzle