{-# language CPP #-}
-- | = Name
--
-- VK_EXT_headless_surface - instance extension
--
-- == VK_EXT_headless_surface
--
-- [__Name String__]
--     @VK_EXT_headless_surface@
--
-- [__Extension Type__]
--     Instance extension
--
-- [__Registered Extension Number__]
--     257
--
-- [__Revision__]
--     1
--
-- [__Extension and Version Dependencies__]
--
--     -   Requires Vulkan 1.0
--
--     -   Requires @VK_KHR_surface@
--
-- [__Contact__]
--
--     -   Lisa Wu
--         <https://github.com/KhronosGroup/Vulkan-Docs/issues/new?title=VK_EXT_headless_surface:%20&body=@chengtianww%20 >
--
-- == Other Extension Metadata
--
-- [__Last Modified Date__]
--     2019-03-21
--
-- [__IP Status__]
--     No known IP claims.
--
-- [__Contributors__]
--
--     -   Ray Smith, Arm
--
-- == Description
--
-- The @VK_EXT_headless_surface@ extension is an instance extension. It
-- provides a mechanism to create 'Vulkan.Extensions.Handles.SurfaceKHR'
-- objects independently of any window system or display device. The
-- presentation operation for a swapchain created from a headless surface
-- is by default a no-op, resulting in no externally-visible result.
--
-- Because there is no real presentation target, future extensions can
-- layer on top of the headless surface to introduce arbitrary or
-- customisable sets of restrictions or features. These could include
-- features like saving to a file or restrictions to emulate a particular
-- presentation target.
--
-- This functionality is expected to be useful for application and driver
-- development because it allows any platform to expose an arbitrary or
-- customisable set of restrictions and features of a presentation engine.
-- This makes it a useful portable test target for applications targeting a
-- wide range of presentation engines where the actual target presentation
-- engines might be scarce, unavailable or otherwise undesirable or
-- inconvenient to use for general Vulkan application development.
--
-- == New Commands
--
-- -   'createHeadlessSurfaceEXT'
--
-- == New Structures
--
-- -   'HeadlessSurfaceCreateInfoEXT'
--
-- == New Bitmasks
--
-- -   'HeadlessSurfaceCreateFlagsEXT'
--
-- == New Enum Constants
--
-- -   'EXT_HEADLESS_SURFACE_EXTENSION_NAME'
--
-- -   'EXT_HEADLESS_SURFACE_SPEC_VERSION'
--
-- -   Extending 'Vulkan.Core10.Enums.StructureType.StructureType':
--
--     -   'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_HEADLESS_SURFACE_CREATE_INFO_EXT'
--
-- == Version History
--
-- -   Revision 1, 2019-03-21 (Ray Smith)
--
--     -   Initial draft
--
-- = See Also
--
-- 'HeadlessSurfaceCreateFlagsEXT', 'HeadlessSurfaceCreateInfoEXT',
-- 'createHeadlessSurfaceEXT'
--
-- = Document Notes
--
-- For more information, see the
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_EXT_headless_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_EXT_headless_surface  ( createHeadlessSurfaceEXT
                                                  , HeadlessSurfaceCreateInfoEXT(..)
                                                  , HeadlessSurfaceCreateFlagsEXT(..)
                                                  , EXT_HEADLESS_SURFACE_SPEC_VERSION
                                                  , pattern EXT_HEADLESS_SURFACE_SPEC_VERSION
                                                  , EXT_HEADLESS_SURFACE_EXTENSION_NAME
                                                  , pattern EXT_HEADLESS_SURFACE_EXTENSION_NAME
                                                  , SurfaceKHR(..)
                                                  ) where

import Vulkan.Internal.Utils (enumReadPrec)
import Vulkan.Internal.Utils (enumShowsPrec)
import Vulkan.Internal.Utils (traceAroundEvent)
import Control.Exception.Base (bracket)
import Control.Monad (unless)
import Control.Monad.IO.Class (liftIO)
import Foreign.Marshal.Alloc (allocaBytesAligned)
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 Control.Monad.IO.Class (MonadIO)
import Data.Bits (Bits)
import Data.Bits (FiniteBits)
import Data.String (IsString)
import Data.Typeable (Typeable)
import Foreign.Storable (Storable)
import Foreign.Storable (Storable(peek))
import Foreign.Storable (Storable(poke))
import qualified Foreign.Storable (Storable(..))
import GHC.Generics (Generic)
import GHC.IO.Exception (IOErrorType(..))
import GHC.IO.Exception (IOException(..))
import Foreign.Ptr (FunPtr)
import Foreign.Ptr (Ptr)
import GHC.Read (Read(readPrec))
import GHC.Show (Show(showsPrec))
import Data.Kind (Type)
import Control.Monad.Trans.Cont (ContT(..))
import Vulkan.NamedType ((:::))
import Vulkan.Core10.AllocationCallbacks (AllocationCallbacks)
import Vulkan.Core10.FundamentalTypes (Flags)
import Vulkan.CStruct (FromCStruct)
import Vulkan.CStruct (FromCStruct(..))
import Vulkan.Core10.Handles (Instance)
import Vulkan.Core10.Handles (Instance(..))
import Vulkan.Dynamic (InstanceCmds(pVkCreateHeadlessSurfaceEXT))
import Vulkan.Core10.Handles (Instance_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.CStruct (ToCStruct)
import Vulkan.CStruct (ToCStruct(..))
import Vulkan.Exception (VulkanException(..))
import Vulkan.Zero (Zero)
import Vulkan.Zero (Zero(..))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_HEADLESS_SURFACE_CREATE_INFO_EXT))
import Vulkan.Core10.Enums.Result (Result(SUCCESS))
import Vulkan.Extensions.Handles (SurfaceKHR(..))
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
  unsafe
#endif
  "dynamic" mkVkCreateHeadlessSurfaceEXT
  :: FunPtr (Ptr Instance_T -> Ptr HeadlessSurfaceCreateInfoEXT -> Ptr AllocationCallbacks -> Ptr SurfaceKHR -> IO Result) -> Ptr Instance_T -> Ptr HeadlessSurfaceCreateInfoEXT -> Ptr AllocationCallbacks -> Ptr SurfaceKHR -> IO Result

-- | vkCreateHeadlessSurfaceEXT - Create a headless
-- 'Vulkan.Extensions.Handles.SurfaceKHR' object
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-vkCreateHeadlessSurfaceEXT-instance-parameter# @instance@
--     /must/ be a valid 'Vulkan.Core10.Handles.Instance' handle
--
-- -   #VUID-vkCreateHeadlessSurfaceEXT-pCreateInfo-parameter#
--     @pCreateInfo@ /must/ be a valid pointer to a valid
--     'HeadlessSurfaceCreateInfoEXT' structure
--
-- -   #VUID-vkCreateHeadlessSurfaceEXT-pAllocator-parameter# If
--     @pAllocator@ is not @NULL@, @pAllocator@ /must/ be a valid pointer
--     to a valid 'Vulkan.Core10.AllocationCallbacks.AllocationCallbacks'
--     structure
--
-- -   #VUID-vkCreateHeadlessSurfaceEXT-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
--
-- 'Vulkan.Core10.AllocationCallbacks.AllocationCallbacks',
-- 'HeadlessSurfaceCreateInfoEXT', 'Vulkan.Core10.Handles.Instance',
-- 'Vulkan.Extensions.Handles.SurfaceKHR'
createHeadlessSurfaceEXT :: forall io
                          . (MonadIO io)
                         => -- | @instance@ is the instance to associate the surface with.
                            Instance
                         -> -- | @pCreateInfo@ is a pointer to a 'HeadlessSurfaceCreateInfoEXT' structure
                            -- containing parameters affecting the creation of the surface object.
                            HeadlessSurfaceCreateInfoEXT
                         -> -- | @pAllocator@ is the allocator used for host memory allocated for the
                            -- surface object when there is no more specific allocator available (see
                            -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#memory-allocation Memory Allocation>).
                            ("allocator" ::: Maybe AllocationCallbacks)
                         -> io (SurfaceKHR)
createHeadlessSurfaceEXT :: Instance
-> HeadlessSurfaceCreateInfoEXT
-> ("allocator" ::: Maybe AllocationCallbacks)
-> io SurfaceKHR
createHeadlessSurfaceEXT instance' :: Instance
instance' createInfo :: HeadlessSurfaceCreateInfoEXT
createInfo allocator :: "allocator" ::: Maybe AllocationCallbacks
allocator = IO SurfaceKHR -> io SurfaceKHR
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SurfaceKHR -> io SurfaceKHR)
-> (ContT SurfaceKHR IO SurfaceKHR -> IO SurfaceKHR)
-> ContT SurfaceKHR IO SurfaceKHR
-> io SurfaceKHR
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT SurfaceKHR IO SurfaceKHR -> IO SurfaceKHR
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT SurfaceKHR IO SurfaceKHR -> io SurfaceKHR)
-> ContT SurfaceKHR IO SurfaceKHR -> io SurfaceKHR
forall a b. (a -> b) -> a -> b
$ do
  let vkCreateHeadlessSurfaceEXTPtr :: FunPtr
  (Ptr Instance_T
   -> ("pCreateInfo" ::: Ptr HeadlessSurfaceCreateInfoEXT)
   -> ("pAllocator" ::: Ptr AllocationCallbacks)
   -> ("pSurface" ::: Ptr SurfaceKHR)
   -> IO Result)
vkCreateHeadlessSurfaceEXTPtr = InstanceCmds
-> FunPtr
     (Ptr Instance_T
      -> ("pCreateInfo" ::: Ptr HeadlessSurfaceCreateInfoEXT)
      -> ("pAllocator" ::: Ptr AllocationCallbacks)
      -> ("pSurface" ::: Ptr SurfaceKHR)
      -> IO Result)
pVkCreateHeadlessSurfaceEXT (Instance -> InstanceCmds
instanceCmds (Instance
instance' :: Instance))
  IO () -> ContT SurfaceKHR IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT SurfaceKHR IO ())
-> IO () -> ContT SurfaceKHR IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
  (Ptr Instance_T
   -> ("pCreateInfo" ::: Ptr HeadlessSurfaceCreateInfoEXT)
   -> ("pAllocator" ::: Ptr AllocationCallbacks)
   -> ("pSurface" ::: Ptr SurfaceKHR)
   -> IO Result)
vkCreateHeadlessSurfaceEXTPtr FunPtr
  (Ptr Instance_T
   -> ("pCreateInfo" ::: Ptr HeadlessSurfaceCreateInfoEXT)
   -> ("pAllocator" ::: Ptr AllocationCallbacks)
   -> ("pSurface" ::: Ptr SurfaceKHR)
   -> IO Result)
-> FunPtr
     (Ptr Instance_T
      -> ("pCreateInfo" ::: Ptr HeadlessSurfaceCreateInfoEXT)
      -> ("pAllocator" ::: Ptr AllocationCallbacks)
      -> ("pSurface" ::: Ptr SurfaceKHR)
      -> IO Result)
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
  (Ptr Instance_T
   -> ("pCreateInfo" ::: Ptr HeadlessSurfaceCreateInfoEXT)
   -> ("pAllocator" ::: Ptr AllocationCallbacks)
   -> ("pSurface" ::: Ptr SurfaceKHR)
   -> IO Result)
forall a. FunPtr a
nullFunPtr) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
    IOException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (IOException -> IO ()) -> IOException -> IO ()
forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError Maybe Handle
forall a. Maybe a
Nothing IOErrorType
InvalidArgument "" "The function pointer for vkCreateHeadlessSurfaceEXT is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
  let vkCreateHeadlessSurfaceEXT' :: Ptr Instance_T
-> ("pCreateInfo" ::: Ptr HeadlessSurfaceCreateInfoEXT)
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pSurface" ::: Ptr SurfaceKHR)
-> IO Result
vkCreateHeadlessSurfaceEXT' = FunPtr
  (Ptr Instance_T
   -> ("pCreateInfo" ::: Ptr HeadlessSurfaceCreateInfoEXT)
   -> ("pAllocator" ::: Ptr AllocationCallbacks)
   -> ("pSurface" ::: Ptr SurfaceKHR)
   -> IO Result)
-> Ptr Instance_T
-> ("pCreateInfo" ::: Ptr HeadlessSurfaceCreateInfoEXT)
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pSurface" ::: Ptr SurfaceKHR)
-> IO Result
mkVkCreateHeadlessSurfaceEXT FunPtr
  (Ptr Instance_T
   -> ("pCreateInfo" ::: Ptr HeadlessSurfaceCreateInfoEXT)
   -> ("pAllocator" ::: Ptr AllocationCallbacks)
   -> ("pSurface" ::: Ptr SurfaceKHR)
   -> IO Result)
vkCreateHeadlessSurfaceEXTPtr
  "pCreateInfo" ::: Ptr HeadlessSurfaceCreateInfoEXT
pCreateInfo <- ((("pCreateInfo" ::: Ptr HeadlessSurfaceCreateInfoEXT)
  -> IO SurfaceKHR)
 -> IO SurfaceKHR)
-> ContT
     SurfaceKHR IO ("pCreateInfo" ::: Ptr HeadlessSurfaceCreateInfoEXT)
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pCreateInfo" ::: Ptr HeadlessSurfaceCreateInfoEXT)
   -> IO SurfaceKHR)
  -> IO SurfaceKHR)
 -> ContT
      SurfaceKHR IO ("pCreateInfo" ::: Ptr HeadlessSurfaceCreateInfoEXT))
-> ((("pCreateInfo" ::: Ptr HeadlessSurfaceCreateInfoEXT)
     -> IO SurfaceKHR)
    -> IO SurfaceKHR)
-> ContT
     SurfaceKHR IO ("pCreateInfo" ::: Ptr HeadlessSurfaceCreateInfoEXT)
forall a b. (a -> b) -> a -> b
$ HeadlessSurfaceCreateInfoEXT
-> (("pCreateInfo" ::: Ptr HeadlessSurfaceCreateInfoEXT)
    -> IO SurfaceKHR)
-> IO SurfaceKHR
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (HeadlessSurfaceCreateInfoEXT
createInfo)
  "pAllocator" ::: Ptr AllocationCallbacks
pAllocator <- case ("allocator" ::: Maybe AllocationCallbacks
allocator) of
    Nothing -> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ContT SurfaceKHR IO ("pAllocator" ::: Ptr AllocationCallbacks)
forall (f :: * -> *) a. Applicative f => a -> f a
pure "pAllocator" ::: Ptr AllocationCallbacks
forall a. Ptr a
nullPtr
    Just j :: AllocationCallbacks
j -> ((("pAllocator" ::: Ptr AllocationCallbacks) -> IO SurfaceKHR)
 -> IO SurfaceKHR)
-> ContT SurfaceKHR IO ("pAllocator" ::: Ptr AllocationCallbacks)
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pAllocator" ::: Ptr AllocationCallbacks) -> IO SurfaceKHR)
  -> IO SurfaceKHR)
 -> ContT SurfaceKHR IO ("pAllocator" ::: Ptr AllocationCallbacks))
-> ((("pAllocator" ::: Ptr AllocationCallbacks) -> IO SurfaceKHR)
    -> IO SurfaceKHR)
-> ContT SurfaceKHR IO ("pAllocator" ::: Ptr AllocationCallbacks)
forall a b. (a -> b) -> a -> b
$ AllocationCallbacks
-> (("pAllocator" ::: Ptr AllocationCallbacks) -> IO SurfaceKHR)
-> IO SurfaceKHR
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (AllocationCallbacks
j)
  "pSurface" ::: Ptr SurfaceKHR
pPSurface <- ((("pSurface" ::: Ptr SurfaceKHR) -> IO SurfaceKHR)
 -> IO SurfaceKHR)
-> ContT SurfaceKHR IO ("pSurface" ::: Ptr SurfaceKHR)
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pSurface" ::: Ptr SurfaceKHR) -> IO SurfaceKHR)
  -> IO SurfaceKHR)
 -> ContT SurfaceKHR IO ("pSurface" ::: Ptr SurfaceKHR))
-> ((("pSurface" ::: Ptr SurfaceKHR) -> IO SurfaceKHR)
    -> IO SurfaceKHR)
-> ContT SurfaceKHR IO ("pSurface" ::: Ptr SurfaceKHR)
forall a b. (a -> b) -> a -> b
$ IO ("pSurface" ::: Ptr SurfaceKHR)
-> (("pSurface" ::: Ptr SurfaceKHR) -> IO ())
-> (("pSurface" ::: Ptr SurfaceKHR) -> IO SurfaceKHR)
-> IO SurfaceKHR
forall a b c. IO a -> (a -> IO b) -> (a -> IO c) -> IO c
bracket (Int -> IO ("pSurface" ::: Ptr SurfaceKHR)
forall a. Int -> IO (Ptr a)
callocBytes @SurfaceKHR 8) ("pSurface" ::: Ptr SurfaceKHR) -> IO ()
forall a. Ptr a -> IO ()
free
  Result
r <- IO Result -> ContT SurfaceKHR IO Result
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO Result -> ContT SurfaceKHR IO Result)
-> IO Result -> ContT SurfaceKHR IO Result
forall a b. (a -> b) -> a -> b
$ String -> IO Result -> IO Result
forall a. String -> IO a -> IO a
traceAroundEvent "vkCreateHeadlessSurfaceEXT" (Ptr Instance_T
-> ("pCreateInfo" ::: Ptr HeadlessSurfaceCreateInfoEXT)
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pSurface" ::: Ptr SurfaceKHR)
-> IO Result
vkCreateHeadlessSurfaceEXT' (Instance -> Ptr Instance_T
instanceHandle (Instance
instance')) "pCreateInfo" ::: Ptr HeadlessSurfaceCreateInfoEXT
pCreateInfo "pAllocator" ::: Ptr AllocationCallbacks
pAllocator ("pSurface" ::: Ptr SurfaceKHR
pPSurface))
  IO () -> ContT SurfaceKHR IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT SurfaceKHR IO ())
-> IO () -> ContT SurfaceKHR IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
when (Result
r Result -> Result -> Bool
forall a. Ord a => a -> a -> Bool
< Result
SUCCESS) (VulkanException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (Result -> VulkanException
VulkanException Result
r))
  SurfaceKHR
pSurface <- IO SurfaceKHR -> ContT SurfaceKHR IO SurfaceKHR
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO SurfaceKHR -> ContT SurfaceKHR IO SurfaceKHR)
-> IO SurfaceKHR -> ContT SurfaceKHR IO SurfaceKHR
forall a b. (a -> b) -> a -> b
$ ("pSurface" ::: Ptr SurfaceKHR) -> IO SurfaceKHR
forall a. Storable a => Ptr a -> IO a
peek @SurfaceKHR "pSurface" ::: Ptr SurfaceKHR
pPSurface
  SurfaceKHR -> ContT SurfaceKHR IO SurfaceKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure (SurfaceKHR -> ContT SurfaceKHR IO SurfaceKHR)
-> SurfaceKHR -> ContT SurfaceKHR IO SurfaceKHR
forall a b. (a -> b) -> a -> b
$ (SurfaceKHR
pSurface)


-- | VkHeadlessSurfaceCreateInfoEXT - Structure specifying parameters of a
-- newly created headless surface object
--
-- == Valid Usage (Implicit)
--
-- = See Also
--
-- 'HeadlessSurfaceCreateFlagsEXT',
-- 'Vulkan.Core10.Enums.StructureType.StructureType',
-- 'createHeadlessSurfaceEXT'
data HeadlessSurfaceCreateInfoEXT = HeadlessSurfaceCreateInfoEXT
  { -- | @flags@ is reserved for future use.
    --
    -- #VUID-VkHeadlessSurfaceCreateInfoEXT-flags-zerobitmask# @flags@ /must/
    -- be @0@
    HeadlessSurfaceCreateInfoEXT -> HeadlessSurfaceCreateFlagsEXT
flags :: HeadlessSurfaceCreateFlagsEXT }
  deriving (Typeable, HeadlessSurfaceCreateInfoEXT
-> HeadlessSurfaceCreateInfoEXT -> Bool
(HeadlessSurfaceCreateInfoEXT
 -> HeadlessSurfaceCreateInfoEXT -> Bool)
-> (HeadlessSurfaceCreateInfoEXT
    -> HeadlessSurfaceCreateInfoEXT -> Bool)
-> Eq HeadlessSurfaceCreateInfoEXT
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: HeadlessSurfaceCreateInfoEXT
-> HeadlessSurfaceCreateInfoEXT -> Bool
$c/= :: HeadlessSurfaceCreateInfoEXT
-> HeadlessSurfaceCreateInfoEXT -> Bool
== :: HeadlessSurfaceCreateInfoEXT
-> HeadlessSurfaceCreateInfoEXT -> Bool
$c== :: HeadlessSurfaceCreateInfoEXT
-> HeadlessSurfaceCreateInfoEXT -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (HeadlessSurfaceCreateInfoEXT)
#endif
deriving instance Show HeadlessSurfaceCreateInfoEXT

instance ToCStruct HeadlessSurfaceCreateInfoEXT where
  withCStruct :: HeadlessSurfaceCreateInfoEXT
-> (("pCreateInfo" ::: Ptr HeadlessSurfaceCreateInfoEXT) -> IO b)
-> IO b
withCStruct x :: HeadlessSurfaceCreateInfoEXT
x f :: ("pCreateInfo" ::: Ptr HeadlessSurfaceCreateInfoEXT) -> IO b
f = Int
-> Int
-> (("pCreateInfo" ::: Ptr HeadlessSurfaceCreateInfoEXT) -> IO b)
-> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 24 8 ((("pCreateInfo" ::: Ptr HeadlessSurfaceCreateInfoEXT) -> IO b)
 -> IO b)
-> (("pCreateInfo" ::: Ptr HeadlessSurfaceCreateInfoEXT) -> IO b)
-> IO b
forall a b. (a -> b) -> a -> b
$ \p :: "pCreateInfo" ::: Ptr HeadlessSurfaceCreateInfoEXT
p -> ("pCreateInfo" ::: Ptr HeadlessSurfaceCreateInfoEXT)
-> HeadlessSurfaceCreateInfoEXT -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pCreateInfo" ::: Ptr HeadlessSurfaceCreateInfoEXT
p HeadlessSurfaceCreateInfoEXT
x (("pCreateInfo" ::: Ptr HeadlessSurfaceCreateInfoEXT) -> IO b
f "pCreateInfo" ::: Ptr HeadlessSurfaceCreateInfoEXT
p)
  pokeCStruct :: ("pCreateInfo" ::: Ptr HeadlessSurfaceCreateInfoEXT)
-> HeadlessSurfaceCreateInfoEXT -> IO b -> IO b
pokeCStruct p :: "pCreateInfo" ::: Ptr HeadlessSurfaceCreateInfoEXT
p HeadlessSurfaceCreateInfoEXT{..} f :: IO b
f = do
    Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCreateInfo" ::: Ptr HeadlessSurfaceCreateInfoEXT
p ("pCreateInfo" ::: Ptr HeadlessSurfaceCreateInfoEXT)
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_HEADLESS_SURFACE_CREATE_INFO_EXT)
    Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCreateInfo" ::: Ptr HeadlessSurfaceCreateInfoEXT
p ("pCreateInfo" ::: Ptr HeadlessSurfaceCreateInfoEXT)
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
    Ptr HeadlessSurfaceCreateFlagsEXT
-> HeadlessSurfaceCreateFlagsEXT -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCreateInfo" ::: Ptr HeadlessSurfaceCreateInfoEXT
p ("pCreateInfo" ::: Ptr HeadlessSurfaceCreateInfoEXT)
-> Int -> Ptr HeadlessSurfaceCreateFlagsEXT
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr HeadlessSurfaceCreateFlagsEXT)) (HeadlessSurfaceCreateFlagsEXT
flags)
    IO b
f
  cStructSize :: Int
cStructSize = 24
  cStructAlignment :: Int
cStructAlignment = 8
  pokeZeroCStruct :: ("pCreateInfo" ::: Ptr HeadlessSurfaceCreateInfoEXT)
-> IO b -> IO b
pokeZeroCStruct p :: "pCreateInfo" ::: Ptr HeadlessSurfaceCreateInfoEXT
p f :: IO b
f = do
    Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCreateInfo" ::: Ptr HeadlessSurfaceCreateInfoEXT
p ("pCreateInfo" ::: Ptr HeadlessSurfaceCreateInfoEXT)
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_HEADLESS_SURFACE_CREATE_INFO_EXT)
    Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCreateInfo" ::: Ptr HeadlessSurfaceCreateInfoEXT
p ("pCreateInfo" ::: Ptr HeadlessSurfaceCreateInfoEXT)
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
    IO b
f

instance FromCStruct HeadlessSurfaceCreateInfoEXT where
  peekCStruct :: ("pCreateInfo" ::: Ptr HeadlessSurfaceCreateInfoEXT)
-> IO HeadlessSurfaceCreateInfoEXT
peekCStruct p :: "pCreateInfo" ::: Ptr HeadlessSurfaceCreateInfoEXT
p = do
    HeadlessSurfaceCreateFlagsEXT
flags <- Ptr HeadlessSurfaceCreateFlagsEXT
-> IO HeadlessSurfaceCreateFlagsEXT
forall a. Storable a => Ptr a -> IO a
peek @HeadlessSurfaceCreateFlagsEXT (("pCreateInfo" ::: Ptr HeadlessSurfaceCreateInfoEXT
p ("pCreateInfo" ::: Ptr HeadlessSurfaceCreateInfoEXT)
-> Int -> Ptr HeadlessSurfaceCreateFlagsEXT
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr HeadlessSurfaceCreateFlagsEXT))
    HeadlessSurfaceCreateInfoEXT -> IO HeadlessSurfaceCreateInfoEXT
forall (f :: * -> *) a. Applicative f => a -> f a
pure (HeadlessSurfaceCreateInfoEXT -> IO HeadlessSurfaceCreateInfoEXT)
-> HeadlessSurfaceCreateInfoEXT -> IO HeadlessSurfaceCreateInfoEXT
forall a b. (a -> b) -> a -> b
$ HeadlessSurfaceCreateFlagsEXT -> HeadlessSurfaceCreateInfoEXT
HeadlessSurfaceCreateInfoEXT
             HeadlessSurfaceCreateFlagsEXT
flags

instance Storable HeadlessSurfaceCreateInfoEXT where
  sizeOf :: HeadlessSurfaceCreateInfoEXT -> Int
sizeOf ~HeadlessSurfaceCreateInfoEXT
_ = 24
  alignment :: HeadlessSurfaceCreateInfoEXT -> Int
alignment ~HeadlessSurfaceCreateInfoEXT
_ = 8
  peek :: ("pCreateInfo" ::: Ptr HeadlessSurfaceCreateInfoEXT)
-> IO HeadlessSurfaceCreateInfoEXT
peek = ("pCreateInfo" ::: Ptr HeadlessSurfaceCreateInfoEXT)
-> IO HeadlessSurfaceCreateInfoEXT
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
  poke :: ("pCreateInfo" ::: Ptr HeadlessSurfaceCreateInfoEXT)
-> HeadlessSurfaceCreateInfoEXT -> IO ()
poke ptr :: "pCreateInfo" ::: Ptr HeadlessSurfaceCreateInfoEXT
ptr poked :: HeadlessSurfaceCreateInfoEXT
poked = ("pCreateInfo" ::: Ptr HeadlessSurfaceCreateInfoEXT)
-> HeadlessSurfaceCreateInfoEXT -> IO () -> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pCreateInfo" ::: Ptr HeadlessSurfaceCreateInfoEXT
ptr HeadlessSurfaceCreateInfoEXT
poked (() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())

instance Zero HeadlessSurfaceCreateInfoEXT where
  zero :: HeadlessSurfaceCreateInfoEXT
zero = HeadlessSurfaceCreateFlagsEXT -> HeadlessSurfaceCreateInfoEXT
HeadlessSurfaceCreateInfoEXT
           HeadlessSurfaceCreateFlagsEXT
forall a. Zero a => a
zero


-- | VkHeadlessSurfaceCreateFlagsEXT - Reserved for future use
--
-- = Description
--
-- 'HeadlessSurfaceCreateFlagsEXT' is a bitmask type for setting a mask,
-- but is currently reserved for future use.
--
-- = See Also
--
-- 'HeadlessSurfaceCreateInfoEXT'
newtype HeadlessSurfaceCreateFlagsEXT = HeadlessSurfaceCreateFlagsEXT Flags
  deriving newtype (HeadlessSurfaceCreateFlagsEXT
-> HeadlessSurfaceCreateFlagsEXT -> Bool
(HeadlessSurfaceCreateFlagsEXT
 -> HeadlessSurfaceCreateFlagsEXT -> Bool)
-> (HeadlessSurfaceCreateFlagsEXT
    -> HeadlessSurfaceCreateFlagsEXT -> Bool)
-> Eq HeadlessSurfaceCreateFlagsEXT
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: HeadlessSurfaceCreateFlagsEXT
-> HeadlessSurfaceCreateFlagsEXT -> Bool
$c/= :: HeadlessSurfaceCreateFlagsEXT
-> HeadlessSurfaceCreateFlagsEXT -> Bool
== :: HeadlessSurfaceCreateFlagsEXT
-> HeadlessSurfaceCreateFlagsEXT -> Bool
$c== :: HeadlessSurfaceCreateFlagsEXT
-> HeadlessSurfaceCreateFlagsEXT -> Bool
Eq, Eq HeadlessSurfaceCreateFlagsEXT
Eq HeadlessSurfaceCreateFlagsEXT =>
(HeadlessSurfaceCreateFlagsEXT
 -> HeadlessSurfaceCreateFlagsEXT -> Ordering)
-> (HeadlessSurfaceCreateFlagsEXT
    -> HeadlessSurfaceCreateFlagsEXT -> Bool)
-> (HeadlessSurfaceCreateFlagsEXT
    -> HeadlessSurfaceCreateFlagsEXT -> Bool)
-> (HeadlessSurfaceCreateFlagsEXT
    -> HeadlessSurfaceCreateFlagsEXT -> Bool)
-> (HeadlessSurfaceCreateFlagsEXT
    -> HeadlessSurfaceCreateFlagsEXT -> Bool)
-> (HeadlessSurfaceCreateFlagsEXT
    -> HeadlessSurfaceCreateFlagsEXT -> HeadlessSurfaceCreateFlagsEXT)
-> (HeadlessSurfaceCreateFlagsEXT
    -> HeadlessSurfaceCreateFlagsEXT -> HeadlessSurfaceCreateFlagsEXT)
-> Ord HeadlessSurfaceCreateFlagsEXT
HeadlessSurfaceCreateFlagsEXT
-> HeadlessSurfaceCreateFlagsEXT -> Bool
HeadlessSurfaceCreateFlagsEXT
-> HeadlessSurfaceCreateFlagsEXT -> Ordering
HeadlessSurfaceCreateFlagsEXT
-> HeadlessSurfaceCreateFlagsEXT -> HeadlessSurfaceCreateFlagsEXT
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 :: HeadlessSurfaceCreateFlagsEXT
-> HeadlessSurfaceCreateFlagsEXT -> HeadlessSurfaceCreateFlagsEXT
$cmin :: HeadlessSurfaceCreateFlagsEXT
-> HeadlessSurfaceCreateFlagsEXT -> HeadlessSurfaceCreateFlagsEXT
max :: HeadlessSurfaceCreateFlagsEXT
-> HeadlessSurfaceCreateFlagsEXT -> HeadlessSurfaceCreateFlagsEXT
$cmax :: HeadlessSurfaceCreateFlagsEXT
-> HeadlessSurfaceCreateFlagsEXT -> HeadlessSurfaceCreateFlagsEXT
>= :: HeadlessSurfaceCreateFlagsEXT
-> HeadlessSurfaceCreateFlagsEXT -> Bool
$c>= :: HeadlessSurfaceCreateFlagsEXT
-> HeadlessSurfaceCreateFlagsEXT -> Bool
> :: HeadlessSurfaceCreateFlagsEXT
-> HeadlessSurfaceCreateFlagsEXT -> Bool
$c> :: HeadlessSurfaceCreateFlagsEXT
-> HeadlessSurfaceCreateFlagsEXT -> Bool
<= :: HeadlessSurfaceCreateFlagsEXT
-> HeadlessSurfaceCreateFlagsEXT -> Bool
$c<= :: HeadlessSurfaceCreateFlagsEXT
-> HeadlessSurfaceCreateFlagsEXT -> Bool
< :: HeadlessSurfaceCreateFlagsEXT
-> HeadlessSurfaceCreateFlagsEXT -> Bool
$c< :: HeadlessSurfaceCreateFlagsEXT
-> HeadlessSurfaceCreateFlagsEXT -> Bool
compare :: HeadlessSurfaceCreateFlagsEXT
-> HeadlessSurfaceCreateFlagsEXT -> Ordering
$ccompare :: HeadlessSurfaceCreateFlagsEXT
-> HeadlessSurfaceCreateFlagsEXT -> Ordering
$cp1Ord :: Eq HeadlessSurfaceCreateFlagsEXT
Ord, Ptr b -> Int -> IO HeadlessSurfaceCreateFlagsEXT
Ptr b -> Int -> HeadlessSurfaceCreateFlagsEXT -> IO ()
Ptr HeadlessSurfaceCreateFlagsEXT
-> IO HeadlessSurfaceCreateFlagsEXT
Ptr HeadlessSurfaceCreateFlagsEXT
-> Int -> IO HeadlessSurfaceCreateFlagsEXT
Ptr HeadlessSurfaceCreateFlagsEXT
-> Int -> HeadlessSurfaceCreateFlagsEXT -> IO ()
Ptr HeadlessSurfaceCreateFlagsEXT
-> HeadlessSurfaceCreateFlagsEXT -> IO ()
HeadlessSurfaceCreateFlagsEXT -> Int
(HeadlessSurfaceCreateFlagsEXT -> Int)
-> (HeadlessSurfaceCreateFlagsEXT -> Int)
-> (Ptr HeadlessSurfaceCreateFlagsEXT
    -> Int -> IO HeadlessSurfaceCreateFlagsEXT)
-> (Ptr HeadlessSurfaceCreateFlagsEXT
    -> Int -> HeadlessSurfaceCreateFlagsEXT -> IO ())
-> (forall b. Ptr b -> Int -> IO HeadlessSurfaceCreateFlagsEXT)
-> (forall b.
    Ptr b -> Int -> HeadlessSurfaceCreateFlagsEXT -> IO ())
-> (Ptr HeadlessSurfaceCreateFlagsEXT
    -> IO HeadlessSurfaceCreateFlagsEXT)
-> (Ptr HeadlessSurfaceCreateFlagsEXT
    -> HeadlessSurfaceCreateFlagsEXT -> IO ())
-> Storable HeadlessSurfaceCreateFlagsEXT
forall b. Ptr b -> Int -> IO HeadlessSurfaceCreateFlagsEXT
forall b. Ptr b -> Int -> HeadlessSurfaceCreateFlagsEXT -> 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 HeadlessSurfaceCreateFlagsEXT
-> HeadlessSurfaceCreateFlagsEXT -> IO ()
$cpoke :: Ptr HeadlessSurfaceCreateFlagsEXT
-> HeadlessSurfaceCreateFlagsEXT -> IO ()
peek :: Ptr HeadlessSurfaceCreateFlagsEXT
-> IO HeadlessSurfaceCreateFlagsEXT
$cpeek :: Ptr HeadlessSurfaceCreateFlagsEXT
-> IO HeadlessSurfaceCreateFlagsEXT
pokeByteOff :: Ptr b -> Int -> HeadlessSurfaceCreateFlagsEXT -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> HeadlessSurfaceCreateFlagsEXT -> IO ()
peekByteOff :: Ptr b -> Int -> IO HeadlessSurfaceCreateFlagsEXT
$cpeekByteOff :: forall b. Ptr b -> Int -> IO HeadlessSurfaceCreateFlagsEXT
pokeElemOff :: Ptr HeadlessSurfaceCreateFlagsEXT
-> Int -> HeadlessSurfaceCreateFlagsEXT -> IO ()
$cpokeElemOff :: Ptr HeadlessSurfaceCreateFlagsEXT
-> Int -> HeadlessSurfaceCreateFlagsEXT -> IO ()
peekElemOff :: Ptr HeadlessSurfaceCreateFlagsEXT
-> Int -> IO HeadlessSurfaceCreateFlagsEXT
$cpeekElemOff :: Ptr HeadlessSurfaceCreateFlagsEXT
-> Int -> IO HeadlessSurfaceCreateFlagsEXT
alignment :: HeadlessSurfaceCreateFlagsEXT -> Int
$calignment :: HeadlessSurfaceCreateFlagsEXT -> Int
sizeOf :: HeadlessSurfaceCreateFlagsEXT -> Int
$csizeOf :: HeadlessSurfaceCreateFlagsEXT -> Int
Storable, HeadlessSurfaceCreateFlagsEXT
HeadlessSurfaceCreateFlagsEXT -> Zero HeadlessSurfaceCreateFlagsEXT
forall a. a -> Zero a
zero :: HeadlessSurfaceCreateFlagsEXT
$czero :: HeadlessSurfaceCreateFlagsEXT
Zero, Eq HeadlessSurfaceCreateFlagsEXT
HeadlessSurfaceCreateFlagsEXT
Eq HeadlessSurfaceCreateFlagsEXT =>
(HeadlessSurfaceCreateFlagsEXT
 -> HeadlessSurfaceCreateFlagsEXT -> HeadlessSurfaceCreateFlagsEXT)
-> (HeadlessSurfaceCreateFlagsEXT
    -> HeadlessSurfaceCreateFlagsEXT -> HeadlessSurfaceCreateFlagsEXT)
-> (HeadlessSurfaceCreateFlagsEXT
    -> HeadlessSurfaceCreateFlagsEXT -> HeadlessSurfaceCreateFlagsEXT)
-> (HeadlessSurfaceCreateFlagsEXT -> HeadlessSurfaceCreateFlagsEXT)
-> (HeadlessSurfaceCreateFlagsEXT
    -> Int -> HeadlessSurfaceCreateFlagsEXT)
-> (HeadlessSurfaceCreateFlagsEXT
    -> Int -> HeadlessSurfaceCreateFlagsEXT)
-> HeadlessSurfaceCreateFlagsEXT
-> (Int -> HeadlessSurfaceCreateFlagsEXT)
-> (HeadlessSurfaceCreateFlagsEXT
    -> Int -> HeadlessSurfaceCreateFlagsEXT)
-> (HeadlessSurfaceCreateFlagsEXT
    -> Int -> HeadlessSurfaceCreateFlagsEXT)
-> (HeadlessSurfaceCreateFlagsEXT
    -> Int -> HeadlessSurfaceCreateFlagsEXT)
-> (HeadlessSurfaceCreateFlagsEXT -> Int -> Bool)
-> (HeadlessSurfaceCreateFlagsEXT -> Maybe Int)
-> (HeadlessSurfaceCreateFlagsEXT -> Int)
-> (HeadlessSurfaceCreateFlagsEXT -> Bool)
-> (HeadlessSurfaceCreateFlagsEXT
    -> Int -> HeadlessSurfaceCreateFlagsEXT)
-> (HeadlessSurfaceCreateFlagsEXT
    -> Int -> HeadlessSurfaceCreateFlagsEXT)
-> (HeadlessSurfaceCreateFlagsEXT
    -> Int -> HeadlessSurfaceCreateFlagsEXT)
-> (HeadlessSurfaceCreateFlagsEXT
    -> Int -> HeadlessSurfaceCreateFlagsEXT)
-> (HeadlessSurfaceCreateFlagsEXT
    -> Int -> HeadlessSurfaceCreateFlagsEXT)
-> (HeadlessSurfaceCreateFlagsEXT
    -> Int -> HeadlessSurfaceCreateFlagsEXT)
-> (HeadlessSurfaceCreateFlagsEXT -> Int)
-> Bits HeadlessSurfaceCreateFlagsEXT
Int -> HeadlessSurfaceCreateFlagsEXT
HeadlessSurfaceCreateFlagsEXT -> Bool
HeadlessSurfaceCreateFlagsEXT -> Int
HeadlessSurfaceCreateFlagsEXT -> Maybe Int
HeadlessSurfaceCreateFlagsEXT -> HeadlessSurfaceCreateFlagsEXT
HeadlessSurfaceCreateFlagsEXT -> Int -> Bool
HeadlessSurfaceCreateFlagsEXT
-> Int -> HeadlessSurfaceCreateFlagsEXT
HeadlessSurfaceCreateFlagsEXT
-> HeadlessSurfaceCreateFlagsEXT -> HeadlessSurfaceCreateFlagsEXT
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 :: HeadlessSurfaceCreateFlagsEXT -> Int
$cpopCount :: HeadlessSurfaceCreateFlagsEXT -> Int
rotateR :: HeadlessSurfaceCreateFlagsEXT
-> Int -> HeadlessSurfaceCreateFlagsEXT
$crotateR :: HeadlessSurfaceCreateFlagsEXT
-> Int -> HeadlessSurfaceCreateFlagsEXT
rotateL :: HeadlessSurfaceCreateFlagsEXT
-> Int -> HeadlessSurfaceCreateFlagsEXT
$crotateL :: HeadlessSurfaceCreateFlagsEXT
-> Int -> HeadlessSurfaceCreateFlagsEXT
unsafeShiftR :: HeadlessSurfaceCreateFlagsEXT
-> Int -> HeadlessSurfaceCreateFlagsEXT
$cunsafeShiftR :: HeadlessSurfaceCreateFlagsEXT
-> Int -> HeadlessSurfaceCreateFlagsEXT
shiftR :: HeadlessSurfaceCreateFlagsEXT
-> Int -> HeadlessSurfaceCreateFlagsEXT
$cshiftR :: HeadlessSurfaceCreateFlagsEXT
-> Int -> HeadlessSurfaceCreateFlagsEXT
unsafeShiftL :: HeadlessSurfaceCreateFlagsEXT
-> Int -> HeadlessSurfaceCreateFlagsEXT
$cunsafeShiftL :: HeadlessSurfaceCreateFlagsEXT
-> Int -> HeadlessSurfaceCreateFlagsEXT
shiftL :: HeadlessSurfaceCreateFlagsEXT
-> Int -> HeadlessSurfaceCreateFlagsEXT
$cshiftL :: HeadlessSurfaceCreateFlagsEXT
-> Int -> HeadlessSurfaceCreateFlagsEXT
isSigned :: HeadlessSurfaceCreateFlagsEXT -> Bool
$cisSigned :: HeadlessSurfaceCreateFlagsEXT -> Bool
bitSize :: HeadlessSurfaceCreateFlagsEXT -> Int
$cbitSize :: HeadlessSurfaceCreateFlagsEXT -> Int
bitSizeMaybe :: HeadlessSurfaceCreateFlagsEXT -> Maybe Int
$cbitSizeMaybe :: HeadlessSurfaceCreateFlagsEXT -> Maybe Int
testBit :: HeadlessSurfaceCreateFlagsEXT -> Int -> Bool
$ctestBit :: HeadlessSurfaceCreateFlagsEXT -> Int -> Bool
complementBit :: HeadlessSurfaceCreateFlagsEXT
-> Int -> HeadlessSurfaceCreateFlagsEXT
$ccomplementBit :: HeadlessSurfaceCreateFlagsEXT
-> Int -> HeadlessSurfaceCreateFlagsEXT
clearBit :: HeadlessSurfaceCreateFlagsEXT
-> Int -> HeadlessSurfaceCreateFlagsEXT
$cclearBit :: HeadlessSurfaceCreateFlagsEXT
-> Int -> HeadlessSurfaceCreateFlagsEXT
setBit :: HeadlessSurfaceCreateFlagsEXT
-> Int -> HeadlessSurfaceCreateFlagsEXT
$csetBit :: HeadlessSurfaceCreateFlagsEXT
-> Int -> HeadlessSurfaceCreateFlagsEXT
bit :: Int -> HeadlessSurfaceCreateFlagsEXT
$cbit :: Int -> HeadlessSurfaceCreateFlagsEXT
zeroBits :: HeadlessSurfaceCreateFlagsEXT
$czeroBits :: HeadlessSurfaceCreateFlagsEXT
rotate :: HeadlessSurfaceCreateFlagsEXT
-> Int -> HeadlessSurfaceCreateFlagsEXT
$crotate :: HeadlessSurfaceCreateFlagsEXT
-> Int -> HeadlessSurfaceCreateFlagsEXT
shift :: HeadlessSurfaceCreateFlagsEXT
-> Int -> HeadlessSurfaceCreateFlagsEXT
$cshift :: HeadlessSurfaceCreateFlagsEXT
-> Int -> HeadlessSurfaceCreateFlagsEXT
complement :: HeadlessSurfaceCreateFlagsEXT -> HeadlessSurfaceCreateFlagsEXT
$ccomplement :: HeadlessSurfaceCreateFlagsEXT -> HeadlessSurfaceCreateFlagsEXT
xor :: HeadlessSurfaceCreateFlagsEXT
-> HeadlessSurfaceCreateFlagsEXT -> HeadlessSurfaceCreateFlagsEXT
$cxor :: HeadlessSurfaceCreateFlagsEXT
-> HeadlessSurfaceCreateFlagsEXT -> HeadlessSurfaceCreateFlagsEXT
.|. :: HeadlessSurfaceCreateFlagsEXT
-> HeadlessSurfaceCreateFlagsEXT -> HeadlessSurfaceCreateFlagsEXT
$c.|. :: HeadlessSurfaceCreateFlagsEXT
-> HeadlessSurfaceCreateFlagsEXT -> HeadlessSurfaceCreateFlagsEXT
.&. :: HeadlessSurfaceCreateFlagsEXT
-> HeadlessSurfaceCreateFlagsEXT -> HeadlessSurfaceCreateFlagsEXT
$c.&. :: HeadlessSurfaceCreateFlagsEXT
-> HeadlessSurfaceCreateFlagsEXT -> HeadlessSurfaceCreateFlagsEXT
$cp1Bits :: Eq HeadlessSurfaceCreateFlagsEXT
Bits, Bits HeadlessSurfaceCreateFlagsEXT
Bits HeadlessSurfaceCreateFlagsEXT =>
(HeadlessSurfaceCreateFlagsEXT -> Int)
-> (HeadlessSurfaceCreateFlagsEXT -> Int)
-> (HeadlessSurfaceCreateFlagsEXT -> Int)
-> FiniteBits HeadlessSurfaceCreateFlagsEXT
HeadlessSurfaceCreateFlagsEXT -> Int
forall b.
Bits b =>
(b -> Int) -> (b -> Int) -> (b -> Int) -> FiniteBits b
countTrailingZeros :: HeadlessSurfaceCreateFlagsEXT -> Int
$ccountTrailingZeros :: HeadlessSurfaceCreateFlagsEXT -> Int
countLeadingZeros :: HeadlessSurfaceCreateFlagsEXT -> Int
$ccountLeadingZeros :: HeadlessSurfaceCreateFlagsEXT -> Int
finiteBitSize :: HeadlessSurfaceCreateFlagsEXT -> Int
$cfiniteBitSize :: HeadlessSurfaceCreateFlagsEXT -> Int
$cp1FiniteBits :: Bits HeadlessSurfaceCreateFlagsEXT
FiniteBits)



conNameHeadlessSurfaceCreateFlagsEXT :: String
conNameHeadlessSurfaceCreateFlagsEXT :: String
conNameHeadlessSurfaceCreateFlagsEXT = "HeadlessSurfaceCreateFlagsEXT"

enumPrefixHeadlessSurfaceCreateFlagsEXT :: String
enumPrefixHeadlessSurfaceCreateFlagsEXT :: String
enumPrefixHeadlessSurfaceCreateFlagsEXT = ""

showTableHeadlessSurfaceCreateFlagsEXT :: [(HeadlessSurfaceCreateFlagsEXT, String)]
showTableHeadlessSurfaceCreateFlagsEXT :: [(HeadlessSurfaceCreateFlagsEXT, String)]
showTableHeadlessSurfaceCreateFlagsEXT = []

instance Show HeadlessSurfaceCreateFlagsEXT where
  showsPrec :: Int -> HeadlessSurfaceCreateFlagsEXT -> ShowS
showsPrec = String
-> [(HeadlessSurfaceCreateFlagsEXT, String)]
-> String
-> (HeadlessSurfaceCreateFlagsEXT -> Flags)
-> (Flags -> ShowS)
-> Int
-> HeadlessSurfaceCreateFlagsEXT
-> ShowS
forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec String
enumPrefixHeadlessSurfaceCreateFlagsEXT
                            [(HeadlessSurfaceCreateFlagsEXT, String)]
showTableHeadlessSurfaceCreateFlagsEXT
                            String
conNameHeadlessSurfaceCreateFlagsEXT
                            (\(HeadlessSurfaceCreateFlagsEXT x :: Flags
x) -> Flags
x)
                            (\x :: Flags
x -> String -> ShowS
showString "0x" ShowS -> ShowS -> ShowS
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Flags -> ShowS
forall a. (Integral a, Show a) => a -> ShowS
showHex Flags
x)

instance Read HeadlessSurfaceCreateFlagsEXT where
  readPrec :: ReadPrec HeadlessSurfaceCreateFlagsEXT
readPrec = String
-> [(HeadlessSurfaceCreateFlagsEXT, String)]
-> String
-> (Flags -> HeadlessSurfaceCreateFlagsEXT)
-> ReadPrec HeadlessSurfaceCreateFlagsEXT
forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec String
enumPrefixHeadlessSurfaceCreateFlagsEXT
                          [(HeadlessSurfaceCreateFlagsEXT, String)]
showTableHeadlessSurfaceCreateFlagsEXT
                          String
conNameHeadlessSurfaceCreateFlagsEXT
                          Flags -> HeadlessSurfaceCreateFlagsEXT
HeadlessSurfaceCreateFlagsEXT


type EXT_HEADLESS_SURFACE_SPEC_VERSION = 1

-- No documentation found for TopLevel "VK_EXT_HEADLESS_SURFACE_SPEC_VERSION"
pattern EXT_HEADLESS_SURFACE_SPEC_VERSION :: forall a . Integral a => a
pattern $bEXT_HEADLESS_SURFACE_SPEC_VERSION :: a
$mEXT_HEADLESS_SURFACE_SPEC_VERSION :: forall r a. Integral a => a -> (Void# -> r) -> (Void# -> r) -> r
EXT_HEADLESS_SURFACE_SPEC_VERSION = 1


type EXT_HEADLESS_SURFACE_EXTENSION_NAME = "VK_EXT_headless_surface"

-- No documentation found for TopLevel "VK_EXT_HEADLESS_SURFACE_EXTENSION_NAME"
pattern EXT_HEADLESS_SURFACE_EXTENSION_NAME :: forall a . (Eq a, IsString a) => a
pattern $bEXT_HEADLESS_SURFACE_EXTENSION_NAME :: a
$mEXT_HEADLESS_SURFACE_EXTENSION_NAME :: forall r a.
(Eq a, IsString a) =>
a -> (Void# -> r) -> (Void# -> r) -> r
EXT_HEADLESS_SURFACE_EXTENSION_NAME = "VK_EXT_headless_surface"