{-# 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
, ANativeWindow
, SurfaceKHR(..)
) where
import Vulkan.Internal.Utils (enumReadPrec)
import Vulkan.Internal.Utils (enumShowsPrec)
import Vulkan.Internal.Utils (traceAroundEvent)
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.Show (showString)
import Numeric (showHex)
import Control.Monad.Trans.Class (lift)
import Control.Monad.Trans.Cont (evalContT)
import Control.Monad.IO.Class (MonadIO)
import Data.Bits (Bits)
import Data.Bits (FiniteBits)
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 GHC.IO.Exception (IOErrorType(..))
import GHC.IO.Exception (IOException(..))
import Foreign.Ptr (FunPtr)
import Foreign.Ptr (Ptr)
import GHC.Read (Read(readPrec))
import GHC.Show (Show(showsPrec))
import Data.Kind (Type)
import Control.Monad.Trans.Cont (ContT(..))
import Vulkan.NamedType ((:::))
import Vulkan.Core10.AllocationCallbacks (AllocationCallbacks)
import Vulkan.Core10.FundamentalTypes (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.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
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
$ String -> IO Result -> IO Result
forall a. String -> IO a -> IO a
traceAroundEvent "vkCreateAndroidSurfaceKHR" (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)
data AndroidSurfaceCreateInfoKHR = AndroidSurfaceCreateInfoKHR
{
AndroidSurfaceCreateInfoKHR -> AndroidSurfaceCreateFlagsKHR
flags :: AndroidSurfaceCreateFlagsKHR
,
AndroidSurfaceCreateInfoKHR -> Ptr ANativeWindow
window :: Ptr ANativeWindow
}
deriving (Typeable, AndroidSurfaceCreateInfoKHR -> AndroidSurfaceCreateInfoKHR -> Bool
(AndroidSurfaceCreateInfoKHR
-> AndroidSurfaceCreateInfoKHR -> Bool)
-> (AndroidSurfaceCreateInfoKHR
-> AndroidSurfaceCreateInfoKHR -> Bool)
-> Eq AndroidSurfaceCreateInfoKHR
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AndroidSurfaceCreateInfoKHR -> AndroidSurfaceCreateInfoKHR -> Bool
$c/= :: AndroidSurfaceCreateInfoKHR -> AndroidSurfaceCreateInfoKHR -> Bool
== :: AndroidSurfaceCreateInfoKHR -> AndroidSurfaceCreateInfoKHR -> Bool
$c== :: AndroidSurfaceCreateInfoKHR -> AndroidSurfaceCreateInfoKHR -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (AndroidSurfaceCreateInfoKHR)
#endif
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
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, Bits AndroidSurfaceCreateFlagsKHR
Bits AndroidSurfaceCreateFlagsKHR =>
(AndroidSurfaceCreateFlagsKHR -> Int)
-> (AndroidSurfaceCreateFlagsKHR -> Int)
-> (AndroidSurfaceCreateFlagsKHR -> Int)
-> FiniteBits AndroidSurfaceCreateFlagsKHR
AndroidSurfaceCreateFlagsKHR -> Int
forall b.
Bits b =>
(b -> Int) -> (b -> Int) -> (b -> Int) -> FiniteBits b
countTrailingZeros :: AndroidSurfaceCreateFlagsKHR -> Int
$ccountTrailingZeros :: AndroidSurfaceCreateFlagsKHR -> Int
countLeadingZeros :: AndroidSurfaceCreateFlagsKHR -> Int
$ccountLeadingZeros :: AndroidSurfaceCreateFlagsKHR -> Int
finiteBitSize :: AndroidSurfaceCreateFlagsKHR -> Int
$cfiniteBitSize :: AndroidSurfaceCreateFlagsKHR -> Int
$cp1FiniteBits :: Bits AndroidSurfaceCreateFlagsKHR
FiniteBits)
conNameAndroidSurfaceCreateFlagsKHR :: String
conNameAndroidSurfaceCreateFlagsKHR :: String
conNameAndroidSurfaceCreateFlagsKHR = "AndroidSurfaceCreateFlagsKHR"
enumPrefixAndroidSurfaceCreateFlagsKHR :: String
enumPrefixAndroidSurfaceCreateFlagsKHR :: String
enumPrefixAndroidSurfaceCreateFlagsKHR = ""
showTableAndroidSurfaceCreateFlagsKHR :: [(AndroidSurfaceCreateFlagsKHR, String)]
showTableAndroidSurfaceCreateFlagsKHR :: [(AndroidSurfaceCreateFlagsKHR, String)]
showTableAndroidSurfaceCreateFlagsKHR = []
instance Show AndroidSurfaceCreateFlagsKHR where
showsPrec :: Int -> AndroidSurfaceCreateFlagsKHR -> ShowS
showsPrec = String
-> [(AndroidSurfaceCreateFlagsKHR, String)]
-> String
-> (AndroidSurfaceCreateFlagsKHR -> Flags)
-> (Flags -> ShowS)
-> Int
-> AndroidSurfaceCreateFlagsKHR
-> ShowS
forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec String
enumPrefixAndroidSurfaceCreateFlagsKHR
[(AndroidSurfaceCreateFlagsKHR, String)]
showTableAndroidSurfaceCreateFlagsKHR
String
conNameAndroidSurfaceCreateFlagsKHR
(\(AndroidSurfaceCreateFlagsKHR x :: Flags
x) -> Flags
x)
(\x :: Flags
x -> String -> ShowS
showString "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 = String
-> [(AndroidSurfaceCreateFlagsKHR, String)]
-> String
-> (Flags -> AndroidSurfaceCreateFlagsKHR)
-> ReadPrec AndroidSurfaceCreateFlagsKHR
forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec String
enumPrefixAndroidSurfaceCreateFlagsKHR
[(AndroidSurfaceCreateFlagsKHR, String)]
showTableAndroidSurfaceCreateFlagsKHR
String
conNameAndroidSurfaceCreateFlagsKHR
Flags -> AndroidSurfaceCreateFlagsKHR
AndroidSurfaceCreateFlagsKHR
type KHR_ANDROID_SURFACE_SPEC_VERSION = 6
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"
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"
data ANativeWindow