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