{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE TypeSynonymInstances #-}

module Data.SpirV.Enum.ImageChannelOrder where

import Data.Word (Word32)
import Foreign.Storable (Storable)

newtype ImageChannelOrder = ImageChannelOrder Word32
  deriving newtype (ImageChannelOrder -> ImageChannelOrder -> Bool
(ImageChannelOrder -> ImageChannelOrder -> Bool)
-> (ImageChannelOrder -> ImageChannelOrder -> Bool)
-> Eq ImageChannelOrder
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ImageChannelOrder -> ImageChannelOrder -> Bool
== :: ImageChannelOrder -> ImageChannelOrder -> Bool
$c/= :: ImageChannelOrder -> ImageChannelOrder -> Bool
/= :: ImageChannelOrder -> ImageChannelOrder -> Bool
Eq, Eq ImageChannelOrder
Eq ImageChannelOrder =>
(ImageChannelOrder -> ImageChannelOrder -> Ordering)
-> (ImageChannelOrder -> ImageChannelOrder -> Bool)
-> (ImageChannelOrder -> ImageChannelOrder -> Bool)
-> (ImageChannelOrder -> ImageChannelOrder -> Bool)
-> (ImageChannelOrder -> ImageChannelOrder -> Bool)
-> (ImageChannelOrder -> ImageChannelOrder -> ImageChannelOrder)
-> (ImageChannelOrder -> ImageChannelOrder -> ImageChannelOrder)
-> Ord ImageChannelOrder
ImageChannelOrder -> ImageChannelOrder -> Bool
ImageChannelOrder -> ImageChannelOrder -> Ordering
ImageChannelOrder -> ImageChannelOrder -> ImageChannelOrder
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
$ccompare :: ImageChannelOrder -> ImageChannelOrder -> Ordering
compare :: ImageChannelOrder -> ImageChannelOrder -> Ordering
$c< :: ImageChannelOrder -> ImageChannelOrder -> Bool
< :: ImageChannelOrder -> ImageChannelOrder -> Bool
$c<= :: ImageChannelOrder -> ImageChannelOrder -> Bool
<= :: ImageChannelOrder -> ImageChannelOrder -> Bool
$c> :: ImageChannelOrder -> ImageChannelOrder -> Bool
> :: ImageChannelOrder -> ImageChannelOrder -> Bool
$c>= :: ImageChannelOrder -> ImageChannelOrder -> Bool
>= :: ImageChannelOrder -> ImageChannelOrder -> Bool
$cmax :: ImageChannelOrder -> ImageChannelOrder -> ImageChannelOrder
max :: ImageChannelOrder -> ImageChannelOrder -> ImageChannelOrder
$cmin :: ImageChannelOrder -> ImageChannelOrder -> ImageChannelOrder
min :: ImageChannelOrder -> ImageChannelOrder -> ImageChannelOrder
Ord, Ptr ImageChannelOrder -> IO ImageChannelOrder
Ptr ImageChannelOrder -> Int -> IO ImageChannelOrder
Ptr ImageChannelOrder -> Int -> ImageChannelOrder -> IO ()
Ptr ImageChannelOrder -> ImageChannelOrder -> IO ()
ImageChannelOrder -> Int
(ImageChannelOrder -> Int)
-> (ImageChannelOrder -> Int)
-> (Ptr ImageChannelOrder -> Int -> IO ImageChannelOrder)
-> (Ptr ImageChannelOrder -> Int -> ImageChannelOrder -> IO ())
-> (forall b. Ptr b -> Int -> IO ImageChannelOrder)
-> (forall b. Ptr b -> Int -> ImageChannelOrder -> IO ())
-> (Ptr ImageChannelOrder -> IO ImageChannelOrder)
-> (Ptr ImageChannelOrder -> ImageChannelOrder -> IO ())
-> Storable ImageChannelOrder
forall b. Ptr b -> Int -> IO ImageChannelOrder
forall b. Ptr b -> Int -> ImageChannelOrder -> 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
$csizeOf :: ImageChannelOrder -> Int
sizeOf :: ImageChannelOrder -> Int
$calignment :: ImageChannelOrder -> Int
alignment :: ImageChannelOrder -> Int
$cpeekElemOff :: Ptr ImageChannelOrder -> Int -> IO ImageChannelOrder
peekElemOff :: Ptr ImageChannelOrder -> Int -> IO ImageChannelOrder
$cpokeElemOff :: Ptr ImageChannelOrder -> Int -> ImageChannelOrder -> IO ()
pokeElemOff :: Ptr ImageChannelOrder -> Int -> ImageChannelOrder -> IO ()
$cpeekByteOff :: forall b. Ptr b -> Int -> IO ImageChannelOrder
peekByteOff :: forall b. Ptr b -> Int -> IO ImageChannelOrder
$cpokeByteOff :: forall b. Ptr b -> Int -> ImageChannelOrder -> IO ()
pokeByteOff :: forall b. Ptr b -> Int -> ImageChannelOrder -> IO ()
$cpeek :: Ptr ImageChannelOrder -> IO ImageChannelOrder
peek :: Ptr ImageChannelOrder -> IO ImageChannelOrder
$cpoke :: Ptr ImageChannelOrder -> ImageChannelOrder -> IO ()
poke :: Ptr ImageChannelOrder -> ImageChannelOrder -> IO ()
Storable)

instance Show ImageChannelOrder where
  showsPrec :: Int -> ImageChannelOrder -> ShowS
showsPrec Int
p (ImageChannelOrder Word32
v) = case Word32
v of
    Word32
0 -> String -> ShowS
showString String
"R"
    Word32
1 -> String -> ShowS
showString String
"A"
    Word32
2 -> String -> ShowS
showString String
"RG"
    Word32
3 -> String -> ShowS
showString String
"RA"
    Word32
4 -> String -> ShowS
showString String
"RGB"
    Word32
5 -> String -> ShowS
showString String
"RGBA"
    Word32
6 -> String -> ShowS
showString String
"BGRA"
    Word32
7 -> String -> ShowS
showString String
"ARGB"
    Word32
8 -> String -> ShowS
showString String
"Intensity"
    Word32
9 -> String -> ShowS
showString String
"Luminance"
    Word32
10 -> String -> ShowS
showString String
"Rx"
    Word32
11 -> String -> ShowS
showString String
"RGx"
    Word32
12 -> String -> ShowS
showString String
"RGBx"
    Word32
13 -> String -> ShowS
showString String
"Depth"
    Word32
14 -> String -> ShowS
showString String
"DepthStencil"
    Word32
15 -> String -> ShowS
showString String
"SRGB"
    Word32
16 -> String -> ShowS
showString String
"SRGBx"
    Word32
17 -> String -> ShowS
showString String
"SRGBA"
    Word32
18 -> String -> ShowS
showString String
"SBGRA"
    Word32
19 -> String -> ShowS
showString String
"ABGR"
    Word32
x -> Bool -> ShowS -> ShowS
showParen (Int
p Int -> Int -> Bool
forall a. Ord a => a -> a -> Bool
> Int
10) (ShowS -> ShowS) -> ShowS -> ShowS
forall a b. (a -> b) -> a -> b
$ String -> ShowS
showString String
"ImageChannelOrder " ShowS -> ShowS -> ShowS
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Int -> Word32 -> ShowS
forall a. Show a => Int -> a -> ShowS
showsPrec (Int
p Int -> Int -> Int
forall a. Num a => a -> a -> a
+ Int
1) Word32
x

pattern R :: ImageChannelOrder
pattern $mR :: forall {r}. ImageChannelOrder -> ((# #) -> r) -> ((# #) -> r) -> r
$bR :: ImageChannelOrder
R = ImageChannelOrder 0

pattern A :: ImageChannelOrder
pattern $mA :: forall {r}. ImageChannelOrder -> ((# #) -> r) -> ((# #) -> r) -> r
$bA :: ImageChannelOrder
A = ImageChannelOrder 1

pattern RG :: ImageChannelOrder
pattern $mRG :: forall {r}. ImageChannelOrder -> ((# #) -> r) -> ((# #) -> r) -> r
$bRG :: ImageChannelOrder
RG = ImageChannelOrder 2

pattern RA :: ImageChannelOrder
pattern $mRA :: forall {r}. ImageChannelOrder -> ((# #) -> r) -> ((# #) -> r) -> r
$bRA :: ImageChannelOrder
RA = ImageChannelOrder 3

pattern RGB :: ImageChannelOrder
pattern $mRGB :: forall {r}. ImageChannelOrder -> ((# #) -> r) -> ((# #) -> r) -> r
$bRGB :: ImageChannelOrder
RGB = ImageChannelOrder 4

pattern RGBA :: ImageChannelOrder
pattern $mRGBA :: forall {r}. ImageChannelOrder -> ((# #) -> r) -> ((# #) -> r) -> r
$bRGBA :: ImageChannelOrder
RGBA = ImageChannelOrder 5

pattern BGRA :: ImageChannelOrder
pattern $mBGRA :: forall {r}. ImageChannelOrder -> ((# #) -> r) -> ((# #) -> r) -> r
$bBGRA :: ImageChannelOrder
BGRA = ImageChannelOrder 6

pattern ARGB :: ImageChannelOrder
pattern $mARGB :: forall {r}. ImageChannelOrder -> ((# #) -> r) -> ((# #) -> r) -> r
$bARGB :: ImageChannelOrder
ARGB = ImageChannelOrder 7

pattern Intensity :: ImageChannelOrder
pattern $mIntensity :: forall {r}. ImageChannelOrder -> ((# #) -> r) -> ((# #) -> r) -> r
$bIntensity :: ImageChannelOrder
Intensity = ImageChannelOrder 8

pattern Luminance :: ImageChannelOrder
pattern $mLuminance :: forall {r}. ImageChannelOrder -> ((# #) -> r) -> ((# #) -> r) -> r
$bLuminance :: ImageChannelOrder
Luminance = ImageChannelOrder 9

pattern Rx :: ImageChannelOrder
pattern $mRx :: forall {r}. ImageChannelOrder -> ((# #) -> r) -> ((# #) -> r) -> r
$bRx :: ImageChannelOrder
Rx = ImageChannelOrder 10

pattern RGx :: ImageChannelOrder
pattern $mRGx :: forall {r}. ImageChannelOrder -> ((# #) -> r) -> ((# #) -> r) -> r
$bRGx :: ImageChannelOrder
RGx = ImageChannelOrder 11

pattern RGBx :: ImageChannelOrder
pattern $mRGBx :: forall {r}. ImageChannelOrder -> ((# #) -> r) -> ((# #) -> r) -> r
$bRGBx :: ImageChannelOrder
RGBx = ImageChannelOrder 12

pattern Depth :: ImageChannelOrder
pattern $mDepth :: forall {r}. ImageChannelOrder -> ((# #) -> r) -> ((# #) -> r) -> r
$bDepth :: ImageChannelOrder
Depth = ImageChannelOrder 13

pattern DepthStencil :: ImageChannelOrder
pattern $mDepthStencil :: forall {r}. ImageChannelOrder -> ((# #) -> r) -> ((# #) -> r) -> r
$bDepthStencil :: ImageChannelOrder
DepthStencil = ImageChannelOrder 14

pattern SRGB :: ImageChannelOrder
pattern $mSRGB :: forall {r}. ImageChannelOrder -> ((# #) -> r) -> ((# #) -> r) -> r
$bSRGB :: ImageChannelOrder
SRGB = ImageChannelOrder 15

pattern SRGBx :: ImageChannelOrder
pattern $mSRGBx :: forall {r}. ImageChannelOrder -> ((# #) -> r) -> ((# #) -> r) -> r
$bSRGBx :: ImageChannelOrder
SRGBx = ImageChannelOrder 16

pattern SRGBA :: ImageChannelOrder
pattern $mSRGBA :: forall {r}. ImageChannelOrder -> ((# #) -> r) -> ((# #) -> r) -> r
$bSRGBA :: ImageChannelOrder
SRGBA = ImageChannelOrder 17

pattern SBGRA :: ImageChannelOrder
pattern $mSBGRA :: forall {r}. ImageChannelOrder -> ((# #) -> r) -> ((# #) -> r) -> r
$bSBGRA :: ImageChannelOrder
SBGRA = ImageChannelOrder 18

pattern ABGR :: ImageChannelOrder
pattern $mABGR :: forall {r}. ImageChannelOrder -> ((# #) -> r) -> ((# #) -> r) -> r
$bABGR :: ImageChannelOrder
ABGR = ImageChannelOrder 19