{-# language CPP #-}
-- | = Name
--
-- VK_NN_vi_surface - instance extension
--
-- == VK_NN_vi_surface
--
-- [__Name String__]
--     @VK_NN_vi_surface@
--
-- [__Extension Type__]
--     Instance extension
--
-- [__Registered Extension Number__]
--     63
--
-- [__Revision__]
--     1
--
-- [__Extension and Version Dependencies__]
--
--     -   Requires Vulkan 1.0
--
--     -   Requires @VK_KHR_surface@
--
-- [__Contact__]
--
--     -   Mathias Heyer <<data:image/png;base64, GitLab>>mheyer
--
-- == Other Extension Metadata
--
-- [__Last Modified Date__]
--     2016-12-02
--
-- [__IP Status__]
--     No known IP claims.
--
-- [__Contributors__]
--
--     -   Mathias Heyer, NVIDIA
--
--     -   Michael Chock, NVIDIA
--
--     -   Yasuhiro Yoshioka, Nintendo
--
--     -   Daniel Koch, NVIDIA
--
-- == Description
--
-- The @VK_NN_vi_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) associated with an
-- @nn@::@vi@::@Layer@.
--
-- == New Commands
--
-- -   'createViSurfaceNN'
--
-- == New Structures
--
-- -   'ViSurfaceCreateInfoNN'
--
-- == New Bitmasks
--
-- -   'ViSurfaceCreateFlagsNN'
--
-- == New Enum Constants
--
-- -   'NN_VI_SURFACE_EXTENSION_NAME'
--
-- -   'NN_VI_SURFACE_SPEC_VERSION'
--
-- -   Extending 'Vulkan.Core10.Enums.StructureType.StructureType':
--
--     -   'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_VI_SURFACE_CREATE_INFO_NN'
--
-- == Issues
--
-- 1) Does VI need a way to query for compatibility between a particular
-- physical device (and queue family?) and a specific VI display?
--
-- __RESOLVED__: No. It is currently always assumed that the device and
-- display will always be compatible.
--
-- 2) 'ViSurfaceCreateInfoNN'::@pWindow@ is intended to store an
-- @nn@::@vi@::@NativeWindowHandle@, but its declared type is a bare
-- @void@* to store the window handle. Why the discrepancy?
--
-- __RESOLVED__: It is for C compatibility. The definition for the VI
-- native window handle type is defined inside the @nn@::@vi@ C++
-- namespace. This prevents its use in C source files.
-- @nn@::@vi@::@NativeWindowHandle@ is always defined to be @void@*, so
-- this extension uses @void@* to match.
--
-- == Version History
--
-- -   Revision 1, 2016-12-2 (Michael Chock)
--
--     -   Initial draft.
--
-- = See Also
--
-- 'ViSurfaceCreateFlagsNN', 'ViSurfaceCreateInfoNN', 'createViSurfaceNN'
--
-- = Document Notes
--
-- For more information, see the
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_NN_vi_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_NN_vi_surface  ( createViSurfaceNN
                                           , ViSurfaceCreateInfoNN(..)
                                           , ViSurfaceCreateFlagsNN(..)
                                           , NN_VI_SURFACE_SPEC_VERSION
                                           , pattern NN_VI_SURFACE_SPEC_VERSION
                                           , NN_VI_SURFACE_EXTENSION_NAME
                                           , pattern NN_VI_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 Vulkan.CStruct (FromCStruct)
import Vulkan.CStruct (FromCStruct(..))
import Vulkan.CStruct (ToCStruct)
import Vulkan.CStruct (ToCStruct(..))
import Vulkan.Zero (Zero)
import Vulkan.Zero (Zero(..))
import Control.Monad.IO.Class (MonadIO)
import Data.Bits (Bits)
import Data.Bits (FiniteBits)
import Data.String (IsString)
import Data.Typeable (Typeable)
import Foreign.Storable (Storable)
import Foreign.Storable (Storable(peek))
import Foreign.Storable (Storable(poke))
import qualified Foreign.Storable (Storable(..))
import GHC.Generics (Generic)
import GHC.IO.Exception (IOErrorType(..))
import GHC.IO.Exception (IOException(..))
import 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.Core10.Handles (Instance)
import Vulkan.Core10.Handles (Instance(..))
import Vulkan.Dynamic (InstanceCmds(pVkCreateViSurfaceNN))
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.Exception (VulkanException(..))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_VI_SURFACE_CREATE_INFO_NN))
import Vulkan.Core10.Enums.Result (Result(SUCCESS))
import Vulkan.Extensions.Handles (SurfaceKHR(..))
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
  unsafe
#endif
  "dynamic" mkVkCreateViSurfaceNN
  :: FunPtr (Ptr Instance_T -> Ptr ViSurfaceCreateInfoNN -> Ptr AllocationCallbacks -> Ptr SurfaceKHR -> IO Result) -> Ptr Instance_T -> Ptr ViSurfaceCreateInfoNN -> Ptr AllocationCallbacks -> Ptr SurfaceKHR -> IO Result

-- | vkCreateViSurfaceNN - Create a 'Vulkan.Extensions.Handles.SurfaceKHR'
-- object for a VI layer
--
-- = Description
--
-- During the lifetime of a surface created using a particular
-- @nn@::@vi@::@NativeWindowHandle@, applications /must/ not attempt to
-- create another surface for the same @nn@::@vi@::@Layer@ or attempt to
-- connect to the same @nn@::@vi@::@Layer@ through other platform
-- mechanisms.
--
-- If the native window is created with a specified size, @currentExtent@
-- will reflect that size. In this case, applications should use the same
-- size for the swapchain’s @imageExtent@. Otherwise, the @currentExtent@
-- will have the special value (0xFFFFFFFF, 0xFFFFFFFF), indicating that
-- applications are expected to choose an appropriate size for the
-- swapchain’s @imageExtent@ (e.g., by matching the result of a call to
-- @nn@::@vi@::@GetDisplayResolution@).
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-vkCreateViSurfaceNN-instance-parameter# @instance@ /must/ be a
--     valid 'Vulkan.Core10.Handles.Instance' handle
--
-- -   #VUID-vkCreateViSurfaceNN-pCreateInfo-parameter# @pCreateInfo@
--     /must/ be a valid pointer to a valid 'ViSurfaceCreateInfoNN'
--     structure
--
-- -   #VUID-vkCreateViSurfaceNN-pAllocator-parameter# If @pAllocator@ is
--     not @NULL@, @pAllocator@ /must/ be a valid pointer to a valid
--     'Vulkan.Core10.AllocationCallbacks.AllocationCallbacks' structure
--
-- -   #VUID-vkCreateViSurfaceNN-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'
--
--     -   'Vulkan.Core10.Enums.Result.ERROR_NATIVE_WINDOW_IN_USE_KHR'
--
-- = See Also
--
-- 'Vulkan.Core10.AllocationCallbacks.AllocationCallbacks',
-- 'Vulkan.Core10.Handles.Instance',
-- 'Vulkan.Extensions.Handles.SurfaceKHR', 'ViSurfaceCreateInfoNN'
createViSurfaceNN :: forall io
                   . (MonadIO io)
                  => -- | @instance@ is the instance with which to associate the surface.
                     Instance
                  -> -- | @pCreateInfo@ is a pointer to a 'ViSurfaceCreateInfoNN' structure
                     -- containing parameters affecting the creation of the surface object.
                     ViSurfaceCreateInfoNN
                  -> -- | @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)
createViSurfaceNN :: Instance
-> ViSurfaceCreateInfoNN
-> ("allocator" ::: Maybe AllocationCallbacks)
-> io SurfaceKHR
createViSurfaceNN instance' :: Instance
instance' createInfo :: ViSurfaceCreateInfoNN
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 vkCreateViSurfaceNNPtr :: FunPtr
  (Ptr Instance_T
   -> ("pCreateInfo" ::: Ptr ViSurfaceCreateInfoNN)
   -> ("pAllocator" ::: Ptr AllocationCallbacks)
   -> ("pSurface" ::: Ptr SurfaceKHR)
   -> IO Result)
vkCreateViSurfaceNNPtr = InstanceCmds
-> FunPtr
     (Ptr Instance_T
      -> ("pCreateInfo" ::: Ptr ViSurfaceCreateInfoNN)
      -> ("pAllocator" ::: Ptr AllocationCallbacks)
      -> ("pSurface" ::: Ptr SurfaceKHR)
      -> IO Result)
pVkCreateViSurfaceNN (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 ViSurfaceCreateInfoNN)
   -> ("pAllocator" ::: Ptr AllocationCallbacks)
   -> ("pSurface" ::: Ptr SurfaceKHR)
   -> IO Result)
vkCreateViSurfaceNNPtr FunPtr
  (Ptr Instance_T
   -> ("pCreateInfo" ::: Ptr ViSurfaceCreateInfoNN)
   -> ("pAllocator" ::: Ptr AllocationCallbacks)
   -> ("pSurface" ::: Ptr SurfaceKHR)
   -> IO Result)
-> FunPtr
     (Ptr Instance_T
      -> ("pCreateInfo" ::: Ptr ViSurfaceCreateInfoNN)
      -> ("pAllocator" ::: Ptr AllocationCallbacks)
      -> ("pSurface" ::: Ptr SurfaceKHR)
      -> IO Result)
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
  (Ptr Instance_T
   -> ("pCreateInfo" ::: Ptr ViSurfaceCreateInfoNN)
   -> ("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 vkCreateViSurfaceNN is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
  let vkCreateViSurfaceNN' :: Ptr Instance_T
-> ("pCreateInfo" ::: Ptr ViSurfaceCreateInfoNN)
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pSurface" ::: Ptr SurfaceKHR)
-> IO Result
vkCreateViSurfaceNN' = FunPtr
  (Ptr Instance_T
   -> ("pCreateInfo" ::: Ptr ViSurfaceCreateInfoNN)
   -> ("pAllocator" ::: Ptr AllocationCallbacks)
   -> ("pSurface" ::: Ptr SurfaceKHR)
   -> IO Result)
-> Ptr Instance_T
-> ("pCreateInfo" ::: Ptr ViSurfaceCreateInfoNN)
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pSurface" ::: Ptr SurfaceKHR)
-> IO Result
mkVkCreateViSurfaceNN FunPtr
  (Ptr Instance_T
   -> ("pCreateInfo" ::: Ptr ViSurfaceCreateInfoNN)
   -> ("pAllocator" ::: Ptr AllocationCallbacks)
   -> ("pSurface" ::: Ptr SurfaceKHR)
   -> IO Result)
vkCreateViSurfaceNNPtr
  "pCreateInfo" ::: Ptr ViSurfaceCreateInfoNN
pCreateInfo <- ((("pCreateInfo" ::: Ptr ViSurfaceCreateInfoNN) -> IO SurfaceKHR)
 -> IO SurfaceKHR)
-> ContT
     SurfaceKHR IO ("pCreateInfo" ::: Ptr ViSurfaceCreateInfoNN)
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pCreateInfo" ::: Ptr ViSurfaceCreateInfoNN) -> IO SurfaceKHR)
  -> IO SurfaceKHR)
 -> ContT
      SurfaceKHR IO ("pCreateInfo" ::: Ptr ViSurfaceCreateInfoNN))
-> ((("pCreateInfo" ::: Ptr ViSurfaceCreateInfoNN)
     -> IO SurfaceKHR)
    -> IO SurfaceKHR)
-> ContT
     SurfaceKHR IO ("pCreateInfo" ::: Ptr ViSurfaceCreateInfoNN)
forall a b. (a -> b) -> a -> b
$ ViSurfaceCreateInfoNN
-> (("pCreateInfo" ::: Ptr ViSurfaceCreateInfoNN) -> IO SurfaceKHR)
-> IO SurfaceKHR
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (ViSurfaceCreateInfoNN
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 "vkCreateViSurfaceNN" (Ptr Instance_T
-> ("pCreateInfo" ::: Ptr ViSurfaceCreateInfoNN)
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pSurface" ::: Ptr SurfaceKHR)
-> IO Result
vkCreateViSurfaceNN' (Instance -> Ptr Instance_T
instanceHandle (Instance
instance')) "pCreateInfo" ::: Ptr ViSurfaceCreateInfoNN
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)


-- | VkViSurfaceCreateInfoNN - Structure specifying parameters of a newly
-- created VI surface object
--
-- == Valid Usage (Implicit)
--
-- = See Also
--
-- 'Vulkan.Core10.Enums.StructureType.StructureType',
-- 'ViSurfaceCreateFlagsNN', 'createViSurfaceNN'
data ViSurfaceCreateInfoNN = ViSurfaceCreateInfoNN
  { -- | @flags@ is reserved for future use.
    --
    -- #VUID-VkViSurfaceCreateInfoNN-flags-zerobitmask# @flags@ /must/ be @0@
    ViSurfaceCreateInfoNN -> ViSurfaceCreateFlagsNN
flags :: ViSurfaceCreateFlagsNN
  , -- | @window@ is the @nn@::@vi@::@NativeWindowHandle@ for the
    -- @nn@::@vi@::@Layer@ with which to associate the surface.
    --
    -- #VUID-VkViSurfaceCreateInfoNN-window-01318# @window@ /must/ be a valid
    -- @nn@::@vi@::@NativeWindowHandle@
    ViSurfaceCreateInfoNN -> Ptr ()
window :: Ptr ()
  }
  deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (ViSurfaceCreateInfoNN)
#endif
deriving instance Show ViSurfaceCreateInfoNN

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

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

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

instance Zero ViSurfaceCreateInfoNN where
  zero :: ViSurfaceCreateInfoNN
zero = ViSurfaceCreateFlagsNN -> Ptr () -> ViSurfaceCreateInfoNN
ViSurfaceCreateInfoNN
           ViSurfaceCreateFlagsNN
forall a. Zero a => a
zero
           Ptr ()
forall a. Zero a => a
zero


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



conNameViSurfaceCreateFlagsNN :: String
conNameViSurfaceCreateFlagsNN :: String
conNameViSurfaceCreateFlagsNN = "ViSurfaceCreateFlagsNN"

enumPrefixViSurfaceCreateFlagsNN :: String
enumPrefixViSurfaceCreateFlagsNN :: String
enumPrefixViSurfaceCreateFlagsNN = ""

showTableViSurfaceCreateFlagsNN :: [(ViSurfaceCreateFlagsNN, String)]
showTableViSurfaceCreateFlagsNN :: [(ViSurfaceCreateFlagsNN, String)]
showTableViSurfaceCreateFlagsNN = []

instance Show ViSurfaceCreateFlagsNN where
  showsPrec :: Int -> ViSurfaceCreateFlagsNN -> ShowS
showsPrec = String
-> [(ViSurfaceCreateFlagsNN, String)]
-> String
-> (ViSurfaceCreateFlagsNN -> Flags)
-> (Flags -> ShowS)
-> Int
-> ViSurfaceCreateFlagsNN
-> ShowS
forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec String
enumPrefixViSurfaceCreateFlagsNN
                            [(ViSurfaceCreateFlagsNN, String)]
showTableViSurfaceCreateFlagsNN
                            String
conNameViSurfaceCreateFlagsNN
                            (\(ViSurfaceCreateFlagsNN 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 ViSurfaceCreateFlagsNN where
  readPrec :: ReadPrec ViSurfaceCreateFlagsNN
readPrec = String
-> [(ViSurfaceCreateFlagsNN, String)]
-> String
-> (Flags -> ViSurfaceCreateFlagsNN)
-> ReadPrec ViSurfaceCreateFlagsNN
forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec String
enumPrefixViSurfaceCreateFlagsNN
                          [(ViSurfaceCreateFlagsNN, String)]
showTableViSurfaceCreateFlagsNN
                          String
conNameViSurfaceCreateFlagsNN
                          Flags -> ViSurfaceCreateFlagsNN
ViSurfaceCreateFlagsNN


type NN_VI_SURFACE_SPEC_VERSION = 1

-- No documentation found for TopLevel "VK_NN_VI_SURFACE_SPEC_VERSION"
pattern NN_VI_SURFACE_SPEC_VERSION :: forall a . Integral a => a
pattern $bNN_VI_SURFACE_SPEC_VERSION :: a
$mNN_VI_SURFACE_SPEC_VERSION :: forall r a. Integral a => a -> (Void# -> r) -> (Void# -> r) -> r
NN_VI_SURFACE_SPEC_VERSION = 1


type NN_VI_SURFACE_EXTENSION_NAME = "VK_NN_vi_surface"

-- No documentation found for TopLevel "VK_NN_VI_SURFACE_EXTENSION_NAME"
pattern NN_VI_SURFACE_EXTENSION_NAME :: forall a . (Eq a, IsString a) => a
pattern $bNN_VI_SURFACE_EXTENSION_NAME :: a
$mNN_VI_SURFACE_EXTENSION_NAME :: forall r a.
(Eq a, IsString a) =>
a -> (Void# -> r) -> (Void# -> r) -> r
NN_VI_SURFACE_EXTENSION_NAME = "VK_NN_vi_surface"