{-# language CPP #-}
module Vulkan.Core11.Enums.SemaphoreImportFlagBits  ( SemaphoreImportFlagBits( SEMAPHORE_IMPORT_TEMPORARY_BIT
                                                                             , ..
                                                                             )
                                                    , SemaphoreImportFlags
                                                    ) 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)
-- | VkSemaphoreImportFlagBits - Bitmask specifying additional parameters of
-- semaphore payload import
--
-- = Description
--
-- These bits have the following meanings:
--
-- = See Also
--
-- 'SemaphoreImportFlags'
newtype SemaphoreImportFlagBits = SemaphoreImportFlagBits Flags
  deriving newtype (SemaphoreImportFlagBits -> SemaphoreImportFlagBits -> Bool
(SemaphoreImportFlagBits -> SemaphoreImportFlagBits -> Bool)
-> (SemaphoreImportFlagBits -> SemaphoreImportFlagBits -> Bool)
-> Eq SemaphoreImportFlagBits
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SemaphoreImportFlagBits -> SemaphoreImportFlagBits -> Bool
$c/= :: SemaphoreImportFlagBits -> SemaphoreImportFlagBits -> Bool
== :: SemaphoreImportFlagBits -> SemaphoreImportFlagBits -> Bool
$c== :: SemaphoreImportFlagBits -> SemaphoreImportFlagBits -> Bool
Eq, Eq SemaphoreImportFlagBits
Eq SemaphoreImportFlagBits =>
(SemaphoreImportFlagBits -> SemaphoreImportFlagBits -> Ordering)
-> (SemaphoreImportFlagBits -> SemaphoreImportFlagBits -> Bool)
-> (SemaphoreImportFlagBits -> SemaphoreImportFlagBits -> Bool)
-> (SemaphoreImportFlagBits -> SemaphoreImportFlagBits -> Bool)
-> (SemaphoreImportFlagBits -> SemaphoreImportFlagBits -> Bool)
-> (SemaphoreImportFlagBits
    -> SemaphoreImportFlagBits -> SemaphoreImportFlagBits)
-> (SemaphoreImportFlagBits
    -> SemaphoreImportFlagBits -> SemaphoreImportFlagBits)
-> Ord SemaphoreImportFlagBits
SemaphoreImportFlagBits -> SemaphoreImportFlagBits -> Bool
SemaphoreImportFlagBits -> SemaphoreImportFlagBits -> Ordering
SemaphoreImportFlagBits
-> SemaphoreImportFlagBits -> SemaphoreImportFlagBits
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 :: SemaphoreImportFlagBits
-> SemaphoreImportFlagBits -> SemaphoreImportFlagBits
$cmin :: SemaphoreImportFlagBits
-> SemaphoreImportFlagBits -> SemaphoreImportFlagBits
max :: SemaphoreImportFlagBits
-> SemaphoreImportFlagBits -> SemaphoreImportFlagBits
$cmax :: SemaphoreImportFlagBits
-> SemaphoreImportFlagBits -> SemaphoreImportFlagBits
>= :: SemaphoreImportFlagBits -> SemaphoreImportFlagBits -> Bool
$c>= :: SemaphoreImportFlagBits -> SemaphoreImportFlagBits -> Bool
> :: SemaphoreImportFlagBits -> SemaphoreImportFlagBits -> Bool
$c> :: SemaphoreImportFlagBits -> SemaphoreImportFlagBits -> Bool
<= :: SemaphoreImportFlagBits -> SemaphoreImportFlagBits -> Bool
$c<= :: SemaphoreImportFlagBits -> SemaphoreImportFlagBits -> Bool
< :: SemaphoreImportFlagBits -> SemaphoreImportFlagBits -> Bool
$c< :: SemaphoreImportFlagBits -> SemaphoreImportFlagBits -> Bool
compare :: SemaphoreImportFlagBits -> SemaphoreImportFlagBits -> Ordering
$ccompare :: SemaphoreImportFlagBits -> SemaphoreImportFlagBits -> Ordering
$cp1Ord :: Eq SemaphoreImportFlagBits
Ord, Ptr b -> Int -> IO SemaphoreImportFlagBits
Ptr b -> Int -> SemaphoreImportFlagBits -> IO ()
Ptr SemaphoreImportFlagBits -> IO SemaphoreImportFlagBits
Ptr SemaphoreImportFlagBits -> Int -> IO SemaphoreImportFlagBits
Ptr SemaphoreImportFlagBits
-> Int -> SemaphoreImportFlagBits -> IO ()
Ptr SemaphoreImportFlagBits -> SemaphoreImportFlagBits -> IO ()
SemaphoreImportFlagBits -> Int
(SemaphoreImportFlagBits -> Int)
-> (SemaphoreImportFlagBits -> Int)
-> (Ptr SemaphoreImportFlagBits
    -> Int -> IO SemaphoreImportFlagBits)
-> (Ptr SemaphoreImportFlagBits
    -> Int -> SemaphoreImportFlagBits -> IO ())
-> (forall b. Ptr b -> Int -> IO SemaphoreImportFlagBits)
-> (forall b. Ptr b -> Int -> SemaphoreImportFlagBits -> IO ())
-> (Ptr SemaphoreImportFlagBits -> IO SemaphoreImportFlagBits)
-> (Ptr SemaphoreImportFlagBits
    -> SemaphoreImportFlagBits -> IO ())
-> Storable SemaphoreImportFlagBits
forall b. Ptr b -> Int -> IO SemaphoreImportFlagBits
forall b. Ptr b -> Int -> SemaphoreImportFlagBits -> 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 SemaphoreImportFlagBits -> SemaphoreImportFlagBits -> IO ()
$cpoke :: Ptr SemaphoreImportFlagBits -> SemaphoreImportFlagBits -> IO ()
peek :: Ptr SemaphoreImportFlagBits -> IO SemaphoreImportFlagBits
$cpeek :: Ptr SemaphoreImportFlagBits -> IO SemaphoreImportFlagBits
pokeByteOff :: Ptr b -> Int -> SemaphoreImportFlagBits -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> SemaphoreImportFlagBits -> IO ()
peekByteOff :: Ptr b -> Int -> IO SemaphoreImportFlagBits
$cpeekByteOff :: forall b. Ptr b -> Int -> IO SemaphoreImportFlagBits
pokeElemOff :: Ptr SemaphoreImportFlagBits
-> Int -> SemaphoreImportFlagBits -> IO ()
$cpokeElemOff :: Ptr SemaphoreImportFlagBits
-> Int -> SemaphoreImportFlagBits -> IO ()
peekElemOff :: Ptr SemaphoreImportFlagBits -> Int -> IO SemaphoreImportFlagBits
$cpeekElemOff :: Ptr SemaphoreImportFlagBits -> Int -> IO SemaphoreImportFlagBits
alignment :: SemaphoreImportFlagBits -> Int
$calignment :: SemaphoreImportFlagBits -> Int
sizeOf :: SemaphoreImportFlagBits -> Int
$csizeOf :: SemaphoreImportFlagBits -> Int
Storable, SemaphoreImportFlagBits
SemaphoreImportFlagBits -> Zero SemaphoreImportFlagBits
forall a. a -> Zero a
zero :: SemaphoreImportFlagBits
$czero :: SemaphoreImportFlagBits
Zero, Eq SemaphoreImportFlagBits
SemaphoreImportFlagBits
Eq SemaphoreImportFlagBits =>
(SemaphoreImportFlagBits
 -> SemaphoreImportFlagBits -> SemaphoreImportFlagBits)
-> (SemaphoreImportFlagBits
    -> SemaphoreImportFlagBits -> SemaphoreImportFlagBits)
-> (SemaphoreImportFlagBits
    -> SemaphoreImportFlagBits -> SemaphoreImportFlagBits)
-> (SemaphoreImportFlagBits -> SemaphoreImportFlagBits)
-> (SemaphoreImportFlagBits -> Int -> SemaphoreImportFlagBits)
-> (SemaphoreImportFlagBits -> Int -> SemaphoreImportFlagBits)
-> SemaphoreImportFlagBits
-> (Int -> SemaphoreImportFlagBits)
-> (SemaphoreImportFlagBits -> Int -> SemaphoreImportFlagBits)
-> (SemaphoreImportFlagBits -> Int -> SemaphoreImportFlagBits)
-> (SemaphoreImportFlagBits -> Int -> SemaphoreImportFlagBits)
-> (SemaphoreImportFlagBits -> Int -> Bool)
-> (SemaphoreImportFlagBits -> Maybe Int)
-> (SemaphoreImportFlagBits -> Int)
-> (SemaphoreImportFlagBits -> Bool)
-> (SemaphoreImportFlagBits -> Int -> SemaphoreImportFlagBits)
-> (SemaphoreImportFlagBits -> Int -> SemaphoreImportFlagBits)
-> (SemaphoreImportFlagBits -> Int -> SemaphoreImportFlagBits)
-> (SemaphoreImportFlagBits -> Int -> SemaphoreImportFlagBits)
-> (SemaphoreImportFlagBits -> Int -> SemaphoreImportFlagBits)
-> (SemaphoreImportFlagBits -> Int -> SemaphoreImportFlagBits)
-> (SemaphoreImportFlagBits -> Int)
-> Bits SemaphoreImportFlagBits
Int -> SemaphoreImportFlagBits
SemaphoreImportFlagBits -> Bool
SemaphoreImportFlagBits -> Int
SemaphoreImportFlagBits -> Maybe Int
SemaphoreImportFlagBits -> SemaphoreImportFlagBits
SemaphoreImportFlagBits -> Int -> Bool
SemaphoreImportFlagBits -> Int -> SemaphoreImportFlagBits
SemaphoreImportFlagBits
-> SemaphoreImportFlagBits -> SemaphoreImportFlagBits
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 :: SemaphoreImportFlagBits -> Int
$cpopCount :: SemaphoreImportFlagBits -> Int
rotateR :: SemaphoreImportFlagBits -> Int -> SemaphoreImportFlagBits
$crotateR :: SemaphoreImportFlagBits -> Int -> SemaphoreImportFlagBits
rotateL :: SemaphoreImportFlagBits -> Int -> SemaphoreImportFlagBits
$crotateL :: SemaphoreImportFlagBits -> Int -> SemaphoreImportFlagBits
unsafeShiftR :: SemaphoreImportFlagBits -> Int -> SemaphoreImportFlagBits
$cunsafeShiftR :: SemaphoreImportFlagBits -> Int -> SemaphoreImportFlagBits
shiftR :: SemaphoreImportFlagBits -> Int -> SemaphoreImportFlagBits
$cshiftR :: SemaphoreImportFlagBits -> Int -> SemaphoreImportFlagBits
unsafeShiftL :: SemaphoreImportFlagBits -> Int -> SemaphoreImportFlagBits
$cunsafeShiftL :: SemaphoreImportFlagBits -> Int -> SemaphoreImportFlagBits
shiftL :: SemaphoreImportFlagBits -> Int -> SemaphoreImportFlagBits
$cshiftL :: SemaphoreImportFlagBits -> Int -> SemaphoreImportFlagBits
isSigned :: SemaphoreImportFlagBits -> Bool
$cisSigned :: SemaphoreImportFlagBits -> Bool
bitSize :: SemaphoreImportFlagBits -> Int
$cbitSize :: SemaphoreImportFlagBits -> Int
bitSizeMaybe :: SemaphoreImportFlagBits -> Maybe Int
$cbitSizeMaybe :: SemaphoreImportFlagBits -> Maybe Int
testBit :: SemaphoreImportFlagBits -> Int -> Bool
$ctestBit :: SemaphoreImportFlagBits -> Int -> Bool
complementBit :: SemaphoreImportFlagBits -> Int -> SemaphoreImportFlagBits
$ccomplementBit :: SemaphoreImportFlagBits -> Int -> SemaphoreImportFlagBits
clearBit :: SemaphoreImportFlagBits -> Int -> SemaphoreImportFlagBits
$cclearBit :: SemaphoreImportFlagBits -> Int -> SemaphoreImportFlagBits
setBit :: SemaphoreImportFlagBits -> Int -> SemaphoreImportFlagBits
$csetBit :: SemaphoreImportFlagBits -> Int -> SemaphoreImportFlagBits
bit :: Int -> SemaphoreImportFlagBits
$cbit :: Int -> SemaphoreImportFlagBits
zeroBits :: SemaphoreImportFlagBits
$czeroBits :: SemaphoreImportFlagBits
rotate :: SemaphoreImportFlagBits -> Int -> SemaphoreImportFlagBits
$crotate :: SemaphoreImportFlagBits -> Int -> SemaphoreImportFlagBits
shift :: SemaphoreImportFlagBits -> Int -> SemaphoreImportFlagBits
$cshift :: SemaphoreImportFlagBits -> Int -> SemaphoreImportFlagBits
complement :: SemaphoreImportFlagBits -> SemaphoreImportFlagBits
$ccomplement :: SemaphoreImportFlagBits -> SemaphoreImportFlagBits
xor :: SemaphoreImportFlagBits
-> SemaphoreImportFlagBits -> SemaphoreImportFlagBits
$cxor :: SemaphoreImportFlagBits
-> SemaphoreImportFlagBits -> SemaphoreImportFlagBits
.|. :: SemaphoreImportFlagBits
-> SemaphoreImportFlagBits -> SemaphoreImportFlagBits
$c.|. :: SemaphoreImportFlagBits
-> SemaphoreImportFlagBits -> SemaphoreImportFlagBits
.&. :: SemaphoreImportFlagBits
-> SemaphoreImportFlagBits -> SemaphoreImportFlagBits
$c.&. :: SemaphoreImportFlagBits
-> SemaphoreImportFlagBits -> SemaphoreImportFlagBits
$cp1Bits :: Eq SemaphoreImportFlagBits
Bits)

-- | 'SEMAPHORE_IMPORT_TEMPORARY_BIT' specifies that the semaphore payload
-- will be imported only temporarily, as described in
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-semaphores-importing Importing Semaphore Payloads>,
-- regardless of the permanence of @handleType@.
pattern $bSEMAPHORE_IMPORT_TEMPORARY_BIT :: SemaphoreImportFlagBits
$mSEMAPHORE_IMPORT_TEMPORARY_BIT :: forall r.
SemaphoreImportFlagBits -> (Void# -> r) -> (Void# -> r) -> r
SEMAPHORE_IMPORT_TEMPORARY_BIT = SemaphoreImportFlagBits 0x00000001

type SemaphoreImportFlags = SemaphoreImportFlagBits

instance Show SemaphoreImportFlagBits where
  showsPrec :: Int -> SemaphoreImportFlagBits -> ShowS
showsPrec p :: Int
p = \case
    SEMAPHORE_IMPORT_TEMPORARY_BIT -> String -> ShowS
showString "SEMAPHORE_IMPORT_TEMPORARY_BIT"
    SemaphoreImportFlagBits x :: Flags
x -> Bool -> ShowS -> ShowS
showParen (Int
p Int -> Int -> Bool
forall a. Ord a => a -> a -> Bool
>= 11) (String -> ShowS
showString "SemaphoreImportFlagBits 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 SemaphoreImportFlagBits where
  readPrec :: ReadPrec SemaphoreImportFlagBits
readPrec = ReadPrec SemaphoreImportFlagBits
-> ReadPrec SemaphoreImportFlagBits
forall a. ReadPrec a -> ReadPrec a
parens ([(String, ReadPrec SemaphoreImportFlagBits)]
-> ReadPrec SemaphoreImportFlagBits
forall a. [(String, ReadPrec a)] -> ReadPrec a
choose [("SEMAPHORE_IMPORT_TEMPORARY_BIT", SemaphoreImportFlagBits -> ReadPrec SemaphoreImportFlagBits
forall (f :: * -> *) a. Applicative f => a -> f a
pure SemaphoreImportFlagBits
SEMAPHORE_IMPORT_TEMPORARY_BIT)]
                     ReadPrec SemaphoreImportFlagBits
-> ReadPrec SemaphoreImportFlagBits
-> ReadPrec SemaphoreImportFlagBits
forall a. ReadPrec a -> ReadPrec a -> ReadPrec a
+++
                     Int
-> ReadPrec SemaphoreImportFlagBits
-> ReadPrec SemaphoreImportFlagBits
forall a. Int -> ReadPrec a -> ReadPrec a
prec 10 (do
                       Lexeme -> ReadPrec ()
expectP (String -> Lexeme
Ident "SemaphoreImportFlagBits")
                       Flags
v <- ReadPrec Flags -> ReadPrec Flags
forall a. ReadPrec a -> ReadPrec a
step ReadPrec Flags
forall a. Read a => ReadPrec a
readPrec
                       SemaphoreImportFlagBits -> ReadPrec SemaphoreImportFlagBits
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Flags -> SemaphoreImportFlagBits
SemaphoreImportFlagBits Flags
v)))