{-# language CPP #-}
module Vulkan.Extensions.VK_EXT_directfb_surface ( createDirectFBSurfaceEXT
, getPhysicalDeviceDirectFBPresentationSupportEXT
, DirectFBSurfaceCreateInfoEXT(..)
, DirectFBSurfaceCreateFlagsEXT(..)
, EXT_DIRECTFB_SURFACE_SPEC_VERSION
, pattern EXT_DIRECTFB_SURFACE_SPEC_VERSION
, EXT_DIRECTFB_SURFACE_EXTENSION_NAME
, pattern EXT_DIRECTFB_SURFACE_EXTENSION_NAME
, IDirectFB
, IDirectFBSurface
, 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.Word (Word32)
import Data.Kind (Type)
import Control.Monad.Trans.Cont (ContT(..))
import Vulkan.Core10.FundamentalTypes (bool32ToBool)
import Vulkan.NamedType ((:::))
import Vulkan.Core10.AllocationCallbacks (AllocationCallbacks)
import Vulkan.Core10.FundamentalTypes (Bool32)
import Vulkan.Core10.FundamentalTypes (Bool32(..))
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(pVkCreateDirectFBSurfaceEXT))
import Vulkan.Dynamic (InstanceCmds(pVkGetPhysicalDeviceDirectFBPresentationSupportEXT))
import Vulkan.Core10.Handles (Instance_T)
import Vulkan.Core10.Handles (PhysicalDevice)
import Vulkan.Core10.Handles (PhysicalDevice(..))
import Vulkan.Core10.Handles (PhysicalDevice_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_DIRECTFB_SURFACE_CREATE_INFO_EXT))
import Vulkan.Core10.Enums.Result (Result(SUCCESS))
import Vulkan.Extensions.Handles (SurfaceKHR(..))
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkCreateDirectFBSurfaceEXT
:: FunPtr (Ptr Instance_T -> Ptr DirectFBSurfaceCreateInfoEXT -> Ptr AllocationCallbacks -> Ptr SurfaceKHR -> IO Result) -> Ptr Instance_T -> Ptr DirectFBSurfaceCreateInfoEXT -> Ptr AllocationCallbacks -> Ptr SurfaceKHR -> IO Result
createDirectFBSurfaceEXT :: forall io
. (MonadIO io)
=>
Instance
->
DirectFBSurfaceCreateInfoEXT
->
("allocator" ::: Maybe AllocationCallbacks)
-> io (SurfaceKHR)
createDirectFBSurfaceEXT :: Instance
-> DirectFBSurfaceCreateInfoEXT
-> ("allocator" ::: Maybe AllocationCallbacks)
-> io SurfaceKHR
createDirectFBSurfaceEXT instance' :: Instance
instance' createInfo :: DirectFBSurfaceCreateInfoEXT
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 vkCreateDirectFBSurfaceEXTPtr :: FunPtr
(Ptr Instance_T
-> ("pCreateInfo" ::: Ptr DirectFBSurfaceCreateInfoEXT)
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pSurface" ::: Ptr SurfaceKHR)
-> IO Result)
vkCreateDirectFBSurfaceEXTPtr = InstanceCmds
-> FunPtr
(Ptr Instance_T
-> ("pCreateInfo" ::: Ptr DirectFBSurfaceCreateInfoEXT)
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pSurface" ::: Ptr SurfaceKHR)
-> IO Result)
pVkCreateDirectFBSurfaceEXT (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 DirectFBSurfaceCreateInfoEXT)
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pSurface" ::: Ptr SurfaceKHR)
-> IO Result)
vkCreateDirectFBSurfaceEXTPtr FunPtr
(Ptr Instance_T
-> ("pCreateInfo" ::: Ptr DirectFBSurfaceCreateInfoEXT)
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pSurface" ::: Ptr SurfaceKHR)
-> IO Result)
-> FunPtr
(Ptr Instance_T
-> ("pCreateInfo" ::: Ptr DirectFBSurfaceCreateInfoEXT)
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pSurface" ::: Ptr SurfaceKHR)
-> IO Result)
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
(Ptr Instance_T
-> ("pCreateInfo" ::: Ptr DirectFBSurfaceCreateInfoEXT)
-> ("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 vkCreateDirectFBSurfaceEXT is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
let vkCreateDirectFBSurfaceEXT' :: Ptr Instance_T
-> ("pCreateInfo" ::: Ptr DirectFBSurfaceCreateInfoEXT)
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pSurface" ::: Ptr SurfaceKHR)
-> IO Result
vkCreateDirectFBSurfaceEXT' = FunPtr
(Ptr Instance_T
-> ("pCreateInfo" ::: Ptr DirectFBSurfaceCreateInfoEXT)
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pSurface" ::: Ptr SurfaceKHR)
-> IO Result)
-> Ptr Instance_T
-> ("pCreateInfo" ::: Ptr DirectFBSurfaceCreateInfoEXT)
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pSurface" ::: Ptr SurfaceKHR)
-> IO Result
mkVkCreateDirectFBSurfaceEXT FunPtr
(Ptr Instance_T
-> ("pCreateInfo" ::: Ptr DirectFBSurfaceCreateInfoEXT)
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pSurface" ::: Ptr SurfaceKHR)
-> IO Result)
vkCreateDirectFBSurfaceEXTPtr
"pCreateInfo" ::: Ptr DirectFBSurfaceCreateInfoEXT
pCreateInfo <- ((("pCreateInfo" ::: Ptr DirectFBSurfaceCreateInfoEXT)
-> IO SurfaceKHR)
-> IO SurfaceKHR)
-> ContT
SurfaceKHR IO ("pCreateInfo" ::: Ptr DirectFBSurfaceCreateInfoEXT)
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pCreateInfo" ::: Ptr DirectFBSurfaceCreateInfoEXT)
-> IO SurfaceKHR)
-> IO SurfaceKHR)
-> ContT
SurfaceKHR IO ("pCreateInfo" ::: Ptr DirectFBSurfaceCreateInfoEXT))
-> ((("pCreateInfo" ::: Ptr DirectFBSurfaceCreateInfoEXT)
-> IO SurfaceKHR)
-> IO SurfaceKHR)
-> ContT
SurfaceKHR IO ("pCreateInfo" ::: Ptr DirectFBSurfaceCreateInfoEXT)
forall a b. (a -> b) -> a -> b
$ DirectFBSurfaceCreateInfoEXT
-> (("pCreateInfo" ::: Ptr DirectFBSurfaceCreateInfoEXT)
-> IO SurfaceKHR)
-> IO SurfaceKHR
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (DirectFBSurfaceCreateInfoEXT
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 "vkCreateDirectFBSurfaceEXT" (Ptr Instance_T
-> ("pCreateInfo" ::: Ptr DirectFBSurfaceCreateInfoEXT)
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pSurface" ::: Ptr SurfaceKHR)
-> IO Result
vkCreateDirectFBSurfaceEXT' (Instance -> Ptr Instance_T
instanceHandle (Instance
instance')) "pCreateInfo" ::: Ptr DirectFBSurfaceCreateInfoEXT
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)
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkGetPhysicalDeviceDirectFBPresentationSupportEXT
:: FunPtr (Ptr PhysicalDevice_T -> Word32 -> Ptr IDirectFB -> IO Bool32) -> Ptr PhysicalDevice_T -> Word32 -> Ptr IDirectFB -> IO Bool32
getPhysicalDeviceDirectFBPresentationSupportEXT :: forall io
. (MonadIO io)
=>
PhysicalDevice
->
("queueFamilyIndex" ::: Word32)
->
("dfb" ::: Ptr IDirectFB)
-> io (Bool)
getPhysicalDeviceDirectFBPresentationSupportEXT :: PhysicalDevice
-> ("queueFamilyIndex" ::: Word32)
-> ("dfb" ::: Ptr IDirectFB)
-> io Bool
getPhysicalDeviceDirectFBPresentationSupportEXT physicalDevice :: PhysicalDevice
physicalDevice queueFamilyIndex :: "queueFamilyIndex" ::: Word32
queueFamilyIndex dfb :: "dfb" ::: Ptr IDirectFB
dfb = IO Bool -> io Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> io Bool) -> IO Bool -> io Bool
forall a b. (a -> b) -> a -> b
$ do
let vkGetPhysicalDeviceDirectFBPresentationSupportEXTPtr :: FunPtr
(Ptr PhysicalDevice_T
-> ("queueFamilyIndex" ::: Word32)
-> ("dfb" ::: Ptr IDirectFB)
-> IO Bool32)
vkGetPhysicalDeviceDirectFBPresentationSupportEXTPtr = InstanceCmds
-> FunPtr
(Ptr PhysicalDevice_T
-> ("queueFamilyIndex" ::: Word32)
-> ("dfb" ::: Ptr IDirectFB)
-> IO Bool32)
pVkGetPhysicalDeviceDirectFBPresentationSupportEXT (PhysicalDevice -> InstanceCmds
instanceCmds (PhysicalDevice
physicalDevice :: PhysicalDevice))
Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr PhysicalDevice_T
-> ("queueFamilyIndex" ::: Word32)
-> ("dfb" ::: Ptr IDirectFB)
-> IO Bool32)
vkGetPhysicalDeviceDirectFBPresentationSupportEXTPtr FunPtr
(Ptr PhysicalDevice_T
-> ("queueFamilyIndex" ::: Word32)
-> ("dfb" ::: Ptr IDirectFB)
-> IO Bool32)
-> FunPtr
(Ptr PhysicalDevice_T
-> ("queueFamilyIndex" ::: Word32)
-> ("dfb" ::: Ptr IDirectFB)
-> IO Bool32)
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
(Ptr PhysicalDevice_T
-> ("queueFamilyIndex" ::: Word32)
-> ("dfb" ::: Ptr IDirectFB)
-> IO Bool32)
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 vkGetPhysicalDeviceDirectFBPresentationSupportEXT is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
let vkGetPhysicalDeviceDirectFBPresentationSupportEXT' :: Ptr PhysicalDevice_T
-> ("queueFamilyIndex" ::: Word32)
-> ("dfb" ::: Ptr IDirectFB)
-> IO Bool32
vkGetPhysicalDeviceDirectFBPresentationSupportEXT' = FunPtr
(Ptr PhysicalDevice_T
-> ("queueFamilyIndex" ::: Word32)
-> ("dfb" ::: Ptr IDirectFB)
-> IO Bool32)
-> Ptr PhysicalDevice_T
-> ("queueFamilyIndex" ::: Word32)
-> ("dfb" ::: Ptr IDirectFB)
-> IO Bool32
mkVkGetPhysicalDeviceDirectFBPresentationSupportEXT FunPtr
(Ptr PhysicalDevice_T
-> ("queueFamilyIndex" ::: Word32)
-> ("dfb" ::: Ptr IDirectFB)
-> IO Bool32)
vkGetPhysicalDeviceDirectFBPresentationSupportEXTPtr
Bool32
r <- String -> IO Bool32 -> IO Bool32
forall a. String -> IO a -> IO a
traceAroundEvent "vkGetPhysicalDeviceDirectFBPresentationSupportEXT" (Ptr PhysicalDevice_T
-> ("queueFamilyIndex" ::: Word32)
-> ("dfb" ::: Ptr IDirectFB)
-> IO Bool32
vkGetPhysicalDeviceDirectFBPresentationSupportEXT' (PhysicalDevice -> Ptr PhysicalDevice_T
physicalDeviceHandle (PhysicalDevice
physicalDevice)) ("queueFamilyIndex" ::: Word32
queueFamilyIndex) ("dfb" ::: Ptr IDirectFB
dfb))
Bool -> IO Bool
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Bool -> IO Bool) -> Bool -> IO Bool
forall a b. (a -> b) -> a -> b
$ ((Bool32 -> Bool
bool32ToBool Bool32
r))
data DirectFBSurfaceCreateInfoEXT = DirectFBSurfaceCreateInfoEXT
{
DirectFBSurfaceCreateInfoEXT -> DirectFBSurfaceCreateFlagsEXT
flags :: DirectFBSurfaceCreateFlagsEXT
,
DirectFBSurfaceCreateInfoEXT -> "dfb" ::: Ptr IDirectFB
dfb :: Ptr IDirectFB
,
DirectFBSurfaceCreateInfoEXT -> Ptr IDirectFBSurface
surface :: Ptr IDirectFBSurface
}
deriving (Typeable, DirectFBSurfaceCreateInfoEXT
-> DirectFBSurfaceCreateInfoEXT -> Bool
(DirectFBSurfaceCreateInfoEXT
-> DirectFBSurfaceCreateInfoEXT -> Bool)
-> (DirectFBSurfaceCreateInfoEXT
-> DirectFBSurfaceCreateInfoEXT -> Bool)
-> Eq DirectFBSurfaceCreateInfoEXT
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DirectFBSurfaceCreateInfoEXT
-> DirectFBSurfaceCreateInfoEXT -> Bool
$c/= :: DirectFBSurfaceCreateInfoEXT
-> DirectFBSurfaceCreateInfoEXT -> Bool
== :: DirectFBSurfaceCreateInfoEXT
-> DirectFBSurfaceCreateInfoEXT -> Bool
$c== :: DirectFBSurfaceCreateInfoEXT
-> DirectFBSurfaceCreateInfoEXT -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (DirectFBSurfaceCreateInfoEXT)
#endif
deriving instance Show DirectFBSurfaceCreateInfoEXT
instance ToCStruct DirectFBSurfaceCreateInfoEXT where
withCStruct :: DirectFBSurfaceCreateInfoEXT
-> (("pCreateInfo" ::: Ptr DirectFBSurfaceCreateInfoEXT) -> IO b)
-> IO b
withCStruct x :: DirectFBSurfaceCreateInfoEXT
x f :: ("pCreateInfo" ::: Ptr DirectFBSurfaceCreateInfoEXT) -> IO b
f = Int
-> Int
-> (("pCreateInfo" ::: Ptr DirectFBSurfaceCreateInfoEXT) -> IO b)
-> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 40 8 ((("pCreateInfo" ::: Ptr DirectFBSurfaceCreateInfoEXT) -> IO b)
-> IO b)
-> (("pCreateInfo" ::: Ptr DirectFBSurfaceCreateInfoEXT) -> IO b)
-> IO b
forall a b. (a -> b) -> a -> b
$ \p :: "pCreateInfo" ::: Ptr DirectFBSurfaceCreateInfoEXT
p -> ("pCreateInfo" ::: Ptr DirectFBSurfaceCreateInfoEXT)
-> DirectFBSurfaceCreateInfoEXT -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pCreateInfo" ::: Ptr DirectFBSurfaceCreateInfoEXT
p DirectFBSurfaceCreateInfoEXT
x (("pCreateInfo" ::: Ptr DirectFBSurfaceCreateInfoEXT) -> IO b
f "pCreateInfo" ::: Ptr DirectFBSurfaceCreateInfoEXT
p)
pokeCStruct :: ("pCreateInfo" ::: Ptr DirectFBSurfaceCreateInfoEXT)
-> DirectFBSurfaceCreateInfoEXT -> IO b -> IO b
pokeCStruct p :: "pCreateInfo" ::: Ptr DirectFBSurfaceCreateInfoEXT
p DirectFBSurfaceCreateInfoEXT{..} f :: IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCreateInfo" ::: Ptr DirectFBSurfaceCreateInfoEXT
p ("pCreateInfo" ::: Ptr DirectFBSurfaceCreateInfoEXT)
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_DIRECTFB_SURFACE_CREATE_INFO_EXT)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCreateInfo" ::: Ptr DirectFBSurfaceCreateInfoEXT
p ("pCreateInfo" ::: Ptr DirectFBSurfaceCreateInfoEXT)
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr DirectFBSurfaceCreateFlagsEXT
-> DirectFBSurfaceCreateFlagsEXT -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCreateInfo" ::: Ptr DirectFBSurfaceCreateInfoEXT
p ("pCreateInfo" ::: Ptr DirectFBSurfaceCreateInfoEXT)
-> Int -> Ptr DirectFBSurfaceCreateFlagsEXT
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr DirectFBSurfaceCreateFlagsEXT)) (DirectFBSurfaceCreateFlagsEXT
flags)
Ptr ("dfb" ::: Ptr IDirectFB) -> ("dfb" ::: Ptr IDirectFB) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCreateInfo" ::: Ptr DirectFBSurfaceCreateInfoEXT
p ("pCreateInfo" ::: Ptr DirectFBSurfaceCreateInfoEXT)
-> Int -> Ptr ("dfb" ::: Ptr IDirectFB)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr (Ptr IDirectFB))) ("dfb" ::: Ptr IDirectFB
dfb)
Ptr (Ptr IDirectFBSurface) -> Ptr IDirectFBSurface -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCreateInfo" ::: Ptr DirectFBSurfaceCreateInfoEXT
p ("pCreateInfo" ::: Ptr DirectFBSurfaceCreateInfoEXT)
-> Int -> Ptr (Ptr IDirectFBSurface)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32 :: Ptr (Ptr IDirectFBSurface))) (Ptr IDirectFBSurface
surface)
IO b
f
cStructSize :: Int
cStructSize = 40
cStructAlignment :: Int
cStructAlignment = 8
pokeZeroCStruct :: ("pCreateInfo" ::: Ptr DirectFBSurfaceCreateInfoEXT)
-> IO b -> IO b
pokeZeroCStruct p :: "pCreateInfo" ::: Ptr DirectFBSurfaceCreateInfoEXT
p f :: IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCreateInfo" ::: Ptr DirectFBSurfaceCreateInfoEXT
p ("pCreateInfo" ::: Ptr DirectFBSurfaceCreateInfoEXT)
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_DIRECTFB_SURFACE_CREATE_INFO_EXT)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCreateInfo" ::: Ptr DirectFBSurfaceCreateInfoEXT
p ("pCreateInfo" ::: Ptr DirectFBSurfaceCreateInfoEXT)
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr ("dfb" ::: Ptr IDirectFB) -> ("dfb" ::: Ptr IDirectFB) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCreateInfo" ::: Ptr DirectFBSurfaceCreateInfoEXT
p ("pCreateInfo" ::: Ptr DirectFBSurfaceCreateInfoEXT)
-> Int -> Ptr ("dfb" ::: Ptr IDirectFB)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr (Ptr IDirectFB))) ("dfb" ::: Ptr IDirectFB
forall a. Zero a => a
zero)
Ptr (Ptr IDirectFBSurface) -> Ptr IDirectFBSurface -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCreateInfo" ::: Ptr DirectFBSurfaceCreateInfoEXT
p ("pCreateInfo" ::: Ptr DirectFBSurfaceCreateInfoEXT)
-> Int -> Ptr (Ptr IDirectFBSurface)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32 :: Ptr (Ptr IDirectFBSurface))) (Ptr IDirectFBSurface
forall a. Zero a => a
zero)
IO b
f
instance FromCStruct DirectFBSurfaceCreateInfoEXT where
peekCStruct :: ("pCreateInfo" ::: Ptr DirectFBSurfaceCreateInfoEXT)
-> IO DirectFBSurfaceCreateInfoEXT
peekCStruct p :: "pCreateInfo" ::: Ptr DirectFBSurfaceCreateInfoEXT
p = do
DirectFBSurfaceCreateFlagsEXT
flags <- Ptr DirectFBSurfaceCreateFlagsEXT
-> IO DirectFBSurfaceCreateFlagsEXT
forall a. Storable a => Ptr a -> IO a
peek @DirectFBSurfaceCreateFlagsEXT (("pCreateInfo" ::: Ptr DirectFBSurfaceCreateInfoEXT
p ("pCreateInfo" ::: Ptr DirectFBSurfaceCreateInfoEXT)
-> Int -> Ptr DirectFBSurfaceCreateFlagsEXT
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr DirectFBSurfaceCreateFlagsEXT))
"dfb" ::: Ptr IDirectFB
dfb <- Ptr ("dfb" ::: Ptr IDirectFB) -> IO ("dfb" ::: Ptr IDirectFB)
forall a. Storable a => Ptr a -> IO a
peek @(Ptr IDirectFB) (("pCreateInfo" ::: Ptr DirectFBSurfaceCreateInfoEXT
p ("pCreateInfo" ::: Ptr DirectFBSurfaceCreateInfoEXT)
-> Int -> Ptr ("dfb" ::: Ptr IDirectFB)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr (Ptr IDirectFB)))
Ptr IDirectFBSurface
surface <- Ptr (Ptr IDirectFBSurface) -> IO (Ptr IDirectFBSurface)
forall a. Storable a => Ptr a -> IO a
peek @(Ptr IDirectFBSurface) (("pCreateInfo" ::: Ptr DirectFBSurfaceCreateInfoEXT
p ("pCreateInfo" ::: Ptr DirectFBSurfaceCreateInfoEXT)
-> Int -> Ptr (Ptr IDirectFBSurface)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32 :: Ptr (Ptr IDirectFBSurface)))
DirectFBSurfaceCreateInfoEXT -> IO DirectFBSurfaceCreateInfoEXT
forall (f :: * -> *) a. Applicative f => a -> f a
pure (DirectFBSurfaceCreateInfoEXT -> IO DirectFBSurfaceCreateInfoEXT)
-> DirectFBSurfaceCreateInfoEXT -> IO DirectFBSurfaceCreateInfoEXT
forall a b. (a -> b) -> a -> b
$ DirectFBSurfaceCreateFlagsEXT
-> ("dfb" ::: Ptr IDirectFB)
-> Ptr IDirectFBSurface
-> DirectFBSurfaceCreateInfoEXT
DirectFBSurfaceCreateInfoEXT
DirectFBSurfaceCreateFlagsEXT
flags "dfb" ::: Ptr IDirectFB
dfb Ptr IDirectFBSurface
surface
instance Storable DirectFBSurfaceCreateInfoEXT where
sizeOf :: DirectFBSurfaceCreateInfoEXT -> Int
sizeOf ~DirectFBSurfaceCreateInfoEXT
_ = 40
alignment :: DirectFBSurfaceCreateInfoEXT -> Int
alignment ~DirectFBSurfaceCreateInfoEXT
_ = 8
peek :: ("pCreateInfo" ::: Ptr DirectFBSurfaceCreateInfoEXT)
-> IO DirectFBSurfaceCreateInfoEXT
peek = ("pCreateInfo" ::: Ptr DirectFBSurfaceCreateInfoEXT)
-> IO DirectFBSurfaceCreateInfoEXT
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: ("pCreateInfo" ::: Ptr DirectFBSurfaceCreateInfoEXT)
-> DirectFBSurfaceCreateInfoEXT -> IO ()
poke ptr :: "pCreateInfo" ::: Ptr DirectFBSurfaceCreateInfoEXT
ptr poked :: DirectFBSurfaceCreateInfoEXT
poked = ("pCreateInfo" ::: Ptr DirectFBSurfaceCreateInfoEXT)
-> DirectFBSurfaceCreateInfoEXT -> IO () -> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pCreateInfo" ::: Ptr DirectFBSurfaceCreateInfoEXT
ptr DirectFBSurfaceCreateInfoEXT
poked (() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero DirectFBSurfaceCreateInfoEXT where
zero :: DirectFBSurfaceCreateInfoEXT
zero = DirectFBSurfaceCreateFlagsEXT
-> ("dfb" ::: Ptr IDirectFB)
-> Ptr IDirectFBSurface
-> DirectFBSurfaceCreateInfoEXT
DirectFBSurfaceCreateInfoEXT
DirectFBSurfaceCreateFlagsEXT
forall a. Zero a => a
zero
"dfb" ::: Ptr IDirectFB
forall a. Zero a => a
zero
Ptr IDirectFBSurface
forall a. Zero a => a
zero
newtype DirectFBSurfaceCreateFlagsEXT = DirectFBSurfaceCreateFlagsEXT Flags
deriving newtype (DirectFBSurfaceCreateFlagsEXT
-> DirectFBSurfaceCreateFlagsEXT -> Bool
(DirectFBSurfaceCreateFlagsEXT
-> DirectFBSurfaceCreateFlagsEXT -> Bool)
-> (DirectFBSurfaceCreateFlagsEXT
-> DirectFBSurfaceCreateFlagsEXT -> Bool)
-> Eq DirectFBSurfaceCreateFlagsEXT
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DirectFBSurfaceCreateFlagsEXT
-> DirectFBSurfaceCreateFlagsEXT -> Bool
$c/= :: DirectFBSurfaceCreateFlagsEXT
-> DirectFBSurfaceCreateFlagsEXT -> Bool
== :: DirectFBSurfaceCreateFlagsEXT
-> DirectFBSurfaceCreateFlagsEXT -> Bool
$c== :: DirectFBSurfaceCreateFlagsEXT
-> DirectFBSurfaceCreateFlagsEXT -> Bool
Eq, Eq DirectFBSurfaceCreateFlagsEXT
Eq DirectFBSurfaceCreateFlagsEXT =>
(DirectFBSurfaceCreateFlagsEXT
-> DirectFBSurfaceCreateFlagsEXT -> Ordering)
-> (DirectFBSurfaceCreateFlagsEXT
-> DirectFBSurfaceCreateFlagsEXT -> Bool)
-> (DirectFBSurfaceCreateFlagsEXT
-> DirectFBSurfaceCreateFlagsEXT -> Bool)
-> (DirectFBSurfaceCreateFlagsEXT
-> DirectFBSurfaceCreateFlagsEXT -> Bool)
-> (DirectFBSurfaceCreateFlagsEXT
-> DirectFBSurfaceCreateFlagsEXT -> Bool)
-> (DirectFBSurfaceCreateFlagsEXT
-> DirectFBSurfaceCreateFlagsEXT -> DirectFBSurfaceCreateFlagsEXT)
-> (DirectFBSurfaceCreateFlagsEXT
-> DirectFBSurfaceCreateFlagsEXT -> DirectFBSurfaceCreateFlagsEXT)
-> Ord DirectFBSurfaceCreateFlagsEXT
DirectFBSurfaceCreateFlagsEXT
-> DirectFBSurfaceCreateFlagsEXT -> Bool
DirectFBSurfaceCreateFlagsEXT
-> DirectFBSurfaceCreateFlagsEXT -> Ordering
DirectFBSurfaceCreateFlagsEXT
-> DirectFBSurfaceCreateFlagsEXT -> DirectFBSurfaceCreateFlagsEXT
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 :: DirectFBSurfaceCreateFlagsEXT
-> DirectFBSurfaceCreateFlagsEXT -> DirectFBSurfaceCreateFlagsEXT
$cmin :: DirectFBSurfaceCreateFlagsEXT
-> DirectFBSurfaceCreateFlagsEXT -> DirectFBSurfaceCreateFlagsEXT
max :: DirectFBSurfaceCreateFlagsEXT
-> DirectFBSurfaceCreateFlagsEXT -> DirectFBSurfaceCreateFlagsEXT
$cmax :: DirectFBSurfaceCreateFlagsEXT
-> DirectFBSurfaceCreateFlagsEXT -> DirectFBSurfaceCreateFlagsEXT
>= :: DirectFBSurfaceCreateFlagsEXT
-> DirectFBSurfaceCreateFlagsEXT -> Bool
$c>= :: DirectFBSurfaceCreateFlagsEXT
-> DirectFBSurfaceCreateFlagsEXT -> Bool
> :: DirectFBSurfaceCreateFlagsEXT
-> DirectFBSurfaceCreateFlagsEXT -> Bool
$c> :: DirectFBSurfaceCreateFlagsEXT
-> DirectFBSurfaceCreateFlagsEXT -> Bool
<= :: DirectFBSurfaceCreateFlagsEXT
-> DirectFBSurfaceCreateFlagsEXT -> Bool
$c<= :: DirectFBSurfaceCreateFlagsEXT
-> DirectFBSurfaceCreateFlagsEXT -> Bool
< :: DirectFBSurfaceCreateFlagsEXT
-> DirectFBSurfaceCreateFlagsEXT -> Bool
$c< :: DirectFBSurfaceCreateFlagsEXT
-> DirectFBSurfaceCreateFlagsEXT -> Bool
compare :: DirectFBSurfaceCreateFlagsEXT
-> DirectFBSurfaceCreateFlagsEXT -> Ordering
$ccompare :: DirectFBSurfaceCreateFlagsEXT
-> DirectFBSurfaceCreateFlagsEXT -> Ordering
$cp1Ord :: Eq DirectFBSurfaceCreateFlagsEXT
Ord, Ptr b -> Int -> IO DirectFBSurfaceCreateFlagsEXT
Ptr b -> Int -> DirectFBSurfaceCreateFlagsEXT -> IO ()
Ptr DirectFBSurfaceCreateFlagsEXT
-> IO DirectFBSurfaceCreateFlagsEXT
Ptr DirectFBSurfaceCreateFlagsEXT
-> Int -> IO DirectFBSurfaceCreateFlagsEXT
Ptr DirectFBSurfaceCreateFlagsEXT
-> Int -> DirectFBSurfaceCreateFlagsEXT -> IO ()
Ptr DirectFBSurfaceCreateFlagsEXT
-> DirectFBSurfaceCreateFlagsEXT -> IO ()
DirectFBSurfaceCreateFlagsEXT -> Int
(DirectFBSurfaceCreateFlagsEXT -> Int)
-> (DirectFBSurfaceCreateFlagsEXT -> Int)
-> (Ptr DirectFBSurfaceCreateFlagsEXT
-> Int -> IO DirectFBSurfaceCreateFlagsEXT)
-> (Ptr DirectFBSurfaceCreateFlagsEXT
-> Int -> DirectFBSurfaceCreateFlagsEXT -> IO ())
-> (forall b. Ptr b -> Int -> IO DirectFBSurfaceCreateFlagsEXT)
-> (forall b.
Ptr b -> Int -> DirectFBSurfaceCreateFlagsEXT -> IO ())
-> (Ptr DirectFBSurfaceCreateFlagsEXT
-> IO DirectFBSurfaceCreateFlagsEXT)
-> (Ptr DirectFBSurfaceCreateFlagsEXT
-> DirectFBSurfaceCreateFlagsEXT -> IO ())
-> Storable DirectFBSurfaceCreateFlagsEXT
forall b. Ptr b -> Int -> IO DirectFBSurfaceCreateFlagsEXT
forall b. Ptr b -> Int -> DirectFBSurfaceCreateFlagsEXT -> 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 DirectFBSurfaceCreateFlagsEXT
-> DirectFBSurfaceCreateFlagsEXT -> IO ()
$cpoke :: Ptr DirectFBSurfaceCreateFlagsEXT
-> DirectFBSurfaceCreateFlagsEXT -> IO ()
peek :: Ptr DirectFBSurfaceCreateFlagsEXT
-> IO DirectFBSurfaceCreateFlagsEXT
$cpeek :: Ptr DirectFBSurfaceCreateFlagsEXT
-> IO DirectFBSurfaceCreateFlagsEXT
pokeByteOff :: Ptr b -> Int -> DirectFBSurfaceCreateFlagsEXT -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> DirectFBSurfaceCreateFlagsEXT -> IO ()
peekByteOff :: Ptr b -> Int -> IO DirectFBSurfaceCreateFlagsEXT
$cpeekByteOff :: forall b. Ptr b -> Int -> IO DirectFBSurfaceCreateFlagsEXT
pokeElemOff :: Ptr DirectFBSurfaceCreateFlagsEXT
-> Int -> DirectFBSurfaceCreateFlagsEXT -> IO ()
$cpokeElemOff :: Ptr DirectFBSurfaceCreateFlagsEXT
-> Int -> DirectFBSurfaceCreateFlagsEXT -> IO ()
peekElemOff :: Ptr DirectFBSurfaceCreateFlagsEXT
-> Int -> IO DirectFBSurfaceCreateFlagsEXT
$cpeekElemOff :: Ptr DirectFBSurfaceCreateFlagsEXT
-> Int -> IO DirectFBSurfaceCreateFlagsEXT
alignment :: DirectFBSurfaceCreateFlagsEXT -> Int
$calignment :: DirectFBSurfaceCreateFlagsEXT -> Int
sizeOf :: DirectFBSurfaceCreateFlagsEXT -> Int
$csizeOf :: DirectFBSurfaceCreateFlagsEXT -> Int
Storable, DirectFBSurfaceCreateFlagsEXT
DirectFBSurfaceCreateFlagsEXT -> Zero DirectFBSurfaceCreateFlagsEXT
forall a. a -> Zero a
zero :: DirectFBSurfaceCreateFlagsEXT
$czero :: DirectFBSurfaceCreateFlagsEXT
Zero, Eq DirectFBSurfaceCreateFlagsEXT
DirectFBSurfaceCreateFlagsEXT
Eq DirectFBSurfaceCreateFlagsEXT =>
(DirectFBSurfaceCreateFlagsEXT
-> DirectFBSurfaceCreateFlagsEXT -> DirectFBSurfaceCreateFlagsEXT)
-> (DirectFBSurfaceCreateFlagsEXT
-> DirectFBSurfaceCreateFlagsEXT -> DirectFBSurfaceCreateFlagsEXT)
-> (DirectFBSurfaceCreateFlagsEXT
-> DirectFBSurfaceCreateFlagsEXT -> DirectFBSurfaceCreateFlagsEXT)
-> (DirectFBSurfaceCreateFlagsEXT -> DirectFBSurfaceCreateFlagsEXT)
-> (DirectFBSurfaceCreateFlagsEXT
-> Int -> DirectFBSurfaceCreateFlagsEXT)
-> (DirectFBSurfaceCreateFlagsEXT
-> Int -> DirectFBSurfaceCreateFlagsEXT)
-> DirectFBSurfaceCreateFlagsEXT
-> (Int -> DirectFBSurfaceCreateFlagsEXT)
-> (DirectFBSurfaceCreateFlagsEXT
-> Int -> DirectFBSurfaceCreateFlagsEXT)
-> (DirectFBSurfaceCreateFlagsEXT
-> Int -> DirectFBSurfaceCreateFlagsEXT)
-> (DirectFBSurfaceCreateFlagsEXT
-> Int -> DirectFBSurfaceCreateFlagsEXT)
-> (DirectFBSurfaceCreateFlagsEXT -> Int -> Bool)
-> (DirectFBSurfaceCreateFlagsEXT -> Maybe Int)
-> (DirectFBSurfaceCreateFlagsEXT -> Int)
-> (DirectFBSurfaceCreateFlagsEXT -> Bool)
-> (DirectFBSurfaceCreateFlagsEXT
-> Int -> DirectFBSurfaceCreateFlagsEXT)
-> (DirectFBSurfaceCreateFlagsEXT
-> Int -> DirectFBSurfaceCreateFlagsEXT)
-> (DirectFBSurfaceCreateFlagsEXT
-> Int -> DirectFBSurfaceCreateFlagsEXT)
-> (DirectFBSurfaceCreateFlagsEXT
-> Int -> DirectFBSurfaceCreateFlagsEXT)
-> (DirectFBSurfaceCreateFlagsEXT
-> Int -> DirectFBSurfaceCreateFlagsEXT)
-> (DirectFBSurfaceCreateFlagsEXT
-> Int -> DirectFBSurfaceCreateFlagsEXT)
-> (DirectFBSurfaceCreateFlagsEXT -> Int)
-> Bits DirectFBSurfaceCreateFlagsEXT
Int -> DirectFBSurfaceCreateFlagsEXT
DirectFBSurfaceCreateFlagsEXT -> Bool
DirectFBSurfaceCreateFlagsEXT -> Int
DirectFBSurfaceCreateFlagsEXT -> Maybe Int
DirectFBSurfaceCreateFlagsEXT -> DirectFBSurfaceCreateFlagsEXT
DirectFBSurfaceCreateFlagsEXT -> Int -> Bool
DirectFBSurfaceCreateFlagsEXT
-> Int -> DirectFBSurfaceCreateFlagsEXT
DirectFBSurfaceCreateFlagsEXT
-> DirectFBSurfaceCreateFlagsEXT -> DirectFBSurfaceCreateFlagsEXT
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 :: DirectFBSurfaceCreateFlagsEXT -> Int
$cpopCount :: DirectFBSurfaceCreateFlagsEXT -> Int
rotateR :: DirectFBSurfaceCreateFlagsEXT
-> Int -> DirectFBSurfaceCreateFlagsEXT
$crotateR :: DirectFBSurfaceCreateFlagsEXT
-> Int -> DirectFBSurfaceCreateFlagsEXT
rotateL :: DirectFBSurfaceCreateFlagsEXT
-> Int -> DirectFBSurfaceCreateFlagsEXT
$crotateL :: DirectFBSurfaceCreateFlagsEXT
-> Int -> DirectFBSurfaceCreateFlagsEXT
unsafeShiftR :: DirectFBSurfaceCreateFlagsEXT
-> Int -> DirectFBSurfaceCreateFlagsEXT
$cunsafeShiftR :: DirectFBSurfaceCreateFlagsEXT
-> Int -> DirectFBSurfaceCreateFlagsEXT
shiftR :: DirectFBSurfaceCreateFlagsEXT
-> Int -> DirectFBSurfaceCreateFlagsEXT
$cshiftR :: DirectFBSurfaceCreateFlagsEXT
-> Int -> DirectFBSurfaceCreateFlagsEXT
unsafeShiftL :: DirectFBSurfaceCreateFlagsEXT
-> Int -> DirectFBSurfaceCreateFlagsEXT
$cunsafeShiftL :: DirectFBSurfaceCreateFlagsEXT
-> Int -> DirectFBSurfaceCreateFlagsEXT
shiftL :: DirectFBSurfaceCreateFlagsEXT
-> Int -> DirectFBSurfaceCreateFlagsEXT
$cshiftL :: DirectFBSurfaceCreateFlagsEXT
-> Int -> DirectFBSurfaceCreateFlagsEXT
isSigned :: DirectFBSurfaceCreateFlagsEXT -> Bool
$cisSigned :: DirectFBSurfaceCreateFlagsEXT -> Bool
bitSize :: DirectFBSurfaceCreateFlagsEXT -> Int
$cbitSize :: DirectFBSurfaceCreateFlagsEXT -> Int
bitSizeMaybe :: DirectFBSurfaceCreateFlagsEXT -> Maybe Int
$cbitSizeMaybe :: DirectFBSurfaceCreateFlagsEXT -> Maybe Int
testBit :: DirectFBSurfaceCreateFlagsEXT -> Int -> Bool
$ctestBit :: DirectFBSurfaceCreateFlagsEXT -> Int -> Bool
complementBit :: DirectFBSurfaceCreateFlagsEXT
-> Int -> DirectFBSurfaceCreateFlagsEXT
$ccomplementBit :: DirectFBSurfaceCreateFlagsEXT
-> Int -> DirectFBSurfaceCreateFlagsEXT
clearBit :: DirectFBSurfaceCreateFlagsEXT
-> Int -> DirectFBSurfaceCreateFlagsEXT
$cclearBit :: DirectFBSurfaceCreateFlagsEXT
-> Int -> DirectFBSurfaceCreateFlagsEXT
setBit :: DirectFBSurfaceCreateFlagsEXT
-> Int -> DirectFBSurfaceCreateFlagsEXT
$csetBit :: DirectFBSurfaceCreateFlagsEXT
-> Int -> DirectFBSurfaceCreateFlagsEXT
bit :: Int -> DirectFBSurfaceCreateFlagsEXT
$cbit :: Int -> DirectFBSurfaceCreateFlagsEXT
zeroBits :: DirectFBSurfaceCreateFlagsEXT
$czeroBits :: DirectFBSurfaceCreateFlagsEXT
rotate :: DirectFBSurfaceCreateFlagsEXT
-> Int -> DirectFBSurfaceCreateFlagsEXT
$crotate :: DirectFBSurfaceCreateFlagsEXT
-> Int -> DirectFBSurfaceCreateFlagsEXT
shift :: DirectFBSurfaceCreateFlagsEXT
-> Int -> DirectFBSurfaceCreateFlagsEXT
$cshift :: DirectFBSurfaceCreateFlagsEXT
-> Int -> DirectFBSurfaceCreateFlagsEXT
complement :: DirectFBSurfaceCreateFlagsEXT -> DirectFBSurfaceCreateFlagsEXT
$ccomplement :: DirectFBSurfaceCreateFlagsEXT -> DirectFBSurfaceCreateFlagsEXT
xor :: DirectFBSurfaceCreateFlagsEXT
-> DirectFBSurfaceCreateFlagsEXT -> DirectFBSurfaceCreateFlagsEXT
$cxor :: DirectFBSurfaceCreateFlagsEXT
-> DirectFBSurfaceCreateFlagsEXT -> DirectFBSurfaceCreateFlagsEXT
.|. :: DirectFBSurfaceCreateFlagsEXT
-> DirectFBSurfaceCreateFlagsEXT -> DirectFBSurfaceCreateFlagsEXT
$c.|. :: DirectFBSurfaceCreateFlagsEXT
-> DirectFBSurfaceCreateFlagsEXT -> DirectFBSurfaceCreateFlagsEXT
.&. :: DirectFBSurfaceCreateFlagsEXT
-> DirectFBSurfaceCreateFlagsEXT -> DirectFBSurfaceCreateFlagsEXT
$c.&. :: DirectFBSurfaceCreateFlagsEXT
-> DirectFBSurfaceCreateFlagsEXT -> DirectFBSurfaceCreateFlagsEXT
$cp1Bits :: Eq DirectFBSurfaceCreateFlagsEXT
Bits, Bits DirectFBSurfaceCreateFlagsEXT
Bits DirectFBSurfaceCreateFlagsEXT =>
(DirectFBSurfaceCreateFlagsEXT -> Int)
-> (DirectFBSurfaceCreateFlagsEXT -> Int)
-> (DirectFBSurfaceCreateFlagsEXT -> Int)
-> FiniteBits DirectFBSurfaceCreateFlagsEXT
DirectFBSurfaceCreateFlagsEXT -> Int
forall b.
Bits b =>
(b -> Int) -> (b -> Int) -> (b -> Int) -> FiniteBits b
countTrailingZeros :: DirectFBSurfaceCreateFlagsEXT -> Int
$ccountTrailingZeros :: DirectFBSurfaceCreateFlagsEXT -> Int
countLeadingZeros :: DirectFBSurfaceCreateFlagsEXT -> Int
$ccountLeadingZeros :: DirectFBSurfaceCreateFlagsEXT -> Int
finiteBitSize :: DirectFBSurfaceCreateFlagsEXT -> Int
$cfiniteBitSize :: DirectFBSurfaceCreateFlagsEXT -> Int
$cp1FiniteBits :: Bits DirectFBSurfaceCreateFlagsEXT
FiniteBits)
conNameDirectFBSurfaceCreateFlagsEXT :: String
conNameDirectFBSurfaceCreateFlagsEXT :: String
conNameDirectFBSurfaceCreateFlagsEXT = "DirectFBSurfaceCreateFlagsEXT"
enumPrefixDirectFBSurfaceCreateFlagsEXT :: String
enumPrefixDirectFBSurfaceCreateFlagsEXT :: String
enumPrefixDirectFBSurfaceCreateFlagsEXT = ""
showTableDirectFBSurfaceCreateFlagsEXT :: [(DirectFBSurfaceCreateFlagsEXT, String)]
showTableDirectFBSurfaceCreateFlagsEXT :: [(DirectFBSurfaceCreateFlagsEXT, String)]
showTableDirectFBSurfaceCreateFlagsEXT = []
instance Show DirectFBSurfaceCreateFlagsEXT where
showsPrec :: Int -> DirectFBSurfaceCreateFlagsEXT -> ShowS
showsPrec = String
-> [(DirectFBSurfaceCreateFlagsEXT, String)]
-> String
-> (DirectFBSurfaceCreateFlagsEXT -> "queueFamilyIndex" ::: Word32)
-> (("queueFamilyIndex" ::: Word32) -> ShowS)
-> Int
-> DirectFBSurfaceCreateFlagsEXT
-> ShowS
forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec String
enumPrefixDirectFBSurfaceCreateFlagsEXT
[(DirectFBSurfaceCreateFlagsEXT, String)]
showTableDirectFBSurfaceCreateFlagsEXT
String
conNameDirectFBSurfaceCreateFlagsEXT
(\(DirectFBSurfaceCreateFlagsEXT x :: "queueFamilyIndex" ::: Word32
x) -> "queueFamilyIndex" ::: Word32
x)
(\x :: "queueFamilyIndex" ::: Word32
x -> String -> ShowS
showString "0x" ShowS -> ShowS -> ShowS
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ("queueFamilyIndex" ::: Word32) -> ShowS
forall a. (Integral a, Show a) => a -> ShowS
showHex "queueFamilyIndex" ::: Word32
x)
instance Read DirectFBSurfaceCreateFlagsEXT where
readPrec :: ReadPrec DirectFBSurfaceCreateFlagsEXT
readPrec = String
-> [(DirectFBSurfaceCreateFlagsEXT, String)]
-> String
-> (("queueFamilyIndex" ::: Word32)
-> DirectFBSurfaceCreateFlagsEXT)
-> ReadPrec DirectFBSurfaceCreateFlagsEXT
forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec String
enumPrefixDirectFBSurfaceCreateFlagsEXT
[(DirectFBSurfaceCreateFlagsEXT, String)]
showTableDirectFBSurfaceCreateFlagsEXT
String
conNameDirectFBSurfaceCreateFlagsEXT
("queueFamilyIndex" ::: Word32) -> DirectFBSurfaceCreateFlagsEXT
DirectFBSurfaceCreateFlagsEXT
type EXT_DIRECTFB_SURFACE_SPEC_VERSION = 1
pattern EXT_DIRECTFB_SURFACE_SPEC_VERSION :: forall a . Integral a => a
pattern $bEXT_DIRECTFB_SURFACE_SPEC_VERSION :: a
$mEXT_DIRECTFB_SURFACE_SPEC_VERSION :: forall r a. Integral a => a -> (Void# -> r) -> (Void# -> r) -> r
EXT_DIRECTFB_SURFACE_SPEC_VERSION = 1
type EXT_DIRECTFB_SURFACE_EXTENSION_NAME = "VK_EXT_directfb_surface"
pattern EXT_DIRECTFB_SURFACE_EXTENSION_NAME :: forall a . (Eq a, IsString a) => a
pattern $bEXT_DIRECTFB_SURFACE_EXTENSION_NAME :: a
$mEXT_DIRECTFB_SURFACE_EXTENSION_NAME :: forall r a.
(Eq a, IsString a) =>
a -> (Void# -> r) -> (Void# -> r) -> r
EXT_DIRECTFB_SURFACE_EXTENSION_NAME = "VK_EXT_directfb_surface"
data IDirectFB
data IDirectFBSurface