{-# language CPP #-}
-- No documentation found for Chapter "SwapchainCreateFlags"
module OpenXR.Core10.Enums.SwapchainCreateFlags  (SwapchainCreateFlags(..)) where

import OpenXR.Internal.Utils (enumReadPrec)
import OpenXR.Internal.Utils (enumShowsPrec)
import GHC.Show (showString)
import Numeric (showHex)
import OpenXR.Zero (Zero)
import Data.Bits (Bits)
import Data.Bits (FiniteBits)
import Foreign.Storable (Storable)
import GHC.Read (Read(readPrec))
import GHC.Show (Show(showsPrec))
import OpenXR.Core10.FundamentalTypes (Flags64)
-- | XrSwapchainCreateFlags - Swapchain creation flags
--
-- == Flag Descriptions
--
-- A runtime /may/ implement any of these, but is not required to. A
-- runtime /must/ return
-- 'OpenXR.Core10.Enums.Result.ERROR_FEATURE_UNSUPPORTED' from
-- 'OpenXR.Core10.Image.createSwapchain' if an 'SwapchainCreateFlags' bit
-- is requested but not implemented.
--
-- = See Also
--
-- 'OpenXR.Core10.Image.SwapchainCreateInfo',
-- 'OpenXR.Core10.Image.createSwapchain'
newtype SwapchainCreateFlags = SwapchainCreateFlags Flags64
  deriving newtype (SwapchainCreateFlags -> SwapchainCreateFlags -> Bool
(SwapchainCreateFlags -> SwapchainCreateFlags -> Bool)
-> (SwapchainCreateFlags -> SwapchainCreateFlags -> Bool)
-> Eq SwapchainCreateFlags
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SwapchainCreateFlags -> SwapchainCreateFlags -> Bool
$c/= :: SwapchainCreateFlags -> SwapchainCreateFlags -> Bool
== :: SwapchainCreateFlags -> SwapchainCreateFlags -> Bool
$c== :: SwapchainCreateFlags -> SwapchainCreateFlags -> Bool
Eq, Eq SwapchainCreateFlags
Eq SwapchainCreateFlags =>
(SwapchainCreateFlags -> SwapchainCreateFlags -> Ordering)
-> (SwapchainCreateFlags -> SwapchainCreateFlags -> Bool)
-> (SwapchainCreateFlags -> SwapchainCreateFlags -> Bool)
-> (SwapchainCreateFlags -> SwapchainCreateFlags -> Bool)
-> (SwapchainCreateFlags -> SwapchainCreateFlags -> Bool)
-> (SwapchainCreateFlags
    -> SwapchainCreateFlags -> SwapchainCreateFlags)
-> (SwapchainCreateFlags
    -> SwapchainCreateFlags -> SwapchainCreateFlags)
-> Ord SwapchainCreateFlags
SwapchainCreateFlags -> SwapchainCreateFlags -> Bool
SwapchainCreateFlags -> SwapchainCreateFlags -> Ordering
SwapchainCreateFlags
-> SwapchainCreateFlags -> SwapchainCreateFlags
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 :: SwapchainCreateFlags
-> SwapchainCreateFlags -> SwapchainCreateFlags
$cmin :: SwapchainCreateFlags
-> SwapchainCreateFlags -> SwapchainCreateFlags
max :: SwapchainCreateFlags
-> SwapchainCreateFlags -> SwapchainCreateFlags
$cmax :: SwapchainCreateFlags
-> SwapchainCreateFlags -> SwapchainCreateFlags
>= :: SwapchainCreateFlags -> SwapchainCreateFlags -> Bool
$c>= :: SwapchainCreateFlags -> SwapchainCreateFlags -> Bool
> :: SwapchainCreateFlags -> SwapchainCreateFlags -> Bool
$c> :: SwapchainCreateFlags -> SwapchainCreateFlags -> Bool
<= :: SwapchainCreateFlags -> SwapchainCreateFlags -> Bool
$c<= :: SwapchainCreateFlags -> SwapchainCreateFlags -> Bool
< :: SwapchainCreateFlags -> SwapchainCreateFlags -> Bool
$c< :: SwapchainCreateFlags -> SwapchainCreateFlags -> Bool
compare :: SwapchainCreateFlags -> SwapchainCreateFlags -> Ordering
$ccompare :: SwapchainCreateFlags -> SwapchainCreateFlags -> Ordering
$cp1Ord :: Eq SwapchainCreateFlags
Ord, Ptr b -> Int -> IO SwapchainCreateFlags
Ptr b -> Int -> SwapchainCreateFlags -> IO ()
Ptr SwapchainCreateFlags -> IO SwapchainCreateFlags
Ptr SwapchainCreateFlags -> Int -> IO SwapchainCreateFlags
Ptr SwapchainCreateFlags -> Int -> SwapchainCreateFlags -> IO ()
Ptr SwapchainCreateFlags -> SwapchainCreateFlags -> IO ()
SwapchainCreateFlags -> Int
(SwapchainCreateFlags -> Int)
-> (SwapchainCreateFlags -> Int)
-> (Ptr SwapchainCreateFlags -> Int -> IO SwapchainCreateFlags)
-> (Ptr SwapchainCreateFlags
    -> Int -> SwapchainCreateFlags -> IO ())
-> (forall b. Ptr b -> Int -> IO SwapchainCreateFlags)
-> (forall b. Ptr b -> Int -> SwapchainCreateFlags -> IO ())
-> (Ptr SwapchainCreateFlags -> IO SwapchainCreateFlags)
-> (Ptr SwapchainCreateFlags -> SwapchainCreateFlags -> IO ())
-> Storable SwapchainCreateFlags
forall b. Ptr b -> Int -> IO SwapchainCreateFlags
forall b. Ptr b -> Int -> SwapchainCreateFlags -> 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 SwapchainCreateFlags -> SwapchainCreateFlags -> IO ()
$cpoke :: Ptr SwapchainCreateFlags -> SwapchainCreateFlags -> IO ()
peek :: Ptr SwapchainCreateFlags -> IO SwapchainCreateFlags
$cpeek :: Ptr SwapchainCreateFlags -> IO SwapchainCreateFlags
pokeByteOff :: Ptr b -> Int -> SwapchainCreateFlags -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> SwapchainCreateFlags -> IO ()
peekByteOff :: Ptr b -> Int -> IO SwapchainCreateFlags
$cpeekByteOff :: forall b. Ptr b -> Int -> IO SwapchainCreateFlags
pokeElemOff :: Ptr SwapchainCreateFlags -> Int -> SwapchainCreateFlags -> IO ()
$cpokeElemOff :: Ptr SwapchainCreateFlags -> Int -> SwapchainCreateFlags -> IO ()
peekElemOff :: Ptr SwapchainCreateFlags -> Int -> IO SwapchainCreateFlags
$cpeekElemOff :: Ptr SwapchainCreateFlags -> Int -> IO SwapchainCreateFlags
alignment :: SwapchainCreateFlags -> Int
$calignment :: SwapchainCreateFlags -> Int
sizeOf :: SwapchainCreateFlags -> Int
$csizeOf :: SwapchainCreateFlags -> Int
Storable, SwapchainCreateFlags
SwapchainCreateFlags -> Zero SwapchainCreateFlags
forall a. a -> Zero a
zero :: SwapchainCreateFlags
$czero :: SwapchainCreateFlags
Zero, Eq SwapchainCreateFlags
SwapchainCreateFlags
Eq SwapchainCreateFlags =>
(SwapchainCreateFlags
 -> SwapchainCreateFlags -> SwapchainCreateFlags)
-> (SwapchainCreateFlags
    -> SwapchainCreateFlags -> SwapchainCreateFlags)
-> (SwapchainCreateFlags
    -> SwapchainCreateFlags -> SwapchainCreateFlags)
-> (SwapchainCreateFlags -> SwapchainCreateFlags)
-> (SwapchainCreateFlags -> Int -> SwapchainCreateFlags)
-> (SwapchainCreateFlags -> Int -> SwapchainCreateFlags)
-> SwapchainCreateFlags
-> (Int -> SwapchainCreateFlags)
-> (SwapchainCreateFlags -> Int -> SwapchainCreateFlags)
-> (SwapchainCreateFlags -> Int -> SwapchainCreateFlags)
-> (SwapchainCreateFlags -> Int -> SwapchainCreateFlags)
-> (SwapchainCreateFlags -> Int -> Bool)
-> (SwapchainCreateFlags -> Maybe Int)
-> (SwapchainCreateFlags -> Int)
-> (SwapchainCreateFlags -> Bool)
-> (SwapchainCreateFlags -> Int -> SwapchainCreateFlags)
-> (SwapchainCreateFlags -> Int -> SwapchainCreateFlags)
-> (SwapchainCreateFlags -> Int -> SwapchainCreateFlags)
-> (SwapchainCreateFlags -> Int -> SwapchainCreateFlags)
-> (SwapchainCreateFlags -> Int -> SwapchainCreateFlags)
-> (SwapchainCreateFlags -> Int -> SwapchainCreateFlags)
-> (SwapchainCreateFlags -> Int)
-> Bits SwapchainCreateFlags
Int -> SwapchainCreateFlags
SwapchainCreateFlags -> Bool
SwapchainCreateFlags -> Int
SwapchainCreateFlags -> Maybe Int
SwapchainCreateFlags -> SwapchainCreateFlags
SwapchainCreateFlags -> Int -> Bool
SwapchainCreateFlags -> Int -> SwapchainCreateFlags
SwapchainCreateFlags
-> SwapchainCreateFlags -> SwapchainCreateFlags
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 :: SwapchainCreateFlags -> Int
$cpopCount :: SwapchainCreateFlags -> Int
rotateR :: SwapchainCreateFlags -> Int -> SwapchainCreateFlags
$crotateR :: SwapchainCreateFlags -> Int -> SwapchainCreateFlags
rotateL :: SwapchainCreateFlags -> Int -> SwapchainCreateFlags
$crotateL :: SwapchainCreateFlags -> Int -> SwapchainCreateFlags
unsafeShiftR :: SwapchainCreateFlags -> Int -> SwapchainCreateFlags
$cunsafeShiftR :: SwapchainCreateFlags -> Int -> SwapchainCreateFlags
shiftR :: SwapchainCreateFlags -> Int -> SwapchainCreateFlags
$cshiftR :: SwapchainCreateFlags -> Int -> SwapchainCreateFlags
unsafeShiftL :: SwapchainCreateFlags -> Int -> SwapchainCreateFlags
$cunsafeShiftL :: SwapchainCreateFlags -> Int -> SwapchainCreateFlags
shiftL :: SwapchainCreateFlags -> Int -> SwapchainCreateFlags
$cshiftL :: SwapchainCreateFlags -> Int -> SwapchainCreateFlags
isSigned :: SwapchainCreateFlags -> Bool
$cisSigned :: SwapchainCreateFlags -> Bool
bitSize :: SwapchainCreateFlags -> Int
$cbitSize :: SwapchainCreateFlags -> Int
bitSizeMaybe :: SwapchainCreateFlags -> Maybe Int
$cbitSizeMaybe :: SwapchainCreateFlags -> Maybe Int
testBit :: SwapchainCreateFlags -> Int -> Bool
$ctestBit :: SwapchainCreateFlags -> Int -> Bool
complementBit :: SwapchainCreateFlags -> Int -> SwapchainCreateFlags
$ccomplementBit :: SwapchainCreateFlags -> Int -> SwapchainCreateFlags
clearBit :: SwapchainCreateFlags -> Int -> SwapchainCreateFlags
$cclearBit :: SwapchainCreateFlags -> Int -> SwapchainCreateFlags
setBit :: SwapchainCreateFlags -> Int -> SwapchainCreateFlags
$csetBit :: SwapchainCreateFlags -> Int -> SwapchainCreateFlags
bit :: Int -> SwapchainCreateFlags
$cbit :: Int -> SwapchainCreateFlags
zeroBits :: SwapchainCreateFlags
$czeroBits :: SwapchainCreateFlags
rotate :: SwapchainCreateFlags -> Int -> SwapchainCreateFlags
$crotate :: SwapchainCreateFlags -> Int -> SwapchainCreateFlags
shift :: SwapchainCreateFlags -> Int -> SwapchainCreateFlags
$cshift :: SwapchainCreateFlags -> Int -> SwapchainCreateFlags
complement :: SwapchainCreateFlags -> SwapchainCreateFlags
$ccomplement :: SwapchainCreateFlags -> SwapchainCreateFlags
xor :: SwapchainCreateFlags
-> SwapchainCreateFlags -> SwapchainCreateFlags
$cxor :: SwapchainCreateFlags
-> SwapchainCreateFlags -> SwapchainCreateFlags
.|. :: SwapchainCreateFlags
-> SwapchainCreateFlags -> SwapchainCreateFlags
$c.|. :: SwapchainCreateFlags
-> SwapchainCreateFlags -> SwapchainCreateFlags
.&. :: SwapchainCreateFlags
-> SwapchainCreateFlags -> SwapchainCreateFlags
$c.&. :: SwapchainCreateFlags
-> SwapchainCreateFlags -> SwapchainCreateFlags
$cp1Bits :: Eq SwapchainCreateFlags
Bits, Bits SwapchainCreateFlags
Bits SwapchainCreateFlags =>
(SwapchainCreateFlags -> Int)
-> (SwapchainCreateFlags -> Int)
-> (SwapchainCreateFlags -> Int)
-> FiniteBits SwapchainCreateFlags
SwapchainCreateFlags -> Int
forall b.
Bits b =>
(b -> Int) -> (b -> Int) -> (b -> Int) -> FiniteBits b
countTrailingZeros :: SwapchainCreateFlags -> Int
$ccountTrailingZeros :: SwapchainCreateFlags -> Int
countLeadingZeros :: SwapchainCreateFlags -> Int
$ccountLeadingZeros :: SwapchainCreateFlags -> Int
finiteBitSize :: SwapchainCreateFlags -> Int
$cfiniteBitSize :: SwapchainCreateFlags -> Int
$cp1FiniteBits :: Bits SwapchainCreateFlags
FiniteBits)



conNameSwapchainCreateFlags :: String
conNameSwapchainCreateFlags :: String
conNameSwapchainCreateFlags = "SwapchainCreateFlags"

enumPrefixSwapchainCreateFlags :: String
enumPrefixSwapchainCreateFlags :: String
enumPrefixSwapchainCreateFlags = ""

showTableSwapchainCreateFlags :: [(SwapchainCreateFlags, String)]
showTableSwapchainCreateFlags :: [(SwapchainCreateFlags, String)]
showTableSwapchainCreateFlags = []

instance Show SwapchainCreateFlags where
  showsPrec :: Int -> SwapchainCreateFlags -> ShowS
showsPrec = String
-> [(SwapchainCreateFlags, String)]
-> String
-> (SwapchainCreateFlags -> Flags64)
-> (Flags64 -> ShowS)
-> Int
-> SwapchainCreateFlags
-> ShowS
forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec String
enumPrefixSwapchainCreateFlags
                            [(SwapchainCreateFlags, String)]
showTableSwapchainCreateFlags
                            String
conNameSwapchainCreateFlags
                            (\(SwapchainCreateFlags x :: Flags64
x) -> Flags64
x)
                            (\x :: Flags64
x -> String -> ShowS
showString "0x" ShowS -> ShowS -> ShowS
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Flags64 -> ShowS
forall a. (Integral a, Show a) => a -> ShowS
showHex Flags64
x)

instance Read SwapchainCreateFlags where
  readPrec :: ReadPrec SwapchainCreateFlags
readPrec = String
-> [(SwapchainCreateFlags, String)]
-> String
-> (Flags64 -> SwapchainCreateFlags)
-> ReadPrec SwapchainCreateFlags
forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec String
enumPrefixSwapchainCreateFlags
                          [(SwapchainCreateFlags, String)]
showTableSwapchainCreateFlags
                          String
conNameSwapchainCreateFlags
                          Flags64 -> SwapchainCreateFlags
SwapchainCreateFlags