{-# language CPP #-}
module Vulkan.Extensions.VK_QNX_screen_surface ( createScreenSurfaceQNX
, getPhysicalDeviceScreenPresentationSupportQNX
, ScreenSurfaceCreateInfoQNX(..)
, ScreenSurfaceCreateFlagsQNX(..)
, QNX_SCREEN_SURFACE_SPEC_VERSION
, pattern QNX_SCREEN_SURFACE_SPEC_VERSION
, QNX_SCREEN_SURFACE_EXTENSION_NAME
, pattern QNX_SCREEN_SURFACE_EXTENSION_NAME
, Screen_window
, Screen_context
, SurfaceKHR(..)
) where
import Data.Bits (Bits)
import Data.Bits (FiniteBits)
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 Numeric (showHex)
import Control.Monad.Trans.Class (lift)
import Control.Monad.Trans.Cont (evalContT)
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.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 GHC.Read (Read(readPrec))
import GHC.Show (Show(showsPrec))
import Data.Word (Word32)
import Data.Kind (Type)
import Control.Monad.Trans.Cont (ContT(..))
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 (Flags)
import Vulkan.Core10.Handles (Instance)
import Vulkan.Core10.Handles (Instance(..))
import Vulkan.Core10.Handles (Instance(Instance))
import Vulkan.Dynamic (InstanceCmds(pVkCreateScreenSurfaceQNX))
import Vulkan.Dynamic (InstanceCmds(pVkGetPhysicalDeviceScreenPresentationSupportQNX))
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.Core10.Enums.StructureType (StructureType)
import Vulkan.Extensions.Handles (SurfaceKHR)
import Vulkan.Extensions.Handles (SurfaceKHR(..))
import Vulkan.Exception (VulkanException(..))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_SCREEN_SURFACE_CREATE_INFO_QNX))
import Vulkan.Core10.Enums.Result (Result(SUCCESS))
import Vulkan.Extensions.Handles (SurfaceKHR(..))
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkCreateScreenSurfaceQNX
:: FunPtr (Ptr Instance_T -> Ptr ScreenSurfaceCreateInfoQNX -> Ptr AllocationCallbacks -> Ptr SurfaceKHR -> IO Result) -> Ptr Instance_T -> Ptr ScreenSurfaceCreateInfoQNX -> Ptr AllocationCallbacks -> Ptr SurfaceKHR -> IO Result
createScreenSurfaceQNX :: forall io
. (MonadIO io)
=>
Instance
->
ScreenSurfaceCreateInfoQNX
->
("allocator" ::: Maybe AllocationCallbacks)
-> io (SurfaceKHR)
createScreenSurfaceQNX :: forall (io :: * -> *).
MonadIO io =>
Instance
-> ScreenSurfaceCreateInfoQNX
-> ("allocator" ::: Maybe AllocationCallbacks)
-> io SurfaceKHR
createScreenSurfaceQNX Instance
instance' ScreenSurfaceCreateInfoQNX
createInfo "allocator" ::: Maybe AllocationCallbacks
allocator = 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 vkCreateScreenSurfaceQNXPtr :: FunPtr
(Ptr Instance_T
-> ("pCreateInfo" ::: Ptr ScreenSurfaceCreateInfoQNX)
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pSurface" ::: Ptr SurfaceKHR)
-> IO Result)
vkCreateScreenSurfaceQNXPtr = InstanceCmds
-> FunPtr
(Ptr Instance_T
-> ("pCreateInfo" ::: Ptr ScreenSurfaceCreateInfoQNX)
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pSurface" ::: Ptr SurfaceKHR)
-> IO Result)
pVkCreateScreenSurfaceQNX (case Instance
instance' of Instance{InstanceCmds
$sel:instanceCmds:Instance :: Instance -> 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 Instance_T
-> ("pCreateInfo" ::: Ptr ScreenSurfaceCreateInfoQNX)
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pSurface" ::: Ptr SurfaceKHR)
-> IO Result)
vkCreateScreenSurfaceQNXPtr 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 vkCreateScreenSurfaceQNX is null" forall a. Maybe a
Nothing forall a. Maybe a
Nothing
let vkCreateScreenSurfaceQNX' :: Ptr Instance_T
-> ("pCreateInfo" ::: Ptr ScreenSurfaceCreateInfoQNX)
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pSurface" ::: Ptr SurfaceKHR)
-> IO Result
vkCreateScreenSurfaceQNX' = FunPtr
(Ptr Instance_T
-> ("pCreateInfo" ::: Ptr ScreenSurfaceCreateInfoQNX)
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pSurface" ::: Ptr SurfaceKHR)
-> IO Result)
-> Ptr Instance_T
-> ("pCreateInfo" ::: Ptr ScreenSurfaceCreateInfoQNX)
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pSurface" ::: Ptr SurfaceKHR)
-> IO Result
mkVkCreateScreenSurfaceQNX FunPtr
(Ptr Instance_T
-> ("pCreateInfo" ::: Ptr ScreenSurfaceCreateInfoQNX)
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pSurface" ::: Ptr SurfaceKHR)
-> IO Result)
vkCreateScreenSurfaceQNXPtr
"pCreateInfo" ::: Ptr ScreenSurfaceCreateInfoQNX
pCreateInfo <- 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 (ScreenSurfaceCreateInfoQNX
createInfo)
"pAllocator" ::: Ptr AllocationCallbacks
pAllocator <- case ("allocator" ::: Maybe AllocationCallbacks
allocator) of
"allocator" ::: Maybe AllocationCallbacks
Nothing -> forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a. Ptr a
nullPtr
Just AllocationCallbacks
j -> 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 (AllocationCallbacks
j)
"pSurface" ::: Ptr SurfaceKHR
pPSurface <- 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 @SurfaceKHR Int
8) 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
"vkCreateScreenSurfaceQNX" (Ptr Instance_T
-> ("pCreateInfo" ::: Ptr ScreenSurfaceCreateInfoQNX)
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pSurface" ::: Ptr SurfaceKHR)
-> IO Result
vkCreateScreenSurfaceQNX'
(Instance -> Ptr Instance_T
instanceHandle (Instance
instance'))
"pCreateInfo" ::: Ptr ScreenSurfaceCreateInfoQNX
pCreateInfo
"pAllocator" ::: Ptr AllocationCallbacks
pAllocator
("pSurface" ::: Ptr SurfaceKHR
pPSurface))
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))
SurfaceKHR
pSurface <- 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 @SurfaceKHR "pSurface" ::: Ptr SurfaceKHR
pPSurface
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ (SurfaceKHR
pSurface)
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkGetPhysicalDeviceScreenPresentationSupportQNX
:: FunPtr (Ptr PhysicalDevice_T -> Word32 -> Ptr Screen_window -> IO Bool32) -> Ptr PhysicalDevice_T -> Word32 -> Ptr Screen_window -> IO Bool32
getPhysicalDeviceScreenPresentationSupportQNX :: forall io
. (MonadIO io)
=>
PhysicalDevice
->
("queueFamilyIndex" ::: Word32)
->
(Ptr Screen_window)
-> io (Bool)
getPhysicalDeviceScreenPresentationSupportQNX :: forall (io :: * -> *).
MonadIO io =>
PhysicalDevice
-> ("queueFamilyIndex" ::: Word32) -> Ptr Screen_window -> io Bool
getPhysicalDeviceScreenPresentationSupportQNX PhysicalDevice
physicalDevice
"queueFamilyIndex" ::: Word32
queueFamilyIndex
Ptr Screen_window
window = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
let vkGetPhysicalDeviceScreenPresentationSupportQNXPtr :: FunPtr
(Ptr PhysicalDevice_T
-> ("queueFamilyIndex" ::: Word32)
-> Ptr Screen_window
-> IO Bool32)
vkGetPhysicalDeviceScreenPresentationSupportQNXPtr = InstanceCmds
-> FunPtr
(Ptr PhysicalDevice_T
-> ("queueFamilyIndex" ::: Word32)
-> Ptr Screen_window
-> IO Bool32)
pVkGetPhysicalDeviceScreenPresentationSupportQNX (case PhysicalDevice
physicalDevice of PhysicalDevice{InstanceCmds
$sel:instanceCmds:PhysicalDevice :: PhysicalDevice -> InstanceCmds
instanceCmds :: InstanceCmds
instanceCmds} -> InstanceCmds
instanceCmds)
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr PhysicalDevice_T
-> ("queueFamilyIndex" ::: Word32)
-> Ptr Screen_window
-> IO Bool32)
vkGetPhysicalDeviceScreenPresentationSupportQNXPtr 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 vkGetPhysicalDeviceScreenPresentationSupportQNX is null" forall a. Maybe a
Nothing forall a. Maybe a
Nothing
let vkGetPhysicalDeviceScreenPresentationSupportQNX' :: Ptr PhysicalDevice_T
-> ("queueFamilyIndex" ::: Word32)
-> Ptr Screen_window
-> IO Bool32
vkGetPhysicalDeviceScreenPresentationSupportQNX' = FunPtr
(Ptr PhysicalDevice_T
-> ("queueFamilyIndex" ::: Word32)
-> Ptr Screen_window
-> IO Bool32)
-> Ptr PhysicalDevice_T
-> ("queueFamilyIndex" ::: Word32)
-> Ptr Screen_window
-> IO Bool32
mkVkGetPhysicalDeviceScreenPresentationSupportQNX FunPtr
(Ptr PhysicalDevice_T
-> ("queueFamilyIndex" ::: Word32)
-> Ptr Screen_window
-> IO Bool32)
vkGetPhysicalDeviceScreenPresentationSupportQNXPtr
Bool32
r <- forall a. String -> IO a -> IO a
traceAroundEvent String
"vkGetPhysicalDeviceScreenPresentationSupportQNX" (Ptr PhysicalDevice_T
-> ("queueFamilyIndex" ::: Word32)
-> Ptr Screen_window
-> IO Bool32
vkGetPhysicalDeviceScreenPresentationSupportQNX'
(PhysicalDevice -> Ptr PhysicalDevice_T
physicalDeviceHandle (PhysicalDevice
physicalDevice))
("queueFamilyIndex" ::: Word32
queueFamilyIndex)
(Ptr Screen_window
window))
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ ((Bool32 -> Bool
bool32ToBool Bool32
r))
data ScreenSurfaceCreateInfoQNX = ScreenSurfaceCreateInfoQNX
{
ScreenSurfaceCreateInfoQNX -> ScreenSurfaceCreateFlagsQNX
flags :: ScreenSurfaceCreateFlagsQNX
,
ScreenSurfaceCreateInfoQNX -> Ptr Screen_context
context :: Ptr Screen_context
,
ScreenSurfaceCreateInfoQNX -> Ptr Screen_window
window :: Ptr Screen_window
}
deriving (Typeable, ScreenSurfaceCreateInfoQNX -> ScreenSurfaceCreateInfoQNX -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ScreenSurfaceCreateInfoQNX -> ScreenSurfaceCreateInfoQNX -> Bool
$c/= :: ScreenSurfaceCreateInfoQNX -> ScreenSurfaceCreateInfoQNX -> Bool
== :: ScreenSurfaceCreateInfoQNX -> ScreenSurfaceCreateInfoQNX -> Bool
$c== :: ScreenSurfaceCreateInfoQNX -> ScreenSurfaceCreateInfoQNX -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (ScreenSurfaceCreateInfoQNX)
#endif
deriving instance Show ScreenSurfaceCreateInfoQNX
instance ToCStruct ScreenSurfaceCreateInfoQNX where
withCStruct :: forall b.
ScreenSurfaceCreateInfoQNX
-> (("pCreateInfo" ::: Ptr ScreenSurfaceCreateInfoQNX) -> IO b)
-> IO b
withCStruct ScreenSurfaceCreateInfoQNX
x ("pCreateInfo" ::: Ptr ScreenSurfaceCreateInfoQNX) -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
40 forall a b. (a -> b) -> a -> b
$ \"pCreateInfo" ::: Ptr ScreenSurfaceCreateInfoQNX
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pCreateInfo" ::: Ptr ScreenSurfaceCreateInfoQNX
p ScreenSurfaceCreateInfoQNX
x (("pCreateInfo" ::: Ptr ScreenSurfaceCreateInfoQNX) -> IO b
f "pCreateInfo" ::: Ptr ScreenSurfaceCreateInfoQNX
p)
pokeCStruct :: forall b.
("pCreateInfo" ::: Ptr ScreenSurfaceCreateInfoQNX)
-> ScreenSurfaceCreateInfoQNX -> IO b -> IO b
pokeCStruct "pCreateInfo" ::: Ptr ScreenSurfaceCreateInfoQNX
p ScreenSurfaceCreateInfoQNX{Ptr Screen_window
Ptr Screen_context
ScreenSurfaceCreateFlagsQNX
window :: Ptr Screen_window
context :: Ptr Screen_context
flags :: ScreenSurfaceCreateFlagsQNX
$sel:window:ScreenSurfaceCreateInfoQNX :: ScreenSurfaceCreateInfoQNX -> Ptr Screen_window
$sel:context:ScreenSurfaceCreateInfoQNX :: ScreenSurfaceCreateInfoQNX -> Ptr Screen_context
$sel:flags:ScreenSurfaceCreateInfoQNX :: ScreenSurfaceCreateInfoQNX -> ScreenSurfaceCreateFlagsQNX
..} IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCreateInfo" ::: Ptr ScreenSurfaceCreateInfoQNX
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_SCREEN_SURFACE_CREATE_INFO_QNX)
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCreateInfo" ::: Ptr ScreenSurfaceCreateInfoQNX
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 (("pCreateInfo" ::: Ptr ScreenSurfaceCreateInfoQNX
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr ScreenSurfaceCreateFlagsQNX)) (ScreenSurfaceCreateFlagsQNX
flags)
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCreateInfo" ::: Ptr ScreenSurfaceCreateInfoQNX
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr (Ptr Screen_context))) (Ptr Screen_context
context)
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCreateInfo" ::: Ptr ScreenSurfaceCreateInfoQNX
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr (Ptr Screen_window))) (Ptr Screen_window
window)
IO b
f
cStructSize :: Int
cStructSize = Int
40
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b.
("pCreateInfo" ::: Ptr ScreenSurfaceCreateInfoQNX) -> IO b -> IO b
pokeZeroCStruct "pCreateInfo" ::: Ptr ScreenSurfaceCreateInfoQNX
p IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCreateInfo" ::: Ptr ScreenSurfaceCreateInfoQNX
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_SCREEN_SURFACE_CREATE_INFO_QNX)
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCreateInfo" ::: Ptr ScreenSurfaceCreateInfoQNX
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 (("pCreateInfo" ::: Ptr ScreenSurfaceCreateInfoQNX
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr (Ptr Screen_context))) (forall a. Zero a => a
zero)
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCreateInfo" ::: Ptr ScreenSurfaceCreateInfoQNX
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr (Ptr Screen_window))) (forall a. Zero a => a
zero)
IO b
f
instance FromCStruct ScreenSurfaceCreateInfoQNX where
peekCStruct :: ("pCreateInfo" ::: Ptr ScreenSurfaceCreateInfoQNX)
-> IO ScreenSurfaceCreateInfoQNX
peekCStruct "pCreateInfo" ::: Ptr ScreenSurfaceCreateInfoQNX
p = do
ScreenSurfaceCreateFlagsQNX
flags <- forall a. Storable a => Ptr a -> IO a
peek @ScreenSurfaceCreateFlagsQNX (("pCreateInfo" ::: Ptr ScreenSurfaceCreateInfoQNX
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr ScreenSurfaceCreateFlagsQNX))
Ptr Screen_context
context <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr Screen_context) (("pCreateInfo" ::: Ptr ScreenSurfaceCreateInfoQNX
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr (Ptr Screen_context)))
Ptr Screen_window
window <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr Screen_window) (("pCreateInfo" ::: Ptr ScreenSurfaceCreateInfoQNX
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr (Ptr Screen_window)))
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ ScreenSurfaceCreateFlagsQNX
-> Ptr Screen_context
-> Ptr Screen_window
-> ScreenSurfaceCreateInfoQNX
ScreenSurfaceCreateInfoQNX
ScreenSurfaceCreateFlagsQNX
flags Ptr Screen_context
context Ptr Screen_window
window
instance Storable ScreenSurfaceCreateInfoQNX where
sizeOf :: ScreenSurfaceCreateInfoQNX -> Int
sizeOf ~ScreenSurfaceCreateInfoQNX
_ = Int
40
alignment :: ScreenSurfaceCreateInfoQNX -> Int
alignment ~ScreenSurfaceCreateInfoQNX
_ = Int
8
peek :: ("pCreateInfo" ::: Ptr ScreenSurfaceCreateInfoQNX)
-> IO ScreenSurfaceCreateInfoQNX
peek = forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: ("pCreateInfo" ::: Ptr ScreenSurfaceCreateInfoQNX)
-> ScreenSurfaceCreateInfoQNX -> IO ()
poke "pCreateInfo" ::: Ptr ScreenSurfaceCreateInfoQNX
ptr ScreenSurfaceCreateInfoQNX
poked = forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pCreateInfo" ::: Ptr ScreenSurfaceCreateInfoQNX
ptr ScreenSurfaceCreateInfoQNX
poked (forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero ScreenSurfaceCreateInfoQNX where
zero :: ScreenSurfaceCreateInfoQNX
zero = ScreenSurfaceCreateFlagsQNX
-> Ptr Screen_context
-> Ptr Screen_window
-> ScreenSurfaceCreateInfoQNX
ScreenSurfaceCreateInfoQNX
forall a. Zero a => a
zero
forall a. Zero a => a
zero
forall a. Zero a => a
zero
newtype ScreenSurfaceCreateFlagsQNX = ScreenSurfaceCreateFlagsQNX Flags
deriving newtype (ScreenSurfaceCreateFlagsQNX -> ScreenSurfaceCreateFlagsQNX -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ScreenSurfaceCreateFlagsQNX -> ScreenSurfaceCreateFlagsQNX -> Bool
$c/= :: ScreenSurfaceCreateFlagsQNX -> ScreenSurfaceCreateFlagsQNX -> Bool
== :: ScreenSurfaceCreateFlagsQNX -> ScreenSurfaceCreateFlagsQNX -> Bool
$c== :: ScreenSurfaceCreateFlagsQNX -> ScreenSurfaceCreateFlagsQNX -> Bool
Eq, Eq ScreenSurfaceCreateFlagsQNX
ScreenSurfaceCreateFlagsQNX -> ScreenSurfaceCreateFlagsQNX -> Bool
ScreenSurfaceCreateFlagsQNX
-> ScreenSurfaceCreateFlagsQNX -> Ordering
ScreenSurfaceCreateFlagsQNX
-> ScreenSurfaceCreateFlagsQNX -> ScreenSurfaceCreateFlagsQNX
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 :: ScreenSurfaceCreateFlagsQNX
-> ScreenSurfaceCreateFlagsQNX -> ScreenSurfaceCreateFlagsQNX
$cmin :: ScreenSurfaceCreateFlagsQNX
-> ScreenSurfaceCreateFlagsQNX -> ScreenSurfaceCreateFlagsQNX
max :: ScreenSurfaceCreateFlagsQNX
-> ScreenSurfaceCreateFlagsQNX -> ScreenSurfaceCreateFlagsQNX
$cmax :: ScreenSurfaceCreateFlagsQNX
-> ScreenSurfaceCreateFlagsQNX -> ScreenSurfaceCreateFlagsQNX
>= :: ScreenSurfaceCreateFlagsQNX -> ScreenSurfaceCreateFlagsQNX -> Bool
$c>= :: ScreenSurfaceCreateFlagsQNX -> ScreenSurfaceCreateFlagsQNX -> Bool
> :: ScreenSurfaceCreateFlagsQNX -> ScreenSurfaceCreateFlagsQNX -> Bool
$c> :: ScreenSurfaceCreateFlagsQNX -> ScreenSurfaceCreateFlagsQNX -> Bool
<= :: ScreenSurfaceCreateFlagsQNX -> ScreenSurfaceCreateFlagsQNX -> Bool
$c<= :: ScreenSurfaceCreateFlagsQNX -> ScreenSurfaceCreateFlagsQNX -> Bool
< :: ScreenSurfaceCreateFlagsQNX -> ScreenSurfaceCreateFlagsQNX -> Bool
$c< :: ScreenSurfaceCreateFlagsQNX -> ScreenSurfaceCreateFlagsQNX -> Bool
compare :: ScreenSurfaceCreateFlagsQNX
-> ScreenSurfaceCreateFlagsQNX -> Ordering
$ccompare :: ScreenSurfaceCreateFlagsQNX
-> ScreenSurfaceCreateFlagsQNX -> Ordering
Ord, Ptr ScreenSurfaceCreateFlagsQNX -> IO ScreenSurfaceCreateFlagsQNX
Ptr ScreenSurfaceCreateFlagsQNX
-> Int -> IO ScreenSurfaceCreateFlagsQNX
Ptr ScreenSurfaceCreateFlagsQNX
-> Int -> ScreenSurfaceCreateFlagsQNX -> IO ()
Ptr ScreenSurfaceCreateFlagsQNX
-> ScreenSurfaceCreateFlagsQNX -> IO ()
ScreenSurfaceCreateFlagsQNX -> Int
forall b. Ptr b -> Int -> IO ScreenSurfaceCreateFlagsQNX
forall b. Ptr b -> Int -> ScreenSurfaceCreateFlagsQNX -> 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 ScreenSurfaceCreateFlagsQNX
-> ScreenSurfaceCreateFlagsQNX -> IO ()
$cpoke :: Ptr ScreenSurfaceCreateFlagsQNX
-> ScreenSurfaceCreateFlagsQNX -> IO ()
peek :: Ptr ScreenSurfaceCreateFlagsQNX -> IO ScreenSurfaceCreateFlagsQNX
$cpeek :: Ptr ScreenSurfaceCreateFlagsQNX -> IO ScreenSurfaceCreateFlagsQNX
pokeByteOff :: forall b. Ptr b -> Int -> ScreenSurfaceCreateFlagsQNX -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> ScreenSurfaceCreateFlagsQNX -> IO ()
peekByteOff :: forall b. Ptr b -> Int -> IO ScreenSurfaceCreateFlagsQNX
$cpeekByteOff :: forall b. Ptr b -> Int -> IO ScreenSurfaceCreateFlagsQNX
pokeElemOff :: Ptr ScreenSurfaceCreateFlagsQNX
-> Int -> ScreenSurfaceCreateFlagsQNX -> IO ()
$cpokeElemOff :: Ptr ScreenSurfaceCreateFlagsQNX
-> Int -> ScreenSurfaceCreateFlagsQNX -> IO ()
peekElemOff :: Ptr ScreenSurfaceCreateFlagsQNX
-> Int -> IO ScreenSurfaceCreateFlagsQNX
$cpeekElemOff :: Ptr ScreenSurfaceCreateFlagsQNX
-> Int -> IO ScreenSurfaceCreateFlagsQNX
alignment :: ScreenSurfaceCreateFlagsQNX -> Int
$calignment :: ScreenSurfaceCreateFlagsQNX -> Int
sizeOf :: ScreenSurfaceCreateFlagsQNX -> Int
$csizeOf :: ScreenSurfaceCreateFlagsQNX -> Int
Storable, ScreenSurfaceCreateFlagsQNX
forall a. a -> Zero a
zero :: ScreenSurfaceCreateFlagsQNX
$czero :: ScreenSurfaceCreateFlagsQNX
Zero, Eq ScreenSurfaceCreateFlagsQNX
ScreenSurfaceCreateFlagsQNX
Int -> ScreenSurfaceCreateFlagsQNX
ScreenSurfaceCreateFlagsQNX -> Bool
ScreenSurfaceCreateFlagsQNX -> Int
ScreenSurfaceCreateFlagsQNX -> Maybe Int
ScreenSurfaceCreateFlagsQNX -> ScreenSurfaceCreateFlagsQNX
ScreenSurfaceCreateFlagsQNX -> Int -> Bool
ScreenSurfaceCreateFlagsQNX -> Int -> ScreenSurfaceCreateFlagsQNX
ScreenSurfaceCreateFlagsQNX
-> ScreenSurfaceCreateFlagsQNX -> ScreenSurfaceCreateFlagsQNX
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 :: ScreenSurfaceCreateFlagsQNX -> Int
$cpopCount :: ScreenSurfaceCreateFlagsQNX -> Int
rotateR :: ScreenSurfaceCreateFlagsQNX -> Int -> ScreenSurfaceCreateFlagsQNX
$crotateR :: ScreenSurfaceCreateFlagsQNX -> Int -> ScreenSurfaceCreateFlagsQNX
rotateL :: ScreenSurfaceCreateFlagsQNX -> Int -> ScreenSurfaceCreateFlagsQNX
$crotateL :: ScreenSurfaceCreateFlagsQNX -> Int -> ScreenSurfaceCreateFlagsQNX
unsafeShiftR :: ScreenSurfaceCreateFlagsQNX -> Int -> ScreenSurfaceCreateFlagsQNX
$cunsafeShiftR :: ScreenSurfaceCreateFlagsQNX -> Int -> ScreenSurfaceCreateFlagsQNX
shiftR :: ScreenSurfaceCreateFlagsQNX -> Int -> ScreenSurfaceCreateFlagsQNX
$cshiftR :: ScreenSurfaceCreateFlagsQNX -> Int -> ScreenSurfaceCreateFlagsQNX
unsafeShiftL :: ScreenSurfaceCreateFlagsQNX -> Int -> ScreenSurfaceCreateFlagsQNX
$cunsafeShiftL :: ScreenSurfaceCreateFlagsQNX -> Int -> ScreenSurfaceCreateFlagsQNX
shiftL :: ScreenSurfaceCreateFlagsQNX -> Int -> ScreenSurfaceCreateFlagsQNX
$cshiftL :: ScreenSurfaceCreateFlagsQNX -> Int -> ScreenSurfaceCreateFlagsQNX
isSigned :: ScreenSurfaceCreateFlagsQNX -> Bool
$cisSigned :: ScreenSurfaceCreateFlagsQNX -> Bool
bitSize :: ScreenSurfaceCreateFlagsQNX -> Int
$cbitSize :: ScreenSurfaceCreateFlagsQNX -> Int
bitSizeMaybe :: ScreenSurfaceCreateFlagsQNX -> Maybe Int
$cbitSizeMaybe :: ScreenSurfaceCreateFlagsQNX -> Maybe Int
testBit :: ScreenSurfaceCreateFlagsQNX -> Int -> Bool
$ctestBit :: ScreenSurfaceCreateFlagsQNX -> Int -> Bool
complementBit :: ScreenSurfaceCreateFlagsQNX -> Int -> ScreenSurfaceCreateFlagsQNX
$ccomplementBit :: ScreenSurfaceCreateFlagsQNX -> Int -> ScreenSurfaceCreateFlagsQNX
clearBit :: ScreenSurfaceCreateFlagsQNX -> Int -> ScreenSurfaceCreateFlagsQNX
$cclearBit :: ScreenSurfaceCreateFlagsQNX -> Int -> ScreenSurfaceCreateFlagsQNX
setBit :: ScreenSurfaceCreateFlagsQNX -> Int -> ScreenSurfaceCreateFlagsQNX
$csetBit :: ScreenSurfaceCreateFlagsQNX -> Int -> ScreenSurfaceCreateFlagsQNX
bit :: Int -> ScreenSurfaceCreateFlagsQNX
$cbit :: Int -> ScreenSurfaceCreateFlagsQNX
zeroBits :: ScreenSurfaceCreateFlagsQNX
$czeroBits :: ScreenSurfaceCreateFlagsQNX
rotate :: ScreenSurfaceCreateFlagsQNX -> Int -> ScreenSurfaceCreateFlagsQNX
$crotate :: ScreenSurfaceCreateFlagsQNX -> Int -> ScreenSurfaceCreateFlagsQNX
shift :: ScreenSurfaceCreateFlagsQNX -> Int -> ScreenSurfaceCreateFlagsQNX
$cshift :: ScreenSurfaceCreateFlagsQNX -> Int -> ScreenSurfaceCreateFlagsQNX
complement :: ScreenSurfaceCreateFlagsQNX -> ScreenSurfaceCreateFlagsQNX
$ccomplement :: ScreenSurfaceCreateFlagsQNX -> ScreenSurfaceCreateFlagsQNX
xor :: ScreenSurfaceCreateFlagsQNX
-> ScreenSurfaceCreateFlagsQNX -> ScreenSurfaceCreateFlagsQNX
$cxor :: ScreenSurfaceCreateFlagsQNX
-> ScreenSurfaceCreateFlagsQNX -> ScreenSurfaceCreateFlagsQNX
.|. :: ScreenSurfaceCreateFlagsQNX
-> ScreenSurfaceCreateFlagsQNX -> ScreenSurfaceCreateFlagsQNX
$c.|. :: ScreenSurfaceCreateFlagsQNX
-> ScreenSurfaceCreateFlagsQNX -> ScreenSurfaceCreateFlagsQNX
.&. :: ScreenSurfaceCreateFlagsQNX
-> ScreenSurfaceCreateFlagsQNX -> ScreenSurfaceCreateFlagsQNX
$c.&. :: ScreenSurfaceCreateFlagsQNX
-> ScreenSurfaceCreateFlagsQNX -> ScreenSurfaceCreateFlagsQNX
Bits, Bits ScreenSurfaceCreateFlagsQNX
ScreenSurfaceCreateFlagsQNX -> Int
forall b.
Bits b -> (b -> Int) -> (b -> Int) -> (b -> Int) -> FiniteBits b
countTrailingZeros :: ScreenSurfaceCreateFlagsQNX -> Int
$ccountTrailingZeros :: ScreenSurfaceCreateFlagsQNX -> Int
countLeadingZeros :: ScreenSurfaceCreateFlagsQNX -> Int
$ccountLeadingZeros :: ScreenSurfaceCreateFlagsQNX -> Int
finiteBitSize :: ScreenSurfaceCreateFlagsQNX -> Int
$cfiniteBitSize :: ScreenSurfaceCreateFlagsQNX -> Int
FiniteBits)
conNameScreenSurfaceCreateFlagsQNX :: String
conNameScreenSurfaceCreateFlagsQNX :: String
conNameScreenSurfaceCreateFlagsQNX = String
"ScreenSurfaceCreateFlagsQNX"
enumPrefixScreenSurfaceCreateFlagsQNX :: String
enumPrefixScreenSurfaceCreateFlagsQNX :: String
enumPrefixScreenSurfaceCreateFlagsQNX = String
""
showTableScreenSurfaceCreateFlagsQNX :: [(ScreenSurfaceCreateFlagsQNX, String)]
showTableScreenSurfaceCreateFlagsQNX :: [(ScreenSurfaceCreateFlagsQNX, String)]
showTableScreenSurfaceCreateFlagsQNX = []
instance Show ScreenSurfaceCreateFlagsQNX where
showsPrec :: Int -> ScreenSurfaceCreateFlagsQNX -> ShowS
showsPrec =
forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec
String
enumPrefixScreenSurfaceCreateFlagsQNX
[(ScreenSurfaceCreateFlagsQNX, String)]
showTableScreenSurfaceCreateFlagsQNX
String
conNameScreenSurfaceCreateFlagsQNX
(\(ScreenSurfaceCreateFlagsQNX "queueFamilyIndex" ::: Word32
x) -> "queueFamilyIndex" ::: Word32
x)
(\"queueFamilyIndex" ::: Word32
x -> String -> ShowS
showString String
"0x" forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. (Integral a, Show a) => a -> ShowS
showHex "queueFamilyIndex" ::: Word32
x)
instance Read ScreenSurfaceCreateFlagsQNX where
readPrec :: ReadPrec ScreenSurfaceCreateFlagsQNX
readPrec =
forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec
String
enumPrefixScreenSurfaceCreateFlagsQNX
[(ScreenSurfaceCreateFlagsQNX, String)]
showTableScreenSurfaceCreateFlagsQNX
String
conNameScreenSurfaceCreateFlagsQNX
("queueFamilyIndex" ::: Word32) -> ScreenSurfaceCreateFlagsQNX
ScreenSurfaceCreateFlagsQNX
type QNX_SCREEN_SURFACE_SPEC_VERSION = 1
pattern QNX_SCREEN_SURFACE_SPEC_VERSION :: forall a . Integral a => a
pattern $bQNX_SCREEN_SURFACE_SPEC_VERSION :: forall a. Integral a => a
$mQNX_SCREEN_SURFACE_SPEC_VERSION :: forall {r} {a}.
Integral a =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
QNX_SCREEN_SURFACE_SPEC_VERSION = 1
type QNX_SCREEN_SURFACE_EXTENSION_NAME = "VK_QNX_screen_surface"
pattern QNX_SCREEN_SURFACE_EXTENSION_NAME :: forall a . (Eq a, IsString a) => a
pattern $bQNX_SCREEN_SURFACE_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a
$mQNX_SCREEN_SURFACE_EXTENSION_NAME :: forall {r} {a}.
(Eq a, IsString a) =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
QNX_SCREEN_SURFACE_EXTENSION_NAME = "VK_QNX_screen_surface"
data Screen_window
data Screen_context