{-# language CPP #-}
module Vulkan.Core10.Enums.QueryResultFlagBits ( QueryResultFlagBits( QUERY_RESULT_64_BIT
, QUERY_RESULT_WAIT_BIT
, QUERY_RESULT_WITH_AVAILABILITY_BIT
, QUERY_RESULT_PARTIAL_BIT
, ..
)
, QueryResultFlags
) 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.FundamentalTypes (Flags)
import Vulkan.Zero (Zero)
newtype QueryResultFlagBits = QueryResultFlagBits Flags
deriving newtype (QueryResultFlagBits -> QueryResultFlagBits -> Bool
(QueryResultFlagBits -> QueryResultFlagBits -> Bool)
-> (QueryResultFlagBits -> QueryResultFlagBits -> Bool)
-> Eq QueryResultFlagBits
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: QueryResultFlagBits -> QueryResultFlagBits -> Bool
$c/= :: QueryResultFlagBits -> QueryResultFlagBits -> Bool
== :: QueryResultFlagBits -> QueryResultFlagBits -> Bool
$c== :: QueryResultFlagBits -> QueryResultFlagBits -> Bool
Eq, Eq QueryResultFlagBits
Eq QueryResultFlagBits =>
(QueryResultFlagBits -> QueryResultFlagBits -> Ordering)
-> (QueryResultFlagBits -> QueryResultFlagBits -> Bool)
-> (QueryResultFlagBits -> QueryResultFlagBits -> Bool)
-> (QueryResultFlagBits -> QueryResultFlagBits -> Bool)
-> (QueryResultFlagBits -> QueryResultFlagBits -> Bool)
-> (QueryResultFlagBits
-> QueryResultFlagBits -> QueryResultFlagBits)
-> (QueryResultFlagBits
-> QueryResultFlagBits -> QueryResultFlagBits)
-> Ord QueryResultFlagBits
QueryResultFlagBits -> QueryResultFlagBits -> Bool
QueryResultFlagBits -> QueryResultFlagBits -> Ordering
QueryResultFlagBits -> QueryResultFlagBits -> QueryResultFlagBits
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 :: QueryResultFlagBits -> QueryResultFlagBits -> QueryResultFlagBits
$cmin :: QueryResultFlagBits -> QueryResultFlagBits -> QueryResultFlagBits
max :: QueryResultFlagBits -> QueryResultFlagBits -> QueryResultFlagBits
$cmax :: QueryResultFlagBits -> QueryResultFlagBits -> QueryResultFlagBits
>= :: QueryResultFlagBits -> QueryResultFlagBits -> Bool
$c>= :: QueryResultFlagBits -> QueryResultFlagBits -> Bool
> :: QueryResultFlagBits -> QueryResultFlagBits -> Bool
$c> :: QueryResultFlagBits -> QueryResultFlagBits -> Bool
<= :: QueryResultFlagBits -> QueryResultFlagBits -> Bool
$c<= :: QueryResultFlagBits -> QueryResultFlagBits -> Bool
< :: QueryResultFlagBits -> QueryResultFlagBits -> Bool
$c< :: QueryResultFlagBits -> QueryResultFlagBits -> Bool
compare :: QueryResultFlagBits -> QueryResultFlagBits -> Ordering
$ccompare :: QueryResultFlagBits -> QueryResultFlagBits -> Ordering
$cp1Ord :: Eq QueryResultFlagBits
Ord, Ptr b -> Int -> IO QueryResultFlagBits
Ptr b -> Int -> QueryResultFlagBits -> IO ()
Ptr QueryResultFlagBits -> IO QueryResultFlagBits
Ptr QueryResultFlagBits -> Int -> IO QueryResultFlagBits
Ptr QueryResultFlagBits -> Int -> QueryResultFlagBits -> IO ()
Ptr QueryResultFlagBits -> QueryResultFlagBits -> IO ()
QueryResultFlagBits -> Int
(QueryResultFlagBits -> Int)
-> (QueryResultFlagBits -> Int)
-> (Ptr QueryResultFlagBits -> Int -> IO QueryResultFlagBits)
-> (Ptr QueryResultFlagBits -> Int -> QueryResultFlagBits -> IO ())
-> (forall b. Ptr b -> Int -> IO QueryResultFlagBits)
-> (forall b. Ptr b -> Int -> QueryResultFlagBits -> IO ())
-> (Ptr QueryResultFlagBits -> IO QueryResultFlagBits)
-> (Ptr QueryResultFlagBits -> QueryResultFlagBits -> IO ())
-> Storable QueryResultFlagBits
forall b. Ptr b -> Int -> IO QueryResultFlagBits
forall b. Ptr b -> Int -> QueryResultFlagBits -> 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 QueryResultFlagBits -> QueryResultFlagBits -> IO ()
$cpoke :: Ptr QueryResultFlagBits -> QueryResultFlagBits -> IO ()
peek :: Ptr QueryResultFlagBits -> IO QueryResultFlagBits
$cpeek :: Ptr QueryResultFlagBits -> IO QueryResultFlagBits
pokeByteOff :: Ptr b -> Int -> QueryResultFlagBits -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> QueryResultFlagBits -> IO ()
peekByteOff :: Ptr b -> Int -> IO QueryResultFlagBits
$cpeekByteOff :: forall b. Ptr b -> Int -> IO QueryResultFlagBits
pokeElemOff :: Ptr QueryResultFlagBits -> Int -> QueryResultFlagBits -> IO ()
$cpokeElemOff :: Ptr QueryResultFlagBits -> Int -> QueryResultFlagBits -> IO ()
peekElemOff :: Ptr QueryResultFlagBits -> Int -> IO QueryResultFlagBits
$cpeekElemOff :: Ptr QueryResultFlagBits -> Int -> IO QueryResultFlagBits
alignment :: QueryResultFlagBits -> Int
$calignment :: QueryResultFlagBits -> Int
sizeOf :: QueryResultFlagBits -> Int
$csizeOf :: QueryResultFlagBits -> Int
Storable, QueryResultFlagBits
QueryResultFlagBits -> Zero QueryResultFlagBits
forall a. a -> Zero a
zero :: QueryResultFlagBits
$czero :: QueryResultFlagBits
Zero, Eq QueryResultFlagBits
QueryResultFlagBits
Eq QueryResultFlagBits =>
(QueryResultFlagBits -> QueryResultFlagBits -> QueryResultFlagBits)
-> (QueryResultFlagBits
-> QueryResultFlagBits -> QueryResultFlagBits)
-> (QueryResultFlagBits
-> QueryResultFlagBits -> QueryResultFlagBits)
-> (QueryResultFlagBits -> QueryResultFlagBits)
-> (QueryResultFlagBits -> Int -> QueryResultFlagBits)
-> (QueryResultFlagBits -> Int -> QueryResultFlagBits)
-> QueryResultFlagBits
-> (Int -> QueryResultFlagBits)
-> (QueryResultFlagBits -> Int -> QueryResultFlagBits)
-> (QueryResultFlagBits -> Int -> QueryResultFlagBits)
-> (QueryResultFlagBits -> Int -> QueryResultFlagBits)
-> (QueryResultFlagBits -> Int -> Bool)
-> (QueryResultFlagBits -> Maybe Int)
-> (QueryResultFlagBits -> Int)
-> (QueryResultFlagBits -> Bool)
-> (QueryResultFlagBits -> Int -> QueryResultFlagBits)
-> (QueryResultFlagBits -> Int -> QueryResultFlagBits)
-> (QueryResultFlagBits -> Int -> QueryResultFlagBits)
-> (QueryResultFlagBits -> Int -> QueryResultFlagBits)
-> (QueryResultFlagBits -> Int -> QueryResultFlagBits)
-> (QueryResultFlagBits -> Int -> QueryResultFlagBits)
-> (QueryResultFlagBits -> Int)
-> Bits QueryResultFlagBits
Int -> QueryResultFlagBits
QueryResultFlagBits -> Bool
QueryResultFlagBits -> Int
QueryResultFlagBits -> Maybe Int
QueryResultFlagBits -> QueryResultFlagBits
QueryResultFlagBits -> Int -> Bool
QueryResultFlagBits -> Int -> QueryResultFlagBits
QueryResultFlagBits -> QueryResultFlagBits -> QueryResultFlagBits
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 :: QueryResultFlagBits -> Int
$cpopCount :: QueryResultFlagBits -> Int
rotateR :: QueryResultFlagBits -> Int -> QueryResultFlagBits
$crotateR :: QueryResultFlagBits -> Int -> QueryResultFlagBits
rotateL :: QueryResultFlagBits -> Int -> QueryResultFlagBits
$crotateL :: QueryResultFlagBits -> Int -> QueryResultFlagBits
unsafeShiftR :: QueryResultFlagBits -> Int -> QueryResultFlagBits
$cunsafeShiftR :: QueryResultFlagBits -> Int -> QueryResultFlagBits
shiftR :: QueryResultFlagBits -> Int -> QueryResultFlagBits
$cshiftR :: QueryResultFlagBits -> Int -> QueryResultFlagBits
unsafeShiftL :: QueryResultFlagBits -> Int -> QueryResultFlagBits
$cunsafeShiftL :: QueryResultFlagBits -> Int -> QueryResultFlagBits
shiftL :: QueryResultFlagBits -> Int -> QueryResultFlagBits
$cshiftL :: QueryResultFlagBits -> Int -> QueryResultFlagBits
isSigned :: QueryResultFlagBits -> Bool
$cisSigned :: QueryResultFlagBits -> Bool
bitSize :: QueryResultFlagBits -> Int
$cbitSize :: QueryResultFlagBits -> Int
bitSizeMaybe :: QueryResultFlagBits -> Maybe Int
$cbitSizeMaybe :: QueryResultFlagBits -> Maybe Int
testBit :: QueryResultFlagBits -> Int -> Bool
$ctestBit :: QueryResultFlagBits -> Int -> Bool
complementBit :: QueryResultFlagBits -> Int -> QueryResultFlagBits
$ccomplementBit :: QueryResultFlagBits -> Int -> QueryResultFlagBits
clearBit :: QueryResultFlagBits -> Int -> QueryResultFlagBits
$cclearBit :: QueryResultFlagBits -> Int -> QueryResultFlagBits
setBit :: QueryResultFlagBits -> Int -> QueryResultFlagBits
$csetBit :: QueryResultFlagBits -> Int -> QueryResultFlagBits
bit :: Int -> QueryResultFlagBits
$cbit :: Int -> QueryResultFlagBits
zeroBits :: QueryResultFlagBits
$czeroBits :: QueryResultFlagBits
rotate :: QueryResultFlagBits -> Int -> QueryResultFlagBits
$crotate :: QueryResultFlagBits -> Int -> QueryResultFlagBits
shift :: QueryResultFlagBits -> Int -> QueryResultFlagBits
$cshift :: QueryResultFlagBits -> Int -> QueryResultFlagBits
complement :: QueryResultFlagBits -> QueryResultFlagBits
$ccomplement :: QueryResultFlagBits -> QueryResultFlagBits
xor :: QueryResultFlagBits -> QueryResultFlagBits -> QueryResultFlagBits
$cxor :: QueryResultFlagBits -> QueryResultFlagBits -> QueryResultFlagBits
.|. :: QueryResultFlagBits -> QueryResultFlagBits -> QueryResultFlagBits
$c.|. :: QueryResultFlagBits -> QueryResultFlagBits -> QueryResultFlagBits
.&. :: QueryResultFlagBits -> QueryResultFlagBits -> QueryResultFlagBits
$c.&. :: QueryResultFlagBits -> QueryResultFlagBits -> QueryResultFlagBits
$cp1Bits :: Eq QueryResultFlagBits
Bits)
pattern $bQUERY_RESULT_64_BIT :: QueryResultFlagBits
$mQUERY_RESULT_64_BIT :: forall r. QueryResultFlagBits -> (Void# -> r) -> (Void# -> r) -> r
QUERY_RESULT_64_BIT = QueryResultFlagBits 0x00000001
pattern $bQUERY_RESULT_WAIT_BIT :: QueryResultFlagBits
$mQUERY_RESULT_WAIT_BIT :: forall r. QueryResultFlagBits -> (Void# -> r) -> (Void# -> r) -> r
QUERY_RESULT_WAIT_BIT = QueryResultFlagBits 0x00000002
pattern $bQUERY_RESULT_WITH_AVAILABILITY_BIT :: QueryResultFlagBits
$mQUERY_RESULT_WITH_AVAILABILITY_BIT :: forall r. QueryResultFlagBits -> (Void# -> r) -> (Void# -> r) -> r
QUERY_RESULT_WITH_AVAILABILITY_BIT = QueryResultFlagBits 0x00000004
pattern $bQUERY_RESULT_PARTIAL_BIT :: QueryResultFlagBits
$mQUERY_RESULT_PARTIAL_BIT :: forall r. QueryResultFlagBits -> (Void# -> r) -> (Void# -> r) -> r
QUERY_RESULT_PARTIAL_BIT = QueryResultFlagBits 0x00000008
type QueryResultFlags = QueryResultFlagBits
instance Show QueryResultFlagBits where
showsPrec :: Int -> QueryResultFlagBits -> ShowS
showsPrec p :: Int
p = \case
QUERY_RESULT_64_BIT -> String -> ShowS
showString "QUERY_RESULT_64_BIT"
QUERY_RESULT_WAIT_BIT -> String -> ShowS
showString "QUERY_RESULT_WAIT_BIT"
QUERY_RESULT_WITH_AVAILABILITY_BIT -> String -> ShowS
showString "QUERY_RESULT_WITH_AVAILABILITY_BIT"
QUERY_RESULT_PARTIAL_BIT -> String -> ShowS
showString "QUERY_RESULT_PARTIAL_BIT"
QueryResultFlagBits x :: Flags
x -> Bool -> ShowS -> ShowS
showParen (Int
p Int -> Int -> Bool
forall a. Ord a => a -> a -> Bool
>= 11) (String -> ShowS
showString "QueryResultFlagBits 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 QueryResultFlagBits where
readPrec :: ReadPrec QueryResultFlagBits
readPrec = ReadPrec QueryResultFlagBits -> ReadPrec QueryResultFlagBits
forall a. ReadPrec a -> ReadPrec a
parens ([(String, ReadPrec QueryResultFlagBits)]
-> ReadPrec QueryResultFlagBits
forall a. [(String, ReadPrec a)] -> ReadPrec a
choose [("QUERY_RESULT_64_BIT", QueryResultFlagBits -> ReadPrec QueryResultFlagBits
forall (f :: * -> *) a. Applicative f => a -> f a
pure QueryResultFlagBits
QUERY_RESULT_64_BIT)
, ("QUERY_RESULT_WAIT_BIT", QueryResultFlagBits -> ReadPrec QueryResultFlagBits
forall (f :: * -> *) a. Applicative f => a -> f a
pure QueryResultFlagBits
QUERY_RESULT_WAIT_BIT)
, ("QUERY_RESULT_WITH_AVAILABILITY_BIT", QueryResultFlagBits -> ReadPrec QueryResultFlagBits
forall (f :: * -> *) a. Applicative f => a -> f a
pure QueryResultFlagBits
QUERY_RESULT_WITH_AVAILABILITY_BIT)
, ("QUERY_RESULT_PARTIAL_BIT", QueryResultFlagBits -> ReadPrec QueryResultFlagBits
forall (f :: * -> *) a. Applicative f => a -> f a
pure QueryResultFlagBits
QUERY_RESULT_PARTIAL_BIT)]
ReadPrec QueryResultFlagBits
-> ReadPrec QueryResultFlagBits -> ReadPrec QueryResultFlagBits
forall a. ReadPrec a -> ReadPrec a -> ReadPrec a
+++
Int -> ReadPrec QueryResultFlagBits -> ReadPrec QueryResultFlagBits
forall a. Int -> ReadPrec a -> ReadPrec a
prec 10 (do
Lexeme -> ReadPrec ()
expectP (String -> Lexeme
Ident "QueryResultFlagBits")
Flags
v <- ReadPrec Flags -> ReadPrec Flags
forall a. ReadPrec a -> ReadPrec a
step ReadPrec Flags
forall a. Read a => ReadPrec a
readPrec
QueryResultFlagBits -> ReadPrec QueryResultFlagBits
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Flags -> QueryResultFlagBits
QueryResultFlagBits Flags
v)))