{-# language CPP #-}
module Vulkan.Core10.Enums.FenceCreateFlagBits  ( FenceCreateFlagBits( FENCE_CREATE_SIGNALED_BIT
                                                                     , ..
                                                                     )
                                                , FenceCreateFlags
                                                ) where

import GHC.Read (choose)
import GHC.Read (expectP)
import GHC.Read (parens)
import GHC.Show (showParen)
import GHC.Show (showString)
import Numeric (showHex)
import Text.ParserCombinators.ReadPrec ((+++))
import Text.ParserCombinators.ReadPrec (prec)
import Text.ParserCombinators.ReadPrec (step)
import Data.Bits (Bits)
import Foreign.Storable (Storable)
import GHC.Read (Read(readPrec))
import Text.Read.Lex (Lexeme(Ident))
import Vulkan.Core10.BaseType (Flags)
import Vulkan.Zero (Zero)
-- | VkFenceCreateFlagBits - Bitmask specifying initial state and behavior of
-- a fence
--
-- = See Also
--
-- 'FenceCreateFlags'
newtype FenceCreateFlagBits = FenceCreateFlagBits Flags
  deriving newtype (FenceCreateFlagBits -> FenceCreateFlagBits -> Bool
(FenceCreateFlagBits -> FenceCreateFlagBits -> Bool)
-> (FenceCreateFlagBits -> FenceCreateFlagBits -> Bool)
-> Eq FenceCreateFlagBits
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FenceCreateFlagBits -> FenceCreateFlagBits -> Bool
$c/= :: FenceCreateFlagBits -> FenceCreateFlagBits -> Bool
== :: FenceCreateFlagBits -> FenceCreateFlagBits -> Bool
$c== :: FenceCreateFlagBits -> FenceCreateFlagBits -> Bool
Eq, Eq FenceCreateFlagBits
Eq FenceCreateFlagBits =>
(FenceCreateFlagBits -> FenceCreateFlagBits -> Ordering)
-> (FenceCreateFlagBits -> FenceCreateFlagBits -> Bool)
-> (FenceCreateFlagBits -> FenceCreateFlagBits -> Bool)
-> (FenceCreateFlagBits -> FenceCreateFlagBits -> Bool)
-> (FenceCreateFlagBits -> FenceCreateFlagBits -> Bool)
-> (FenceCreateFlagBits
    -> FenceCreateFlagBits -> FenceCreateFlagBits)
-> (FenceCreateFlagBits
    -> FenceCreateFlagBits -> FenceCreateFlagBits)
-> Ord FenceCreateFlagBits
FenceCreateFlagBits -> FenceCreateFlagBits -> Bool
FenceCreateFlagBits -> FenceCreateFlagBits -> Ordering
FenceCreateFlagBits -> FenceCreateFlagBits -> FenceCreateFlagBits
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 :: FenceCreateFlagBits -> FenceCreateFlagBits -> FenceCreateFlagBits
$cmin :: FenceCreateFlagBits -> FenceCreateFlagBits -> FenceCreateFlagBits
max :: FenceCreateFlagBits -> FenceCreateFlagBits -> FenceCreateFlagBits
$cmax :: FenceCreateFlagBits -> FenceCreateFlagBits -> FenceCreateFlagBits
>= :: FenceCreateFlagBits -> FenceCreateFlagBits -> Bool
$c>= :: FenceCreateFlagBits -> FenceCreateFlagBits -> Bool
> :: FenceCreateFlagBits -> FenceCreateFlagBits -> Bool
$c> :: FenceCreateFlagBits -> FenceCreateFlagBits -> Bool
<= :: FenceCreateFlagBits -> FenceCreateFlagBits -> Bool
$c<= :: FenceCreateFlagBits -> FenceCreateFlagBits -> Bool
< :: FenceCreateFlagBits -> FenceCreateFlagBits -> Bool
$c< :: FenceCreateFlagBits -> FenceCreateFlagBits -> Bool
compare :: FenceCreateFlagBits -> FenceCreateFlagBits -> Ordering
$ccompare :: FenceCreateFlagBits -> FenceCreateFlagBits -> Ordering
$cp1Ord :: Eq FenceCreateFlagBits
Ord, Ptr b -> Int -> IO FenceCreateFlagBits
Ptr b -> Int -> FenceCreateFlagBits -> IO ()
Ptr FenceCreateFlagBits -> IO FenceCreateFlagBits
Ptr FenceCreateFlagBits -> Int -> IO FenceCreateFlagBits
Ptr FenceCreateFlagBits -> Int -> FenceCreateFlagBits -> IO ()
Ptr FenceCreateFlagBits -> FenceCreateFlagBits -> IO ()
FenceCreateFlagBits -> Int
(FenceCreateFlagBits -> Int)
-> (FenceCreateFlagBits -> Int)
-> (Ptr FenceCreateFlagBits -> Int -> IO FenceCreateFlagBits)
-> (Ptr FenceCreateFlagBits -> Int -> FenceCreateFlagBits -> IO ())
-> (forall b. Ptr b -> Int -> IO FenceCreateFlagBits)
-> (forall b. Ptr b -> Int -> FenceCreateFlagBits -> IO ())
-> (Ptr FenceCreateFlagBits -> IO FenceCreateFlagBits)
-> (Ptr FenceCreateFlagBits -> FenceCreateFlagBits -> IO ())
-> Storable FenceCreateFlagBits
forall b. Ptr b -> Int -> IO FenceCreateFlagBits
forall b. Ptr b -> Int -> FenceCreateFlagBits -> 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 FenceCreateFlagBits -> FenceCreateFlagBits -> IO ()
$cpoke :: Ptr FenceCreateFlagBits -> FenceCreateFlagBits -> IO ()
peek :: Ptr FenceCreateFlagBits -> IO FenceCreateFlagBits
$cpeek :: Ptr FenceCreateFlagBits -> IO FenceCreateFlagBits
pokeByteOff :: Ptr b -> Int -> FenceCreateFlagBits -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> FenceCreateFlagBits -> IO ()
peekByteOff :: Ptr b -> Int -> IO FenceCreateFlagBits
$cpeekByteOff :: forall b. Ptr b -> Int -> IO FenceCreateFlagBits
pokeElemOff :: Ptr FenceCreateFlagBits -> Int -> FenceCreateFlagBits -> IO ()
$cpokeElemOff :: Ptr FenceCreateFlagBits -> Int -> FenceCreateFlagBits -> IO ()
peekElemOff :: Ptr FenceCreateFlagBits -> Int -> IO FenceCreateFlagBits
$cpeekElemOff :: Ptr FenceCreateFlagBits -> Int -> IO FenceCreateFlagBits
alignment :: FenceCreateFlagBits -> Int
$calignment :: FenceCreateFlagBits -> Int
sizeOf :: FenceCreateFlagBits -> Int
$csizeOf :: FenceCreateFlagBits -> Int
Storable, FenceCreateFlagBits
FenceCreateFlagBits -> Zero FenceCreateFlagBits
forall a. a -> Zero a
zero :: FenceCreateFlagBits
$czero :: FenceCreateFlagBits
Zero, Eq FenceCreateFlagBits
FenceCreateFlagBits
Eq FenceCreateFlagBits =>
(FenceCreateFlagBits -> FenceCreateFlagBits -> FenceCreateFlagBits)
-> (FenceCreateFlagBits
    -> FenceCreateFlagBits -> FenceCreateFlagBits)
-> (FenceCreateFlagBits
    -> FenceCreateFlagBits -> FenceCreateFlagBits)
-> (FenceCreateFlagBits -> FenceCreateFlagBits)
-> (FenceCreateFlagBits -> Int -> FenceCreateFlagBits)
-> (FenceCreateFlagBits -> Int -> FenceCreateFlagBits)
-> FenceCreateFlagBits
-> (Int -> FenceCreateFlagBits)
-> (FenceCreateFlagBits -> Int -> FenceCreateFlagBits)
-> (FenceCreateFlagBits -> Int -> FenceCreateFlagBits)
-> (FenceCreateFlagBits -> Int -> FenceCreateFlagBits)
-> (FenceCreateFlagBits -> Int -> Bool)
-> (FenceCreateFlagBits -> Maybe Int)
-> (FenceCreateFlagBits -> Int)
-> (FenceCreateFlagBits -> Bool)
-> (FenceCreateFlagBits -> Int -> FenceCreateFlagBits)
-> (FenceCreateFlagBits -> Int -> FenceCreateFlagBits)
-> (FenceCreateFlagBits -> Int -> FenceCreateFlagBits)
-> (FenceCreateFlagBits -> Int -> FenceCreateFlagBits)
-> (FenceCreateFlagBits -> Int -> FenceCreateFlagBits)
-> (FenceCreateFlagBits -> Int -> FenceCreateFlagBits)
-> (FenceCreateFlagBits -> Int)
-> Bits FenceCreateFlagBits
Int -> FenceCreateFlagBits
FenceCreateFlagBits -> Bool
FenceCreateFlagBits -> Int
FenceCreateFlagBits -> Maybe Int
FenceCreateFlagBits -> FenceCreateFlagBits
FenceCreateFlagBits -> Int -> Bool
FenceCreateFlagBits -> Int -> FenceCreateFlagBits
FenceCreateFlagBits -> FenceCreateFlagBits -> FenceCreateFlagBits
forall a.
Eq a =>
(a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> a
-> (Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> Bool)
-> (a -> Maybe Int)
-> (a -> Int)
-> (a -> Bool)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int)
-> Bits a
popCount :: FenceCreateFlagBits -> Int
$cpopCount :: FenceCreateFlagBits -> Int
rotateR :: FenceCreateFlagBits -> Int -> FenceCreateFlagBits
$crotateR :: FenceCreateFlagBits -> Int -> FenceCreateFlagBits
rotateL :: FenceCreateFlagBits -> Int -> FenceCreateFlagBits
$crotateL :: FenceCreateFlagBits -> Int -> FenceCreateFlagBits
unsafeShiftR :: FenceCreateFlagBits -> Int -> FenceCreateFlagBits
$cunsafeShiftR :: FenceCreateFlagBits -> Int -> FenceCreateFlagBits
shiftR :: FenceCreateFlagBits -> Int -> FenceCreateFlagBits
$cshiftR :: FenceCreateFlagBits -> Int -> FenceCreateFlagBits
unsafeShiftL :: FenceCreateFlagBits -> Int -> FenceCreateFlagBits
$cunsafeShiftL :: FenceCreateFlagBits -> Int -> FenceCreateFlagBits
shiftL :: FenceCreateFlagBits -> Int -> FenceCreateFlagBits
$cshiftL :: FenceCreateFlagBits -> Int -> FenceCreateFlagBits
isSigned :: FenceCreateFlagBits -> Bool
$cisSigned :: FenceCreateFlagBits -> Bool
bitSize :: FenceCreateFlagBits -> Int
$cbitSize :: FenceCreateFlagBits -> Int
bitSizeMaybe :: FenceCreateFlagBits -> Maybe Int
$cbitSizeMaybe :: FenceCreateFlagBits -> Maybe Int
testBit :: FenceCreateFlagBits -> Int -> Bool
$ctestBit :: FenceCreateFlagBits -> Int -> Bool
complementBit :: FenceCreateFlagBits -> Int -> FenceCreateFlagBits
$ccomplementBit :: FenceCreateFlagBits -> Int -> FenceCreateFlagBits
clearBit :: FenceCreateFlagBits -> Int -> FenceCreateFlagBits
$cclearBit :: FenceCreateFlagBits -> Int -> FenceCreateFlagBits
setBit :: FenceCreateFlagBits -> Int -> FenceCreateFlagBits
$csetBit :: FenceCreateFlagBits -> Int -> FenceCreateFlagBits
bit :: Int -> FenceCreateFlagBits
$cbit :: Int -> FenceCreateFlagBits
zeroBits :: FenceCreateFlagBits
$czeroBits :: FenceCreateFlagBits
rotate :: FenceCreateFlagBits -> Int -> FenceCreateFlagBits
$crotate :: FenceCreateFlagBits -> Int -> FenceCreateFlagBits
shift :: FenceCreateFlagBits -> Int -> FenceCreateFlagBits
$cshift :: FenceCreateFlagBits -> Int -> FenceCreateFlagBits
complement :: FenceCreateFlagBits -> FenceCreateFlagBits
$ccomplement :: FenceCreateFlagBits -> FenceCreateFlagBits
xor :: FenceCreateFlagBits -> FenceCreateFlagBits -> FenceCreateFlagBits
$cxor :: FenceCreateFlagBits -> FenceCreateFlagBits -> FenceCreateFlagBits
.|. :: FenceCreateFlagBits -> FenceCreateFlagBits -> FenceCreateFlagBits
$c.|. :: FenceCreateFlagBits -> FenceCreateFlagBits -> FenceCreateFlagBits
.&. :: FenceCreateFlagBits -> FenceCreateFlagBits -> FenceCreateFlagBits
$c.&. :: FenceCreateFlagBits -> FenceCreateFlagBits -> FenceCreateFlagBits
$cp1Bits :: Eq FenceCreateFlagBits
Bits)

-- | 'FENCE_CREATE_SIGNALED_BIT' specifies that the fence object is created
-- in the signaled state. Otherwise, it is created in the unsignaled state.
pattern $bFENCE_CREATE_SIGNALED_BIT :: FenceCreateFlagBits
$mFENCE_CREATE_SIGNALED_BIT :: forall r. FenceCreateFlagBits -> (Void# -> r) -> (Void# -> r) -> r
FENCE_CREATE_SIGNALED_BIT = FenceCreateFlagBits 0x00000001

type FenceCreateFlags = FenceCreateFlagBits

instance Show FenceCreateFlagBits where
  showsPrec :: Int -> FenceCreateFlagBits -> ShowS
showsPrec p :: Int
p = \case
    FENCE_CREATE_SIGNALED_BIT -> String -> ShowS
showString "FENCE_CREATE_SIGNALED_BIT"
    FenceCreateFlagBits x :: Flags
x -> Bool -> ShowS -> ShowS
showParen (Int
p Int -> Int -> Bool
forall a. Ord a => a -> a -> Bool
>= 11) (String -> ShowS
showString "FenceCreateFlagBits 0x" ShowS -> ShowS -> ShowS
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Flags -> ShowS
forall a. (Integral a, Show a) => a -> ShowS
showHex Flags
x)

instance Read FenceCreateFlagBits where
  readPrec :: ReadPrec FenceCreateFlagBits
readPrec = ReadPrec FenceCreateFlagBits -> ReadPrec FenceCreateFlagBits
forall a. ReadPrec a -> ReadPrec a
parens ([(String, ReadPrec FenceCreateFlagBits)]
-> ReadPrec FenceCreateFlagBits
forall a. [(String, ReadPrec a)] -> ReadPrec a
choose [("FENCE_CREATE_SIGNALED_BIT", FenceCreateFlagBits -> ReadPrec FenceCreateFlagBits
forall (f :: * -> *) a. Applicative f => a -> f a
pure FenceCreateFlagBits
FENCE_CREATE_SIGNALED_BIT)]
                     ReadPrec FenceCreateFlagBits
-> ReadPrec FenceCreateFlagBits -> ReadPrec FenceCreateFlagBits
forall a. ReadPrec a -> ReadPrec a -> ReadPrec a
+++
                     Int -> ReadPrec FenceCreateFlagBits -> ReadPrec FenceCreateFlagBits
forall a. Int -> ReadPrec a -> ReadPrec a
prec 10 (do
                       Lexeme -> ReadPrec ()
expectP (String -> Lexeme
Ident "FenceCreateFlagBits")
                       Flags
v <- ReadPrec Flags -> ReadPrec Flags
forall a. ReadPrec a -> ReadPrec a
step ReadPrec Flags
forall a. Read a => ReadPrec a
readPrec
                       FenceCreateFlagBits -> ReadPrec FenceCreateFlagBits
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Flags -> FenceCreateFlagBits
FenceCreateFlagBits Flags
v)))