{-# language CPP #-}
module Vulkan.Extensions.VK_KHR_surface ( destroySurfaceKHR
, getPhysicalDeviceSurfaceSupportKHR
, getPhysicalDeviceSurfaceCapabilitiesKHR
, getPhysicalDeviceSurfaceFormatsKHR
, getPhysicalDeviceSurfacePresentModesKHR
, pattern COLORSPACE_SRGB_NONLINEAR_KHR
, SurfaceCapabilitiesKHR(..)
, SurfaceFormatKHR(..)
, PresentModeKHR( PRESENT_MODE_IMMEDIATE_KHR
, PRESENT_MODE_MAILBOX_KHR
, PRESENT_MODE_FIFO_KHR
, PRESENT_MODE_FIFO_RELAXED_KHR
, PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR
, PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR
, ..
)
, ColorSpaceKHR( COLOR_SPACE_SRGB_NONLINEAR_KHR
, COLOR_SPACE_DISPLAY_NATIVE_AMD
, COLOR_SPACE_EXTENDED_SRGB_NONLINEAR_EXT
, COLOR_SPACE_PASS_THROUGH_EXT
, COLOR_SPACE_ADOBERGB_NONLINEAR_EXT
, COLOR_SPACE_ADOBERGB_LINEAR_EXT
, COLOR_SPACE_HDR10_HLG_EXT
, COLOR_SPACE_DOLBYVISION_EXT
, COLOR_SPACE_HDR10_ST2084_EXT
, COLOR_SPACE_BT2020_LINEAR_EXT
, COLOR_SPACE_BT709_NONLINEAR_EXT
, COLOR_SPACE_BT709_LINEAR_EXT
, COLOR_SPACE_DCI_P3_NONLINEAR_EXT
, COLOR_SPACE_DISPLAY_P3_LINEAR_EXT
, COLOR_SPACE_EXTENDED_SRGB_LINEAR_EXT
, COLOR_SPACE_DISPLAY_P3_NONLINEAR_EXT
, ..
)
, CompositeAlphaFlagsKHR
, CompositeAlphaFlagBitsKHR( COMPOSITE_ALPHA_OPAQUE_BIT_KHR
, COMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR
, COMPOSITE_ALPHA_POST_MULTIPLIED_BIT_KHR
, COMPOSITE_ALPHA_INHERIT_BIT_KHR
, ..
)
, SurfaceTransformFlagsKHR
, SurfaceTransformFlagBitsKHR( SURFACE_TRANSFORM_IDENTITY_BIT_KHR
, SURFACE_TRANSFORM_ROTATE_90_BIT_KHR
, SURFACE_TRANSFORM_ROTATE_180_BIT_KHR
, SURFACE_TRANSFORM_ROTATE_270_BIT_KHR
, SURFACE_TRANSFORM_HORIZONTAL_MIRROR_BIT_KHR
, SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_90_BIT_KHR
, SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_180_BIT_KHR
, SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_270_BIT_KHR
, SURFACE_TRANSFORM_INHERIT_BIT_KHR
, ..
)
, KHR_SURFACE_SPEC_VERSION
, pattern KHR_SURFACE_SPEC_VERSION
, KHR_SURFACE_EXTENSION_NAME
, pattern KHR_SURFACE_EXTENSION_NAME
, SurfaceKHR(..)
) where
import Vulkan.Internal.Utils (enumReadPrec)
import Vulkan.Internal.Utils (enumShowsPrec)
import Vulkan.Internal.Utils (traceAroundEvent)
import Control.Exception.Base (bracket)
import Control.Monad (unless)
import Control.Monad.IO.Class (liftIO)
import Foreign.Marshal.Alloc (allocaBytes)
import Foreign.Marshal.Alloc (callocBytes)
import Foreign.Marshal.Alloc (free)
import GHC.Base (when)
import GHC.IO (throwIO)
import GHC.Ptr (nullFunPtr)
import Foreign.Ptr (nullPtr)
import Foreign.Ptr (plusPtr)
import GHC.Show (showString)
import GHC.Show (showsPrec)
import Numeric (showHex)
import Control.Monad.Trans.Class (lift)
import Control.Monad.Trans.Cont (evalContT)
import Data.Vector (generateM)
import Vulkan.CStruct (FromCStruct)
import Vulkan.CStruct (FromCStruct(..))
import Vulkan.CStruct (ToCStruct)
import Vulkan.CStruct (ToCStruct(..))
import Vulkan.Zero (Zero)
import Vulkan.Zero (Zero(..))
import Control.Monad.IO.Class (MonadIO)
import Data.Bits (Bits)
import Data.Bits (FiniteBits)
import Data.String (IsString)
import Data.Typeable (Typeable)
import Foreign.Storable (Storable)
import Foreign.Storable (Storable(peek))
import Foreign.Storable (Storable(poke))
import qualified Foreign.Storable (Storable(..))
import GHC.Generics (Generic)
import GHC.IO.Exception (IOErrorType(..))
import GHC.IO.Exception (IOException(..))
import Data.Int (Int32)
import Foreign.Ptr (FunPtr)
import Foreign.Ptr (Ptr)
import GHC.Read (Read(readPrec))
import GHC.Show (Show(showsPrec))
import Data.Word (Word32)
import Data.Kind (Type)
import Control.Monad.Trans.Cont (ContT(..))
import Data.Vector (Vector)
import Vulkan.CStruct.Utils (advancePtrBytes)
import Vulkan.Core10.FundamentalTypes (bool32ToBool)
import Vulkan.NamedType ((:::))
import Vulkan.Core10.AllocationCallbacks (AllocationCallbacks)
import Vulkan.Core10.FundamentalTypes (Bool32)
import Vulkan.Core10.FundamentalTypes (Bool32(..))
import Vulkan.Core10.FundamentalTypes (Extent2D)
import Vulkan.Core10.FundamentalTypes (Flags)
import Vulkan.Core10.Enums.Format (Format)
import Vulkan.Core10.Enums.ImageUsageFlagBits (ImageUsageFlags)
import Vulkan.Core10.Handles (Instance)
import Vulkan.Core10.Handles (Instance(..))
import Vulkan.Core10.Handles (Instance(Instance))
import Vulkan.Dynamic (InstanceCmds(pVkDestroySurfaceKHR))
import Vulkan.Dynamic (InstanceCmds(pVkGetPhysicalDeviceSurfaceCapabilitiesKHR))
import Vulkan.Dynamic (InstanceCmds(pVkGetPhysicalDeviceSurfaceFormatsKHR))
import Vulkan.Dynamic (InstanceCmds(pVkGetPhysicalDeviceSurfacePresentModesKHR))
import Vulkan.Dynamic (InstanceCmds(pVkGetPhysicalDeviceSurfaceSupportKHR))
import Vulkan.Core10.Handles (Instance_T)
import Vulkan.Core10.Handles (PhysicalDevice)
import Vulkan.Core10.Handles (PhysicalDevice(..))
import Vulkan.Core10.Handles (PhysicalDevice(PhysicalDevice))
import Vulkan.Core10.Handles (PhysicalDevice_T)
import Vulkan.Core10.Enums.Result (Result)
import Vulkan.Core10.Enums.Result (Result(..))
import Vulkan.Extensions.Handles (SurfaceKHR)
import Vulkan.Extensions.Handles (SurfaceKHR(..))
import Vulkan.Exception (VulkanException(..))
import Vulkan.Core10.Enums.Result (Result(SUCCESS))
import Vulkan.Extensions.Handles (SurfaceKHR(..))
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkDestroySurfaceKHR
:: FunPtr (Ptr Instance_T -> SurfaceKHR -> Ptr AllocationCallbacks -> IO ()) -> Ptr Instance_T -> SurfaceKHR -> Ptr AllocationCallbacks -> IO ()
destroySurfaceKHR :: forall io
. (MonadIO io)
=>
Instance
->
SurfaceKHR
->
("allocator" ::: Maybe AllocationCallbacks)
-> io ()
destroySurfaceKHR :: forall (io :: * -> *).
MonadIO io =>
Instance
-> SurfaceKHR
-> ("allocator" ::: Maybe AllocationCallbacks)
-> io ()
destroySurfaceKHR Instance
instance' SurfaceKHR
surface "allocator" ::: Maybe AllocationCallbacks
allocator = IO () -> io ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> io ())
-> (ContT () IO () -> IO ()) -> ContT () IO () -> io ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT () IO () -> IO ()
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT () IO () -> io ()) -> ContT () IO () -> io ()
forall a b. (a -> b) -> a -> b
$ do
let vkDestroySurfaceKHRPtr :: FunPtr
(Ptr Instance_T
-> SurfaceKHR
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> IO ())
vkDestroySurfaceKHRPtr = InstanceCmds
-> FunPtr
(Ptr Instance_T
-> SurfaceKHR
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> IO ())
pVkDestroySurfaceKHR (case Instance
instance' of Instance{InstanceCmds
$sel:instanceCmds:Instance :: Instance -> InstanceCmds
instanceCmds :: InstanceCmds
instanceCmds} -> InstanceCmds
instanceCmds)
IO () -> ContT () IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT () IO ()) -> IO () -> ContT () IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr Instance_T
-> SurfaceKHR
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> IO ())
vkDestroySurfaceKHRPtr FunPtr
(Ptr Instance_T
-> SurfaceKHR
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> IO ())
-> FunPtr
(Ptr Instance_T
-> SurfaceKHR
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> IO ())
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
(Ptr Instance_T
-> SurfaceKHR
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> IO ())
forall a. FunPtr a
nullFunPtr) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
IOException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (IOException -> IO ()) -> IOException -> IO ()
forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError Maybe Handle
forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkDestroySurfaceKHR is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
let vkDestroySurfaceKHR' :: Ptr Instance_T
-> SurfaceKHR
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> IO ()
vkDestroySurfaceKHR' = FunPtr
(Ptr Instance_T
-> SurfaceKHR
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> IO ())
-> Ptr Instance_T
-> SurfaceKHR
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> IO ()
mkVkDestroySurfaceKHR FunPtr
(Ptr Instance_T
-> SurfaceKHR
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> IO ())
vkDestroySurfaceKHRPtr
"pAllocator" ::: Ptr AllocationCallbacks
pAllocator <- case ("allocator" ::: Maybe AllocationCallbacks
allocator) of
"allocator" ::: Maybe AllocationCallbacks
Nothing -> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ContT () IO ("pAllocator" ::: Ptr AllocationCallbacks)
forall (f :: * -> *) a. Applicative f => a -> f a
pure "pAllocator" ::: Ptr AllocationCallbacks
forall a. Ptr a
nullPtr
Just AllocationCallbacks
j -> ((("pAllocator" ::: Ptr AllocationCallbacks) -> IO ()) -> IO ())
-> ContT () IO ("pAllocator" ::: Ptr AllocationCallbacks)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pAllocator" ::: Ptr AllocationCallbacks) -> IO ()) -> IO ())
-> ContT () IO ("pAllocator" ::: Ptr AllocationCallbacks))
-> ((("pAllocator" ::: Ptr AllocationCallbacks) -> IO ()) -> IO ())
-> ContT () IO ("pAllocator" ::: Ptr AllocationCallbacks)
forall a b. (a -> b) -> a -> b
$ AllocationCallbacks
-> (("pAllocator" ::: Ptr AllocationCallbacks) -> IO ()) -> IO ()
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (AllocationCallbacks
j)
IO () -> ContT () IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT () IO ()) -> IO () -> ContT () IO ()
forall a b. (a -> b) -> a -> b
$ String -> IO () -> IO ()
forall a. String -> IO a -> IO a
traceAroundEvent String
"vkDestroySurfaceKHR" (Ptr Instance_T
-> SurfaceKHR
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> IO ()
vkDestroySurfaceKHR'
(Instance -> Ptr Instance_T
instanceHandle (Instance
instance'))
(SurfaceKHR
surface)
"pAllocator" ::: Ptr AllocationCallbacks
pAllocator)
() -> ContT () IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure (() -> ContT () IO ()) -> () -> ContT () IO ()
forall a b. (a -> b) -> a -> b
$ ()
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkGetPhysicalDeviceSurfaceSupportKHR
:: FunPtr (Ptr PhysicalDevice_T -> Word32 -> SurfaceKHR -> Ptr Bool32 -> IO Result) -> Ptr PhysicalDevice_T -> Word32 -> SurfaceKHR -> Ptr Bool32 -> IO Result
getPhysicalDeviceSurfaceSupportKHR :: forall io
. (MonadIO io)
=>
PhysicalDevice
->
("queueFamilyIndex" ::: Word32)
->
SurfaceKHR
-> io (("supported" ::: Bool))
getPhysicalDeviceSurfaceSupportKHR :: forall (io :: * -> *).
MonadIO io =>
PhysicalDevice -> Flags -> SurfaceKHR -> io Bool
getPhysicalDeviceSurfaceSupportKHR PhysicalDevice
physicalDevice
Flags
queueFamilyIndex
SurfaceKHR
surface = IO Bool -> io Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> io Bool)
-> (ContT Bool IO Bool -> IO Bool) -> ContT Bool IO Bool -> io Bool
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT Bool IO Bool -> IO Bool
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT Bool IO Bool -> io Bool) -> ContT Bool IO Bool -> io Bool
forall a b. (a -> b) -> a -> b
$ do
let vkGetPhysicalDeviceSurfaceSupportKHRPtr :: FunPtr
(Ptr PhysicalDevice_T
-> Flags
-> SurfaceKHR
-> ("pSupported" ::: Ptr Bool32)
-> IO Result)
vkGetPhysicalDeviceSurfaceSupportKHRPtr = InstanceCmds
-> FunPtr
(Ptr PhysicalDevice_T
-> Flags
-> SurfaceKHR
-> ("pSupported" ::: Ptr Bool32)
-> IO Result)
pVkGetPhysicalDeviceSurfaceSupportKHR (case PhysicalDevice
physicalDevice of PhysicalDevice{InstanceCmds
$sel:instanceCmds:PhysicalDevice :: PhysicalDevice -> InstanceCmds
instanceCmds :: InstanceCmds
instanceCmds} -> InstanceCmds
instanceCmds)
IO () -> ContT Bool IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT Bool IO ()) -> IO () -> ContT Bool IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr PhysicalDevice_T
-> Flags
-> SurfaceKHR
-> ("pSupported" ::: Ptr Bool32)
-> IO Result)
vkGetPhysicalDeviceSurfaceSupportKHRPtr FunPtr
(Ptr PhysicalDevice_T
-> Flags
-> SurfaceKHR
-> ("pSupported" ::: Ptr Bool32)
-> IO Result)
-> FunPtr
(Ptr PhysicalDevice_T
-> Flags
-> SurfaceKHR
-> ("pSupported" ::: Ptr Bool32)
-> IO Result)
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
(Ptr PhysicalDevice_T
-> Flags
-> SurfaceKHR
-> ("pSupported" ::: Ptr Bool32)
-> IO Result)
forall a. FunPtr a
nullFunPtr) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
IOException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (IOException -> IO ()) -> IOException -> IO ()
forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError Maybe Handle
forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkGetPhysicalDeviceSurfaceSupportKHR is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
let vkGetPhysicalDeviceSurfaceSupportKHR' :: Ptr PhysicalDevice_T
-> Flags
-> SurfaceKHR
-> ("pSupported" ::: Ptr Bool32)
-> IO Result
vkGetPhysicalDeviceSurfaceSupportKHR' = FunPtr
(Ptr PhysicalDevice_T
-> Flags
-> SurfaceKHR
-> ("pSupported" ::: Ptr Bool32)
-> IO Result)
-> Ptr PhysicalDevice_T
-> Flags
-> SurfaceKHR
-> ("pSupported" ::: Ptr Bool32)
-> IO Result
mkVkGetPhysicalDeviceSurfaceSupportKHR FunPtr
(Ptr PhysicalDevice_T
-> Flags
-> SurfaceKHR
-> ("pSupported" ::: Ptr Bool32)
-> IO Result)
vkGetPhysicalDeviceSurfaceSupportKHRPtr
"pSupported" ::: Ptr Bool32
pPSupported <- ((("pSupported" ::: Ptr Bool32) -> IO Bool) -> IO Bool)
-> ContT Bool IO ("pSupported" ::: Ptr Bool32)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pSupported" ::: Ptr Bool32) -> IO Bool) -> IO Bool)
-> ContT Bool IO ("pSupported" ::: Ptr Bool32))
-> ((("pSupported" ::: Ptr Bool32) -> IO Bool) -> IO Bool)
-> ContT Bool IO ("pSupported" ::: Ptr Bool32)
forall a b. (a -> b) -> a -> b
$ IO ("pSupported" ::: Ptr Bool32)
-> (("pSupported" ::: Ptr Bool32) -> IO ())
-> (("pSupported" ::: Ptr Bool32) -> IO Bool)
-> IO Bool
forall a b c. IO a -> (a -> IO b) -> (a -> IO c) -> IO c
bracket (forall a. Int -> IO (Ptr a)
callocBytes @Bool32 Int
4) ("pSupported" ::: Ptr Bool32) -> IO ()
forall a. Ptr a -> IO ()
free
Result
r <- IO Result -> ContT Bool IO Result
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO Result -> ContT Bool IO Result)
-> IO Result -> ContT Bool IO Result
forall a b. (a -> b) -> a -> b
$ String -> IO Result -> IO Result
forall a. String -> IO a -> IO a
traceAroundEvent String
"vkGetPhysicalDeviceSurfaceSupportKHR" (Ptr PhysicalDevice_T
-> Flags
-> SurfaceKHR
-> ("pSupported" ::: Ptr Bool32)
-> IO Result
vkGetPhysicalDeviceSurfaceSupportKHR'
(PhysicalDevice -> Ptr PhysicalDevice_T
physicalDeviceHandle (PhysicalDevice
physicalDevice))
(Flags
queueFamilyIndex)
(SurfaceKHR
surface)
("pSupported" ::: Ptr Bool32
pPSupported))
IO () -> ContT Bool IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT Bool IO ()) -> IO () -> ContT Bool IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
when (Result
r Result -> Result -> Bool
forall a. Ord a => a -> a -> Bool
< Result
SUCCESS) (VulkanException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (Result -> VulkanException
VulkanException Result
r))
Bool32
pSupported <- IO Bool32 -> ContT Bool IO Bool32
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO Bool32 -> ContT Bool IO Bool32)
-> IO Bool32 -> ContT Bool IO Bool32
forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> IO a
peek @Bool32 "pSupported" ::: Ptr Bool32
pPSupported
Bool -> ContT Bool IO Bool
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Bool -> ContT Bool IO Bool) -> Bool -> ContT Bool IO Bool
forall a b. (a -> b) -> a -> b
$ ((Bool32 -> Bool
bool32ToBool Bool32
pSupported))
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkGetPhysicalDeviceSurfaceCapabilitiesKHR
:: FunPtr (Ptr PhysicalDevice_T -> SurfaceKHR -> Ptr SurfaceCapabilitiesKHR -> IO Result) -> Ptr PhysicalDevice_T -> SurfaceKHR -> Ptr SurfaceCapabilitiesKHR -> IO Result
getPhysicalDeviceSurfaceCapabilitiesKHR :: forall io
. (MonadIO io)
=>
PhysicalDevice
->
SurfaceKHR
-> io (SurfaceCapabilitiesKHR)
getPhysicalDeviceSurfaceCapabilitiesKHR :: forall (io :: * -> *).
MonadIO io =>
PhysicalDevice -> SurfaceKHR -> io SurfaceCapabilitiesKHR
getPhysicalDeviceSurfaceCapabilitiesKHR PhysicalDevice
physicalDevice
SurfaceKHR
surface = IO SurfaceCapabilitiesKHR -> io SurfaceCapabilitiesKHR
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SurfaceCapabilitiesKHR -> io SurfaceCapabilitiesKHR)
-> (ContT SurfaceCapabilitiesKHR IO SurfaceCapabilitiesKHR
-> IO SurfaceCapabilitiesKHR)
-> ContT SurfaceCapabilitiesKHR IO SurfaceCapabilitiesKHR
-> io SurfaceCapabilitiesKHR
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT SurfaceCapabilitiesKHR IO SurfaceCapabilitiesKHR
-> IO SurfaceCapabilitiesKHR
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT SurfaceCapabilitiesKHR IO SurfaceCapabilitiesKHR
-> io SurfaceCapabilitiesKHR)
-> ContT SurfaceCapabilitiesKHR IO SurfaceCapabilitiesKHR
-> io SurfaceCapabilitiesKHR
forall a b. (a -> b) -> a -> b
$ do
let vkGetPhysicalDeviceSurfaceCapabilitiesKHRPtr :: FunPtr
(Ptr PhysicalDevice_T
-> SurfaceKHR
-> ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> IO Result)
vkGetPhysicalDeviceSurfaceCapabilitiesKHRPtr = InstanceCmds
-> FunPtr
(Ptr PhysicalDevice_T
-> SurfaceKHR
-> ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> IO Result)
pVkGetPhysicalDeviceSurfaceCapabilitiesKHR (case PhysicalDevice
physicalDevice of PhysicalDevice{InstanceCmds
instanceCmds :: InstanceCmds
$sel:instanceCmds:PhysicalDevice :: PhysicalDevice -> InstanceCmds
instanceCmds} -> InstanceCmds
instanceCmds)
IO () -> ContT SurfaceCapabilitiesKHR IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT SurfaceCapabilitiesKHR IO ())
-> IO () -> ContT SurfaceCapabilitiesKHR IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr PhysicalDevice_T
-> SurfaceKHR
-> ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> IO Result)
vkGetPhysicalDeviceSurfaceCapabilitiesKHRPtr FunPtr
(Ptr PhysicalDevice_T
-> SurfaceKHR
-> ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> IO Result)
-> FunPtr
(Ptr PhysicalDevice_T
-> SurfaceKHR
-> ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> IO Result)
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
(Ptr PhysicalDevice_T
-> SurfaceKHR
-> ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> IO Result)
forall a. FunPtr a
nullFunPtr) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
IOException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (IOException -> IO ()) -> IOException -> IO ()
forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError Maybe Handle
forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkGetPhysicalDeviceSurfaceCapabilitiesKHR is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
let vkGetPhysicalDeviceSurfaceCapabilitiesKHR' :: Ptr PhysicalDevice_T
-> SurfaceKHR
-> ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> IO Result
vkGetPhysicalDeviceSurfaceCapabilitiesKHR' = FunPtr
(Ptr PhysicalDevice_T
-> SurfaceKHR
-> ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> IO Result)
-> Ptr PhysicalDevice_T
-> SurfaceKHR
-> ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> IO Result
mkVkGetPhysicalDeviceSurfaceCapabilitiesKHR FunPtr
(Ptr PhysicalDevice_T
-> SurfaceKHR
-> ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> IO Result)
vkGetPhysicalDeviceSurfaceCapabilitiesKHRPtr
"pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR
pPSurfaceCapabilities <- ((("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> IO SurfaceCapabilitiesKHR)
-> IO SurfaceCapabilitiesKHR)
-> ContT
SurfaceCapabilitiesKHR
IO
("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (forall a b. ToCStruct a => (Ptr a -> IO b) -> IO b
withZeroCStruct @SurfaceCapabilitiesKHR)
Result
r <- IO Result -> ContT SurfaceCapabilitiesKHR IO Result
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO Result -> ContT SurfaceCapabilitiesKHR IO Result)
-> IO Result -> ContT SurfaceCapabilitiesKHR IO Result
forall a b. (a -> b) -> a -> b
$ String -> IO Result -> IO Result
forall a. String -> IO a -> IO a
traceAroundEvent String
"vkGetPhysicalDeviceSurfaceCapabilitiesKHR" (Ptr PhysicalDevice_T
-> SurfaceKHR
-> ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> IO Result
vkGetPhysicalDeviceSurfaceCapabilitiesKHR'
(PhysicalDevice -> Ptr PhysicalDevice_T
physicalDeviceHandle (PhysicalDevice
physicalDevice))
(SurfaceKHR
surface)
("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR
pPSurfaceCapabilities))
IO () -> ContT SurfaceCapabilitiesKHR IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT SurfaceCapabilitiesKHR IO ())
-> IO () -> ContT SurfaceCapabilitiesKHR IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
when (Result
r Result -> Result -> Bool
forall a. Ord a => a -> a -> Bool
< Result
SUCCESS) (VulkanException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (Result -> VulkanException
VulkanException Result
r))
SurfaceCapabilitiesKHR
pSurfaceCapabilities <- IO SurfaceCapabilitiesKHR
-> ContT SurfaceCapabilitiesKHR IO SurfaceCapabilitiesKHR
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO SurfaceCapabilitiesKHR
-> ContT SurfaceCapabilitiesKHR IO SurfaceCapabilitiesKHR)
-> IO SurfaceCapabilitiesKHR
-> ContT SurfaceCapabilitiesKHR IO SurfaceCapabilitiesKHR
forall a b. (a -> b) -> a -> b
$ forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @SurfaceCapabilitiesKHR "pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR
pPSurfaceCapabilities
SurfaceCapabilitiesKHR
-> ContT SurfaceCapabilitiesKHR IO SurfaceCapabilitiesKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure (SurfaceCapabilitiesKHR
-> ContT SurfaceCapabilitiesKHR IO SurfaceCapabilitiesKHR)
-> SurfaceCapabilitiesKHR
-> ContT SurfaceCapabilitiesKHR IO SurfaceCapabilitiesKHR
forall a b. (a -> b) -> a -> b
$ (SurfaceCapabilitiesKHR
pSurfaceCapabilities)
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkGetPhysicalDeviceSurfaceFormatsKHR
:: FunPtr (Ptr PhysicalDevice_T -> SurfaceKHR -> Ptr Word32 -> Ptr SurfaceFormatKHR -> IO Result) -> Ptr PhysicalDevice_T -> SurfaceKHR -> Ptr Word32 -> Ptr SurfaceFormatKHR -> IO Result
getPhysicalDeviceSurfaceFormatsKHR :: forall io
. (MonadIO io)
=>
PhysicalDevice
->
SurfaceKHR
-> io (Result, ("surfaceFormats" ::: Vector SurfaceFormatKHR))
getPhysicalDeviceSurfaceFormatsKHR :: forall (io :: * -> *).
MonadIO io =>
PhysicalDevice
-> SurfaceKHR
-> io (Result, "surfaceFormats" ::: Vector SurfaceFormatKHR)
getPhysicalDeviceSurfaceFormatsKHR PhysicalDevice
physicalDevice
SurfaceKHR
surface = IO (Result, "surfaceFormats" ::: Vector SurfaceFormatKHR)
-> io (Result, "surfaceFormats" ::: Vector SurfaceFormatKHR)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Result, "surfaceFormats" ::: Vector SurfaceFormatKHR)
-> io (Result, "surfaceFormats" ::: Vector SurfaceFormatKHR))
-> (ContT
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR)
IO
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR)
-> IO (Result, "surfaceFormats" ::: Vector SurfaceFormatKHR))
-> ContT
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR)
IO
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR)
-> io (Result, "surfaceFormats" ::: Vector SurfaceFormatKHR)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR)
IO
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR)
-> IO (Result, "surfaceFormats" ::: Vector SurfaceFormatKHR)
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR)
IO
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR)
-> io (Result, "surfaceFormats" ::: Vector SurfaceFormatKHR))
-> ContT
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR)
IO
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR)
-> io (Result, "surfaceFormats" ::: Vector SurfaceFormatKHR)
forall a b. (a -> b) -> a -> b
$ do
let vkGetPhysicalDeviceSurfaceFormatsKHRPtr :: FunPtr
(Ptr PhysicalDevice_T
-> SurfaceKHR
-> ("pSurfaceFormatCount" ::: Ptr Flags)
-> ("pSurfaceFormats" ::: Ptr SurfaceFormatKHR)
-> IO Result)
vkGetPhysicalDeviceSurfaceFormatsKHRPtr = InstanceCmds
-> FunPtr
(Ptr PhysicalDevice_T
-> SurfaceKHR
-> ("pSurfaceFormatCount" ::: Ptr Flags)
-> ("pSurfaceFormats" ::: Ptr SurfaceFormatKHR)
-> IO Result)
pVkGetPhysicalDeviceSurfaceFormatsKHR (case PhysicalDevice
physicalDevice of PhysicalDevice{InstanceCmds
instanceCmds :: InstanceCmds
$sel:instanceCmds:PhysicalDevice :: PhysicalDevice -> InstanceCmds
instanceCmds} -> InstanceCmds
instanceCmds)
IO ()
-> ContT
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR) IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO ()
-> ContT
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR) IO ())
-> IO ()
-> ContT
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR) IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr PhysicalDevice_T
-> SurfaceKHR
-> ("pSurfaceFormatCount" ::: Ptr Flags)
-> ("pSurfaceFormats" ::: Ptr SurfaceFormatKHR)
-> IO Result)
vkGetPhysicalDeviceSurfaceFormatsKHRPtr FunPtr
(Ptr PhysicalDevice_T
-> SurfaceKHR
-> ("pSurfaceFormatCount" ::: Ptr Flags)
-> ("pSurfaceFormats" ::: Ptr SurfaceFormatKHR)
-> IO Result)
-> FunPtr
(Ptr PhysicalDevice_T
-> SurfaceKHR
-> ("pSurfaceFormatCount" ::: Ptr Flags)
-> ("pSurfaceFormats" ::: Ptr SurfaceFormatKHR)
-> IO Result)
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
(Ptr PhysicalDevice_T
-> SurfaceKHR
-> ("pSurfaceFormatCount" ::: Ptr Flags)
-> ("pSurfaceFormats" ::: Ptr SurfaceFormatKHR)
-> IO Result)
forall a. FunPtr a
nullFunPtr) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
IOException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (IOException -> IO ()) -> IOException -> IO ()
forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError Maybe Handle
forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkGetPhysicalDeviceSurfaceFormatsKHR is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
let vkGetPhysicalDeviceSurfaceFormatsKHR' :: Ptr PhysicalDevice_T
-> SurfaceKHR
-> ("pSurfaceFormatCount" ::: Ptr Flags)
-> ("pSurfaceFormats" ::: Ptr SurfaceFormatKHR)
-> IO Result
vkGetPhysicalDeviceSurfaceFormatsKHR' = FunPtr
(Ptr PhysicalDevice_T
-> SurfaceKHR
-> ("pSurfaceFormatCount" ::: Ptr Flags)
-> ("pSurfaceFormats" ::: Ptr SurfaceFormatKHR)
-> IO Result)
-> Ptr PhysicalDevice_T
-> SurfaceKHR
-> ("pSurfaceFormatCount" ::: Ptr Flags)
-> ("pSurfaceFormats" ::: Ptr SurfaceFormatKHR)
-> IO Result
mkVkGetPhysicalDeviceSurfaceFormatsKHR FunPtr
(Ptr PhysicalDevice_T
-> SurfaceKHR
-> ("pSurfaceFormatCount" ::: Ptr Flags)
-> ("pSurfaceFormats" ::: Ptr SurfaceFormatKHR)
-> IO Result)
vkGetPhysicalDeviceSurfaceFormatsKHRPtr
let physicalDevice' :: Ptr PhysicalDevice_T
physicalDevice' = PhysicalDevice -> Ptr PhysicalDevice_T
physicalDeviceHandle (PhysicalDevice
physicalDevice)
"pSurfaceFormatCount" ::: Ptr Flags
pPSurfaceFormatCount <- ((("pSurfaceFormatCount" ::: Ptr Flags)
-> IO (Result, "surfaceFormats" ::: Vector SurfaceFormatKHR))
-> IO (Result, "surfaceFormats" ::: Vector SurfaceFormatKHR))
-> ContT
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR)
IO
("pSurfaceFormatCount" ::: Ptr Flags)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pSurfaceFormatCount" ::: Ptr Flags)
-> IO (Result, "surfaceFormats" ::: Vector SurfaceFormatKHR))
-> IO (Result, "surfaceFormats" ::: Vector SurfaceFormatKHR))
-> ContT
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR)
IO
("pSurfaceFormatCount" ::: Ptr Flags))
-> ((("pSurfaceFormatCount" ::: Ptr Flags)
-> IO (Result, "surfaceFormats" ::: Vector SurfaceFormatKHR))
-> IO (Result, "surfaceFormats" ::: Vector SurfaceFormatKHR))
-> ContT
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR)
IO
("pSurfaceFormatCount" ::: Ptr Flags)
forall a b. (a -> b) -> a -> b
$ IO ("pSurfaceFormatCount" ::: Ptr Flags)
-> (("pSurfaceFormatCount" ::: Ptr Flags) -> IO ())
-> (("pSurfaceFormatCount" ::: Ptr Flags)
-> IO (Result, "surfaceFormats" ::: Vector SurfaceFormatKHR))
-> IO (Result, "surfaceFormats" ::: Vector SurfaceFormatKHR)
forall a b c. IO a -> (a -> IO b) -> (a -> IO c) -> IO c
bracket (forall a. Int -> IO (Ptr a)
callocBytes @Word32 Int
4) ("pSurfaceFormatCount" ::: Ptr Flags) -> IO ()
forall a. Ptr a -> IO ()
free
Result
r <- IO Result
-> ContT
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR) IO Result
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO Result
-> ContT
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR) IO Result)
-> IO Result
-> ContT
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR) IO Result
forall a b. (a -> b) -> a -> b
$ String -> IO Result -> IO Result
forall a. String -> IO a -> IO a
traceAroundEvent String
"vkGetPhysicalDeviceSurfaceFormatsKHR" (Ptr PhysicalDevice_T
-> SurfaceKHR
-> ("pSurfaceFormatCount" ::: Ptr Flags)
-> ("pSurfaceFormats" ::: Ptr SurfaceFormatKHR)
-> IO Result
vkGetPhysicalDeviceSurfaceFormatsKHR'
Ptr PhysicalDevice_T
physicalDevice'
(SurfaceKHR
surface)
("pSurfaceFormatCount" ::: Ptr Flags
pPSurfaceFormatCount)
("pSurfaceFormats" ::: Ptr SurfaceFormatKHR
forall a. Ptr a
nullPtr))
IO ()
-> ContT
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR) IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO ()
-> ContT
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR) IO ())
-> IO ()
-> ContT
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR) IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
when (Result
r Result -> Result -> Bool
forall a. Ord a => a -> a -> Bool
< Result
SUCCESS) (VulkanException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (Result -> VulkanException
VulkanException Result
r))
Flags
pSurfaceFormatCount <- IO Flags
-> ContT
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR) IO Flags
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO Flags
-> ContT
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR) IO Flags)
-> IO Flags
-> ContT
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR) IO Flags
forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> IO a
peek @Word32 "pSurfaceFormatCount" ::: Ptr Flags
pPSurfaceFormatCount
"pSurfaceFormats" ::: Ptr SurfaceFormatKHR
pPSurfaceFormats <- ((("pSurfaceFormats" ::: Ptr SurfaceFormatKHR)
-> IO (Result, "surfaceFormats" ::: Vector SurfaceFormatKHR))
-> IO (Result, "surfaceFormats" ::: Vector SurfaceFormatKHR))
-> ContT
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR)
IO
("pSurfaceFormats" ::: Ptr SurfaceFormatKHR)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pSurfaceFormats" ::: Ptr SurfaceFormatKHR)
-> IO (Result, "surfaceFormats" ::: Vector SurfaceFormatKHR))
-> IO (Result, "surfaceFormats" ::: Vector SurfaceFormatKHR))
-> ContT
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR)
IO
("pSurfaceFormats" ::: Ptr SurfaceFormatKHR))
-> ((("pSurfaceFormats" ::: Ptr SurfaceFormatKHR)
-> IO (Result, "surfaceFormats" ::: Vector SurfaceFormatKHR))
-> IO (Result, "surfaceFormats" ::: Vector SurfaceFormatKHR))
-> ContT
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR)
IO
("pSurfaceFormats" ::: Ptr SurfaceFormatKHR)
forall a b. (a -> b) -> a -> b
$ IO ("pSurfaceFormats" ::: Ptr SurfaceFormatKHR)
-> (("pSurfaceFormats" ::: Ptr SurfaceFormatKHR) -> IO ())
-> (("pSurfaceFormats" ::: Ptr SurfaceFormatKHR)
-> IO (Result, "surfaceFormats" ::: Vector SurfaceFormatKHR))
-> IO (Result, "surfaceFormats" ::: Vector SurfaceFormatKHR)
forall a b c. IO a -> (a -> IO b) -> (a -> IO c) -> IO c
bracket (forall a. Int -> IO (Ptr a)
callocBytes @SurfaceFormatKHR ((Flags -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Flags
pSurfaceFormatCount)) Int -> Int -> Int
forall a. Num a => a -> a -> a
* Int
8)) ("pSurfaceFormats" ::: Ptr SurfaceFormatKHR) -> IO ()
forall a. Ptr a -> IO ()
free
[()]
_ <- (Int
-> ContT
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR) IO ())
-> [Int]
-> ContT
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR) IO [()]
forall (t :: * -> *) (f :: * -> *) a b.
(Traversable t, Applicative f) =>
(a -> f b) -> t a -> f (t b)
traverse (\Int
i -> ((() -> IO (Result, "surfaceFormats" ::: Vector SurfaceFormatKHR))
-> IO (Result, "surfaceFormats" ::: Vector SurfaceFormatKHR))
-> ContT
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR) IO ()
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((() -> IO (Result, "surfaceFormats" ::: Vector SurfaceFormatKHR))
-> IO (Result, "surfaceFormats" ::: Vector SurfaceFormatKHR))
-> ContT
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR) IO ())
-> ((()
-> IO (Result, "surfaceFormats" ::: Vector SurfaceFormatKHR))
-> IO (Result, "surfaceFormats" ::: Vector SurfaceFormatKHR))
-> ContT
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR) IO ()
forall a b. (a -> b) -> a -> b
$ ("pSurfaceFormats" ::: Ptr SurfaceFormatKHR)
-> IO (Result, "surfaceFormats" ::: Vector SurfaceFormatKHR)
-> IO (Result, "surfaceFormats" ::: Vector SurfaceFormatKHR)
forall a b. ToCStruct a => Ptr a -> IO b -> IO b
pokeZeroCStruct ("pSurfaceFormats" ::: Ptr SurfaceFormatKHR
pPSurfaceFormats ("pSurfaceFormats" ::: Ptr SurfaceFormatKHR)
-> Int -> "pSurfaceFormats" ::: Ptr SurfaceFormatKHR
forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (Int
i Int -> Int -> Int
forall a. Num a => a -> a -> a
* Int
8) :: Ptr SurfaceFormatKHR) (IO (Result, "surfaceFormats" ::: Vector SurfaceFormatKHR)
-> IO (Result, "surfaceFormats" ::: Vector SurfaceFormatKHR))
-> ((()
-> IO (Result, "surfaceFormats" ::: Vector SurfaceFormatKHR))
-> IO (Result, "surfaceFormats" ::: Vector SurfaceFormatKHR))
-> (()
-> IO (Result, "surfaceFormats" ::: Vector SurfaceFormatKHR))
-> IO (Result, "surfaceFormats" ::: Vector SurfaceFormatKHR)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ((() -> IO (Result, "surfaceFormats" ::: Vector SurfaceFormatKHR))
-> () -> IO (Result, "surfaceFormats" ::: Vector SurfaceFormatKHR)
forall a b. (a -> b) -> a -> b
$ ())) [Int
0..(Flags -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Flags
pSurfaceFormatCount)) Int -> Int -> Int
forall a. Num a => a -> a -> a
- Int
1]
Result
r' <- IO Result
-> ContT
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR) IO Result
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO Result
-> ContT
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR) IO Result)
-> IO Result
-> ContT
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR) IO Result
forall a b. (a -> b) -> a -> b
$ String -> IO Result -> IO Result
forall a. String -> IO a -> IO a
traceAroundEvent String
"vkGetPhysicalDeviceSurfaceFormatsKHR" (Ptr PhysicalDevice_T
-> SurfaceKHR
-> ("pSurfaceFormatCount" ::: Ptr Flags)
-> ("pSurfaceFormats" ::: Ptr SurfaceFormatKHR)
-> IO Result
vkGetPhysicalDeviceSurfaceFormatsKHR'
Ptr PhysicalDevice_T
physicalDevice'
(SurfaceKHR
surface)
("pSurfaceFormatCount" ::: Ptr Flags
pPSurfaceFormatCount)
(("pSurfaceFormats" ::: Ptr SurfaceFormatKHR
pPSurfaceFormats)))
IO ()
-> ContT
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR) IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO ()
-> ContT
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR) IO ())
-> IO ()
-> ContT
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR) IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
when (Result
r' Result -> Result -> Bool
forall a. Ord a => a -> a -> Bool
< Result
SUCCESS) (VulkanException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (Result -> VulkanException
VulkanException Result
r'))
Flags
pSurfaceFormatCount' <- IO Flags
-> ContT
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR) IO Flags
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO Flags
-> ContT
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR) IO Flags)
-> IO Flags
-> ContT
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR) IO Flags
forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> IO a
peek @Word32 "pSurfaceFormatCount" ::: Ptr Flags
pPSurfaceFormatCount
"surfaceFormats" ::: Vector SurfaceFormatKHR
pSurfaceFormats' <- IO ("surfaceFormats" ::: Vector SurfaceFormatKHR)
-> ContT
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR)
IO
("surfaceFormats" ::: Vector SurfaceFormatKHR)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO ("surfaceFormats" ::: Vector SurfaceFormatKHR)
-> ContT
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR)
IO
("surfaceFormats" ::: Vector SurfaceFormatKHR))
-> IO ("surfaceFormats" ::: Vector SurfaceFormatKHR)
-> ContT
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR)
IO
("surfaceFormats" ::: Vector SurfaceFormatKHR)
forall a b. (a -> b) -> a -> b
$ Int
-> (Int -> IO SurfaceFormatKHR)
-> IO ("surfaceFormats" ::: Vector SurfaceFormatKHR)
forall (m :: * -> *) a.
Monad m =>
Int -> (Int -> m a) -> m (Vector a)
generateM (Flags -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Flags
pSurfaceFormatCount')) (\Int
i -> forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @SurfaceFormatKHR ((("pSurfaceFormats" ::: Ptr SurfaceFormatKHR
pPSurfaceFormats) ("pSurfaceFormats" ::: Ptr SurfaceFormatKHR)
-> Int -> "pSurfaceFormats" ::: Ptr SurfaceFormatKHR
forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (Int
8 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr SurfaceFormatKHR)))
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR)
-> ContT
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR)
IO
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR)
forall (f :: * -> *) a. Applicative f => a -> f a
pure ((Result, "surfaceFormats" ::: Vector SurfaceFormatKHR)
-> ContT
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR)
IO
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR))
-> (Result, "surfaceFormats" ::: Vector SurfaceFormatKHR)
-> ContT
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR)
IO
(Result, "surfaceFormats" ::: Vector SurfaceFormatKHR)
forall a b. (a -> b) -> a -> b
$ ((Result
r'), "surfaceFormats" ::: Vector SurfaceFormatKHR
pSurfaceFormats')
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkGetPhysicalDeviceSurfacePresentModesKHR
:: FunPtr (Ptr PhysicalDevice_T -> SurfaceKHR -> Ptr Word32 -> Ptr PresentModeKHR -> IO Result) -> Ptr PhysicalDevice_T -> SurfaceKHR -> Ptr Word32 -> Ptr PresentModeKHR -> IO Result
getPhysicalDeviceSurfacePresentModesKHR :: forall io
. (MonadIO io)
=>
PhysicalDevice
->
SurfaceKHR
-> io (Result, ("presentModes" ::: Vector PresentModeKHR))
getPhysicalDeviceSurfacePresentModesKHR :: forall (io :: * -> *).
MonadIO io =>
PhysicalDevice
-> SurfaceKHR
-> io (Result, "presentModes" ::: Vector PresentModeKHR)
getPhysicalDeviceSurfacePresentModesKHR PhysicalDevice
physicalDevice
SurfaceKHR
surface = IO (Result, "presentModes" ::: Vector PresentModeKHR)
-> io (Result, "presentModes" ::: Vector PresentModeKHR)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Result, "presentModes" ::: Vector PresentModeKHR)
-> io (Result, "presentModes" ::: Vector PresentModeKHR))
-> (ContT
(Result, "presentModes" ::: Vector PresentModeKHR)
IO
(Result, "presentModes" ::: Vector PresentModeKHR)
-> IO (Result, "presentModes" ::: Vector PresentModeKHR))
-> ContT
(Result, "presentModes" ::: Vector PresentModeKHR)
IO
(Result, "presentModes" ::: Vector PresentModeKHR)
-> io (Result, "presentModes" ::: Vector PresentModeKHR)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT
(Result, "presentModes" ::: Vector PresentModeKHR)
IO
(Result, "presentModes" ::: Vector PresentModeKHR)
-> IO (Result, "presentModes" ::: Vector PresentModeKHR)
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT
(Result, "presentModes" ::: Vector PresentModeKHR)
IO
(Result, "presentModes" ::: Vector PresentModeKHR)
-> io (Result, "presentModes" ::: Vector PresentModeKHR))
-> ContT
(Result, "presentModes" ::: Vector PresentModeKHR)
IO
(Result, "presentModes" ::: Vector PresentModeKHR)
-> io (Result, "presentModes" ::: Vector PresentModeKHR)
forall a b. (a -> b) -> a -> b
$ do
let vkGetPhysicalDeviceSurfacePresentModesKHRPtr :: FunPtr
(Ptr PhysicalDevice_T
-> SurfaceKHR
-> ("pSurfaceFormatCount" ::: Ptr Flags)
-> ("pPresentModes" ::: Ptr PresentModeKHR)
-> IO Result)
vkGetPhysicalDeviceSurfacePresentModesKHRPtr = InstanceCmds
-> FunPtr
(Ptr PhysicalDevice_T
-> SurfaceKHR
-> ("pSurfaceFormatCount" ::: Ptr Flags)
-> ("pPresentModes" ::: Ptr PresentModeKHR)
-> IO Result)
pVkGetPhysicalDeviceSurfacePresentModesKHR (case PhysicalDevice
physicalDevice of PhysicalDevice{InstanceCmds
instanceCmds :: InstanceCmds
$sel:instanceCmds:PhysicalDevice :: PhysicalDevice -> InstanceCmds
instanceCmds} -> InstanceCmds
instanceCmds)
IO ()
-> ContT (Result, "presentModes" ::: Vector PresentModeKHR) IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO ()
-> ContT (Result, "presentModes" ::: Vector PresentModeKHR) IO ())
-> IO ()
-> ContT (Result, "presentModes" ::: Vector PresentModeKHR) IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr PhysicalDevice_T
-> SurfaceKHR
-> ("pSurfaceFormatCount" ::: Ptr Flags)
-> ("pPresentModes" ::: Ptr PresentModeKHR)
-> IO Result)
vkGetPhysicalDeviceSurfacePresentModesKHRPtr FunPtr
(Ptr PhysicalDevice_T
-> SurfaceKHR
-> ("pSurfaceFormatCount" ::: Ptr Flags)
-> ("pPresentModes" ::: Ptr PresentModeKHR)
-> IO Result)
-> FunPtr
(Ptr PhysicalDevice_T
-> SurfaceKHR
-> ("pSurfaceFormatCount" ::: Ptr Flags)
-> ("pPresentModes" ::: Ptr PresentModeKHR)
-> IO Result)
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
(Ptr PhysicalDevice_T
-> SurfaceKHR
-> ("pSurfaceFormatCount" ::: Ptr Flags)
-> ("pPresentModes" ::: Ptr PresentModeKHR)
-> IO Result)
forall a. FunPtr a
nullFunPtr) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
IOException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (IOException -> IO ()) -> IOException -> IO ()
forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError Maybe Handle
forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkGetPhysicalDeviceSurfacePresentModesKHR is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
let vkGetPhysicalDeviceSurfacePresentModesKHR' :: Ptr PhysicalDevice_T
-> SurfaceKHR
-> ("pSurfaceFormatCount" ::: Ptr Flags)
-> ("pPresentModes" ::: Ptr PresentModeKHR)
-> IO Result
vkGetPhysicalDeviceSurfacePresentModesKHR' = FunPtr
(Ptr PhysicalDevice_T
-> SurfaceKHR
-> ("pSurfaceFormatCount" ::: Ptr Flags)
-> ("pPresentModes" ::: Ptr PresentModeKHR)
-> IO Result)
-> Ptr PhysicalDevice_T
-> SurfaceKHR
-> ("pSurfaceFormatCount" ::: Ptr Flags)
-> ("pPresentModes" ::: Ptr PresentModeKHR)
-> IO Result
mkVkGetPhysicalDeviceSurfacePresentModesKHR FunPtr
(Ptr PhysicalDevice_T
-> SurfaceKHR
-> ("pSurfaceFormatCount" ::: Ptr Flags)
-> ("pPresentModes" ::: Ptr PresentModeKHR)
-> IO Result)
vkGetPhysicalDeviceSurfacePresentModesKHRPtr
let physicalDevice' :: Ptr PhysicalDevice_T
physicalDevice' = PhysicalDevice -> Ptr PhysicalDevice_T
physicalDeviceHandle (PhysicalDevice
physicalDevice)
"pSurfaceFormatCount" ::: Ptr Flags
pPPresentModeCount <- ((("pSurfaceFormatCount" ::: Ptr Flags)
-> IO (Result, "presentModes" ::: Vector PresentModeKHR))
-> IO (Result, "presentModes" ::: Vector PresentModeKHR))
-> ContT
(Result, "presentModes" ::: Vector PresentModeKHR)
IO
("pSurfaceFormatCount" ::: Ptr Flags)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pSurfaceFormatCount" ::: Ptr Flags)
-> IO (Result, "presentModes" ::: Vector PresentModeKHR))
-> IO (Result, "presentModes" ::: Vector PresentModeKHR))
-> ContT
(Result, "presentModes" ::: Vector PresentModeKHR)
IO
("pSurfaceFormatCount" ::: Ptr Flags))
-> ((("pSurfaceFormatCount" ::: Ptr Flags)
-> IO (Result, "presentModes" ::: Vector PresentModeKHR))
-> IO (Result, "presentModes" ::: Vector PresentModeKHR))
-> ContT
(Result, "presentModes" ::: Vector PresentModeKHR)
IO
("pSurfaceFormatCount" ::: Ptr Flags)
forall a b. (a -> b) -> a -> b
$ IO ("pSurfaceFormatCount" ::: Ptr Flags)
-> (("pSurfaceFormatCount" ::: Ptr Flags) -> IO ())
-> (("pSurfaceFormatCount" ::: Ptr Flags)
-> IO (Result, "presentModes" ::: Vector PresentModeKHR))
-> IO (Result, "presentModes" ::: Vector PresentModeKHR)
forall a b c. IO a -> (a -> IO b) -> (a -> IO c) -> IO c
bracket (forall a. Int -> IO (Ptr a)
callocBytes @Word32 Int
4) ("pSurfaceFormatCount" ::: Ptr Flags) -> IO ()
forall a. Ptr a -> IO ()
free
Result
r <- IO Result
-> ContT
(Result, "presentModes" ::: Vector PresentModeKHR) IO Result
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO Result
-> ContT
(Result, "presentModes" ::: Vector PresentModeKHR) IO Result)
-> IO Result
-> ContT
(Result, "presentModes" ::: Vector PresentModeKHR) IO Result
forall a b. (a -> b) -> a -> b
$ String -> IO Result -> IO Result
forall a. String -> IO a -> IO a
traceAroundEvent String
"vkGetPhysicalDeviceSurfacePresentModesKHR" (Ptr PhysicalDevice_T
-> SurfaceKHR
-> ("pSurfaceFormatCount" ::: Ptr Flags)
-> ("pPresentModes" ::: Ptr PresentModeKHR)
-> IO Result
vkGetPhysicalDeviceSurfacePresentModesKHR'
Ptr PhysicalDevice_T
physicalDevice'
(SurfaceKHR
surface)
("pSurfaceFormatCount" ::: Ptr Flags
pPPresentModeCount)
("pPresentModes" ::: Ptr PresentModeKHR
forall a. Ptr a
nullPtr))
IO ()
-> ContT (Result, "presentModes" ::: Vector PresentModeKHR) IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO ()
-> ContT (Result, "presentModes" ::: Vector PresentModeKHR) IO ())
-> IO ()
-> ContT (Result, "presentModes" ::: Vector PresentModeKHR) IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
when (Result
r Result -> Result -> Bool
forall a. Ord a => a -> a -> Bool
< Result
SUCCESS) (VulkanException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (Result -> VulkanException
VulkanException Result
r))
Flags
pPresentModeCount <- IO Flags
-> ContT
(Result, "presentModes" ::: Vector PresentModeKHR) IO Flags
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO Flags
-> ContT
(Result, "presentModes" ::: Vector PresentModeKHR) IO Flags)
-> IO Flags
-> ContT
(Result, "presentModes" ::: Vector PresentModeKHR) IO Flags
forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> IO a
peek @Word32 "pSurfaceFormatCount" ::: Ptr Flags
pPPresentModeCount
"pPresentModes" ::: Ptr PresentModeKHR
pPPresentModes <- ((("pPresentModes" ::: Ptr PresentModeKHR)
-> IO (Result, "presentModes" ::: Vector PresentModeKHR))
-> IO (Result, "presentModes" ::: Vector PresentModeKHR))
-> ContT
(Result, "presentModes" ::: Vector PresentModeKHR)
IO
("pPresentModes" ::: Ptr PresentModeKHR)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pPresentModes" ::: Ptr PresentModeKHR)
-> IO (Result, "presentModes" ::: Vector PresentModeKHR))
-> IO (Result, "presentModes" ::: Vector PresentModeKHR))
-> ContT
(Result, "presentModes" ::: Vector PresentModeKHR)
IO
("pPresentModes" ::: Ptr PresentModeKHR))
-> ((("pPresentModes" ::: Ptr PresentModeKHR)
-> IO (Result, "presentModes" ::: Vector PresentModeKHR))
-> IO (Result, "presentModes" ::: Vector PresentModeKHR))
-> ContT
(Result, "presentModes" ::: Vector PresentModeKHR)
IO
("pPresentModes" ::: Ptr PresentModeKHR)
forall a b. (a -> b) -> a -> b
$ IO ("pPresentModes" ::: Ptr PresentModeKHR)
-> (("pPresentModes" ::: Ptr PresentModeKHR) -> IO ())
-> (("pPresentModes" ::: Ptr PresentModeKHR)
-> IO (Result, "presentModes" ::: Vector PresentModeKHR))
-> IO (Result, "presentModes" ::: Vector PresentModeKHR)
forall a b c. IO a -> (a -> IO b) -> (a -> IO c) -> IO c
bracket (forall a. Int -> IO (Ptr a)
callocBytes @PresentModeKHR ((Flags -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Flags
pPresentModeCount)) Int -> Int -> Int
forall a. Num a => a -> a -> a
* Int
4)) ("pPresentModes" ::: Ptr PresentModeKHR) -> IO ()
forall a. Ptr a -> IO ()
free
Result
r' <- IO Result
-> ContT
(Result, "presentModes" ::: Vector PresentModeKHR) IO Result
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO Result
-> ContT
(Result, "presentModes" ::: Vector PresentModeKHR) IO Result)
-> IO Result
-> ContT
(Result, "presentModes" ::: Vector PresentModeKHR) IO Result
forall a b. (a -> b) -> a -> b
$ String -> IO Result -> IO Result
forall a. String -> IO a -> IO a
traceAroundEvent String
"vkGetPhysicalDeviceSurfacePresentModesKHR" (Ptr PhysicalDevice_T
-> SurfaceKHR
-> ("pSurfaceFormatCount" ::: Ptr Flags)
-> ("pPresentModes" ::: Ptr PresentModeKHR)
-> IO Result
vkGetPhysicalDeviceSurfacePresentModesKHR'
Ptr PhysicalDevice_T
physicalDevice'
(SurfaceKHR
surface)
("pSurfaceFormatCount" ::: Ptr Flags
pPPresentModeCount)
("pPresentModes" ::: Ptr PresentModeKHR
pPPresentModes))
IO ()
-> ContT (Result, "presentModes" ::: Vector PresentModeKHR) IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO ()
-> ContT (Result, "presentModes" ::: Vector PresentModeKHR) IO ())
-> IO ()
-> ContT (Result, "presentModes" ::: Vector PresentModeKHR) IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
when (Result
r' Result -> Result -> Bool
forall a. Ord a => a -> a -> Bool
< Result
SUCCESS) (VulkanException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (Result -> VulkanException
VulkanException Result
r'))
Flags
pPresentModeCount' <- IO Flags
-> ContT
(Result, "presentModes" ::: Vector PresentModeKHR) IO Flags
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO Flags
-> ContT
(Result, "presentModes" ::: Vector PresentModeKHR) IO Flags)
-> IO Flags
-> ContT
(Result, "presentModes" ::: Vector PresentModeKHR) IO Flags
forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> IO a
peek @Word32 "pSurfaceFormatCount" ::: Ptr Flags
pPPresentModeCount
"presentModes" ::: Vector PresentModeKHR
pPresentModes' <- IO ("presentModes" ::: Vector PresentModeKHR)
-> ContT
(Result, "presentModes" ::: Vector PresentModeKHR)
IO
("presentModes" ::: Vector PresentModeKHR)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO ("presentModes" ::: Vector PresentModeKHR)
-> ContT
(Result, "presentModes" ::: Vector PresentModeKHR)
IO
("presentModes" ::: Vector PresentModeKHR))
-> IO ("presentModes" ::: Vector PresentModeKHR)
-> ContT
(Result, "presentModes" ::: Vector PresentModeKHR)
IO
("presentModes" ::: Vector PresentModeKHR)
forall a b. (a -> b) -> a -> b
$ Int
-> (Int -> IO PresentModeKHR)
-> IO ("presentModes" ::: Vector PresentModeKHR)
forall (m :: * -> *) a.
Monad m =>
Int -> (Int -> m a) -> m (Vector a)
generateM (Flags -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Flags
pPresentModeCount')) (\Int
i -> forall a. Storable a => Ptr a -> IO a
peek @PresentModeKHR (("pPresentModes" ::: Ptr PresentModeKHR
pPPresentModes ("pPresentModes" ::: Ptr PresentModeKHR)
-> Int -> "pPresentModes" ::: Ptr PresentModeKHR
forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (Int
4 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr PresentModeKHR)))
(Result, "presentModes" ::: Vector PresentModeKHR)
-> ContT
(Result, "presentModes" ::: Vector PresentModeKHR)
IO
(Result, "presentModes" ::: Vector PresentModeKHR)
forall (f :: * -> *) a. Applicative f => a -> f a
pure ((Result, "presentModes" ::: Vector PresentModeKHR)
-> ContT
(Result, "presentModes" ::: Vector PresentModeKHR)
IO
(Result, "presentModes" ::: Vector PresentModeKHR))
-> (Result, "presentModes" ::: Vector PresentModeKHR)
-> ContT
(Result, "presentModes" ::: Vector PresentModeKHR)
IO
(Result, "presentModes" ::: Vector PresentModeKHR)
forall a b. (a -> b) -> a -> b
$ ((Result
r'), "presentModes" ::: Vector PresentModeKHR
pPresentModes')
pattern $bCOLORSPACE_SRGB_NONLINEAR_KHR :: ColorSpaceKHR
$mCOLORSPACE_SRGB_NONLINEAR_KHR :: forall {r}. ColorSpaceKHR -> (Void# -> r) -> (Void# -> r) -> r
COLORSPACE_SRGB_NONLINEAR_KHR = COLOR_SPACE_SRGB_NONLINEAR_KHR
data SurfaceCapabilitiesKHR = SurfaceCapabilitiesKHR
{
SurfaceCapabilitiesKHR -> Flags
minImageCount :: Word32
,
SurfaceCapabilitiesKHR -> Flags
maxImageCount :: Word32
,
SurfaceCapabilitiesKHR -> Extent2D
currentExtent :: Extent2D
,
SurfaceCapabilitiesKHR -> Extent2D
minImageExtent :: Extent2D
,
SurfaceCapabilitiesKHR -> Extent2D
maxImageExtent :: Extent2D
,
SurfaceCapabilitiesKHR -> Flags
maxImageArrayLayers :: Word32
,
SurfaceCapabilitiesKHR -> SurfaceTransformFlagBitsKHR
supportedTransforms :: SurfaceTransformFlagsKHR
,
SurfaceCapabilitiesKHR -> SurfaceTransformFlagBitsKHR
currentTransform :: SurfaceTransformFlagBitsKHR
,
SurfaceCapabilitiesKHR -> CompositeAlphaFlagBitsKHR
supportedCompositeAlpha :: CompositeAlphaFlagsKHR
,
SurfaceCapabilitiesKHR -> ImageUsageFlags
supportedUsageFlags :: ImageUsageFlags
}
deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (SurfaceCapabilitiesKHR)
#endif
deriving instance Show SurfaceCapabilitiesKHR
instance ToCStruct SurfaceCapabilitiesKHR where
withCStruct :: forall b.
SurfaceCapabilitiesKHR
-> (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> IO b)
-> IO b
withCStruct SurfaceCapabilitiesKHR
x ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR) -> IO b
f = Int
-> (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> IO b)
-> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
52 ((("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR) -> IO b)
-> IO b)
-> (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> IO b)
-> IO b
forall a b. (a -> b) -> a -> b
$ \"pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR
p -> ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> SurfaceCapabilitiesKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR
p SurfaceCapabilitiesKHR
x (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR) -> IO b
f "pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR
p)
pokeCStruct :: forall b.
("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> SurfaceCapabilitiesKHR -> IO b -> IO b
pokeCStruct "pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR
p SurfaceCapabilitiesKHR{Flags
ImageUsageFlags
Extent2D
SurfaceTransformFlagBitsKHR
CompositeAlphaFlagBitsKHR
supportedUsageFlags :: ImageUsageFlags
supportedCompositeAlpha :: CompositeAlphaFlagBitsKHR
currentTransform :: SurfaceTransformFlagBitsKHR
supportedTransforms :: SurfaceTransformFlagBitsKHR
maxImageArrayLayers :: Flags
maxImageExtent :: Extent2D
minImageExtent :: Extent2D
currentExtent :: Extent2D
maxImageCount :: Flags
minImageCount :: Flags
$sel:supportedUsageFlags:SurfaceCapabilitiesKHR :: SurfaceCapabilitiesKHR -> ImageUsageFlags
$sel:supportedCompositeAlpha:SurfaceCapabilitiesKHR :: SurfaceCapabilitiesKHR -> CompositeAlphaFlagBitsKHR
$sel:currentTransform:SurfaceCapabilitiesKHR :: SurfaceCapabilitiesKHR -> SurfaceTransformFlagBitsKHR
$sel:supportedTransforms:SurfaceCapabilitiesKHR :: SurfaceCapabilitiesKHR -> SurfaceTransformFlagBitsKHR
$sel:maxImageArrayLayers:SurfaceCapabilitiesKHR :: SurfaceCapabilitiesKHR -> Flags
$sel:maxImageExtent:SurfaceCapabilitiesKHR :: SurfaceCapabilitiesKHR -> Extent2D
$sel:minImageExtent:SurfaceCapabilitiesKHR :: SurfaceCapabilitiesKHR -> Extent2D
$sel:currentExtent:SurfaceCapabilitiesKHR :: SurfaceCapabilitiesKHR -> Extent2D
$sel:maxImageCount:SurfaceCapabilitiesKHR :: SurfaceCapabilitiesKHR -> Flags
$sel:minImageCount:SurfaceCapabilitiesKHR :: SurfaceCapabilitiesKHR -> Flags
..} IO b
f = do
("pSurfaceFormatCount" ::: Ptr Flags) -> Flags -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR
p ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> Int -> "pSurfaceFormatCount" ::: Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr Word32)) (Flags
minImageCount)
("pSurfaceFormatCount" ::: Ptr Flags) -> Flags -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR
p ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> Int -> "pSurfaceFormatCount" ::: Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4 :: Ptr Word32)) (Flags
maxImageCount)
Ptr Extent2D -> Extent2D -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR
p ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> Int -> Ptr Extent2D
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr Extent2D)) (Extent2D
currentExtent)
Ptr Extent2D -> Extent2D -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR
p ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> Int -> Ptr Extent2D
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Extent2D)) (Extent2D
minImageExtent)
Ptr Extent2D -> Extent2D -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR
p ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> Int -> Ptr Extent2D
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Extent2D)) (Extent2D
maxImageExtent)
("pSurfaceFormatCount" ::: Ptr Flags) -> Flags -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR
p ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> Int -> "pSurfaceFormatCount" ::: Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr Word32)) (Flags
maxImageArrayLayers)
Ptr SurfaceTransformFlagBitsKHR
-> SurfaceTransformFlagBitsKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR
p ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> Int -> Ptr SurfaceTransformFlagBitsKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
36 :: Ptr SurfaceTransformFlagsKHR)) (SurfaceTransformFlagBitsKHR
supportedTransforms)
Ptr SurfaceTransformFlagBitsKHR
-> SurfaceTransformFlagBitsKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR
p ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> Int -> Ptr SurfaceTransformFlagBitsKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr SurfaceTransformFlagBitsKHR)) (SurfaceTransformFlagBitsKHR
currentTransform)
Ptr CompositeAlphaFlagBitsKHR -> CompositeAlphaFlagBitsKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR
p ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> Int -> Ptr CompositeAlphaFlagBitsKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
44 :: Ptr CompositeAlphaFlagsKHR)) (CompositeAlphaFlagBitsKHR
supportedCompositeAlpha)
Ptr ImageUsageFlags -> ImageUsageFlags -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR
p ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> Int -> Ptr ImageUsageFlags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48 :: Ptr ImageUsageFlags)) (ImageUsageFlags
supportedUsageFlags)
IO b
f
cStructSize :: Int
cStructSize = Int
52
cStructAlignment :: Int
cStructAlignment = Int
4
pokeZeroCStruct :: forall b.
("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> IO b -> IO b
pokeZeroCStruct "pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR
p IO b
f = do
("pSurfaceFormatCount" ::: Ptr Flags) -> Flags -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR
p ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> Int -> "pSurfaceFormatCount" ::: Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr Word32)) (Flags
forall a. Zero a => a
zero)
("pSurfaceFormatCount" ::: Ptr Flags) -> Flags -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR
p ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> Int -> "pSurfaceFormatCount" ::: Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4 :: Ptr Word32)) (Flags
forall a. Zero a => a
zero)
Ptr Extent2D -> Extent2D -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR
p ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> Int -> Ptr Extent2D
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr Extent2D)) (Extent2D
forall a. Zero a => a
zero)
Ptr Extent2D -> Extent2D -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR
p ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> Int -> Ptr Extent2D
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Extent2D)) (Extent2D
forall a. Zero a => a
zero)
Ptr Extent2D -> Extent2D -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR
p ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> Int -> Ptr Extent2D
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Extent2D)) (Extent2D
forall a. Zero a => a
zero)
("pSurfaceFormatCount" ::: Ptr Flags) -> Flags -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR
p ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> Int -> "pSurfaceFormatCount" ::: Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr Word32)) (Flags
forall a. Zero a => a
zero)
Ptr SurfaceTransformFlagBitsKHR
-> SurfaceTransformFlagBitsKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR
p ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> Int -> Ptr SurfaceTransformFlagBitsKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
36 :: Ptr SurfaceTransformFlagsKHR)) (SurfaceTransformFlagBitsKHR
forall a. Zero a => a
zero)
Ptr SurfaceTransformFlagBitsKHR
-> SurfaceTransformFlagBitsKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR
p ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> Int -> Ptr SurfaceTransformFlagBitsKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr SurfaceTransformFlagBitsKHR)) (SurfaceTransformFlagBitsKHR
forall a. Zero a => a
zero)
Ptr CompositeAlphaFlagBitsKHR -> CompositeAlphaFlagBitsKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR
p ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> Int -> Ptr CompositeAlphaFlagBitsKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
44 :: Ptr CompositeAlphaFlagsKHR)) (CompositeAlphaFlagBitsKHR
forall a. Zero a => a
zero)
Ptr ImageUsageFlags -> ImageUsageFlags -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR
p ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> Int -> Ptr ImageUsageFlags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48 :: Ptr ImageUsageFlags)) (ImageUsageFlags
forall a. Zero a => a
zero)
IO b
f
instance FromCStruct SurfaceCapabilitiesKHR where
peekCStruct :: ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> IO SurfaceCapabilitiesKHR
peekCStruct "pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR
p = do
Flags
minImageCount <- forall a. Storable a => Ptr a -> IO a
peek @Word32 (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR
p ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> Int -> "pSurfaceFormatCount" ::: Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr Word32))
Flags
maxImageCount <- forall a. Storable a => Ptr a -> IO a
peek @Word32 (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR
p ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> Int -> "pSurfaceFormatCount" ::: Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4 :: Ptr Word32))
Extent2D
currentExtent <- forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @Extent2D (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR
p ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> Int -> Ptr Extent2D
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr Extent2D))
Extent2D
minImageExtent <- forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @Extent2D (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR
p ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> Int -> Ptr Extent2D
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Extent2D))
Extent2D
maxImageExtent <- forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @Extent2D (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR
p ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> Int -> Ptr Extent2D
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Extent2D))
Flags
maxImageArrayLayers <- forall a. Storable a => Ptr a -> IO a
peek @Word32 (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR
p ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> Int -> "pSurfaceFormatCount" ::: Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr Word32))
SurfaceTransformFlagBitsKHR
supportedTransforms <- forall a. Storable a => Ptr a -> IO a
peek @SurfaceTransformFlagsKHR (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR
p ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> Int -> Ptr SurfaceTransformFlagBitsKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
36 :: Ptr SurfaceTransformFlagsKHR))
SurfaceTransformFlagBitsKHR
currentTransform <- forall a. Storable a => Ptr a -> IO a
peek @SurfaceTransformFlagBitsKHR (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR
p ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> Int -> Ptr SurfaceTransformFlagBitsKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr SurfaceTransformFlagBitsKHR))
CompositeAlphaFlagBitsKHR
supportedCompositeAlpha <- forall a. Storable a => Ptr a -> IO a
peek @CompositeAlphaFlagsKHR (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR
p ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> Int -> Ptr CompositeAlphaFlagBitsKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
44 :: Ptr CompositeAlphaFlagsKHR))
ImageUsageFlags
supportedUsageFlags <- forall a. Storable a => Ptr a -> IO a
peek @ImageUsageFlags (("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR
p ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> Int -> Ptr ImageUsageFlags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48 :: Ptr ImageUsageFlags))
SurfaceCapabilitiesKHR -> IO SurfaceCapabilitiesKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure (SurfaceCapabilitiesKHR -> IO SurfaceCapabilitiesKHR)
-> SurfaceCapabilitiesKHR -> IO SurfaceCapabilitiesKHR
forall a b. (a -> b) -> a -> b
$ Flags
-> Flags
-> Extent2D
-> Extent2D
-> Extent2D
-> Flags
-> SurfaceTransformFlagBitsKHR
-> SurfaceTransformFlagBitsKHR
-> CompositeAlphaFlagBitsKHR
-> ImageUsageFlags
-> SurfaceCapabilitiesKHR
SurfaceCapabilitiesKHR
Flags
minImageCount
Flags
maxImageCount
Extent2D
currentExtent
Extent2D
minImageExtent
Extent2D
maxImageExtent
Flags
maxImageArrayLayers
SurfaceTransformFlagBitsKHR
supportedTransforms
SurfaceTransformFlagBitsKHR
currentTransform
CompositeAlphaFlagBitsKHR
supportedCompositeAlpha
ImageUsageFlags
supportedUsageFlags
instance Storable SurfaceCapabilitiesKHR where
sizeOf :: SurfaceCapabilitiesKHR -> Int
sizeOf ~SurfaceCapabilitiesKHR
_ = Int
52
alignment :: SurfaceCapabilitiesKHR -> Int
alignment ~SurfaceCapabilitiesKHR
_ = Int
4
peek :: ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> IO SurfaceCapabilitiesKHR
peek = ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> IO SurfaceCapabilitiesKHR
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> SurfaceCapabilitiesKHR -> IO ()
poke "pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR
ptr SurfaceCapabilitiesKHR
poked = ("pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR)
-> SurfaceCapabilitiesKHR -> IO () -> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pSurfaceCapabilities" ::: Ptr SurfaceCapabilitiesKHR
ptr SurfaceCapabilitiesKHR
poked (() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero SurfaceCapabilitiesKHR where
zero :: SurfaceCapabilitiesKHR
zero = Flags
-> Flags
-> Extent2D
-> Extent2D
-> Extent2D
-> Flags
-> SurfaceTransformFlagBitsKHR
-> SurfaceTransformFlagBitsKHR
-> CompositeAlphaFlagBitsKHR
-> ImageUsageFlags
-> SurfaceCapabilitiesKHR
SurfaceCapabilitiesKHR
Flags
forall a. Zero a => a
zero
Flags
forall a. Zero a => a
zero
Extent2D
forall a. Zero a => a
zero
Extent2D
forall a. Zero a => a
zero
Extent2D
forall a. Zero a => a
zero
Flags
forall a. Zero a => a
zero
SurfaceTransformFlagBitsKHR
forall a. Zero a => a
zero
SurfaceTransformFlagBitsKHR
forall a. Zero a => a
zero
CompositeAlphaFlagBitsKHR
forall a. Zero a => a
zero
ImageUsageFlags
forall a. Zero a => a
zero
data SurfaceFormatKHR = SurfaceFormatKHR
{
SurfaceFormatKHR -> Format
format :: Format
,
SurfaceFormatKHR -> ColorSpaceKHR
colorSpace :: ColorSpaceKHR
}
deriving (Typeable, SurfaceFormatKHR -> SurfaceFormatKHR -> Bool
(SurfaceFormatKHR -> SurfaceFormatKHR -> Bool)
-> (SurfaceFormatKHR -> SurfaceFormatKHR -> Bool)
-> Eq SurfaceFormatKHR
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SurfaceFormatKHR -> SurfaceFormatKHR -> Bool
$c/= :: SurfaceFormatKHR -> SurfaceFormatKHR -> Bool
== :: SurfaceFormatKHR -> SurfaceFormatKHR -> Bool
$c== :: SurfaceFormatKHR -> SurfaceFormatKHR -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (SurfaceFormatKHR)
#endif
deriving instance Show SurfaceFormatKHR
instance ToCStruct SurfaceFormatKHR where
withCStruct :: forall b.
SurfaceFormatKHR
-> (("pSurfaceFormats" ::: Ptr SurfaceFormatKHR) -> IO b) -> IO b
withCStruct SurfaceFormatKHR
x ("pSurfaceFormats" ::: Ptr SurfaceFormatKHR) -> IO b
f = Int
-> (("pSurfaceFormats" ::: Ptr SurfaceFormatKHR) -> IO b) -> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
8 ((("pSurfaceFormats" ::: Ptr SurfaceFormatKHR) -> IO b) -> IO b)
-> (("pSurfaceFormats" ::: Ptr SurfaceFormatKHR) -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \"pSurfaceFormats" ::: Ptr SurfaceFormatKHR
p -> ("pSurfaceFormats" ::: Ptr SurfaceFormatKHR)
-> SurfaceFormatKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pSurfaceFormats" ::: Ptr SurfaceFormatKHR
p SurfaceFormatKHR
x (("pSurfaceFormats" ::: Ptr SurfaceFormatKHR) -> IO b
f "pSurfaceFormats" ::: Ptr SurfaceFormatKHR
p)
pokeCStruct :: forall b.
("pSurfaceFormats" ::: Ptr SurfaceFormatKHR)
-> SurfaceFormatKHR -> IO b -> IO b
pokeCStruct "pSurfaceFormats" ::: Ptr SurfaceFormatKHR
p SurfaceFormatKHR{Format
ColorSpaceKHR
colorSpace :: ColorSpaceKHR
format :: Format
$sel:colorSpace:SurfaceFormatKHR :: SurfaceFormatKHR -> ColorSpaceKHR
$sel:format:SurfaceFormatKHR :: SurfaceFormatKHR -> Format
..} IO b
f = do
Ptr Format -> Format -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pSurfaceFormats" ::: Ptr SurfaceFormatKHR
p ("pSurfaceFormats" ::: Ptr SurfaceFormatKHR) -> Int -> Ptr Format
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr Format)) (Format
format)
Ptr ColorSpaceKHR -> ColorSpaceKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pSurfaceFormats" ::: Ptr SurfaceFormatKHR
p ("pSurfaceFormats" ::: Ptr SurfaceFormatKHR)
-> Int -> Ptr ColorSpaceKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4 :: Ptr ColorSpaceKHR)) (ColorSpaceKHR
colorSpace)
IO b
f
cStructSize :: Int
cStructSize = Int
8
cStructAlignment :: Int
cStructAlignment = Int
4
pokeZeroCStruct :: forall b.
("pSurfaceFormats" ::: Ptr SurfaceFormatKHR) -> IO b -> IO b
pokeZeroCStruct "pSurfaceFormats" ::: Ptr SurfaceFormatKHR
p IO b
f = do
Ptr Format -> Format -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pSurfaceFormats" ::: Ptr SurfaceFormatKHR
p ("pSurfaceFormats" ::: Ptr SurfaceFormatKHR) -> Int -> Ptr Format
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr Format)) (Format
forall a. Zero a => a
zero)
Ptr ColorSpaceKHR -> ColorSpaceKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pSurfaceFormats" ::: Ptr SurfaceFormatKHR
p ("pSurfaceFormats" ::: Ptr SurfaceFormatKHR)
-> Int -> Ptr ColorSpaceKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4 :: Ptr ColorSpaceKHR)) (ColorSpaceKHR
forall a. Zero a => a
zero)
IO b
f
instance FromCStruct SurfaceFormatKHR where
peekCStruct :: ("pSurfaceFormats" ::: Ptr SurfaceFormatKHR) -> IO SurfaceFormatKHR
peekCStruct "pSurfaceFormats" ::: Ptr SurfaceFormatKHR
p = do
Format
format <- forall a. Storable a => Ptr a -> IO a
peek @Format (("pSurfaceFormats" ::: Ptr SurfaceFormatKHR
p ("pSurfaceFormats" ::: Ptr SurfaceFormatKHR) -> Int -> Ptr Format
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr Format))
ColorSpaceKHR
colorSpace <- forall a. Storable a => Ptr a -> IO a
peek @ColorSpaceKHR (("pSurfaceFormats" ::: Ptr SurfaceFormatKHR
p ("pSurfaceFormats" ::: Ptr SurfaceFormatKHR)
-> Int -> Ptr ColorSpaceKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4 :: Ptr ColorSpaceKHR))
SurfaceFormatKHR -> IO SurfaceFormatKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure (SurfaceFormatKHR -> IO SurfaceFormatKHR)
-> SurfaceFormatKHR -> IO SurfaceFormatKHR
forall a b. (a -> b) -> a -> b
$ Format -> ColorSpaceKHR -> SurfaceFormatKHR
SurfaceFormatKHR
Format
format ColorSpaceKHR
colorSpace
instance Storable SurfaceFormatKHR where
sizeOf :: SurfaceFormatKHR -> Int
sizeOf ~SurfaceFormatKHR
_ = Int
8
alignment :: SurfaceFormatKHR -> Int
alignment ~SurfaceFormatKHR
_ = Int
4
peek :: ("pSurfaceFormats" ::: Ptr SurfaceFormatKHR) -> IO SurfaceFormatKHR
peek = ("pSurfaceFormats" ::: Ptr SurfaceFormatKHR) -> IO SurfaceFormatKHR
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: ("pSurfaceFormats" ::: Ptr SurfaceFormatKHR)
-> SurfaceFormatKHR -> IO ()
poke "pSurfaceFormats" ::: Ptr SurfaceFormatKHR
ptr SurfaceFormatKHR
poked = ("pSurfaceFormats" ::: Ptr SurfaceFormatKHR)
-> SurfaceFormatKHR -> IO () -> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pSurfaceFormats" ::: Ptr SurfaceFormatKHR
ptr SurfaceFormatKHR
poked (() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero SurfaceFormatKHR where
zero :: SurfaceFormatKHR
zero = Format -> ColorSpaceKHR -> SurfaceFormatKHR
SurfaceFormatKHR
Format
forall a. Zero a => a
zero
ColorSpaceKHR
forall a. Zero a => a
zero
newtype PresentModeKHR = PresentModeKHR Int32
deriving newtype (PresentModeKHR -> PresentModeKHR -> Bool
(PresentModeKHR -> PresentModeKHR -> Bool)
-> (PresentModeKHR -> PresentModeKHR -> Bool) -> Eq PresentModeKHR
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PresentModeKHR -> PresentModeKHR -> Bool
$c/= :: PresentModeKHR -> PresentModeKHR -> Bool
== :: PresentModeKHR -> PresentModeKHR -> Bool
$c== :: PresentModeKHR -> PresentModeKHR -> Bool
Eq, Eq PresentModeKHR
Eq PresentModeKHR
-> (PresentModeKHR -> PresentModeKHR -> Ordering)
-> (PresentModeKHR -> PresentModeKHR -> Bool)
-> (PresentModeKHR -> PresentModeKHR -> Bool)
-> (PresentModeKHR -> PresentModeKHR -> Bool)
-> (PresentModeKHR -> PresentModeKHR -> Bool)
-> (PresentModeKHR -> PresentModeKHR -> PresentModeKHR)
-> (PresentModeKHR -> PresentModeKHR -> PresentModeKHR)
-> Ord PresentModeKHR
PresentModeKHR -> PresentModeKHR -> Bool
PresentModeKHR -> PresentModeKHR -> Ordering
PresentModeKHR -> PresentModeKHR -> PresentModeKHR
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 :: PresentModeKHR -> PresentModeKHR -> PresentModeKHR
$cmin :: PresentModeKHR -> PresentModeKHR -> PresentModeKHR
max :: PresentModeKHR -> PresentModeKHR -> PresentModeKHR
$cmax :: PresentModeKHR -> PresentModeKHR -> PresentModeKHR
>= :: PresentModeKHR -> PresentModeKHR -> Bool
$c>= :: PresentModeKHR -> PresentModeKHR -> Bool
> :: PresentModeKHR -> PresentModeKHR -> Bool
$c> :: PresentModeKHR -> PresentModeKHR -> Bool
<= :: PresentModeKHR -> PresentModeKHR -> Bool
$c<= :: PresentModeKHR -> PresentModeKHR -> Bool
< :: PresentModeKHR -> PresentModeKHR -> Bool
$c< :: PresentModeKHR -> PresentModeKHR -> Bool
compare :: PresentModeKHR -> PresentModeKHR -> Ordering
$ccompare :: PresentModeKHR -> PresentModeKHR -> Ordering
Ord, ("pPresentModes" ::: Ptr PresentModeKHR) -> IO PresentModeKHR
("pPresentModes" ::: Ptr PresentModeKHR)
-> Int -> IO PresentModeKHR
("pPresentModes" ::: Ptr PresentModeKHR)
-> Int -> PresentModeKHR -> IO ()
("pPresentModes" ::: Ptr PresentModeKHR) -> PresentModeKHR -> IO ()
PresentModeKHR -> Int
(PresentModeKHR -> Int)
-> (PresentModeKHR -> Int)
-> (("pPresentModes" ::: Ptr PresentModeKHR)
-> Int -> IO PresentModeKHR)
-> (("pPresentModes" ::: Ptr PresentModeKHR)
-> Int -> PresentModeKHR -> IO ())
-> (forall b. Ptr b -> Int -> IO PresentModeKHR)
-> (forall b. Ptr b -> Int -> PresentModeKHR -> IO ())
-> (("pPresentModes" ::: Ptr PresentModeKHR) -> IO PresentModeKHR)
-> (("pPresentModes" ::: Ptr PresentModeKHR)
-> PresentModeKHR -> IO ())
-> Storable PresentModeKHR
forall b. Ptr b -> Int -> IO PresentModeKHR
forall b. Ptr b -> Int -> PresentModeKHR -> 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 :: ("pPresentModes" ::: Ptr PresentModeKHR) -> PresentModeKHR -> IO ()
$cpoke :: ("pPresentModes" ::: Ptr PresentModeKHR) -> PresentModeKHR -> IO ()
peek :: ("pPresentModes" ::: Ptr PresentModeKHR) -> IO PresentModeKHR
$cpeek :: ("pPresentModes" ::: Ptr PresentModeKHR) -> IO PresentModeKHR
pokeByteOff :: forall b. Ptr b -> Int -> PresentModeKHR -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> PresentModeKHR -> IO ()
peekByteOff :: forall b. Ptr b -> Int -> IO PresentModeKHR
$cpeekByteOff :: forall b. Ptr b -> Int -> IO PresentModeKHR
pokeElemOff :: ("pPresentModes" ::: Ptr PresentModeKHR)
-> Int -> PresentModeKHR -> IO ()
$cpokeElemOff :: ("pPresentModes" ::: Ptr PresentModeKHR)
-> Int -> PresentModeKHR -> IO ()
peekElemOff :: ("pPresentModes" ::: Ptr PresentModeKHR)
-> Int -> IO PresentModeKHR
$cpeekElemOff :: ("pPresentModes" ::: Ptr PresentModeKHR)
-> Int -> IO PresentModeKHR
alignment :: PresentModeKHR -> Int
$calignment :: PresentModeKHR -> Int
sizeOf :: PresentModeKHR -> Int
$csizeOf :: PresentModeKHR -> Int
Storable, PresentModeKHR
PresentModeKHR -> Zero PresentModeKHR
forall a. a -> Zero a
zero :: PresentModeKHR
$czero :: PresentModeKHR
Zero)
pattern $bPRESENT_MODE_IMMEDIATE_KHR :: PresentModeKHR
$mPRESENT_MODE_IMMEDIATE_KHR :: forall {r}. PresentModeKHR -> (Void# -> r) -> (Void# -> r) -> r
PRESENT_MODE_IMMEDIATE_KHR = PresentModeKHR 0
pattern $bPRESENT_MODE_MAILBOX_KHR :: PresentModeKHR
$mPRESENT_MODE_MAILBOX_KHR :: forall {r}. PresentModeKHR -> (Void# -> r) -> (Void# -> r) -> r
PRESENT_MODE_MAILBOX_KHR = PresentModeKHR 1
pattern $bPRESENT_MODE_FIFO_KHR :: PresentModeKHR
$mPRESENT_MODE_FIFO_KHR :: forall {r}. PresentModeKHR -> (Void# -> r) -> (Void# -> r) -> r
PRESENT_MODE_FIFO_KHR = PresentModeKHR 2
pattern $bPRESENT_MODE_FIFO_RELAXED_KHR :: PresentModeKHR
$mPRESENT_MODE_FIFO_RELAXED_KHR :: forall {r}. PresentModeKHR -> (Void# -> r) -> (Void# -> r) -> r
PRESENT_MODE_FIFO_RELAXED_KHR = PresentModeKHR 3
pattern $bPRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR :: PresentModeKHR
$mPRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR :: forall {r}. PresentModeKHR -> (Void# -> r) -> (Void# -> r) -> r
PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR = PresentModeKHR 1000111001
pattern $bPRESENT_MODE_SHARED_DEMAND_REFRESH_KHR :: PresentModeKHR
$mPRESENT_MODE_SHARED_DEMAND_REFRESH_KHR :: forall {r}. PresentModeKHR -> (Void# -> r) -> (Void# -> r) -> r
PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR = PresentModeKHR 1000111000
{-# COMPLETE
PRESENT_MODE_IMMEDIATE_KHR
, PRESENT_MODE_MAILBOX_KHR
, PRESENT_MODE_FIFO_KHR
, PRESENT_MODE_FIFO_RELAXED_KHR
, PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR
, PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR ::
PresentModeKHR
#-}
conNamePresentModeKHR :: String
conNamePresentModeKHR :: String
conNamePresentModeKHR = String
"PresentModeKHR"
enumPrefixPresentModeKHR :: String
enumPrefixPresentModeKHR :: String
enumPrefixPresentModeKHR = String
"PRESENT_MODE_"
showTablePresentModeKHR :: [(PresentModeKHR, String)]
showTablePresentModeKHR :: [(PresentModeKHR, String)]
showTablePresentModeKHR =
[ (PresentModeKHR
PRESENT_MODE_IMMEDIATE_KHR, String
"IMMEDIATE_KHR")
, (PresentModeKHR
PRESENT_MODE_MAILBOX_KHR, String
"MAILBOX_KHR")
, (PresentModeKHR
PRESENT_MODE_FIFO_KHR, String
"FIFO_KHR")
, (PresentModeKHR
PRESENT_MODE_FIFO_RELAXED_KHR, String
"FIFO_RELAXED_KHR")
,
( PresentModeKHR
PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR
, String
"SHARED_CONTINUOUS_REFRESH_KHR"
)
,
( PresentModeKHR
PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR
, String
"SHARED_DEMAND_REFRESH_KHR"
)
]
instance Show PresentModeKHR where
showsPrec :: Int -> PresentModeKHR -> ShowS
showsPrec =
String
-> [(PresentModeKHR, String)]
-> String
-> (PresentModeKHR -> Int32)
-> (Int32 -> ShowS)
-> Int
-> PresentModeKHR
-> ShowS
forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec
String
enumPrefixPresentModeKHR
[(PresentModeKHR, String)]
showTablePresentModeKHR
String
conNamePresentModeKHR
(\(PresentModeKHR Int32
x) -> Int32
x)
(Int -> Int32 -> ShowS
forall a. Show a => Int -> a -> ShowS
showsPrec Int
11)
instance Read PresentModeKHR where
readPrec :: ReadPrec PresentModeKHR
readPrec =
String
-> [(PresentModeKHR, String)]
-> String
-> (Int32 -> PresentModeKHR)
-> ReadPrec PresentModeKHR
forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec
String
enumPrefixPresentModeKHR
[(PresentModeKHR, String)]
showTablePresentModeKHR
String
conNamePresentModeKHR
Int32 -> PresentModeKHR
PresentModeKHR
newtype ColorSpaceKHR = ColorSpaceKHR Int32
deriving newtype (ColorSpaceKHR -> ColorSpaceKHR -> Bool
(ColorSpaceKHR -> ColorSpaceKHR -> Bool)
-> (ColorSpaceKHR -> ColorSpaceKHR -> Bool) -> Eq ColorSpaceKHR
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ColorSpaceKHR -> ColorSpaceKHR -> Bool
$c/= :: ColorSpaceKHR -> ColorSpaceKHR -> Bool
== :: ColorSpaceKHR -> ColorSpaceKHR -> Bool
$c== :: ColorSpaceKHR -> ColorSpaceKHR -> Bool
Eq, Eq ColorSpaceKHR
Eq ColorSpaceKHR
-> (ColorSpaceKHR -> ColorSpaceKHR -> Ordering)
-> (ColorSpaceKHR -> ColorSpaceKHR -> Bool)
-> (ColorSpaceKHR -> ColorSpaceKHR -> Bool)
-> (ColorSpaceKHR -> ColorSpaceKHR -> Bool)
-> (ColorSpaceKHR -> ColorSpaceKHR -> Bool)
-> (ColorSpaceKHR -> ColorSpaceKHR -> ColorSpaceKHR)
-> (ColorSpaceKHR -> ColorSpaceKHR -> ColorSpaceKHR)
-> Ord ColorSpaceKHR
ColorSpaceKHR -> ColorSpaceKHR -> Bool
ColorSpaceKHR -> ColorSpaceKHR -> Ordering
ColorSpaceKHR -> ColorSpaceKHR -> ColorSpaceKHR
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 :: ColorSpaceKHR -> ColorSpaceKHR -> ColorSpaceKHR
$cmin :: ColorSpaceKHR -> ColorSpaceKHR -> ColorSpaceKHR
max :: ColorSpaceKHR -> ColorSpaceKHR -> ColorSpaceKHR
$cmax :: ColorSpaceKHR -> ColorSpaceKHR -> ColorSpaceKHR
>= :: ColorSpaceKHR -> ColorSpaceKHR -> Bool
$c>= :: ColorSpaceKHR -> ColorSpaceKHR -> Bool
> :: ColorSpaceKHR -> ColorSpaceKHR -> Bool
$c> :: ColorSpaceKHR -> ColorSpaceKHR -> Bool
<= :: ColorSpaceKHR -> ColorSpaceKHR -> Bool
$c<= :: ColorSpaceKHR -> ColorSpaceKHR -> Bool
< :: ColorSpaceKHR -> ColorSpaceKHR -> Bool
$c< :: ColorSpaceKHR -> ColorSpaceKHR -> Bool
compare :: ColorSpaceKHR -> ColorSpaceKHR -> Ordering
$ccompare :: ColorSpaceKHR -> ColorSpaceKHR -> Ordering
Ord, Ptr ColorSpaceKHR -> IO ColorSpaceKHR
Ptr ColorSpaceKHR -> Int -> IO ColorSpaceKHR
Ptr ColorSpaceKHR -> Int -> ColorSpaceKHR -> IO ()
Ptr ColorSpaceKHR -> ColorSpaceKHR -> IO ()
ColorSpaceKHR -> Int
(ColorSpaceKHR -> Int)
-> (ColorSpaceKHR -> Int)
-> (Ptr ColorSpaceKHR -> Int -> IO ColorSpaceKHR)
-> (Ptr ColorSpaceKHR -> Int -> ColorSpaceKHR -> IO ())
-> (forall b. Ptr b -> Int -> IO ColorSpaceKHR)
-> (forall b. Ptr b -> Int -> ColorSpaceKHR -> IO ())
-> (Ptr ColorSpaceKHR -> IO ColorSpaceKHR)
-> (Ptr ColorSpaceKHR -> ColorSpaceKHR -> IO ())
-> Storable ColorSpaceKHR
forall b. Ptr b -> Int -> IO ColorSpaceKHR
forall b. Ptr b -> Int -> ColorSpaceKHR -> 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 ColorSpaceKHR -> ColorSpaceKHR -> IO ()
$cpoke :: Ptr ColorSpaceKHR -> ColorSpaceKHR -> IO ()
peek :: Ptr ColorSpaceKHR -> IO ColorSpaceKHR
$cpeek :: Ptr ColorSpaceKHR -> IO ColorSpaceKHR
pokeByteOff :: forall b. Ptr b -> Int -> ColorSpaceKHR -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> ColorSpaceKHR -> IO ()
peekByteOff :: forall b. Ptr b -> Int -> IO ColorSpaceKHR
$cpeekByteOff :: forall b. Ptr b -> Int -> IO ColorSpaceKHR
pokeElemOff :: Ptr ColorSpaceKHR -> Int -> ColorSpaceKHR -> IO ()
$cpokeElemOff :: Ptr ColorSpaceKHR -> Int -> ColorSpaceKHR -> IO ()
peekElemOff :: Ptr ColorSpaceKHR -> Int -> IO ColorSpaceKHR
$cpeekElemOff :: Ptr ColorSpaceKHR -> Int -> IO ColorSpaceKHR
alignment :: ColorSpaceKHR -> Int
$calignment :: ColorSpaceKHR -> Int
sizeOf :: ColorSpaceKHR -> Int
$csizeOf :: ColorSpaceKHR -> Int
Storable, ColorSpaceKHR
ColorSpaceKHR -> Zero ColorSpaceKHR
forall a. a -> Zero a
zero :: ColorSpaceKHR
$czero :: ColorSpaceKHR
Zero)
pattern $bCOLOR_SPACE_SRGB_NONLINEAR_KHR :: ColorSpaceKHR
$mCOLOR_SPACE_SRGB_NONLINEAR_KHR :: forall {r}. ColorSpaceKHR -> (Void# -> r) -> (Void# -> r) -> r
COLOR_SPACE_SRGB_NONLINEAR_KHR = ColorSpaceKHR 0
pattern $bCOLOR_SPACE_DISPLAY_NATIVE_AMD :: ColorSpaceKHR
$mCOLOR_SPACE_DISPLAY_NATIVE_AMD :: forall {r}. ColorSpaceKHR -> (Void# -> r) -> (Void# -> r) -> r
COLOR_SPACE_DISPLAY_NATIVE_AMD = ColorSpaceKHR 1000213000
pattern $bCOLOR_SPACE_EXTENDED_SRGB_NONLINEAR_EXT :: ColorSpaceKHR
$mCOLOR_SPACE_EXTENDED_SRGB_NONLINEAR_EXT :: forall {r}. ColorSpaceKHR -> (Void# -> r) -> (Void# -> r) -> r
COLOR_SPACE_EXTENDED_SRGB_NONLINEAR_EXT = ColorSpaceKHR 1000104014
pattern $bCOLOR_SPACE_PASS_THROUGH_EXT :: ColorSpaceKHR
$mCOLOR_SPACE_PASS_THROUGH_EXT :: forall {r}. ColorSpaceKHR -> (Void# -> r) -> (Void# -> r) -> r
COLOR_SPACE_PASS_THROUGH_EXT = ColorSpaceKHR 1000104013
pattern $bCOLOR_SPACE_ADOBERGB_NONLINEAR_EXT :: ColorSpaceKHR
$mCOLOR_SPACE_ADOBERGB_NONLINEAR_EXT :: forall {r}. ColorSpaceKHR -> (Void# -> r) -> (Void# -> r) -> r
COLOR_SPACE_ADOBERGB_NONLINEAR_EXT = ColorSpaceKHR 1000104012
pattern $bCOLOR_SPACE_ADOBERGB_LINEAR_EXT :: ColorSpaceKHR
$mCOLOR_SPACE_ADOBERGB_LINEAR_EXT :: forall {r}. ColorSpaceKHR -> (Void# -> r) -> (Void# -> r) -> r
COLOR_SPACE_ADOBERGB_LINEAR_EXT = ColorSpaceKHR 1000104011
pattern $bCOLOR_SPACE_HDR10_HLG_EXT :: ColorSpaceKHR
$mCOLOR_SPACE_HDR10_HLG_EXT :: forall {r}. ColorSpaceKHR -> (Void# -> r) -> (Void# -> r) -> r
COLOR_SPACE_HDR10_HLG_EXT = ColorSpaceKHR 1000104010
pattern $bCOLOR_SPACE_DOLBYVISION_EXT :: ColorSpaceKHR
$mCOLOR_SPACE_DOLBYVISION_EXT :: forall {r}. ColorSpaceKHR -> (Void# -> r) -> (Void# -> r) -> r
COLOR_SPACE_DOLBYVISION_EXT = ColorSpaceKHR 1000104009
pattern $bCOLOR_SPACE_HDR10_ST2084_EXT :: ColorSpaceKHR
$mCOLOR_SPACE_HDR10_ST2084_EXT :: forall {r}. ColorSpaceKHR -> (Void# -> r) -> (Void# -> r) -> r
COLOR_SPACE_HDR10_ST2084_EXT = ColorSpaceKHR 1000104008
pattern $bCOLOR_SPACE_BT2020_LINEAR_EXT :: ColorSpaceKHR
$mCOLOR_SPACE_BT2020_LINEAR_EXT :: forall {r}. ColorSpaceKHR -> (Void# -> r) -> (Void# -> r) -> r
COLOR_SPACE_BT2020_LINEAR_EXT = ColorSpaceKHR 1000104007
pattern $bCOLOR_SPACE_BT709_NONLINEAR_EXT :: ColorSpaceKHR
$mCOLOR_SPACE_BT709_NONLINEAR_EXT :: forall {r}. ColorSpaceKHR -> (Void# -> r) -> (Void# -> r) -> r
COLOR_SPACE_BT709_NONLINEAR_EXT = ColorSpaceKHR 1000104006
pattern $bCOLOR_SPACE_BT709_LINEAR_EXT :: ColorSpaceKHR
$mCOLOR_SPACE_BT709_LINEAR_EXT :: forall {r}. ColorSpaceKHR -> (Void# -> r) -> (Void# -> r) -> r
COLOR_SPACE_BT709_LINEAR_EXT = ColorSpaceKHR 1000104005
pattern $bCOLOR_SPACE_DCI_P3_NONLINEAR_EXT :: ColorSpaceKHR
$mCOLOR_SPACE_DCI_P3_NONLINEAR_EXT :: forall {r}. ColorSpaceKHR -> (Void# -> r) -> (Void# -> r) -> r
COLOR_SPACE_DCI_P3_NONLINEAR_EXT = ColorSpaceKHR 1000104004
pattern $bCOLOR_SPACE_DISPLAY_P3_LINEAR_EXT :: ColorSpaceKHR
$mCOLOR_SPACE_DISPLAY_P3_LINEAR_EXT :: forall {r}. ColorSpaceKHR -> (Void# -> r) -> (Void# -> r) -> r
COLOR_SPACE_DISPLAY_P3_LINEAR_EXT = ColorSpaceKHR 1000104003
pattern $bCOLOR_SPACE_EXTENDED_SRGB_LINEAR_EXT :: ColorSpaceKHR
$mCOLOR_SPACE_EXTENDED_SRGB_LINEAR_EXT :: forall {r}. ColorSpaceKHR -> (Void# -> r) -> (Void# -> r) -> r
COLOR_SPACE_EXTENDED_SRGB_LINEAR_EXT = ColorSpaceKHR 1000104002
pattern $bCOLOR_SPACE_DISPLAY_P3_NONLINEAR_EXT :: ColorSpaceKHR
$mCOLOR_SPACE_DISPLAY_P3_NONLINEAR_EXT :: forall {r}. ColorSpaceKHR -> (Void# -> r) -> (Void# -> r) -> r
COLOR_SPACE_DISPLAY_P3_NONLINEAR_EXT = ColorSpaceKHR 1000104001
{-# COMPLETE
COLOR_SPACE_SRGB_NONLINEAR_KHR
, COLOR_SPACE_DISPLAY_NATIVE_AMD
, COLOR_SPACE_EXTENDED_SRGB_NONLINEAR_EXT
, COLOR_SPACE_PASS_THROUGH_EXT
, COLOR_SPACE_ADOBERGB_NONLINEAR_EXT
, COLOR_SPACE_ADOBERGB_LINEAR_EXT
, COLOR_SPACE_HDR10_HLG_EXT
, COLOR_SPACE_DOLBYVISION_EXT
, COLOR_SPACE_HDR10_ST2084_EXT
, COLOR_SPACE_BT2020_LINEAR_EXT
, COLOR_SPACE_BT709_NONLINEAR_EXT
, COLOR_SPACE_BT709_LINEAR_EXT
, COLOR_SPACE_DCI_P3_NONLINEAR_EXT
, COLOR_SPACE_DISPLAY_P3_LINEAR_EXT
, COLOR_SPACE_EXTENDED_SRGB_LINEAR_EXT
, COLOR_SPACE_DISPLAY_P3_NONLINEAR_EXT ::
ColorSpaceKHR
#-}
conNameColorSpaceKHR :: String
conNameColorSpaceKHR :: String
conNameColorSpaceKHR = String
"ColorSpaceKHR"
enumPrefixColorSpaceKHR :: String
enumPrefixColorSpaceKHR :: String
enumPrefixColorSpaceKHR = String
"COLOR_SPACE_"
showTableColorSpaceKHR :: [(ColorSpaceKHR, String)]
showTableColorSpaceKHR :: [(ColorSpaceKHR, String)]
showTableColorSpaceKHR =
[
( ColorSpaceKHR
COLOR_SPACE_SRGB_NONLINEAR_KHR
, String
"SRGB_NONLINEAR_KHR"
)
,
( ColorSpaceKHR
COLOR_SPACE_DISPLAY_NATIVE_AMD
, String
"DISPLAY_NATIVE_AMD"
)
,
( ColorSpaceKHR
COLOR_SPACE_EXTENDED_SRGB_NONLINEAR_EXT
, String
"EXTENDED_SRGB_NONLINEAR_EXT"
)
, (ColorSpaceKHR
COLOR_SPACE_PASS_THROUGH_EXT, String
"PASS_THROUGH_EXT")
,
( ColorSpaceKHR
COLOR_SPACE_ADOBERGB_NONLINEAR_EXT
, String
"ADOBERGB_NONLINEAR_EXT"
)
,
( ColorSpaceKHR
COLOR_SPACE_ADOBERGB_LINEAR_EXT
, String
"ADOBERGB_LINEAR_EXT"
)
, (ColorSpaceKHR
COLOR_SPACE_HDR10_HLG_EXT, String
"HDR10_HLG_EXT")
, (ColorSpaceKHR
COLOR_SPACE_DOLBYVISION_EXT, String
"DOLBYVISION_EXT")
, (ColorSpaceKHR
COLOR_SPACE_HDR10_ST2084_EXT, String
"HDR10_ST2084_EXT")
, (ColorSpaceKHR
COLOR_SPACE_BT2020_LINEAR_EXT, String
"BT2020_LINEAR_EXT")
,
( ColorSpaceKHR
COLOR_SPACE_BT709_NONLINEAR_EXT
, String
"BT709_NONLINEAR_EXT"
)
, (ColorSpaceKHR
COLOR_SPACE_BT709_LINEAR_EXT, String
"BT709_LINEAR_EXT")
,
( ColorSpaceKHR
COLOR_SPACE_DCI_P3_NONLINEAR_EXT
, String
"DCI_P3_NONLINEAR_EXT"
)
,
( ColorSpaceKHR
COLOR_SPACE_DISPLAY_P3_LINEAR_EXT
, String
"DISPLAY_P3_LINEAR_EXT"
)
,
( ColorSpaceKHR
COLOR_SPACE_EXTENDED_SRGB_LINEAR_EXT
, String
"EXTENDED_SRGB_LINEAR_EXT"
)
,
( ColorSpaceKHR
COLOR_SPACE_DISPLAY_P3_NONLINEAR_EXT
, String
"DISPLAY_P3_NONLINEAR_EXT"
)
]
instance Show ColorSpaceKHR where
showsPrec :: Int -> ColorSpaceKHR -> ShowS
showsPrec =
String
-> [(ColorSpaceKHR, String)]
-> String
-> (ColorSpaceKHR -> Int32)
-> (Int32 -> ShowS)
-> Int
-> ColorSpaceKHR
-> ShowS
forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec
String
enumPrefixColorSpaceKHR
[(ColorSpaceKHR, String)]
showTableColorSpaceKHR
String
conNameColorSpaceKHR
(\(ColorSpaceKHR Int32
x) -> Int32
x)
(Int -> Int32 -> ShowS
forall a. Show a => Int -> a -> ShowS
showsPrec Int
11)
instance Read ColorSpaceKHR where
readPrec :: ReadPrec ColorSpaceKHR
readPrec =
String
-> [(ColorSpaceKHR, String)]
-> String
-> (Int32 -> ColorSpaceKHR)
-> ReadPrec ColorSpaceKHR
forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec
String
enumPrefixColorSpaceKHR
[(ColorSpaceKHR, String)]
showTableColorSpaceKHR
String
conNameColorSpaceKHR
Int32 -> ColorSpaceKHR
ColorSpaceKHR
type CompositeAlphaFlagsKHR = CompositeAlphaFlagBitsKHR
newtype CompositeAlphaFlagBitsKHR = CompositeAlphaFlagBitsKHR Flags
deriving newtype (CompositeAlphaFlagBitsKHR -> CompositeAlphaFlagBitsKHR -> Bool
(CompositeAlphaFlagBitsKHR -> CompositeAlphaFlagBitsKHR -> Bool)
-> (CompositeAlphaFlagBitsKHR -> CompositeAlphaFlagBitsKHR -> Bool)
-> Eq CompositeAlphaFlagBitsKHR
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CompositeAlphaFlagBitsKHR -> CompositeAlphaFlagBitsKHR -> Bool
$c/= :: CompositeAlphaFlagBitsKHR -> CompositeAlphaFlagBitsKHR -> Bool
== :: CompositeAlphaFlagBitsKHR -> CompositeAlphaFlagBitsKHR -> Bool
$c== :: CompositeAlphaFlagBitsKHR -> CompositeAlphaFlagBitsKHR -> Bool
Eq, Eq CompositeAlphaFlagBitsKHR
Eq CompositeAlphaFlagBitsKHR
-> (CompositeAlphaFlagBitsKHR
-> CompositeAlphaFlagBitsKHR -> Ordering)
-> (CompositeAlphaFlagBitsKHR -> CompositeAlphaFlagBitsKHR -> Bool)
-> (CompositeAlphaFlagBitsKHR -> CompositeAlphaFlagBitsKHR -> Bool)
-> (CompositeAlphaFlagBitsKHR -> CompositeAlphaFlagBitsKHR -> Bool)
-> (CompositeAlphaFlagBitsKHR -> CompositeAlphaFlagBitsKHR -> Bool)
-> (CompositeAlphaFlagBitsKHR
-> CompositeAlphaFlagBitsKHR -> CompositeAlphaFlagBitsKHR)
-> (CompositeAlphaFlagBitsKHR
-> CompositeAlphaFlagBitsKHR -> CompositeAlphaFlagBitsKHR)
-> Ord CompositeAlphaFlagBitsKHR
CompositeAlphaFlagBitsKHR -> CompositeAlphaFlagBitsKHR -> Bool
CompositeAlphaFlagBitsKHR -> CompositeAlphaFlagBitsKHR -> Ordering
CompositeAlphaFlagBitsKHR
-> CompositeAlphaFlagBitsKHR -> CompositeAlphaFlagBitsKHR
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 :: CompositeAlphaFlagBitsKHR
-> CompositeAlphaFlagBitsKHR -> CompositeAlphaFlagBitsKHR
$cmin :: CompositeAlphaFlagBitsKHR
-> CompositeAlphaFlagBitsKHR -> CompositeAlphaFlagBitsKHR
max :: CompositeAlphaFlagBitsKHR
-> CompositeAlphaFlagBitsKHR -> CompositeAlphaFlagBitsKHR
$cmax :: CompositeAlphaFlagBitsKHR
-> CompositeAlphaFlagBitsKHR -> CompositeAlphaFlagBitsKHR
>= :: CompositeAlphaFlagBitsKHR -> CompositeAlphaFlagBitsKHR -> Bool
$c>= :: CompositeAlphaFlagBitsKHR -> CompositeAlphaFlagBitsKHR -> Bool
> :: CompositeAlphaFlagBitsKHR -> CompositeAlphaFlagBitsKHR -> Bool
$c> :: CompositeAlphaFlagBitsKHR -> CompositeAlphaFlagBitsKHR -> Bool
<= :: CompositeAlphaFlagBitsKHR -> CompositeAlphaFlagBitsKHR -> Bool
$c<= :: CompositeAlphaFlagBitsKHR -> CompositeAlphaFlagBitsKHR -> Bool
< :: CompositeAlphaFlagBitsKHR -> CompositeAlphaFlagBitsKHR -> Bool
$c< :: CompositeAlphaFlagBitsKHR -> CompositeAlphaFlagBitsKHR -> Bool
compare :: CompositeAlphaFlagBitsKHR -> CompositeAlphaFlagBitsKHR -> Ordering
$ccompare :: CompositeAlphaFlagBitsKHR -> CompositeAlphaFlagBitsKHR -> Ordering
Ord, Ptr CompositeAlphaFlagBitsKHR -> IO CompositeAlphaFlagBitsKHR
Ptr CompositeAlphaFlagBitsKHR
-> Int -> IO CompositeAlphaFlagBitsKHR
Ptr CompositeAlphaFlagBitsKHR
-> Int -> CompositeAlphaFlagBitsKHR -> IO ()
Ptr CompositeAlphaFlagBitsKHR -> CompositeAlphaFlagBitsKHR -> IO ()
CompositeAlphaFlagBitsKHR -> Int
(CompositeAlphaFlagBitsKHR -> Int)
-> (CompositeAlphaFlagBitsKHR -> Int)
-> (Ptr CompositeAlphaFlagBitsKHR
-> Int -> IO CompositeAlphaFlagBitsKHR)
-> (Ptr CompositeAlphaFlagBitsKHR
-> Int -> CompositeAlphaFlagBitsKHR -> IO ())
-> (forall b. Ptr b -> Int -> IO CompositeAlphaFlagBitsKHR)
-> (forall b. Ptr b -> Int -> CompositeAlphaFlagBitsKHR -> IO ())
-> (Ptr CompositeAlphaFlagBitsKHR -> IO CompositeAlphaFlagBitsKHR)
-> (Ptr CompositeAlphaFlagBitsKHR
-> CompositeAlphaFlagBitsKHR -> IO ())
-> Storable CompositeAlphaFlagBitsKHR
forall b. Ptr b -> Int -> IO CompositeAlphaFlagBitsKHR
forall b. Ptr b -> Int -> CompositeAlphaFlagBitsKHR -> 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 CompositeAlphaFlagBitsKHR -> CompositeAlphaFlagBitsKHR -> IO ()
$cpoke :: Ptr CompositeAlphaFlagBitsKHR -> CompositeAlphaFlagBitsKHR -> IO ()
peek :: Ptr CompositeAlphaFlagBitsKHR -> IO CompositeAlphaFlagBitsKHR
$cpeek :: Ptr CompositeAlphaFlagBitsKHR -> IO CompositeAlphaFlagBitsKHR
pokeByteOff :: forall b. Ptr b -> Int -> CompositeAlphaFlagBitsKHR -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> CompositeAlphaFlagBitsKHR -> IO ()
peekByteOff :: forall b. Ptr b -> Int -> IO CompositeAlphaFlagBitsKHR
$cpeekByteOff :: forall b. Ptr b -> Int -> IO CompositeAlphaFlagBitsKHR
pokeElemOff :: Ptr CompositeAlphaFlagBitsKHR
-> Int -> CompositeAlphaFlagBitsKHR -> IO ()
$cpokeElemOff :: Ptr CompositeAlphaFlagBitsKHR
-> Int -> CompositeAlphaFlagBitsKHR -> IO ()
peekElemOff :: Ptr CompositeAlphaFlagBitsKHR
-> Int -> IO CompositeAlphaFlagBitsKHR
$cpeekElemOff :: Ptr CompositeAlphaFlagBitsKHR
-> Int -> IO CompositeAlphaFlagBitsKHR
alignment :: CompositeAlphaFlagBitsKHR -> Int
$calignment :: CompositeAlphaFlagBitsKHR -> Int
sizeOf :: CompositeAlphaFlagBitsKHR -> Int
$csizeOf :: CompositeAlphaFlagBitsKHR -> Int
Storable, CompositeAlphaFlagBitsKHR
CompositeAlphaFlagBitsKHR -> Zero CompositeAlphaFlagBitsKHR
forall a. a -> Zero a
zero :: CompositeAlphaFlagBitsKHR
$czero :: CompositeAlphaFlagBitsKHR
Zero, Eq CompositeAlphaFlagBitsKHR
CompositeAlphaFlagBitsKHR
Eq CompositeAlphaFlagBitsKHR
-> (CompositeAlphaFlagBitsKHR
-> CompositeAlphaFlagBitsKHR -> CompositeAlphaFlagBitsKHR)
-> (CompositeAlphaFlagBitsKHR
-> CompositeAlphaFlagBitsKHR -> CompositeAlphaFlagBitsKHR)
-> (CompositeAlphaFlagBitsKHR
-> CompositeAlphaFlagBitsKHR -> CompositeAlphaFlagBitsKHR)
-> (CompositeAlphaFlagBitsKHR -> CompositeAlphaFlagBitsKHR)
-> (CompositeAlphaFlagBitsKHR -> Int -> CompositeAlphaFlagBitsKHR)
-> (CompositeAlphaFlagBitsKHR -> Int -> CompositeAlphaFlagBitsKHR)
-> CompositeAlphaFlagBitsKHR
-> (Int -> CompositeAlphaFlagBitsKHR)
-> (CompositeAlphaFlagBitsKHR -> Int -> CompositeAlphaFlagBitsKHR)
-> (CompositeAlphaFlagBitsKHR -> Int -> CompositeAlphaFlagBitsKHR)
-> (CompositeAlphaFlagBitsKHR -> Int -> CompositeAlphaFlagBitsKHR)
-> (CompositeAlphaFlagBitsKHR -> Int -> Bool)
-> (CompositeAlphaFlagBitsKHR -> Maybe Int)
-> (CompositeAlphaFlagBitsKHR -> Int)
-> (CompositeAlphaFlagBitsKHR -> Bool)
-> (CompositeAlphaFlagBitsKHR -> Int -> CompositeAlphaFlagBitsKHR)
-> (CompositeAlphaFlagBitsKHR -> Int -> CompositeAlphaFlagBitsKHR)
-> (CompositeAlphaFlagBitsKHR -> Int -> CompositeAlphaFlagBitsKHR)
-> (CompositeAlphaFlagBitsKHR -> Int -> CompositeAlphaFlagBitsKHR)
-> (CompositeAlphaFlagBitsKHR -> Int -> CompositeAlphaFlagBitsKHR)
-> (CompositeAlphaFlagBitsKHR -> Int -> CompositeAlphaFlagBitsKHR)
-> (CompositeAlphaFlagBitsKHR -> Int)
-> Bits CompositeAlphaFlagBitsKHR
Int -> CompositeAlphaFlagBitsKHR
CompositeAlphaFlagBitsKHR -> Bool
CompositeAlphaFlagBitsKHR -> Int
CompositeAlphaFlagBitsKHR -> Maybe Int
CompositeAlphaFlagBitsKHR -> CompositeAlphaFlagBitsKHR
CompositeAlphaFlagBitsKHR -> Int -> Bool
CompositeAlphaFlagBitsKHR -> Int -> CompositeAlphaFlagBitsKHR
CompositeAlphaFlagBitsKHR
-> CompositeAlphaFlagBitsKHR -> CompositeAlphaFlagBitsKHR
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 :: CompositeAlphaFlagBitsKHR -> Int
$cpopCount :: CompositeAlphaFlagBitsKHR -> Int
rotateR :: CompositeAlphaFlagBitsKHR -> Int -> CompositeAlphaFlagBitsKHR
$crotateR :: CompositeAlphaFlagBitsKHR -> Int -> CompositeAlphaFlagBitsKHR
rotateL :: CompositeAlphaFlagBitsKHR -> Int -> CompositeAlphaFlagBitsKHR
$crotateL :: CompositeAlphaFlagBitsKHR -> Int -> CompositeAlphaFlagBitsKHR
unsafeShiftR :: CompositeAlphaFlagBitsKHR -> Int -> CompositeAlphaFlagBitsKHR
$cunsafeShiftR :: CompositeAlphaFlagBitsKHR -> Int -> CompositeAlphaFlagBitsKHR
shiftR :: CompositeAlphaFlagBitsKHR -> Int -> CompositeAlphaFlagBitsKHR
$cshiftR :: CompositeAlphaFlagBitsKHR -> Int -> CompositeAlphaFlagBitsKHR
unsafeShiftL :: CompositeAlphaFlagBitsKHR -> Int -> CompositeAlphaFlagBitsKHR
$cunsafeShiftL :: CompositeAlphaFlagBitsKHR -> Int -> CompositeAlphaFlagBitsKHR
shiftL :: CompositeAlphaFlagBitsKHR -> Int -> CompositeAlphaFlagBitsKHR
$cshiftL :: CompositeAlphaFlagBitsKHR -> Int -> CompositeAlphaFlagBitsKHR
isSigned :: CompositeAlphaFlagBitsKHR -> Bool
$cisSigned :: CompositeAlphaFlagBitsKHR -> Bool
bitSize :: CompositeAlphaFlagBitsKHR -> Int
$cbitSize :: CompositeAlphaFlagBitsKHR -> Int
bitSizeMaybe :: CompositeAlphaFlagBitsKHR -> Maybe Int
$cbitSizeMaybe :: CompositeAlphaFlagBitsKHR -> Maybe Int
testBit :: CompositeAlphaFlagBitsKHR -> Int -> Bool
$ctestBit :: CompositeAlphaFlagBitsKHR -> Int -> Bool
complementBit :: CompositeAlphaFlagBitsKHR -> Int -> CompositeAlphaFlagBitsKHR
$ccomplementBit :: CompositeAlphaFlagBitsKHR -> Int -> CompositeAlphaFlagBitsKHR
clearBit :: CompositeAlphaFlagBitsKHR -> Int -> CompositeAlphaFlagBitsKHR
$cclearBit :: CompositeAlphaFlagBitsKHR -> Int -> CompositeAlphaFlagBitsKHR
setBit :: CompositeAlphaFlagBitsKHR -> Int -> CompositeAlphaFlagBitsKHR
$csetBit :: CompositeAlphaFlagBitsKHR -> Int -> CompositeAlphaFlagBitsKHR
bit :: Int -> CompositeAlphaFlagBitsKHR
$cbit :: Int -> CompositeAlphaFlagBitsKHR
zeroBits :: CompositeAlphaFlagBitsKHR
$czeroBits :: CompositeAlphaFlagBitsKHR
rotate :: CompositeAlphaFlagBitsKHR -> Int -> CompositeAlphaFlagBitsKHR
$crotate :: CompositeAlphaFlagBitsKHR -> Int -> CompositeAlphaFlagBitsKHR
shift :: CompositeAlphaFlagBitsKHR -> Int -> CompositeAlphaFlagBitsKHR
$cshift :: CompositeAlphaFlagBitsKHR -> Int -> CompositeAlphaFlagBitsKHR
complement :: CompositeAlphaFlagBitsKHR -> CompositeAlphaFlagBitsKHR
$ccomplement :: CompositeAlphaFlagBitsKHR -> CompositeAlphaFlagBitsKHR
xor :: CompositeAlphaFlagBitsKHR
-> CompositeAlphaFlagBitsKHR -> CompositeAlphaFlagBitsKHR
$cxor :: CompositeAlphaFlagBitsKHR
-> CompositeAlphaFlagBitsKHR -> CompositeAlphaFlagBitsKHR
.|. :: CompositeAlphaFlagBitsKHR
-> CompositeAlphaFlagBitsKHR -> CompositeAlphaFlagBitsKHR
$c.|. :: CompositeAlphaFlagBitsKHR
-> CompositeAlphaFlagBitsKHR -> CompositeAlphaFlagBitsKHR
.&. :: CompositeAlphaFlagBitsKHR
-> CompositeAlphaFlagBitsKHR -> CompositeAlphaFlagBitsKHR
$c.&. :: CompositeAlphaFlagBitsKHR
-> CompositeAlphaFlagBitsKHR -> CompositeAlphaFlagBitsKHR
Bits, Bits CompositeAlphaFlagBitsKHR
Bits CompositeAlphaFlagBitsKHR
-> (CompositeAlphaFlagBitsKHR -> Int)
-> (CompositeAlphaFlagBitsKHR -> Int)
-> (CompositeAlphaFlagBitsKHR -> Int)
-> FiniteBits CompositeAlphaFlagBitsKHR
CompositeAlphaFlagBitsKHR -> Int
forall b.
Bits b -> (b -> Int) -> (b -> Int) -> (b -> Int) -> FiniteBits b
countTrailingZeros :: CompositeAlphaFlagBitsKHR -> Int
$ccountTrailingZeros :: CompositeAlphaFlagBitsKHR -> Int
countLeadingZeros :: CompositeAlphaFlagBitsKHR -> Int
$ccountLeadingZeros :: CompositeAlphaFlagBitsKHR -> Int
finiteBitSize :: CompositeAlphaFlagBitsKHR -> Int
$cfiniteBitSize :: CompositeAlphaFlagBitsKHR -> Int
FiniteBits)
pattern $bCOMPOSITE_ALPHA_OPAQUE_BIT_KHR :: CompositeAlphaFlagBitsKHR
$mCOMPOSITE_ALPHA_OPAQUE_BIT_KHR :: forall {r}.
CompositeAlphaFlagBitsKHR -> (Void# -> r) -> (Void# -> r) -> r
COMPOSITE_ALPHA_OPAQUE_BIT_KHR = CompositeAlphaFlagBitsKHR 0x00000001
pattern $bCOMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR :: CompositeAlphaFlagBitsKHR
$mCOMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR :: forall {r}.
CompositeAlphaFlagBitsKHR -> (Void# -> r) -> (Void# -> r) -> r
COMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR = CompositeAlphaFlagBitsKHR 0x00000002
pattern $bCOMPOSITE_ALPHA_POST_MULTIPLIED_BIT_KHR :: CompositeAlphaFlagBitsKHR
$mCOMPOSITE_ALPHA_POST_MULTIPLIED_BIT_KHR :: forall {r}.
CompositeAlphaFlagBitsKHR -> (Void# -> r) -> (Void# -> r) -> r
COMPOSITE_ALPHA_POST_MULTIPLIED_BIT_KHR = CompositeAlphaFlagBitsKHR 0x00000004
pattern $bCOMPOSITE_ALPHA_INHERIT_BIT_KHR :: CompositeAlphaFlagBitsKHR
$mCOMPOSITE_ALPHA_INHERIT_BIT_KHR :: forall {r}.
CompositeAlphaFlagBitsKHR -> (Void# -> r) -> (Void# -> r) -> r
COMPOSITE_ALPHA_INHERIT_BIT_KHR = CompositeAlphaFlagBitsKHR 0x00000008
conNameCompositeAlphaFlagBitsKHR :: String
conNameCompositeAlphaFlagBitsKHR :: String
conNameCompositeAlphaFlagBitsKHR = String
"CompositeAlphaFlagBitsKHR"
enumPrefixCompositeAlphaFlagBitsKHR :: String
enumPrefixCompositeAlphaFlagBitsKHR :: String
enumPrefixCompositeAlphaFlagBitsKHR = String
"COMPOSITE_ALPHA_"
showTableCompositeAlphaFlagBitsKHR :: [(CompositeAlphaFlagBitsKHR, String)]
showTableCompositeAlphaFlagBitsKHR :: [(CompositeAlphaFlagBitsKHR, String)]
showTableCompositeAlphaFlagBitsKHR =
[
( CompositeAlphaFlagBitsKHR
COMPOSITE_ALPHA_OPAQUE_BIT_KHR
, String
"OPAQUE_BIT_KHR"
)
,
( CompositeAlphaFlagBitsKHR
COMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR
, String
"PRE_MULTIPLIED_BIT_KHR"
)
,
( CompositeAlphaFlagBitsKHR
COMPOSITE_ALPHA_POST_MULTIPLIED_BIT_KHR
, String
"POST_MULTIPLIED_BIT_KHR"
)
,
( CompositeAlphaFlagBitsKHR
COMPOSITE_ALPHA_INHERIT_BIT_KHR
, String
"INHERIT_BIT_KHR"
)
]
instance Show CompositeAlphaFlagBitsKHR where
showsPrec :: Int -> CompositeAlphaFlagBitsKHR -> ShowS
showsPrec =
String
-> [(CompositeAlphaFlagBitsKHR, String)]
-> String
-> (CompositeAlphaFlagBitsKHR -> Flags)
-> (Flags -> ShowS)
-> Int
-> CompositeAlphaFlagBitsKHR
-> ShowS
forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec
String
enumPrefixCompositeAlphaFlagBitsKHR
[(CompositeAlphaFlagBitsKHR, String)]
showTableCompositeAlphaFlagBitsKHR
String
conNameCompositeAlphaFlagBitsKHR
(\(CompositeAlphaFlagBitsKHR Flags
x) -> Flags
x)
(\Flags
x -> String -> ShowS
showString String
"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 CompositeAlphaFlagBitsKHR where
readPrec :: ReadPrec CompositeAlphaFlagBitsKHR
readPrec =
String
-> [(CompositeAlphaFlagBitsKHR, String)]
-> String
-> (Flags -> CompositeAlphaFlagBitsKHR)
-> ReadPrec CompositeAlphaFlagBitsKHR
forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec
String
enumPrefixCompositeAlphaFlagBitsKHR
[(CompositeAlphaFlagBitsKHR, String)]
showTableCompositeAlphaFlagBitsKHR
String
conNameCompositeAlphaFlagBitsKHR
Flags -> CompositeAlphaFlagBitsKHR
CompositeAlphaFlagBitsKHR
type SurfaceTransformFlagsKHR = SurfaceTransformFlagBitsKHR
newtype SurfaceTransformFlagBitsKHR = SurfaceTransformFlagBitsKHR Flags
deriving newtype (SurfaceTransformFlagBitsKHR -> SurfaceTransformFlagBitsKHR -> Bool
(SurfaceTransformFlagBitsKHR
-> SurfaceTransformFlagBitsKHR -> Bool)
-> (SurfaceTransformFlagBitsKHR
-> SurfaceTransformFlagBitsKHR -> Bool)
-> Eq SurfaceTransformFlagBitsKHR
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SurfaceTransformFlagBitsKHR -> SurfaceTransformFlagBitsKHR -> Bool
$c/= :: SurfaceTransformFlagBitsKHR -> SurfaceTransformFlagBitsKHR -> Bool
== :: SurfaceTransformFlagBitsKHR -> SurfaceTransformFlagBitsKHR -> Bool
$c== :: SurfaceTransformFlagBitsKHR -> SurfaceTransformFlagBitsKHR -> Bool
Eq, Eq SurfaceTransformFlagBitsKHR
Eq SurfaceTransformFlagBitsKHR
-> (SurfaceTransformFlagBitsKHR
-> SurfaceTransformFlagBitsKHR -> Ordering)
-> (SurfaceTransformFlagBitsKHR
-> SurfaceTransformFlagBitsKHR -> Bool)
-> (SurfaceTransformFlagBitsKHR
-> SurfaceTransformFlagBitsKHR -> Bool)
-> (SurfaceTransformFlagBitsKHR
-> SurfaceTransformFlagBitsKHR -> Bool)
-> (SurfaceTransformFlagBitsKHR
-> SurfaceTransformFlagBitsKHR -> Bool)
-> (SurfaceTransformFlagBitsKHR
-> SurfaceTransformFlagBitsKHR -> SurfaceTransformFlagBitsKHR)
-> (SurfaceTransformFlagBitsKHR
-> SurfaceTransformFlagBitsKHR -> SurfaceTransformFlagBitsKHR)
-> Ord SurfaceTransformFlagBitsKHR
SurfaceTransformFlagBitsKHR -> SurfaceTransformFlagBitsKHR -> Bool
SurfaceTransformFlagBitsKHR
-> SurfaceTransformFlagBitsKHR -> Ordering
SurfaceTransformFlagBitsKHR
-> SurfaceTransformFlagBitsKHR -> SurfaceTransformFlagBitsKHR
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 :: SurfaceTransformFlagBitsKHR
-> SurfaceTransformFlagBitsKHR -> SurfaceTransformFlagBitsKHR
$cmin :: SurfaceTransformFlagBitsKHR
-> SurfaceTransformFlagBitsKHR -> SurfaceTransformFlagBitsKHR
max :: SurfaceTransformFlagBitsKHR
-> SurfaceTransformFlagBitsKHR -> SurfaceTransformFlagBitsKHR
$cmax :: SurfaceTransformFlagBitsKHR
-> SurfaceTransformFlagBitsKHR -> SurfaceTransformFlagBitsKHR
>= :: SurfaceTransformFlagBitsKHR -> SurfaceTransformFlagBitsKHR -> Bool
$c>= :: SurfaceTransformFlagBitsKHR -> SurfaceTransformFlagBitsKHR -> Bool
> :: SurfaceTransformFlagBitsKHR -> SurfaceTransformFlagBitsKHR -> Bool
$c> :: SurfaceTransformFlagBitsKHR -> SurfaceTransformFlagBitsKHR -> Bool
<= :: SurfaceTransformFlagBitsKHR -> SurfaceTransformFlagBitsKHR -> Bool
$c<= :: SurfaceTransformFlagBitsKHR -> SurfaceTransformFlagBitsKHR -> Bool
< :: SurfaceTransformFlagBitsKHR -> SurfaceTransformFlagBitsKHR -> Bool
$c< :: SurfaceTransformFlagBitsKHR -> SurfaceTransformFlagBitsKHR -> Bool
compare :: SurfaceTransformFlagBitsKHR
-> SurfaceTransformFlagBitsKHR -> Ordering
$ccompare :: SurfaceTransformFlagBitsKHR
-> SurfaceTransformFlagBitsKHR -> Ordering
Ord, Ptr SurfaceTransformFlagBitsKHR -> IO SurfaceTransformFlagBitsKHR
Ptr SurfaceTransformFlagBitsKHR
-> Int -> IO SurfaceTransformFlagBitsKHR
Ptr SurfaceTransformFlagBitsKHR
-> Int -> SurfaceTransformFlagBitsKHR -> IO ()
Ptr SurfaceTransformFlagBitsKHR
-> SurfaceTransformFlagBitsKHR -> IO ()
SurfaceTransformFlagBitsKHR -> Int
(SurfaceTransformFlagBitsKHR -> Int)
-> (SurfaceTransformFlagBitsKHR -> Int)
-> (Ptr SurfaceTransformFlagBitsKHR
-> Int -> IO SurfaceTransformFlagBitsKHR)
-> (Ptr SurfaceTransformFlagBitsKHR
-> Int -> SurfaceTransformFlagBitsKHR -> IO ())
-> (forall b. Ptr b -> Int -> IO SurfaceTransformFlagBitsKHR)
-> (forall b. Ptr b -> Int -> SurfaceTransformFlagBitsKHR -> IO ())
-> (Ptr SurfaceTransformFlagBitsKHR
-> IO SurfaceTransformFlagBitsKHR)
-> (Ptr SurfaceTransformFlagBitsKHR
-> SurfaceTransformFlagBitsKHR -> IO ())
-> Storable SurfaceTransformFlagBitsKHR
forall b. Ptr b -> Int -> IO SurfaceTransformFlagBitsKHR
forall b. Ptr b -> Int -> SurfaceTransformFlagBitsKHR -> 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 SurfaceTransformFlagBitsKHR
-> SurfaceTransformFlagBitsKHR -> IO ()
$cpoke :: Ptr SurfaceTransformFlagBitsKHR
-> SurfaceTransformFlagBitsKHR -> IO ()
peek :: Ptr SurfaceTransformFlagBitsKHR -> IO SurfaceTransformFlagBitsKHR
$cpeek :: Ptr SurfaceTransformFlagBitsKHR -> IO SurfaceTransformFlagBitsKHR
pokeByteOff :: forall b. Ptr b -> Int -> SurfaceTransformFlagBitsKHR -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> SurfaceTransformFlagBitsKHR -> IO ()
peekByteOff :: forall b. Ptr b -> Int -> IO SurfaceTransformFlagBitsKHR
$cpeekByteOff :: forall b. Ptr b -> Int -> IO SurfaceTransformFlagBitsKHR
pokeElemOff :: Ptr SurfaceTransformFlagBitsKHR
-> Int -> SurfaceTransformFlagBitsKHR -> IO ()
$cpokeElemOff :: Ptr SurfaceTransformFlagBitsKHR
-> Int -> SurfaceTransformFlagBitsKHR -> IO ()
peekElemOff :: Ptr SurfaceTransformFlagBitsKHR
-> Int -> IO SurfaceTransformFlagBitsKHR
$cpeekElemOff :: Ptr SurfaceTransformFlagBitsKHR
-> Int -> IO SurfaceTransformFlagBitsKHR
alignment :: SurfaceTransformFlagBitsKHR -> Int
$calignment :: SurfaceTransformFlagBitsKHR -> Int
sizeOf :: SurfaceTransformFlagBitsKHR -> Int
$csizeOf :: SurfaceTransformFlagBitsKHR -> Int
Storable, SurfaceTransformFlagBitsKHR
SurfaceTransformFlagBitsKHR -> Zero SurfaceTransformFlagBitsKHR
forall a. a -> Zero a
zero :: SurfaceTransformFlagBitsKHR
$czero :: SurfaceTransformFlagBitsKHR
Zero, Eq SurfaceTransformFlagBitsKHR
SurfaceTransformFlagBitsKHR
Eq SurfaceTransformFlagBitsKHR
-> (SurfaceTransformFlagBitsKHR
-> SurfaceTransformFlagBitsKHR -> SurfaceTransformFlagBitsKHR)
-> (SurfaceTransformFlagBitsKHR
-> SurfaceTransformFlagBitsKHR -> SurfaceTransformFlagBitsKHR)
-> (SurfaceTransformFlagBitsKHR
-> SurfaceTransformFlagBitsKHR -> SurfaceTransformFlagBitsKHR)
-> (SurfaceTransformFlagBitsKHR -> SurfaceTransformFlagBitsKHR)
-> (SurfaceTransformFlagBitsKHR
-> Int -> SurfaceTransformFlagBitsKHR)
-> (SurfaceTransformFlagBitsKHR
-> Int -> SurfaceTransformFlagBitsKHR)
-> SurfaceTransformFlagBitsKHR
-> (Int -> SurfaceTransformFlagBitsKHR)
-> (SurfaceTransformFlagBitsKHR
-> Int -> SurfaceTransformFlagBitsKHR)
-> (SurfaceTransformFlagBitsKHR
-> Int -> SurfaceTransformFlagBitsKHR)
-> (SurfaceTransformFlagBitsKHR
-> Int -> SurfaceTransformFlagBitsKHR)
-> (SurfaceTransformFlagBitsKHR -> Int -> Bool)
-> (SurfaceTransformFlagBitsKHR -> Maybe Int)
-> (SurfaceTransformFlagBitsKHR -> Int)
-> (SurfaceTransformFlagBitsKHR -> Bool)
-> (SurfaceTransformFlagBitsKHR
-> Int -> SurfaceTransformFlagBitsKHR)
-> (SurfaceTransformFlagBitsKHR
-> Int -> SurfaceTransformFlagBitsKHR)
-> (SurfaceTransformFlagBitsKHR
-> Int -> SurfaceTransformFlagBitsKHR)
-> (SurfaceTransformFlagBitsKHR
-> Int -> SurfaceTransformFlagBitsKHR)
-> (SurfaceTransformFlagBitsKHR
-> Int -> SurfaceTransformFlagBitsKHR)
-> (SurfaceTransformFlagBitsKHR
-> Int -> SurfaceTransformFlagBitsKHR)
-> (SurfaceTransformFlagBitsKHR -> Int)
-> Bits SurfaceTransformFlagBitsKHR
Int -> SurfaceTransformFlagBitsKHR
SurfaceTransformFlagBitsKHR -> Bool
SurfaceTransformFlagBitsKHR -> Int
SurfaceTransformFlagBitsKHR -> Maybe Int
SurfaceTransformFlagBitsKHR -> SurfaceTransformFlagBitsKHR
SurfaceTransformFlagBitsKHR -> Int -> Bool
SurfaceTransformFlagBitsKHR -> Int -> SurfaceTransformFlagBitsKHR
SurfaceTransformFlagBitsKHR
-> SurfaceTransformFlagBitsKHR -> SurfaceTransformFlagBitsKHR
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 :: SurfaceTransformFlagBitsKHR -> Int
$cpopCount :: SurfaceTransformFlagBitsKHR -> Int
rotateR :: SurfaceTransformFlagBitsKHR -> Int -> SurfaceTransformFlagBitsKHR
$crotateR :: SurfaceTransformFlagBitsKHR -> Int -> SurfaceTransformFlagBitsKHR
rotateL :: SurfaceTransformFlagBitsKHR -> Int -> SurfaceTransformFlagBitsKHR
$crotateL :: SurfaceTransformFlagBitsKHR -> Int -> SurfaceTransformFlagBitsKHR
unsafeShiftR :: SurfaceTransformFlagBitsKHR -> Int -> SurfaceTransformFlagBitsKHR
$cunsafeShiftR :: SurfaceTransformFlagBitsKHR -> Int -> SurfaceTransformFlagBitsKHR
shiftR :: SurfaceTransformFlagBitsKHR -> Int -> SurfaceTransformFlagBitsKHR
$cshiftR :: SurfaceTransformFlagBitsKHR -> Int -> SurfaceTransformFlagBitsKHR
unsafeShiftL :: SurfaceTransformFlagBitsKHR -> Int -> SurfaceTransformFlagBitsKHR
$cunsafeShiftL :: SurfaceTransformFlagBitsKHR -> Int -> SurfaceTransformFlagBitsKHR
shiftL :: SurfaceTransformFlagBitsKHR -> Int -> SurfaceTransformFlagBitsKHR
$cshiftL :: SurfaceTransformFlagBitsKHR -> Int -> SurfaceTransformFlagBitsKHR
isSigned :: SurfaceTransformFlagBitsKHR -> Bool
$cisSigned :: SurfaceTransformFlagBitsKHR -> Bool
bitSize :: SurfaceTransformFlagBitsKHR -> Int
$cbitSize :: SurfaceTransformFlagBitsKHR -> Int
bitSizeMaybe :: SurfaceTransformFlagBitsKHR -> Maybe Int
$cbitSizeMaybe :: SurfaceTransformFlagBitsKHR -> Maybe Int
testBit :: SurfaceTransformFlagBitsKHR -> Int -> Bool
$ctestBit :: SurfaceTransformFlagBitsKHR -> Int -> Bool
complementBit :: SurfaceTransformFlagBitsKHR -> Int -> SurfaceTransformFlagBitsKHR
$ccomplementBit :: SurfaceTransformFlagBitsKHR -> Int -> SurfaceTransformFlagBitsKHR
clearBit :: SurfaceTransformFlagBitsKHR -> Int -> SurfaceTransformFlagBitsKHR
$cclearBit :: SurfaceTransformFlagBitsKHR -> Int -> SurfaceTransformFlagBitsKHR
setBit :: SurfaceTransformFlagBitsKHR -> Int -> SurfaceTransformFlagBitsKHR
$csetBit :: SurfaceTransformFlagBitsKHR -> Int -> SurfaceTransformFlagBitsKHR
bit :: Int -> SurfaceTransformFlagBitsKHR
$cbit :: Int -> SurfaceTransformFlagBitsKHR
zeroBits :: SurfaceTransformFlagBitsKHR
$czeroBits :: SurfaceTransformFlagBitsKHR
rotate :: SurfaceTransformFlagBitsKHR -> Int -> SurfaceTransformFlagBitsKHR
$crotate :: SurfaceTransformFlagBitsKHR -> Int -> SurfaceTransformFlagBitsKHR
shift :: SurfaceTransformFlagBitsKHR -> Int -> SurfaceTransformFlagBitsKHR
$cshift :: SurfaceTransformFlagBitsKHR -> Int -> SurfaceTransformFlagBitsKHR
complement :: SurfaceTransformFlagBitsKHR -> SurfaceTransformFlagBitsKHR
$ccomplement :: SurfaceTransformFlagBitsKHR -> SurfaceTransformFlagBitsKHR
xor :: SurfaceTransformFlagBitsKHR
-> SurfaceTransformFlagBitsKHR -> SurfaceTransformFlagBitsKHR
$cxor :: SurfaceTransformFlagBitsKHR
-> SurfaceTransformFlagBitsKHR -> SurfaceTransformFlagBitsKHR
.|. :: SurfaceTransformFlagBitsKHR
-> SurfaceTransformFlagBitsKHR -> SurfaceTransformFlagBitsKHR
$c.|. :: SurfaceTransformFlagBitsKHR
-> SurfaceTransformFlagBitsKHR -> SurfaceTransformFlagBitsKHR
.&. :: SurfaceTransformFlagBitsKHR
-> SurfaceTransformFlagBitsKHR -> SurfaceTransformFlagBitsKHR
$c.&. :: SurfaceTransformFlagBitsKHR
-> SurfaceTransformFlagBitsKHR -> SurfaceTransformFlagBitsKHR
Bits, Bits SurfaceTransformFlagBitsKHR
Bits SurfaceTransformFlagBitsKHR
-> (SurfaceTransformFlagBitsKHR -> Int)
-> (SurfaceTransformFlagBitsKHR -> Int)
-> (SurfaceTransformFlagBitsKHR -> Int)
-> FiniteBits SurfaceTransformFlagBitsKHR
SurfaceTransformFlagBitsKHR -> Int
forall b.
Bits b -> (b -> Int) -> (b -> Int) -> (b -> Int) -> FiniteBits b
countTrailingZeros :: SurfaceTransformFlagBitsKHR -> Int
$ccountTrailingZeros :: SurfaceTransformFlagBitsKHR -> Int
countLeadingZeros :: SurfaceTransformFlagBitsKHR -> Int
$ccountLeadingZeros :: SurfaceTransformFlagBitsKHR -> Int
finiteBitSize :: SurfaceTransformFlagBitsKHR -> Int
$cfiniteBitSize :: SurfaceTransformFlagBitsKHR -> Int
FiniteBits)
pattern $bSURFACE_TRANSFORM_IDENTITY_BIT_KHR :: SurfaceTransformFlagBitsKHR
$mSURFACE_TRANSFORM_IDENTITY_BIT_KHR :: forall {r}.
SurfaceTransformFlagBitsKHR -> (Void# -> r) -> (Void# -> r) -> r
SURFACE_TRANSFORM_IDENTITY_BIT_KHR = SurfaceTransformFlagBitsKHR 0x00000001
pattern $bSURFACE_TRANSFORM_ROTATE_90_BIT_KHR :: SurfaceTransformFlagBitsKHR
$mSURFACE_TRANSFORM_ROTATE_90_BIT_KHR :: forall {r}.
SurfaceTransformFlagBitsKHR -> (Void# -> r) -> (Void# -> r) -> r
SURFACE_TRANSFORM_ROTATE_90_BIT_KHR = SurfaceTransformFlagBitsKHR 0x00000002
pattern $bSURFACE_TRANSFORM_ROTATE_180_BIT_KHR :: SurfaceTransformFlagBitsKHR
$mSURFACE_TRANSFORM_ROTATE_180_BIT_KHR :: forall {r}.
SurfaceTransformFlagBitsKHR -> (Void# -> r) -> (Void# -> r) -> r
SURFACE_TRANSFORM_ROTATE_180_BIT_KHR = SurfaceTransformFlagBitsKHR 0x00000004
pattern $bSURFACE_TRANSFORM_ROTATE_270_BIT_KHR :: SurfaceTransformFlagBitsKHR
$mSURFACE_TRANSFORM_ROTATE_270_BIT_KHR :: forall {r}.
SurfaceTransformFlagBitsKHR -> (Void# -> r) -> (Void# -> r) -> r
SURFACE_TRANSFORM_ROTATE_270_BIT_KHR = SurfaceTransformFlagBitsKHR 0x00000008
pattern $bSURFACE_TRANSFORM_HORIZONTAL_MIRROR_BIT_KHR :: SurfaceTransformFlagBitsKHR
$mSURFACE_TRANSFORM_HORIZONTAL_MIRROR_BIT_KHR :: forall {r}.
SurfaceTransformFlagBitsKHR -> (Void# -> r) -> (Void# -> r) -> r
SURFACE_TRANSFORM_HORIZONTAL_MIRROR_BIT_KHR = SurfaceTransformFlagBitsKHR 0x00000010
pattern $bSURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_90_BIT_KHR :: SurfaceTransformFlagBitsKHR
$mSURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_90_BIT_KHR :: forall {r}.
SurfaceTransformFlagBitsKHR -> (Void# -> r) -> (Void# -> r) -> r
SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_90_BIT_KHR = SurfaceTransformFlagBitsKHR 0x00000020
pattern $bSURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_180_BIT_KHR :: SurfaceTransformFlagBitsKHR
$mSURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_180_BIT_KHR :: forall {r}.
SurfaceTransformFlagBitsKHR -> (Void# -> r) -> (Void# -> r) -> r
SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_180_BIT_KHR = SurfaceTransformFlagBitsKHR 0x00000040
pattern $bSURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_270_BIT_KHR :: SurfaceTransformFlagBitsKHR
$mSURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_270_BIT_KHR :: forall {r}.
SurfaceTransformFlagBitsKHR -> (Void# -> r) -> (Void# -> r) -> r
SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_270_BIT_KHR = SurfaceTransformFlagBitsKHR 0x00000080
pattern $bSURFACE_TRANSFORM_INHERIT_BIT_KHR :: SurfaceTransformFlagBitsKHR
$mSURFACE_TRANSFORM_INHERIT_BIT_KHR :: forall {r}.
SurfaceTransformFlagBitsKHR -> (Void# -> r) -> (Void# -> r) -> r
SURFACE_TRANSFORM_INHERIT_BIT_KHR = SurfaceTransformFlagBitsKHR 0x00000100
conNameSurfaceTransformFlagBitsKHR :: String
conNameSurfaceTransformFlagBitsKHR :: String
conNameSurfaceTransformFlagBitsKHR = String
"SurfaceTransformFlagBitsKHR"
enumPrefixSurfaceTransformFlagBitsKHR :: String
enumPrefixSurfaceTransformFlagBitsKHR :: String
enumPrefixSurfaceTransformFlagBitsKHR = String
"SURFACE_TRANSFORM_"
showTableSurfaceTransformFlagBitsKHR :: [(SurfaceTransformFlagBitsKHR, String)]
showTableSurfaceTransformFlagBitsKHR :: [(SurfaceTransformFlagBitsKHR, String)]
showTableSurfaceTransformFlagBitsKHR =
[
( SurfaceTransformFlagBitsKHR
SURFACE_TRANSFORM_IDENTITY_BIT_KHR
, String
"IDENTITY_BIT_KHR"
)
,
( SurfaceTransformFlagBitsKHR
SURFACE_TRANSFORM_ROTATE_90_BIT_KHR
, String
"ROTATE_90_BIT_KHR"
)
,
( SurfaceTransformFlagBitsKHR
SURFACE_TRANSFORM_ROTATE_180_BIT_KHR
, String
"ROTATE_180_BIT_KHR"
)
,
( SurfaceTransformFlagBitsKHR
SURFACE_TRANSFORM_ROTATE_270_BIT_KHR
, String
"ROTATE_270_BIT_KHR"
)
,
( SurfaceTransformFlagBitsKHR
SURFACE_TRANSFORM_HORIZONTAL_MIRROR_BIT_KHR
, String
"HORIZONTAL_MIRROR_BIT_KHR"
)
,
( SurfaceTransformFlagBitsKHR
SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_90_BIT_KHR
, String
"HORIZONTAL_MIRROR_ROTATE_90_BIT_KHR"
)
,
( SurfaceTransformFlagBitsKHR
SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_180_BIT_KHR
, String
"HORIZONTAL_MIRROR_ROTATE_180_BIT_KHR"
)
,
( SurfaceTransformFlagBitsKHR
SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_270_BIT_KHR
, String
"HORIZONTAL_MIRROR_ROTATE_270_BIT_KHR"
)
,
( SurfaceTransformFlagBitsKHR
SURFACE_TRANSFORM_INHERIT_BIT_KHR
, String
"INHERIT_BIT_KHR"
)
]
instance Show SurfaceTransformFlagBitsKHR where
showsPrec :: Int -> SurfaceTransformFlagBitsKHR -> ShowS
showsPrec =
String
-> [(SurfaceTransformFlagBitsKHR, String)]
-> String
-> (SurfaceTransformFlagBitsKHR -> Flags)
-> (Flags -> ShowS)
-> Int
-> SurfaceTransformFlagBitsKHR
-> ShowS
forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec
String
enumPrefixSurfaceTransformFlagBitsKHR
[(SurfaceTransformFlagBitsKHR, String)]
showTableSurfaceTransformFlagBitsKHR
String
conNameSurfaceTransformFlagBitsKHR
(\(SurfaceTransformFlagBitsKHR Flags
x) -> Flags
x)
(\Flags
x -> String -> ShowS
showString String
"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 SurfaceTransformFlagBitsKHR where
readPrec :: ReadPrec SurfaceTransformFlagBitsKHR
readPrec =
String
-> [(SurfaceTransformFlagBitsKHR, String)]
-> String
-> (Flags -> SurfaceTransformFlagBitsKHR)
-> ReadPrec SurfaceTransformFlagBitsKHR
forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec
String
enumPrefixSurfaceTransformFlagBitsKHR
[(SurfaceTransformFlagBitsKHR, String)]
showTableSurfaceTransformFlagBitsKHR
String
conNameSurfaceTransformFlagBitsKHR
Flags -> SurfaceTransformFlagBitsKHR
SurfaceTransformFlagBitsKHR
type KHR_SURFACE_SPEC_VERSION = 25
pattern KHR_SURFACE_SPEC_VERSION :: forall a . Integral a => a
pattern $bKHR_SURFACE_SPEC_VERSION :: forall a. Integral a => a
$mKHR_SURFACE_SPEC_VERSION :: forall {r} {a}.
Integral a =>
a -> (Void# -> r) -> (Void# -> r) -> r
KHR_SURFACE_SPEC_VERSION = 25
type KHR_SURFACE_EXTENSION_NAME = "VK_KHR_surface"
pattern KHR_SURFACE_EXTENSION_NAME :: forall a . (Eq a, IsString a) => a
pattern $bKHR_SURFACE_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a
$mKHR_SURFACE_EXTENSION_NAME :: forall {r} {a}.
(Eq a, IsString a) =>
a -> (Void# -> r) -> (Void# -> r) -> r
KHR_SURFACE_EXTENSION_NAME = "VK_KHR_surface"