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