#include "vulkan/vulkan.h" {-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MagicHash #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE Strict #-} {-# LANGUAGE TypeFamilies #-} module Graphics.Vulkan.Types.Struct.VkExportMemoryWin32HandleInfoNV (VkExportMemoryWin32HandleInfoNV(..)) where import Foreign.Storable (Storable (..)) import GHC.Prim import Graphics.Vulkan.Marshal import Graphics.Vulkan.Marshal.Internal import Graphics.Vulkan.Types.Enum.VkStructureType (VkStructureType) import Graphics.Vulkan.Types.Include (DWORD, SECURITY_ATTRIBUTES) import Graphics.Vulkan.Types.Struct.VkMemoryAllocateInfo (VkMemoryAllocateInfo) import Graphics.Vulkan.Types.StructMembers import System.IO.Unsafe (unsafeDupablePerformIO) -- | > typedef struct VkExportMemoryWin32HandleInfoNV { -- > VkStructureType sType; -- > const void* pNext; -- > const SECURITY_ATTRIBUTES* pAttributes; -- > DWORD dwAccess; -- > } VkExportMemoryWin32HandleInfoNV; -- -- data VkExportMemoryWin32HandleInfoNV = VkExportMemoryWin32HandleInfoNV## Addr## ByteArray## instance Eq VkExportMemoryWin32HandleInfoNV where (VkExportMemoryWin32HandleInfoNV## a _) == x@(VkExportMemoryWin32HandleInfoNV## b _) = EQ == cmpBytes## (sizeOf x) a b {-# INLINE (==) #-} instance Ord VkExportMemoryWin32HandleInfoNV where (VkExportMemoryWin32HandleInfoNV## a _) `compare` x@(VkExportMemoryWin32HandleInfoNV## b _) = cmpBytes## (sizeOf x) a b {-# INLINE compare #-} instance Storable VkExportMemoryWin32HandleInfoNV where sizeOf ~_ = #{size VkExportMemoryWin32HandleInfoNV} {-# INLINE sizeOf #-} alignment ~_ = #{alignment VkExportMemoryWin32HandleInfoNV} {-# INLINE alignment #-} peek = peekVkData## {-# INLINE peek #-} poke = pokeVkData## {-# INLINE poke #-} instance VulkanMarshalPrim VkExportMemoryWin32HandleInfoNV where unsafeAddr (VkExportMemoryWin32HandleInfoNV## a _) = a {-# INLINE unsafeAddr #-} unsafeByteArray (VkExportMemoryWin32HandleInfoNV## _ b) = b {-# INLINE unsafeByteArray #-} unsafeFromByteArrayOffset off b = VkExportMemoryWin32HandleInfoNV## (plusAddr## (byteArrayContents## b) off) b {-# INLINE unsafeFromByteArrayOffset #-} instance VulkanMarshal VkExportMemoryWin32HandleInfoNV where type StructFields VkExportMemoryWin32HandleInfoNV = '["sType", "pNext", "pAttributes", "dwAccess"] -- ' closing tick for hsc2hs type CUnionType VkExportMemoryWin32HandleInfoNV = 'False -- ' closing tick for hsc2hs type ReturnedOnly VkExportMemoryWin32HandleInfoNV = 'False -- ' closing tick for hsc2hs type StructExtends VkExportMemoryWin32HandleInfoNV = '[VkMemoryAllocateInfo] -- ' closing tick for hsc2hs instance {-# OVERLAPPING #-} HasVkSType VkExportMemoryWin32HandleInfoNV where type VkSTypeMType VkExportMemoryWin32HandleInfoNV = VkStructureType {-# NOINLINE vkSType #-} vkSType x = unsafeDupablePerformIO (peekByteOff (unsafePtr x) #{offset VkExportMemoryWin32HandleInfoNV, sType}) {-# INLINE vkSTypeByteOffset #-} vkSTypeByteOffset ~_ = #{offset VkExportMemoryWin32HandleInfoNV, sType} {-# INLINE readVkSType #-} readVkSType p = peekByteOff p #{offset VkExportMemoryWin32HandleInfoNV, sType} {-# INLINE writeVkSType #-} writeVkSType p = pokeByteOff p #{offset VkExportMemoryWin32HandleInfoNV, sType} instance {-# OVERLAPPING #-} HasField "sType" VkExportMemoryWin32HandleInfoNV where type FieldType "sType" VkExportMemoryWin32HandleInfoNV = VkStructureType type FieldOptional "sType" VkExportMemoryWin32HandleInfoNV = 'False -- ' closing tick for hsc2hs type FieldOffset "sType" VkExportMemoryWin32HandleInfoNV = #{offset VkExportMemoryWin32HandleInfoNV, sType} type FieldIsArray "sType" VkExportMemoryWin32HandleInfoNV = 'False -- ' closing tick for hsc2hs {-# INLINE fieldOptional #-} fieldOptional = False {-# INLINE fieldOffset #-} fieldOffset = #{offset VkExportMemoryWin32HandleInfoNV, sType} instance CanReadField "sType" VkExportMemoryWin32HandleInfoNV where {-# INLINE getField #-} getField = vkSType {-# INLINE readField #-} readField = readVkSType instance CanWriteField "sType" VkExportMemoryWin32HandleInfoNV where {-# INLINE writeField #-} writeField = writeVkSType instance {-# OVERLAPPING #-} HasVkPNext VkExportMemoryWin32HandleInfoNV where type VkPNextMType VkExportMemoryWin32HandleInfoNV = Ptr Void {-# NOINLINE vkPNext #-} vkPNext x = unsafeDupablePerformIO (peekByteOff (unsafePtr x) #{offset VkExportMemoryWin32HandleInfoNV, pNext}) {-# INLINE vkPNextByteOffset #-} vkPNextByteOffset ~_ = #{offset VkExportMemoryWin32HandleInfoNV, pNext} {-# INLINE readVkPNext #-} readVkPNext p = peekByteOff p #{offset VkExportMemoryWin32HandleInfoNV, pNext} {-# INLINE writeVkPNext #-} writeVkPNext p = pokeByteOff p #{offset VkExportMemoryWin32HandleInfoNV, pNext} instance {-# OVERLAPPING #-} HasField "pNext" VkExportMemoryWin32HandleInfoNV where type FieldType "pNext" VkExportMemoryWin32HandleInfoNV = Ptr Void type FieldOptional "pNext" VkExportMemoryWin32HandleInfoNV = 'False -- ' closing tick for hsc2hs type FieldOffset "pNext" VkExportMemoryWin32HandleInfoNV = #{offset VkExportMemoryWin32HandleInfoNV, pNext} type FieldIsArray "pNext" VkExportMemoryWin32HandleInfoNV = 'False -- ' closing tick for hsc2hs {-# INLINE fieldOptional #-} fieldOptional = False {-# INLINE fieldOffset #-} fieldOffset = #{offset VkExportMemoryWin32HandleInfoNV, pNext} instance CanReadField "pNext" VkExportMemoryWin32HandleInfoNV where {-# INLINE getField #-} getField = vkPNext {-# INLINE readField #-} readField = readVkPNext instance CanWriteField "pNext" VkExportMemoryWin32HandleInfoNV where {-# INLINE writeField #-} writeField = writeVkPNext instance {-# OVERLAPPING #-} HasVkPAttributes VkExportMemoryWin32HandleInfoNV where type VkPAttributesMType VkExportMemoryWin32HandleInfoNV = Ptr SECURITY_ATTRIBUTES {-# NOINLINE vkPAttributes #-} vkPAttributes x = unsafeDupablePerformIO (peekByteOff (unsafePtr x) #{offset VkExportMemoryWin32HandleInfoNV, pAttributes}) {-# INLINE vkPAttributesByteOffset #-} vkPAttributesByteOffset ~_ = #{offset VkExportMemoryWin32HandleInfoNV, pAttributes} {-# INLINE readVkPAttributes #-} readVkPAttributes p = peekByteOff p #{offset VkExportMemoryWin32HandleInfoNV, pAttributes} {-# INLINE writeVkPAttributes #-} writeVkPAttributes p = pokeByteOff p #{offset VkExportMemoryWin32HandleInfoNV, pAttributes} instance {-# OVERLAPPING #-} HasField "pAttributes" VkExportMemoryWin32HandleInfoNV where type FieldType "pAttributes" VkExportMemoryWin32HandleInfoNV = Ptr SECURITY_ATTRIBUTES type FieldOptional "pAttributes" VkExportMemoryWin32HandleInfoNV = 'True -- ' closing tick for hsc2hs type FieldOffset "pAttributes" VkExportMemoryWin32HandleInfoNV = #{offset VkExportMemoryWin32HandleInfoNV, pAttributes} type FieldIsArray "pAttributes" VkExportMemoryWin32HandleInfoNV = 'False -- ' closing tick for hsc2hs {-# INLINE fieldOptional #-} fieldOptional = True {-# INLINE fieldOffset #-} fieldOffset = #{offset VkExportMemoryWin32HandleInfoNV, pAttributes} instance CanReadField "pAttributes" VkExportMemoryWin32HandleInfoNV where {-# INLINE getField #-} getField = vkPAttributes {-# INLINE readField #-} readField = readVkPAttributes instance CanWriteField "pAttributes" VkExportMemoryWin32HandleInfoNV where {-# INLINE writeField #-} writeField = writeVkPAttributes instance {-# OVERLAPPING #-} HasVkDwAccess VkExportMemoryWin32HandleInfoNV where type VkDwAccessMType VkExportMemoryWin32HandleInfoNV = DWORD {-# NOINLINE vkDwAccess #-} vkDwAccess x = unsafeDupablePerformIO (peekByteOff (unsafePtr x) #{offset VkExportMemoryWin32HandleInfoNV, dwAccess}) {-# INLINE vkDwAccessByteOffset #-} vkDwAccessByteOffset ~_ = #{offset VkExportMemoryWin32HandleInfoNV, dwAccess} {-# INLINE readVkDwAccess #-} readVkDwAccess p = peekByteOff p #{offset VkExportMemoryWin32HandleInfoNV, dwAccess} {-# INLINE writeVkDwAccess #-} writeVkDwAccess p = pokeByteOff p #{offset VkExportMemoryWin32HandleInfoNV, dwAccess} instance {-# OVERLAPPING #-} HasField "dwAccess" VkExportMemoryWin32HandleInfoNV where type FieldType "dwAccess" VkExportMemoryWin32HandleInfoNV = DWORD type FieldOptional "dwAccess" VkExportMemoryWin32HandleInfoNV = 'True -- ' closing tick for hsc2hs type FieldOffset "dwAccess" VkExportMemoryWin32HandleInfoNV = #{offset VkExportMemoryWin32HandleInfoNV, dwAccess} type FieldIsArray "dwAccess" VkExportMemoryWin32HandleInfoNV = 'False -- ' closing tick for hsc2hs {-# INLINE fieldOptional #-} fieldOptional = True {-# INLINE fieldOffset #-} fieldOffset = #{offset VkExportMemoryWin32HandleInfoNV, dwAccess} instance CanReadField "dwAccess" VkExportMemoryWin32HandleInfoNV where {-# INLINE getField #-} getField = vkDwAccess {-# INLINE readField #-} readField = readVkDwAccess instance CanWriteField "dwAccess" VkExportMemoryWin32HandleInfoNV where {-# INLINE writeField #-} writeField = writeVkDwAccess instance Show VkExportMemoryWin32HandleInfoNV where showsPrec d x = showString "VkExportMemoryWin32HandleInfoNV {" . showString "vkSType = " . showsPrec d (vkSType x) . showString ", " . showString "vkPNext = " . showsPrec d (vkPNext x) . showString ", " . showString "vkPAttributes = " . showsPrec d (vkPAttributes x) . showString ", " . showString "vkDwAccess = " . showsPrec d (vkDwAccess x) . showChar '}'