{-# language CPP #-}
module Vulkan.Extensions.VK_FUCHSIA_imagepipe_surface  ( createImagePipeSurfaceFUCHSIA
                                                       , ImagePipeSurfaceCreateInfoFUCHSIA(..)
                                                       , ImagePipeSurfaceCreateFlagsFUCHSIA(..)
                                                       , FUCHSIA_IMAGEPIPE_SURFACE_SPEC_VERSION
                                                       , pattern FUCHSIA_IMAGEPIPE_SURFACE_SPEC_VERSION
                                                       , FUCHSIA_IMAGEPIPE_SURFACE_EXTENSION_NAME
                                                       , pattern FUCHSIA_IMAGEPIPE_SURFACE_EXTENSION_NAME
                                                       , Zx_handle_t
                                                       , SurfaceKHR(..)
                                                       ) where

import Control.Exception.Base (bracket)
import Control.Monad (unless)
import Control.Monad.IO.Class (liftIO)
import Foreign.Marshal.Alloc (allocaBytesAligned)
import Foreign.Marshal.Alloc (callocBytes)
import Foreign.Marshal.Alloc (free)
import GHC.Base (when)
import GHC.IO (throwIO)
import GHC.Ptr (nullFunPtr)
import Foreign.Ptr (nullPtr)
import Foreign.Ptr (plusPtr)
import GHC.Read (choose)
import GHC.Read (expectP)
import GHC.Read (parens)
import GHC.Show (showParen)
import GHC.Show (showString)
import Numeric (showHex)
import Text.ParserCombinators.ReadPrec ((+++))
import Text.ParserCombinators.ReadPrec (prec)
import Text.ParserCombinators.ReadPrec (step)
import Control.Monad.Trans.Class (lift)
import Control.Monad.Trans.Cont (evalContT)
import Control.Monad.IO.Class (MonadIO)
import Data.Bits (Bits)
import Data.String (IsString)
import Data.Typeable (Typeable)
import Foreign.Storable (Storable)
import Foreign.Storable (Storable(peek))
import Foreign.Storable (Storable(poke))
import qualified Foreign.Storable (Storable(..))
import GHC.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 Data.Word (Word32)
import Text.Read.Lex (Lexeme(Ident))
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(pVkCreateImagePipeSurfaceFUCHSIA))
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_IMAGEPIPE_SURFACE_CREATE_INFO_FUCHSIA))
import Vulkan.Core10.Enums.Result (Result(SUCCESS))
import Vulkan.Extensions.Handles (SurfaceKHR(..))
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
  unsafe
#endif
  "dynamic" mkVkCreateImagePipeSurfaceFUCHSIA
  :: FunPtr (Ptr Instance_T -> Ptr ImagePipeSurfaceCreateInfoFUCHSIA -> Ptr AllocationCallbacks -> Ptr SurfaceKHR -> IO Result) -> Ptr Instance_T -> Ptr ImagePipeSurfaceCreateInfoFUCHSIA -> Ptr AllocationCallbacks -> Ptr SurfaceKHR -> IO Result

-- | vkCreateImagePipeSurfaceFUCHSIA - Create a
-- 'Vulkan.Extensions.Handles.SurfaceKHR' object for a Fuchsia ImagePipe
--
-- == Valid Usage (Implicit)
--
-- -   @instance@ /must/ be a valid 'Vulkan.Core10.Handles.Instance' handle
--
-- -   @pCreateInfo@ /must/ be a valid pointer to a valid
--     'ImagePipeSurfaceCreateInfoFUCHSIA' structure
--
-- -   If @pAllocator@ is not @NULL@, @pAllocator@ /must/ be a valid
--     pointer to a valid
--     'Vulkan.Core10.AllocationCallbacks.AllocationCallbacks' structure
--
-- -   @pSurface@ /must/ be a valid pointer to a
--     'Vulkan.Extensions.Handles.SurfaceKHR' handle
--
-- == Return Codes
--
-- [<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#fundamentals-successcodes Success>]
--
--     -   'Vulkan.Core10.Enums.Result.SUCCESS'
--
-- [<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#fundamentals-errorcodes Failure>]
--
--     -   'Vulkan.Core10.Enums.Result.ERROR_OUT_OF_HOST_MEMORY'
--
--     -   'Vulkan.Core10.Enums.Result.ERROR_OUT_OF_DEVICE_MEMORY'
--
-- = See Also
--
-- 'Vulkan.Core10.AllocationCallbacks.AllocationCallbacks',
-- 'ImagePipeSurfaceCreateInfoFUCHSIA', 'Vulkan.Core10.Handles.Instance',
-- 'Vulkan.Extensions.Handles.SurfaceKHR'
createImagePipeSurfaceFUCHSIA :: forall io
                               . (MonadIO io)
                              => -- | @instance@ is the instance to associate with the surface.
                                 Instance
                              -> -- | @pCreateInfo@ is a pointer to a 'ImagePipeSurfaceCreateInfoFUCHSIA'
                                 -- structure containing parameters affecting the creation of the surface
                                 -- object.
                                 ImagePipeSurfaceCreateInfoFUCHSIA
                              -> -- | @pAllocator@ is the allocator used for host memory allocated for the
                                 -- surface object when there is no more specific allocator available (see
                                 -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#memory-allocation Memory Allocation>).
                                 ("allocator" ::: Maybe AllocationCallbacks)
                              -> io (SurfaceKHR)
createImagePipeSurfaceFUCHSIA :: Instance
-> ImagePipeSurfaceCreateInfoFUCHSIA
-> ("allocator" ::: Maybe AllocationCallbacks)
-> io SurfaceKHR
createImagePipeSurfaceFUCHSIA instance' :: Instance
instance' createInfo :: ImagePipeSurfaceCreateInfoFUCHSIA
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 vkCreateImagePipeSurfaceFUCHSIAPtr :: FunPtr
  (Ptr Instance_T
   -> ("pCreateInfo" ::: Ptr ImagePipeSurfaceCreateInfoFUCHSIA)
   -> ("pAllocator" ::: Ptr AllocationCallbacks)
   -> ("pSurface" ::: Ptr SurfaceKHR)
   -> IO Result)
vkCreateImagePipeSurfaceFUCHSIAPtr = InstanceCmds
-> FunPtr
     (Ptr Instance_T
      -> ("pCreateInfo" ::: Ptr ImagePipeSurfaceCreateInfoFUCHSIA)
      -> ("pAllocator" ::: Ptr AllocationCallbacks)
      -> ("pSurface" ::: Ptr SurfaceKHR)
      -> IO Result)
pVkCreateImagePipeSurfaceFUCHSIA (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 ImagePipeSurfaceCreateInfoFUCHSIA)
   -> ("pAllocator" ::: Ptr AllocationCallbacks)
   -> ("pSurface" ::: Ptr SurfaceKHR)
   -> IO Result)
vkCreateImagePipeSurfaceFUCHSIAPtr FunPtr
  (Ptr Instance_T
   -> ("pCreateInfo" ::: Ptr ImagePipeSurfaceCreateInfoFUCHSIA)
   -> ("pAllocator" ::: Ptr AllocationCallbacks)
   -> ("pSurface" ::: Ptr SurfaceKHR)
   -> IO Result)
-> FunPtr
     (Ptr Instance_T
      -> ("pCreateInfo" ::: Ptr ImagePipeSurfaceCreateInfoFUCHSIA)
      -> ("pAllocator" ::: Ptr AllocationCallbacks)
      -> ("pSurface" ::: Ptr SurfaceKHR)
      -> IO Result)
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
  (Ptr Instance_T
   -> ("pCreateInfo" ::: Ptr ImagePipeSurfaceCreateInfoFUCHSIA)
   -> ("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 vkCreateImagePipeSurfaceFUCHSIA is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
  let vkCreateImagePipeSurfaceFUCHSIA' :: Ptr Instance_T
-> ("pCreateInfo" ::: Ptr ImagePipeSurfaceCreateInfoFUCHSIA)
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pSurface" ::: Ptr SurfaceKHR)
-> IO Result
vkCreateImagePipeSurfaceFUCHSIA' = FunPtr
  (Ptr Instance_T
   -> ("pCreateInfo" ::: Ptr ImagePipeSurfaceCreateInfoFUCHSIA)
   -> ("pAllocator" ::: Ptr AllocationCallbacks)
   -> ("pSurface" ::: Ptr SurfaceKHR)
   -> IO Result)
-> Ptr Instance_T
-> ("pCreateInfo" ::: Ptr ImagePipeSurfaceCreateInfoFUCHSIA)
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pSurface" ::: Ptr SurfaceKHR)
-> IO Result
mkVkCreateImagePipeSurfaceFUCHSIA FunPtr
  (Ptr Instance_T
   -> ("pCreateInfo" ::: Ptr ImagePipeSurfaceCreateInfoFUCHSIA)
   -> ("pAllocator" ::: Ptr AllocationCallbacks)
   -> ("pSurface" ::: Ptr SurfaceKHR)
   -> IO Result)
vkCreateImagePipeSurfaceFUCHSIAPtr
  "pCreateInfo" ::: Ptr ImagePipeSurfaceCreateInfoFUCHSIA
pCreateInfo <- ((("pCreateInfo" ::: Ptr ImagePipeSurfaceCreateInfoFUCHSIA)
  -> IO SurfaceKHR)
 -> IO SurfaceKHR)
-> ContT
     SurfaceKHR
     IO
     ("pCreateInfo" ::: Ptr ImagePipeSurfaceCreateInfoFUCHSIA)
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pCreateInfo" ::: Ptr ImagePipeSurfaceCreateInfoFUCHSIA)
   -> IO SurfaceKHR)
  -> IO SurfaceKHR)
 -> ContT
      SurfaceKHR
      IO
      ("pCreateInfo" ::: Ptr ImagePipeSurfaceCreateInfoFUCHSIA))
-> ((("pCreateInfo" ::: Ptr ImagePipeSurfaceCreateInfoFUCHSIA)
     -> IO SurfaceKHR)
    -> IO SurfaceKHR)
-> ContT
     SurfaceKHR
     IO
     ("pCreateInfo" ::: Ptr ImagePipeSurfaceCreateInfoFUCHSIA)
forall a b. (a -> b) -> a -> b
$ ImagePipeSurfaceCreateInfoFUCHSIA
-> (("pCreateInfo" ::: Ptr ImagePipeSurfaceCreateInfoFUCHSIA)
    -> IO SurfaceKHR)
-> IO SurfaceKHR
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (ImagePipeSurfaceCreateInfoFUCHSIA
createInfo)
  "pAllocator" ::: Ptr AllocationCallbacks
pAllocator <- case ("allocator" ::: Maybe AllocationCallbacks
allocator) of
    Nothing -> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ContT SurfaceKHR IO ("pAllocator" ::: Ptr AllocationCallbacks)
forall (f :: * -> *) a. Applicative f => a -> f a
pure "pAllocator" ::: Ptr AllocationCallbacks
forall a. Ptr a
nullPtr
    Just j :: AllocationCallbacks
j -> ((("pAllocator" ::: Ptr AllocationCallbacks) -> IO SurfaceKHR)
 -> IO SurfaceKHR)
-> ContT SurfaceKHR IO ("pAllocator" ::: Ptr AllocationCallbacks)
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pAllocator" ::: Ptr AllocationCallbacks) -> IO SurfaceKHR)
  -> IO SurfaceKHR)
 -> ContT SurfaceKHR IO ("pAllocator" ::: Ptr AllocationCallbacks))
-> ((("pAllocator" ::: Ptr AllocationCallbacks) -> IO SurfaceKHR)
    -> IO SurfaceKHR)
-> ContT SurfaceKHR IO ("pAllocator" ::: Ptr AllocationCallbacks)
forall a b. (a -> b) -> a -> b
$ AllocationCallbacks
-> (("pAllocator" ::: Ptr AllocationCallbacks) -> IO SurfaceKHR)
-> IO SurfaceKHR
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (AllocationCallbacks
j)
  "pSurface" ::: Ptr SurfaceKHR
pPSurface <- ((("pSurface" ::: Ptr SurfaceKHR) -> IO SurfaceKHR)
 -> IO SurfaceKHR)
-> ContT SurfaceKHR IO ("pSurface" ::: Ptr SurfaceKHR)
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pSurface" ::: Ptr SurfaceKHR) -> IO SurfaceKHR)
  -> IO SurfaceKHR)
 -> ContT SurfaceKHR IO ("pSurface" ::: Ptr SurfaceKHR))
-> ((("pSurface" ::: Ptr SurfaceKHR) -> IO SurfaceKHR)
    -> IO SurfaceKHR)
-> ContT SurfaceKHR IO ("pSurface" ::: Ptr SurfaceKHR)
forall a b. (a -> b) -> a -> b
$ IO ("pSurface" ::: Ptr SurfaceKHR)
-> (("pSurface" ::: Ptr SurfaceKHR) -> IO ())
-> (("pSurface" ::: Ptr SurfaceKHR) -> IO SurfaceKHR)
-> IO SurfaceKHR
forall a b c. IO a -> (a -> IO b) -> (a -> IO c) -> IO c
bracket (Int -> IO ("pSurface" ::: Ptr SurfaceKHR)
forall a. Int -> IO (Ptr a)
callocBytes @SurfaceKHR 8) ("pSurface" ::: Ptr SurfaceKHR) -> IO ()
forall a. Ptr a -> IO ()
free
  Result
r <- IO Result -> ContT SurfaceKHR IO Result
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO Result -> ContT SurfaceKHR IO Result)
-> IO Result -> ContT SurfaceKHR IO Result
forall a b. (a -> b) -> a -> b
$ Ptr Instance_T
-> ("pCreateInfo" ::: Ptr ImagePipeSurfaceCreateInfoFUCHSIA)
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pSurface" ::: Ptr SurfaceKHR)
-> IO Result
vkCreateImagePipeSurfaceFUCHSIA' (Instance -> Ptr Instance_T
instanceHandle (Instance
instance')) "pCreateInfo" ::: Ptr ImagePipeSurfaceCreateInfoFUCHSIA
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)


-- | VkImagePipeSurfaceCreateInfoFUCHSIA - Structure specifying parameters of
-- a newly created ImagePipe surface object
--
-- == Valid Usage (Implicit)
--
-- = See Also
--
-- 'ImagePipeSurfaceCreateFlagsFUCHSIA',
-- 'Vulkan.Core10.Enums.StructureType.StructureType',
-- 'createImagePipeSurfaceFUCHSIA'
data ImagePipeSurfaceCreateInfoFUCHSIA = ImagePipeSurfaceCreateInfoFUCHSIA
  { -- | @flags@ is reserved for future use.
    --
    -- @flags@ /must/ be @0@
    ImagePipeSurfaceCreateInfoFUCHSIA
-> ImagePipeSurfaceCreateFlagsFUCHSIA
flags :: ImagePipeSurfaceCreateFlagsFUCHSIA
  , -- | @imagePipeHandle@ is a @zx_handle_t@ referring to the ImagePipe to
    -- associate with the surface.
    --
    -- @imagePipeHandle@ /must/ be a valid @zx_handle_t@
    ImagePipeSurfaceCreateInfoFUCHSIA -> Zx_handle_t
imagePipeHandle :: Zx_handle_t
  }
  deriving (Typeable, ImagePipeSurfaceCreateInfoFUCHSIA
-> ImagePipeSurfaceCreateInfoFUCHSIA -> Bool
(ImagePipeSurfaceCreateInfoFUCHSIA
 -> ImagePipeSurfaceCreateInfoFUCHSIA -> Bool)
-> (ImagePipeSurfaceCreateInfoFUCHSIA
    -> ImagePipeSurfaceCreateInfoFUCHSIA -> Bool)
-> Eq ImagePipeSurfaceCreateInfoFUCHSIA
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ImagePipeSurfaceCreateInfoFUCHSIA
-> ImagePipeSurfaceCreateInfoFUCHSIA -> Bool
$c/= :: ImagePipeSurfaceCreateInfoFUCHSIA
-> ImagePipeSurfaceCreateInfoFUCHSIA -> Bool
== :: ImagePipeSurfaceCreateInfoFUCHSIA
-> ImagePipeSurfaceCreateInfoFUCHSIA -> Bool
$c== :: ImagePipeSurfaceCreateInfoFUCHSIA
-> ImagePipeSurfaceCreateInfoFUCHSIA -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (ImagePipeSurfaceCreateInfoFUCHSIA)
#endif
deriving instance Show ImagePipeSurfaceCreateInfoFUCHSIA

instance ToCStruct ImagePipeSurfaceCreateInfoFUCHSIA where
  withCStruct :: ImagePipeSurfaceCreateInfoFUCHSIA
-> (("pCreateInfo" ::: Ptr ImagePipeSurfaceCreateInfoFUCHSIA)
    -> IO b)
-> IO b
withCStruct x :: ImagePipeSurfaceCreateInfoFUCHSIA
x f :: ("pCreateInfo" ::: Ptr ImagePipeSurfaceCreateInfoFUCHSIA) -> IO b
f = Int
-> Int
-> (("pCreateInfo" ::: Ptr ImagePipeSurfaceCreateInfoFUCHSIA)
    -> IO b)
-> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 24 8 ((("pCreateInfo" ::: Ptr ImagePipeSurfaceCreateInfoFUCHSIA)
  -> IO b)
 -> IO b)
-> (("pCreateInfo" ::: Ptr ImagePipeSurfaceCreateInfoFUCHSIA)
    -> IO b)
-> IO b
forall a b. (a -> b) -> a -> b
$ \p :: "pCreateInfo" ::: Ptr ImagePipeSurfaceCreateInfoFUCHSIA
p -> ("pCreateInfo" ::: Ptr ImagePipeSurfaceCreateInfoFUCHSIA)
-> ImagePipeSurfaceCreateInfoFUCHSIA -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pCreateInfo" ::: Ptr ImagePipeSurfaceCreateInfoFUCHSIA
p ImagePipeSurfaceCreateInfoFUCHSIA
x (("pCreateInfo" ::: Ptr ImagePipeSurfaceCreateInfoFUCHSIA) -> IO b
f "pCreateInfo" ::: Ptr ImagePipeSurfaceCreateInfoFUCHSIA
p)
  pokeCStruct :: ("pCreateInfo" ::: Ptr ImagePipeSurfaceCreateInfoFUCHSIA)
-> ImagePipeSurfaceCreateInfoFUCHSIA -> IO b -> IO b
pokeCStruct p :: "pCreateInfo" ::: Ptr ImagePipeSurfaceCreateInfoFUCHSIA
p ImagePipeSurfaceCreateInfoFUCHSIA{..} f :: IO b
f = do
    Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCreateInfo" ::: Ptr ImagePipeSurfaceCreateInfoFUCHSIA
p ("pCreateInfo" ::: Ptr ImagePipeSurfaceCreateInfoFUCHSIA)
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_IMAGEPIPE_SURFACE_CREATE_INFO_FUCHSIA)
    Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCreateInfo" ::: Ptr ImagePipeSurfaceCreateInfoFUCHSIA
p ("pCreateInfo" ::: Ptr ImagePipeSurfaceCreateInfoFUCHSIA)
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
    Ptr ImagePipeSurfaceCreateFlagsFUCHSIA
-> ImagePipeSurfaceCreateFlagsFUCHSIA -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCreateInfo" ::: Ptr ImagePipeSurfaceCreateInfoFUCHSIA
p ("pCreateInfo" ::: Ptr ImagePipeSurfaceCreateInfoFUCHSIA)
-> Int -> Ptr ImagePipeSurfaceCreateFlagsFUCHSIA
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr ImagePipeSurfaceCreateFlagsFUCHSIA)) (ImagePipeSurfaceCreateFlagsFUCHSIA
flags)
    Ptr Zx_handle_t -> Zx_handle_t -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCreateInfo" ::: Ptr ImagePipeSurfaceCreateInfoFUCHSIA
p ("pCreateInfo" ::: Ptr ImagePipeSurfaceCreateInfoFUCHSIA)
-> Int -> Ptr Zx_handle_t
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 20 :: Ptr Zx_handle_t)) (Zx_handle_t
imagePipeHandle)
    IO b
f
  cStructSize :: Int
cStructSize = 24
  cStructAlignment :: Int
cStructAlignment = 8
  pokeZeroCStruct :: ("pCreateInfo" ::: Ptr ImagePipeSurfaceCreateInfoFUCHSIA)
-> IO b -> IO b
pokeZeroCStruct p :: "pCreateInfo" ::: Ptr ImagePipeSurfaceCreateInfoFUCHSIA
p f :: IO b
f = do
    Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCreateInfo" ::: Ptr ImagePipeSurfaceCreateInfoFUCHSIA
p ("pCreateInfo" ::: Ptr ImagePipeSurfaceCreateInfoFUCHSIA)
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_IMAGEPIPE_SURFACE_CREATE_INFO_FUCHSIA)
    Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCreateInfo" ::: Ptr ImagePipeSurfaceCreateInfoFUCHSIA
p ("pCreateInfo" ::: Ptr ImagePipeSurfaceCreateInfoFUCHSIA)
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
    Ptr Zx_handle_t -> Zx_handle_t -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCreateInfo" ::: Ptr ImagePipeSurfaceCreateInfoFUCHSIA
p ("pCreateInfo" ::: Ptr ImagePipeSurfaceCreateInfoFUCHSIA)
-> Int -> Ptr Zx_handle_t
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 20 :: Ptr Zx_handle_t)) (Zx_handle_t
forall a. Zero a => a
zero)
    IO b
f

instance FromCStruct ImagePipeSurfaceCreateInfoFUCHSIA where
  peekCStruct :: ("pCreateInfo" ::: Ptr ImagePipeSurfaceCreateInfoFUCHSIA)
-> IO ImagePipeSurfaceCreateInfoFUCHSIA
peekCStruct p :: "pCreateInfo" ::: Ptr ImagePipeSurfaceCreateInfoFUCHSIA
p = do
    ImagePipeSurfaceCreateFlagsFUCHSIA
flags <- Ptr ImagePipeSurfaceCreateFlagsFUCHSIA
-> IO ImagePipeSurfaceCreateFlagsFUCHSIA
forall a. Storable a => Ptr a -> IO a
peek @ImagePipeSurfaceCreateFlagsFUCHSIA (("pCreateInfo" ::: Ptr ImagePipeSurfaceCreateInfoFUCHSIA
p ("pCreateInfo" ::: Ptr ImagePipeSurfaceCreateInfoFUCHSIA)
-> Int -> Ptr ImagePipeSurfaceCreateFlagsFUCHSIA
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr ImagePipeSurfaceCreateFlagsFUCHSIA))
    Zx_handle_t
imagePipeHandle <- Ptr Zx_handle_t -> IO Zx_handle_t
forall a. Storable a => Ptr a -> IO a
peek @Zx_handle_t (("pCreateInfo" ::: Ptr ImagePipeSurfaceCreateInfoFUCHSIA
p ("pCreateInfo" ::: Ptr ImagePipeSurfaceCreateInfoFUCHSIA)
-> Int -> Ptr Zx_handle_t
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 20 :: Ptr Zx_handle_t))
    ImagePipeSurfaceCreateInfoFUCHSIA
-> IO ImagePipeSurfaceCreateInfoFUCHSIA
forall (f :: * -> *) a. Applicative f => a -> f a
pure (ImagePipeSurfaceCreateInfoFUCHSIA
 -> IO ImagePipeSurfaceCreateInfoFUCHSIA)
-> ImagePipeSurfaceCreateInfoFUCHSIA
-> IO ImagePipeSurfaceCreateInfoFUCHSIA
forall a b. (a -> b) -> a -> b
$ ImagePipeSurfaceCreateFlagsFUCHSIA
-> Zx_handle_t -> ImagePipeSurfaceCreateInfoFUCHSIA
ImagePipeSurfaceCreateInfoFUCHSIA
             ImagePipeSurfaceCreateFlagsFUCHSIA
flags Zx_handle_t
imagePipeHandle

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

instance Zero ImagePipeSurfaceCreateInfoFUCHSIA where
  zero :: ImagePipeSurfaceCreateInfoFUCHSIA
zero = ImagePipeSurfaceCreateFlagsFUCHSIA
-> Zx_handle_t -> ImagePipeSurfaceCreateInfoFUCHSIA
ImagePipeSurfaceCreateInfoFUCHSIA
           ImagePipeSurfaceCreateFlagsFUCHSIA
forall a. Zero a => a
zero
           Zx_handle_t
forall a. Zero a => a
zero


-- | VkImagePipeSurfaceCreateFlagsFUCHSIA - Reserved for future use
--
-- = Description
--
-- 'ImagePipeSurfaceCreateFlagsFUCHSIA' is a bitmask type for setting a
-- mask, but is currently reserved for future use.
--
-- = See Also
--
-- 'ImagePipeSurfaceCreateInfoFUCHSIA'
newtype ImagePipeSurfaceCreateFlagsFUCHSIA = ImagePipeSurfaceCreateFlagsFUCHSIA Flags
  deriving newtype (ImagePipeSurfaceCreateFlagsFUCHSIA
-> ImagePipeSurfaceCreateFlagsFUCHSIA -> Bool
(ImagePipeSurfaceCreateFlagsFUCHSIA
 -> ImagePipeSurfaceCreateFlagsFUCHSIA -> Bool)
-> (ImagePipeSurfaceCreateFlagsFUCHSIA
    -> ImagePipeSurfaceCreateFlagsFUCHSIA -> Bool)
-> Eq ImagePipeSurfaceCreateFlagsFUCHSIA
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ImagePipeSurfaceCreateFlagsFUCHSIA
-> ImagePipeSurfaceCreateFlagsFUCHSIA -> Bool
$c/= :: ImagePipeSurfaceCreateFlagsFUCHSIA
-> ImagePipeSurfaceCreateFlagsFUCHSIA -> Bool
== :: ImagePipeSurfaceCreateFlagsFUCHSIA
-> ImagePipeSurfaceCreateFlagsFUCHSIA -> Bool
$c== :: ImagePipeSurfaceCreateFlagsFUCHSIA
-> ImagePipeSurfaceCreateFlagsFUCHSIA -> Bool
Eq, Eq ImagePipeSurfaceCreateFlagsFUCHSIA
Eq ImagePipeSurfaceCreateFlagsFUCHSIA =>
(ImagePipeSurfaceCreateFlagsFUCHSIA
 -> ImagePipeSurfaceCreateFlagsFUCHSIA -> Ordering)
-> (ImagePipeSurfaceCreateFlagsFUCHSIA
    -> ImagePipeSurfaceCreateFlagsFUCHSIA -> Bool)
-> (ImagePipeSurfaceCreateFlagsFUCHSIA
    -> ImagePipeSurfaceCreateFlagsFUCHSIA -> Bool)
-> (ImagePipeSurfaceCreateFlagsFUCHSIA
    -> ImagePipeSurfaceCreateFlagsFUCHSIA -> Bool)
-> (ImagePipeSurfaceCreateFlagsFUCHSIA
    -> ImagePipeSurfaceCreateFlagsFUCHSIA -> Bool)
-> (ImagePipeSurfaceCreateFlagsFUCHSIA
    -> ImagePipeSurfaceCreateFlagsFUCHSIA
    -> ImagePipeSurfaceCreateFlagsFUCHSIA)
-> (ImagePipeSurfaceCreateFlagsFUCHSIA
    -> ImagePipeSurfaceCreateFlagsFUCHSIA
    -> ImagePipeSurfaceCreateFlagsFUCHSIA)
-> Ord ImagePipeSurfaceCreateFlagsFUCHSIA
ImagePipeSurfaceCreateFlagsFUCHSIA
-> ImagePipeSurfaceCreateFlagsFUCHSIA -> Bool
ImagePipeSurfaceCreateFlagsFUCHSIA
-> ImagePipeSurfaceCreateFlagsFUCHSIA -> Ordering
ImagePipeSurfaceCreateFlagsFUCHSIA
-> ImagePipeSurfaceCreateFlagsFUCHSIA
-> ImagePipeSurfaceCreateFlagsFUCHSIA
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 :: ImagePipeSurfaceCreateFlagsFUCHSIA
-> ImagePipeSurfaceCreateFlagsFUCHSIA
-> ImagePipeSurfaceCreateFlagsFUCHSIA
$cmin :: ImagePipeSurfaceCreateFlagsFUCHSIA
-> ImagePipeSurfaceCreateFlagsFUCHSIA
-> ImagePipeSurfaceCreateFlagsFUCHSIA
max :: ImagePipeSurfaceCreateFlagsFUCHSIA
-> ImagePipeSurfaceCreateFlagsFUCHSIA
-> ImagePipeSurfaceCreateFlagsFUCHSIA
$cmax :: ImagePipeSurfaceCreateFlagsFUCHSIA
-> ImagePipeSurfaceCreateFlagsFUCHSIA
-> ImagePipeSurfaceCreateFlagsFUCHSIA
>= :: ImagePipeSurfaceCreateFlagsFUCHSIA
-> ImagePipeSurfaceCreateFlagsFUCHSIA -> Bool
$c>= :: ImagePipeSurfaceCreateFlagsFUCHSIA
-> ImagePipeSurfaceCreateFlagsFUCHSIA -> Bool
> :: ImagePipeSurfaceCreateFlagsFUCHSIA
-> ImagePipeSurfaceCreateFlagsFUCHSIA -> Bool
$c> :: ImagePipeSurfaceCreateFlagsFUCHSIA
-> ImagePipeSurfaceCreateFlagsFUCHSIA -> Bool
<= :: ImagePipeSurfaceCreateFlagsFUCHSIA
-> ImagePipeSurfaceCreateFlagsFUCHSIA -> Bool
$c<= :: ImagePipeSurfaceCreateFlagsFUCHSIA
-> ImagePipeSurfaceCreateFlagsFUCHSIA -> Bool
< :: ImagePipeSurfaceCreateFlagsFUCHSIA
-> ImagePipeSurfaceCreateFlagsFUCHSIA -> Bool
$c< :: ImagePipeSurfaceCreateFlagsFUCHSIA
-> ImagePipeSurfaceCreateFlagsFUCHSIA -> Bool
compare :: ImagePipeSurfaceCreateFlagsFUCHSIA
-> ImagePipeSurfaceCreateFlagsFUCHSIA -> Ordering
$ccompare :: ImagePipeSurfaceCreateFlagsFUCHSIA
-> ImagePipeSurfaceCreateFlagsFUCHSIA -> Ordering
$cp1Ord :: Eq ImagePipeSurfaceCreateFlagsFUCHSIA
Ord, Ptr b -> Int -> IO ImagePipeSurfaceCreateFlagsFUCHSIA
Ptr b -> Int -> ImagePipeSurfaceCreateFlagsFUCHSIA -> IO ()
Ptr ImagePipeSurfaceCreateFlagsFUCHSIA
-> IO ImagePipeSurfaceCreateFlagsFUCHSIA
Ptr ImagePipeSurfaceCreateFlagsFUCHSIA
-> Int -> IO ImagePipeSurfaceCreateFlagsFUCHSIA
Ptr ImagePipeSurfaceCreateFlagsFUCHSIA
-> Int -> ImagePipeSurfaceCreateFlagsFUCHSIA -> IO ()
Ptr ImagePipeSurfaceCreateFlagsFUCHSIA
-> ImagePipeSurfaceCreateFlagsFUCHSIA -> IO ()
ImagePipeSurfaceCreateFlagsFUCHSIA -> Int
(ImagePipeSurfaceCreateFlagsFUCHSIA -> Int)
-> (ImagePipeSurfaceCreateFlagsFUCHSIA -> Int)
-> (Ptr ImagePipeSurfaceCreateFlagsFUCHSIA
    -> Int -> IO ImagePipeSurfaceCreateFlagsFUCHSIA)
-> (Ptr ImagePipeSurfaceCreateFlagsFUCHSIA
    -> Int -> ImagePipeSurfaceCreateFlagsFUCHSIA -> IO ())
-> (forall b.
    Ptr b -> Int -> IO ImagePipeSurfaceCreateFlagsFUCHSIA)
-> (forall b.
    Ptr b -> Int -> ImagePipeSurfaceCreateFlagsFUCHSIA -> IO ())
-> (Ptr ImagePipeSurfaceCreateFlagsFUCHSIA
    -> IO ImagePipeSurfaceCreateFlagsFUCHSIA)
-> (Ptr ImagePipeSurfaceCreateFlagsFUCHSIA
    -> ImagePipeSurfaceCreateFlagsFUCHSIA -> IO ())
-> Storable ImagePipeSurfaceCreateFlagsFUCHSIA
forall b. Ptr b -> Int -> IO ImagePipeSurfaceCreateFlagsFUCHSIA
forall b.
Ptr b -> Int -> ImagePipeSurfaceCreateFlagsFUCHSIA -> 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 ImagePipeSurfaceCreateFlagsFUCHSIA
-> ImagePipeSurfaceCreateFlagsFUCHSIA -> IO ()
$cpoke :: Ptr ImagePipeSurfaceCreateFlagsFUCHSIA
-> ImagePipeSurfaceCreateFlagsFUCHSIA -> IO ()
peek :: Ptr ImagePipeSurfaceCreateFlagsFUCHSIA
-> IO ImagePipeSurfaceCreateFlagsFUCHSIA
$cpeek :: Ptr ImagePipeSurfaceCreateFlagsFUCHSIA
-> IO ImagePipeSurfaceCreateFlagsFUCHSIA
pokeByteOff :: Ptr b -> Int -> ImagePipeSurfaceCreateFlagsFUCHSIA -> IO ()
$cpokeByteOff :: forall b.
Ptr b -> Int -> ImagePipeSurfaceCreateFlagsFUCHSIA -> IO ()
peekByteOff :: Ptr b -> Int -> IO ImagePipeSurfaceCreateFlagsFUCHSIA
$cpeekByteOff :: forall b. Ptr b -> Int -> IO ImagePipeSurfaceCreateFlagsFUCHSIA
pokeElemOff :: Ptr ImagePipeSurfaceCreateFlagsFUCHSIA
-> Int -> ImagePipeSurfaceCreateFlagsFUCHSIA -> IO ()
$cpokeElemOff :: Ptr ImagePipeSurfaceCreateFlagsFUCHSIA
-> Int -> ImagePipeSurfaceCreateFlagsFUCHSIA -> IO ()
peekElemOff :: Ptr ImagePipeSurfaceCreateFlagsFUCHSIA
-> Int -> IO ImagePipeSurfaceCreateFlagsFUCHSIA
$cpeekElemOff :: Ptr ImagePipeSurfaceCreateFlagsFUCHSIA
-> Int -> IO ImagePipeSurfaceCreateFlagsFUCHSIA
alignment :: ImagePipeSurfaceCreateFlagsFUCHSIA -> Int
$calignment :: ImagePipeSurfaceCreateFlagsFUCHSIA -> Int
sizeOf :: ImagePipeSurfaceCreateFlagsFUCHSIA -> Int
$csizeOf :: ImagePipeSurfaceCreateFlagsFUCHSIA -> Int
Storable, ImagePipeSurfaceCreateFlagsFUCHSIA
ImagePipeSurfaceCreateFlagsFUCHSIA
-> Zero ImagePipeSurfaceCreateFlagsFUCHSIA
forall a. a -> Zero a
zero :: ImagePipeSurfaceCreateFlagsFUCHSIA
$czero :: ImagePipeSurfaceCreateFlagsFUCHSIA
Zero, Eq ImagePipeSurfaceCreateFlagsFUCHSIA
ImagePipeSurfaceCreateFlagsFUCHSIA
Eq ImagePipeSurfaceCreateFlagsFUCHSIA =>
(ImagePipeSurfaceCreateFlagsFUCHSIA
 -> ImagePipeSurfaceCreateFlagsFUCHSIA
 -> ImagePipeSurfaceCreateFlagsFUCHSIA)
-> (ImagePipeSurfaceCreateFlagsFUCHSIA
    -> ImagePipeSurfaceCreateFlagsFUCHSIA
    -> ImagePipeSurfaceCreateFlagsFUCHSIA)
-> (ImagePipeSurfaceCreateFlagsFUCHSIA
    -> ImagePipeSurfaceCreateFlagsFUCHSIA
    -> ImagePipeSurfaceCreateFlagsFUCHSIA)
-> (ImagePipeSurfaceCreateFlagsFUCHSIA
    -> ImagePipeSurfaceCreateFlagsFUCHSIA)
-> (ImagePipeSurfaceCreateFlagsFUCHSIA
    -> Int -> ImagePipeSurfaceCreateFlagsFUCHSIA)
-> (ImagePipeSurfaceCreateFlagsFUCHSIA
    -> Int -> ImagePipeSurfaceCreateFlagsFUCHSIA)
-> ImagePipeSurfaceCreateFlagsFUCHSIA
-> (Int -> ImagePipeSurfaceCreateFlagsFUCHSIA)
-> (ImagePipeSurfaceCreateFlagsFUCHSIA
    -> Int -> ImagePipeSurfaceCreateFlagsFUCHSIA)
-> (ImagePipeSurfaceCreateFlagsFUCHSIA
    -> Int -> ImagePipeSurfaceCreateFlagsFUCHSIA)
-> (ImagePipeSurfaceCreateFlagsFUCHSIA
    -> Int -> ImagePipeSurfaceCreateFlagsFUCHSIA)
-> (ImagePipeSurfaceCreateFlagsFUCHSIA -> Int -> Bool)
-> (ImagePipeSurfaceCreateFlagsFUCHSIA -> Maybe Int)
-> (ImagePipeSurfaceCreateFlagsFUCHSIA -> Int)
-> (ImagePipeSurfaceCreateFlagsFUCHSIA -> Bool)
-> (ImagePipeSurfaceCreateFlagsFUCHSIA
    -> Int -> ImagePipeSurfaceCreateFlagsFUCHSIA)
-> (ImagePipeSurfaceCreateFlagsFUCHSIA
    -> Int -> ImagePipeSurfaceCreateFlagsFUCHSIA)
-> (ImagePipeSurfaceCreateFlagsFUCHSIA
    -> Int -> ImagePipeSurfaceCreateFlagsFUCHSIA)
-> (ImagePipeSurfaceCreateFlagsFUCHSIA
    -> Int -> ImagePipeSurfaceCreateFlagsFUCHSIA)
-> (ImagePipeSurfaceCreateFlagsFUCHSIA
    -> Int -> ImagePipeSurfaceCreateFlagsFUCHSIA)
-> (ImagePipeSurfaceCreateFlagsFUCHSIA
    -> Int -> ImagePipeSurfaceCreateFlagsFUCHSIA)
-> (ImagePipeSurfaceCreateFlagsFUCHSIA -> Int)
-> Bits ImagePipeSurfaceCreateFlagsFUCHSIA
Int -> ImagePipeSurfaceCreateFlagsFUCHSIA
ImagePipeSurfaceCreateFlagsFUCHSIA -> Bool
ImagePipeSurfaceCreateFlagsFUCHSIA -> Int
ImagePipeSurfaceCreateFlagsFUCHSIA -> Maybe Int
ImagePipeSurfaceCreateFlagsFUCHSIA
-> ImagePipeSurfaceCreateFlagsFUCHSIA
ImagePipeSurfaceCreateFlagsFUCHSIA -> Int -> Bool
ImagePipeSurfaceCreateFlagsFUCHSIA
-> Int -> ImagePipeSurfaceCreateFlagsFUCHSIA
ImagePipeSurfaceCreateFlagsFUCHSIA
-> ImagePipeSurfaceCreateFlagsFUCHSIA
-> ImagePipeSurfaceCreateFlagsFUCHSIA
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 :: ImagePipeSurfaceCreateFlagsFUCHSIA -> Int
$cpopCount :: ImagePipeSurfaceCreateFlagsFUCHSIA -> Int
rotateR :: ImagePipeSurfaceCreateFlagsFUCHSIA
-> Int -> ImagePipeSurfaceCreateFlagsFUCHSIA
$crotateR :: ImagePipeSurfaceCreateFlagsFUCHSIA
-> Int -> ImagePipeSurfaceCreateFlagsFUCHSIA
rotateL :: ImagePipeSurfaceCreateFlagsFUCHSIA
-> Int -> ImagePipeSurfaceCreateFlagsFUCHSIA
$crotateL :: ImagePipeSurfaceCreateFlagsFUCHSIA
-> Int -> ImagePipeSurfaceCreateFlagsFUCHSIA
unsafeShiftR :: ImagePipeSurfaceCreateFlagsFUCHSIA
-> Int -> ImagePipeSurfaceCreateFlagsFUCHSIA
$cunsafeShiftR :: ImagePipeSurfaceCreateFlagsFUCHSIA
-> Int -> ImagePipeSurfaceCreateFlagsFUCHSIA
shiftR :: ImagePipeSurfaceCreateFlagsFUCHSIA
-> Int -> ImagePipeSurfaceCreateFlagsFUCHSIA
$cshiftR :: ImagePipeSurfaceCreateFlagsFUCHSIA
-> Int -> ImagePipeSurfaceCreateFlagsFUCHSIA
unsafeShiftL :: ImagePipeSurfaceCreateFlagsFUCHSIA
-> Int -> ImagePipeSurfaceCreateFlagsFUCHSIA
$cunsafeShiftL :: ImagePipeSurfaceCreateFlagsFUCHSIA
-> Int -> ImagePipeSurfaceCreateFlagsFUCHSIA
shiftL :: ImagePipeSurfaceCreateFlagsFUCHSIA
-> Int -> ImagePipeSurfaceCreateFlagsFUCHSIA
$cshiftL :: ImagePipeSurfaceCreateFlagsFUCHSIA
-> Int -> ImagePipeSurfaceCreateFlagsFUCHSIA
isSigned :: ImagePipeSurfaceCreateFlagsFUCHSIA -> Bool
$cisSigned :: ImagePipeSurfaceCreateFlagsFUCHSIA -> Bool
bitSize :: ImagePipeSurfaceCreateFlagsFUCHSIA -> Int
$cbitSize :: ImagePipeSurfaceCreateFlagsFUCHSIA -> Int
bitSizeMaybe :: ImagePipeSurfaceCreateFlagsFUCHSIA -> Maybe Int
$cbitSizeMaybe :: ImagePipeSurfaceCreateFlagsFUCHSIA -> Maybe Int
testBit :: ImagePipeSurfaceCreateFlagsFUCHSIA -> Int -> Bool
$ctestBit :: ImagePipeSurfaceCreateFlagsFUCHSIA -> Int -> Bool
complementBit :: ImagePipeSurfaceCreateFlagsFUCHSIA
-> Int -> ImagePipeSurfaceCreateFlagsFUCHSIA
$ccomplementBit :: ImagePipeSurfaceCreateFlagsFUCHSIA
-> Int -> ImagePipeSurfaceCreateFlagsFUCHSIA
clearBit :: ImagePipeSurfaceCreateFlagsFUCHSIA
-> Int -> ImagePipeSurfaceCreateFlagsFUCHSIA
$cclearBit :: ImagePipeSurfaceCreateFlagsFUCHSIA
-> Int -> ImagePipeSurfaceCreateFlagsFUCHSIA
setBit :: ImagePipeSurfaceCreateFlagsFUCHSIA
-> Int -> ImagePipeSurfaceCreateFlagsFUCHSIA
$csetBit :: ImagePipeSurfaceCreateFlagsFUCHSIA
-> Int -> ImagePipeSurfaceCreateFlagsFUCHSIA
bit :: Int -> ImagePipeSurfaceCreateFlagsFUCHSIA
$cbit :: Int -> ImagePipeSurfaceCreateFlagsFUCHSIA
zeroBits :: ImagePipeSurfaceCreateFlagsFUCHSIA
$czeroBits :: ImagePipeSurfaceCreateFlagsFUCHSIA
rotate :: ImagePipeSurfaceCreateFlagsFUCHSIA
-> Int -> ImagePipeSurfaceCreateFlagsFUCHSIA
$crotate :: ImagePipeSurfaceCreateFlagsFUCHSIA
-> Int -> ImagePipeSurfaceCreateFlagsFUCHSIA
shift :: ImagePipeSurfaceCreateFlagsFUCHSIA
-> Int -> ImagePipeSurfaceCreateFlagsFUCHSIA
$cshift :: ImagePipeSurfaceCreateFlagsFUCHSIA
-> Int -> ImagePipeSurfaceCreateFlagsFUCHSIA
complement :: ImagePipeSurfaceCreateFlagsFUCHSIA
-> ImagePipeSurfaceCreateFlagsFUCHSIA
$ccomplement :: ImagePipeSurfaceCreateFlagsFUCHSIA
-> ImagePipeSurfaceCreateFlagsFUCHSIA
xor :: ImagePipeSurfaceCreateFlagsFUCHSIA
-> ImagePipeSurfaceCreateFlagsFUCHSIA
-> ImagePipeSurfaceCreateFlagsFUCHSIA
$cxor :: ImagePipeSurfaceCreateFlagsFUCHSIA
-> ImagePipeSurfaceCreateFlagsFUCHSIA
-> ImagePipeSurfaceCreateFlagsFUCHSIA
.|. :: ImagePipeSurfaceCreateFlagsFUCHSIA
-> ImagePipeSurfaceCreateFlagsFUCHSIA
-> ImagePipeSurfaceCreateFlagsFUCHSIA
$c.|. :: ImagePipeSurfaceCreateFlagsFUCHSIA
-> ImagePipeSurfaceCreateFlagsFUCHSIA
-> ImagePipeSurfaceCreateFlagsFUCHSIA
.&. :: ImagePipeSurfaceCreateFlagsFUCHSIA
-> ImagePipeSurfaceCreateFlagsFUCHSIA
-> ImagePipeSurfaceCreateFlagsFUCHSIA
$c.&. :: ImagePipeSurfaceCreateFlagsFUCHSIA
-> ImagePipeSurfaceCreateFlagsFUCHSIA
-> ImagePipeSurfaceCreateFlagsFUCHSIA
$cp1Bits :: Eq ImagePipeSurfaceCreateFlagsFUCHSIA
Bits)



instance Show ImagePipeSurfaceCreateFlagsFUCHSIA where
  showsPrec :: Int -> ImagePipeSurfaceCreateFlagsFUCHSIA -> ShowS
showsPrec p :: Int
p = \case
    ImagePipeSurfaceCreateFlagsFUCHSIA x :: Zx_handle_t
x -> Bool -> ShowS -> ShowS
showParen (Int
p Int -> Int -> Bool
forall a. Ord a => a -> a -> Bool
>= 11) (String -> ShowS
showString "ImagePipeSurfaceCreateFlagsFUCHSIA 0x" ShowS -> ShowS -> ShowS
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Zx_handle_t -> ShowS
forall a. (Integral a, Show a) => a -> ShowS
showHex Zx_handle_t
x)

instance Read ImagePipeSurfaceCreateFlagsFUCHSIA where
  readPrec :: ReadPrec ImagePipeSurfaceCreateFlagsFUCHSIA
readPrec = ReadPrec ImagePipeSurfaceCreateFlagsFUCHSIA
-> ReadPrec ImagePipeSurfaceCreateFlagsFUCHSIA
forall a. ReadPrec a -> ReadPrec a
parens ([(String, ReadPrec ImagePipeSurfaceCreateFlagsFUCHSIA)]
-> ReadPrec ImagePipeSurfaceCreateFlagsFUCHSIA
forall a. [(String, ReadPrec a)] -> ReadPrec a
choose []
                     ReadPrec ImagePipeSurfaceCreateFlagsFUCHSIA
-> ReadPrec ImagePipeSurfaceCreateFlagsFUCHSIA
-> ReadPrec ImagePipeSurfaceCreateFlagsFUCHSIA
forall a. ReadPrec a -> ReadPrec a -> ReadPrec a
+++
                     Int
-> ReadPrec ImagePipeSurfaceCreateFlagsFUCHSIA
-> ReadPrec ImagePipeSurfaceCreateFlagsFUCHSIA
forall a. Int -> ReadPrec a -> ReadPrec a
prec 10 (do
                       Lexeme -> ReadPrec ()
expectP (String -> Lexeme
Ident "ImagePipeSurfaceCreateFlagsFUCHSIA")
                       Zx_handle_t
v <- ReadPrec Zx_handle_t -> ReadPrec Zx_handle_t
forall a. ReadPrec a -> ReadPrec a
step ReadPrec Zx_handle_t
forall a. Read a => ReadPrec a
readPrec
                       ImagePipeSurfaceCreateFlagsFUCHSIA
-> ReadPrec ImagePipeSurfaceCreateFlagsFUCHSIA
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Zx_handle_t -> ImagePipeSurfaceCreateFlagsFUCHSIA
ImagePipeSurfaceCreateFlagsFUCHSIA Zx_handle_t
v)))


type FUCHSIA_IMAGEPIPE_SURFACE_SPEC_VERSION = 1

-- No documentation found for TopLevel "VK_FUCHSIA_IMAGEPIPE_SURFACE_SPEC_VERSION"
pattern FUCHSIA_IMAGEPIPE_SURFACE_SPEC_VERSION :: forall a . Integral a => a
pattern $bFUCHSIA_IMAGEPIPE_SURFACE_SPEC_VERSION :: a
$mFUCHSIA_IMAGEPIPE_SURFACE_SPEC_VERSION :: forall r a. Integral a => a -> (Void# -> r) -> (Void# -> r) -> r
FUCHSIA_IMAGEPIPE_SURFACE_SPEC_VERSION = 1


type FUCHSIA_IMAGEPIPE_SURFACE_EXTENSION_NAME = "VK_FUCHSIA_imagepipe_surface"

-- No documentation found for TopLevel "VK_FUCHSIA_IMAGEPIPE_SURFACE_EXTENSION_NAME"
pattern FUCHSIA_IMAGEPIPE_SURFACE_EXTENSION_NAME :: forall a . (Eq a, IsString a) => a
pattern $bFUCHSIA_IMAGEPIPE_SURFACE_EXTENSION_NAME :: a
$mFUCHSIA_IMAGEPIPE_SURFACE_EXTENSION_NAME :: forall r a.
(Eq a, IsString a) =>
a -> (Void# -> r) -> (Void# -> r) -> r
FUCHSIA_IMAGEPIPE_SURFACE_EXTENSION_NAME = "VK_FUCHSIA_imagepipe_surface"


type Zx_handle_t = Word32