{-# language CPP #-}
module Vulkan.Extensions.VK_KHR_android_surface  ( createAndroidSurfaceKHR
                                                 , AndroidSurfaceCreateInfoKHR(..)
                                                 , AndroidSurfaceCreateFlagsKHR(..)
                                                 , KHR_ANDROID_SURFACE_SPEC_VERSION
                                                 , pattern KHR_ANDROID_SURFACE_SPEC_VERSION
                                                 , KHR_ANDROID_SURFACE_EXTENSION_NAME
                                                 , pattern KHR_ANDROID_SURFACE_EXTENSION_NAME
                                                 , SurfaceKHR(..)
                                                 , ANativeWindow
                                                 ) where

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.Read (choose)
import GHC.Read (expectP)
import GHC.Read (parens)
import GHC.Show (showParen)
import GHC.Show (showString)
import Numeric (showHex)
import Text.ParserCombinators.ReadPrec ((+++))
import Text.ParserCombinators.ReadPrec (prec)
import Text.ParserCombinators.ReadPrec (step)
import Control.Monad.Trans.Class (lift)
import Control.Monad.Trans.Cont (evalContT)
import Control.Monad.IO.Class (MonadIO)
import Data.Bits (Bits)
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.IO.Exception (IOErrorType(..))
import GHC.IO.Exception (IOException(..))
import Foreign.Ptr (FunPtr)
import Foreign.Ptr (Ptr)
import GHC.Read (Read(readPrec))
import Text.Read.Lex (Lexeme(Ident))
import Data.Kind (Type)
import Control.Monad.Trans.Cont (ContT(..))
import Vulkan.NamedType ((:::))
import Vulkan.Extensions.WSITypes (ANativeWindow)
import Vulkan.Core10.AllocationCallbacks (AllocationCallbacks)
import Vulkan.Core10.BaseType (Flags)
import Vulkan.CStruct (FromCStruct)
import Vulkan.CStruct (FromCStruct(..))
import Vulkan.Core10.Handles (Instance)
import Vulkan.Core10.Handles (Instance(..))
import Vulkan.Dynamic (InstanceCmds(pVkCreateAndroidSurfaceKHR))
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.CStruct (ToCStruct)
import Vulkan.CStruct (ToCStruct(..))
import Vulkan.Exception (VulkanException(..))
import Vulkan.Zero (Zero)
import Vulkan.Zero (Zero(..))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_ANDROID_SURFACE_CREATE_INFO_KHR))
import Vulkan.Core10.Enums.Result (Result(SUCCESS))
import Vulkan.Extensions.WSITypes (ANativeWindow)
import Vulkan.Extensions.Handles (SurfaceKHR(..))
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
  unsafe
#endif
  "dynamic" mkVkCreateAndroidSurfaceKHR
  :: FunPtr (Ptr Instance_T -> Ptr AndroidSurfaceCreateInfoKHR -> Ptr AllocationCallbacks -> Ptr SurfaceKHR -> IO Result) -> Ptr Instance_T -> Ptr AndroidSurfaceCreateInfoKHR -> Ptr AllocationCallbacks -> Ptr SurfaceKHR -> IO Result

-- | vkCreateAndroidSurfaceKHR - Create a
-- 'Vulkan.Extensions.Handles.SurfaceKHR' object for an Android native
-- window
--
-- = Parameters
--
-- -   @instance@ is the instance to associate the surface with.
--
-- -   @pCreateInfo@ is a pointer to a 'AndroidSurfaceCreateInfoKHR'
--     structure containing parameters affecting the creation of the
--     surface object.
--
-- -   @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>).
--
-- -   @pSurface@ is a pointer to a 'Vulkan.Extensions.Handles.SurfaceKHR'
--     handle in which the created surface object is returned.
--
-- = Description
--
-- During the lifetime of a surface created using a particular
-- 'Vulkan.Extensions.WSITypes.ANativeWindow' handle any attempts to create
-- another surface for the same 'Vulkan.Extensions.WSITypes.ANativeWindow'
-- and any attempts to connect to the same
-- 'Vulkan.Extensions.WSITypes.ANativeWindow' through other platform
-- mechanisms will fail.
--
-- Note
--
-- In particular, only one 'Vulkan.Extensions.Handles.SurfaceKHR' /can/
-- exist at a time for a given window. Similarly, a native window /cannot/
-- be used by both a 'Vulkan.Extensions.Handles.SurfaceKHR' and
-- @EGLSurface@ simultaneously.
--
-- If successful, 'createAndroidSurfaceKHR' increments the
-- 'Vulkan.Extensions.WSITypes.ANativeWindow'’s reference count, and
-- 'Vulkan.Extensions.VK_KHR_surface.destroySurfaceKHR' will decrement it.
--
-- On Android, when a swapchain’s @imageExtent@ does not match the
-- surface’s @currentExtent@, the presentable images will be scaled to the
-- surface’s dimensions during presentation. @minImageExtent@ is (1,1), and
-- @maxImageExtent@ is the maximum image size supported by the consumer.
-- For the system compositor, @currentExtent@ is the window size (i.e. the
-- consumer’s preferred size).
--
-- == Valid Usage (Implicit)
--
-- -   @instance@ /must/ be a valid 'Vulkan.Core10.Handles.Instance' handle
--
-- -   @pCreateInfo@ /must/ be a valid pointer to a valid
--     'AndroidSurfaceCreateInfoKHR' structure
--
-- -   If @pAllocator@ is not @NULL@, @pAllocator@ /must/ be a valid
--     pointer to a valid
--     'Vulkan.Core10.AllocationCallbacks.AllocationCallbacks' structure
--
-- -   @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',
-- 'AndroidSurfaceCreateInfoKHR', 'Vulkan.Core10.Handles.Instance',
-- 'Vulkan.Extensions.Handles.SurfaceKHR'
createAndroidSurfaceKHR :: forall io . MonadIO io => Instance -> AndroidSurfaceCreateInfoKHR -> ("allocator" ::: Maybe AllocationCallbacks) -> io (SurfaceKHR)
createAndroidSurfaceKHR :: Instance
-> AndroidSurfaceCreateInfoKHR
-> ("allocator" ::: Maybe AllocationCallbacks)
-> io SurfaceKHR
createAndroidSurfaceKHR instance' :: Instance
instance' createInfo :: AndroidSurfaceCreateInfoKHR
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 vkCreateAndroidSurfaceKHRPtr :: FunPtr
  (Ptr Instance_T
   -> ("pCreateInfo" ::: Ptr AndroidSurfaceCreateInfoKHR)
   -> ("pAllocator" ::: Ptr AllocationCallbacks)
   -> ("pSurface" ::: Ptr SurfaceKHR)
   -> IO Result)
vkCreateAndroidSurfaceKHRPtr = InstanceCmds
-> FunPtr
     (Ptr Instance_T
      -> ("pCreateInfo" ::: Ptr AndroidSurfaceCreateInfoKHR)
      -> ("pAllocator" ::: Ptr AllocationCallbacks)
      -> ("pSurface" ::: Ptr SurfaceKHR)
      -> IO Result)
pVkCreateAndroidSurfaceKHR (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 AndroidSurfaceCreateInfoKHR)
   -> ("pAllocator" ::: Ptr AllocationCallbacks)
   -> ("pSurface" ::: Ptr SurfaceKHR)
   -> IO Result)
vkCreateAndroidSurfaceKHRPtr FunPtr
  (Ptr Instance_T
   -> ("pCreateInfo" ::: Ptr AndroidSurfaceCreateInfoKHR)
   -> ("pAllocator" ::: Ptr AllocationCallbacks)
   -> ("pSurface" ::: Ptr SurfaceKHR)
   -> IO Result)
-> FunPtr
     (Ptr Instance_T
      -> ("pCreateInfo" ::: Ptr AndroidSurfaceCreateInfoKHR)
      -> ("pAllocator" ::: Ptr AllocationCallbacks)
      -> ("pSurface" ::: Ptr SurfaceKHR)
      -> IO Result)
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
  (Ptr Instance_T
   -> ("pCreateInfo" ::: Ptr AndroidSurfaceCreateInfoKHR)
   -> ("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 vkCreateAndroidSurfaceKHR is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
  let vkCreateAndroidSurfaceKHR' :: Ptr Instance_T
-> ("pCreateInfo" ::: Ptr AndroidSurfaceCreateInfoKHR)
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pSurface" ::: Ptr SurfaceKHR)
-> IO Result
vkCreateAndroidSurfaceKHR' = FunPtr
  (Ptr Instance_T
   -> ("pCreateInfo" ::: Ptr AndroidSurfaceCreateInfoKHR)
   -> ("pAllocator" ::: Ptr AllocationCallbacks)
   -> ("pSurface" ::: Ptr SurfaceKHR)
   -> IO Result)
-> Ptr Instance_T
-> ("pCreateInfo" ::: Ptr AndroidSurfaceCreateInfoKHR)
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pSurface" ::: Ptr SurfaceKHR)
-> IO Result
mkVkCreateAndroidSurfaceKHR FunPtr
  (Ptr Instance_T
   -> ("pCreateInfo" ::: Ptr AndroidSurfaceCreateInfoKHR)
   -> ("pAllocator" ::: Ptr AllocationCallbacks)
   -> ("pSurface" ::: Ptr SurfaceKHR)
   -> IO Result)
vkCreateAndroidSurfaceKHRPtr
  "pCreateInfo" ::: Ptr AndroidSurfaceCreateInfoKHR
pCreateInfo <- ((("pCreateInfo" ::: Ptr AndroidSurfaceCreateInfoKHR)
  -> IO SurfaceKHR)
 -> IO SurfaceKHR)
-> ContT
     SurfaceKHR IO ("pCreateInfo" ::: Ptr AndroidSurfaceCreateInfoKHR)
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pCreateInfo" ::: Ptr AndroidSurfaceCreateInfoKHR)
   -> IO SurfaceKHR)
  -> IO SurfaceKHR)
 -> ContT
      SurfaceKHR IO ("pCreateInfo" ::: Ptr AndroidSurfaceCreateInfoKHR))
-> ((("pCreateInfo" ::: Ptr AndroidSurfaceCreateInfoKHR)
     -> IO SurfaceKHR)
    -> IO SurfaceKHR)
-> ContT
     SurfaceKHR IO ("pCreateInfo" ::: Ptr AndroidSurfaceCreateInfoKHR)
forall a b. (a -> b) -> a -> b
$ AndroidSurfaceCreateInfoKHR
-> (("pCreateInfo" ::: Ptr AndroidSurfaceCreateInfoKHR)
    -> IO SurfaceKHR)
-> IO SurfaceKHR
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (AndroidSurfaceCreateInfoKHR
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
$ Ptr Instance_T
-> ("pCreateInfo" ::: Ptr AndroidSurfaceCreateInfoKHR)
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pSurface" ::: Ptr SurfaceKHR)
-> IO Result
vkCreateAndroidSurfaceKHR' (Instance -> Ptr Instance_T
instanceHandle (Instance
instance')) "pCreateInfo" ::: Ptr AndroidSurfaceCreateInfoKHR
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)


-- | VkAndroidSurfaceCreateInfoKHR - Structure specifying parameters of a
-- newly created Android surface object
--
-- == Valid Usage (Implicit)
--
-- = See Also
--
-- 'AndroidSurfaceCreateFlagsKHR',
-- 'Vulkan.Core10.Enums.StructureType.StructureType',
-- 'createAndroidSurfaceKHR'
data AndroidSurfaceCreateInfoKHR = AndroidSurfaceCreateInfoKHR
  { -- | @flags@ /must/ be @0@
    AndroidSurfaceCreateInfoKHR -> AndroidSurfaceCreateFlagsKHR
flags :: AndroidSurfaceCreateFlagsKHR
  , -- | @window@ /must/ point to a valid Android
    -- 'Vulkan.Extensions.WSITypes.ANativeWindow'
    AndroidSurfaceCreateInfoKHR -> Ptr ANativeWindow
window :: Ptr ANativeWindow
  }
  deriving (Typeable)
deriving instance Show AndroidSurfaceCreateInfoKHR

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

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

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

instance Zero AndroidSurfaceCreateInfoKHR where
  zero :: AndroidSurfaceCreateInfoKHR
zero = AndroidSurfaceCreateFlagsKHR
-> Ptr ANativeWindow -> AndroidSurfaceCreateInfoKHR
AndroidSurfaceCreateInfoKHR
           AndroidSurfaceCreateFlagsKHR
forall a. Zero a => a
zero
           Ptr ANativeWindow
forall a. Zero a => a
zero


-- No documentation found for TopLevel "VkAndroidSurfaceCreateFlagsKHR"
newtype AndroidSurfaceCreateFlagsKHR = AndroidSurfaceCreateFlagsKHR Flags
  deriving newtype (AndroidSurfaceCreateFlagsKHR
-> AndroidSurfaceCreateFlagsKHR -> Bool
(AndroidSurfaceCreateFlagsKHR
 -> AndroidSurfaceCreateFlagsKHR -> Bool)
-> (AndroidSurfaceCreateFlagsKHR
    -> AndroidSurfaceCreateFlagsKHR -> Bool)
-> Eq AndroidSurfaceCreateFlagsKHR
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AndroidSurfaceCreateFlagsKHR
-> AndroidSurfaceCreateFlagsKHR -> Bool
$c/= :: AndroidSurfaceCreateFlagsKHR
-> AndroidSurfaceCreateFlagsKHR -> Bool
== :: AndroidSurfaceCreateFlagsKHR
-> AndroidSurfaceCreateFlagsKHR -> Bool
$c== :: AndroidSurfaceCreateFlagsKHR
-> AndroidSurfaceCreateFlagsKHR -> Bool
Eq, Eq AndroidSurfaceCreateFlagsKHR
Eq AndroidSurfaceCreateFlagsKHR =>
(AndroidSurfaceCreateFlagsKHR
 -> AndroidSurfaceCreateFlagsKHR -> Ordering)
-> (AndroidSurfaceCreateFlagsKHR
    -> AndroidSurfaceCreateFlagsKHR -> Bool)
-> (AndroidSurfaceCreateFlagsKHR
    -> AndroidSurfaceCreateFlagsKHR -> Bool)
-> (AndroidSurfaceCreateFlagsKHR
    -> AndroidSurfaceCreateFlagsKHR -> Bool)
-> (AndroidSurfaceCreateFlagsKHR
    -> AndroidSurfaceCreateFlagsKHR -> Bool)
-> (AndroidSurfaceCreateFlagsKHR
    -> AndroidSurfaceCreateFlagsKHR -> AndroidSurfaceCreateFlagsKHR)
-> (AndroidSurfaceCreateFlagsKHR
    -> AndroidSurfaceCreateFlagsKHR -> AndroidSurfaceCreateFlagsKHR)
-> Ord AndroidSurfaceCreateFlagsKHR
AndroidSurfaceCreateFlagsKHR
-> AndroidSurfaceCreateFlagsKHR -> Bool
AndroidSurfaceCreateFlagsKHR
-> AndroidSurfaceCreateFlagsKHR -> Ordering
AndroidSurfaceCreateFlagsKHR
-> AndroidSurfaceCreateFlagsKHR -> AndroidSurfaceCreateFlagsKHR
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 :: AndroidSurfaceCreateFlagsKHR
-> AndroidSurfaceCreateFlagsKHR -> AndroidSurfaceCreateFlagsKHR
$cmin :: AndroidSurfaceCreateFlagsKHR
-> AndroidSurfaceCreateFlagsKHR -> AndroidSurfaceCreateFlagsKHR
max :: AndroidSurfaceCreateFlagsKHR
-> AndroidSurfaceCreateFlagsKHR -> AndroidSurfaceCreateFlagsKHR
$cmax :: AndroidSurfaceCreateFlagsKHR
-> AndroidSurfaceCreateFlagsKHR -> AndroidSurfaceCreateFlagsKHR
>= :: AndroidSurfaceCreateFlagsKHR
-> AndroidSurfaceCreateFlagsKHR -> Bool
$c>= :: AndroidSurfaceCreateFlagsKHR
-> AndroidSurfaceCreateFlagsKHR -> Bool
> :: AndroidSurfaceCreateFlagsKHR
-> AndroidSurfaceCreateFlagsKHR -> Bool
$c> :: AndroidSurfaceCreateFlagsKHR
-> AndroidSurfaceCreateFlagsKHR -> Bool
<= :: AndroidSurfaceCreateFlagsKHR
-> AndroidSurfaceCreateFlagsKHR -> Bool
$c<= :: AndroidSurfaceCreateFlagsKHR
-> AndroidSurfaceCreateFlagsKHR -> Bool
< :: AndroidSurfaceCreateFlagsKHR
-> AndroidSurfaceCreateFlagsKHR -> Bool
$c< :: AndroidSurfaceCreateFlagsKHR
-> AndroidSurfaceCreateFlagsKHR -> Bool
compare :: AndroidSurfaceCreateFlagsKHR
-> AndroidSurfaceCreateFlagsKHR -> Ordering
$ccompare :: AndroidSurfaceCreateFlagsKHR
-> AndroidSurfaceCreateFlagsKHR -> Ordering
$cp1Ord :: Eq AndroidSurfaceCreateFlagsKHR
Ord, Ptr b -> Int -> IO AndroidSurfaceCreateFlagsKHR
Ptr b -> Int -> AndroidSurfaceCreateFlagsKHR -> IO ()
Ptr AndroidSurfaceCreateFlagsKHR -> IO AndroidSurfaceCreateFlagsKHR
Ptr AndroidSurfaceCreateFlagsKHR
-> Int -> IO AndroidSurfaceCreateFlagsKHR
Ptr AndroidSurfaceCreateFlagsKHR
-> Int -> AndroidSurfaceCreateFlagsKHR -> IO ()
Ptr AndroidSurfaceCreateFlagsKHR
-> AndroidSurfaceCreateFlagsKHR -> IO ()
AndroidSurfaceCreateFlagsKHR -> Int
(AndroidSurfaceCreateFlagsKHR -> Int)
-> (AndroidSurfaceCreateFlagsKHR -> Int)
-> (Ptr AndroidSurfaceCreateFlagsKHR
    -> Int -> IO AndroidSurfaceCreateFlagsKHR)
-> (Ptr AndroidSurfaceCreateFlagsKHR
    -> Int -> AndroidSurfaceCreateFlagsKHR -> IO ())
-> (forall b. Ptr b -> Int -> IO AndroidSurfaceCreateFlagsKHR)
-> (forall b.
    Ptr b -> Int -> AndroidSurfaceCreateFlagsKHR -> IO ())
-> (Ptr AndroidSurfaceCreateFlagsKHR
    -> IO AndroidSurfaceCreateFlagsKHR)
-> (Ptr AndroidSurfaceCreateFlagsKHR
    -> AndroidSurfaceCreateFlagsKHR -> IO ())
-> Storable AndroidSurfaceCreateFlagsKHR
forall b. Ptr b -> Int -> IO AndroidSurfaceCreateFlagsKHR
forall b. Ptr b -> Int -> AndroidSurfaceCreateFlagsKHR -> 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 AndroidSurfaceCreateFlagsKHR
-> AndroidSurfaceCreateFlagsKHR -> IO ()
$cpoke :: Ptr AndroidSurfaceCreateFlagsKHR
-> AndroidSurfaceCreateFlagsKHR -> IO ()
peek :: Ptr AndroidSurfaceCreateFlagsKHR -> IO AndroidSurfaceCreateFlagsKHR
$cpeek :: Ptr AndroidSurfaceCreateFlagsKHR -> IO AndroidSurfaceCreateFlagsKHR
pokeByteOff :: Ptr b -> Int -> AndroidSurfaceCreateFlagsKHR -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> AndroidSurfaceCreateFlagsKHR -> IO ()
peekByteOff :: Ptr b -> Int -> IO AndroidSurfaceCreateFlagsKHR
$cpeekByteOff :: forall b. Ptr b -> Int -> IO AndroidSurfaceCreateFlagsKHR
pokeElemOff :: Ptr AndroidSurfaceCreateFlagsKHR
-> Int -> AndroidSurfaceCreateFlagsKHR -> IO ()
$cpokeElemOff :: Ptr AndroidSurfaceCreateFlagsKHR
-> Int -> AndroidSurfaceCreateFlagsKHR -> IO ()
peekElemOff :: Ptr AndroidSurfaceCreateFlagsKHR
-> Int -> IO AndroidSurfaceCreateFlagsKHR
$cpeekElemOff :: Ptr AndroidSurfaceCreateFlagsKHR
-> Int -> IO AndroidSurfaceCreateFlagsKHR
alignment :: AndroidSurfaceCreateFlagsKHR -> Int
$calignment :: AndroidSurfaceCreateFlagsKHR -> Int
sizeOf :: AndroidSurfaceCreateFlagsKHR -> Int
$csizeOf :: AndroidSurfaceCreateFlagsKHR -> Int
Storable, AndroidSurfaceCreateFlagsKHR
AndroidSurfaceCreateFlagsKHR -> Zero AndroidSurfaceCreateFlagsKHR
forall a. a -> Zero a
zero :: AndroidSurfaceCreateFlagsKHR
$czero :: AndroidSurfaceCreateFlagsKHR
Zero, Eq AndroidSurfaceCreateFlagsKHR
AndroidSurfaceCreateFlagsKHR
Eq AndroidSurfaceCreateFlagsKHR =>
(AndroidSurfaceCreateFlagsKHR
 -> AndroidSurfaceCreateFlagsKHR -> AndroidSurfaceCreateFlagsKHR)
-> (AndroidSurfaceCreateFlagsKHR
    -> AndroidSurfaceCreateFlagsKHR -> AndroidSurfaceCreateFlagsKHR)
-> (AndroidSurfaceCreateFlagsKHR
    -> AndroidSurfaceCreateFlagsKHR -> AndroidSurfaceCreateFlagsKHR)
-> (AndroidSurfaceCreateFlagsKHR -> AndroidSurfaceCreateFlagsKHR)
-> (AndroidSurfaceCreateFlagsKHR
    -> Int -> AndroidSurfaceCreateFlagsKHR)
-> (AndroidSurfaceCreateFlagsKHR
    -> Int -> AndroidSurfaceCreateFlagsKHR)
-> AndroidSurfaceCreateFlagsKHR
-> (Int -> AndroidSurfaceCreateFlagsKHR)
-> (AndroidSurfaceCreateFlagsKHR
    -> Int -> AndroidSurfaceCreateFlagsKHR)
-> (AndroidSurfaceCreateFlagsKHR
    -> Int -> AndroidSurfaceCreateFlagsKHR)
-> (AndroidSurfaceCreateFlagsKHR
    -> Int -> AndroidSurfaceCreateFlagsKHR)
-> (AndroidSurfaceCreateFlagsKHR -> Int -> Bool)
-> (AndroidSurfaceCreateFlagsKHR -> Maybe Int)
-> (AndroidSurfaceCreateFlagsKHR -> Int)
-> (AndroidSurfaceCreateFlagsKHR -> Bool)
-> (AndroidSurfaceCreateFlagsKHR
    -> Int -> AndroidSurfaceCreateFlagsKHR)
-> (AndroidSurfaceCreateFlagsKHR
    -> Int -> AndroidSurfaceCreateFlagsKHR)
-> (AndroidSurfaceCreateFlagsKHR
    -> Int -> AndroidSurfaceCreateFlagsKHR)
-> (AndroidSurfaceCreateFlagsKHR
    -> Int -> AndroidSurfaceCreateFlagsKHR)
-> (AndroidSurfaceCreateFlagsKHR
    -> Int -> AndroidSurfaceCreateFlagsKHR)
-> (AndroidSurfaceCreateFlagsKHR
    -> Int -> AndroidSurfaceCreateFlagsKHR)
-> (AndroidSurfaceCreateFlagsKHR -> Int)
-> Bits AndroidSurfaceCreateFlagsKHR
Int -> AndroidSurfaceCreateFlagsKHR
AndroidSurfaceCreateFlagsKHR -> Bool
AndroidSurfaceCreateFlagsKHR -> Int
AndroidSurfaceCreateFlagsKHR -> Maybe Int
AndroidSurfaceCreateFlagsKHR -> AndroidSurfaceCreateFlagsKHR
AndroidSurfaceCreateFlagsKHR -> Int -> Bool
AndroidSurfaceCreateFlagsKHR -> Int -> AndroidSurfaceCreateFlagsKHR
AndroidSurfaceCreateFlagsKHR
-> AndroidSurfaceCreateFlagsKHR -> AndroidSurfaceCreateFlagsKHR
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 :: AndroidSurfaceCreateFlagsKHR -> Int
$cpopCount :: AndroidSurfaceCreateFlagsKHR -> Int
rotateR :: AndroidSurfaceCreateFlagsKHR -> Int -> AndroidSurfaceCreateFlagsKHR
$crotateR :: AndroidSurfaceCreateFlagsKHR -> Int -> AndroidSurfaceCreateFlagsKHR
rotateL :: AndroidSurfaceCreateFlagsKHR -> Int -> AndroidSurfaceCreateFlagsKHR
$crotateL :: AndroidSurfaceCreateFlagsKHR -> Int -> AndroidSurfaceCreateFlagsKHR
unsafeShiftR :: AndroidSurfaceCreateFlagsKHR -> Int -> AndroidSurfaceCreateFlagsKHR
$cunsafeShiftR :: AndroidSurfaceCreateFlagsKHR -> Int -> AndroidSurfaceCreateFlagsKHR
shiftR :: AndroidSurfaceCreateFlagsKHR -> Int -> AndroidSurfaceCreateFlagsKHR
$cshiftR :: AndroidSurfaceCreateFlagsKHR -> Int -> AndroidSurfaceCreateFlagsKHR
unsafeShiftL :: AndroidSurfaceCreateFlagsKHR -> Int -> AndroidSurfaceCreateFlagsKHR
$cunsafeShiftL :: AndroidSurfaceCreateFlagsKHR -> Int -> AndroidSurfaceCreateFlagsKHR
shiftL :: AndroidSurfaceCreateFlagsKHR -> Int -> AndroidSurfaceCreateFlagsKHR
$cshiftL :: AndroidSurfaceCreateFlagsKHR -> Int -> AndroidSurfaceCreateFlagsKHR
isSigned :: AndroidSurfaceCreateFlagsKHR -> Bool
$cisSigned :: AndroidSurfaceCreateFlagsKHR -> Bool
bitSize :: AndroidSurfaceCreateFlagsKHR -> Int
$cbitSize :: AndroidSurfaceCreateFlagsKHR -> Int
bitSizeMaybe :: AndroidSurfaceCreateFlagsKHR -> Maybe Int
$cbitSizeMaybe :: AndroidSurfaceCreateFlagsKHR -> Maybe Int
testBit :: AndroidSurfaceCreateFlagsKHR -> Int -> Bool
$ctestBit :: AndroidSurfaceCreateFlagsKHR -> Int -> Bool
complementBit :: AndroidSurfaceCreateFlagsKHR -> Int -> AndroidSurfaceCreateFlagsKHR
$ccomplementBit :: AndroidSurfaceCreateFlagsKHR -> Int -> AndroidSurfaceCreateFlagsKHR
clearBit :: AndroidSurfaceCreateFlagsKHR -> Int -> AndroidSurfaceCreateFlagsKHR
$cclearBit :: AndroidSurfaceCreateFlagsKHR -> Int -> AndroidSurfaceCreateFlagsKHR
setBit :: AndroidSurfaceCreateFlagsKHR -> Int -> AndroidSurfaceCreateFlagsKHR
$csetBit :: AndroidSurfaceCreateFlagsKHR -> Int -> AndroidSurfaceCreateFlagsKHR
bit :: Int -> AndroidSurfaceCreateFlagsKHR
$cbit :: Int -> AndroidSurfaceCreateFlagsKHR
zeroBits :: AndroidSurfaceCreateFlagsKHR
$czeroBits :: AndroidSurfaceCreateFlagsKHR
rotate :: AndroidSurfaceCreateFlagsKHR -> Int -> AndroidSurfaceCreateFlagsKHR
$crotate :: AndroidSurfaceCreateFlagsKHR -> Int -> AndroidSurfaceCreateFlagsKHR
shift :: AndroidSurfaceCreateFlagsKHR -> Int -> AndroidSurfaceCreateFlagsKHR
$cshift :: AndroidSurfaceCreateFlagsKHR -> Int -> AndroidSurfaceCreateFlagsKHR
complement :: AndroidSurfaceCreateFlagsKHR -> AndroidSurfaceCreateFlagsKHR
$ccomplement :: AndroidSurfaceCreateFlagsKHR -> AndroidSurfaceCreateFlagsKHR
xor :: AndroidSurfaceCreateFlagsKHR
-> AndroidSurfaceCreateFlagsKHR -> AndroidSurfaceCreateFlagsKHR
$cxor :: AndroidSurfaceCreateFlagsKHR
-> AndroidSurfaceCreateFlagsKHR -> AndroidSurfaceCreateFlagsKHR
.|. :: AndroidSurfaceCreateFlagsKHR
-> AndroidSurfaceCreateFlagsKHR -> AndroidSurfaceCreateFlagsKHR
$c.|. :: AndroidSurfaceCreateFlagsKHR
-> AndroidSurfaceCreateFlagsKHR -> AndroidSurfaceCreateFlagsKHR
.&. :: AndroidSurfaceCreateFlagsKHR
-> AndroidSurfaceCreateFlagsKHR -> AndroidSurfaceCreateFlagsKHR
$c.&. :: AndroidSurfaceCreateFlagsKHR
-> AndroidSurfaceCreateFlagsKHR -> AndroidSurfaceCreateFlagsKHR
$cp1Bits :: Eq AndroidSurfaceCreateFlagsKHR
Bits)



instance Show AndroidSurfaceCreateFlagsKHR where
  showsPrec :: Int -> AndroidSurfaceCreateFlagsKHR -> ShowS
showsPrec p :: Int
p = \case
    AndroidSurfaceCreateFlagsKHR x :: Flags
x -> Bool -> ShowS -> ShowS
showParen (Int
p Int -> Int -> Bool
forall a. Ord a => a -> a -> Bool
>= 11) (String -> ShowS
showString "AndroidSurfaceCreateFlagsKHR 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 AndroidSurfaceCreateFlagsKHR where
  readPrec :: ReadPrec AndroidSurfaceCreateFlagsKHR
readPrec = ReadPrec AndroidSurfaceCreateFlagsKHR
-> ReadPrec AndroidSurfaceCreateFlagsKHR
forall a. ReadPrec a -> ReadPrec a
parens ([(String, ReadPrec AndroidSurfaceCreateFlagsKHR)]
-> ReadPrec AndroidSurfaceCreateFlagsKHR
forall a. [(String, ReadPrec a)] -> ReadPrec a
choose []
                     ReadPrec AndroidSurfaceCreateFlagsKHR
-> ReadPrec AndroidSurfaceCreateFlagsKHR
-> ReadPrec AndroidSurfaceCreateFlagsKHR
forall a. ReadPrec a -> ReadPrec a -> ReadPrec a
+++
                     Int
-> ReadPrec AndroidSurfaceCreateFlagsKHR
-> ReadPrec AndroidSurfaceCreateFlagsKHR
forall a. Int -> ReadPrec a -> ReadPrec a
prec 10 (do
                       Lexeme -> ReadPrec ()
expectP (String -> Lexeme
Ident "AndroidSurfaceCreateFlagsKHR")
                       Flags
v <- ReadPrec Flags -> ReadPrec Flags
forall a. ReadPrec a -> ReadPrec a
step ReadPrec Flags
forall a. Read a => ReadPrec a
readPrec
                       AndroidSurfaceCreateFlagsKHR
-> ReadPrec AndroidSurfaceCreateFlagsKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Flags -> AndroidSurfaceCreateFlagsKHR
AndroidSurfaceCreateFlagsKHR Flags
v)))


type KHR_ANDROID_SURFACE_SPEC_VERSION = 6

-- No documentation found for TopLevel "VK_KHR_ANDROID_SURFACE_SPEC_VERSION"
pattern KHR_ANDROID_SURFACE_SPEC_VERSION :: forall a . Integral a => a
pattern $bKHR_ANDROID_SURFACE_SPEC_VERSION :: a
$mKHR_ANDROID_SURFACE_SPEC_VERSION :: forall r a. Integral a => a -> (Void# -> r) -> (Void# -> r) -> r
KHR_ANDROID_SURFACE_SPEC_VERSION = 6


type KHR_ANDROID_SURFACE_EXTENSION_NAME = "VK_KHR_android_surface"

-- No documentation found for TopLevel "VK_KHR_ANDROID_SURFACE_EXTENSION_NAME"
pattern KHR_ANDROID_SURFACE_EXTENSION_NAME :: forall a . (Eq a, IsString a) => a
pattern $bKHR_ANDROID_SURFACE_EXTENSION_NAME :: a
$mKHR_ANDROID_SURFACE_EXTENSION_NAME :: forall r a.
(Eq a, IsString a) =>
a -> (Void# -> r) -> (Void# -> r) -> r
KHR_ANDROID_SURFACE_EXTENSION_NAME = "VK_KHR_android_surface"