{-# language CPP #-}
module Vulkan.Extensions.VK_KHR_get_display_properties2 ( getPhysicalDeviceDisplayProperties2KHR
, getPhysicalDeviceDisplayPlaneProperties2KHR
, getDisplayModeProperties2KHR
, getDisplayPlaneCapabilities2KHR
, DisplayProperties2KHR(..)
, DisplayPlaneProperties2KHR(..)
, DisplayModeProperties2KHR(..)
, DisplayPlaneInfo2KHR(..)
, DisplayPlaneCapabilities2KHR(..)
, KHR_GET_DISPLAY_PROPERTIES_2_SPEC_VERSION
, pattern KHR_GET_DISPLAY_PROPERTIES_2_SPEC_VERSION
, KHR_GET_DISPLAY_PROPERTIES_2_EXTENSION_NAME
, pattern KHR_GET_DISPLAY_PROPERTIES_2_EXTENSION_NAME
, DisplayKHR(..)
, DisplayModeKHR(..)
, DisplayPropertiesKHR(..)
, DisplayPlanePropertiesKHR(..)
, DisplayModeParametersKHR(..)
, DisplayModePropertiesKHR(..)
, DisplayPlaneCapabilitiesKHR(..)
, DisplayPlaneAlphaFlagBitsKHR(..)
, DisplayPlaneAlphaFlagsKHR
, SurfaceTransformFlagBitsKHR(..)
, SurfaceTransformFlagsKHR
) where
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 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 Control.Monad.IO.Class (MonadIO)
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 Foreign.Ptr (FunPtr)
import Foreign.Ptr (Ptr)
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.NamedType ((:::))
import Vulkan.Extensions.Handles (DisplayKHR)
import Vulkan.Extensions.Handles (DisplayKHR(..))
import Vulkan.Extensions.Handles (DisplayModeKHR)
import Vulkan.Extensions.VK_KHR_display (DisplayModePropertiesKHR)
import Vulkan.Extensions.VK_KHR_display (DisplayPlaneCapabilitiesKHR)
import Vulkan.Extensions.VK_KHR_display (DisplayPlanePropertiesKHR)
import Vulkan.Extensions.VK_KHR_display (DisplayPropertiesKHR)
import Vulkan.Dynamic (InstanceCmds(pVkGetDisplayModeProperties2KHR))
import Vulkan.Dynamic (InstanceCmds(pVkGetDisplayPlaneCapabilities2KHR))
import Vulkan.Dynamic (InstanceCmds(pVkGetPhysicalDeviceDisplayPlaneProperties2KHR))
import Vulkan.Dynamic (InstanceCmds(pVkGetPhysicalDeviceDisplayProperties2KHR))
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.Core10.Enums.StructureType (StructureType)
import Vulkan.Exception (VulkanException(..))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_DISPLAY_MODE_PROPERTIES_2_KHR))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_DISPLAY_PLANE_CAPABILITIES_2_KHR))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_DISPLAY_PLANE_INFO_2_KHR))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_DISPLAY_PLANE_PROPERTIES_2_KHR))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_DISPLAY_PROPERTIES_2_KHR))
import Vulkan.Core10.Enums.Result (Result(SUCCESS))
import Vulkan.Extensions.Handles (DisplayKHR(..))
import Vulkan.Extensions.Handles (DisplayModeKHR(..))
import Vulkan.Extensions.VK_KHR_display (DisplayModeParametersKHR(..))
import Vulkan.Extensions.VK_KHR_display (DisplayModePropertiesKHR(..))
import Vulkan.Extensions.VK_KHR_display (DisplayPlaneAlphaFlagBitsKHR(..))
import Vulkan.Extensions.VK_KHR_display (DisplayPlaneAlphaFlagsKHR)
import Vulkan.Extensions.VK_KHR_display (DisplayPlaneCapabilitiesKHR(..))
import Vulkan.Extensions.VK_KHR_display (DisplayPlanePropertiesKHR(..))
import Vulkan.Extensions.VK_KHR_display (DisplayPropertiesKHR(..))
import Vulkan.Extensions.VK_KHR_surface (SurfaceTransformFlagBitsKHR(..))
import Vulkan.Extensions.VK_KHR_surface (SurfaceTransformFlagsKHR)
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkGetPhysicalDeviceDisplayProperties2KHR
:: FunPtr (Ptr PhysicalDevice_T -> Ptr Word32 -> Ptr DisplayProperties2KHR -> IO Result) -> Ptr PhysicalDevice_T -> Ptr Word32 -> Ptr DisplayProperties2KHR -> IO Result
getPhysicalDeviceDisplayProperties2KHR :: forall io
. (MonadIO io)
=>
PhysicalDevice
-> io (Result, ("properties" ::: Vector DisplayProperties2KHR))
getPhysicalDeviceDisplayProperties2KHR :: forall (io :: * -> *).
MonadIO io =>
PhysicalDevice
-> io (Result, "properties" ::: Vector DisplayProperties2KHR)
getPhysicalDeviceDisplayProperties2KHR PhysicalDevice
physicalDevice = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT forall a b. (a -> b) -> a -> b
$ do
let vkGetPhysicalDeviceDisplayProperties2KHRPtr :: FunPtr
(Ptr PhysicalDevice_T
-> ("pPropertyCount" ::: Ptr Word32)
-> ("pProperties" ::: Ptr DisplayProperties2KHR)
-> IO Result)
vkGetPhysicalDeviceDisplayProperties2KHRPtr = InstanceCmds
-> FunPtr
(Ptr PhysicalDevice_T
-> ("pPropertyCount" ::: Ptr Word32)
-> ("pProperties" ::: Ptr DisplayProperties2KHR)
-> IO Result)
pVkGetPhysicalDeviceDisplayProperties2KHR (case PhysicalDevice
physicalDevice of PhysicalDevice{InstanceCmds
$sel:instanceCmds:PhysicalDevice :: PhysicalDevice -> InstanceCmds
instanceCmds :: InstanceCmds
instanceCmds} -> InstanceCmds
instanceCmds)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr PhysicalDevice_T
-> ("pPropertyCount" ::: Ptr Word32)
-> ("pProperties" ::: Ptr DisplayProperties2KHR)
-> IO Result)
vkGetPhysicalDeviceDisplayProperties2KHRPtr forall a. Eq a => a -> a -> Bool
/= forall a. FunPtr a
nullFunPtr) forall a b. (a -> b) -> a -> b
$
forall e a. Exception e => e -> IO a
throwIO forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkGetPhysicalDeviceDisplayProperties2KHR is null" forall a. Maybe a
Nothing forall a. Maybe a
Nothing
let vkGetPhysicalDeviceDisplayProperties2KHR' :: Ptr PhysicalDevice_T
-> ("pPropertyCount" ::: Ptr Word32)
-> ("pProperties" ::: Ptr DisplayProperties2KHR)
-> IO Result
vkGetPhysicalDeviceDisplayProperties2KHR' = FunPtr
(Ptr PhysicalDevice_T
-> ("pPropertyCount" ::: Ptr Word32)
-> ("pProperties" ::: Ptr DisplayProperties2KHR)
-> IO Result)
-> Ptr PhysicalDevice_T
-> ("pPropertyCount" ::: Ptr Word32)
-> ("pProperties" ::: Ptr DisplayProperties2KHR)
-> IO Result
mkVkGetPhysicalDeviceDisplayProperties2KHR FunPtr
(Ptr PhysicalDevice_T
-> ("pPropertyCount" ::: Ptr Word32)
-> ("pProperties" ::: Ptr DisplayProperties2KHR)
-> IO Result)
vkGetPhysicalDeviceDisplayProperties2KHRPtr
let physicalDevice' :: Ptr PhysicalDevice_T
physicalDevice' = PhysicalDevice -> Ptr PhysicalDevice_T
physicalDeviceHandle (PhysicalDevice
physicalDevice)
"pPropertyCount" ::: Ptr Word32
pPPropertyCount <- forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ 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) forall a. Ptr a -> IO ()
free
Result
r <- forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. String -> IO a -> IO a
traceAroundEvent String
"vkGetPhysicalDeviceDisplayProperties2KHR" (Ptr PhysicalDevice_T
-> ("pPropertyCount" ::: Ptr Word32)
-> ("pProperties" ::: Ptr DisplayProperties2KHR)
-> IO Result
vkGetPhysicalDeviceDisplayProperties2KHR'
Ptr PhysicalDevice_T
physicalDevice'
("pPropertyCount" ::: Ptr Word32
pPPropertyCount)
(forall a. Ptr a
nullPtr))
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
when (Result
r forall a. Ord a => a -> a -> Bool
< Result
SUCCESS) (forall e a. Exception e => e -> IO a
throwIO (Result -> VulkanException
VulkanException Result
r))
Word32
pPropertyCount <- forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> IO a
peek @Word32 "pPropertyCount" ::: Ptr Word32
pPPropertyCount
"pProperties" ::: Ptr DisplayProperties2KHR
pPProperties <- forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall a b c. IO a -> (a -> IO b) -> (a -> IO c) -> IO c
bracket (forall a. Int -> IO (Ptr a)
callocBytes @DisplayProperties2KHR ((forall a b. (Integral a, Num b) => a -> b
fromIntegral (Word32
pPropertyCount)) forall a. Num a => a -> a -> a
* Int
64)) forall a. Ptr a -> IO ()
free
[()]
_ <- forall (t :: * -> *) (f :: * -> *) a b.
(Traversable t, Applicative f) =>
(a -> f b) -> t a -> f (t b)
traverse (\Int
i -> forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall a b. ToCStruct a => Ptr a -> IO b -> IO b
pokeZeroCStruct ("pProperties" ::: Ptr DisplayProperties2KHR
pPProperties forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (Int
i forall a. Num a => a -> a -> a
* Int
64) :: Ptr DisplayProperties2KHR) forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a b. (a -> b) -> a -> b
$ ())) [Int
0..(forall a b. (Integral a, Num b) => a -> b
fromIntegral (Word32
pPropertyCount)) forall a. Num a => a -> a -> a
- Int
1]
Result
r' <- forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. String -> IO a -> IO a
traceAroundEvent String
"vkGetPhysicalDeviceDisplayProperties2KHR" (Ptr PhysicalDevice_T
-> ("pPropertyCount" ::: Ptr Word32)
-> ("pProperties" ::: Ptr DisplayProperties2KHR)
-> IO Result
vkGetPhysicalDeviceDisplayProperties2KHR'
Ptr PhysicalDevice_T
physicalDevice'
("pPropertyCount" ::: Ptr Word32
pPPropertyCount)
(("pProperties" ::: Ptr DisplayProperties2KHR
pPProperties)))
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
when (Result
r' forall a. Ord a => a -> a -> Bool
< Result
SUCCESS) (forall e a. Exception e => e -> IO a
throwIO (Result -> VulkanException
VulkanException Result
r'))
Word32
pPropertyCount' <- forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> IO a
peek @Word32 "pPropertyCount" ::: Ptr Word32
pPPropertyCount
"properties" ::: Vector DisplayProperties2KHR
pProperties' <- forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (m :: * -> *) a.
Monad m =>
Int -> (Int -> m a) -> m (Vector a)
generateM (forall a b. (Integral a, Num b) => a -> b
fromIntegral (Word32
pPropertyCount')) (\Int
i -> forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @DisplayProperties2KHR ((("pProperties" ::: Ptr DisplayProperties2KHR
pPProperties) forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (Int
64 forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr DisplayProperties2KHR)))
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ ((Result
r'), "properties" ::: Vector DisplayProperties2KHR
pProperties')
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkGetPhysicalDeviceDisplayPlaneProperties2KHR
:: FunPtr (Ptr PhysicalDevice_T -> Ptr Word32 -> Ptr DisplayPlaneProperties2KHR -> IO Result) -> Ptr PhysicalDevice_T -> Ptr Word32 -> Ptr DisplayPlaneProperties2KHR -> IO Result
getPhysicalDeviceDisplayPlaneProperties2KHR :: forall io
. (MonadIO io)
=>
PhysicalDevice
-> io (Result, ("properties" ::: Vector DisplayPlaneProperties2KHR))
getPhysicalDeviceDisplayPlaneProperties2KHR :: forall (io :: * -> *).
MonadIO io =>
PhysicalDevice
-> io (Result, "properties" ::: Vector DisplayPlaneProperties2KHR)
getPhysicalDeviceDisplayPlaneProperties2KHR PhysicalDevice
physicalDevice = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT forall a b. (a -> b) -> a -> b
$ do
let vkGetPhysicalDeviceDisplayPlaneProperties2KHRPtr :: FunPtr
(Ptr PhysicalDevice_T
-> ("pPropertyCount" ::: Ptr Word32)
-> ("pProperties" ::: Ptr DisplayPlaneProperties2KHR)
-> IO Result)
vkGetPhysicalDeviceDisplayPlaneProperties2KHRPtr = InstanceCmds
-> FunPtr
(Ptr PhysicalDevice_T
-> ("pPropertyCount" ::: Ptr Word32)
-> ("pProperties" ::: Ptr DisplayPlaneProperties2KHR)
-> IO Result)
pVkGetPhysicalDeviceDisplayPlaneProperties2KHR (case PhysicalDevice
physicalDevice of PhysicalDevice{InstanceCmds
instanceCmds :: InstanceCmds
$sel:instanceCmds:PhysicalDevice :: PhysicalDevice -> InstanceCmds
instanceCmds} -> InstanceCmds
instanceCmds)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr PhysicalDevice_T
-> ("pPropertyCount" ::: Ptr Word32)
-> ("pProperties" ::: Ptr DisplayPlaneProperties2KHR)
-> IO Result)
vkGetPhysicalDeviceDisplayPlaneProperties2KHRPtr forall a. Eq a => a -> a -> Bool
/= forall a. FunPtr a
nullFunPtr) forall a b. (a -> b) -> a -> b
$
forall e a. Exception e => e -> IO a
throwIO forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkGetPhysicalDeviceDisplayPlaneProperties2KHR is null" forall a. Maybe a
Nothing forall a. Maybe a
Nothing
let vkGetPhysicalDeviceDisplayPlaneProperties2KHR' :: Ptr PhysicalDevice_T
-> ("pPropertyCount" ::: Ptr Word32)
-> ("pProperties" ::: Ptr DisplayPlaneProperties2KHR)
-> IO Result
vkGetPhysicalDeviceDisplayPlaneProperties2KHR' = FunPtr
(Ptr PhysicalDevice_T
-> ("pPropertyCount" ::: Ptr Word32)
-> ("pProperties" ::: Ptr DisplayPlaneProperties2KHR)
-> IO Result)
-> Ptr PhysicalDevice_T
-> ("pPropertyCount" ::: Ptr Word32)
-> ("pProperties" ::: Ptr DisplayPlaneProperties2KHR)
-> IO Result
mkVkGetPhysicalDeviceDisplayPlaneProperties2KHR FunPtr
(Ptr PhysicalDevice_T
-> ("pPropertyCount" ::: Ptr Word32)
-> ("pProperties" ::: Ptr DisplayPlaneProperties2KHR)
-> IO Result)
vkGetPhysicalDeviceDisplayPlaneProperties2KHRPtr
let physicalDevice' :: Ptr PhysicalDevice_T
physicalDevice' = PhysicalDevice -> Ptr PhysicalDevice_T
physicalDeviceHandle (PhysicalDevice
physicalDevice)
"pPropertyCount" ::: Ptr Word32
pPPropertyCount <- forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ 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) forall a. Ptr a -> IO ()
free
Result
r <- forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. String -> IO a -> IO a
traceAroundEvent String
"vkGetPhysicalDeviceDisplayPlaneProperties2KHR" (Ptr PhysicalDevice_T
-> ("pPropertyCount" ::: Ptr Word32)
-> ("pProperties" ::: Ptr DisplayPlaneProperties2KHR)
-> IO Result
vkGetPhysicalDeviceDisplayPlaneProperties2KHR'
Ptr PhysicalDevice_T
physicalDevice'
("pPropertyCount" ::: Ptr Word32
pPPropertyCount)
(forall a. Ptr a
nullPtr))
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
when (Result
r forall a. Ord a => a -> a -> Bool
< Result
SUCCESS) (forall e a. Exception e => e -> IO a
throwIO (Result -> VulkanException
VulkanException Result
r))
Word32
pPropertyCount <- forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> IO a
peek @Word32 "pPropertyCount" ::: Ptr Word32
pPPropertyCount
"pProperties" ::: Ptr DisplayPlaneProperties2KHR
pPProperties <- forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall a b c. IO a -> (a -> IO b) -> (a -> IO c) -> IO c
bracket (forall a. Int -> IO (Ptr a)
callocBytes @DisplayPlaneProperties2KHR ((forall a b. (Integral a, Num b) => a -> b
fromIntegral (Word32
pPropertyCount)) forall a. Num a => a -> a -> a
* Int
32)) forall a. Ptr a -> IO ()
free
[()]
_ <- forall (t :: * -> *) (f :: * -> *) a b.
(Traversable t, Applicative f) =>
(a -> f b) -> t a -> f (t b)
traverse (\Int
i -> forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall a b. ToCStruct a => Ptr a -> IO b -> IO b
pokeZeroCStruct ("pProperties" ::: Ptr DisplayPlaneProperties2KHR
pPProperties forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (Int
i forall a. Num a => a -> a -> a
* Int
32) :: Ptr DisplayPlaneProperties2KHR) forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a b. (a -> b) -> a -> b
$ ())) [Int
0..(forall a b. (Integral a, Num b) => a -> b
fromIntegral (Word32
pPropertyCount)) forall a. Num a => a -> a -> a
- Int
1]
Result
r' <- forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. String -> IO a -> IO a
traceAroundEvent String
"vkGetPhysicalDeviceDisplayPlaneProperties2KHR" (Ptr PhysicalDevice_T
-> ("pPropertyCount" ::: Ptr Word32)
-> ("pProperties" ::: Ptr DisplayPlaneProperties2KHR)
-> IO Result
vkGetPhysicalDeviceDisplayPlaneProperties2KHR'
Ptr PhysicalDevice_T
physicalDevice'
("pPropertyCount" ::: Ptr Word32
pPPropertyCount)
(("pProperties" ::: Ptr DisplayPlaneProperties2KHR
pPProperties)))
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
when (Result
r' forall a. Ord a => a -> a -> Bool
< Result
SUCCESS) (forall e a. Exception e => e -> IO a
throwIO (Result -> VulkanException
VulkanException Result
r'))
Word32
pPropertyCount' <- forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> IO a
peek @Word32 "pPropertyCount" ::: Ptr Word32
pPPropertyCount
"properties" ::: Vector DisplayPlaneProperties2KHR
pProperties' <- forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (m :: * -> *) a.
Monad m =>
Int -> (Int -> m a) -> m (Vector a)
generateM (forall a b. (Integral a, Num b) => a -> b
fromIntegral (Word32
pPropertyCount')) (\Int
i -> forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @DisplayPlaneProperties2KHR ((("pProperties" ::: Ptr DisplayPlaneProperties2KHR
pPProperties) forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (Int
32 forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr DisplayPlaneProperties2KHR)))
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ ((Result
r'), "properties" ::: Vector DisplayPlaneProperties2KHR
pProperties')
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkGetDisplayModeProperties2KHR
:: FunPtr (Ptr PhysicalDevice_T -> DisplayKHR -> Ptr Word32 -> Ptr DisplayModeProperties2KHR -> IO Result) -> Ptr PhysicalDevice_T -> DisplayKHR -> Ptr Word32 -> Ptr DisplayModeProperties2KHR -> IO Result
getDisplayModeProperties2KHR :: forall io
. (MonadIO io)
=>
PhysicalDevice
->
DisplayKHR
-> io (Result, ("properties" ::: Vector DisplayModeProperties2KHR))
getDisplayModeProperties2KHR :: forall (io :: * -> *).
MonadIO io =>
PhysicalDevice
-> DisplayKHR
-> io (Result, "properties" ::: Vector DisplayModeProperties2KHR)
getDisplayModeProperties2KHR PhysicalDevice
physicalDevice DisplayKHR
display = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT forall a b. (a -> b) -> a -> b
$ do
let vkGetDisplayModeProperties2KHRPtr :: FunPtr
(Ptr PhysicalDevice_T
-> DisplayKHR
-> ("pPropertyCount" ::: Ptr Word32)
-> ("pProperties" ::: Ptr DisplayModeProperties2KHR)
-> IO Result)
vkGetDisplayModeProperties2KHRPtr = InstanceCmds
-> FunPtr
(Ptr PhysicalDevice_T
-> DisplayKHR
-> ("pPropertyCount" ::: Ptr Word32)
-> ("pProperties" ::: Ptr DisplayModeProperties2KHR)
-> IO Result)
pVkGetDisplayModeProperties2KHR (case PhysicalDevice
physicalDevice of PhysicalDevice{InstanceCmds
instanceCmds :: InstanceCmds
$sel:instanceCmds:PhysicalDevice :: PhysicalDevice -> InstanceCmds
instanceCmds} -> InstanceCmds
instanceCmds)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr PhysicalDevice_T
-> DisplayKHR
-> ("pPropertyCount" ::: Ptr Word32)
-> ("pProperties" ::: Ptr DisplayModeProperties2KHR)
-> IO Result)
vkGetDisplayModeProperties2KHRPtr forall a. Eq a => a -> a -> Bool
/= forall a. FunPtr a
nullFunPtr) forall a b. (a -> b) -> a -> b
$
forall e a. Exception e => e -> IO a
throwIO forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkGetDisplayModeProperties2KHR is null" forall a. Maybe a
Nothing forall a. Maybe a
Nothing
let vkGetDisplayModeProperties2KHR' :: Ptr PhysicalDevice_T
-> DisplayKHR
-> ("pPropertyCount" ::: Ptr Word32)
-> ("pProperties" ::: Ptr DisplayModeProperties2KHR)
-> IO Result
vkGetDisplayModeProperties2KHR' = FunPtr
(Ptr PhysicalDevice_T
-> DisplayKHR
-> ("pPropertyCount" ::: Ptr Word32)
-> ("pProperties" ::: Ptr DisplayModeProperties2KHR)
-> IO Result)
-> Ptr PhysicalDevice_T
-> DisplayKHR
-> ("pPropertyCount" ::: Ptr Word32)
-> ("pProperties" ::: Ptr DisplayModeProperties2KHR)
-> IO Result
mkVkGetDisplayModeProperties2KHR FunPtr
(Ptr PhysicalDevice_T
-> DisplayKHR
-> ("pPropertyCount" ::: Ptr Word32)
-> ("pProperties" ::: Ptr DisplayModeProperties2KHR)
-> IO Result)
vkGetDisplayModeProperties2KHRPtr
let physicalDevice' :: Ptr PhysicalDevice_T
physicalDevice' = PhysicalDevice -> Ptr PhysicalDevice_T
physicalDeviceHandle (PhysicalDevice
physicalDevice)
"pPropertyCount" ::: Ptr Word32
pPPropertyCount <- forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ 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) forall a. Ptr a -> IO ()
free
Result
r <- forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. String -> IO a -> IO a
traceAroundEvent String
"vkGetDisplayModeProperties2KHR" (Ptr PhysicalDevice_T
-> DisplayKHR
-> ("pPropertyCount" ::: Ptr Word32)
-> ("pProperties" ::: Ptr DisplayModeProperties2KHR)
-> IO Result
vkGetDisplayModeProperties2KHR'
Ptr PhysicalDevice_T
physicalDevice'
(DisplayKHR
display)
("pPropertyCount" ::: Ptr Word32
pPPropertyCount)
(forall a. Ptr a
nullPtr))
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
when (Result
r forall a. Ord a => a -> a -> Bool
< Result
SUCCESS) (forall e a. Exception e => e -> IO a
throwIO (Result -> VulkanException
VulkanException Result
r))
Word32
pPropertyCount <- forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> IO a
peek @Word32 "pPropertyCount" ::: Ptr Word32
pPPropertyCount
"pProperties" ::: Ptr DisplayModeProperties2KHR
pPProperties <- forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall a b c. IO a -> (a -> IO b) -> (a -> IO c) -> IO c
bracket (forall a. Int -> IO (Ptr a)
callocBytes @DisplayModeProperties2KHR ((forall a b. (Integral a, Num b) => a -> b
fromIntegral (Word32
pPropertyCount)) forall a. Num a => a -> a -> a
* Int
40)) forall a. Ptr a -> IO ()
free
[()]
_ <- forall (t :: * -> *) (f :: * -> *) a b.
(Traversable t, Applicative f) =>
(a -> f b) -> t a -> f (t b)
traverse (\Int
i -> forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall a b. ToCStruct a => Ptr a -> IO b -> IO b
pokeZeroCStruct ("pProperties" ::: Ptr DisplayModeProperties2KHR
pPProperties forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (Int
i forall a. Num a => a -> a -> a
* Int
40) :: Ptr DisplayModeProperties2KHR) forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a b. (a -> b) -> a -> b
$ ())) [Int
0..(forall a b. (Integral a, Num b) => a -> b
fromIntegral (Word32
pPropertyCount)) forall a. Num a => a -> a -> a
- Int
1]
Result
r' <- forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. String -> IO a -> IO a
traceAroundEvent String
"vkGetDisplayModeProperties2KHR" (Ptr PhysicalDevice_T
-> DisplayKHR
-> ("pPropertyCount" ::: Ptr Word32)
-> ("pProperties" ::: Ptr DisplayModeProperties2KHR)
-> IO Result
vkGetDisplayModeProperties2KHR'
Ptr PhysicalDevice_T
physicalDevice'
(DisplayKHR
display)
("pPropertyCount" ::: Ptr Word32
pPPropertyCount)
(("pProperties" ::: Ptr DisplayModeProperties2KHR
pPProperties)))
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
when (Result
r' forall a. Ord a => a -> a -> Bool
< Result
SUCCESS) (forall e a. Exception e => e -> IO a
throwIO (Result -> VulkanException
VulkanException Result
r'))
Word32
pPropertyCount' <- forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> IO a
peek @Word32 "pPropertyCount" ::: Ptr Word32
pPPropertyCount
"properties" ::: Vector DisplayModeProperties2KHR
pProperties' <- forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (m :: * -> *) a.
Monad m =>
Int -> (Int -> m a) -> m (Vector a)
generateM (forall a b. (Integral a, Num b) => a -> b
fromIntegral (Word32
pPropertyCount')) (\Int
i -> forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @DisplayModeProperties2KHR ((("pProperties" ::: Ptr DisplayModeProperties2KHR
pPProperties) forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (Int
40 forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr DisplayModeProperties2KHR)))
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ ((Result
r'), "properties" ::: Vector DisplayModeProperties2KHR
pProperties')
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkGetDisplayPlaneCapabilities2KHR
:: FunPtr (Ptr PhysicalDevice_T -> Ptr DisplayPlaneInfo2KHR -> Ptr DisplayPlaneCapabilities2KHR -> IO Result) -> Ptr PhysicalDevice_T -> Ptr DisplayPlaneInfo2KHR -> Ptr DisplayPlaneCapabilities2KHR -> IO Result
getDisplayPlaneCapabilities2KHR :: forall io
. (MonadIO io)
=>
PhysicalDevice
->
DisplayPlaneInfo2KHR
-> io (DisplayPlaneCapabilities2KHR)
getDisplayPlaneCapabilities2KHR :: forall (io :: * -> *).
MonadIO io =>
PhysicalDevice
-> DisplayPlaneInfo2KHR -> io DisplayPlaneCapabilities2KHR
getDisplayPlaneCapabilities2KHR PhysicalDevice
physicalDevice
DisplayPlaneInfo2KHR
displayPlaneInfo = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT forall a b. (a -> b) -> a -> b
$ do
let vkGetDisplayPlaneCapabilities2KHRPtr :: FunPtr
(Ptr PhysicalDevice_T
-> ("pDisplayPlaneInfo" ::: Ptr DisplayPlaneInfo2KHR)
-> ("pCapabilities" ::: Ptr DisplayPlaneCapabilities2KHR)
-> IO Result)
vkGetDisplayPlaneCapabilities2KHRPtr = InstanceCmds
-> FunPtr
(Ptr PhysicalDevice_T
-> ("pDisplayPlaneInfo" ::: Ptr DisplayPlaneInfo2KHR)
-> ("pCapabilities" ::: Ptr DisplayPlaneCapabilities2KHR)
-> IO Result)
pVkGetDisplayPlaneCapabilities2KHR (case PhysicalDevice
physicalDevice of PhysicalDevice{InstanceCmds
instanceCmds :: InstanceCmds
$sel:instanceCmds:PhysicalDevice :: PhysicalDevice -> InstanceCmds
instanceCmds} -> InstanceCmds
instanceCmds)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr PhysicalDevice_T
-> ("pDisplayPlaneInfo" ::: Ptr DisplayPlaneInfo2KHR)
-> ("pCapabilities" ::: Ptr DisplayPlaneCapabilities2KHR)
-> IO Result)
vkGetDisplayPlaneCapabilities2KHRPtr forall a. Eq a => a -> a -> Bool
/= forall a. FunPtr a
nullFunPtr) forall a b. (a -> b) -> a -> b
$
forall e a. Exception e => e -> IO a
throwIO forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkGetDisplayPlaneCapabilities2KHR is null" forall a. Maybe a
Nothing forall a. Maybe a
Nothing
let vkGetDisplayPlaneCapabilities2KHR' :: Ptr PhysicalDevice_T
-> ("pDisplayPlaneInfo" ::: Ptr DisplayPlaneInfo2KHR)
-> ("pCapabilities" ::: Ptr DisplayPlaneCapabilities2KHR)
-> IO Result
vkGetDisplayPlaneCapabilities2KHR' = FunPtr
(Ptr PhysicalDevice_T
-> ("pDisplayPlaneInfo" ::: Ptr DisplayPlaneInfo2KHR)
-> ("pCapabilities" ::: Ptr DisplayPlaneCapabilities2KHR)
-> IO Result)
-> Ptr PhysicalDevice_T
-> ("pDisplayPlaneInfo" ::: Ptr DisplayPlaneInfo2KHR)
-> ("pCapabilities" ::: Ptr DisplayPlaneCapabilities2KHR)
-> IO Result
mkVkGetDisplayPlaneCapabilities2KHR FunPtr
(Ptr PhysicalDevice_T
-> ("pDisplayPlaneInfo" ::: Ptr DisplayPlaneInfo2KHR)
-> ("pCapabilities" ::: Ptr DisplayPlaneCapabilities2KHR)
-> IO Result)
vkGetDisplayPlaneCapabilities2KHRPtr
"pDisplayPlaneInfo" ::: Ptr DisplayPlaneInfo2KHR
pDisplayPlaneInfo <- forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (DisplayPlaneInfo2KHR
displayPlaneInfo)
"pCapabilities" ::: Ptr DisplayPlaneCapabilities2KHR
pPCapabilities <- 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 @DisplayPlaneCapabilities2KHR)
Result
r <- forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. String -> IO a -> IO a
traceAroundEvent String
"vkGetDisplayPlaneCapabilities2KHR" (Ptr PhysicalDevice_T
-> ("pDisplayPlaneInfo" ::: Ptr DisplayPlaneInfo2KHR)
-> ("pCapabilities" ::: Ptr DisplayPlaneCapabilities2KHR)
-> IO Result
vkGetDisplayPlaneCapabilities2KHR'
(PhysicalDevice -> Ptr PhysicalDevice_T
physicalDeviceHandle (PhysicalDevice
physicalDevice))
"pDisplayPlaneInfo" ::: Ptr DisplayPlaneInfo2KHR
pDisplayPlaneInfo
("pCapabilities" ::: Ptr DisplayPlaneCapabilities2KHR
pPCapabilities))
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
when (Result
r forall a. Ord a => a -> a -> Bool
< Result
SUCCESS) (forall e a. Exception e => e -> IO a
throwIO (Result -> VulkanException
VulkanException Result
r))
DisplayPlaneCapabilities2KHR
pCapabilities <- forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @DisplayPlaneCapabilities2KHR "pCapabilities" ::: Ptr DisplayPlaneCapabilities2KHR
pPCapabilities
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ (DisplayPlaneCapabilities2KHR
pCapabilities)
data DisplayProperties2KHR = DisplayProperties2KHR
{
DisplayProperties2KHR -> DisplayPropertiesKHR
displayProperties :: DisplayPropertiesKHR }
deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (DisplayProperties2KHR)
#endif
deriving instance Show DisplayProperties2KHR
instance ToCStruct DisplayProperties2KHR where
withCStruct :: forall b.
DisplayProperties2KHR
-> (("pProperties" ::: Ptr DisplayProperties2KHR) -> IO b) -> IO b
withCStruct DisplayProperties2KHR
x ("pProperties" ::: Ptr DisplayProperties2KHR) -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
64 forall a b. (a -> b) -> a -> b
$ \"pProperties" ::: Ptr DisplayProperties2KHR
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pProperties" ::: Ptr DisplayProperties2KHR
p DisplayProperties2KHR
x (("pProperties" ::: Ptr DisplayProperties2KHR) -> IO b
f "pProperties" ::: Ptr DisplayProperties2KHR
p)
pokeCStruct :: forall b.
("pProperties" ::: Ptr DisplayProperties2KHR)
-> DisplayProperties2KHR -> IO b -> IO b
pokeCStruct "pProperties" ::: Ptr DisplayProperties2KHR
p DisplayProperties2KHR{DisplayPropertiesKHR
displayProperties :: DisplayPropertiesKHR
$sel:displayProperties:DisplayProperties2KHR :: DisplayProperties2KHR -> DisplayPropertiesKHR
..} IO b
f = forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT forall a b. (a -> b) -> a -> b
$ do
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke (("pProperties" ::: Ptr DisplayProperties2KHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_DISPLAY_PROPERTIES_2_KHR)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke (("pProperties" ::: Ptr DisplayProperties2KHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct (("pProperties" ::: Ptr DisplayProperties2KHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr DisplayPropertiesKHR)) (DisplayPropertiesKHR
displayProperties) forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a b. (a -> b) -> a -> b
$ ())
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ IO b
f
cStructSize :: Int
cStructSize = Int
64
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b.
("pProperties" ::: Ptr DisplayProperties2KHR) -> IO b -> IO b
pokeZeroCStruct "pProperties" ::: Ptr DisplayProperties2KHR
p IO b
f = forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT forall a b. (a -> b) -> a -> b
$ do
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke (("pProperties" ::: Ptr DisplayProperties2KHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_DISPLAY_PROPERTIES_2_KHR)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke (("pProperties" ::: Ptr DisplayProperties2KHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct (("pProperties" ::: Ptr DisplayProperties2KHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr DisplayPropertiesKHR)) (forall a. Zero a => a
zero) forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a b. (a -> b) -> a -> b
$ ())
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ IO b
f
instance FromCStruct DisplayProperties2KHR where
peekCStruct :: ("pProperties" ::: Ptr DisplayProperties2KHR)
-> IO DisplayProperties2KHR
peekCStruct "pProperties" ::: Ptr DisplayProperties2KHR
p = do
DisplayPropertiesKHR
displayProperties <- forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @DisplayPropertiesKHR (("pProperties" ::: Ptr DisplayProperties2KHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr DisplayPropertiesKHR))
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ DisplayPropertiesKHR -> DisplayProperties2KHR
DisplayProperties2KHR
DisplayPropertiesKHR
displayProperties
instance Zero DisplayProperties2KHR where
zero :: DisplayProperties2KHR
zero = DisplayPropertiesKHR -> DisplayProperties2KHR
DisplayProperties2KHR
forall a. Zero a => a
zero
data DisplayPlaneProperties2KHR = DisplayPlaneProperties2KHR
{
DisplayPlaneProperties2KHR -> DisplayPlanePropertiesKHR
displayPlaneProperties :: DisplayPlanePropertiesKHR }
deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (DisplayPlaneProperties2KHR)
#endif
deriving instance Show DisplayPlaneProperties2KHR
instance ToCStruct DisplayPlaneProperties2KHR where
withCStruct :: forall b.
DisplayPlaneProperties2KHR
-> (("pProperties" ::: Ptr DisplayPlaneProperties2KHR) -> IO b)
-> IO b
withCStruct DisplayPlaneProperties2KHR
x ("pProperties" ::: Ptr DisplayPlaneProperties2KHR) -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
32 forall a b. (a -> b) -> a -> b
$ \"pProperties" ::: Ptr DisplayPlaneProperties2KHR
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pProperties" ::: Ptr DisplayPlaneProperties2KHR
p DisplayPlaneProperties2KHR
x (("pProperties" ::: Ptr DisplayPlaneProperties2KHR) -> IO b
f "pProperties" ::: Ptr DisplayPlaneProperties2KHR
p)
pokeCStruct :: forall b.
("pProperties" ::: Ptr DisplayPlaneProperties2KHR)
-> DisplayPlaneProperties2KHR -> IO b -> IO b
pokeCStruct "pProperties" ::: Ptr DisplayPlaneProperties2KHR
p DisplayPlaneProperties2KHR{DisplayPlanePropertiesKHR
displayPlaneProperties :: DisplayPlanePropertiesKHR
$sel:displayPlaneProperties:DisplayPlaneProperties2KHR :: DisplayPlaneProperties2KHR -> DisplayPlanePropertiesKHR
..} IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pProperties" ::: Ptr DisplayPlaneProperties2KHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_DISPLAY_PLANE_PROPERTIES_2_KHR)
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pProperties" ::: Ptr DisplayPlaneProperties2KHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pProperties" ::: Ptr DisplayPlaneProperties2KHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr DisplayPlanePropertiesKHR)) (DisplayPlanePropertiesKHR
displayPlaneProperties)
IO b
f
cStructSize :: Int
cStructSize = Int
32
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b.
("pProperties" ::: Ptr DisplayPlaneProperties2KHR) -> IO b -> IO b
pokeZeroCStruct "pProperties" ::: Ptr DisplayPlaneProperties2KHR
p IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pProperties" ::: Ptr DisplayPlaneProperties2KHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_DISPLAY_PLANE_PROPERTIES_2_KHR)
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pProperties" ::: Ptr DisplayPlaneProperties2KHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pProperties" ::: Ptr DisplayPlaneProperties2KHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr DisplayPlanePropertiesKHR)) (forall a. Zero a => a
zero)
IO b
f
instance FromCStruct DisplayPlaneProperties2KHR where
peekCStruct :: ("pProperties" ::: Ptr DisplayPlaneProperties2KHR)
-> IO DisplayPlaneProperties2KHR
peekCStruct "pProperties" ::: Ptr DisplayPlaneProperties2KHR
p = do
DisplayPlanePropertiesKHR
displayPlaneProperties <- forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @DisplayPlanePropertiesKHR (("pProperties" ::: Ptr DisplayPlaneProperties2KHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr DisplayPlanePropertiesKHR))
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ DisplayPlanePropertiesKHR -> DisplayPlaneProperties2KHR
DisplayPlaneProperties2KHR
DisplayPlanePropertiesKHR
displayPlaneProperties
instance Storable DisplayPlaneProperties2KHR where
sizeOf :: DisplayPlaneProperties2KHR -> Int
sizeOf ~DisplayPlaneProperties2KHR
_ = Int
32
alignment :: DisplayPlaneProperties2KHR -> Int
alignment ~DisplayPlaneProperties2KHR
_ = Int
8
peek :: ("pProperties" ::: Ptr DisplayPlaneProperties2KHR)
-> IO DisplayPlaneProperties2KHR
peek = forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: ("pProperties" ::: Ptr DisplayPlaneProperties2KHR)
-> DisplayPlaneProperties2KHR -> IO ()
poke "pProperties" ::: Ptr DisplayPlaneProperties2KHR
ptr DisplayPlaneProperties2KHR
poked = forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pProperties" ::: Ptr DisplayPlaneProperties2KHR
ptr DisplayPlaneProperties2KHR
poked (forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero DisplayPlaneProperties2KHR where
zero :: DisplayPlaneProperties2KHR
zero = DisplayPlanePropertiesKHR -> DisplayPlaneProperties2KHR
DisplayPlaneProperties2KHR
forall a. Zero a => a
zero
data DisplayModeProperties2KHR = DisplayModeProperties2KHR
{
DisplayModeProperties2KHR -> DisplayModePropertiesKHR
displayModeProperties :: DisplayModePropertiesKHR }
deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (DisplayModeProperties2KHR)
#endif
deriving instance Show DisplayModeProperties2KHR
instance ToCStruct DisplayModeProperties2KHR where
withCStruct :: forall b.
DisplayModeProperties2KHR
-> (("pProperties" ::: Ptr DisplayModeProperties2KHR) -> IO b)
-> IO b
withCStruct DisplayModeProperties2KHR
x ("pProperties" ::: Ptr DisplayModeProperties2KHR) -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
40 forall a b. (a -> b) -> a -> b
$ \"pProperties" ::: Ptr DisplayModeProperties2KHR
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pProperties" ::: Ptr DisplayModeProperties2KHR
p DisplayModeProperties2KHR
x (("pProperties" ::: Ptr DisplayModeProperties2KHR) -> IO b
f "pProperties" ::: Ptr DisplayModeProperties2KHR
p)
pokeCStruct :: forall b.
("pProperties" ::: Ptr DisplayModeProperties2KHR)
-> DisplayModeProperties2KHR -> IO b -> IO b
pokeCStruct "pProperties" ::: Ptr DisplayModeProperties2KHR
p DisplayModeProperties2KHR{DisplayModePropertiesKHR
displayModeProperties :: DisplayModePropertiesKHR
$sel:displayModeProperties:DisplayModeProperties2KHR :: DisplayModeProperties2KHR -> DisplayModePropertiesKHR
..} IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pProperties" ::: Ptr DisplayModeProperties2KHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_DISPLAY_MODE_PROPERTIES_2_KHR)
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pProperties" ::: Ptr DisplayModeProperties2KHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pProperties" ::: Ptr DisplayModeProperties2KHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr DisplayModePropertiesKHR)) (DisplayModePropertiesKHR
displayModeProperties)
IO b
f
cStructSize :: Int
cStructSize = Int
40
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b.
("pProperties" ::: Ptr DisplayModeProperties2KHR) -> IO b -> IO b
pokeZeroCStruct "pProperties" ::: Ptr DisplayModeProperties2KHR
p IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pProperties" ::: Ptr DisplayModeProperties2KHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_DISPLAY_MODE_PROPERTIES_2_KHR)
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pProperties" ::: Ptr DisplayModeProperties2KHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pProperties" ::: Ptr DisplayModeProperties2KHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr DisplayModePropertiesKHR)) (forall a. Zero a => a
zero)
IO b
f
instance FromCStruct DisplayModeProperties2KHR where
peekCStruct :: ("pProperties" ::: Ptr DisplayModeProperties2KHR)
-> IO DisplayModeProperties2KHR
peekCStruct "pProperties" ::: Ptr DisplayModeProperties2KHR
p = do
DisplayModePropertiesKHR
displayModeProperties <- forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @DisplayModePropertiesKHR (("pProperties" ::: Ptr DisplayModeProperties2KHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr DisplayModePropertiesKHR))
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ DisplayModePropertiesKHR -> DisplayModeProperties2KHR
DisplayModeProperties2KHR
DisplayModePropertiesKHR
displayModeProperties
instance Storable DisplayModeProperties2KHR where
sizeOf :: DisplayModeProperties2KHR -> Int
sizeOf ~DisplayModeProperties2KHR
_ = Int
40
alignment :: DisplayModeProperties2KHR -> Int
alignment ~DisplayModeProperties2KHR
_ = Int
8
peek :: ("pProperties" ::: Ptr DisplayModeProperties2KHR)
-> IO DisplayModeProperties2KHR
peek = forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: ("pProperties" ::: Ptr DisplayModeProperties2KHR)
-> DisplayModeProperties2KHR -> IO ()
poke "pProperties" ::: Ptr DisplayModeProperties2KHR
ptr DisplayModeProperties2KHR
poked = forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pProperties" ::: Ptr DisplayModeProperties2KHR
ptr DisplayModeProperties2KHR
poked (forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero DisplayModeProperties2KHR where
zero :: DisplayModeProperties2KHR
zero = DisplayModePropertiesKHR -> DisplayModeProperties2KHR
DisplayModeProperties2KHR
forall a. Zero a => a
zero
data DisplayPlaneInfo2KHR = DisplayPlaneInfo2KHR
{
DisplayPlaneInfo2KHR -> DisplayModeKHR
mode :: DisplayModeKHR
,
DisplayPlaneInfo2KHR -> Word32
planeIndex :: Word32
}
deriving (Typeable, DisplayPlaneInfo2KHR -> DisplayPlaneInfo2KHR -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DisplayPlaneInfo2KHR -> DisplayPlaneInfo2KHR -> Bool
$c/= :: DisplayPlaneInfo2KHR -> DisplayPlaneInfo2KHR -> Bool
== :: DisplayPlaneInfo2KHR -> DisplayPlaneInfo2KHR -> Bool
$c== :: DisplayPlaneInfo2KHR -> DisplayPlaneInfo2KHR -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (DisplayPlaneInfo2KHR)
#endif
deriving instance Show DisplayPlaneInfo2KHR
instance ToCStruct DisplayPlaneInfo2KHR where
withCStruct :: forall b.
DisplayPlaneInfo2KHR
-> (("pDisplayPlaneInfo" ::: Ptr DisplayPlaneInfo2KHR) -> IO b)
-> IO b
withCStruct DisplayPlaneInfo2KHR
x ("pDisplayPlaneInfo" ::: Ptr DisplayPlaneInfo2KHR) -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
32 forall a b. (a -> b) -> a -> b
$ \"pDisplayPlaneInfo" ::: Ptr DisplayPlaneInfo2KHR
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pDisplayPlaneInfo" ::: Ptr DisplayPlaneInfo2KHR
p DisplayPlaneInfo2KHR
x (("pDisplayPlaneInfo" ::: Ptr DisplayPlaneInfo2KHR) -> IO b
f "pDisplayPlaneInfo" ::: Ptr DisplayPlaneInfo2KHR
p)
pokeCStruct :: forall b.
("pDisplayPlaneInfo" ::: Ptr DisplayPlaneInfo2KHR)
-> DisplayPlaneInfo2KHR -> IO b -> IO b
pokeCStruct "pDisplayPlaneInfo" ::: Ptr DisplayPlaneInfo2KHR
p DisplayPlaneInfo2KHR{Word32
DisplayModeKHR
planeIndex :: Word32
mode :: DisplayModeKHR
$sel:planeIndex:DisplayPlaneInfo2KHR :: DisplayPlaneInfo2KHR -> Word32
$sel:mode:DisplayPlaneInfo2KHR :: DisplayPlaneInfo2KHR -> DisplayModeKHR
..} IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pDisplayPlaneInfo" ::: Ptr DisplayPlaneInfo2KHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_DISPLAY_PLANE_INFO_2_KHR)
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pDisplayPlaneInfo" ::: Ptr DisplayPlaneInfo2KHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pDisplayPlaneInfo" ::: Ptr DisplayPlaneInfo2KHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr DisplayModeKHR)) (DisplayModeKHR
mode)
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pDisplayPlaneInfo" ::: Ptr DisplayPlaneInfo2KHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Word32)) (Word32
planeIndex)
IO b
f
cStructSize :: Int
cStructSize = Int
32
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b.
("pDisplayPlaneInfo" ::: Ptr DisplayPlaneInfo2KHR) -> IO b -> IO b
pokeZeroCStruct "pDisplayPlaneInfo" ::: Ptr DisplayPlaneInfo2KHR
p IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pDisplayPlaneInfo" ::: Ptr DisplayPlaneInfo2KHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_DISPLAY_PLANE_INFO_2_KHR)
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pDisplayPlaneInfo" ::: Ptr DisplayPlaneInfo2KHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pDisplayPlaneInfo" ::: Ptr DisplayPlaneInfo2KHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr DisplayModeKHR)) (forall a. Zero a => a
zero)
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pDisplayPlaneInfo" ::: Ptr DisplayPlaneInfo2KHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Word32)) (forall a. Zero a => a
zero)
IO b
f
instance FromCStruct DisplayPlaneInfo2KHR where
peekCStruct :: ("pDisplayPlaneInfo" ::: Ptr DisplayPlaneInfo2KHR)
-> IO DisplayPlaneInfo2KHR
peekCStruct "pDisplayPlaneInfo" ::: Ptr DisplayPlaneInfo2KHR
p = do
DisplayModeKHR
mode <- forall a. Storable a => Ptr a -> IO a
peek @DisplayModeKHR (("pDisplayPlaneInfo" ::: Ptr DisplayPlaneInfo2KHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr DisplayModeKHR))
Word32
planeIndex <- forall a. Storable a => Ptr a -> IO a
peek @Word32 (("pDisplayPlaneInfo" ::: Ptr DisplayPlaneInfo2KHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Word32))
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ DisplayModeKHR -> Word32 -> DisplayPlaneInfo2KHR
DisplayPlaneInfo2KHR
DisplayModeKHR
mode Word32
planeIndex
instance Storable DisplayPlaneInfo2KHR where
sizeOf :: DisplayPlaneInfo2KHR -> Int
sizeOf ~DisplayPlaneInfo2KHR
_ = Int
32
alignment :: DisplayPlaneInfo2KHR -> Int
alignment ~DisplayPlaneInfo2KHR
_ = Int
8
peek :: ("pDisplayPlaneInfo" ::: Ptr DisplayPlaneInfo2KHR)
-> IO DisplayPlaneInfo2KHR
peek = forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: ("pDisplayPlaneInfo" ::: Ptr DisplayPlaneInfo2KHR)
-> DisplayPlaneInfo2KHR -> IO ()
poke "pDisplayPlaneInfo" ::: Ptr DisplayPlaneInfo2KHR
ptr DisplayPlaneInfo2KHR
poked = forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pDisplayPlaneInfo" ::: Ptr DisplayPlaneInfo2KHR
ptr DisplayPlaneInfo2KHR
poked (forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero DisplayPlaneInfo2KHR where
zero :: DisplayPlaneInfo2KHR
zero = DisplayModeKHR -> Word32 -> DisplayPlaneInfo2KHR
DisplayPlaneInfo2KHR
forall a. Zero a => a
zero
forall a. Zero a => a
zero
data DisplayPlaneCapabilities2KHR = DisplayPlaneCapabilities2KHR
{
DisplayPlaneCapabilities2KHR -> DisplayPlaneCapabilitiesKHR
capabilities :: DisplayPlaneCapabilitiesKHR }
deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (DisplayPlaneCapabilities2KHR)
#endif
deriving instance Show DisplayPlaneCapabilities2KHR
instance ToCStruct DisplayPlaneCapabilities2KHR where
withCStruct :: forall b.
DisplayPlaneCapabilities2KHR
-> (("pCapabilities" ::: Ptr DisplayPlaneCapabilities2KHR) -> IO b)
-> IO b
withCStruct DisplayPlaneCapabilities2KHR
x ("pCapabilities" ::: Ptr DisplayPlaneCapabilities2KHR) -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
88 forall a b. (a -> b) -> a -> b
$ \"pCapabilities" ::: Ptr DisplayPlaneCapabilities2KHR
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pCapabilities" ::: Ptr DisplayPlaneCapabilities2KHR
p DisplayPlaneCapabilities2KHR
x (("pCapabilities" ::: Ptr DisplayPlaneCapabilities2KHR) -> IO b
f "pCapabilities" ::: Ptr DisplayPlaneCapabilities2KHR
p)
pokeCStruct :: forall b.
("pCapabilities" ::: Ptr DisplayPlaneCapabilities2KHR)
-> DisplayPlaneCapabilities2KHR -> IO b -> IO b
pokeCStruct "pCapabilities" ::: Ptr DisplayPlaneCapabilities2KHR
p DisplayPlaneCapabilities2KHR{DisplayPlaneCapabilitiesKHR
capabilities :: DisplayPlaneCapabilitiesKHR
$sel:capabilities:DisplayPlaneCapabilities2KHR :: DisplayPlaneCapabilities2KHR -> DisplayPlaneCapabilitiesKHR
..} IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCapabilities" ::: Ptr DisplayPlaneCapabilities2KHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_DISPLAY_PLANE_CAPABILITIES_2_KHR)
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCapabilities" ::: Ptr DisplayPlaneCapabilities2KHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCapabilities" ::: Ptr DisplayPlaneCapabilities2KHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr DisplayPlaneCapabilitiesKHR)) (DisplayPlaneCapabilitiesKHR
capabilities)
IO b
f
cStructSize :: Int
cStructSize = Int
88
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b.
("pCapabilities" ::: Ptr DisplayPlaneCapabilities2KHR)
-> IO b -> IO b
pokeZeroCStruct "pCapabilities" ::: Ptr DisplayPlaneCapabilities2KHR
p IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCapabilities" ::: Ptr DisplayPlaneCapabilities2KHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_DISPLAY_PLANE_CAPABILITIES_2_KHR)
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCapabilities" ::: Ptr DisplayPlaneCapabilities2KHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCapabilities" ::: Ptr DisplayPlaneCapabilities2KHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr DisplayPlaneCapabilitiesKHR)) (forall a. Zero a => a
zero)
IO b
f
instance FromCStruct DisplayPlaneCapabilities2KHR where
peekCStruct :: ("pCapabilities" ::: Ptr DisplayPlaneCapabilities2KHR)
-> IO DisplayPlaneCapabilities2KHR
peekCStruct "pCapabilities" ::: Ptr DisplayPlaneCapabilities2KHR
p = do
DisplayPlaneCapabilitiesKHR
capabilities <- forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @DisplayPlaneCapabilitiesKHR (("pCapabilities" ::: Ptr DisplayPlaneCapabilities2KHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr DisplayPlaneCapabilitiesKHR))
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ DisplayPlaneCapabilitiesKHR -> DisplayPlaneCapabilities2KHR
DisplayPlaneCapabilities2KHR
DisplayPlaneCapabilitiesKHR
capabilities
instance Storable DisplayPlaneCapabilities2KHR where
sizeOf :: DisplayPlaneCapabilities2KHR -> Int
sizeOf ~DisplayPlaneCapabilities2KHR
_ = Int
88
alignment :: DisplayPlaneCapabilities2KHR -> Int
alignment ~DisplayPlaneCapabilities2KHR
_ = Int
8
peek :: ("pCapabilities" ::: Ptr DisplayPlaneCapabilities2KHR)
-> IO DisplayPlaneCapabilities2KHR
peek = forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: ("pCapabilities" ::: Ptr DisplayPlaneCapabilities2KHR)
-> DisplayPlaneCapabilities2KHR -> IO ()
poke "pCapabilities" ::: Ptr DisplayPlaneCapabilities2KHR
ptr DisplayPlaneCapabilities2KHR
poked = forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pCapabilities" ::: Ptr DisplayPlaneCapabilities2KHR
ptr DisplayPlaneCapabilities2KHR
poked (forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero DisplayPlaneCapabilities2KHR where
zero :: DisplayPlaneCapabilities2KHR
zero = DisplayPlaneCapabilitiesKHR -> DisplayPlaneCapabilities2KHR
DisplayPlaneCapabilities2KHR
forall a. Zero a => a
zero
type KHR_GET_DISPLAY_PROPERTIES_2_SPEC_VERSION = 1
pattern KHR_GET_DISPLAY_PROPERTIES_2_SPEC_VERSION :: forall a . Integral a => a
pattern $bKHR_GET_DISPLAY_PROPERTIES_2_SPEC_VERSION :: forall a. Integral a => a
$mKHR_GET_DISPLAY_PROPERTIES_2_SPEC_VERSION :: forall {r} {a}.
Integral a =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
KHR_GET_DISPLAY_PROPERTIES_2_SPEC_VERSION = 1
type KHR_GET_DISPLAY_PROPERTIES_2_EXTENSION_NAME = "VK_KHR_get_display_properties2"
pattern KHR_GET_DISPLAY_PROPERTIES_2_EXTENSION_NAME :: forall a . (Eq a, IsString a) => a
pattern $bKHR_GET_DISPLAY_PROPERTIES_2_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a
$mKHR_GET_DISPLAY_PROPERTIES_2_EXTENSION_NAME :: forall {r} {a}.
(Eq a, IsString a) =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
KHR_GET_DISPLAY_PROPERTIES_2_EXTENSION_NAME = "VK_KHR_get_display_properties2"