{-# language CPP #-}
-- | = Name
--
-- VK_QNX_screen_surface - instance extension
--
-- == VK_QNX_screen_surface
--
-- [__Name String__]
--     @VK_QNX_screen_surface@
--
-- [__Extension Type__]
--     Instance extension
--
-- [__Registered Extension Number__]
--     379
--
-- [__Revision__]
--     1
--
-- [__Ratification Status__]
--     Not ratified
--
-- [__Extension and Version Dependencies__]
--     <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_KHR_surface VK_KHR_surface>
--
-- [__Contact__]
--
--     -   Mike Gorchak
--         <https://github.com/KhronosGroup/Vulkan-Docs/issues/new?body=[VK_QNX_screen_surface] @mgorchak-blackberry%0A*Here describe the issue or question you have about the VK_QNX_screen_surface extension* >
--
-- == Other Extension Metadata
--
-- [__Last Modified Date__]
--     2021-01-11
--
-- [__IP Status__]
--     No known IP claims.
--
-- [__Contributors__]
--
--     -   Mike Gorchak, BlackBerry Limited
--
-- == Description
--
-- The @VK_QNX_screen_surface@ extension is an instance extension. It
-- provides a mechanism to create a 'Vulkan.Extensions.Handles.SurfaceKHR'
-- object (defined by the @VK_KHR_surface@ extension) that refers to a QNX
-- Screen @window@, as well as a query to determine support for rendering
-- to a QNX Screen compositor.
--
-- == New Commands
--
-- -   'createScreenSurfaceQNX'
--
-- -   'getPhysicalDeviceScreenPresentationSupportQNX'
--
-- == New Structures
--
-- -   'ScreenSurfaceCreateInfoQNX'
--
-- == New Bitmasks
--
-- -   'ScreenSurfaceCreateFlagsQNX'
--
-- == New Enum Constants
--
-- -   'QNX_SCREEN_SURFACE_EXTENSION_NAME'
--
-- -   'QNX_SCREEN_SURFACE_SPEC_VERSION'
--
-- -   Extending 'Vulkan.Core10.Enums.StructureType.StructureType':
--
--     -   'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_SCREEN_SURFACE_CREATE_INFO_QNX'
--
-- == Version History
--
-- -   Revision 1, 2021-01-11 (Mike Gorchak)
--
--     -   Initial draft.
--
-- == See Also
--
-- 'ScreenSurfaceCreateFlagsQNX', 'ScreenSurfaceCreateInfoQNX',
-- 'createScreenSurfaceQNX',
-- 'getPhysicalDeviceScreenPresentationSupportQNX'
--
-- == Document Notes
--
-- For more information, see the
-- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#VK_QNX_screen_surface Vulkan Specification>
--
-- This page is a generated document. Fixes and changes should be made to
-- the generator scripts, not directly.
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

-- | vkCreateScreenSurfaceQNX - Create a
-- 'Vulkan.Extensions.Handles.SurfaceKHR' object for a QNX Screen window
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-vkCreateScreenSurfaceQNX-instance-parameter# @instance@ /must/
--     be a valid 'Vulkan.Core10.Handles.Instance' handle
--
-- -   #VUID-vkCreateScreenSurfaceQNX-pCreateInfo-parameter# @pCreateInfo@
--     /must/ be a valid pointer to a valid 'ScreenSurfaceCreateInfoQNX'
--     structure
--
-- -   #VUID-vkCreateScreenSurfaceQNX-pAllocator-parameter# If @pAllocator@
--     is not @NULL@, @pAllocator@ /must/ be a valid pointer to a valid
--     'Vulkan.Core10.AllocationCallbacks.AllocationCallbacks' structure
--
-- -   #VUID-vkCreateScreenSurfaceQNX-pSurface-parameter# @pSurface@ /must/
--     be a valid pointer to a 'Vulkan.Extensions.Handles.SurfaceKHR'
--     handle
--
-- == Return Codes
--
-- [<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#fundamentals-successcodes Success>]
--
--     -   'Vulkan.Core10.Enums.Result.SUCCESS'
--
-- [<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#fundamentals-errorcodes Failure>]
--
--     -   'Vulkan.Core10.Enums.Result.ERROR_OUT_OF_HOST_MEMORY'
--
--     -   'Vulkan.Core10.Enums.Result.ERROR_OUT_OF_DEVICE_MEMORY'
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_QNX_screen_surface VK_QNX_screen_surface>,
-- 'Vulkan.Core10.AllocationCallbacks.AllocationCallbacks',
-- 'Vulkan.Core10.Handles.Instance', 'ScreenSurfaceCreateInfoQNX',
-- 'Vulkan.Extensions.Handles.SurfaceKHR'
createScreenSurfaceQNX :: forall io
                        . (MonadIO io)
                       => -- | @instance@ is the instance to associate the surface with.
                          Instance
                       -> -- | @pCreateInfo@ is a pointer to a 'ScreenSurfaceCreateInfoQNX' structure
                          -- containing parameters affecting the creation of the surface object.
                          ScreenSurfaceCreateInfoQNX
                       -> -- | @pAllocator@ is the allocator used for host memory allocated for the
                          -- surface object when there is no more specific allocator available (see
                          -- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#memory-allocation Memory Allocation>).
                          ("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

-- | vkGetPhysicalDeviceScreenPresentationSupportQNX - Query physical device
-- for presentation to QNX Screen
--
-- = Description
--
-- This platform-specific function /can/ be called prior to creating a
-- surface.
--
-- == Valid Usage (Implicit)
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_QNX_screen_surface VK_QNX_screen_surface>,
-- 'Vulkan.Core10.Handles.PhysicalDevice'
getPhysicalDeviceScreenPresentationSupportQNX :: forall io
                                               . (MonadIO io)
                                              => -- | @physicalDevice@ is the physical device.
                                                 --
                                                 -- #VUID-vkGetPhysicalDeviceScreenPresentationSupportQNX-physicalDevice-parameter#
                                                 -- @physicalDevice@ /must/ be a valid
                                                 -- 'Vulkan.Core10.Handles.PhysicalDevice' handle
                                                 PhysicalDevice
                                              -> -- | @queueFamilyIndex@ is the queue family index.
                                                 --
                                                 -- #VUID-vkGetPhysicalDeviceScreenPresentationSupportQNX-queueFamilyIndex-04743#
                                                 -- @queueFamilyIndex@ /must/ be less than @pQueueFamilyPropertyCount@
                                                 -- returned by
                                                 -- 'Vulkan.Core10.DeviceInitialization.getPhysicalDeviceQueueFamilyProperties'
                                                 -- for the given @physicalDevice@
                                                 ("queueFamilyIndex" ::: Word32)
                                              -> -- | @window@ is the QNX Screen @window@ object.
                                                 --
                                                 -- #VUID-vkGetPhysicalDeviceScreenPresentationSupportQNX-window-parameter#
                                                 -- @window@ /must/ be a valid pointer to a 'Screen_window' value
                                                 (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))


-- | VkScreenSurfaceCreateInfoQNX - Structure specifying parameters of a
-- newly created QNX Screen surface object
--
-- == Valid Usage (Implicit)
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_QNX_screen_surface VK_QNX_screen_surface>,
-- 'ScreenSurfaceCreateFlagsQNX',
-- 'Vulkan.Core10.Enums.StructureType.StructureType',
-- 'createScreenSurfaceQNX'
data ScreenSurfaceCreateInfoQNX = ScreenSurfaceCreateInfoQNX
  { -- | @flags@ is reserved for future use.
    --
    -- #VUID-VkScreenSurfaceCreateInfoQNX-flags-zerobitmask# @flags@ /must/ be
    -- @0@
    ScreenSurfaceCreateInfoQNX -> ScreenSurfaceCreateFlagsQNX
flags :: ScreenSurfaceCreateFlagsQNX
  , -- | @context@ and @window@ are QNX Screen @context@ and @window@ to
    -- associate the surface with.
    --
    -- #VUID-VkScreenSurfaceCreateInfoQNX-context-04741# @context@ /must/ point
    -- to a valid QNX Screen @struct@ _screen_context
    ScreenSurfaceCreateInfoQNX -> Ptr Screen_context
context :: Ptr Screen_context
  , -- | #VUID-VkScreenSurfaceCreateInfoQNX-window-04742# @window@ /must/ point
    -- to a valid QNX Screen @struct@ _screen_window
    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


-- | VkScreenSurfaceCreateFlagsQNX - Reserved for future use
--
-- = Description
--
-- 'ScreenSurfaceCreateFlagsQNX' is a bitmask type for setting a mask, but
-- is currently reserved for future use.
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_QNX_screen_surface VK_QNX_screen_surface>,
-- 'ScreenSurfaceCreateInfoQNX'
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

-- No documentation found for TopLevel "VK_QNX_SCREEN_SURFACE_SPEC_VERSION"
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"

-- No documentation found for TopLevel "VK_QNX_SCREEN_SURFACE_EXTENSION_NAME"
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