{-# language CPP #-}
-- | = Name
--
-- VK_EXT_surface_maintenance1 - instance extension
--
-- == VK_EXT_surface_maintenance1
--
-- [__Name String__]
--     @VK_EXT_surface_maintenance1@
--
-- [__Extension Type__]
--     Instance extension
--
-- [__Registered Extension Number__]
--     275
--
-- [__Revision__]
--     1
--
-- [__Ratification Status__]
--     Not ratified
--
-- [__Extension and Version Dependencies__]
--     <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_KHR_surface VK_KHR_surface>
--     and
--     <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_KHR_get_surface_capabilities2 VK_KHR_get_surface_capabilities2>
--
-- [__Contact__]
--
--     -   Shahbaz Youssefi
--         <https://github.com/KhronosGroup/Vulkan-Docs/issues/new?body=[VK_EXT_surface_maintenance1] @syoussefi%0A*Here describe the issue or question you have about the VK_EXT_surface_maintenance1 extension* >
--
-- [__Extension Proposal__]
--     <https://github.com/KhronosGroup/Vulkan-Docs/tree/main/proposals/VK_EXT_surface_maintenance1.adoc VK_EXT_surface_maintenance1>
--
-- == Other Extension Metadata
--
-- [__Last Modified Date__]
--     2022-11-09
--
-- [__Contributors__]
--
--     -   Jeff Juliano, NVIDIA
--
--     -   Lionel Landwerlin, Intel
--
--     -   Shahbaz Youssefi, Google
--
--     -   Chris Forbes, Google
--
--     -   Ian Elliott, Google
--
--     -   Hans-Kristian Arntzen, Valve
--
--     -   Daniel Stone, Collabora
--
-- == Description
--
-- @VK_EXT_surface_maintenance1@ adds a collection of window system
-- integration features that were intentionally left out or overlooked in
-- the original @VK_KHR_surface@ extension.
--
-- The new features are as follows:
--
-- -   Allow querying number of min\/max images from a surface for a
--     particular presentation mode.
--
-- -   Allow querying a surface’s scaled presentation capabilities.
--
-- -   Allow querying a surface for the set of presentation modes which can
--     be easily switched between without requiring swapchain recreation.
--
-- == New Structures
--
-- -   Extending
--     'Vulkan.Extensions.VK_KHR_get_surface_capabilities2.PhysicalDeviceSurfaceInfo2KHR':
--
--     -   'SurfacePresentModeEXT'
--
-- -   Extending
--     'Vulkan.Extensions.VK_KHR_get_surface_capabilities2.SurfaceCapabilities2KHR':
--
--     -   'SurfacePresentModeCompatibilityEXT'
--
--     -   'SurfacePresentScalingCapabilitiesEXT'
--
-- == New Enums
--
-- -   'PresentGravityFlagBitsEXT'
--
-- -   'PresentScalingFlagBitsEXT'
--
-- == New Bitmasks
--
-- -   'PresentGravityFlagsEXT'
--
-- -   'PresentScalingFlagsEXT'
--
-- == New Enum Constants
--
-- -   'EXT_SURFACE_MAINTENANCE_1_EXTENSION_NAME'
--
-- -   'EXT_SURFACE_MAINTENANCE_1_SPEC_VERSION'
--
-- -   Extending 'Vulkan.Core10.Enums.StructureType.StructureType':
--
--     -   'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_SURFACE_PRESENT_MODE_COMPATIBILITY_EXT'
--
--     -   'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_SURFACE_PRESENT_MODE_EXT'
--
--     -   'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_SURFACE_PRESENT_SCALING_CAPABILITIES_EXT'
--
-- == Version History
--
-- -   Revision 0, 2019-02-27 (Lionel Landwerlin)
--
--     -   Internal revisions
--
-- -   Revision 1, 2022-11-09 (Shahbaz Youssefi)
--
--     -   Add functionality and complete spec
--
-- == See Also
--
-- 'PresentGravityFlagBitsEXT', 'PresentGravityFlagsEXT',
-- 'PresentScalingFlagBitsEXT', 'PresentScalingFlagsEXT',
-- 'SurfacePresentModeCompatibilityEXT', 'SurfacePresentModeEXT',
-- 'SurfacePresentScalingCapabilitiesEXT'
--
-- == Document Notes
--
-- For more information, see the
-- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#VK_EXT_surface_maintenance1 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_surface_maintenance1  ( SurfacePresentModeEXT(..)
                                                      , SurfacePresentScalingCapabilitiesEXT(..)
                                                      , SurfacePresentModeCompatibilityEXT(..)
                                                      , PresentScalingFlagsEXT
                                                      , PresentScalingFlagBitsEXT( PRESENT_SCALING_ONE_TO_ONE_BIT_EXT
                                                                                 , PRESENT_SCALING_ASPECT_RATIO_STRETCH_BIT_EXT
                                                                                 , PRESENT_SCALING_STRETCH_BIT_EXT
                                                                                 , ..
                                                                                 )
                                                      , PresentGravityFlagsEXT
                                                      , PresentGravityFlagBitsEXT( PRESENT_GRAVITY_MIN_BIT_EXT
                                                                                 , PRESENT_GRAVITY_MAX_BIT_EXT
                                                                                 , PRESENT_GRAVITY_CENTERED_BIT_EXT
                                                                                 , ..
                                                                                 )
                                                      , EXT_SURFACE_MAINTENANCE_1_SPEC_VERSION
                                                      , pattern EXT_SURFACE_MAINTENANCE_1_SPEC_VERSION
                                                      , EXT_SURFACE_MAINTENANCE_1_EXTENSION_NAME
                                                      , pattern EXT_SURFACE_MAINTENANCE_1_EXTENSION_NAME
                                                      , PresentModeKHR(..)
                                                      ) where

import Data.Bits (Bits)
import Data.Bits (FiniteBits)
import Vulkan.Internal.Utils (enumReadPrec)
import Vulkan.Internal.Utils (enumShowsPrec)
import Foreign.Marshal.Alloc (allocaBytes)
import Foreign.Ptr (nullPtr)
import Foreign.Ptr (plusPtr)
import GHC.Show (showString)
import Numeric (showHex)
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 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 Foreign.Ptr (Ptr)
import GHC.Read (Read(readPrec))
import GHC.Show (Show(showsPrec))
import Data.Word (Word32)
import Data.Kind (Type)
import Vulkan.Core10.FundamentalTypes (Extent2D)
import Vulkan.Core10.FundamentalTypes (Flags)
import Vulkan.Extensions.VK_KHR_surface (PresentModeKHR)
import Vulkan.Core10.Enums.StructureType (StructureType)
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_SURFACE_PRESENT_MODE_COMPATIBILITY_EXT))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_SURFACE_PRESENT_MODE_EXT))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_SURFACE_PRESENT_SCALING_CAPABILITIES_EXT))
import Vulkan.Extensions.VK_KHR_surface (PresentModeKHR(..))
-- | VkSurfacePresentModeEXT - Structure describing present mode of a surface
--
-- = Description
--
-- If the 'SurfacePresentModeEXT' structure is included in the @pNext@
-- chain of
-- 'Vulkan.Extensions.VK_KHR_get_surface_capabilities2.PhysicalDeviceSurfaceInfo2KHR',
-- the values returned in
-- 'Vulkan.Extensions.VK_KHR_surface.SurfaceCapabilitiesKHR'::@minImageCount@,
-- 'Vulkan.Extensions.VK_KHR_surface.SurfaceCapabilitiesKHR'::@maxImageCount@,
-- 'SurfacePresentScalingCapabilitiesEXT'::@minScaledImageExtent@, and
-- 'SurfacePresentScalingCapabilitiesEXT'::@maxScaledImageExtent@ are valid
-- only for the specified @presentMode@. If @presentMode@ is
-- 'Vulkan.Extensions.VK_KHR_surface.PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR'
-- or
-- 'Vulkan.Extensions.VK_KHR_surface.PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR',
-- the per-present mode image counts /must/ both be one. The per-present
-- mode image counts /may/ be less-than or greater-than the image counts
-- returned when 'SurfacePresentModeEXT' is not provided.
--
-- Note
--
-- If
-- 'Vulkan.Extensions.VK_EXT_swapchain_maintenance1.SwapchainPresentModesCreateInfoEXT'
-- is provided to swapchain creation, the requirements for forward progress
-- may be less strict. For example, a FIFO swapchain might only require 2
-- images to guarantee forward progress, but a MAILBOX one might require 4.
-- Without the per-present image counts, such an implementation would have
-- to return 4 in
-- 'Vulkan.Extensions.VK_KHR_surface.SurfaceCapabilitiesKHR'::@minImageCount@,
-- which pessimizes FIFO. Conversely, an implementation may return a low
-- number for minImageCount, but internally bump the image count when
-- application queries
-- 'Vulkan.Extensions.VK_KHR_swapchain.getSwapchainImagesKHR', which can
-- surprise applications, and is not discoverable until swapchain creation.
-- Using 'SurfacePresentModeEXT' and
-- 'Vulkan.Extensions.VK_EXT_swapchain_maintenance1.SwapchainPresentModesCreateInfoEXT'
-- together effectively removes this problem.
--
-- 'Vulkan.Extensions.VK_EXT_swapchain_maintenance1.SwapchainPresentModesCreateInfoEXT'
-- is required for the specification to be backwards compatible with
-- applications that do not know about, or make use of this feature.
--
-- == Valid Usage (Implicit)
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_EXT_surface_maintenance1 VK_EXT_surface_maintenance1>,
-- 'Vulkan.Extensions.VK_KHR_surface.PresentModeKHR',
-- 'Vulkan.Core10.Enums.StructureType.StructureType'
data SurfacePresentModeEXT = SurfacePresentModeEXT
  { -- | @presentMode@ is the presentation mode the swapchain will use.
    --
    -- #VUID-VkSurfacePresentModeEXT-presentMode-07780# @presentMode@ /must/ be
    -- a value reported by
    -- 'Vulkan.Extensions.VK_KHR_surface.getPhysicalDeviceSurfacePresentModesKHR'
    -- for the specified surface.
    --
    -- #VUID-VkSurfacePresentModeEXT-presentMode-parameter# @presentMode@
    -- /must/ be a valid 'Vulkan.Extensions.VK_KHR_surface.PresentModeKHR'
    -- value
    SurfacePresentModeEXT -> PresentModeKHR
presentMode :: PresentModeKHR }
  deriving (Typeable, SurfacePresentModeEXT -> SurfacePresentModeEXT -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SurfacePresentModeEXT -> SurfacePresentModeEXT -> Bool
$c/= :: SurfacePresentModeEXT -> SurfacePresentModeEXT -> Bool
== :: SurfacePresentModeEXT -> SurfacePresentModeEXT -> Bool
$c== :: SurfacePresentModeEXT -> SurfacePresentModeEXT -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (SurfacePresentModeEXT)
#endif
deriving instance Show SurfacePresentModeEXT

instance ToCStruct SurfacePresentModeEXT where
  withCStruct :: forall b.
SurfacePresentModeEXT
-> (Ptr SurfacePresentModeEXT -> IO b) -> IO b
withCStruct SurfacePresentModeEXT
x Ptr SurfacePresentModeEXT -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
24 forall a b. (a -> b) -> a -> b
$ \Ptr SurfacePresentModeEXT
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr SurfacePresentModeEXT
p SurfacePresentModeEXT
x (Ptr SurfacePresentModeEXT -> IO b
f Ptr SurfacePresentModeEXT
p)
  pokeCStruct :: forall b.
Ptr SurfacePresentModeEXT -> SurfacePresentModeEXT -> IO b -> IO b
pokeCStruct Ptr SurfacePresentModeEXT
p SurfacePresentModeEXT{PresentModeKHR
presentMode :: PresentModeKHR
$sel:presentMode:SurfacePresentModeEXT :: SurfacePresentModeEXT -> PresentModeKHR
..} IO b
f = do
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SurfacePresentModeEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_SURFACE_PRESENT_MODE_EXT)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SurfacePresentModeEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SurfacePresentModeEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr PresentModeKHR)) (PresentModeKHR
presentMode)
    IO b
f
  cStructSize :: Int
cStructSize = Int
24
  cStructAlignment :: Int
cStructAlignment = Int
8
  pokeZeroCStruct :: forall b. Ptr SurfacePresentModeEXT -> IO b -> IO b
pokeZeroCStruct Ptr SurfacePresentModeEXT
p IO b
f = do
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SurfacePresentModeEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_SURFACE_PRESENT_MODE_EXT)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SurfacePresentModeEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SurfacePresentModeEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr PresentModeKHR)) (forall a. Zero a => a
zero)
    IO b
f

instance FromCStruct SurfacePresentModeEXT where
  peekCStruct :: Ptr SurfacePresentModeEXT -> IO SurfacePresentModeEXT
peekCStruct Ptr SurfacePresentModeEXT
p = do
    PresentModeKHR
presentMode <- forall a. Storable a => Ptr a -> IO a
peek @PresentModeKHR ((Ptr SurfacePresentModeEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr PresentModeKHR))
    forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ PresentModeKHR -> SurfacePresentModeEXT
SurfacePresentModeEXT
             PresentModeKHR
presentMode

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

instance Zero SurfacePresentModeEXT where
  zero :: SurfacePresentModeEXT
zero = PresentModeKHR -> SurfacePresentModeEXT
SurfacePresentModeEXT
           forall a. Zero a => a
zero


-- | VkSurfacePresentScalingCapabilitiesEXT - Structure describing the
-- presentation scaling capabilities of the surface
--
-- = Description
--
-- Before creating a swapchain whose scaling mode /can/ be specified
-- through the use of
-- 'Vulkan.Extensions.VK_EXT_swapchain_maintenance1.SwapchainPresentScalingCreateInfoEXT',
-- obtain the set of supported scaling modes by including a
-- 'SurfacePresentModeEXT' structure in the @pNext@ chain of
-- 'Vulkan.Extensions.VK_KHR_get_surface_capabilities2.PhysicalDeviceSurfaceInfo2KHR'
-- when calling
-- 'Vulkan.Extensions.VK_KHR_get_surface_capabilities2.getPhysicalDeviceSurfaceCapabilities2KHR'.
-- The implementation /must/ return the same values in
-- 'SurfacePresentScalingCapabilitiesEXT' for any of the compatible present
-- modes as obtained through 'SurfacePresentModeCompatibilityEXT'.
--
-- == Valid Usage (Implicit)
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_EXT_surface_maintenance1 VK_EXT_surface_maintenance1>,
-- 'Vulkan.Core10.FundamentalTypes.Extent2D', 'PresentGravityFlagsEXT',
-- 'PresentScalingFlagsEXT',
-- 'Vulkan.Core10.Enums.StructureType.StructureType'
data SurfacePresentScalingCapabilitiesEXT = SurfacePresentScalingCapabilitiesEXT
  { -- | @supportedPresentScaling@ is a bitmask of 'PresentScalingFlagBitsEXT'
    -- representing the scaling methods supported by the surface, or @0@ if
    -- application-defined scaling is not supported.
    --
    -- #VUID-VkSurfacePresentScalingCapabilitiesEXT-supportedPresentScaling-parameter#
    -- @supportedPresentScaling@ /must/ be a valid combination of
    -- 'PresentScalingFlagBitsEXT' values
    SurfacePresentScalingCapabilitiesEXT -> PresentScalingFlagBitsEXT
supportedPresentScaling :: PresentScalingFlagsEXT
  , -- | @supportedPresentGravityX@ is a bitmask of 'PresentGravityFlagBitsEXT'
    -- representing the X-axis pixel gravity supported by the surface, or @0@
    -- if Vulkan-defined pixel gravity is not supported for the X axis.
    --
    -- #VUID-VkSurfacePresentScalingCapabilitiesEXT-supportedPresentGravityX-parameter#
    -- @supportedPresentGravityX@ /must/ be a valid combination of
    -- 'PresentGravityFlagBitsEXT' values
    SurfacePresentScalingCapabilitiesEXT -> PresentGravityFlagBitsEXT
supportedPresentGravityX :: PresentGravityFlagsEXT
  , -- | @supportedPresentGravityY@ is a bitmask of 'PresentGravityFlagBitsEXT'
    -- representing the Y-axis pixel gravity supported by the surface, or @0@
    -- if Vulkan-defined pixel gravity is not supported for the Y axis.
    --
    -- #VUID-VkSurfacePresentScalingCapabilitiesEXT-supportedPresentGravityY-parameter#
    -- @supportedPresentGravityY@ /must/ be a valid combination of
    -- 'PresentGravityFlagBitsEXT' values
    SurfacePresentScalingCapabilitiesEXT -> PresentGravityFlagBitsEXT
supportedPresentGravityY :: PresentGravityFlagsEXT
  , -- | @minScaledImageExtent@ contains the smallest valid swapchain extent for
    -- the surface on the specified device when one of the scaling methods
    -- specified in @supportedPresentScaling@ is used, or the special value
    -- (0xFFFFFFFF, 0xFFFFFFFF) indicating that the surface size will be
    -- determined by the extent of a swapchain targeting the surface. The
    -- @width@ and @height@ of the extent will each be smaller than or equal to
    -- the corresponding @width@ and @height@ of
    -- 'Vulkan.Extensions.VK_KHR_surface.SurfaceCapabilitiesKHR'::@minImageExtent@.
    SurfacePresentScalingCapabilitiesEXT -> Extent2D
minScaledImageExtent :: Extent2D
  , -- | @maxScaledImageExtent@ contains the largest valid swapchain extent for
    -- the surface on the specified device when one of the scaling methods
    -- specified in @supportedPresentScaling@ is used, or the special value
    -- described above for @minScaledImageExtent@. The @width@ and @height@ of
    -- the extent will each be greater than or equal to the corresponding
    -- @width@ and @height@ of
    -- 'Vulkan.Extensions.VK_KHR_surface.SurfaceCapabilitiesKHR'::@maxImageExtent@.
    SurfacePresentScalingCapabilitiesEXT -> Extent2D
maxScaledImageExtent :: Extent2D
  }
  deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (SurfacePresentScalingCapabilitiesEXT)
#endif
deriving instance Show SurfacePresentScalingCapabilitiesEXT

instance ToCStruct SurfacePresentScalingCapabilitiesEXT where
  withCStruct :: forall b.
SurfacePresentScalingCapabilitiesEXT
-> (Ptr SurfacePresentScalingCapabilitiesEXT -> IO b) -> IO b
withCStruct SurfacePresentScalingCapabilitiesEXT
x Ptr SurfacePresentScalingCapabilitiesEXT -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
48 forall a b. (a -> b) -> a -> b
$ \Ptr SurfacePresentScalingCapabilitiesEXT
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr SurfacePresentScalingCapabilitiesEXT
p SurfacePresentScalingCapabilitiesEXT
x (Ptr SurfacePresentScalingCapabilitiesEXT -> IO b
f Ptr SurfacePresentScalingCapabilitiesEXT
p)
  pokeCStruct :: forall b.
Ptr SurfacePresentScalingCapabilitiesEXT
-> SurfacePresentScalingCapabilitiesEXT -> IO b -> IO b
pokeCStruct Ptr SurfacePresentScalingCapabilitiesEXT
p SurfacePresentScalingCapabilitiesEXT{Extent2D
PresentGravityFlagBitsEXT
PresentScalingFlagBitsEXT
maxScaledImageExtent :: Extent2D
minScaledImageExtent :: Extent2D
supportedPresentGravityY :: PresentGravityFlagBitsEXT
supportedPresentGravityX :: PresentGravityFlagBitsEXT
supportedPresentScaling :: PresentScalingFlagBitsEXT
$sel:maxScaledImageExtent:SurfacePresentScalingCapabilitiesEXT :: SurfacePresentScalingCapabilitiesEXT -> Extent2D
$sel:minScaledImageExtent:SurfacePresentScalingCapabilitiesEXT :: SurfacePresentScalingCapabilitiesEXT -> Extent2D
$sel:supportedPresentGravityY:SurfacePresentScalingCapabilitiesEXT :: SurfacePresentScalingCapabilitiesEXT -> PresentGravityFlagBitsEXT
$sel:supportedPresentGravityX:SurfacePresentScalingCapabilitiesEXT :: SurfacePresentScalingCapabilitiesEXT -> PresentGravityFlagBitsEXT
$sel:supportedPresentScaling:SurfacePresentScalingCapabilitiesEXT :: SurfacePresentScalingCapabilitiesEXT -> PresentScalingFlagBitsEXT
..} IO b
f = do
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SurfacePresentScalingCapabilitiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_SURFACE_PRESENT_SCALING_CAPABILITIES_EXT)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SurfacePresentScalingCapabilitiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SurfacePresentScalingCapabilitiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr PresentScalingFlagsEXT)) (PresentScalingFlagBitsEXT
supportedPresentScaling)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SurfacePresentScalingCapabilitiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr PresentGravityFlagsEXT)) (PresentGravityFlagBitsEXT
supportedPresentGravityX)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SurfacePresentScalingCapabilitiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr PresentGravityFlagsEXT)) (PresentGravityFlagBitsEXT
supportedPresentGravityY)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SurfacePresentScalingCapabilitiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
28 :: Ptr Extent2D)) (Extent2D
minScaledImageExtent)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SurfacePresentScalingCapabilitiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
36 :: Ptr Extent2D)) (Extent2D
maxScaledImageExtent)
    IO b
f
  cStructSize :: Int
cStructSize = Int
48
  cStructAlignment :: Int
cStructAlignment = Int
8
  pokeZeroCStruct :: forall b. Ptr SurfacePresentScalingCapabilitiesEXT -> IO b -> IO b
pokeZeroCStruct Ptr SurfacePresentScalingCapabilitiesEXT
p IO b
f = do
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SurfacePresentScalingCapabilitiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_SURFACE_PRESENT_SCALING_CAPABILITIES_EXT)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SurfacePresentScalingCapabilitiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
    IO b
f

instance FromCStruct SurfacePresentScalingCapabilitiesEXT where
  peekCStruct :: Ptr SurfacePresentScalingCapabilitiesEXT
-> IO SurfacePresentScalingCapabilitiesEXT
peekCStruct Ptr SurfacePresentScalingCapabilitiesEXT
p = do
    PresentScalingFlagBitsEXT
supportedPresentScaling <- forall a. Storable a => Ptr a -> IO a
peek @PresentScalingFlagsEXT ((Ptr SurfacePresentScalingCapabilitiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr PresentScalingFlagsEXT))
    PresentGravityFlagBitsEXT
supportedPresentGravityX <- forall a. Storable a => Ptr a -> IO a
peek @PresentGravityFlagsEXT ((Ptr SurfacePresentScalingCapabilitiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr PresentGravityFlagsEXT))
    PresentGravityFlagBitsEXT
supportedPresentGravityY <- forall a. Storable a => Ptr a -> IO a
peek @PresentGravityFlagsEXT ((Ptr SurfacePresentScalingCapabilitiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr PresentGravityFlagsEXT))
    Extent2D
minScaledImageExtent <- forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @Extent2D ((Ptr SurfacePresentScalingCapabilitiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
28 :: Ptr Extent2D))
    Extent2D
maxScaledImageExtent <- forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @Extent2D ((Ptr SurfacePresentScalingCapabilitiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
36 :: Ptr Extent2D))
    forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ PresentScalingFlagBitsEXT
-> PresentGravityFlagBitsEXT
-> PresentGravityFlagBitsEXT
-> Extent2D
-> Extent2D
-> SurfacePresentScalingCapabilitiesEXT
SurfacePresentScalingCapabilitiesEXT
             PresentScalingFlagBitsEXT
supportedPresentScaling
             PresentGravityFlagBitsEXT
supportedPresentGravityX
             PresentGravityFlagBitsEXT
supportedPresentGravityY
             Extent2D
minScaledImageExtent
             Extent2D
maxScaledImageExtent

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

instance Zero SurfacePresentScalingCapabilitiesEXT where
  zero :: SurfacePresentScalingCapabilitiesEXT
zero = PresentScalingFlagBitsEXT
-> PresentGravityFlagBitsEXT
-> PresentGravityFlagBitsEXT
-> Extent2D
-> Extent2D
-> SurfacePresentScalingCapabilitiesEXT
SurfacePresentScalingCapabilitiesEXT
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero


-- | VkSurfacePresentModeCompatibilityEXT - Structure describing the subset
-- of compatible presentation modes for the purposes of switching without
-- swapchain recreation
--
-- = Description
--
-- If @pPresentModes@ is @NULL@, then the number of present modes that are
-- compatible with the one specified in 'SurfacePresentModeEXT' is returned
-- in @presentModeCount@. Otherwise, @presentModeCount@ must be set by the
-- user to the number of elements in the @pPresentModes@ array, and on
-- return the variable is overwritten with the number of values actually
-- written to @pPresentModes@. If the value of @presentModeCount@ is less
-- than the number of compatible present modes that are supported, at most
-- @presentModeCount@ values will be written to @pPresentModes@. The
-- implementation /must/ include the present mode passed to
-- 'SurfacePresentModeEXT' in @pPresentModes@, unless @presentModeCount@ is
-- zero.
--
-- Before creating a swapchain whose present modes /can/ be modified
-- through the use of
-- 'Vulkan.Extensions.VK_EXT_swapchain_maintenance1.SwapchainPresentModesCreateInfoEXT',
-- obtain the set of present modes compatible with a given initial present
-- mode by including a 'SurfacePresentModeEXT' structure in the @pNext@
-- chain of
-- 'Vulkan.Extensions.VK_KHR_get_surface_capabilities2.PhysicalDeviceSurfaceInfo2KHR'
-- when calling
-- 'Vulkan.Extensions.VK_KHR_get_surface_capabilities2.getPhysicalDeviceSurfaceCapabilities2KHR'.
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-VkSurfacePresentModeCompatibilityEXT-sType-sType# @sType@
--     /must/ be
--     'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_SURFACE_PRESENT_MODE_COMPATIBILITY_EXT'
--
-- -   #VUID-VkSurfacePresentModeCompatibilityEXT-pPresentModes-parameter#
--     If @presentModeCount@ is not @0@, and @pPresentModes@ is not @NULL@,
--     @pPresentModes@ /must/ be a valid pointer to an array of
--     @presentModeCount@ 'Vulkan.Extensions.VK_KHR_surface.PresentModeKHR'
--     values
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_EXT_surface_maintenance1 VK_EXT_surface_maintenance1>,
-- 'Vulkan.Extensions.VK_KHR_surface.PresentModeKHR',
-- 'Vulkan.Core10.Enums.StructureType.StructureType'
data SurfacePresentModeCompatibilityEXT = SurfacePresentModeCompatibilityEXT
  { -- | @presentModeCount@ is an integer related to the number of present modes
    -- available or queried, as described below.
    SurfacePresentModeCompatibilityEXT -> Flags
presentModeCount :: Word32
  , -- | @pPresentModes@ is a pointer to an array of
    -- 'Vulkan.Extensions.VK_KHR_surface.PresentModeKHR' in which present modes
    -- compatible with a given present mode are returned.
    SurfacePresentModeCompatibilityEXT -> Ptr PresentModeKHR
presentModes :: Ptr PresentModeKHR
  }
  deriving (Typeable, SurfacePresentModeCompatibilityEXT
-> SurfacePresentModeCompatibilityEXT -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SurfacePresentModeCompatibilityEXT
-> SurfacePresentModeCompatibilityEXT -> Bool
$c/= :: SurfacePresentModeCompatibilityEXT
-> SurfacePresentModeCompatibilityEXT -> Bool
== :: SurfacePresentModeCompatibilityEXT
-> SurfacePresentModeCompatibilityEXT -> Bool
$c== :: SurfacePresentModeCompatibilityEXT
-> SurfacePresentModeCompatibilityEXT -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (SurfacePresentModeCompatibilityEXT)
#endif
deriving instance Show SurfacePresentModeCompatibilityEXT

instance ToCStruct SurfacePresentModeCompatibilityEXT where
  withCStruct :: forall b.
SurfacePresentModeCompatibilityEXT
-> (Ptr SurfacePresentModeCompatibilityEXT -> IO b) -> IO b
withCStruct SurfacePresentModeCompatibilityEXT
x Ptr SurfacePresentModeCompatibilityEXT -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
32 forall a b. (a -> b) -> a -> b
$ \Ptr SurfacePresentModeCompatibilityEXT
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr SurfacePresentModeCompatibilityEXT
p SurfacePresentModeCompatibilityEXT
x (Ptr SurfacePresentModeCompatibilityEXT -> IO b
f Ptr SurfacePresentModeCompatibilityEXT
p)
  pokeCStruct :: forall b.
Ptr SurfacePresentModeCompatibilityEXT
-> SurfacePresentModeCompatibilityEXT -> IO b -> IO b
pokeCStruct Ptr SurfacePresentModeCompatibilityEXT
p SurfacePresentModeCompatibilityEXT{Flags
Ptr PresentModeKHR
presentModes :: Ptr PresentModeKHR
presentModeCount :: Flags
$sel:presentModes:SurfacePresentModeCompatibilityEXT :: SurfacePresentModeCompatibilityEXT -> Ptr PresentModeKHR
$sel:presentModeCount:SurfacePresentModeCompatibilityEXT :: SurfacePresentModeCompatibilityEXT -> Flags
..} IO b
f = do
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SurfacePresentModeCompatibilityEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_SURFACE_PRESENT_MODE_COMPATIBILITY_EXT)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SurfacePresentModeCompatibilityEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SurfacePresentModeCompatibilityEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word32)) (Flags
presentModeCount)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SurfacePresentModeCompatibilityEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr (Ptr PresentModeKHR))) (Ptr PresentModeKHR
presentModes)
    IO b
f
  cStructSize :: Int
cStructSize = Int
32
  cStructAlignment :: Int
cStructAlignment = Int
8
  pokeZeroCStruct :: forall b. Ptr SurfacePresentModeCompatibilityEXT -> IO b -> IO b
pokeZeroCStruct Ptr SurfacePresentModeCompatibilityEXT
p IO b
f = do
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SurfacePresentModeCompatibilityEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_SURFACE_PRESENT_MODE_COMPATIBILITY_EXT)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SurfacePresentModeCompatibilityEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
    IO b
f

instance FromCStruct SurfacePresentModeCompatibilityEXT where
  peekCStruct :: Ptr SurfacePresentModeCompatibilityEXT
-> IO SurfacePresentModeCompatibilityEXT
peekCStruct Ptr SurfacePresentModeCompatibilityEXT
p = do
    Flags
presentModeCount <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr SurfacePresentModeCompatibilityEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word32))
    Ptr PresentModeKHR
pPresentModes <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr PresentModeKHR) ((Ptr SurfacePresentModeCompatibilityEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr (Ptr PresentModeKHR)))
    forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ Flags -> Ptr PresentModeKHR -> SurfacePresentModeCompatibilityEXT
SurfacePresentModeCompatibilityEXT
             Flags
presentModeCount Ptr PresentModeKHR
pPresentModes

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

instance Zero SurfacePresentModeCompatibilityEXT where
  zero :: SurfacePresentModeCompatibilityEXT
zero = Flags -> Ptr PresentModeKHR -> SurfacePresentModeCompatibilityEXT
SurfacePresentModeCompatibilityEXT
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero


type PresentScalingFlagsEXT = PresentScalingFlagBitsEXT

-- | VkPresentScalingFlagBitsEXT - Bitmask specifying presentation scaling
-- methods
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_EXT_surface_maintenance1 VK_EXT_surface_maintenance1>,
-- 'PresentScalingFlagsEXT'
newtype PresentScalingFlagBitsEXT = PresentScalingFlagBitsEXT Flags
  deriving newtype (PresentScalingFlagBitsEXT -> PresentScalingFlagBitsEXT -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PresentScalingFlagBitsEXT -> PresentScalingFlagBitsEXT -> Bool
$c/= :: PresentScalingFlagBitsEXT -> PresentScalingFlagBitsEXT -> Bool
== :: PresentScalingFlagBitsEXT -> PresentScalingFlagBitsEXT -> Bool
$c== :: PresentScalingFlagBitsEXT -> PresentScalingFlagBitsEXT -> Bool
Eq, Eq PresentScalingFlagBitsEXT
PresentScalingFlagBitsEXT -> PresentScalingFlagBitsEXT -> Bool
PresentScalingFlagBitsEXT -> PresentScalingFlagBitsEXT -> Ordering
PresentScalingFlagBitsEXT
-> PresentScalingFlagBitsEXT -> PresentScalingFlagBitsEXT
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 :: PresentScalingFlagBitsEXT
-> PresentScalingFlagBitsEXT -> PresentScalingFlagBitsEXT
$cmin :: PresentScalingFlagBitsEXT
-> PresentScalingFlagBitsEXT -> PresentScalingFlagBitsEXT
max :: PresentScalingFlagBitsEXT
-> PresentScalingFlagBitsEXT -> PresentScalingFlagBitsEXT
$cmax :: PresentScalingFlagBitsEXT
-> PresentScalingFlagBitsEXT -> PresentScalingFlagBitsEXT
>= :: PresentScalingFlagBitsEXT -> PresentScalingFlagBitsEXT -> Bool
$c>= :: PresentScalingFlagBitsEXT -> PresentScalingFlagBitsEXT -> Bool
> :: PresentScalingFlagBitsEXT -> PresentScalingFlagBitsEXT -> Bool
$c> :: PresentScalingFlagBitsEXT -> PresentScalingFlagBitsEXT -> Bool
<= :: PresentScalingFlagBitsEXT -> PresentScalingFlagBitsEXT -> Bool
$c<= :: PresentScalingFlagBitsEXT -> PresentScalingFlagBitsEXT -> Bool
< :: PresentScalingFlagBitsEXT -> PresentScalingFlagBitsEXT -> Bool
$c< :: PresentScalingFlagBitsEXT -> PresentScalingFlagBitsEXT -> Bool
compare :: PresentScalingFlagBitsEXT -> PresentScalingFlagBitsEXT -> Ordering
$ccompare :: PresentScalingFlagBitsEXT -> PresentScalingFlagBitsEXT -> Ordering
Ord, Ptr PresentScalingFlagBitsEXT -> IO PresentScalingFlagBitsEXT
Ptr PresentScalingFlagBitsEXT
-> Int -> IO PresentScalingFlagBitsEXT
Ptr PresentScalingFlagBitsEXT
-> Int -> PresentScalingFlagBitsEXT -> IO ()
Ptr PresentScalingFlagBitsEXT -> PresentScalingFlagBitsEXT -> IO ()
PresentScalingFlagBitsEXT -> Int
forall b. Ptr b -> Int -> IO PresentScalingFlagBitsEXT
forall b. Ptr b -> Int -> PresentScalingFlagBitsEXT -> 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 PresentScalingFlagBitsEXT -> PresentScalingFlagBitsEXT -> IO ()
$cpoke :: Ptr PresentScalingFlagBitsEXT -> PresentScalingFlagBitsEXT -> IO ()
peek :: Ptr PresentScalingFlagBitsEXT -> IO PresentScalingFlagBitsEXT
$cpeek :: Ptr PresentScalingFlagBitsEXT -> IO PresentScalingFlagBitsEXT
pokeByteOff :: forall b. Ptr b -> Int -> PresentScalingFlagBitsEXT -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> PresentScalingFlagBitsEXT -> IO ()
peekByteOff :: forall b. Ptr b -> Int -> IO PresentScalingFlagBitsEXT
$cpeekByteOff :: forall b. Ptr b -> Int -> IO PresentScalingFlagBitsEXT
pokeElemOff :: Ptr PresentScalingFlagBitsEXT
-> Int -> PresentScalingFlagBitsEXT -> IO ()
$cpokeElemOff :: Ptr PresentScalingFlagBitsEXT
-> Int -> PresentScalingFlagBitsEXT -> IO ()
peekElemOff :: Ptr PresentScalingFlagBitsEXT
-> Int -> IO PresentScalingFlagBitsEXT
$cpeekElemOff :: Ptr PresentScalingFlagBitsEXT
-> Int -> IO PresentScalingFlagBitsEXT
alignment :: PresentScalingFlagBitsEXT -> Int
$calignment :: PresentScalingFlagBitsEXT -> Int
sizeOf :: PresentScalingFlagBitsEXT -> Int
$csizeOf :: PresentScalingFlagBitsEXT -> Int
Storable, PresentScalingFlagBitsEXT
forall a. a -> Zero a
zero :: PresentScalingFlagBitsEXT
$czero :: PresentScalingFlagBitsEXT
Zero, Eq PresentScalingFlagBitsEXT
PresentScalingFlagBitsEXT
Int -> PresentScalingFlagBitsEXT
PresentScalingFlagBitsEXT -> Bool
PresentScalingFlagBitsEXT -> Int
PresentScalingFlagBitsEXT -> Maybe Int
PresentScalingFlagBitsEXT -> PresentScalingFlagBitsEXT
PresentScalingFlagBitsEXT -> Int -> Bool
PresentScalingFlagBitsEXT -> Int -> PresentScalingFlagBitsEXT
PresentScalingFlagBitsEXT
-> PresentScalingFlagBitsEXT -> PresentScalingFlagBitsEXT
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 :: PresentScalingFlagBitsEXT -> Int
$cpopCount :: PresentScalingFlagBitsEXT -> Int
rotateR :: PresentScalingFlagBitsEXT -> Int -> PresentScalingFlagBitsEXT
$crotateR :: PresentScalingFlagBitsEXT -> Int -> PresentScalingFlagBitsEXT
rotateL :: PresentScalingFlagBitsEXT -> Int -> PresentScalingFlagBitsEXT
$crotateL :: PresentScalingFlagBitsEXT -> Int -> PresentScalingFlagBitsEXT
unsafeShiftR :: PresentScalingFlagBitsEXT -> Int -> PresentScalingFlagBitsEXT
$cunsafeShiftR :: PresentScalingFlagBitsEXT -> Int -> PresentScalingFlagBitsEXT
shiftR :: PresentScalingFlagBitsEXT -> Int -> PresentScalingFlagBitsEXT
$cshiftR :: PresentScalingFlagBitsEXT -> Int -> PresentScalingFlagBitsEXT
unsafeShiftL :: PresentScalingFlagBitsEXT -> Int -> PresentScalingFlagBitsEXT
$cunsafeShiftL :: PresentScalingFlagBitsEXT -> Int -> PresentScalingFlagBitsEXT
shiftL :: PresentScalingFlagBitsEXT -> Int -> PresentScalingFlagBitsEXT
$cshiftL :: PresentScalingFlagBitsEXT -> Int -> PresentScalingFlagBitsEXT
isSigned :: PresentScalingFlagBitsEXT -> Bool
$cisSigned :: PresentScalingFlagBitsEXT -> Bool
bitSize :: PresentScalingFlagBitsEXT -> Int
$cbitSize :: PresentScalingFlagBitsEXT -> Int
bitSizeMaybe :: PresentScalingFlagBitsEXT -> Maybe Int
$cbitSizeMaybe :: PresentScalingFlagBitsEXT -> Maybe Int
testBit :: PresentScalingFlagBitsEXT -> Int -> Bool
$ctestBit :: PresentScalingFlagBitsEXT -> Int -> Bool
complementBit :: PresentScalingFlagBitsEXT -> Int -> PresentScalingFlagBitsEXT
$ccomplementBit :: PresentScalingFlagBitsEXT -> Int -> PresentScalingFlagBitsEXT
clearBit :: PresentScalingFlagBitsEXT -> Int -> PresentScalingFlagBitsEXT
$cclearBit :: PresentScalingFlagBitsEXT -> Int -> PresentScalingFlagBitsEXT
setBit :: PresentScalingFlagBitsEXT -> Int -> PresentScalingFlagBitsEXT
$csetBit :: PresentScalingFlagBitsEXT -> Int -> PresentScalingFlagBitsEXT
bit :: Int -> PresentScalingFlagBitsEXT
$cbit :: Int -> PresentScalingFlagBitsEXT
zeroBits :: PresentScalingFlagBitsEXT
$czeroBits :: PresentScalingFlagBitsEXT
rotate :: PresentScalingFlagBitsEXT -> Int -> PresentScalingFlagBitsEXT
$crotate :: PresentScalingFlagBitsEXT -> Int -> PresentScalingFlagBitsEXT
shift :: PresentScalingFlagBitsEXT -> Int -> PresentScalingFlagBitsEXT
$cshift :: PresentScalingFlagBitsEXT -> Int -> PresentScalingFlagBitsEXT
complement :: PresentScalingFlagBitsEXT -> PresentScalingFlagBitsEXT
$ccomplement :: PresentScalingFlagBitsEXT -> PresentScalingFlagBitsEXT
xor :: PresentScalingFlagBitsEXT
-> PresentScalingFlagBitsEXT -> PresentScalingFlagBitsEXT
$cxor :: PresentScalingFlagBitsEXT
-> PresentScalingFlagBitsEXT -> PresentScalingFlagBitsEXT
.|. :: PresentScalingFlagBitsEXT
-> PresentScalingFlagBitsEXT -> PresentScalingFlagBitsEXT
$c.|. :: PresentScalingFlagBitsEXT
-> PresentScalingFlagBitsEXT -> PresentScalingFlagBitsEXT
.&. :: PresentScalingFlagBitsEXT
-> PresentScalingFlagBitsEXT -> PresentScalingFlagBitsEXT
$c.&. :: PresentScalingFlagBitsEXT
-> PresentScalingFlagBitsEXT -> PresentScalingFlagBitsEXT
Bits, Bits PresentScalingFlagBitsEXT
PresentScalingFlagBitsEXT -> Int
forall b.
Bits b -> (b -> Int) -> (b -> Int) -> (b -> Int) -> FiniteBits b
countTrailingZeros :: PresentScalingFlagBitsEXT -> Int
$ccountTrailingZeros :: PresentScalingFlagBitsEXT -> Int
countLeadingZeros :: PresentScalingFlagBitsEXT -> Int
$ccountLeadingZeros :: PresentScalingFlagBitsEXT -> Int
finiteBitSize :: PresentScalingFlagBitsEXT -> Int
$cfiniteBitSize :: PresentScalingFlagBitsEXT -> Int
FiniteBits)

-- | 'PRESENT_SCALING_ONE_TO_ONE_BIT_EXT' specifies that no scaling occurs,
-- and pixels in the swapchain image are mapped to one and only one pixel
-- in the surface. The mapping between pixels is defined by the chosen
-- presentation gravity.
pattern $bPRESENT_SCALING_ONE_TO_ONE_BIT_EXT :: PresentScalingFlagBitsEXT
$mPRESENT_SCALING_ONE_TO_ONE_BIT_EXT :: forall {r}.
PresentScalingFlagBitsEXT -> ((# #) -> r) -> ((# #) -> r) -> r
PRESENT_SCALING_ONE_TO_ONE_BIT_EXT = PresentScalingFlagBitsEXT 0x00000001

-- | 'PRESENT_SCALING_ASPECT_RATIO_STRETCH_BIT_EXT' specifies that the
-- swapchain image will be minified or magnified such that at least one of
-- the resulting width or height is equal to the corresponding surface
-- dimension, and the other resulting dimension is less than or equal to
-- the corresponding surface dimension, with the aspect ratio of the
-- resulting image being identical to that of the original swapchain image.
pattern $bPRESENT_SCALING_ASPECT_RATIO_STRETCH_BIT_EXT :: PresentScalingFlagBitsEXT
$mPRESENT_SCALING_ASPECT_RATIO_STRETCH_BIT_EXT :: forall {r}.
PresentScalingFlagBitsEXT -> ((# #) -> r) -> ((# #) -> r) -> r
PRESENT_SCALING_ASPECT_RATIO_STRETCH_BIT_EXT = PresentScalingFlagBitsEXT 0x00000002

-- | 'PRESENT_SCALING_STRETCH_BIT_EXT' specifies that the swapchain image
-- will be minified or magnified such that the resulting image dimensions
-- are equal to those of the surface.
pattern $bPRESENT_SCALING_STRETCH_BIT_EXT :: PresentScalingFlagBitsEXT
$mPRESENT_SCALING_STRETCH_BIT_EXT :: forall {r}.
PresentScalingFlagBitsEXT -> ((# #) -> r) -> ((# #) -> r) -> r
PRESENT_SCALING_STRETCH_BIT_EXT = PresentScalingFlagBitsEXT 0x00000004

conNamePresentScalingFlagBitsEXT :: String
conNamePresentScalingFlagBitsEXT :: String
conNamePresentScalingFlagBitsEXT = String
"PresentScalingFlagBitsEXT"

enumPrefixPresentScalingFlagBitsEXT :: String
enumPrefixPresentScalingFlagBitsEXT :: String
enumPrefixPresentScalingFlagBitsEXT = String
"PRESENT_SCALING_"

showTablePresentScalingFlagBitsEXT :: [(PresentScalingFlagBitsEXT, String)]
showTablePresentScalingFlagBitsEXT :: [(PresentScalingFlagBitsEXT, String)]
showTablePresentScalingFlagBitsEXT =
  [
    ( PresentScalingFlagBitsEXT
PRESENT_SCALING_ONE_TO_ONE_BIT_EXT
    , String
"ONE_TO_ONE_BIT_EXT"
    )
  ,
    ( PresentScalingFlagBitsEXT
PRESENT_SCALING_ASPECT_RATIO_STRETCH_BIT_EXT
    , String
"ASPECT_RATIO_STRETCH_BIT_EXT"
    )
  ,
    ( PresentScalingFlagBitsEXT
PRESENT_SCALING_STRETCH_BIT_EXT
    , String
"STRETCH_BIT_EXT"
    )
  ]

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

instance Read PresentScalingFlagBitsEXT where
  readPrec :: ReadPrec PresentScalingFlagBitsEXT
readPrec =
    forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec
      String
enumPrefixPresentScalingFlagBitsEXT
      [(PresentScalingFlagBitsEXT, String)]
showTablePresentScalingFlagBitsEXT
      String
conNamePresentScalingFlagBitsEXT
      Flags -> PresentScalingFlagBitsEXT
PresentScalingFlagBitsEXT

type PresentGravityFlagsEXT = PresentGravityFlagBitsEXT

-- | VkPresentGravityFlagBitsEXT - Bitmask specifying presentation pixel
-- gravity on either the x or y axis
--
-- = Description
--
-- If the value in
-- 'Vulkan.Extensions.VK_KHR_surface.SurfaceCapabilitiesKHR'::@currentTransform@
-- is not
-- 'Vulkan.Extensions.VK_KHR_surface.SURFACE_TRANSFORM_IDENTITY_BIT_KHR',
-- it is implementation-defined whether the gravity configuration applies
-- to the presented image before or after transformation.
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_EXT_surface_maintenance1 VK_EXT_surface_maintenance1>,
-- 'PresentGravityFlagsEXT'
newtype PresentGravityFlagBitsEXT = PresentGravityFlagBitsEXT Flags
  deriving newtype (PresentGravityFlagBitsEXT -> PresentGravityFlagBitsEXT -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PresentGravityFlagBitsEXT -> PresentGravityFlagBitsEXT -> Bool
$c/= :: PresentGravityFlagBitsEXT -> PresentGravityFlagBitsEXT -> Bool
== :: PresentGravityFlagBitsEXT -> PresentGravityFlagBitsEXT -> Bool
$c== :: PresentGravityFlagBitsEXT -> PresentGravityFlagBitsEXT -> Bool
Eq, Eq PresentGravityFlagBitsEXT
PresentGravityFlagBitsEXT -> PresentGravityFlagBitsEXT -> Bool
PresentGravityFlagBitsEXT -> PresentGravityFlagBitsEXT -> Ordering
PresentGravityFlagBitsEXT
-> PresentGravityFlagBitsEXT -> PresentGravityFlagBitsEXT
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 :: PresentGravityFlagBitsEXT
-> PresentGravityFlagBitsEXT -> PresentGravityFlagBitsEXT
$cmin :: PresentGravityFlagBitsEXT
-> PresentGravityFlagBitsEXT -> PresentGravityFlagBitsEXT
max :: PresentGravityFlagBitsEXT
-> PresentGravityFlagBitsEXT -> PresentGravityFlagBitsEXT
$cmax :: PresentGravityFlagBitsEXT
-> PresentGravityFlagBitsEXT -> PresentGravityFlagBitsEXT
>= :: PresentGravityFlagBitsEXT -> PresentGravityFlagBitsEXT -> Bool
$c>= :: PresentGravityFlagBitsEXT -> PresentGravityFlagBitsEXT -> Bool
> :: PresentGravityFlagBitsEXT -> PresentGravityFlagBitsEXT -> Bool
$c> :: PresentGravityFlagBitsEXT -> PresentGravityFlagBitsEXT -> Bool
<= :: PresentGravityFlagBitsEXT -> PresentGravityFlagBitsEXT -> Bool
$c<= :: PresentGravityFlagBitsEXT -> PresentGravityFlagBitsEXT -> Bool
< :: PresentGravityFlagBitsEXT -> PresentGravityFlagBitsEXT -> Bool
$c< :: PresentGravityFlagBitsEXT -> PresentGravityFlagBitsEXT -> Bool
compare :: PresentGravityFlagBitsEXT -> PresentGravityFlagBitsEXT -> Ordering
$ccompare :: PresentGravityFlagBitsEXT -> PresentGravityFlagBitsEXT -> Ordering
Ord, Ptr PresentGravityFlagBitsEXT -> IO PresentGravityFlagBitsEXT
Ptr PresentGravityFlagBitsEXT
-> Int -> IO PresentGravityFlagBitsEXT
Ptr PresentGravityFlagBitsEXT
-> Int -> PresentGravityFlagBitsEXT -> IO ()
Ptr PresentGravityFlagBitsEXT -> PresentGravityFlagBitsEXT -> IO ()
PresentGravityFlagBitsEXT -> Int
forall b. Ptr b -> Int -> IO PresentGravityFlagBitsEXT
forall b. Ptr b -> Int -> PresentGravityFlagBitsEXT -> 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 PresentGravityFlagBitsEXT -> PresentGravityFlagBitsEXT -> IO ()
$cpoke :: Ptr PresentGravityFlagBitsEXT -> PresentGravityFlagBitsEXT -> IO ()
peek :: Ptr PresentGravityFlagBitsEXT -> IO PresentGravityFlagBitsEXT
$cpeek :: Ptr PresentGravityFlagBitsEXT -> IO PresentGravityFlagBitsEXT
pokeByteOff :: forall b. Ptr b -> Int -> PresentGravityFlagBitsEXT -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> PresentGravityFlagBitsEXT -> IO ()
peekByteOff :: forall b. Ptr b -> Int -> IO PresentGravityFlagBitsEXT
$cpeekByteOff :: forall b. Ptr b -> Int -> IO PresentGravityFlagBitsEXT
pokeElemOff :: Ptr PresentGravityFlagBitsEXT
-> Int -> PresentGravityFlagBitsEXT -> IO ()
$cpokeElemOff :: Ptr PresentGravityFlagBitsEXT
-> Int -> PresentGravityFlagBitsEXT -> IO ()
peekElemOff :: Ptr PresentGravityFlagBitsEXT
-> Int -> IO PresentGravityFlagBitsEXT
$cpeekElemOff :: Ptr PresentGravityFlagBitsEXT
-> Int -> IO PresentGravityFlagBitsEXT
alignment :: PresentGravityFlagBitsEXT -> Int
$calignment :: PresentGravityFlagBitsEXT -> Int
sizeOf :: PresentGravityFlagBitsEXT -> Int
$csizeOf :: PresentGravityFlagBitsEXT -> Int
Storable, PresentGravityFlagBitsEXT
forall a. a -> Zero a
zero :: PresentGravityFlagBitsEXT
$czero :: PresentGravityFlagBitsEXT
Zero, Eq PresentGravityFlagBitsEXT
PresentGravityFlagBitsEXT
Int -> PresentGravityFlagBitsEXT
PresentGravityFlagBitsEXT -> Bool
PresentGravityFlagBitsEXT -> Int
PresentGravityFlagBitsEXT -> Maybe Int
PresentGravityFlagBitsEXT -> PresentGravityFlagBitsEXT
PresentGravityFlagBitsEXT -> Int -> Bool
PresentGravityFlagBitsEXT -> Int -> PresentGravityFlagBitsEXT
PresentGravityFlagBitsEXT
-> PresentGravityFlagBitsEXT -> PresentGravityFlagBitsEXT
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 :: PresentGravityFlagBitsEXT -> Int
$cpopCount :: PresentGravityFlagBitsEXT -> Int
rotateR :: PresentGravityFlagBitsEXT -> Int -> PresentGravityFlagBitsEXT
$crotateR :: PresentGravityFlagBitsEXT -> Int -> PresentGravityFlagBitsEXT
rotateL :: PresentGravityFlagBitsEXT -> Int -> PresentGravityFlagBitsEXT
$crotateL :: PresentGravityFlagBitsEXT -> Int -> PresentGravityFlagBitsEXT
unsafeShiftR :: PresentGravityFlagBitsEXT -> Int -> PresentGravityFlagBitsEXT
$cunsafeShiftR :: PresentGravityFlagBitsEXT -> Int -> PresentGravityFlagBitsEXT
shiftR :: PresentGravityFlagBitsEXT -> Int -> PresentGravityFlagBitsEXT
$cshiftR :: PresentGravityFlagBitsEXT -> Int -> PresentGravityFlagBitsEXT
unsafeShiftL :: PresentGravityFlagBitsEXT -> Int -> PresentGravityFlagBitsEXT
$cunsafeShiftL :: PresentGravityFlagBitsEXT -> Int -> PresentGravityFlagBitsEXT
shiftL :: PresentGravityFlagBitsEXT -> Int -> PresentGravityFlagBitsEXT
$cshiftL :: PresentGravityFlagBitsEXT -> Int -> PresentGravityFlagBitsEXT
isSigned :: PresentGravityFlagBitsEXT -> Bool
$cisSigned :: PresentGravityFlagBitsEXT -> Bool
bitSize :: PresentGravityFlagBitsEXT -> Int
$cbitSize :: PresentGravityFlagBitsEXT -> Int
bitSizeMaybe :: PresentGravityFlagBitsEXT -> Maybe Int
$cbitSizeMaybe :: PresentGravityFlagBitsEXT -> Maybe Int
testBit :: PresentGravityFlagBitsEXT -> Int -> Bool
$ctestBit :: PresentGravityFlagBitsEXT -> Int -> Bool
complementBit :: PresentGravityFlagBitsEXT -> Int -> PresentGravityFlagBitsEXT
$ccomplementBit :: PresentGravityFlagBitsEXT -> Int -> PresentGravityFlagBitsEXT
clearBit :: PresentGravityFlagBitsEXT -> Int -> PresentGravityFlagBitsEXT
$cclearBit :: PresentGravityFlagBitsEXT -> Int -> PresentGravityFlagBitsEXT
setBit :: PresentGravityFlagBitsEXT -> Int -> PresentGravityFlagBitsEXT
$csetBit :: PresentGravityFlagBitsEXT -> Int -> PresentGravityFlagBitsEXT
bit :: Int -> PresentGravityFlagBitsEXT
$cbit :: Int -> PresentGravityFlagBitsEXT
zeroBits :: PresentGravityFlagBitsEXT
$czeroBits :: PresentGravityFlagBitsEXT
rotate :: PresentGravityFlagBitsEXT -> Int -> PresentGravityFlagBitsEXT
$crotate :: PresentGravityFlagBitsEXT -> Int -> PresentGravityFlagBitsEXT
shift :: PresentGravityFlagBitsEXT -> Int -> PresentGravityFlagBitsEXT
$cshift :: PresentGravityFlagBitsEXT -> Int -> PresentGravityFlagBitsEXT
complement :: PresentGravityFlagBitsEXT -> PresentGravityFlagBitsEXT
$ccomplement :: PresentGravityFlagBitsEXT -> PresentGravityFlagBitsEXT
xor :: PresentGravityFlagBitsEXT
-> PresentGravityFlagBitsEXT -> PresentGravityFlagBitsEXT
$cxor :: PresentGravityFlagBitsEXT
-> PresentGravityFlagBitsEXT -> PresentGravityFlagBitsEXT
.|. :: PresentGravityFlagBitsEXT
-> PresentGravityFlagBitsEXT -> PresentGravityFlagBitsEXT
$c.|. :: PresentGravityFlagBitsEXT
-> PresentGravityFlagBitsEXT -> PresentGravityFlagBitsEXT
.&. :: PresentGravityFlagBitsEXT
-> PresentGravityFlagBitsEXT -> PresentGravityFlagBitsEXT
$c.&. :: PresentGravityFlagBitsEXT
-> PresentGravityFlagBitsEXT -> PresentGravityFlagBitsEXT
Bits, Bits PresentGravityFlagBitsEXT
PresentGravityFlagBitsEXT -> Int
forall b.
Bits b -> (b -> Int) -> (b -> Int) -> (b -> Int) -> FiniteBits b
countTrailingZeros :: PresentGravityFlagBitsEXT -> Int
$ccountTrailingZeros :: PresentGravityFlagBitsEXT -> Int
countLeadingZeros :: PresentGravityFlagBitsEXT -> Int
$ccountLeadingZeros :: PresentGravityFlagBitsEXT -> Int
finiteBitSize :: PresentGravityFlagBitsEXT -> Int
$cfiniteBitSize :: PresentGravityFlagBitsEXT -> Int
FiniteBits)

-- | 'PRESENT_GRAVITY_MIN_BIT_EXT' means that the pixels will gravitate
-- towards the top or left side of the surface.
pattern $bPRESENT_GRAVITY_MIN_BIT_EXT :: PresentGravityFlagBitsEXT
$mPRESENT_GRAVITY_MIN_BIT_EXT :: forall {r}.
PresentGravityFlagBitsEXT -> ((# #) -> r) -> ((# #) -> r) -> r
PRESENT_GRAVITY_MIN_BIT_EXT = PresentGravityFlagBitsEXT 0x00000001

-- | 'PRESENT_GRAVITY_MAX_BIT_EXT' means that the pixels will gravitate
-- towards the bottom or right side of the surface.
pattern $bPRESENT_GRAVITY_MAX_BIT_EXT :: PresentGravityFlagBitsEXT
$mPRESENT_GRAVITY_MAX_BIT_EXT :: forall {r}.
PresentGravityFlagBitsEXT -> ((# #) -> r) -> ((# #) -> r) -> r
PRESENT_GRAVITY_MAX_BIT_EXT = PresentGravityFlagBitsEXT 0x00000002

-- | 'PRESENT_GRAVITY_CENTERED_BIT_EXT' means that the pixels will be
-- centered in the surface.
pattern $bPRESENT_GRAVITY_CENTERED_BIT_EXT :: PresentGravityFlagBitsEXT
$mPRESENT_GRAVITY_CENTERED_BIT_EXT :: forall {r}.
PresentGravityFlagBitsEXT -> ((# #) -> r) -> ((# #) -> r) -> r
PRESENT_GRAVITY_CENTERED_BIT_EXT = PresentGravityFlagBitsEXT 0x00000004

conNamePresentGravityFlagBitsEXT :: String
conNamePresentGravityFlagBitsEXT :: String
conNamePresentGravityFlagBitsEXT = String
"PresentGravityFlagBitsEXT"

enumPrefixPresentGravityFlagBitsEXT :: String
enumPrefixPresentGravityFlagBitsEXT :: String
enumPrefixPresentGravityFlagBitsEXT = String
"PRESENT_GRAVITY_"

showTablePresentGravityFlagBitsEXT :: [(PresentGravityFlagBitsEXT, String)]
showTablePresentGravityFlagBitsEXT :: [(PresentGravityFlagBitsEXT, String)]
showTablePresentGravityFlagBitsEXT =
  [
    ( PresentGravityFlagBitsEXT
PRESENT_GRAVITY_MIN_BIT_EXT
    , String
"MIN_BIT_EXT"
    )
  ,
    ( PresentGravityFlagBitsEXT
PRESENT_GRAVITY_MAX_BIT_EXT
    , String
"MAX_BIT_EXT"
    )
  ,
    ( PresentGravityFlagBitsEXT
PRESENT_GRAVITY_CENTERED_BIT_EXT
    , String
"CENTERED_BIT_EXT"
    )
  ]

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

instance Read PresentGravityFlagBitsEXT where
  readPrec :: ReadPrec PresentGravityFlagBitsEXT
readPrec =
    forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec
      String
enumPrefixPresentGravityFlagBitsEXT
      [(PresentGravityFlagBitsEXT, String)]
showTablePresentGravityFlagBitsEXT
      String
conNamePresentGravityFlagBitsEXT
      Flags -> PresentGravityFlagBitsEXT
PresentGravityFlagBitsEXT

type EXT_SURFACE_MAINTENANCE_1_SPEC_VERSION = 1

-- No documentation found for TopLevel "VK_EXT_SURFACE_MAINTENANCE_1_SPEC_VERSION"
pattern EXT_SURFACE_MAINTENANCE_1_SPEC_VERSION :: forall a . Integral a => a
pattern $bEXT_SURFACE_MAINTENANCE_1_SPEC_VERSION :: forall a. Integral a => a
$mEXT_SURFACE_MAINTENANCE_1_SPEC_VERSION :: forall {r} {a}.
Integral a =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
EXT_SURFACE_MAINTENANCE_1_SPEC_VERSION = 1


type EXT_SURFACE_MAINTENANCE_1_EXTENSION_NAME = "VK_EXT_surface_maintenance1"

-- No documentation found for TopLevel "VK_EXT_SURFACE_MAINTENANCE_1_EXTENSION_NAME"
pattern EXT_SURFACE_MAINTENANCE_1_EXTENSION_NAME :: forall a . (Eq a, IsString a) => a
pattern $bEXT_SURFACE_MAINTENANCE_1_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a
$mEXT_SURFACE_MAINTENANCE_1_EXTENSION_NAME :: forall {r} {a}.
(Eq a, IsString a) =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
EXT_SURFACE_MAINTENANCE_1_EXTENSION_NAME = "VK_EXT_surface_maintenance1"