{-# language CPP #-}
-- | = Name
--
-- XR_EXT_debug_utils - instance extension
--
-- = Specification
--
-- See
-- <https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XR_EXT_debug_utils  XR_EXT_debug_utils>
-- in the main specification for complete information.
--
-- = Registered Extension Number
--
-- 20
--
-- = Revision
--
-- 3
--
-- = Extension and Version Dependencies
--
-- -   Requires OpenXR 1.0
--
-- = See Also
--
-- 'PFN_xrDebugUtilsMessengerCallbackEXT', 'DebugUtilsLabelEXT',
-- 'DebugUtilsMessengerCallbackDataEXT',
-- 'DebugUtilsMessengerCreateInfoEXT', 'DebugUtilsObjectNameInfoEXT',
-- 'createDebugUtilsMessengerEXT', 'destroyDebugUtilsMessengerEXT',
-- 'sessionBeginDebugUtilsLabelRegionEXT',
-- 'sessionEndDebugUtilsLabelRegionEXT', 'sessionInsertDebugUtilsLabelEXT',
-- 'setDebugUtilsObjectNameEXT', 'submitDebugUtilsMessageEXT'
--
-- = Document Notes
--
-- For more information, see the
-- <https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XR_EXT_debug_utils OpenXR Specification>
--
-- This page is a generated document. Fixes and changes should be made to
-- the generator scripts, not directly.
module OpenXR.Extensions.XR_EXT_debug_utils  ( setDebugUtilsObjectNameEXT
                                             , createDebugUtilsMessengerEXT
                                             , withDebugUtilsMessengerEXT
                                             , destroyDebugUtilsMessengerEXT
                                             , submitDebugUtilsMessageEXT
                                             , sessionBeginDebugUtilsLabelRegionEXT
                                             , sessionEndDebugUtilsLabelRegionEXT
                                             , sessionInsertDebugUtilsLabelEXT
                                             , DebugUtilsObjectNameInfoEXT(..)
                                             , DebugUtilsLabelEXT(..)
                                             , DebugUtilsMessengerCallbackDataEXT(..)
                                             , DebugUtilsMessengerCreateInfoEXT(..)
                                             , DebugUtilsMessageSeverityFlagsEXT(..)
                                             , DebugUtilsMessageTypeFlagsEXT(..)
                                             , PFN_xrDebugUtilsMessengerCallbackEXT
                                             , FN_xrDebugUtilsMessengerCallbackEXT
                                             , EXT_debug_utils_SPEC_VERSION
                                             , pattern EXT_debug_utils_SPEC_VERSION
                                             , EXT_DEBUG_UTILS_EXTENSION_NAME
                                             , pattern EXT_DEBUG_UTILS_EXTENSION_NAME
                                             , DebugUtilsMessengerEXT(..)
                                             ) where

import OpenXR.Internal.Utils (enumReadPrec)
import OpenXR.Internal.Utils (enumShowsPrec)
import OpenXR.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 Foreign.Marshal.Utils (maybePeek)
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 Data.ByteString (packCString)
import Data.ByteString (useAsCString)
import Control.Monad.Trans.Class (lift)
import Control.Monad.Trans.Cont (evalContT)
import OpenXR.CStruct (FromCStruct)
import OpenXR.CStruct (FromCStruct(..))
import OpenXR.CStruct (ToCStruct)
import OpenXR.CStruct (ToCStruct(..))
import OpenXR.Zero (Zero)
import OpenXR.Zero (Zero(..))
import Control.Monad.IO.Class (MonadIO)
import Data.Bits (Bits)
import Data.Bits (FiniteBits)
import Data.String (IsString)
import Data.Typeable (Typeable)
import Foreign.C.Types (CChar)
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.Word (Word64)
import Data.ByteString (ByteString)
import Data.Kind (Type)
import Control.Monad.Trans.Cont (ContT(..))
import OpenXR.NamedType ((:::))
import OpenXR.Core10.FundamentalTypes (Bool32)
import OpenXR.Extensions.Handles (DebugUtilsMessengerEXT)
import OpenXR.Extensions.Handles (DebugUtilsMessengerEXT(..))
import OpenXR.Extensions.Handles (DebugUtilsMessengerEXT(DebugUtilsMessengerEXT))
import OpenXR.Extensions.Handles (DebugUtilsMessengerEXT_T)
import OpenXR.Core10.FundamentalTypes (Flags64)
import OpenXR.Core10.Handles (Instance)
import OpenXR.Core10.Handles (Instance(..))
import OpenXR.Dynamic (InstanceCmds(pXrCreateDebugUtilsMessengerEXT))
import OpenXR.Dynamic (InstanceCmds(pXrDestroyDebugUtilsMessengerEXT))
import OpenXR.Dynamic (InstanceCmds(pXrSessionBeginDebugUtilsLabelRegionEXT))
import OpenXR.Dynamic (InstanceCmds(pXrSessionEndDebugUtilsLabelRegionEXT))
import OpenXR.Dynamic (InstanceCmds(pXrSessionInsertDebugUtilsLabelEXT))
import OpenXR.Dynamic (InstanceCmds(pXrSetDebugUtilsObjectNameEXT))
import OpenXR.Dynamic (InstanceCmds(pXrSubmitDebugUtilsMessageEXT))
import OpenXR.Core10.Handles (Instance_T)
import OpenXR.Core10.Enums.ObjectType (ObjectType)
import OpenXR.Exception (OpenXrException(..))
import OpenXR.Core10.Enums.Result (Result)
import OpenXR.Core10.Enums.Result (Result(..))
import OpenXR.Core10.Handles (Session)
import OpenXR.Core10.Handles (Session(..))
import OpenXR.Core10.Handles (Session_T)
import OpenXR.Core10.Enums.StructureType (StructureType)
import OpenXR.Core10.Enums.Result (Result(SUCCESS))
import OpenXR.Core10.Enums.StructureType (StructureType(TYPE_DEBUG_UTILS_LABEL_EXT))
import OpenXR.Core10.Enums.StructureType (StructureType(TYPE_DEBUG_UTILS_MESSENGER_CALLBACK_DATA_EXT))
import OpenXR.Core10.Enums.StructureType (StructureType(TYPE_DEBUG_UTILS_MESSENGER_CREATE_INFO_EXT))
import OpenXR.Core10.Enums.StructureType (StructureType(TYPE_DEBUG_UTILS_OBJECT_NAME_INFO_EXT))
import OpenXR.Extensions.Handles (DebugUtilsMessengerEXT(..))
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
  unsafe
#endif
  "dynamic" mkXrSetDebugUtilsObjectNameEXT
  :: FunPtr (Ptr Instance_T -> Ptr DebugUtilsObjectNameInfoEXT -> IO Result) -> Ptr Instance_T -> Ptr DebugUtilsObjectNameInfoEXT -> IO Result

-- | xrSetDebugUtilsObjectNameEXT - Sets debug utils object name
--
-- == Valid Usage
--
-- -   In the structure pointed to by @nameInfo@,
--     'DebugUtilsObjectNameInfoEXT'::@objectType@ /must/ not be
--     'OpenXR.Core10.Enums.ObjectType.OBJECT_TYPE_UNKNOWN'
--
-- -   In the structure pointed to by @nameInfo@,
--     'DebugUtilsObjectNameInfoEXT'::@objectHandle@ /must/ not be
--     <https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XR_NULL_HANDLE XR_NULL_HANDLE>
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-xrSetDebugUtilsObjectNameEXT-extension-notenabled# The @@
--     extension /must/ be enabled prior to calling
--     'setDebugUtilsObjectNameEXT'
--
-- -   #VUID-xrSetDebugUtilsObjectNameEXT-instance-parameter# @instance@
--     /must/ be a valid 'OpenXR.Core10.Handles.Instance' handle
--
-- -   #VUID-xrSetDebugUtilsObjectNameEXT-nameInfo-parameter# @nameInfo@
--     /must/ be a pointer to a valid 'DebugUtilsObjectNameInfoEXT'
--     structure
--
-- == Thread Safety
--
-- -   Access to the @objectHandle@ member of the @nameInfo@ parameter
--     /must/ be externally synchronized
--
-- == Return Codes
--
-- [<https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#fundamentals-successcodes Success>]
--
--     -   'OpenXR.Core10.Enums.Result.SUCCESS'
--
-- [<https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#fundamentals-errorcodes Failure>]
--
--     -   'OpenXR.Core10.Enums.Result.ERROR_OUT_OF_MEMORY'
--
--     -   'OpenXR.Core10.Enums.Result.ERROR_VALIDATION_FAILURE'
--
--     -   'OpenXR.Core10.Enums.Result.ERROR_RUNTIME_FAILURE'
--
--     -   'OpenXR.Core10.Enums.Result.ERROR_HANDLE_INVALID'
--
--     -   'OpenXR.Core10.Enums.Result.ERROR_INSTANCE_LOST'
--
--     -   'OpenXR.Core10.Enums.Result.ERROR_FUNCTION_UNSUPPORTED'
--
-- Applications /may/ change the name associated with an object simply by
-- calling 'setDebugUtilsObjectNameEXT' again with a new string. If
-- 'DebugUtilsObjectNameInfoEXT'::@objectName@ is an empty string, then any
-- previously set name is removed.
--
-- = See Also
--
-- 'DebugUtilsObjectNameInfoEXT', 'OpenXR.Core10.Handles.Instance'
setDebugUtilsObjectNameEXT :: forall io
                            . (MonadIO io)
                           => -- | @instance@ is the 'OpenXR.Core10.Handles.Instance' that the object was
                              -- created under.
                              Instance
                           -> -- | @nameInfo@ is a pointer to an instance of the
                              -- 'DebugUtilsObjectNameInfoEXT' structure specifying the parameters of the
                              -- name to set on the object.
                              DebugUtilsObjectNameInfoEXT
                           -> io ()
setDebugUtilsObjectNameEXT :: Instance -> DebugUtilsObjectNameInfoEXT -> io ()
setDebugUtilsObjectNameEXT instance' :: Instance
instance' nameInfo :: DebugUtilsObjectNameInfoEXT
nameInfo = IO () -> io ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> io ())
-> (ContT () IO () -> IO ()) -> ContT () IO () -> io ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT () IO () -> IO ()
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT () IO () -> io ()) -> ContT () IO () -> io ()
forall a b. (a -> b) -> a -> b
$ do
  let xrSetDebugUtilsObjectNameEXTPtr :: FunPtr
  (Ptr Instance_T -> Ptr DebugUtilsObjectNameInfoEXT -> IO Result)
xrSetDebugUtilsObjectNameEXTPtr = InstanceCmds
-> FunPtr
     (Ptr Instance_T -> Ptr DebugUtilsObjectNameInfoEXT -> IO Result)
pXrSetDebugUtilsObjectNameEXT (Instance -> InstanceCmds
instanceCmds (Instance
instance' :: Instance))
  IO () -> ContT () IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT () IO ()) -> IO () -> ContT () IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
  (Ptr Instance_T -> Ptr DebugUtilsObjectNameInfoEXT -> IO Result)
xrSetDebugUtilsObjectNameEXTPtr FunPtr
  (Ptr Instance_T -> Ptr DebugUtilsObjectNameInfoEXT -> IO Result)
-> FunPtr
     (Ptr Instance_T -> Ptr DebugUtilsObjectNameInfoEXT -> IO Result)
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
  (Ptr Instance_T -> Ptr DebugUtilsObjectNameInfoEXT -> 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 xrSetDebugUtilsObjectNameEXT is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
  let xrSetDebugUtilsObjectNameEXT' :: Ptr Instance_T -> Ptr DebugUtilsObjectNameInfoEXT -> IO Result
xrSetDebugUtilsObjectNameEXT' = FunPtr
  (Ptr Instance_T -> Ptr DebugUtilsObjectNameInfoEXT -> IO Result)
-> Ptr Instance_T -> Ptr DebugUtilsObjectNameInfoEXT -> IO Result
mkXrSetDebugUtilsObjectNameEXT FunPtr
  (Ptr Instance_T -> Ptr DebugUtilsObjectNameInfoEXT -> IO Result)
xrSetDebugUtilsObjectNameEXTPtr
  Ptr DebugUtilsObjectNameInfoEXT
nameInfo' <- ((Ptr DebugUtilsObjectNameInfoEXT -> IO ()) -> IO ())
-> ContT () IO (Ptr DebugUtilsObjectNameInfoEXT)
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr DebugUtilsObjectNameInfoEXT -> IO ()) -> IO ())
 -> ContT () IO (Ptr DebugUtilsObjectNameInfoEXT))
-> ((Ptr DebugUtilsObjectNameInfoEXT -> IO ()) -> IO ())
-> ContT () IO (Ptr DebugUtilsObjectNameInfoEXT)
forall a b. (a -> b) -> a -> b
$ DebugUtilsObjectNameInfoEXT
-> (Ptr DebugUtilsObjectNameInfoEXT -> IO ()) -> IO ()
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (DebugUtilsObjectNameInfoEXT
nameInfo)
  Result
r <- IO Result -> ContT () IO Result
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO Result -> ContT () IO Result)
-> IO Result -> ContT () IO Result
forall a b. (a -> b) -> a -> b
$ String -> IO Result -> IO Result
forall a. String -> IO a -> IO a
traceAroundEvent "xrSetDebugUtilsObjectNameEXT" (Ptr Instance_T -> Ptr DebugUtilsObjectNameInfoEXT -> IO Result
xrSetDebugUtilsObjectNameEXT' (Instance -> Ptr Instance_T
instanceHandle (Instance
instance')) Ptr DebugUtilsObjectNameInfoEXT
nameInfo')
  IO () -> ContT () IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT () IO ()) -> IO () -> ContT () 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) (OpenXrException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (Result -> OpenXrException
OpenXrException Result
r))


foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
  unsafe
#endif
  "dynamic" mkXrCreateDebugUtilsMessengerEXT
  :: FunPtr (Ptr Instance_T -> Ptr DebugUtilsMessengerCreateInfoEXT -> Ptr (Ptr DebugUtilsMessengerEXT_T) -> IO Result) -> Ptr Instance_T -> Ptr DebugUtilsMessengerCreateInfoEXT -> Ptr (Ptr DebugUtilsMessengerEXT_T) -> IO Result

-- | xrCreateDebugUtilsMessengerEXT - Creates a debug messenger
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-xrCreateDebugUtilsMessengerEXT-extension-notenabled# The @@
--     extension /must/ be enabled prior to calling
--     'createDebugUtilsMessengerEXT'
--
-- -   #VUID-xrCreateDebugUtilsMessengerEXT-instance-parameter# @instance@
--     /must/ be a valid 'OpenXR.Core10.Handles.Instance' handle
--
-- -   #VUID-xrCreateDebugUtilsMessengerEXT-createInfo-parameter#
--     @createInfo@ /must/ be a pointer to a valid
--     'DebugUtilsMessengerCreateInfoEXT' structure
--
-- -   #VUID-xrCreateDebugUtilsMessengerEXT-messenger-parameter#
--     @messenger@ /must/ be a pointer to an
--     'OpenXR.Extensions.Handles.DebugUtilsMessengerEXT' handle
--
-- == Thread Safety
--
-- -   Access to @instance@, and any child handles, /must/ be externally
--     synchronized
--
-- == Return Codes
--
-- [<https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#fundamentals-successcodes Success>]
--
--     -   'OpenXR.Core10.Enums.Result.SUCCESS'
--
-- [<https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#fundamentals-errorcodes Failure>]
--
--     -   'OpenXR.Core10.Enums.Result.ERROR_OUT_OF_MEMORY'
--
--     -   'OpenXR.Core10.Enums.Result.ERROR_VALIDATION_FAILURE'
--
--     -   'OpenXR.Core10.Enums.Result.ERROR_RUNTIME_FAILURE'
--
--     -   'OpenXR.Core10.Enums.Result.ERROR_LIMIT_REACHED'
--
--     -   'OpenXR.Core10.Enums.Result.ERROR_HANDLE_INVALID'
--
--     -   'OpenXR.Core10.Enums.Result.ERROR_INSTANCE_LOST'
--
--     -   'OpenXR.Core10.Enums.Result.ERROR_FUNCTION_UNSUPPORTED'
--
-- The application /must/ ensure that 'createDebugUtilsMessengerEXT' is not
-- executed in parallel with any OpenXR function that is also called with
-- @instance@ or child of @instance@.
--
-- When an event of interest occurs a debug messenger calls its
-- @createInfo@->@userCallback@ with a debug message from the producer of
-- the event. Additionally, the debug messenger /must/ filter out any debug
-- messages that the application’s callback is not interested in based on
-- 'DebugUtilsMessengerCreateInfoEXT' flags, as described below.
--
-- = See Also
--
-- 'DebugUtilsMessengerCreateInfoEXT',
-- 'OpenXR.Extensions.Handles.DebugUtilsMessengerEXT',
-- 'OpenXR.Core10.Handles.Instance', 'destroyDebugUtilsMessengerEXT'
createDebugUtilsMessengerEXT :: forall io
                              . (MonadIO io)
                             => -- | @instance@ is the instance the messenger will be used with.
                                Instance
                             -> -- | @createInfo@ points to an 'DebugUtilsMessengerCreateInfoEXT' structure,
                                -- which contains the callback pointer as well as defines the conditions
                                -- under which this messenger will trigger the callback.
                                DebugUtilsMessengerCreateInfoEXT
                             -> io (DebugUtilsMessengerEXT)
createDebugUtilsMessengerEXT :: Instance
-> DebugUtilsMessengerCreateInfoEXT -> io DebugUtilsMessengerEXT
createDebugUtilsMessengerEXT instance' :: Instance
instance' createInfo :: DebugUtilsMessengerCreateInfoEXT
createInfo = IO DebugUtilsMessengerEXT -> io DebugUtilsMessengerEXT
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO DebugUtilsMessengerEXT -> io DebugUtilsMessengerEXT)
-> (ContT DebugUtilsMessengerEXT IO DebugUtilsMessengerEXT
    -> IO DebugUtilsMessengerEXT)
-> ContT DebugUtilsMessengerEXT IO DebugUtilsMessengerEXT
-> io DebugUtilsMessengerEXT
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT DebugUtilsMessengerEXT IO DebugUtilsMessengerEXT
-> IO DebugUtilsMessengerEXT
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT DebugUtilsMessengerEXT IO DebugUtilsMessengerEXT
 -> io DebugUtilsMessengerEXT)
-> ContT DebugUtilsMessengerEXT IO DebugUtilsMessengerEXT
-> io DebugUtilsMessengerEXT
forall a b. (a -> b) -> a -> b
$ do
  let cmds :: InstanceCmds
cmds = Instance -> InstanceCmds
instanceCmds (Instance
instance' :: Instance)
  let xrCreateDebugUtilsMessengerEXTPtr :: FunPtr
  (Ptr Instance_T
   -> Ptr DebugUtilsMessengerCreateInfoEXT
   -> ("messenger" ::: Ptr (Ptr DebugUtilsMessengerEXT_T))
   -> IO Result)
xrCreateDebugUtilsMessengerEXTPtr = InstanceCmds
-> FunPtr
     (Ptr Instance_T
      -> Ptr DebugUtilsMessengerCreateInfoEXT
      -> ("messenger" ::: Ptr (Ptr DebugUtilsMessengerEXT_T))
      -> IO Result)
pXrCreateDebugUtilsMessengerEXT InstanceCmds
cmds
  IO () -> ContT DebugUtilsMessengerEXT IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT DebugUtilsMessengerEXT IO ())
-> IO () -> ContT DebugUtilsMessengerEXT IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
  (Ptr Instance_T
   -> Ptr DebugUtilsMessengerCreateInfoEXT
   -> ("messenger" ::: Ptr (Ptr DebugUtilsMessengerEXT_T))
   -> IO Result)
xrCreateDebugUtilsMessengerEXTPtr FunPtr
  (Ptr Instance_T
   -> Ptr DebugUtilsMessengerCreateInfoEXT
   -> ("messenger" ::: Ptr (Ptr DebugUtilsMessengerEXT_T))
   -> IO Result)
-> FunPtr
     (Ptr Instance_T
      -> Ptr DebugUtilsMessengerCreateInfoEXT
      -> ("messenger" ::: Ptr (Ptr DebugUtilsMessengerEXT_T))
      -> IO Result)
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
  (Ptr Instance_T
   -> Ptr DebugUtilsMessengerCreateInfoEXT
   -> ("messenger" ::: Ptr (Ptr DebugUtilsMessengerEXT_T))
   -> 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 xrCreateDebugUtilsMessengerEXT is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
  let xrCreateDebugUtilsMessengerEXT' :: Ptr Instance_T
-> Ptr DebugUtilsMessengerCreateInfoEXT
-> ("messenger" ::: Ptr (Ptr DebugUtilsMessengerEXT_T))
-> IO Result
xrCreateDebugUtilsMessengerEXT' = FunPtr
  (Ptr Instance_T
   -> Ptr DebugUtilsMessengerCreateInfoEXT
   -> ("messenger" ::: Ptr (Ptr DebugUtilsMessengerEXT_T))
   -> IO Result)
-> Ptr Instance_T
-> Ptr DebugUtilsMessengerCreateInfoEXT
-> ("messenger" ::: Ptr (Ptr DebugUtilsMessengerEXT_T))
-> IO Result
mkXrCreateDebugUtilsMessengerEXT FunPtr
  (Ptr Instance_T
   -> Ptr DebugUtilsMessengerCreateInfoEXT
   -> ("messenger" ::: Ptr (Ptr DebugUtilsMessengerEXT_T))
   -> IO Result)
xrCreateDebugUtilsMessengerEXTPtr
  Ptr DebugUtilsMessengerCreateInfoEXT
createInfo' <- ((Ptr DebugUtilsMessengerCreateInfoEXT
  -> IO DebugUtilsMessengerEXT)
 -> IO DebugUtilsMessengerEXT)
-> ContT
     DebugUtilsMessengerEXT IO (Ptr DebugUtilsMessengerCreateInfoEXT)
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr DebugUtilsMessengerCreateInfoEXT
   -> IO DebugUtilsMessengerEXT)
  -> IO DebugUtilsMessengerEXT)
 -> ContT
      DebugUtilsMessengerEXT IO (Ptr DebugUtilsMessengerCreateInfoEXT))
-> ((Ptr DebugUtilsMessengerCreateInfoEXT
     -> IO DebugUtilsMessengerEXT)
    -> IO DebugUtilsMessengerEXT)
-> ContT
     DebugUtilsMessengerEXT IO (Ptr DebugUtilsMessengerCreateInfoEXT)
forall a b. (a -> b) -> a -> b
$ DebugUtilsMessengerCreateInfoEXT
-> (Ptr DebugUtilsMessengerCreateInfoEXT
    -> IO DebugUtilsMessengerEXT)
-> IO DebugUtilsMessengerEXT
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (DebugUtilsMessengerCreateInfoEXT
createInfo)
  "messenger" ::: Ptr (Ptr DebugUtilsMessengerEXT_T)
pMessenger <- ((("messenger" ::: Ptr (Ptr DebugUtilsMessengerEXT_T))
  -> IO DebugUtilsMessengerEXT)
 -> IO DebugUtilsMessengerEXT)
-> ContT
     DebugUtilsMessengerEXT
     IO
     ("messenger" ::: Ptr (Ptr DebugUtilsMessengerEXT_T))
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("messenger" ::: Ptr (Ptr DebugUtilsMessengerEXT_T))
   -> IO DebugUtilsMessengerEXT)
  -> IO DebugUtilsMessengerEXT)
 -> ContT
      DebugUtilsMessengerEXT
      IO
      ("messenger" ::: Ptr (Ptr DebugUtilsMessengerEXT_T)))
-> ((("messenger" ::: Ptr (Ptr DebugUtilsMessengerEXT_T))
     -> IO DebugUtilsMessengerEXT)
    -> IO DebugUtilsMessengerEXT)
-> ContT
     DebugUtilsMessengerEXT
     IO
     ("messenger" ::: Ptr (Ptr DebugUtilsMessengerEXT_T))
forall a b. (a -> b) -> a -> b
$ IO ("messenger" ::: Ptr (Ptr DebugUtilsMessengerEXT_T))
-> (("messenger" ::: Ptr (Ptr DebugUtilsMessengerEXT_T)) -> IO ())
-> (("messenger" ::: Ptr (Ptr DebugUtilsMessengerEXT_T))
    -> IO DebugUtilsMessengerEXT)
-> IO DebugUtilsMessengerEXT
forall a b c. IO a -> (a -> IO b) -> (a -> IO c) -> IO c
bracket (Int -> IO ("messenger" ::: Ptr (Ptr DebugUtilsMessengerEXT_T))
forall a. Int -> IO (Ptr a)
callocBytes @(Ptr DebugUtilsMessengerEXT_T) 8) ("messenger" ::: Ptr (Ptr DebugUtilsMessengerEXT_T)) -> IO ()
forall a. Ptr a -> IO ()
free
  Result
r <- IO Result -> ContT DebugUtilsMessengerEXT IO Result
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO Result -> ContT DebugUtilsMessengerEXT IO Result)
-> IO Result -> ContT DebugUtilsMessengerEXT IO Result
forall a b. (a -> b) -> a -> b
$ String -> IO Result -> IO Result
forall a. String -> IO a -> IO a
traceAroundEvent "xrCreateDebugUtilsMessengerEXT" (Ptr Instance_T
-> Ptr DebugUtilsMessengerCreateInfoEXT
-> ("messenger" ::: Ptr (Ptr DebugUtilsMessengerEXT_T))
-> IO Result
xrCreateDebugUtilsMessengerEXT' (Instance -> Ptr Instance_T
instanceHandle (Instance
instance')) Ptr DebugUtilsMessengerCreateInfoEXT
createInfo' ("messenger" ::: Ptr (Ptr DebugUtilsMessengerEXT_T)
pMessenger))
  IO () -> ContT DebugUtilsMessengerEXT IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT DebugUtilsMessengerEXT IO ())
-> IO () -> ContT DebugUtilsMessengerEXT 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) (OpenXrException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (Result -> OpenXrException
OpenXrException Result
r))
  Ptr DebugUtilsMessengerEXT_T
messenger <- IO (Ptr DebugUtilsMessengerEXT_T)
-> ContT DebugUtilsMessengerEXT IO (Ptr DebugUtilsMessengerEXT_T)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO (Ptr DebugUtilsMessengerEXT_T)
 -> ContT DebugUtilsMessengerEXT IO (Ptr DebugUtilsMessengerEXT_T))
-> IO (Ptr DebugUtilsMessengerEXT_T)
-> ContT DebugUtilsMessengerEXT IO (Ptr DebugUtilsMessengerEXT_T)
forall a b. (a -> b) -> a -> b
$ ("messenger" ::: Ptr (Ptr DebugUtilsMessengerEXT_T))
-> IO (Ptr DebugUtilsMessengerEXT_T)
forall a. Storable a => Ptr a -> IO a
peek @(Ptr DebugUtilsMessengerEXT_T) "messenger" ::: Ptr (Ptr DebugUtilsMessengerEXT_T)
pMessenger
  DebugUtilsMessengerEXT
-> ContT DebugUtilsMessengerEXT IO DebugUtilsMessengerEXT
forall (f :: * -> *) a. Applicative f => a -> f a
pure (DebugUtilsMessengerEXT
 -> ContT DebugUtilsMessengerEXT IO DebugUtilsMessengerEXT)
-> DebugUtilsMessengerEXT
-> ContT DebugUtilsMessengerEXT IO DebugUtilsMessengerEXT
forall a b. (a -> b) -> a -> b
$ (((\h :: Ptr DebugUtilsMessengerEXT_T
h -> Ptr DebugUtilsMessengerEXT_T
-> InstanceCmds -> DebugUtilsMessengerEXT
DebugUtilsMessengerEXT Ptr DebugUtilsMessengerEXT_T
h InstanceCmds
cmds ) Ptr DebugUtilsMessengerEXT_T
messenger))

-- | A convenience wrapper to make a compatible pair of calls to
-- 'createDebugUtilsMessengerEXT' and 'destroyDebugUtilsMessengerEXT'
--
-- To ensure that 'destroyDebugUtilsMessengerEXT' is always called: pass
-- 'Control.Exception.bracket' (or the allocate function from your
-- favourite resource management library) as the last argument.
-- To just extract the pair pass '(,)' as the last argument.
--
withDebugUtilsMessengerEXT :: forall io r . MonadIO io => Instance -> DebugUtilsMessengerCreateInfoEXT -> (io DebugUtilsMessengerEXT -> (DebugUtilsMessengerEXT -> io ()) -> r) -> r
withDebugUtilsMessengerEXT :: Instance
-> DebugUtilsMessengerCreateInfoEXT
-> (io DebugUtilsMessengerEXT
    -> (DebugUtilsMessengerEXT -> io ()) -> r)
-> r
withDebugUtilsMessengerEXT instance' :: Instance
instance' createInfo :: DebugUtilsMessengerCreateInfoEXT
createInfo b :: io DebugUtilsMessengerEXT -> (DebugUtilsMessengerEXT -> io ()) -> r
b =
  io DebugUtilsMessengerEXT -> (DebugUtilsMessengerEXT -> io ()) -> r
b (Instance
-> DebugUtilsMessengerCreateInfoEXT -> io DebugUtilsMessengerEXT
forall (io :: * -> *).
MonadIO io =>
Instance
-> DebugUtilsMessengerCreateInfoEXT -> io DebugUtilsMessengerEXT
createDebugUtilsMessengerEXT Instance
instance' DebugUtilsMessengerCreateInfoEXT
createInfo)
    (\(DebugUtilsMessengerEXT
o0) -> DebugUtilsMessengerEXT -> io ()
forall (io :: * -> *).
MonadIO io =>
DebugUtilsMessengerEXT -> io ()
destroyDebugUtilsMessengerEXT DebugUtilsMessengerEXT
o0)


foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
  unsafe
#endif
  "dynamic" mkXrDestroyDebugUtilsMessengerEXT
  :: FunPtr (Ptr DebugUtilsMessengerEXT_T -> IO Result) -> Ptr DebugUtilsMessengerEXT_T -> IO Result

-- | xrDestroyDebugUtilsMessengerEXT - Destroys a debug messenger
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-xrDestroyDebugUtilsMessengerEXT-extension-notenabled# The @@
--     extension /must/ be enabled prior to calling
--     'destroyDebugUtilsMessengerEXT'
--
-- -   #VUID-xrDestroyDebugUtilsMessengerEXT-messenger-parameter#
--     @messenger@ /must/ be a valid
--     'OpenXR.Extensions.Handles.DebugUtilsMessengerEXT' handle
--
-- == Thread Safety
--
-- -   Access to @messenger@ /must/ be externally synchronized
--
-- -   Access to the 'OpenXR.Core10.Handles.Instance' used to create
--     @messenger@, and all of its child handles /must/ be externally
--     synchronized
--
-- == Return Codes
--
-- [<https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#fundamentals-successcodes Success>]
--
--     -   'OpenXR.Core10.Enums.Result.SUCCESS'
--
-- [<https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#fundamentals-errorcodes Failure>]
--
--     -   'OpenXR.Core10.Enums.Result.ERROR_HANDLE_INVALID'
--
--     -   'OpenXR.Core10.Enums.Result.ERROR_FUNCTION_UNSUPPORTED'
--
-- The application /must/ ensure that 'destroyDebugUtilsMessengerEXT' is
-- not executed in parallel with any OpenXR function that is also called
-- with the @instance@ or child of @instance@ that it was created with.
--
-- = See Also
--
-- 'OpenXR.Extensions.Handles.DebugUtilsMessengerEXT',
-- 'createDebugUtilsMessengerEXT'
destroyDebugUtilsMessengerEXT :: forall io
                               . (MonadIO io)
                              => -- | @messenger@ the 'OpenXR.Extensions.Handles.DebugUtilsMessengerEXT'
                                 -- object to destroy. @messenger@ is an externally synchronized object and
                                 -- /must/ not be used on more than one thread at a time. This means that
                                 -- 'destroyDebugUtilsMessengerEXT' /must/ not be called when a callback is
                                 -- active.
                                 DebugUtilsMessengerEXT
                              -> io ()
destroyDebugUtilsMessengerEXT :: DebugUtilsMessengerEXT -> io ()
destroyDebugUtilsMessengerEXT messenger :: DebugUtilsMessengerEXT
messenger = IO () -> io ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> io ()) -> IO () -> io ()
forall a b. (a -> b) -> a -> b
$ do
  let xrDestroyDebugUtilsMessengerEXTPtr :: FunPtr (Ptr DebugUtilsMessengerEXT_T -> IO Result)
xrDestroyDebugUtilsMessengerEXTPtr = InstanceCmds -> FunPtr (Ptr DebugUtilsMessengerEXT_T -> IO Result)
pXrDestroyDebugUtilsMessengerEXT (DebugUtilsMessengerEXT -> InstanceCmds
instanceCmds (DebugUtilsMessengerEXT
messenger :: DebugUtilsMessengerEXT))
  Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr (Ptr DebugUtilsMessengerEXT_T -> IO Result)
xrDestroyDebugUtilsMessengerEXTPtr FunPtr (Ptr DebugUtilsMessengerEXT_T -> IO Result)
-> FunPtr (Ptr DebugUtilsMessengerEXT_T -> IO Result) -> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr (Ptr DebugUtilsMessengerEXT_T -> 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 xrDestroyDebugUtilsMessengerEXT is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
  let xrDestroyDebugUtilsMessengerEXT' :: Ptr DebugUtilsMessengerEXT_T -> IO Result
xrDestroyDebugUtilsMessengerEXT' = FunPtr (Ptr DebugUtilsMessengerEXT_T -> IO Result)
-> Ptr DebugUtilsMessengerEXT_T -> IO Result
mkXrDestroyDebugUtilsMessengerEXT FunPtr (Ptr DebugUtilsMessengerEXT_T -> IO Result)
xrDestroyDebugUtilsMessengerEXTPtr
  Result
r <- String -> IO Result -> IO Result
forall a. String -> IO a -> IO a
traceAroundEvent "xrDestroyDebugUtilsMessengerEXT" (Ptr DebugUtilsMessengerEXT_T -> IO Result
xrDestroyDebugUtilsMessengerEXT' (DebugUtilsMessengerEXT -> Ptr DebugUtilsMessengerEXT_T
debugUtilsMessengerEXTHandle (DebugUtilsMessengerEXT
messenger)))
  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) (OpenXrException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (Result -> OpenXrException
OpenXrException Result
r))


foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
  unsafe
#endif
  "dynamic" mkXrSubmitDebugUtilsMessageEXT
  :: FunPtr (Ptr Instance_T -> DebugUtilsMessageSeverityFlagsEXT -> DebugUtilsMessageTypeFlagsEXT -> Ptr DebugUtilsMessengerCallbackDataEXT -> IO Result) -> Ptr Instance_T -> DebugUtilsMessageSeverityFlagsEXT -> DebugUtilsMessageTypeFlagsEXT -> Ptr DebugUtilsMessengerCallbackDataEXT -> IO Result

-- | xrSubmitDebugUtilsMessageEXT - Submits debug utils message
--
-- == Valid Usage
--
-- -   For each structure in @objects@ found in @callbackData@, the value
--     of 'DebugUtilsObjectNameInfoEXT'::@objectType@ /must/ not be
--     'OpenXR.Core10.Enums.ObjectType.OBJECT_TYPE_UNKNOWN'
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-xrSubmitDebugUtilsMessageEXT-extension-notenabled# The @@
--     extension /must/ be enabled prior to calling
--     'submitDebugUtilsMessageEXT'
--
-- -   #VUID-xrSubmitDebugUtilsMessageEXT-instance-parameter# @instance@
--     /must/ be a valid 'OpenXR.Core10.Handles.Instance' handle
--
-- -   #VUID-xrSubmitDebugUtilsMessageEXT-messageSeverity-parameter#
--     @messageSeverity@ /must/ be a valid combination of
--     <https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XrDebugUtilsMessageSeverityFlagBitsEXT XrDebugUtilsMessageSeverityFlagBitsEXT>
--     values
--
-- -   #VUID-xrSubmitDebugUtilsMessageEXT-messageSeverity-requiredbitmask#
--     @messageSeverity@ /must/ not be @0@
--
-- -   #VUID-xrSubmitDebugUtilsMessageEXT-messageTypes-parameter#
--     @messageTypes@ /must/ be a valid combination of
--     <https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XrDebugUtilsMessageTypeFlagBitsEXT XrDebugUtilsMessageTypeFlagBitsEXT>
--     values
--
-- -   #VUID-xrSubmitDebugUtilsMessageEXT-messageTypes-requiredbitmask#
--     @messageTypes@ /must/ not be @0@
--
-- -   #VUID-xrSubmitDebugUtilsMessageEXT-callbackData-parameter#
--     @callbackData@ /must/ be a pointer to a valid
--     'DebugUtilsMessengerCallbackDataEXT' structure
--
-- == Return Codes
--
-- [<https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#fundamentals-successcodes Success>]
--
--     -   'OpenXR.Core10.Enums.Result.SUCCESS'
--
-- [<https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#fundamentals-errorcodes Failure>]
--
--     -   'OpenXR.Core10.Enums.Result.ERROR_HANDLE_INVALID'
--
--     -   'OpenXR.Core10.Enums.Result.ERROR_INSTANCE_LOST'
--
--     -   'OpenXR.Core10.Enums.Result.ERROR_RUNTIME_FAILURE'
--
--     -   'OpenXR.Core10.Enums.Result.ERROR_VALIDATION_FAILURE'
--
--     -   'OpenXR.Core10.Enums.Result.ERROR_FUNCTION_UNSUPPORTED'
--
-- The application /can/ also produce a debug message, and submit it into
-- the OpenXR messaging system.
--
-- The call will propagate through the layers and generate callback(s) as
-- indicated by the message’s flags. The parameters are passed on to the
-- callback in addition to the userData value that was defined at the time
-- the messenger was created.
--
-- = See Also
--
-- 'DebugUtilsMessageSeverityFlagsEXT', 'DebugUtilsMessageTypeFlagsEXT',
-- 'DebugUtilsMessengerCallbackDataEXT', 'OpenXR.Core10.Handles.Instance'
submitDebugUtilsMessageEXT :: forall io
                            . (MonadIO io)
                           => -- | @instance@ is the debug stream’s 'OpenXR.Core10.Handles.Instance'.
                              Instance
                           -> -- | @messageSeverity@ is a single bit value of
                              -- 'DebugUtilsMessageSeverityFlagsEXT' severity of this event\/message.
                              DebugUtilsMessageSeverityFlagsEXT
                           -> -- | @messageTypes@ is an 'DebugUtilsMessageTypeFlagsEXT' bitmask of
                              -- <https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XrDebugUtilsMessageTypeFlagBitsEXT XrDebugUtilsMessageTypeFlagBitsEXT>
                              -- specifying which types of event to identify this message with.
                              ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
                           -> -- | @callbackData@ contains all the callback related data in the
                              -- 'DebugUtilsMessengerCallbackDataEXT' structure.
                              DebugUtilsMessengerCallbackDataEXT
                           -> io ()
submitDebugUtilsMessageEXT :: Instance
-> DebugUtilsMessageSeverityFlagsEXT
-> ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> DebugUtilsMessengerCallbackDataEXT
-> io ()
submitDebugUtilsMessageEXT instance' :: Instance
instance' messageSeverity :: DebugUtilsMessageSeverityFlagsEXT
messageSeverity messageTypes :: "messageTypes" ::: DebugUtilsMessageTypeFlagsEXT
messageTypes callbackData :: DebugUtilsMessengerCallbackDataEXT
callbackData = IO () -> io ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> io ())
-> (ContT () IO () -> IO ()) -> ContT () IO () -> io ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT () IO () -> IO ()
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT () IO () -> io ()) -> ContT () IO () -> io ()
forall a b. (a -> b) -> a -> b
$ do
  let xrSubmitDebugUtilsMessageEXTPtr :: FunPtr
  (Ptr Instance_T
   -> DebugUtilsMessageSeverityFlagsEXT
   -> ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
   -> Ptr DebugUtilsMessengerCallbackDataEXT
   -> IO Result)
xrSubmitDebugUtilsMessageEXTPtr = InstanceCmds
-> FunPtr
     (Ptr Instance_T
      -> DebugUtilsMessageSeverityFlagsEXT
      -> ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
      -> Ptr DebugUtilsMessengerCallbackDataEXT
      -> IO Result)
pXrSubmitDebugUtilsMessageEXT (Instance -> InstanceCmds
instanceCmds (Instance
instance' :: Instance))
  IO () -> ContT () IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT () IO ()) -> IO () -> ContT () IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
  (Ptr Instance_T
   -> DebugUtilsMessageSeverityFlagsEXT
   -> ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
   -> Ptr DebugUtilsMessengerCallbackDataEXT
   -> IO Result)
xrSubmitDebugUtilsMessageEXTPtr FunPtr
  (Ptr Instance_T
   -> DebugUtilsMessageSeverityFlagsEXT
   -> ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
   -> Ptr DebugUtilsMessengerCallbackDataEXT
   -> IO Result)
-> FunPtr
     (Ptr Instance_T
      -> DebugUtilsMessageSeverityFlagsEXT
      -> ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
      -> Ptr DebugUtilsMessengerCallbackDataEXT
      -> IO Result)
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
  (Ptr Instance_T
   -> DebugUtilsMessageSeverityFlagsEXT
   -> ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
   -> Ptr DebugUtilsMessengerCallbackDataEXT
   -> 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 xrSubmitDebugUtilsMessageEXT is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
  let xrSubmitDebugUtilsMessageEXT' :: Ptr Instance_T
-> DebugUtilsMessageSeverityFlagsEXT
-> ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> Ptr DebugUtilsMessengerCallbackDataEXT
-> IO Result
xrSubmitDebugUtilsMessageEXT' = FunPtr
  (Ptr Instance_T
   -> DebugUtilsMessageSeverityFlagsEXT
   -> ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
   -> Ptr DebugUtilsMessengerCallbackDataEXT
   -> IO Result)
-> Ptr Instance_T
-> DebugUtilsMessageSeverityFlagsEXT
-> ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> Ptr DebugUtilsMessengerCallbackDataEXT
-> IO Result
mkXrSubmitDebugUtilsMessageEXT FunPtr
  (Ptr Instance_T
   -> DebugUtilsMessageSeverityFlagsEXT
   -> ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
   -> Ptr DebugUtilsMessengerCallbackDataEXT
   -> IO Result)
xrSubmitDebugUtilsMessageEXTPtr
  Ptr DebugUtilsMessengerCallbackDataEXT
callbackData' <- ((Ptr DebugUtilsMessengerCallbackDataEXT -> IO ()) -> IO ())
-> ContT () IO (Ptr DebugUtilsMessengerCallbackDataEXT)
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr DebugUtilsMessengerCallbackDataEXT -> IO ()) -> IO ())
 -> ContT () IO (Ptr DebugUtilsMessengerCallbackDataEXT))
-> ((Ptr DebugUtilsMessengerCallbackDataEXT -> IO ()) -> IO ())
-> ContT () IO (Ptr DebugUtilsMessengerCallbackDataEXT)
forall a b. (a -> b) -> a -> b
$ DebugUtilsMessengerCallbackDataEXT
-> (Ptr DebugUtilsMessengerCallbackDataEXT -> IO ()) -> IO ()
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (DebugUtilsMessengerCallbackDataEXT
callbackData)
  Result
r <- IO Result -> ContT () IO Result
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO Result -> ContT () IO Result)
-> IO Result -> ContT () IO Result
forall a b. (a -> b) -> a -> b
$ String -> IO Result -> IO Result
forall a. String -> IO a -> IO a
traceAroundEvent "xrSubmitDebugUtilsMessageEXT" (Ptr Instance_T
-> DebugUtilsMessageSeverityFlagsEXT
-> ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> Ptr DebugUtilsMessengerCallbackDataEXT
-> IO Result
xrSubmitDebugUtilsMessageEXT' (Instance -> Ptr Instance_T
instanceHandle (Instance
instance')) (DebugUtilsMessageSeverityFlagsEXT
messageSeverity) ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT
messageTypes) Ptr DebugUtilsMessengerCallbackDataEXT
callbackData')
  IO () -> ContT () IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT () IO ()) -> IO () -> ContT () 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) (OpenXrException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (Result -> OpenXrException
OpenXrException Result
r))


foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
  unsafe
#endif
  "dynamic" mkXrSessionBeginDebugUtilsLabelRegionEXT
  :: FunPtr (Ptr Session_T -> Ptr DebugUtilsLabelEXT -> IO Result) -> Ptr Session_T -> Ptr DebugUtilsLabelEXT -> IO Result

-- | xrSessionBeginDebugUtilsLabelRegionEXT - Session begin debug utils label
-- region
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-xrSessionBeginDebugUtilsLabelRegionEXT-extension-notenabled#
--     The @@ extension /must/ be enabled prior to calling
--     'sessionBeginDebugUtilsLabelRegionEXT'
--
-- -   #VUID-xrSessionBeginDebugUtilsLabelRegionEXT-session-parameter#
--     @session@ /must/ be a valid 'OpenXR.Core10.Handles.Session' handle
--
-- -   #VUID-xrSessionBeginDebugUtilsLabelRegionEXT-labelInfo-parameter#
--     @labelInfo@ /must/ be a pointer to a valid 'DebugUtilsLabelEXT'
--     structure
--
-- == Return Codes
--
-- [<https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#fundamentals-successcodes Success>]
--
--     -   'OpenXR.Core10.Enums.Result.SUCCESS'
--
--     -   'OpenXR.Core10.Enums.Result.SESSION_LOSS_PENDING'
--
-- [<https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#fundamentals-errorcodes Failure>]
--
--     -   'OpenXR.Core10.Enums.Result.ERROR_SESSION_LOST'
--
--     -   'OpenXR.Core10.Enums.Result.ERROR_HANDLE_INVALID'
--
--     -   'OpenXR.Core10.Enums.Result.ERROR_VALIDATION_FAILURE'
--
--     -   'OpenXR.Core10.Enums.Result.ERROR_RUNTIME_FAILURE'
--
--     -   'OpenXR.Core10.Enums.Result.ERROR_FUNCTION_UNSUPPORTED'
--
-- The 'sessionBeginDebugUtilsLabelRegionEXT' function begins a label
-- region within @session@.
--
-- = See Also
--
-- 'DebugUtilsLabelEXT', 'OpenXR.Core10.Handles.Session'
sessionBeginDebugUtilsLabelRegionEXT :: forall io
                                      . (MonadIO io)
                                     => -- | @session@ is the 'OpenXR.Core10.Handles.Session' that a label region
                                        -- should be associated with.
                                        Session
                                     -> -- | @labelInfo@ is the 'DebugUtilsLabelEXT' containing the label information
                                        -- for the region that should be begun.
                                        ("labelInfo" ::: DebugUtilsLabelEXT)
                                     -> io (Result)
sessionBeginDebugUtilsLabelRegionEXT :: Session -> ("labelInfo" ::: DebugUtilsLabelEXT) -> io Result
sessionBeginDebugUtilsLabelRegionEXT session :: Session
session labelInfo :: "labelInfo" ::: DebugUtilsLabelEXT
labelInfo = IO Result -> io Result
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Result -> io Result)
-> (ContT Result IO Result -> IO Result)
-> ContT Result IO Result
-> io Result
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT Result IO Result -> IO Result
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT Result IO Result -> io Result)
-> ContT Result IO Result -> io Result
forall a b. (a -> b) -> a -> b
$ do
  let xrSessionBeginDebugUtilsLabelRegionEXTPtr :: FunPtr
  (Ptr Session_T
   -> ("labelInfo" ::: Ptr ("labelInfo" ::: DebugUtilsLabelEXT))
   -> IO Result)
xrSessionBeginDebugUtilsLabelRegionEXTPtr = InstanceCmds
-> FunPtr
     (Ptr Session_T
      -> ("labelInfo" ::: Ptr ("labelInfo" ::: DebugUtilsLabelEXT))
      -> IO Result)
pXrSessionBeginDebugUtilsLabelRegionEXT (Session -> InstanceCmds
instanceCmds (Session
session :: Session))
  IO () -> ContT Result IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT Result IO ()) -> IO () -> ContT Result IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
  (Ptr Session_T
   -> ("labelInfo" ::: Ptr ("labelInfo" ::: DebugUtilsLabelEXT))
   -> IO Result)
xrSessionBeginDebugUtilsLabelRegionEXTPtr FunPtr
  (Ptr Session_T
   -> ("labelInfo" ::: Ptr ("labelInfo" ::: DebugUtilsLabelEXT))
   -> IO Result)
-> FunPtr
     (Ptr Session_T
      -> ("labelInfo" ::: Ptr ("labelInfo" ::: DebugUtilsLabelEXT))
      -> IO Result)
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
  (Ptr Session_T
   -> ("labelInfo" ::: Ptr ("labelInfo" ::: DebugUtilsLabelEXT))
   -> 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 xrSessionBeginDebugUtilsLabelRegionEXT is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
  let xrSessionBeginDebugUtilsLabelRegionEXT' :: Ptr Session_T
-> ("labelInfo" ::: Ptr ("labelInfo" ::: DebugUtilsLabelEXT))
-> IO Result
xrSessionBeginDebugUtilsLabelRegionEXT' = FunPtr
  (Ptr Session_T
   -> ("labelInfo" ::: Ptr ("labelInfo" ::: DebugUtilsLabelEXT))
   -> IO Result)
-> Ptr Session_T
-> ("labelInfo" ::: Ptr ("labelInfo" ::: DebugUtilsLabelEXT))
-> IO Result
mkXrSessionBeginDebugUtilsLabelRegionEXT FunPtr
  (Ptr Session_T
   -> ("labelInfo" ::: Ptr ("labelInfo" ::: DebugUtilsLabelEXT))
   -> IO Result)
xrSessionBeginDebugUtilsLabelRegionEXTPtr
  "labelInfo" ::: Ptr ("labelInfo" ::: DebugUtilsLabelEXT)
labelInfo' <- ((("labelInfo" ::: Ptr ("labelInfo" ::: DebugUtilsLabelEXT))
  -> IO Result)
 -> IO Result)
-> ContT
     Result
     IO
     ("labelInfo" ::: Ptr ("labelInfo" ::: DebugUtilsLabelEXT))
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("labelInfo" ::: Ptr ("labelInfo" ::: DebugUtilsLabelEXT))
   -> IO Result)
  -> IO Result)
 -> ContT
      Result
      IO
      ("labelInfo" ::: Ptr ("labelInfo" ::: DebugUtilsLabelEXT)))
-> ((("labelInfo" ::: Ptr ("labelInfo" ::: DebugUtilsLabelEXT))
     -> IO Result)
    -> IO Result)
-> ContT
     Result
     IO
     ("labelInfo" ::: Ptr ("labelInfo" ::: DebugUtilsLabelEXT))
forall a b. (a -> b) -> a -> b
$ ("labelInfo" ::: DebugUtilsLabelEXT)
-> (("labelInfo" ::: Ptr ("labelInfo" ::: DebugUtilsLabelEXT))
    -> IO Result)
-> IO Result
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct ("labelInfo" ::: DebugUtilsLabelEXT
labelInfo)
  Result
r <- IO Result -> ContT Result IO Result
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO Result -> ContT Result IO Result)
-> IO Result -> ContT Result IO Result
forall a b. (a -> b) -> a -> b
$ String -> IO Result -> IO Result
forall a. String -> IO a -> IO a
traceAroundEvent "xrSessionBeginDebugUtilsLabelRegionEXT" (Ptr Session_T
-> ("labelInfo" ::: Ptr ("labelInfo" ::: DebugUtilsLabelEXT))
-> IO Result
xrSessionBeginDebugUtilsLabelRegionEXT' (Session -> Ptr Session_T
sessionHandle (Session
session)) "labelInfo" ::: Ptr ("labelInfo" ::: DebugUtilsLabelEXT)
labelInfo')
  IO () -> ContT Result IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT Result IO ()) -> IO () -> ContT Result 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) (OpenXrException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (Result -> OpenXrException
OpenXrException Result
r))
  Result -> ContT Result IO Result
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Result -> ContT Result IO Result)
-> Result -> ContT Result IO Result
forall a b. (a -> b) -> a -> b
$ (Result
r)


foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
  unsafe
#endif
  "dynamic" mkXrSessionEndDebugUtilsLabelRegionEXT
  :: FunPtr (Ptr Session_T -> IO Result) -> Ptr Session_T -> IO Result

-- | xrSessionEndDebugUtilsLabelRegionEXT - Session end debug utils label
-- region
--
-- == Valid Usage
--
-- -   'sessionEndDebugUtilsLabelRegionEXT' /must/ be called only after a
--     matching 'sessionBeginDebugUtilsLabelRegionEXT'.
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-xrSessionEndDebugUtilsLabelRegionEXT-extension-notenabled# The
--     @@ extension /must/ be enabled prior to calling
--     'sessionEndDebugUtilsLabelRegionEXT'
--
-- -   #VUID-xrSessionEndDebugUtilsLabelRegionEXT-session-parameter#
--     @session@ /must/ be a valid 'OpenXR.Core10.Handles.Session' handle
--
-- == Return Codes
--
-- [<https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#fundamentals-successcodes Success>]
--
--     -   'OpenXR.Core10.Enums.Result.SUCCESS'
--
--     -   'OpenXR.Core10.Enums.Result.SESSION_LOSS_PENDING'
--
-- [<https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#fundamentals-errorcodes Failure>]
--
--     -   'OpenXR.Core10.Enums.Result.ERROR_SESSION_LOST'
--
--     -   'OpenXR.Core10.Enums.Result.ERROR_HANDLE_INVALID'
--
--     -   'OpenXR.Core10.Enums.Result.ERROR_VALIDATION_FAILURE'
--
--     -   'OpenXR.Core10.Enums.Result.ERROR_RUNTIME_FAILURE'
--
--     -   'OpenXR.Core10.Enums.Result.ERROR_FUNCTION_UNSUPPORTED'
--
-- This function ends the last label region begun with the
-- 'sessionBeginDebugUtilsLabelRegionEXT' function within the same
-- @session@.
--
-- = See Also
--
-- 'OpenXR.Core10.Handles.Session'
sessionEndDebugUtilsLabelRegionEXT :: forall io
                                    . (MonadIO io)
                                   => -- | @session@ is the 'OpenXR.Core10.Handles.Session' that a label region
                                      -- should be associated with.
                                      Session
                                   -> io (Result)
sessionEndDebugUtilsLabelRegionEXT :: Session -> io Result
sessionEndDebugUtilsLabelRegionEXT session :: Session
session = IO Result -> io Result
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Result -> io Result) -> IO Result -> io Result
forall a b. (a -> b) -> a -> b
$ do
  let xrSessionEndDebugUtilsLabelRegionEXTPtr :: FunPtr (Ptr Session_T -> IO Result)
xrSessionEndDebugUtilsLabelRegionEXTPtr = InstanceCmds -> FunPtr (Ptr Session_T -> IO Result)
pXrSessionEndDebugUtilsLabelRegionEXT (Session -> InstanceCmds
instanceCmds (Session
session :: Session))
  Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr (Ptr Session_T -> IO Result)
xrSessionEndDebugUtilsLabelRegionEXTPtr FunPtr (Ptr Session_T -> IO Result)
-> FunPtr (Ptr Session_T -> IO Result) -> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr (Ptr Session_T -> 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 xrSessionEndDebugUtilsLabelRegionEXT is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
  let xrSessionEndDebugUtilsLabelRegionEXT' :: Ptr Session_T -> IO Result
xrSessionEndDebugUtilsLabelRegionEXT' = FunPtr (Ptr Session_T -> IO Result) -> Ptr Session_T -> IO Result
mkXrSessionEndDebugUtilsLabelRegionEXT FunPtr (Ptr Session_T -> IO Result)
xrSessionEndDebugUtilsLabelRegionEXTPtr
  Result
r <- String -> IO Result -> IO Result
forall a. String -> IO a -> IO a
traceAroundEvent "xrSessionEndDebugUtilsLabelRegionEXT" (Ptr Session_T -> IO Result
xrSessionEndDebugUtilsLabelRegionEXT' (Session -> Ptr Session_T
sessionHandle (Session
session)))
  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) (OpenXrException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (Result -> OpenXrException
OpenXrException Result
r))
  Result -> IO Result
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Result -> IO Result) -> Result -> IO Result
forall a b. (a -> b) -> a -> b
$ (Result
r)


foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
  unsafe
#endif
  "dynamic" mkXrSessionInsertDebugUtilsLabelEXT
  :: FunPtr (Ptr Session_T -> Ptr DebugUtilsLabelEXT -> IO Result) -> Ptr Session_T -> Ptr DebugUtilsLabelEXT -> IO Result

-- | xrSessionInsertDebugUtilsLabelEXT - Session insert debug utils label
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-xrSessionInsertDebugUtilsLabelEXT-extension-notenabled# The @@
--     extension /must/ be enabled prior to calling
--     'sessionInsertDebugUtilsLabelEXT'
--
-- -   #VUID-xrSessionInsertDebugUtilsLabelEXT-session-parameter# @session@
--     /must/ be a valid 'OpenXR.Core10.Handles.Session' handle
--
-- -   #VUID-xrSessionInsertDebugUtilsLabelEXT-labelInfo-parameter#
--     @labelInfo@ /must/ be a pointer to a valid 'DebugUtilsLabelEXT'
--     structure
--
-- == Return Codes
--
-- [<https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#fundamentals-successcodes Success>]
--
--     -   'OpenXR.Core10.Enums.Result.SUCCESS'
--
--     -   'OpenXR.Core10.Enums.Result.SESSION_LOSS_PENDING'
--
-- [<https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#fundamentals-errorcodes Failure>]
--
--     -   'OpenXR.Core10.Enums.Result.ERROR_SESSION_LOST'
--
--     -   'OpenXR.Core10.Enums.Result.ERROR_HANDLE_INVALID'
--
--     -   'OpenXR.Core10.Enums.Result.ERROR_VALIDATION_FAILURE'
--
--     -   'OpenXR.Core10.Enums.Result.ERROR_RUNTIME_FAILURE'
--
--     -   'OpenXR.Core10.Enums.Result.ERROR_FUNCTION_UNSUPPORTED'
--
-- The 'sessionInsertDebugUtilsLabelEXT' function inserts an individual
-- label within @session@. The individual labels are useful for different
-- reasons based on the type of debugging scenario. When used with
-- something active like a profiler or debugger, it identifies a single
-- point of time. When used with logging, the individual label identifies
-- that a particular location has been passed at the point the log message
-- is triggered. Because of this usage, individual labels only exist in a
-- log until the next call to any of the label functions:
--
-- -   'sessionBeginDebugUtilsLabelRegionEXT'
--
-- -   'sessionEndDebugUtilsLabelRegionEXT'
--
-- -   'sessionInsertDebugUtilsLabelEXT'
--
-- = See Also
--
-- 'DebugUtilsLabelEXT', 'OpenXR.Core10.Handles.Session',
-- 'sessionBeginDebugUtilsLabelRegionEXT',
-- 'sessionEndDebugUtilsLabelRegionEXT'
sessionInsertDebugUtilsLabelEXT :: forall io
                                 . (MonadIO io)
                                => -- | @session@ is the 'OpenXR.Core10.Handles.Session' that a label region
                                   -- should be associated with.
                                   Session
                                -> -- | @labelInfo@ is the 'DebugUtilsLabelEXT' containing the label information
                                   -- for the region that should be begun.
                                   ("labelInfo" ::: DebugUtilsLabelEXT)
                                -> io (Result)
sessionInsertDebugUtilsLabelEXT :: Session -> ("labelInfo" ::: DebugUtilsLabelEXT) -> io Result
sessionInsertDebugUtilsLabelEXT session :: Session
session labelInfo :: "labelInfo" ::: DebugUtilsLabelEXT
labelInfo = IO Result -> io Result
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Result -> io Result)
-> (ContT Result IO Result -> IO Result)
-> ContT Result IO Result
-> io Result
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT Result IO Result -> IO Result
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT Result IO Result -> io Result)
-> ContT Result IO Result -> io Result
forall a b. (a -> b) -> a -> b
$ do
  let xrSessionInsertDebugUtilsLabelEXTPtr :: FunPtr
  (Ptr Session_T
   -> ("labelInfo" ::: Ptr ("labelInfo" ::: DebugUtilsLabelEXT))
   -> IO Result)
xrSessionInsertDebugUtilsLabelEXTPtr = InstanceCmds
-> FunPtr
     (Ptr Session_T
      -> ("labelInfo" ::: Ptr ("labelInfo" ::: DebugUtilsLabelEXT))
      -> IO Result)
pXrSessionInsertDebugUtilsLabelEXT (Session -> InstanceCmds
instanceCmds (Session
session :: Session))
  IO () -> ContT Result IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT Result IO ()) -> IO () -> ContT Result IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
  (Ptr Session_T
   -> ("labelInfo" ::: Ptr ("labelInfo" ::: DebugUtilsLabelEXT))
   -> IO Result)
xrSessionInsertDebugUtilsLabelEXTPtr FunPtr
  (Ptr Session_T
   -> ("labelInfo" ::: Ptr ("labelInfo" ::: DebugUtilsLabelEXT))
   -> IO Result)
-> FunPtr
     (Ptr Session_T
      -> ("labelInfo" ::: Ptr ("labelInfo" ::: DebugUtilsLabelEXT))
      -> IO Result)
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
  (Ptr Session_T
   -> ("labelInfo" ::: Ptr ("labelInfo" ::: DebugUtilsLabelEXT))
   -> 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 xrSessionInsertDebugUtilsLabelEXT is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
  let xrSessionInsertDebugUtilsLabelEXT' :: Ptr Session_T
-> ("labelInfo" ::: Ptr ("labelInfo" ::: DebugUtilsLabelEXT))
-> IO Result
xrSessionInsertDebugUtilsLabelEXT' = FunPtr
  (Ptr Session_T
   -> ("labelInfo" ::: Ptr ("labelInfo" ::: DebugUtilsLabelEXT))
   -> IO Result)
-> Ptr Session_T
-> ("labelInfo" ::: Ptr ("labelInfo" ::: DebugUtilsLabelEXT))
-> IO Result
mkXrSessionInsertDebugUtilsLabelEXT FunPtr
  (Ptr Session_T
   -> ("labelInfo" ::: Ptr ("labelInfo" ::: DebugUtilsLabelEXT))
   -> IO Result)
xrSessionInsertDebugUtilsLabelEXTPtr
  "labelInfo" ::: Ptr ("labelInfo" ::: DebugUtilsLabelEXT)
labelInfo' <- ((("labelInfo" ::: Ptr ("labelInfo" ::: DebugUtilsLabelEXT))
  -> IO Result)
 -> IO Result)
-> ContT
     Result
     IO
     ("labelInfo" ::: Ptr ("labelInfo" ::: DebugUtilsLabelEXT))
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("labelInfo" ::: Ptr ("labelInfo" ::: DebugUtilsLabelEXT))
   -> IO Result)
  -> IO Result)
 -> ContT
      Result
      IO
      ("labelInfo" ::: Ptr ("labelInfo" ::: DebugUtilsLabelEXT)))
-> ((("labelInfo" ::: Ptr ("labelInfo" ::: DebugUtilsLabelEXT))
     -> IO Result)
    -> IO Result)
-> ContT
     Result
     IO
     ("labelInfo" ::: Ptr ("labelInfo" ::: DebugUtilsLabelEXT))
forall a b. (a -> b) -> a -> b
$ ("labelInfo" ::: DebugUtilsLabelEXT)
-> (("labelInfo" ::: Ptr ("labelInfo" ::: DebugUtilsLabelEXT))
    -> IO Result)
-> IO Result
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct ("labelInfo" ::: DebugUtilsLabelEXT
labelInfo)
  Result
r <- IO Result -> ContT Result IO Result
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO Result -> ContT Result IO Result)
-> IO Result -> ContT Result IO Result
forall a b. (a -> b) -> a -> b
$ String -> IO Result -> IO Result
forall a. String -> IO a -> IO a
traceAroundEvent "xrSessionInsertDebugUtilsLabelEXT" (Ptr Session_T
-> ("labelInfo" ::: Ptr ("labelInfo" ::: DebugUtilsLabelEXT))
-> IO Result
xrSessionInsertDebugUtilsLabelEXT' (Session -> Ptr Session_T
sessionHandle (Session
session)) "labelInfo" ::: Ptr ("labelInfo" ::: DebugUtilsLabelEXT)
labelInfo')
  IO () -> ContT Result IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT Result IO ()) -> IO () -> ContT Result 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) (OpenXrException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (Result -> OpenXrException
OpenXrException Result
r))
  Result -> ContT Result IO Result
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Result -> ContT Result IO Result)
-> Result -> ContT Result IO Result
forall a b. (a -> b) -> a -> b
$ (Result
r)


-- | XrDebugUtilsObjectNameInfoEXT - Debug utils object name info
--
-- == Valid Usage
--
-- -   If @objectType@ is
--     'OpenXR.Core10.Enums.ObjectType.OBJECT_TYPE_UNKNOWN', @objectHandle@
--     /must/ not be
--     <https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XR_NULL_HANDLE XR_NULL_HANDLE>
--
-- -   If @objectType@ is not
--     'OpenXR.Core10.Enums.ObjectType.OBJECT_TYPE_UNKNOWN', @objectHandle@
--     /must/ be
--     <https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XR_NULL_HANDLE XR_NULL_HANDLE>
--     or an OpenXR handle of the type associated with @objectType@
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-XrDebugUtilsObjectNameInfoEXT-extension-notenabled# The @@
--     extension /must/ be enabled prior to using
--     'DebugUtilsObjectNameInfoEXT'
--
-- -   #VUID-XrDebugUtilsObjectNameInfoEXT-type-type# @type@ /must/ be
--     'OpenXR.Core10.Enums.StructureType.TYPE_DEBUG_UTILS_OBJECT_NAME_INFO_EXT'
--
-- -   #VUID-XrDebugUtilsObjectNameInfoEXT-next-next# @next@ /must/ be
--     @NULL@ or a valid pointer to the
--     <https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#valid-usage-for-structure-pointer-chains next structure in a structure chain>
--
-- -   #VUID-XrDebugUtilsObjectNameInfoEXT-objectType-parameter#
--     @objectType@ /must/ be a valid
--     'OpenXR.Core10.Enums.ObjectType.ObjectType' value
--
-- -   #VUID-XrDebugUtilsObjectNameInfoEXT-objectName-parameter# If
--     @objectName@ is not @NULL@, @objectName@ /must/ be a null-terminated
--     UTF-8 string
--
-- = See Also
--
-- 'DebugUtilsMessengerCallbackDataEXT',
-- 'OpenXR.Core10.Enums.ObjectType.ObjectType',
-- 'OpenXR.Core10.Enums.StructureType.StructureType',
-- 'setDebugUtilsObjectNameEXT'
data DebugUtilsObjectNameInfoEXT = DebugUtilsObjectNameInfoEXT
  { -- | @objectType@ is an 'OpenXR.Core10.Enums.ObjectType.ObjectType'
    -- specifying the type of the object to be named.
    DebugUtilsObjectNameInfoEXT -> ObjectType
objectType :: ObjectType
  , -- | @objectHandle@ is the object to be named.
    DebugUtilsObjectNameInfoEXT -> Word64
objectHandle :: Word64
  , -- | @objectName@ is a @NULL@ terminated UTF-8 string specifying the name to
    -- apply to objectHandle.
    DebugUtilsObjectNameInfoEXT -> Maybe ByteString
objectName :: Maybe ByteString
  }
  deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (DebugUtilsObjectNameInfoEXT)
#endif
deriving instance Show DebugUtilsObjectNameInfoEXT

instance ToCStruct DebugUtilsObjectNameInfoEXT where
  withCStruct :: DebugUtilsObjectNameInfoEXT
-> (Ptr DebugUtilsObjectNameInfoEXT -> IO b) -> IO b
withCStruct x :: DebugUtilsObjectNameInfoEXT
x f :: Ptr DebugUtilsObjectNameInfoEXT -> IO b
f = Int -> Int -> (Ptr DebugUtilsObjectNameInfoEXT -> IO b) -> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 40 8 ((Ptr DebugUtilsObjectNameInfoEXT -> IO b) -> IO b)
-> (Ptr DebugUtilsObjectNameInfoEXT -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \p :: Ptr DebugUtilsObjectNameInfoEXT
p -> Ptr DebugUtilsObjectNameInfoEXT
-> DebugUtilsObjectNameInfoEXT -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr DebugUtilsObjectNameInfoEXT
p DebugUtilsObjectNameInfoEXT
x (Ptr DebugUtilsObjectNameInfoEXT -> IO b
f Ptr DebugUtilsObjectNameInfoEXT
p)
  pokeCStruct :: Ptr DebugUtilsObjectNameInfoEXT
-> DebugUtilsObjectNameInfoEXT -> IO b -> IO b
pokeCStruct p :: Ptr DebugUtilsObjectNameInfoEXT
p DebugUtilsObjectNameInfoEXT{..} f :: IO b
f = ContT b IO b -> IO b
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT b IO b -> IO b) -> ContT b IO b -> IO b
forall a b. (a -> b) -> a -> b
$ do
    IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DebugUtilsObjectNameInfoEXT
p Ptr DebugUtilsObjectNameInfoEXT -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
TYPE_DEBUG_UTILS_OBJECT_NAME_INFO_EXT)
    IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DebugUtilsObjectNameInfoEXT
p Ptr DebugUtilsObjectNameInfoEXT -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
    IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr ObjectType -> ObjectType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DebugUtilsObjectNameInfoEXT
p Ptr DebugUtilsObjectNameInfoEXT -> Int -> Ptr ObjectType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr ObjectType)) (ObjectType
objectType)
    IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr Word64 -> Word64 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DebugUtilsObjectNameInfoEXT
p Ptr DebugUtilsObjectNameInfoEXT -> Int -> Ptr Word64
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr Word64)) (Word64
objectHandle)
    Ptr CChar
objectName'' <- case (Maybe ByteString
objectName) of
      Nothing -> Ptr CChar -> ContT b IO (Ptr CChar)
forall (f :: * -> *) a. Applicative f => a -> f a
pure Ptr CChar
forall a. Ptr a
nullPtr
      Just j :: ByteString
j -> ((Ptr CChar -> IO b) -> IO b) -> ContT b IO (Ptr CChar)
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr CChar -> IO b) -> IO b) -> ContT b IO (Ptr CChar))
-> ((Ptr CChar -> IO b) -> IO b) -> ContT b IO (Ptr CChar)
forall a b. (a -> b) -> a -> b
$ ByteString -> (Ptr CChar -> IO b) -> IO b
forall a. ByteString -> (Ptr CChar -> IO a) -> IO a
useAsCString (ByteString
j)
    IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr (Ptr CChar) -> Ptr CChar -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DebugUtilsObjectNameInfoEXT
p Ptr DebugUtilsObjectNameInfoEXT -> Int -> Ptr (Ptr CChar)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32 :: Ptr (Ptr CChar))) Ptr CChar
objectName''
    IO b -> ContT b IO b
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO b -> ContT b IO b) -> IO b -> ContT b IO b
forall a b. (a -> b) -> a -> b
$ IO b
f
  cStructSize :: Int
cStructSize = 40
  cStructAlignment :: Int
cStructAlignment = 8
  pokeZeroCStruct :: Ptr DebugUtilsObjectNameInfoEXT -> IO b -> IO b
pokeZeroCStruct p :: Ptr DebugUtilsObjectNameInfoEXT
p f :: IO b
f = do
    Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DebugUtilsObjectNameInfoEXT
p Ptr DebugUtilsObjectNameInfoEXT -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
TYPE_DEBUG_UTILS_OBJECT_NAME_INFO_EXT)
    Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DebugUtilsObjectNameInfoEXT
p Ptr DebugUtilsObjectNameInfoEXT -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
    Ptr ObjectType -> ObjectType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DebugUtilsObjectNameInfoEXT
p Ptr DebugUtilsObjectNameInfoEXT -> Int -> Ptr ObjectType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr ObjectType)) (ObjectType
forall a. Zero a => a
zero)
    Ptr Word64 -> Word64 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DebugUtilsObjectNameInfoEXT
p Ptr DebugUtilsObjectNameInfoEXT -> Int -> Ptr Word64
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr Word64)) (Word64
forall a. Zero a => a
zero)
    IO b
f

instance FromCStruct DebugUtilsObjectNameInfoEXT where
  peekCStruct :: Ptr DebugUtilsObjectNameInfoEXT -> IO DebugUtilsObjectNameInfoEXT
peekCStruct p :: Ptr DebugUtilsObjectNameInfoEXT
p = do
    ObjectType
objectType <- Ptr ObjectType -> IO ObjectType
forall a. Storable a => Ptr a -> IO a
peek @ObjectType ((Ptr DebugUtilsObjectNameInfoEXT
p Ptr DebugUtilsObjectNameInfoEXT -> Int -> Ptr ObjectType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr ObjectType))
    Word64
objectHandle <- Ptr Word64 -> IO Word64
forall a. Storable a => Ptr a -> IO a
peek @Word64 ((Ptr DebugUtilsObjectNameInfoEXT
p Ptr DebugUtilsObjectNameInfoEXT -> Int -> Ptr Word64
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr Word64))
    Ptr CChar
objectName <- Ptr (Ptr CChar) -> IO (Ptr CChar)
forall a. Storable a => Ptr a -> IO a
peek @(Ptr CChar) ((Ptr DebugUtilsObjectNameInfoEXT
p Ptr DebugUtilsObjectNameInfoEXT -> Int -> Ptr (Ptr CChar)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32 :: Ptr (Ptr CChar)))
    Maybe ByteString
objectName' <- (Ptr CChar -> IO ByteString) -> Ptr CChar -> IO (Maybe ByteString)
forall a b. (Ptr a -> IO b) -> Ptr a -> IO (Maybe b)
maybePeek (\j :: Ptr CChar
j -> Ptr CChar -> IO ByteString
packCString (Ptr CChar
j)) Ptr CChar
objectName
    DebugUtilsObjectNameInfoEXT -> IO DebugUtilsObjectNameInfoEXT
forall (f :: * -> *) a. Applicative f => a -> f a
pure (DebugUtilsObjectNameInfoEXT -> IO DebugUtilsObjectNameInfoEXT)
-> DebugUtilsObjectNameInfoEXT -> IO DebugUtilsObjectNameInfoEXT
forall a b. (a -> b) -> a -> b
$ ObjectType
-> Word64 -> Maybe ByteString -> DebugUtilsObjectNameInfoEXT
DebugUtilsObjectNameInfoEXT
             ObjectType
objectType Word64
objectHandle Maybe ByteString
objectName'

instance Zero DebugUtilsObjectNameInfoEXT where
  zero :: DebugUtilsObjectNameInfoEXT
zero = ObjectType
-> Word64 -> Maybe ByteString -> DebugUtilsObjectNameInfoEXT
DebugUtilsObjectNameInfoEXT
           ObjectType
forall a. Zero a => a
zero
           Word64
forall a. Zero a => a
zero
           Maybe ByteString
forall a. Maybe a
Nothing


-- | XrDebugUtilsLabelEXT - Debug Utils Label
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-XrDebugUtilsLabelEXT-extension-notenabled# The @@ extension
--     /must/ be enabled prior to using 'DebugUtilsLabelEXT'
--
-- -   #VUID-XrDebugUtilsLabelEXT-type-type# @type@ /must/ be
--     'OpenXR.Core10.Enums.StructureType.TYPE_DEBUG_UTILS_LABEL_EXT'
--
-- -   #VUID-XrDebugUtilsLabelEXT-next-next# @next@ /must/ be @NULL@ or a
--     valid pointer to the
--     <https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#valid-usage-for-structure-pointer-chains next structure in a structure chain>
--
-- -   #VUID-XrDebugUtilsLabelEXT-labelName-parameter# @labelName@ /must/
--     be a null-terminated UTF-8 string
--
-- = See Also
--
-- 'DebugUtilsMessengerCallbackDataEXT',
-- 'OpenXR.Core10.Enums.StructureType.StructureType',
-- 'sessionBeginDebugUtilsLabelRegionEXT',
-- 'sessionInsertDebugUtilsLabelEXT'
data DebugUtilsLabelEXT = DebugUtilsLabelEXT
  { -- | @labelName@ is a @NULL@ terminated UTF-8 string specifying the label
    -- name.
    ("labelInfo" ::: DebugUtilsLabelEXT) -> ByteString
labelName :: ByteString }
  deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (DebugUtilsLabelEXT)
#endif
deriving instance Show DebugUtilsLabelEXT

instance ToCStruct DebugUtilsLabelEXT where
  withCStruct :: ("labelInfo" ::: DebugUtilsLabelEXT)
-> (("labelInfo" ::: Ptr ("labelInfo" ::: DebugUtilsLabelEXT))
    -> IO b)
-> IO b
withCStruct x :: "labelInfo" ::: DebugUtilsLabelEXT
x f :: ("labelInfo" ::: Ptr ("labelInfo" ::: DebugUtilsLabelEXT)) -> IO b
f = Int
-> Int
-> (("labelInfo" ::: Ptr ("labelInfo" ::: DebugUtilsLabelEXT))
    -> IO b)
-> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 24 8 ((("labelInfo" ::: Ptr ("labelInfo" ::: DebugUtilsLabelEXT))
  -> IO b)
 -> IO b)
-> (("labelInfo" ::: Ptr ("labelInfo" ::: DebugUtilsLabelEXT))
    -> IO b)
-> IO b
forall a b. (a -> b) -> a -> b
$ \p :: "labelInfo" ::: Ptr ("labelInfo" ::: DebugUtilsLabelEXT)
p -> ("labelInfo" ::: Ptr ("labelInfo" ::: DebugUtilsLabelEXT))
-> ("labelInfo" ::: DebugUtilsLabelEXT) -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "labelInfo" ::: Ptr ("labelInfo" ::: DebugUtilsLabelEXT)
p "labelInfo" ::: DebugUtilsLabelEXT
x (("labelInfo" ::: Ptr ("labelInfo" ::: DebugUtilsLabelEXT)) -> IO b
f "labelInfo" ::: Ptr ("labelInfo" ::: DebugUtilsLabelEXT)
p)
  pokeCStruct :: ("labelInfo" ::: Ptr ("labelInfo" ::: DebugUtilsLabelEXT))
-> ("labelInfo" ::: DebugUtilsLabelEXT) -> IO b -> IO b
pokeCStruct p :: "labelInfo" ::: Ptr ("labelInfo" ::: DebugUtilsLabelEXT)
p DebugUtilsLabelEXT{..} f :: IO b
f = ContT b IO b -> IO b
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT b IO b -> IO b) -> ContT b IO b -> IO b
forall a b. (a -> b) -> a -> b
$ do
    IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("labelInfo" ::: Ptr ("labelInfo" ::: DebugUtilsLabelEXT)
p ("labelInfo" ::: Ptr ("labelInfo" ::: DebugUtilsLabelEXT))
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
TYPE_DEBUG_UTILS_LABEL_EXT)
    IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("labelInfo" ::: Ptr ("labelInfo" ::: DebugUtilsLabelEXT)
p ("labelInfo" ::: Ptr ("labelInfo" ::: DebugUtilsLabelEXT))
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
    Ptr CChar
labelName'' <- ((Ptr CChar -> IO b) -> IO b) -> ContT b IO (Ptr CChar)
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr CChar -> IO b) -> IO b) -> ContT b IO (Ptr CChar))
-> ((Ptr CChar -> IO b) -> IO b) -> ContT b IO (Ptr CChar)
forall a b. (a -> b) -> a -> b
$ ByteString -> (Ptr CChar -> IO b) -> IO b
forall a. ByteString -> (Ptr CChar -> IO a) -> IO a
useAsCString (ByteString
labelName)
    IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr (Ptr CChar) -> Ptr CChar -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("labelInfo" ::: Ptr ("labelInfo" ::: DebugUtilsLabelEXT)
p ("labelInfo" ::: Ptr ("labelInfo" ::: DebugUtilsLabelEXT))
-> Int -> Ptr (Ptr CChar)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr (Ptr CChar))) Ptr CChar
labelName''
    IO b -> ContT b IO b
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO b -> ContT b IO b) -> IO b -> ContT b IO b
forall a b. (a -> b) -> a -> b
$ IO b
f
  cStructSize :: Int
cStructSize = 24
  cStructAlignment :: Int
cStructAlignment = 8
  pokeZeroCStruct :: ("labelInfo" ::: Ptr ("labelInfo" ::: DebugUtilsLabelEXT))
-> IO b -> IO b
pokeZeroCStruct p :: "labelInfo" ::: Ptr ("labelInfo" ::: DebugUtilsLabelEXT)
p f :: IO b
f = ContT b IO b -> IO b
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT b IO b -> IO b) -> ContT b IO b -> IO b
forall a b. (a -> b) -> a -> b
$ do
    IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("labelInfo" ::: Ptr ("labelInfo" ::: DebugUtilsLabelEXT)
p ("labelInfo" ::: Ptr ("labelInfo" ::: DebugUtilsLabelEXT))
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
TYPE_DEBUG_UTILS_LABEL_EXT)
    IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("labelInfo" ::: Ptr ("labelInfo" ::: DebugUtilsLabelEXT)
p ("labelInfo" ::: Ptr ("labelInfo" ::: DebugUtilsLabelEXT))
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
    Ptr CChar
labelName'' <- ((Ptr CChar -> IO b) -> IO b) -> ContT b IO (Ptr CChar)
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr CChar -> IO b) -> IO b) -> ContT b IO (Ptr CChar))
-> ((Ptr CChar -> IO b) -> IO b) -> ContT b IO (Ptr CChar)
forall a b. (a -> b) -> a -> b
$ ByteString -> (Ptr CChar -> IO b) -> IO b
forall a. ByteString -> (Ptr CChar -> IO a) -> IO a
useAsCString (ByteString
forall a. Monoid a => a
mempty)
    IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr (Ptr CChar) -> Ptr CChar -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("labelInfo" ::: Ptr ("labelInfo" ::: DebugUtilsLabelEXT)
p ("labelInfo" ::: Ptr ("labelInfo" ::: DebugUtilsLabelEXT))
-> Int -> Ptr (Ptr CChar)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr (Ptr CChar))) Ptr CChar
labelName''
    IO b -> ContT b IO b
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO b -> ContT b IO b) -> IO b -> ContT b IO b
forall a b. (a -> b) -> a -> b
$ IO b
f

instance FromCStruct DebugUtilsLabelEXT where
  peekCStruct :: ("labelInfo" ::: Ptr ("labelInfo" ::: DebugUtilsLabelEXT))
-> IO ("labelInfo" ::: DebugUtilsLabelEXT)
peekCStruct p :: "labelInfo" ::: Ptr ("labelInfo" ::: DebugUtilsLabelEXT)
p = do
    ByteString
labelName <- Ptr CChar -> IO ByteString
packCString (Ptr CChar -> IO ByteString) -> IO (Ptr CChar) -> IO ByteString
forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
=<< Ptr (Ptr CChar) -> IO (Ptr CChar)
forall a. Storable a => Ptr a -> IO a
peek (("labelInfo" ::: Ptr ("labelInfo" ::: DebugUtilsLabelEXT)
p ("labelInfo" ::: Ptr ("labelInfo" ::: DebugUtilsLabelEXT))
-> Int -> Ptr (Ptr CChar)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr (Ptr CChar)))
    ("labelInfo" ::: DebugUtilsLabelEXT)
-> IO ("labelInfo" ::: DebugUtilsLabelEXT)
forall (f :: * -> *) a. Applicative f => a -> f a
pure (("labelInfo" ::: DebugUtilsLabelEXT)
 -> IO ("labelInfo" ::: DebugUtilsLabelEXT))
-> ("labelInfo" ::: DebugUtilsLabelEXT)
-> IO ("labelInfo" ::: DebugUtilsLabelEXT)
forall a b. (a -> b) -> a -> b
$ ByteString -> "labelInfo" ::: DebugUtilsLabelEXT
DebugUtilsLabelEXT
             ByteString
labelName

instance Zero DebugUtilsLabelEXT where
  zero :: "labelInfo" ::: DebugUtilsLabelEXT
zero = ByteString -> "labelInfo" ::: DebugUtilsLabelEXT
DebugUtilsLabelEXT
           ByteString
forall a. Monoid a => a
mempty


-- | XrDebugUtilsMessengerCallbackDataEXT - Debug utils messenger callback
-- data
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-XrDebugUtilsMessengerCallbackDataEXT-extension-notenabled# The
--     @@ extension /must/ be enabled prior to using
--     'DebugUtilsMessengerCallbackDataEXT'
--
-- -   #VUID-XrDebugUtilsMessengerCallbackDataEXT-type-type# @type@ /must/
--     be
--     'OpenXR.Core10.Enums.StructureType.TYPE_DEBUG_UTILS_MESSENGER_CALLBACK_DATA_EXT'
--
-- -   #VUID-XrDebugUtilsMessengerCallbackDataEXT-next-next# @next@ /must/
--     be @NULL@ or a valid pointer to the
--     <https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#valid-usage-for-structure-pointer-chains next structure in a structure chain>
--
-- -   #VUID-XrDebugUtilsMessengerCallbackDataEXT-messageId-parameter#
--     @messageId@ /must/ be a null-terminated UTF-8 string
--
-- -   #VUID-XrDebugUtilsMessengerCallbackDataEXT-functionName-parameter#
--     @functionName@ /must/ be a null-terminated UTF-8 string
--
-- -   #VUID-XrDebugUtilsMessengerCallbackDataEXT-message-parameter#
--     @message@ /must/ be a null-terminated UTF-8 string
--
-- An 'DebugUtilsMessengerCallbackDataEXT' is a messenger object that
-- handles passing along debug messages to a provided debug callback.
--
-- Note
--
-- This structure should only be considered valid during the lifetime of
-- the triggered callback.
--
-- The labels listed inside @sessionLabels@ are organized in time order,
-- with the most recently generated label appearing first, and the oldest
-- label appearing last.
--
-- = See Also
--
-- 'DebugUtilsLabelEXT', 'DebugUtilsObjectNameInfoEXT',
-- 'OpenXR.Core10.Enums.StructureType.StructureType',
-- 'submitDebugUtilsMessageEXT'
data DebugUtilsMessengerCallbackDataEXT = DebugUtilsMessengerCallbackDataEXT
  { -- | @messageId@ is a @NULL@ terminated string that identifies the message in
    -- a unique way. If the callback is triggered by a validation layer, this
    -- string corresponds the Valid Usage ID (VUID) that can be used to jump to
    -- the appropriate location in the OpenXR specification. This value /may/
    -- be @NULL@ if no unique message identifier is associated with the
    -- message.
    DebugUtilsMessengerCallbackDataEXT -> ByteString
messageId :: ByteString
  , -- | @functionName@ is a @NULL@ terminated string that identifies the OpenXR
    -- function that was executing at the time the message callback was
    -- triggered. This value /may/ be @NULL@ in cases where it is difficult to
    -- determine the originating OpenXR function.
    DebugUtilsMessengerCallbackDataEXT -> ByteString
functionName :: ByteString
  , -- | @message@ is a @NULL@ terminated string detailing the trigger
    -- conditions.
    DebugUtilsMessengerCallbackDataEXT -> ByteString
message :: ByteString
  , -- | @objectCount@ is a count of items contained in the @objects@ array. This
    -- may be @0@.
    DebugUtilsMessengerCallbackDataEXT -> Word32
objectCount :: Word32
  , -- | @objects@ is a pointer to an array of 'DebugUtilsObjectNameInfoEXT'
    -- objects related to the detected issue. The array is roughly in order or
    -- importance, but the 0th element is always guaranteed to be the most
    -- important object for this message.
    DebugUtilsMessengerCallbackDataEXT
-> Ptr DebugUtilsObjectNameInfoEXT
objects :: Ptr DebugUtilsObjectNameInfoEXT
  , -- | @sessionLabelCount@ is a count of items contained in the @sessionLabels@
    -- array. This may be @0@.
    DebugUtilsMessengerCallbackDataEXT -> Word32
sessionLabelCount :: Word32
  , -- | @sessionLabels@ is a pointer to an array of 'DebugUtilsLabelEXT' objects
    -- related to the detected issue. The array is roughly in order or
    -- importance, but the 0th element is always guaranteed to be the most
    -- important object for this message.
    --
    -- @sessionLabels@ is NULL or a pointer to an array of 'DebugUtilsLabelEXT'
    -- active in the current 'OpenXR.Core10.Handles.Session' at the time the
    -- callback was triggered. Refer to
    -- <https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#session-labels Session Labels>
    -- for more information.
    DebugUtilsMessengerCallbackDataEXT
-> "labelInfo" ::: Ptr ("labelInfo" ::: DebugUtilsLabelEXT)
sessionLabels :: Ptr DebugUtilsLabelEXT
  }
  deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (DebugUtilsMessengerCallbackDataEXT)
#endif
deriving instance Show DebugUtilsMessengerCallbackDataEXT

instance ToCStruct DebugUtilsMessengerCallbackDataEXT where
  withCStruct :: DebugUtilsMessengerCallbackDataEXT
-> (Ptr DebugUtilsMessengerCallbackDataEXT -> IO b) -> IO b
withCStruct x :: DebugUtilsMessengerCallbackDataEXT
x f :: Ptr DebugUtilsMessengerCallbackDataEXT -> IO b
f = Int
-> Int -> (Ptr DebugUtilsMessengerCallbackDataEXT -> IO b) -> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 72 8 ((Ptr DebugUtilsMessengerCallbackDataEXT -> IO b) -> IO b)
-> (Ptr DebugUtilsMessengerCallbackDataEXT -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \p :: Ptr DebugUtilsMessengerCallbackDataEXT
p -> Ptr DebugUtilsMessengerCallbackDataEXT
-> DebugUtilsMessengerCallbackDataEXT -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr DebugUtilsMessengerCallbackDataEXT
p DebugUtilsMessengerCallbackDataEXT
x (Ptr DebugUtilsMessengerCallbackDataEXT -> IO b
f Ptr DebugUtilsMessengerCallbackDataEXT
p)
  pokeCStruct :: Ptr DebugUtilsMessengerCallbackDataEXT
-> DebugUtilsMessengerCallbackDataEXT -> IO b -> IO b
pokeCStruct p :: Ptr DebugUtilsMessengerCallbackDataEXT
p DebugUtilsMessengerCallbackDataEXT{..} f :: IO b
f = ContT b IO b -> IO b
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT b IO b -> IO b) -> ContT b IO b -> IO b
forall a b. (a -> b) -> a -> b
$ do
    IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DebugUtilsMessengerCallbackDataEXT
p Ptr DebugUtilsMessengerCallbackDataEXT -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
TYPE_DEBUG_UTILS_MESSENGER_CALLBACK_DATA_EXT)
    IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DebugUtilsMessengerCallbackDataEXT
p Ptr DebugUtilsMessengerCallbackDataEXT -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
    Ptr CChar
messageId'' <- ((Ptr CChar -> IO b) -> IO b) -> ContT b IO (Ptr CChar)
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr CChar -> IO b) -> IO b) -> ContT b IO (Ptr CChar))
-> ((Ptr CChar -> IO b) -> IO b) -> ContT b IO (Ptr CChar)
forall a b. (a -> b) -> a -> b
$ ByteString -> (Ptr CChar -> IO b) -> IO b
forall a. ByteString -> (Ptr CChar -> IO a) -> IO a
useAsCString (ByteString
messageId)
    IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr (Ptr CChar) -> Ptr CChar -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DebugUtilsMessengerCallbackDataEXT
p Ptr DebugUtilsMessengerCallbackDataEXT -> Int -> Ptr (Ptr CChar)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr (Ptr CChar))) Ptr CChar
messageId''
    Ptr CChar
functionName'' <- ((Ptr CChar -> IO b) -> IO b) -> ContT b IO (Ptr CChar)
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr CChar -> IO b) -> IO b) -> ContT b IO (Ptr CChar))
-> ((Ptr CChar -> IO b) -> IO b) -> ContT b IO (Ptr CChar)
forall a b. (a -> b) -> a -> b
$ ByteString -> (Ptr CChar -> IO b) -> IO b
forall a. ByteString -> (Ptr CChar -> IO a) -> IO a
useAsCString (ByteString
functionName)
    IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr (Ptr CChar) -> Ptr CChar -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DebugUtilsMessengerCallbackDataEXT
p Ptr DebugUtilsMessengerCallbackDataEXT -> Int -> Ptr (Ptr CChar)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr (Ptr CChar))) Ptr CChar
functionName''
    Ptr CChar
message'' <- ((Ptr CChar -> IO b) -> IO b) -> ContT b IO (Ptr CChar)
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr CChar -> IO b) -> IO b) -> ContT b IO (Ptr CChar))
-> ((Ptr CChar -> IO b) -> IO b) -> ContT b IO (Ptr CChar)
forall a b. (a -> b) -> a -> b
$ ByteString -> (Ptr CChar -> IO b) -> IO b
forall a. ByteString -> (Ptr CChar -> IO a) -> IO a
useAsCString (ByteString
message)
    IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr (Ptr CChar) -> Ptr CChar -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DebugUtilsMessengerCallbackDataEXT
p Ptr DebugUtilsMessengerCallbackDataEXT -> Int -> Ptr (Ptr CChar)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32 :: Ptr (Ptr CChar))) Ptr CChar
message''
    IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DebugUtilsMessengerCallbackDataEXT
p Ptr DebugUtilsMessengerCallbackDataEXT -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 40 :: Ptr Word32)) (Word32
objectCount)
    IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr (Ptr DebugUtilsObjectNameInfoEXT)
-> Ptr DebugUtilsObjectNameInfoEXT -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DebugUtilsMessengerCallbackDataEXT
p Ptr DebugUtilsMessengerCallbackDataEXT
-> Int -> Ptr (Ptr DebugUtilsObjectNameInfoEXT)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 48 :: Ptr (Ptr DebugUtilsObjectNameInfoEXT))) (Ptr DebugUtilsObjectNameInfoEXT
objects)
    IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DebugUtilsMessengerCallbackDataEXT
p Ptr DebugUtilsMessengerCallbackDataEXT -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 56 :: Ptr Word32)) (Word32
sessionLabelCount)
    IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr ("labelInfo" ::: Ptr ("labelInfo" ::: DebugUtilsLabelEXT))
-> ("labelInfo" ::: Ptr ("labelInfo" ::: DebugUtilsLabelEXT))
-> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DebugUtilsMessengerCallbackDataEXT
p Ptr DebugUtilsMessengerCallbackDataEXT
-> Int
-> Ptr ("labelInfo" ::: Ptr ("labelInfo" ::: DebugUtilsLabelEXT))
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 64 :: Ptr (Ptr DebugUtilsLabelEXT))) ("labelInfo" ::: Ptr ("labelInfo" ::: DebugUtilsLabelEXT)
sessionLabels)
    IO b -> ContT b IO b
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO b -> ContT b IO b) -> IO b -> ContT b IO b
forall a b. (a -> b) -> a -> b
$ IO b
f
  cStructSize :: Int
cStructSize = 72
  cStructAlignment :: Int
cStructAlignment = 8
  pokeZeroCStruct :: Ptr DebugUtilsMessengerCallbackDataEXT -> IO b -> IO b
pokeZeroCStruct p :: Ptr DebugUtilsMessengerCallbackDataEXT
p f :: IO b
f = ContT b IO b -> IO b
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT b IO b -> IO b) -> ContT b IO b -> IO b
forall a b. (a -> b) -> a -> b
$ do
    IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DebugUtilsMessengerCallbackDataEXT
p Ptr DebugUtilsMessengerCallbackDataEXT -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
TYPE_DEBUG_UTILS_MESSENGER_CALLBACK_DATA_EXT)
    IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DebugUtilsMessengerCallbackDataEXT
p Ptr DebugUtilsMessengerCallbackDataEXT -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
    Ptr CChar
messageId'' <- ((Ptr CChar -> IO b) -> IO b) -> ContT b IO (Ptr CChar)
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr CChar -> IO b) -> IO b) -> ContT b IO (Ptr CChar))
-> ((Ptr CChar -> IO b) -> IO b) -> ContT b IO (Ptr CChar)
forall a b. (a -> b) -> a -> b
$ ByteString -> (Ptr CChar -> IO b) -> IO b
forall a. ByteString -> (Ptr CChar -> IO a) -> IO a
useAsCString (ByteString
forall a. Monoid a => a
mempty)
    IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr (Ptr CChar) -> Ptr CChar -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DebugUtilsMessengerCallbackDataEXT
p Ptr DebugUtilsMessengerCallbackDataEXT -> Int -> Ptr (Ptr CChar)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr (Ptr CChar))) Ptr CChar
messageId''
    Ptr CChar
functionName'' <- ((Ptr CChar -> IO b) -> IO b) -> ContT b IO (Ptr CChar)
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr CChar -> IO b) -> IO b) -> ContT b IO (Ptr CChar))
-> ((Ptr CChar -> IO b) -> IO b) -> ContT b IO (Ptr CChar)
forall a b. (a -> b) -> a -> b
$ ByteString -> (Ptr CChar -> IO b) -> IO b
forall a. ByteString -> (Ptr CChar -> IO a) -> IO a
useAsCString (ByteString
forall a. Monoid a => a
mempty)
    IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr (Ptr CChar) -> Ptr CChar -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DebugUtilsMessengerCallbackDataEXT
p Ptr DebugUtilsMessengerCallbackDataEXT -> Int -> Ptr (Ptr CChar)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr (Ptr CChar))) Ptr CChar
functionName''
    Ptr CChar
message'' <- ((Ptr CChar -> IO b) -> IO b) -> ContT b IO (Ptr CChar)
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr CChar -> IO b) -> IO b) -> ContT b IO (Ptr CChar))
-> ((Ptr CChar -> IO b) -> IO b) -> ContT b IO (Ptr CChar)
forall a b. (a -> b) -> a -> b
$ ByteString -> (Ptr CChar -> IO b) -> IO b
forall a. ByteString -> (Ptr CChar -> IO a) -> IO a
useAsCString (ByteString
forall a. Monoid a => a
mempty)
    IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr (Ptr CChar) -> Ptr CChar -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DebugUtilsMessengerCallbackDataEXT
p Ptr DebugUtilsMessengerCallbackDataEXT -> Int -> Ptr (Ptr CChar)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32 :: Ptr (Ptr CChar))) Ptr CChar
message''
    IO b -> ContT b IO b
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO b -> ContT b IO b) -> IO b -> ContT b IO b
forall a b. (a -> b) -> a -> b
$ IO b
f

instance FromCStruct DebugUtilsMessengerCallbackDataEXT where
  peekCStruct :: Ptr DebugUtilsMessengerCallbackDataEXT
-> IO DebugUtilsMessengerCallbackDataEXT
peekCStruct p :: Ptr DebugUtilsMessengerCallbackDataEXT
p = do
    ByteString
messageId <- Ptr CChar -> IO ByteString
packCString (Ptr CChar -> IO ByteString) -> IO (Ptr CChar) -> IO ByteString
forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
=<< Ptr (Ptr CChar) -> IO (Ptr CChar)
forall a. Storable a => Ptr a -> IO a
peek ((Ptr DebugUtilsMessengerCallbackDataEXT
p Ptr DebugUtilsMessengerCallbackDataEXT -> Int -> Ptr (Ptr CChar)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr (Ptr CChar)))
    ByteString
functionName <- Ptr CChar -> IO ByteString
packCString (Ptr CChar -> IO ByteString) -> IO (Ptr CChar) -> IO ByteString
forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
=<< Ptr (Ptr CChar) -> IO (Ptr CChar)
forall a. Storable a => Ptr a -> IO a
peek ((Ptr DebugUtilsMessengerCallbackDataEXT
p Ptr DebugUtilsMessengerCallbackDataEXT -> Int -> Ptr (Ptr CChar)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr (Ptr CChar)))
    ByteString
message <- Ptr CChar -> IO ByteString
packCString (Ptr CChar -> IO ByteString) -> IO (Ptr CChar) -> IO ByteString
forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
=<< Ptr (Ptr CChar) -> IO (Ptr CChar)
forall a. Storable a => Ptr a -> IO a
peek ((Ptr DebugUtilsMessengerCallbackDataEXT
p Ptr DebugUtilsMessengerCallbackDataEXT -> Int -> Ptr (Ptr CChar)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32 :: Ptr (Ptr CChar)))
    Word32
objectCount <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr DebugUtilsMessengerCallbackDataEXT
p Ptr DebugUtilsMessengerCallbackDataEXT -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 40 :: Ptr Word32))
    Ptr DebugUtilsObjectNameInfoEXT
objects <- Ptr (Ptr DebugUtilsObjectNameInfoEXT)
-> IO (Ptr DebugUtilsObjectNameInfoEXT)
forall a. Storable a => Ptr a -> IO a
peek @(Ptr DebugUtilsObjectNameInfoEXT) ((Ptr DebugUtilsMessengerCallbackDataEXT
p Ptr DebugUtilsMessengerCallbackDataEXT
-> Int -> Ptr (Ptr DebugUtilsObjectNameInfoEXT)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 48 :: Ptr (Ptr DebugUtilsObjectNameInfoEXT)))
    Word32
sessionLabelCount <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr DebugUtilsMessengerCallbackDataEXT
p Ptr DebugUtilsMessengerCallbackDataEXT -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 56 :: Ptr Word32))
    "labelInfo" ::: Ptr ("labelInfo" ::: DebugUtilsLabelEXT)
sessionLabels <- Ptr ("labelInfo" ::: Ptr ("labelInfo" ::: DebugUtilsLabelEXT))
-> IO ("labelInfo" ::: Ptr ("labelInfo" ::: DebugUtilsLabelEXT))
forall a. Storable a => Ptr a -> IO a
peek @(Ptr DebugUtilsLabelEXT) ((Ptr DebugUtilsMessengerCallbackDataEXT
p Ptr DebugUtilsMessengerCallbackDataEXT
-> Int
-> Ptr ("labelInfo" ::: Ptr ("labelInfo" ::: DebugUtilsLabelEXT))
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 64 :: Ptr (Ptr DebugUtilsLabelEXT)))
    DebugUtilsMessengerCallbackDataEXT
-> IO DebugUtilsMessengerCallbackDataEXT
forall (f :: * -> *) a. Applicative f => a -> f a
pure (DebugUtilsMessengerCallbackDataEXT
 -> IO DebugUtilsMessengerCallbackDataEXT)
-> DebugUtilsMessengerCallbackDataEXT
-> IO DebugUtilsMessengerCallbackDataEXT
forall a b. (a -> b) -> a -> b
$ ByteString
-> ByteString
-> ByteString
-> Word32
-> Ptr DebugUtilsObjectNameInfoEXT
-> Word32
-> ("labelInfo" ::: Ptr ("labelInfo" ::: DebugUtilsLabelEXT))
-> DebugUtilsMessengerCallbackDataEXT
DebugUtilsMessengerCallbackDataEXT
             ByteString
messageId ByteString
functionName ByteString
message Word32
objectCount Ptr DebugUtilsObjectNameInfoEXT
objects Word32
sessionLabelCount "labelInfo" ::: Ptr ("labelInfo" ::: DebugUtilsLabelEXT)
sessionLabels

instance Zero DebugUtilsMessengerCallbackDataEXT where
  zero :: DebugUtilsMessengerCallbackDataEXT
zero = ByteString
-> ByteString
-> ByteString
-> Word32
-> Ptr DebugUtilsObjectNameInfoEXT
-> Word32
-> ("labelInfo" ::: Ptr ("labelInfo" ::: DebugUtilsLabelEXT))
-> DebugUtilsMessengerCallbackDataEXT
DebugUtilsMessengerCallbackDataEXT
           ByteString
forall a. Monoid a => a
mempty
           ByteString
forall a. Monoid a => a
mempty
           ByteString
forall a. Monoid a => a
mempty
           Word32
forall a. Zero a => a
zero
           Ptr DebugUtilsObjectNameInfoEXT
forall a. Zero a => a
zero
           Word32
forall a. Zero a => a
zero
           "labelInfo" ::: Ptr ("labelInfo" ::: DebugUtilsLabelEXT)
forall a. Zero a => a
zero


-- | XrDebugUtilsMessengerCreateInfoEXT - Debug utils messenger create info
--
-- == Valid Usage
--
-- -   @userCallback@ /must/ be a valid
--     PFN_xrDebugUtilsMessengerCallbackEXT
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-XrDebugUtilsMessengerCreateInfoEXT-extension-notenabled# The
--     @@ extension /must/ be enabled prior to using
--     'DebugUtilsMessengerCreateInfoEXT'
--
-- -   #VUID-XrDebugUtilsMessengerCreateInfoEXT-type-type# @type@ /must/ be
--     'OpenXR.Core10.Enums.StructureType.TYPE_DEBUG_UTILS_MESSENGER_CREATE_INFO_EXT'
--
-- -   #VUID-XrDebugUtilsMessengerCreateInfoEXT-next-next# @next@ /must/ be
--     @NULL@ or a valid pointer to the
--     <https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#valid-usage-for-structure-pointer-chains next structure in a structure chain>
--
-- -   #VUID-XrDebugUtilsMessengerCreateInfoEXT-messageSeverities-parameter#
--     @messageSeverities@ /must/ be a valid combination of
--     <https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XrDebugUtilsMessageSeverityFlagBitsEXT XrDebugUtilsMessageSeverityFlagBitsEXT>
--     values
--
-- -   #VUID-XrDebugUtilsMessengerCreateInfoEXT-messageSeverities-requiredbitmask#
--     @messageSeverities@ /must/ not be @0@
--
-- -   #VUID-XrDebugUtilsMessengerCreateInfoEXT-messageTypes-parameter#
--     @messageTypes@ /must/ be a valid combination of
--     <https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XrDebugUtilsMessageTypeFlagBitsEXT XrDebugUtilsMessageTypeFlagBitsEXT>
--     values
--
-- -   #VUID-XrDebugUtilsMessengerCreateInfoEXT-messageTypes-requiredbitmask#
--     @messageTypes@ /must/ not be @0@
--
-- -   #VUID-XrDebugUtilsMessengerCreateInfoEXT-userCallback-parameter#
--     @userCallback@ /must/ be a valid
--     'PFN_xrDebugUtilsMessengerCallbackEXT' value
--
-- For each 'OpenXR.Extensions.Handles.DebugUtilsMessengerEXT' that is
-- created the 'DebugUtilsMessengerCreateInfoEXT'::@messageSeverities@ and
-- 'DebugUtilsMessengerCreateInfoEXT'::@messageTypes@ determine when that
-- 'DebugUtilsMessengerCreateInfoEXT'::@userCallback@ is called. The
-- process to determine if the user’s userCallback is triggered when an
-- event occurs is as follows:
--
-- -   The runtime will perform a bitwise AND of the event’s
--     <https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XrDebugUtilsMessageSeverityFlagBitsEXT XrDebugUtilsMessageSeverityFlagBitsEXT>
--     with the 'DebugUtilsMessengerCreateInfoEXT'::@messageSeverities@
--     provided during creation of the
--     'OpenXR.Extensions.Handles.DebugUtilsMessengerEXT' object.
--
-- -   If this results in @0@, the message is skipped.
--
-- -   The runtime will perform bitwise AND of the event’s
--     <https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XrDebugUtilsMessageTypeFlagBitsEXT XrDebugUtilsMessageTypeFlagBitsEXT>
--     with the 'DebugUtilsMessengerCreateInfoEXT'::@messageTypes@ provided
--     during the creation of the
--     'OpenXR.Extensions.Handles.DebugUtilsMessengerEXT' object.
--
-- -   If this results in @0@, the message is skipped.
--
-- -   If the message of the current event is not skipped, the callback
--     will be called with the message.
--
-- The callback will come directly from the component that detected the
-- event, unless some other layer intercepts the calls for its own purposes
-- (filter them in a different way, log to a system error log, etc.).
--
-- = See Also
--
-- 'PFN_xrDebugUtilsMessengerCallbackEXT',
-- 'DebugUtilsMessageSeverityFlagsEXT', 'DebugUtilsMessageTypeFlagsEXT',
-- 'OpenXR.Core10.Enums.StructureType.StructureType',
-- 'createDebugUtilsMessengerEXT'
data DebugUtilsMessengerCreateInfoEXT = DebugUtilsMessengerCreateInfoEXT
  { -- | @messageSeverities@ is a bitmask of
    -- <https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XrDebugUtilsMessageSeverityFlagBitsEXT XrDebugUtilsMessageSeverityFlagBitsEXT>
    -- specifying which severity of event(s) that will cause this callback to
    -- be called.
    DebugUtilsMessengerCreateInfoEXT
-> DebugUtilsMessageSeverityFlagsEXT
messageSeverities :: DebugUtilsMessageSeverityFlagsEXT
  , -- | @messageTypes@ is a combination of
    -- <https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XrDebugUtilsMessageTypeFlagBitsEXT XrDebugUtilsMessageTypeFlagBitsEXT>
    -- specifying which type of event(s) will cause this callback to be called.
    DebugUtilsMessengerCreateInfoEXT
-> "messageTypes" ::: DebugUtilsMessageTypeFlagsEXT
messageTypes :: DebugUtilsMessageTypeFlagsEXT
  , -- | @userCallback@ is the application defined callback function to call.
    DebugUtilsMessengerCreateInfoEXT
-> PFN_xrDebugUtilsMessengerCallbackEXT
userCallback :: PFN_xrDebugUtilsMessengerCallbackEXT
  , -- | @userData@ is arbitrary user data to be passed to the callback.
    DebugUtilsMessengerCreateInfoEXT -> Ptr ()
userData :: Ptr ()
  }
  deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (DebugUtilsMessengerCreateInfoEXT)
#endif
deriving instance Show DebugUtilsMessengerCreateInfoEXT

instance ToCStruct DebugUtilsMessengerCreateInfoEXT where
  withCStruct :: DebugUtilsMessengerCreateInfoEXT
-> (Ptr DebugUtilsMessengerCreateInfoEXT -> IO b) -> IO b
withCStruct x :: DebugUtilsMessengerCreateInfoEXT
x f :: Ptr DebugUtilsMessengerCreateInfoEXT -> IO b
f = Int
-> Int -> (Ptr DebugUtilsMessengerCreateInfoEXT -> IO b) -> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 40 8 ((Ptr DebugUtilsMessengerCreateInfoEXT -> IO b) -> IO b)
-> (Ptr DebugUtilsMessengerCreateInfoEXT -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \p :: Ptr DebugUtilsMessengerCreateInfoEXT
p -> Ptr DebugUtilsMessengerCreateInfoEXT
-> DebugUtilsMessengerCreateInfoEXT -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr DebugUtilsMessengerCreateInfoEXT
p DebugUtilsMessengerCreateInfoEXT
x (Ptr DebugUtilsMessengerCreateInfoEXT -> IO b
f Ptr DebugUtilsMessengerCreateInfoEXT
p)
  pokeCStruct :: Ptr DebugUtilsMessengerCreateInfoEXT
-> DebugUtilsMessengerCreateInfoEXT -> IO b -> IO b
pokeCStruct p :: Ptr DebugUtilsMessengerCreateInfoEXT
p DebugUtilsMessengerCreateInfoEXT{..} f :: IO b
f = do
    Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DebugUtilsMessengerCreateInfoEXT
p Ptr DebugUtilsMessengerCreateInfoEXT -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
TYPE_DEBUG_UTILS_MESSENGER_CREATE_INFO_EXT)
    Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DebugUtilsMessengerCreateInfoEXT
p Ptr DebugUtilsMessengerCreateInfoEXT -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
    Ptr DebugUtilsMessageSeverityFlagsEXT
-> DebugUtilsMessageSeverityFlagsEXT -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DebugUtilsMessengerCreateInfoEXT
p Ptr DebugUtilsMessengerCreateInfoEXT
-> Int -> Ptr DebugUtilsMessageSeverityFlagsEXT
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr DebugUtilsMessageSeverityFlagsEXT)) (DebugUtilsMessageSeverityFlagsEXT
messageSeverities)
    Ptr ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DebugUtilsMessengerCreateInfoEXT
p Ptr DebugUtilsMessengerCreateInfoEXT
-> Int -> Ptr ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 20 :: Ptr DebugUtilsMessageTypeFlagsEXT)) ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT
messageTypes)
    Ptr PFN_xrDebugUtilsMessengerCallbackEXT
-> PFN_xrDebugUtilsMessengerCallbackEXT -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DebugUtilsMessengerCreateInfoEXT
p Ptr DebugUtilsMessengerCreateInfoEXT
-> Int -> Ptr PFN_xrDebugUtilsMessengerCallbackEXT
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr PFN_xrDebugUtilsMessengerCallbackEXT)) (PFN_xrDebugUtilsMessengerCallbackEXT
userCallback)
    Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DebugUtilsMessengerCreateInfoEXT
p Ptr DebugUtilsMessengerCreateInfoEXT -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32 :: Ptr (Ptr ()))) (Ptr ()
userData)
    IO b
f
  cStructSize :: Int
cStructSize = 40
  cStructAlignment :: Int
cStructAlignment = 8
  pokeZeroCStruct :: Ptr DebugUtilsMessengerCreateInfoEXT -> IO b -> IO b
pokeZeroCStruct p :: Ptr DebugUtilsMessengerCreateInfoEXT
p f :: IO b
f = do
    Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DebugUtilsMessengerCreateInfoEXT
p Ptr DebugUtilsMessengerCreateInfoEXT -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
TYPE_DEBUG_UTILS_MESSENGER_CREATE_INFO_EXT)
    Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DebugUtilsMessengerCreateInfoEXT
p Ptr DebugUtilsMessengerCreateInfoEXT -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
    Ptr DebugUtilsMessageSeverityFlagsEXT
-> DebugUtilsMessageSeverityFlagsEXT -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DebugUtilsMessengerCreateInfoEXT
p Ptr DebugUtilsMessengerCreateInfoEXT
-> Int -> Ptr DebugUtilsMessageSeverityFlagsEXT
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr DebugUtilsMessageSeverityFlagsEXT)) (DebugUtilsMessageSeverityFlagsEXT
forall a. Zero a => a
zero)
    Ptr ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DebugUtilsMessengerCreateInfoEXT
p Ptr DebugUtilsMessengerCreateInfoEXT
-> Int -> Ptr ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 20 :: Ptr DebugUtilsMessageTypeFlagsEXT)) ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT
forall a. Zero a => a
zero)
    Ptr PFN_xrDebugUtilsMessengerCallbackEXT
-> PFN_xrDebugUtilsMessengerCallbackEXT -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DebugUtilsMessengerCreateInfoEXT
p Ptr DebugUtilsMessengerCreateInfoEXT
-> Int -> Ptr PFN_xrDebugUtilsMessengerCallbackEXT
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr PFN_xrDebugUtilsMessengerCallbackEXT)) (PFN_xrDebugUtilsMessengerCallbackEXT
forall a. Zero a => a
zero)
    IO b
f

instance FromCStruct DebugUtilsMessengerCreateInfoEXT where
  peekCStruct :: Ptr DebugUtilsMessengerCreateInfoEXT
-> IO DebugUtilsMessengerCreateInfoEXT
peekCStruct p :: Ptr DebugUtilsMessengerCreateInfoEXT
p = do
    DebugUtilsMessageSeverityFlagsEXT
messageSeverities <- Ptr DebugUtilsMessageSeverityFlagsEXT
-> IO DebugUtilsMessageSeverityFlagsEXT
forall a. Storable a => Ptr a -> IO a
peek @DebugUtilsMessageSeverityFlagsEXT ((Ptr DebugUtilsMessengerCreateInfoEXT
p Ptr DebugUtilsMessengerCreateInfoEXT
-> Int -> Ptr DebugUtilsMessageSeverityFlagsEXT
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr DebugUtilsMessageSeverityFlagsEXT))
    "messageTypes" ::: DebugUtilsMessageTypeFlagsEXT
messageTypes <- Ptr ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> IO ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
forall a. Storable a => Ptr a -> IO a
peek @DebugUtilsMessageTypeFlagsEXT ((Ptr DebugUtilsMessengerCreateInfoEXT
p Ptr DebugUtilsMessengerCreateInfoEXT
-> Int -> Ptr ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 20 :: Ptr DebugUtilsMessageTypeFlagsEXT))
    PFN_xrDebugUtilsMessengerCallbackEXT
userCallback <- Ptr PFN_xrDebugUtilsMessengerCallbackEXT
-> IO PFN_xrDebugUtilsMessengerCallbackEXT
forall a. Storable a => Ptr a -> IO a
peek @PFN_xrDebugUtilsMessengerCallbackEXT ((Ptr DebugUtilsMessengerCreateInfoEXT
p Ptr DebugUtilsMessengerCreateInfoEXT
-> Int -> Ptr PFN_xrDebugUtilsMessengerCallbackEXT
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr PFN_xrDebugUtilsMessengerCallbackEXT))
    Ptr ()
userData <- Ptr (Ptr ()) -> IO (Ptr ())
forall a. Storable a => Ptr a -> IO a
peek @(Ptr ()) ((Ptr DebugUtilsMessengerCreateInfoEXT
p Ptr DebugUtilsMessengerCreateInfoEXT -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32 :: Ptr (Ptr ())))
    DebugUtilsMessengerCreateInfoEXT
-> IO DebugUtilsMessengerCreateInfoEXT
forall (f :: * -> *) a. Applicative f => a -> f a
pure (DebugUtilsMessengerCreateInfoEXT
 -> IO DebugUtilsMessengerCreateInfoEXT)
-> DebugUtilsMessengerCreateInfoEXT
-> IO DebugUtilsMessengerCreateInfoEXT
forall a b. (a -> b) -> a -> b
$ DebugUtilsMessageSeverityFlagsEXT
-> ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> PFN_xrDebugUtilsMessengerCallbackEXT
-> Ptr ()
-> DebugUtilsMessengerCreateInfoEXT
DebugUtilsMessengerCreateInfoEXT
             DebugUtilsMessageSeverityFlagsEXT
messageSeverities "messageTypes" ::: DebugUtilsMessageTypeFlagsEXT
messageTypes PFN_xrDebugUtilsMessengerCallbackEXT
userCallback Ptr ()
userData

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

instance Zero DebugUtilsMessengerCreateInfoEXT where
  zero :: DebugUtilsMessengerCreateInfoEXT
zero = DebugUtilsMessageSeverityFlagsEXT
-> ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> PFN_xrDebugUtilsMessengerCallbackEXT
-> Ptr ()
-> DebugUtilsMessengerCreateInfoEXT
DebugUtilsMessengerCreateInfoEXT
           DebugUtilsMessageSeverityFlagsEXT
forall a. Zero a => a
zero
           "messageTypes" ::: DebugUtilsMessageTypeFlagsEXT
forall a. Zero a => a
zero
           PFN_xrDebugUtilsMessengerCallbackEXT
forall a. Zero a => a
zero
           Ptr ()
forall a. Zero a => a
zero


-- | XrDebugUtilsMessageSeverityFlagsEXT -
-- XrDebugUtilsMessageSeverityFlagsEXT
--
-- = See Also
--
-- 'DebugUtilsMessengerCreateInfoEXT', 'submitDebugUtilsMessageEXT'
newtype DebugUtilsMessageSeverityFlagsEXT = DebugUtilsMessageSeverityFlagsEXT Flags64
  deriving newtype (DebugUtilsMessageSeverityFlagsEXT
-> DebugUtilsMessageSeverityFlagsEXT -> Bool
(DebugUtilsMessageSeverityFlagsEXT
 -> DebugUtilsMessageSeverityFlagsEXT -> Bool)
-> (DebugUtilsMessageSeverityFlagsEXT
    -> DebugUtilsMessageSeverityFlagsEXT -> Bool)
-> Eq DebugUtilsMessageSeverityFlagsEXT
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DebugUtilsMessageSeverityFlagsEXT
-> DebugUtilsMessageSeverityFlagsEXT -> Bool
$c/= :: DebugUtilsMessageSeverityFlagsEXT
-> DebugUtilsMessageSeverityFlagsEXT -> Bool
== :: DebugUtilsMessageSeverityFlagsEXT
-> DebugUtilsMessageSeverityFlagsEXT -> Bool
$c== :: DebugUtilsMessageSeverityFlagsEXT
-> DebugUtilsMessageSeverityFlagsEXT -> Bool
Eq, Eq DebugUtilsMessageSeverityFlagsEXT
Eq DebugUtilsMessageSeverityFlagsEXT =>
(DebugUtilsMessageSeverityFlagsEXT
 -> DebugUtilsMessageSeverityFlagsEXT -> Ordering)
-> (DebugUtilsMessageSeverityFlagsEXT
    -> DebugUtilsMessageSeverityFlagsEXT -> Bool)
-> (DebugUtilsMessageSeverityFlagsEXT
    -> DebugUtilsMessageSeverityFlagsEXT -> Bool)
-> (DebugUtilsMessageSeverityFlagsEXT
    -> DebugUtilsMessageSeverityFlagsEXT -> Bool)
-> (DebugUtilsMessageSeverityFlagsEXT
    -> DebugUtilsMessageSeverityFlagsEXT -> Bool)
-> (DebugUtilsMessageSeverityFlagsEXT
    -> DebugUtilsMessageSeverityFlagsEXT
    -> DebugUtilsMessageSeverityFlagsEXT)
-> (DebugUtilsMessageSeverityFlagsEXT
    -> DebugUtilsMessageSeverityFlagsEXT
    -> DebugUtilsMessageSeverityFlagsEXT)
-> Ord DebugUtilsMessageSeverityFlagsEXT
DebugUtilsMessageSeverityFlagsEXT
-> DebugUtilsMessageSeverityFlagsEXT -> Bool
DebugUtilsMessageSeverityFlagsEXT
-> DebugUtilsMessageSeverityFlagsEXT -> Ordering
DebugUtilsMessageSeverityFlagsEXT
-> DebugUtilsMessageSeverityFlagsEXT
-> DebugUtilsMessageSeverityFlagsEXT
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 :: DebugUtilsMessageSeverityFlagsEXT
-> DebugUtilsMessageSeverityFlagsEXT
-> DebugUtilsMessageSeverityFlagsEXT
$cmin :: DebugUtilsMessageSeverityFlagsEXT
-> DebugUtilsMessageSeverityFlagsEXT
-> DebugUtilsMessageSeverityFlagsEXT
max :: DebugUtilsMessageSeverityFlagsEXT
-> DebugUtilsMessageSeverityFlagsEXT
-> DebugUtilsMessageSeverityFlagsEXT
$cmax :: DebugUtilsMessageSeverityFlagsEXT
-> DebugUtilsMessageSeverityFlagsEXT
-> DebugUtilsMessageSeverityFlagsEXT
>= :: DebugUtilsMessageSeverityFlagsEXT
-> DebugUtilsMessageSeverityFlagsEXT -> Bool
$c>= :: DebugUtilsMessageSeverityFlagsEXT
-> DebugUtilsMessageSeverityFlagsEXT -> Bool
> :: DebugUtilsMessageSeverityFlagsEXT
-> DebugUtilsMessageSeverityFlagsEXT -> Bool
$c> :: DebugUtilsMessageSeverityFlagsEXT
-> DebugUtilsMessageSeverityFlagsEXT -> Bool
<= :: DebugUtilsMessageSeverityFlagsEXT
-> DebugUtilsMessageSeverityFlagsEXT -> Bool
$c<= :: DebugUtilsMessageSeverityFlagsEXT
-> DebugUtilsMessageSeverityFlagsEXT -> Bool
< :: DebugUtilsMessageSeverityFlagsEXT
-> DebugUtilsMessageSeverityFlagsEXT -> Bool
$c< :: DebugUtilsMessageSeverityFlagsEXT
-> DebugUtilsMessageSeverityFlagsEXT -> Bool
compare :: DebugUtilsMessageSeverityFlagsEXT
-> DebugUtilsMessageSeverityFlagsEXT -> Ordering
$ccompare :: DebugUtilsMessageSeverityFlagsEXT
-> DebugUtilsMessageSeverityFlagsEXT -> Ordering
$cp1Ord :: Eq DebugUtilsMessageSeverityFlagsEXT
Ord, Ptr b -> Int -> IO DebugUtilsMessageSeverityFlagsEXT
Ptr b -> Int -> DebugUtilsMessageSeverityFlagsEXT -> IO ()
Ptr DebugUtilsMessageSeverityFlagsEXT
-> IO DebugUtilsMessageSeverityFlagsEXT
Ptr DebugUtilsMessageSeverityFlagsEXT
-> Int -> IO DebugUtilsMessageSeverityFlagsEXT
Ptr DebugUtilsMessageSeverityFlagsEXT
-> Int -> DebugUtilsMessageSeverityFlagsEXT -> IO ()
Ptr DebugUtilsMessageSeverityFlagsEXT
-> DebugUtilsMessageSeverityFlagsEXT -> IO ()
DebugUtilsMessageSeverityFlagsEXT -> Int
(DebugUtilsMessageSeverityFlagsEXT -> Int)
-> (DebugUtilsMessageSeverityFlagsEXT -> Int)
-> (Ptr DebugUtilsMessageSeverityFlagsEXT
    -> Int -> IO DebugUtilsMessageSeverityFlagsEXT)
-> (Ptr DebugUtilsMessageSeverityFlagsEXT
    -> Int -> DebugUtilsMessageSeverityFlagsEXT -> IO ())
-> (forall b. Ptr b -> Int -> IO DebugUtilsMessageSeverityFlagsEXT)
-> (forall b.
    Ptr b -> Int -> DebugUtilsMessageSeverityFlagsEXT -> IO ())
-> (Ptr DebugUtilsMessageSeverityFlagsEXT
    -> IO DebugUtilsMessageSeverityFlagsEXT)
-> (Ptr DebugUtilsMessageSeverityFlagsEXT
    -> DebugUtilsMessageSeverityFlagsEXT -> IO ())
-> Storable DebugUtilsMessageSeverityFlagsEXT
forall b. Ptr b -> Int -> IO DebugUtilsMessageSeverityFlagsEXT
forall b.
Ptr b -> Int -> DebugUtilsMessageSeverityFlagsEXT -> 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 DebugUtilsMessageSeverityFlagsEXT
-> DebugUtilsMessageSeverityFlagsEXT -> IO ()
$cpoke :: Ptr DebugUtilsMessageSeverityFlagsEXT
-> DebugUtilsMessageSeverityFlagsEXT -> IO ()
peek :: Ptr DebugUtilsMessageSeverityFlagsEXT
-> IO DebugUtilsMessageSeverityFlagsEXT
$cpeek :: Ptr DebugUtilsMessageSeverityFlagsEXT
-> IO DebugUtilsMessageSeverityFlagsEXT
pokeByteOff :: Ptr b -> Int -> DebugUtilsMessageSeverityFlagsEXT -> IO ()
$cpokeByteOff :: forall b.
Ptr b -> Int -> DebugUtilsMessageSeverityFlagsEXT -> IO ()
peekByteOff :: Ptr b -> Int -> IO DebugUtilsMessageSeverityFlagsEXT
$cpeekByteOff :: forall b. Ptr b -> Int -> IO DebugUtilsMessageSeverityFlagsEXT
pokeElemOff :: Ptr DebugUtilsMessageSeverityFlagsEXT
-> Int -> DebugUtilsMessageSeverityFlagsEXT -> IO ()
$cpokeElemOff :: Ptr DebugUtilsMessageSeverityFlagsEXT
-> Int -> DebugUtilsMessageSeverityFlagsEXT -> IO ()
peekElemOff :: Ptr DebugUtilsMessageSeverityFlagsEXT
-> Int -> IO DebugUtilsMessageSeverityFlagsEXT
$cpeekElemOff :: Ptr DebugUtilsMessageSeverityFlagsEXT
-> Int -> IO DebugUtilsMessageSeverityFlagsEXT
alignment :: DebugUtilsMessageSeverityFlagsEXT -> Int
$calignment :: DebugUtilsMessageSeverityFlagsEXT -> Int
sizeOf :: DebugUtilsMessageSeverityFlagsEXT -> Int
$csizeOf :: DebugUtilsMessageSeverityFlagsEXT -> Int
Storable, DebugUtilsMessageSeverityFlagsEXT
DebugUtilsMessageSeverityFlagsEXT
-> Zero DebugUtilsMessageSeverityFlagsEXT
forall a. a -> Zero a
zero :: DebugUtilsMessageSeverityFlagsEXT
$czero :: DebugUtilsMessageSeverityFlagsEXT
Zero, Eq DebugUtilsMessageSeverityFlagsEXT
DebugUtilsMessageSeverityFlagsEXT
Eq DebugUtilsMessageSeverityFlagsEXT =>
(DebugUtilsMessageSeverityFlagsEXT
 -> DebugUtilsMessageSeverityFlagsEXT
 -> DebugUtilsMessageSeverityFlagsEXT)
-> (DebugUtilsMessageSeverityFlagsEXT
    -> DebugUtilsMessageSeverityFlagsEXT
    -> DebugUtilsMessageSeverityFlagsEXT)
-> (DebugUtilsMessageSeverityFlagsEXT
    -> DebugUtilsMessageSeverityFlagsEXT
    -> DebugUtilsMessageSeverityFlagsEXT)
-> (DebugUtilsMessageSeverityFlagsEXT
    -> DebugUtilsMessageSeverityFlagsEXT)
-> (DebugUtilsMessageSeverityFlagsEXT
    -> Int -> DebugUtilsMessageSeverityFlagsEXT)
-> (DebugUtilsMessageSeverityFlagsEXT
    -> Int -> DebugUtilsMessageSeverityFlagsEXT)
-> DebugUtilsMessageSeverityFlagsEXT
-> (Int -> DebugUtilsMessageSeverityFlagsEXT)
-> (DebugUtilsMessageSeverityFlagsEXT
    -> Int -> DebugUtilsMessageSeverityFlagsEXT)
-> (DebugUtilsMessageSeverityFlagsEXT
    -> Int -> DebugUtilsMessageSeverityFlagsEXT)
-> (DebugUtilsMessageSeverityFlagsEXT
    -> Int -> DebugUtilsMessageSeverityFlagsEXT)
-> (DebugUtilsMessageSeverityFlagsEXT -> Int -> Bool)
-> (DebugUtilsMessageSeverityFlagsEXT -> Maybe Int)
-> (DebugUtilsMessageSeverityFlagsEXT -> Int)
-> (DebugUtilsMessageSeverityFlagsEXT -> Bool)
-> (DebugUtilsMessageSeverityFlagsEXT
    -> Int -> DebugUtilsMessageSeverityFlagsEXT)
-> (DebugUtilsMessageSeverityFlagsEXT
    -> Int -> DebugUtilsMessageSeverityFlagsEXT)
-> (DebugUtilsMessageSeverityFlagsEXT
    -> Int -> DebugUtilsMessageSeverityFlagsEXT)
-> (DebugUtilsMessageSeverityFlagsEXT
    -> Int -> DebugUtilsMessageSeverityFlagsEXT)
-> (DebugUtilsMessageSeverityFlagsEXT
    -> Int -> DebugUtilsMessageSeverityFlagsEXT)
-> (DebugUtilsMessageSeverityFlagsEXT
    -> Int -> DebugUtilsMessageSeverityFlagsEXT)
-> (DebugUtilsMessageSeverityFlagsEXT -> Int)
-> Bits DebugUtilsMessageSeverityFlagsEXT
Int -> DebugUtilsMessageSeverityFlagsEXT
DebugUtilsMessageSeverityFlagsEXT -> Bool
DebugUtilsMessageSeverityFlagsEXT -> Int
DebugUtilsMessageSeverityFlagsEXT -> Maybe Int
DebugUtilsMessageSeverityFlagsEXT
-> DebugUtilsMessageSeverityFlagsEXT
DebugUtilsMessageSeverityFlagsEXT -> Int -> Bool
DebugUtilsMessageSeverityFlagsEXT
-> Int -> DebugUtilsMessageSeverityFlagsEXT
DebugUtilsMessageSeverityFlagsEXT
-> DebugUtilsMessageSeverityFlagsEXT
-> DebugUtilsMessageSeverityFlagsEXT
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 :: DebugUtilsMessageSeverityFlagsEXT -> Int
$cpopCount :: DebugUtilsMessageSeverityFlagsEXT -> Int
rotateR :: DebugUtilsMessageSeverityFlagsEXT
-> Int -> DebugUtilsMessageSeverityFlagsEXT
$crotateR :: DebugUtilsMessageSeverityFlagsEXT
-> Int -> DebugUtilsMessageSeverityFlagsEXT
rotateL :: DebugUtilsMessageSeverityFlagsEXT
-> Int -> DebugUtilsMessageSeverityFlagsEXT
$crotateL :: DebugUtilsMessageSeverityFlagsEXT
-> Int -> DebugUtilsMessageSeverityFlagsEXT
unsafeShiftR :: DebugUtilsMessageSeverityFlagsEXT
-> Int -> DebugUtilsMessageSeverityFlagsEXT
$cunsafeShiftR :: DebugUtilsMessageSeverityFlagsEXT
-> Int -> DebugUtilsMessageSeverityFlagsEXT
shiftR :: DebugUtilsMessageSeverityFlagsEXT
-> Int -> DebugUtilsMessageSeverityFlagsEXT
$cshiftR :: DebugUtilsMessageSeverityFlagsEXT
-> Int -> DebugUtilsMessageSeverityFlagsEXT
unsafeShiftL :: DebugUtilsMessageSeverityFlagsEXT
-> Int -> DebugUtilsMessageSeverityFlagsEXT
$cunsafeShiftL :: DebugUtilsMessageSeverityFlagsEXT
-> Int -> DebugUtilsMessageSeverityFlagsEXT
shiftL :: DebugUtilsMessageSeverityFlagsEXT
-> Int -> DebugUtilsMessageSeverityFlagsEXT
$cshiftL :: DebugUtilsMessageSeverityFlagsEXT
-> Int -> DebugUtilsMessageSeverityFlagsEXT
isSigned :: DebugUtilsMessageSeverityFlagsEXT -> Bool
$cisSigned :: DebugUtilsMessageSeverityFlagsEXT -> Bool
bitSize :: DebugUtilsMessageSeverityFlagsEXT -> Int
$cbitSize :: DebugUtilsMessageSeverityFlagsEXT -> Int
bitSizeMaybe :: DebugUtilsMessageSeverityFlagsEXT -> Maybe Int
$cbitSizeMaybe :: DebugUtilsMessageSeverityFlagsEXT -> Maybe Int
testBit :: DebugUtilsMessageSeverityFlagsEXT -> Int -> Bool
$ctestBit :: DebugUtilsMessageSeverityFlagsEXT -> Int -> Bool
complementBit :: DebugUtilsMessageSeverityFlagsEXT
-> Int -> DebugUtilsMessageSeverityFlagsEXT
$ccomplementBit :: DebugUtilsMessageSeverityFlagsEXT
-> Int -> DebugUtilsMessageSeverityFlagsEXT
clearBit :: DebugUtilsMessageSeverityFlagsEXT
-> Int -> DebugUtilsMessageSeverityFlagsEXT
$cclearBit :: DebugUtilsMessageSeverityFlagsEXT
-> Int -> DebugUtilsMessageSeverityFlagsEXT
setBit :: DebugUtilsMessageSeverityFlagsEXT
-> Int -> DebugUtilsMessageSeverityFlagsEXT
$csetBit :: DebugUtilsMessageSeverityFlagsEXT
-> Int -> DebugUtilsMessageSeverityFlagsEXT
bit :: Int -> DebugUtilsMessageSeverityFlagsEXT
$cbit :: Int -> DebugUtilsMessageSeverityFlagsEXT
zeroBits :: DebugUtilsMessageSeverityFlagsEXT
$czeroBits :: DebugUtilsMessageSeverityFlagsEXT
rotate :: DebugUtilsMessageSeverityFlagsEXT
-> Int -> DebugUtilsMessageSeverityFlagsEXT
$crotate :: DebugUtilsMessageSeverityFlagsEXT
-> Int -> DebugUtilsMessageSeverityFlagsEXT
shift :: DebugUtilsMessageSeverityFlagsEXT
-> Int -> DebugUtilsMessageSeverityFlagsEXT
$cshift :: DebugUtilsMessageSeverityFlagsEXT
-> Int -> DebugUtilsMessageSeverityFlagsEXT
complement :: DebugUtilsMessageSeverityFlagsEXT
-> DebugUtilsMessageSeverityFlagsEXT
$ccomplement :: DebugUtilsMessageSeverityFlagsEXT
-> DebugUtilsMessageSeverityFlagsEXT
xor :: DebugUtilsMessageSeverityFlagsEXT
-> DebugUtilsMessageSeverityFlagsEXT
-> DebugUtilsMessageSeverityFlagsEXT
$cxor :: DebugUtilsMessageSeverityFlagsEXT
-> DebugUtilsMessageSeverityFlagsEXT
-> DebugUtilsMessageSeverityFlagsEXT
.|. :: DebugUtilsMessageSeverityFlagsEXT
-> DebugUtilsMessageSeverityFlagsEXT
-> DebugUtilsMessageSeverityFlagsEXT
$c.|. :: DebugUtilsMessageSeverityFlagsEXT
-> DebugUtilsMessageSeverityFlagsEXT
-> DebugUtilsMessageSeverityFlagsEXT
.&. :: DebugUtilsMessageSeverityFlagsEXT
-> DebugUtilsMessageSeverityFlagsEXT
-> DebugUtilsMessageSeverityFlagsEXT
$c.&. :: DebugUtilsMessageSeverityFlagsEXT
-> DebugUtilsMessageSeverityFlagsEXT
-> DebugUtilsMessageSeverityFlagsEXT
$cp1Bits :: Eq DebugUtilsMessageSeverityFlagsEXT
Bits, Bits DebugUtilsMessageSeverityFlagsEXT
Bits DebugUtilsMessageSeverityFlagsEXT =>
(DebugUtilsMessageSeverityFlagsEXT -> Int)
-> (DebugUtilsMessageSeverityFlagsEXT -> Int)
-> (DebugUtilsMessageSeverityFlagsEXT -> Int)
-> FiniteBits DebugUtilsMessageSeverityFlagsEXT
DebugUtilsMessageSeverityFlagsEXT -> Int
forall b.
Bits b =>
(b -> Int) -> (b -> Int) -> (b -> Int) -> FiniteBits b
countTrailingZeros :: DebugUtilsMessageSeverityFlagsEXT -> Int
$ccountTrailingZeros :: DebugUtilsMessageSeverityFlagsEXT -> Int
countLeadingZeros :: DebugUtilsMessageSeverityFlagsEXT -> Int
$ccountLeadingZeros :: DebugUtilsMessageSeverityFlagsEXT -> Int
finiteBitSize :: DebugUtilsMessageSeverityFlagsEXT -> Int
$cfiniteBitSize :: DebugUtilsMessageSeverityFlagsEXT -> Int
$cp1FiniteBits :: Bits DebugUtilsMessageSeverityFlagsEXT
FiniteBits)



conNameDebugUtilsMessageSeverityFlagsEXT :: String
conNameDebugUtilsMessageSeverityFlagsEXT :: String
conNameDebugUtilsMessageSeverityFlagsEXT = "DebugUtilsMessageSeverityFlagsEXT"

enumPrefixDebugUtilsMessageSeverityFlagsEXT :: String
enumPrefixDebugUtilsMessageSeverityFlagsEXT :: String
enumPrefixDebugUtilsMessageSeverityFlagsEXT = ""

showTableDebugUtilsMessageSeverityFlagsEXT :: [(DebugUtilsMessageSeverityFlagsEXT, String)]
showTableDebugUtilsMessageSeverityFlagsEXT :: [(DebugUtilsMessageSeverityFlagsEXT, String)]
showTableDebugUtilsMessageSeverityFlagsEXT = []

instance Show DebugUtilsMessageSeverityFlagsEXT where
  showsPrec :: Int -> DebugUtilsMessageSeverityFlagsEXT -> ShowS
showsPrec = String
-> [(DebugUtilsMessageSeverityFlagsEXT, String)]
-> String
-> (DebugUtilsMessageSeverityFlagsEXT -> Word64)
-> (Word64 -> ShowS)
-> Int
-> DebugUtilsMessageSeverityFlagsEXT
-> ShowS
forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec String
enumPrefixDebugUtilsMessageSeverityFlagsEXT
                            [(DebugUtilsMessageSeverityFlagsEXT, String)]
showTableDebugUtilsMessageSeverityFlagsEXT
                            String
conNameDebugUtilsMessageSeverityFlagsEXT
                            (\(DebugUtilsMessageSeverityFlagsEXT x :: Word64
x) -> Word64
x)
                            (\x :: Word64
x -> String -> ShowS
showString "0x" ShowS -> ShowS -> ShowS
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Word64 -> ShowS
forall a. (Integral a, Show a) => a -> ShowS
showHex Word64
x)

instance Read DebugUtilsMessageSeverityFlagsEXT where
  readPrec :: ReadPrec DebugUtilsMessageSeverityFlagsEXT
readPrec = String
-> [(DebugUtilsMessageSeverityFlagsEXT, String)]
-> String
-> (Word64 -> DebugUtilsMessageSeverityFlagsEXT)
-> ReadPrec DebugUtilsMessageSeverityFlagsEXT
forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec String
enumPrefixDebugUtilsMessageSeverityFlagsEXT
                          [(DebugUtilsMessageSeverityFlagsEXT, String)]
showTableDebugUtilsMessageSeverityFlagsEXT
                          String
conNameDebugUtilsMessageSeverityFlagsEXT
                          Word64 -> DebugUtilsMessageSeverityFlagsEXT
DebugUtilsMessageSeverityFlagsEXT


-- | XrDebugUtilsMessageTypeFlagsEXT - XrDebugUtilsMessageTypeFlagsEXT
--
-- = See Also
--
-- 'DebugUtilsMessengerCreateInfoEXT', 'submitDebugUtilsMessageEXT'
newtype DebugUtilsMessageTypeFlagsEXT = DebugUtilsMessageTypeFlagsEXT Flags64
  deriving newtype (("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT) -> Bool
(("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
 -> ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT) -> Bool)
-> (("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
    -> ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT) -> Bool)
-> Eq ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT) -> Bool
$c/= :: ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT) -> Bool
== :: ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT) -> Bool
$c== :: ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT) -> Bool
Eq, Eq ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
Eq ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT) =>
(("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
 -> ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT) -> Ordering)
-> (("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
    -> ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT) -> Bool)
-> (("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
    -> ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT) -> Bool)
-> (("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
    -> ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT) -> Bool)
-> (("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
    -> ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT) -> Bool)
-> (("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
    -> ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
    -> "messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> (("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
    -> ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
    -> "messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> Ord ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT) -> Bool
("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT) -> Ordering
("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> "messageTypes" ::: DebugUtilsMessageTypeFlagsEXT
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 :: ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> "messageTypes" ::: DebugUtilsMessageTypeFlagsEXT
$cmin :: ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> "messageTypes" ::: DebugUtilsMessageTypeFlagsEXT
max :: ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> "messageTypes" ::: DebugUtilsMessageTypeFlagsEXT
$cmax :: ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> "messageTypes" ::: DebugUtilsMessageTypeFlagsEXT
>= :: ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT) -> Bool
$c>= :: ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT) -> Bool
> :: ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT) -> Bool
$c> :: ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT) -> Bool
<= :: ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT) -> Bool
$c<= :: ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT) -> Bool
< :: ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT) -> Bool
$c< :: ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT) -> Bool
compare :: ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT) -> Ordering
$ccompare :: ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT) -> Ordering
$cp1Ord :: Eq ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
Ord, Ptr b
-> Int -> IO ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
Ptr b
-> Int
-> ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> IO ()
Ptr ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> IO ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
Ptr ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> Int -> IO ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
Ptr ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> Int
-> ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> IO ()
Ptr ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT) -> IO ()
("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT) -> Int
(("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT) -> Int)
-> (("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT) -> Int)
-> (Ptr ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
    -> Int -> IO ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT))
-> (Ptr ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
    -> Int
    -> ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
    -> IO ())
-> (forall b.
    Ptr b
    -> Int -> IO ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT))
-> (forall b.
    Ptr b
    -> Int
    -> ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
    -> IO ())
-> (Ptr ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
    -> IO ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT))
-> (Ptr ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
    -> ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT) -> IO ())
-> Storable ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
forall b.
Ptr b
-> Int -> IO ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
forall b.
Ptr b
-> Int
-> ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> 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 ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT) -> IO ()
$cpoke :: Ptr ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT) -> IO ()
peek :: Ptr ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> IO ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
$cpeek :: Ptr ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> IO ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
pokeByteOff :: Ptr b
-> Int
-> ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> IO ()
$cpokeByteOff :: forall b.
Ptr b
-> Int
-> ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> IO ()
peekByteOff :: Ptr b
-> Int -> IO ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
$cpeekByteOff :: forall b.
Ptr b
-> Int -> IO ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
pokeElemOff :: Ptr ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> Int
-> ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> IO ()
$cpokeElemOff :: Ptr ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> Int
-> ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> IO ()
peekElemOff :: Ptr ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> Int -> IO ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
$cpeekElemOff :: Ptr ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> Int -> IO ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
alignment :: ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT) -> Int
$calignment :: ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT) -> Int
sizeOf :: ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT) -> Int
$csizeOf :: ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT) -> Int
Storable, "messageTypes" ::: DebugUtilsMessageTypeFlagsEXT
("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> Zero ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
forall a. a -> Zero a
zero :: "messageTypes" ::: DebugUtilsMessageTypeFlagsEXT
$czero :: "messageTypes" ::: DebugUtilsMessageTypeFlagsEXT
Zero, Eq ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
"messageTypes" ::: DebugUtilsMessageTypeFlagsEXT
Eq ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT) =>
(("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
 -> ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
 -> "messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> (("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
    -> ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
    -> "messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> (("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
    -> ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
    -> "messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> (("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
    -> "messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> (("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
    -> Int -> "messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> (("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
    -> Int -> "messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> (Int -> "messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> (("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
    -> Int -> "messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> (("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
    -> Int -> "messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> (("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
    -> Int -> "messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> (("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
    -> Int -> Bool)
-> (("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
    -> Maybe Int)
-> (("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT) -> Int)
-> (("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT) -> Bool)
-> (("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
    -> Int -> "messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> (("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
    -> Int -> "messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> (("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
    -> Int -> "messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> (("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
    -> Int -> "messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> (("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
    -> Int -> "messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> (("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
    -> Int -> "messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> (("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT) -> Int)
-> Bits ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
Int -> "messageTypes" ::: DebugUtilsMessageTypeFlagsEXT
("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT) -> Bool
("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT) -> Int
("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT) -> Maybe Int
("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> "messageTypes" ::: DebugUtilsMessageTypeFlagsEXT
("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT) -> Int -> Bool
("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> Int -> "messageTypes" ::: DebugUtilsMessageTypeFlagsEXT
("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> "messageTypes" ::: DebugUtilsMessageTypeFlagsEXT
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 :: ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT) -> Int
$cpopCount :: ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT) -> Int
rotateR :: ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> Int -> "messageTypes" ::: DebugUtilsMessageTypeFlagsEXT
$crotateR :: ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> Int -> "messageTypes" ::: DebugUtilsMessageTypeFlagsEXT
rotateL :: ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> Int -> "messageTypes" ::: DebugUtilsMessageTypeFlagsEXT
$crotateL :: ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> Int -> "messageTypes" ::: DebugUtilsMessageTypeFlagsEXT
unsafeShiftR :: ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> Int -> "messageTypes" ::: DebugUtilsMessageTypeFlagsEXT
$cunsafeShiftR :: ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> Int -> "messageTypes" ::: DebugUtilsMessageTypeFlagsEXT
shiftR :: ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> Int -> "messageTypes" ::: DebugUtilsMessageTypeFlagsEXT
$cshiftR :: ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> Int -> "messageTypes" ::: DebugUtilsMessageTypeFlagsEXT
unsafeShiftL :: ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> Int -> "messageTypes" ::: DebugUtilsMessageTypeFlagsEXT
$cunsafeShiftL :: ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> Int -> "messageTypes" ::: DebugUtilsMessageTypeFlagsEXT
shiftL :: ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> Int -> "messageTypes" ::: DebugUtilsMessageTypeFlagsEXT
$cshiftL :: ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> Int -> "messageTypes" ::: DebugUtilsMessageTypeFlagsEXT
isSigned :: ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT) -> Bool
$cisSigned :: ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT) -> Bool
bitSize :: ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT) -> Int
$cbitSize :: ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT) -> Int
bitSizeMaybe :: ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT) -> Maybe Int
$cbitSizeMaybe :: ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT) -> Maybe Int
testBit :: ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT) -> Int -> Bool
$ctestBit :: ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT) -> Int -> Bool
complementBit :: ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> Int -> "messageTypes" ::: DebugUtilsMessageTypeFlagsEXT
$ccomplementBit :: ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> Int -> "messageTypes" ::: DebugUtilsMessageTypeFlagsEXT
clearBit :: ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> Int -> "messageTypes" ::: DebugUtilsMessageTypeFlagsEXT
$cclearBit :: ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> Int -> "messageTypes" ::: DebugUtilsMessageTypeFlagsEXT
setBit :: ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> Int -> "messageTypes" ::: DebugUtilsMessageTypeFlagsEXT
$csetBit :: ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> Int -> "messageTypes" ::: DebugUtilsMessageTypeFlagsEXT
bit :: Int -> "messageTypes" ::: DebugUtilsMessageTypeFlagsEXT
$cbit :: Int -> "messageTypes" ::: DebugUtilsMessageTypeFlagsEXT
zeroBits :: "messageTypes" ::: DebugUtilsMessageTypeFlagsEXT
$czeroBits :: "messageTypes" ::: DebugUtilsMessageTypeFlagsEXT
rotate :: ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> Int -> "messageTypes" ::: DebugUtilsMessageTypeFlagsEXT
$crotate :: ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> Int -> "messageTypes" ::: DebugUtilsMessageTypeFlagsEXT
shift :: ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> Int -> "messageTypes" ::: DebugUtilsMessageTypeFlagsEXT
$cshift :: ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> Int -> "messageTypes" ::: DebugUtilsMessageTypeFlagsEXT
complement :: ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> "messageTypes" ::: DebugUtilsMessageTypeFlagsEXT
$ccomplement :: ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> "messageTypes" ::: DebugUtilsMessageTypeFlagsEXT
xor :: ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> "messageTypes" ::: DebugUtilsMessageTypeFlagsEXT
$cxor :: ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> "messageTypes" ::: DebugUtilsMessageTypeFlagsEXT
.|. :: ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> "messageTypes" ::: DebugUtilsMessageTypeFlagsEXT
$c.|. :: ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> "messageTypes" ::: DebugUtilsMessageTypeFlagsEXT
.&. :: ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> "messageTypes" ::: DebugUtilsMessageTypeFlagsEXT
$c.&. :: ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> "messageTypes" ::: DebugUtilsMessageTypeFlagsEXT
$cp1Bits :: Eq ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
Bits, Bits ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
Bits ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT) =>
(("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT) -> Int)
-> (("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT) -> Int)
-> (("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT) -> Int)
-> FiniteBits ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT) -> Int
forall b.
Bits b =>
(b -> Int) -> (b -> Int) -> (b -> Int) -> FiniteBits b
countTrailingZeros :: ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT) -> Int
$ccountTrailingZeros :: ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT) -> Int
countLeadingZeros :: ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT) -> Int
$ccountLeadingZeros :: ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT) -> Int
finiteBitSize :: ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT) -> Int
$cfiniteBitSize :: ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT) -> Int
$cp1FiniteBits :: Bits ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
FiniteBits)



conNameDebugUtilsMessageTypeFlagsEXT :: String
conNameDebugUtilsMessageTypeFlagsEXT :: String
conNameDebugUtilsMessageTypeFlagsEXT = "DebugUtilsMessageTypeFlagsEXT"

enumPrefixDebugUtilsMessageTypeFlagsEXT :: String
enumPrefixDebugUtilsMessageTypeFlagsEXT :: String
enumPrefixDebugUtilsMessageTypeFlagsEXT = ""

showTableDebugUtilsMessageTypeFlagsEXT :: [(DebugUtilsMessageTypeFlagsEXT, String)]
showTableDebugUtilsMessageTypeFlagsEXT :: [("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT, String)]
showTableDebugUtilsMessageTypeFlagsEXT = []

instance Show DebugUtilsMessageTypeFlagsEXT where
  showsPrec :: Int -> ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT) -> ShowS
showsPrec = String
-> [("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT, String)]
-> String
-> (("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT) -> Word64)
-> (Word64 -> ShowS)
-> Int
-> ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> ShowS
forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec String
enumPrefixDebugUtilsMessageTypeFlagsEXT
                            [("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT, String)]
showTableDebugUtilsMessageTypeFlagsEXT
                            String
conNameDebugUtilsMessageTypeFlagsEXT
                            (\(DebugUtilsMessageTypeFlagsEXT x :: Word64
x) -> Word64
x)
                            (\x :: Word64
x -> String -> ShowS
showString "0x" ShowS -> ShowS -> ShowS
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Word64 -> ShowS
forall a. (Integral a, Show a) => a -> ShowS
showHex Word64
x)

instance Read DebugUtilsMessageTypeFlagsEXT where
  readPrec :: ReadPrec ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
readPrec = String
-> [("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT, String)]
-> String
-> (Word64 -> "messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
-> ReadPrec ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT)
forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec String
enumPrefixDebugUtilsMessageTypeFlagsEXT
                          [("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT, String)]
showTableDebugUtilsMessageTypeFlagsEXT
                          String
conNameDebugUtilsMessageTypeFlagsEXT
                          Word64 -> "messageTypes" ::: DebugUtilsMessageTypeFlagsEXT
DebugUtilsMessageTypeFlagsEXT


type FN_xrDebugUtilsMessengerCallbackEXT = DebugUtilsMessageSeverityFlagsEXT -> ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT) -> Ptr DebugUtilsMessengerCallbackDataEXT -> ("userData" ::: Ptr ()) -> IO Bool32
-- | PFN_xrDebugUtilsMessengerCallbackEXT - Type of callback function invoked
-- by the debug utils
--
-- == Parameter Descriptions
--
-- = Description
--
-- The callback /must/ not call 'destroyDebugUtilsMessengerEXT'.
--
-- The callback returns an
-- <https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XrBool32 >
-- that indicates to the calling layer the application’s desire to abort
-- the call. A value of 'OpenXR.Core10.FundamentalTypes.TRUE' indicates
-- that the application wants to abort this call. If the application
-- returns 'OpenXR.Core10.FundamentalTypes.FALSE', the function /must/ not
-- be aborted. Applications /should/ always return
-- 'OpenXR.Core10.FundamentalTypes.FALSE' so that they see the same
-- behavior with and without validation layers enabled.
--
-- If the application returns 'OpenXR.Core10.FundamentalTypes.TRUE' from
-- its callback and the OpenXR call being aborted returns an
-- 'OpenXR.Core10.Enums.Result.Result', the layer will return
-- 'OpenXR.Core10.Enums.Result.ERROR_VALIDATION_FAILURE'.
--
-- The object pointed to by @callbackData@ (and any pointers in it
-- recursively) /must/ be valid during the lifetime of the triggered
-- callback. It /may/ become invalid afterwards.
--
-- = See Also
--
-- 'DebugUtilsMessengerCreateInfoEXT', 'createDebugUtilsMessengerEXT'
type PFN_xrDebugUtilsMessengerCallbackEXT = FunPtr FN_xrDebugUtilsMessengerCallbackEXT


type EXT_debug_utils_SPEC_VERSION = 3

-- No documentation found for TopLevel "XR_EXT_debug_utils_SPEC_VERSION"
pattern EXT_debug_utils_SPEC_VERSION :: forall a . Integral a => a
pattern $bEXT_debug_utils_SPEC_VERSION :: a
$mEXT_debug_utils_SPEC_VERSION :: forall r a. Integral a => a -> (Void# -> r) -> (Void# -> r) -> r
EXT_debug_utils_SPEC_VERSION = 3


type EXT_DEBUG_UTILS_EXTENSION_NAME = "XR_EXT_debug_utils"

-- No documentation found for TopLevel "XR_EXT_DEBUG_UTILS_EXTENSION_NAME"
pattern EXT_DEBUG_UTILS_EXTENSION_NAME :: forall a . (Eq a, IsString a) => a
pattern $bEXT_DEBUG_UTILS_EXTENSION_NAME :: a
$mEXT_DEBUG_UTILS_EXTENSION_NAME :: forall r a.
(Eq a, IsString a) =>
a -> (Void# -> r) -> (Void# -> r) -> r
EXT_DEBUG_UTILS_EXTENSION_NAME = "XR_EXT_debug_utils"