{-# 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 Data.Bits (Bits)
import Data.Bits (FiniteBits)
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 (allocaBytes)
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 Vulkan.CStruct (FromCStruct)
import Vulkan.CStruct (FromCStruct(..))
import Vulkan.CStruct (ToCStruct)
import Vulkan.CStruct (ToCStruct(..))
import Vulkan.Zero (Zero)
import Vulkan.Zero (Zero(..))
import Control.Monad.IO.Class (MonadIO)
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.Core10.Handles (Instance)
import Vulkan.Core10.Handles (Instance(..))
import Vulkan.Core10.Handles (Instance(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.Exception (VulkanException(..))
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 :: forall (io :: * -> *).
MonadIO io =>
Instance
-> AndroidSurfaceCreateInfoKHR
-> ("allocator" ::: Maybe AllocationCallbacks)
-> io SurfaceKHR
createAndroidSurfaceKHR Instance
instance' AndroidSurfaceCreateInfoKHR
createInfo "allocator" ::: Maybe AllocationCallbacks
allocator = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT 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 (case Instance
instance' of Instance{InstanceCmds
$sel:instanceCmds:Instance :: Instance -> InstanceCmds
instanceCmds :: InstanceCmds
instanceCmds} -> InstanceCmds
instanceCmds)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr Instance_T
-> ("pCreateInfo" ::: Ptr AndroidSurfaceCreateInfoKHR)
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pSurface" ::: Ptr SurfaceKHR)
-> IO Result)
vkCreateAndroidSurfaceKHRPtr forall a. Eq a => a -> a -> Bool
/= forall a. FunPtr a
nullFunPtr) forall a b. (a -> b) -> a -> b
$
forall e a. Exception e => e -> IO a
throwIO forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkCreateAndroidSurfaceKHR is null" forall a. Maybe a
Nothing 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 <- forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ 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
"allocator" ::: Maybe AllocationCallbacks
Nothing -> forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a. Ptr a
nullPtr
Just AllocationCallbacks
j -> forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (AllocationCallbacks
j)
"pSurface" ::: Ptr SurfaceKHR
pPSurface <- forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall a b c. IO a -> (a -> IO b) -> (a -> IO c) -> IO c
bracket (forall a. Int -> IO (Ptr a)
callocBytes @SurfaceKHR Int
8) forall a. Ptr a -> IO ()
free
Result
r <- forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. String -> IO a -> IO a
traceAroundEvent String
"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))
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
when (Result
r forall a. Ord a => a -> a -> Bool
< Result
SUCCESS) (forall e a. Exception e => e -> IO a
throwIO (Result -> VulkanException
VulkanException Result
r))
SurfaceKHR
pSurface <- forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> IO a
peek @SurfaceKHR "pSurface" ::: Ptr SurfaceKHR
pPSurface
forall (f :: * -> *) a. Applicative f => a -> f a
pure 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
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 :: forall b.
AndroidSurfaceCreateInfoKHR
-> (("pCreateInfo" ::: Ptr AndroidSurfaceCreateInfoKHR) -> IO b)
-> IO b
withCStruct AndroidSurfaceCreateInfoKHR
x ("pCreateInfo" ::: Ptr AndroidSurfaceCreateInfoKHR) -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
32 forall a b. (a -> b) -> a -> b
$ \"pCreateInfo" ::: Ptr AndroidSurfaceCreateInfoKHR
p -> 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 :: forall b.
("pCreateInfo" ::: Ptr AndroidSurfaceCreateInfoKHR)
-> AndroidSurfaceCreateInfoKHR -> IO b -> IO b
pokeCStruct "pCreateInfo" ::: Ptr AndroidSurfaceCreateInfoKHR
p AndroidSurfaceCreateInfoKHR{Ptr ANativeWindow
AndroidSurfaceCreateFlagsKHR
window :: Ptr ANativeWindow
flags :: AndroidSurfaceCreateFlagsKHR
$sel:window:AndroidSurfaceCreateInfoKHR :: AndroidSurfaceCreateInfoKHR -> Ptr ANativeWindow
$sel:flags:AndroidSurfaceCreateInfoKHR :: AndroidSurfaceCreateInfoKHR -> AndroidSurfaceCreateFlagsKHR
..} IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCreateInfo" ::: Ptr AndroidSurfaceCreateInfoKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_ANDROID_SURFACE_CREATE_INFO_KHR)
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCreateInfo" ::: Ptr AndroidSurfaceCreateInfoKHR
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 (("pCreateInfo" ::: Ptr AndroidSurfaceCreateInfoKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr AndroidSurfaceCreateFlagsKHR)) (AndroidSurfaceCreateFlagsKHR
flags)
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCreateInfo" ::: Ptr AndroidSurfaceCreateInfoKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr (Ptr ANativeWindow))) (Ptr ANativeWindow
window)
IO b
f
cStructSize :: Int
cStructSize = Int
32
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b.
("pCreateInfo" ::: Ptr AndroidSurfaceCreateInfoKHR) -> IO b -> IO b
pokeZeroCStruct "pCreateInfo" ::: Ptr AndroidSurfaceCreateInfoKHR
p IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCreateInfo" ::: Ptr AndroidSurfaceCreateInfoKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_ANDROID_SURFACE_CREATE_INFO_KHR)
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCreateInfo" ::: Ptr AndroidSurfaceCreateInfoKHR
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 (("pCreateInfo" ::: Ptr AndroidSurfaceCreateInfoKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr (Ptr ANativeWindow))) (forall a. Zero a => a
zero)
IO b
f
instance FromCStruct AndroidSurfaceCreateInfoKHR where
peekCStruct :: ("pCreateInfo" ::: Ptr AndroidSurfaceCreateInfoKHR)
-> IO AndroidSurfaceCreateInfoKHR
peekCStruct "pCreateInfo" ::: Ptr AndroidSurfaceCreateInfoKHR
p = do
AndroidSurfaceCreateFlagsKHR
flags <- forall a. Storable a => Ptr a -> IO a
peek @AndroidSurfaceCreateFlagsKHR (("pCreateInfo" ::: Ptr AndroidSurfaceCreateInfoKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr AndroidSurfaceCreateFlagsKHR))
Ptr ANativeWindow
window <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr ANativeWindow) (("pCreateInfo" ::: Ptr AndroidSurfaceCreateInfoKHR
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr (Ptr ANativeWindow)))
forall (f :: * -> *) a. Applicative f => a -> f a
pure 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
_ = Int
32
alignment :: AndroidSurfaceCreateInfoKHR -> Int
alignment ~AndroidSurfaceCreateInfoKHR
_ = Int
8
peek :: ("pCreateInfo" ::: Ptr AndroidSurfaceCreateInfoKHR)
-> IO AndroidSurfaceCreateInfoKHR
peek = forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: ("pCreateInfo" ::: Ptr AndroidSurfaceCreateInfoKHR)
-> AndroidSurfaceCreateInfoKHR -> IO ()
poke "pCreateInfo" ::: Ptr AndroidSurfaceCreateInfoKHR
ptr AndroidSurfaceCreateInfoKHR
poked = forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pCreateInfo" ::: Ptr AndroidSurfaceCreateInfoKHR
ptr AndroidSurfaceCreateInfoKHR
poked (forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero AndroidSurfaceCreateInfoKHR where
zero :: AndroidSurfaceCreateInfoKHR
zero = AndroidSurfaceCreateFlagsKHR
-> Ptr ANativeWindow -> AndroidSurfaceCreateInfoKHR
AndroidSurfaceCreateInfoKHR
forall a. Zero a => a
zero
forall a. Zero a => a
zero
newtype AndroidSurfaceCreateFlagsKHR = AndroidSurfaceCreateFlagsKHR Flags
deriving newtype (AndroidSurfaceCreateFlagsKHR
-> AndroidSurfaceCreateFlagsKHR -> Bool
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
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
Ord, Ptr AndroidSurfaceCreateFlagsKHR -> IO AndroidSurfaceCreateFlagsKHR
Ptr AndroidSurfaceCreateFlagsKHR
-> Int -> IO AndroidSurfaceCreateFlagsKHR
Ptr AndroidSurfaceCreateFlagsKHR
-> Int -> AndroidSurfaceCreateFlagsKHR -> IO ()
Ptr AndroidSurfaceCreateFlagsKHR
-> AndroidSurfaceCreateFlagsKHR -> IO ()
AndroidSurfaceCreateFlagsKHR -> Int
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 :: forall b. Ptr b -> Int -> AndroidSurfaceCreateFlagsKHR -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> AndroidSurfaceCreateFlagsKHR -> IO ()
peekByteOff :: forall b. 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
forall a. a -> Zero a
zero :: AndroidSurfaceCreateFlagsKHR
$czero :: AndroidSurfaceCreateFlagsKHR
Zero, Eq AndroidSurfaceCreateFlagsKHR
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
Bits, Bits 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
FiniteBits)
conNameAndroidSurfaceCreateFlagsKHR :: String
conNameAndroidSurfaceCreateFlagsKHR :: String
conNameAndroidSurfaceCreateFlagsKHR = String
"AndroidSurfaceCreateFlagsKHR"
enumPrefixAndroidSurfaceCreateFlagsKHR :: String
enumPrefixAndroidSurfaceCreateFlagsKHR :: String
enumPrefixAndroidSurfaceCreateFlagsKHR = String
""
showTableAndroidSurfaceCreateFlagsKHR :: [(AndroidSurfaceCreateFlagsKHR, String)]
showTableAndroidSurfaceCreateFlagsKHR :: [(AndroidSurfaceCreateFlagsKHR, String)]
showTableAndroidSurfaceCreateFlagsKHR = []
instance Show AndroidSurfaceCreateFlagsKHR where
showsPrec :: Int -> AndroidSurfaceCreateFlagsKHR -> ShowS
showsPrec =
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 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 AndroidSurfaceCreateFlagsKHR where
readPrec :: ReadPrec AndroidSurfaceCreateFlagsKHR
readPrec =
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 :: forall a. Integral a => a
$mKHR_ANDROID_SURFACE_SPEC_VERSION :: forall {r} {a}.
Integral a =>
a -> ((# #) -> r) -> ((# #) -> 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 :: forall a. (Eq a, IsString a) => a
$mKHR_ANDROID_SURFACE_EXTENSION_NAME :: forall {r} {a}.
(Eq a, IsString a) =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
KHR_ANDROID_SURFACE_EXTENSION_NAME = "VK_KHR_android_surface"
data ANativeWindow