{-# language CPP #-}
-- No documentation found for Chapter "Handles"
module OpenXR.Extensions.Handles  ( DebugUtilsMessengerEXT(..)
                                  , DebugUtilsMessengerEXT_T
                                  , SpatialAnchorMSFT(..)
                                  , SpatialAnchorMSFT_T
                                  , HandTrackerEXT(..)
                                  , HandTrackerEXT_T
                                  , Instance(..)
                                  , Session(..)
                                  , Action(..)
                                  , Swapchain(..)
                                  , Space(..)
                                  ) where

import Foreign.Ptr (ptrToWordPtr)
import Foreign.Ptr (pattern WordPtr)
import OpenXR.Zero (Zero(..))
import Foreign.Ptr (Ptr)
import OpenXR.Core10.APIConstants (HasObjectType(..))
import OpenXR.Dynamic (InstanceCmds)
import OpenXR.Core10.APIConstants (IsHandle)
import OpenXR.Core10.Enums.ObjectType (ObjectType(OBJECT_TYPE_DEBUG_UTILS_MESSENGER_EXT))
import OpenXR.Core10.Enums.ObjectType (ObjectType(OBJECT_TYPE_HAND_TRACKER_EXT))
import OpenXR.Core10.Enums.ObjectType (ObjectType(OBJECT_TYPE_SPATIAL_ANCHOR_MSFT))
import OpenXR.Core10.Handles (Action(..))
import OpenXR.Core10.Handles (Instance(..))
import OpenXR.Core10.Handles (Session(..))
import OpenXR.Core10.Handles (Space(..))
import OpenXR.Core10.Handles (Swapchain(..))
-- | An opaque type for representing pointers to XrDebugUtilsMessengerEXT handles
data DebugUtilsMessengerEXT_T
-- | XrDebugUtilsMessengerEXT - Callback for debug data
--
-- = Description
--
-- 'DebugUtilsMessengerEXT' represents a callback function and associated
-- filters registered with the runtime.
--
-- = See Also
--
-- 'OpenXR.Extensions.XR_EXT_debug_utils.createDebugUtilsMessengerEXT',
-- 'OpenXR.Extensions.XR_EXT_debug_utils.destroyDebugUtilsMessengerEXT'
data DebugUtilsMessengerEXT = DebugUtilsMessengerEXT
  { DebugUtilsMessengerEXT -> Ptr DebugUtilsMessengerEXT_T
debugUtilsMessengerEXTHandle :: Ptr DebugUtilsMessengerEXT_T
  , DebugUtilsMessengerEXT -> InstanceCmds
instanceCmds :: InstanceCmds
  }
  deriving stock (DebugUtilsMessengerEXT -> DebugUtilsMessengerEXT -> Bool
(DebugUtilsMessengerEXT -> DebugUtilsMessengerEXT -> Bool)
-> (DebugUtilsMessengerEXT -> DebugUtilsMessengerEXT -> Bool)
-> Eq DebugUtilsMessengerEXT
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DebugUtilsMessengerEXT -> DebugUtilsMessengerEXT -> Bool
$c/= :: DebugUtilsMessengerEXT -> DebugUtilsMessengerEXT -> Bool
== :: DebugUtilsMessengerEXT -> DebugUtilsMessengerEXT -> Bool
$c== :: DebugUtilsMessengerEXT -> DebugUtilsMessengerEXT -> Bool
Eq, Int -> DebugUtilsMessengerEXT -> ShowS
[DebugUtilsMessengerEXT] -> ShowS
DebugUtilsMessengerEXT -> String
(Int -> DebugUtilsMessengerEXT -> ShowS)
-> (DebugUtilsMessengerEXT -> String)
-> ([DebugUtilsMessengerEXT] -> ShowS)
-> Show DebugUtilsMessengerEXT
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DebugUtilsMessengerEXT] -> ShowS
$cshowList :: [DebugUtilsMessengerEXT] -> ShowS
show :: DebugUtilsMessengerEXT -> String
$cshow :: DebugUtilsMessengerEXT -> String
showsPrec :: Int -> DebugUtilsMessengerEXT -> ShowS
$cshowsPrec :: Int -> DebugUtilsMessengerEXT -> ShowS
Show)
  deriving anyclass (Eq DebugUtilsMessengerEXT
Zero DebugUtilsMessengerEXT
(Eq DebugUtilsMessengerEXT, Zero DebugUtilsMessengerEXT) =>
IsHandle DebugUtilsMessengerEXT
forall a. (Eq a, Zero a) => IsHandle a
$cp2IsHandle :: Zero DebugUtilsMessengerEXT
$cp1IsHandle :: Eq DebugUtilsMessengerEXT
IsHandle)
instance Zero DebugUtilsMessengerEXT where
  zero :: DebugUtilsMessengerEXT
zero = Ptr DebugUtilsMessengerEXT_T
-> InstanceCmds -> DebugUtilsMessengerEXT
DebugUtilsMessengerEXT Ptr DebugUtilsMessengerEXT_T
forall a. Zero a => a
zero InstanceCmds
forall a. Zero a => a
zero
instance HasObjectType DebugUtilsMessengerEXT where
  objectTypeAndHandle :: DebugUtilsMessengerEXT -> (ObjectType, Word64)
objectTypeAndHandle (DebugUtilsMessengerEXT (Ptr DebugUtilsMessengerEXT_T -> WordPtr
forall a. Ptr a -> WordPtr
ptrToWordPtr -> WordPtr h :: Word
h) _) = (ObjectType
OBJECT_TYPE_DEBUG_UTILS_MESSENGER_EXT, Word -> Word64
forall a b. (Integral a, Num b) => a -> b
fromIntegral Word
h)


-- | An opaque type for representing pointers to XrSpatialAnchorMSFT handles
data SpatialAnchorMSFT_T
-- | XrSpatialAnchorMSFT - Represents a spatial anchor
--
-- = Description
--
-- Spatial anchors are often used in combination with an @UNBOUNDED_MSFT@
-- reference space. @UNBOUNDED_MSFT@ reference spaces adjust their origin
-- as necessary to keep the viewer’s coordinates relative to the space’s
-- origin stable. Such adjustments maintain the visual stability of content
-- currently near the viewer, but may cause content placed far from the
-- viewer to drift in its alignment to the real world by the time the user
-- moves close again. By creating an 'SpatialAnchorMSFT' where a piece of
-- content is placed and then always rendering that content relative to its
-- anchor’s space, an application can ensure that each piece of content
-- stays at a fixed location in the environment.
--
-- = See Also
--
-- 'OpenXR.Extensions.XR_MSFT_spatial_anchor.SpatialAnchorSpaceCreateInfoMSFT',
-- 'OpenXR.Extensions.XR_MSFT_perception_anchor_interop.createSpatialAnchorFromPerceptionAnchorMSFT',
-- 'OpenXR.Extensions.XR_MSFT_spatial_anchor.createSpatialAnchorMSFT',
-- 'OpenXR.Extensions.XR_MSFT_spatial_anchor.destroySpatialAnchorMSFT',
-- 'OpenXR.Extensions.XR_MSFT_perception_anchor_interop.tryGetPerceptionAnchorFromSpatialAnchorMSFT'
data SpatialAnchorMSFT = SpatialAnchorMSFT
  { SpatialAnchorMSFT -> Ptr SpatialAnchorMSFT_T
spatialAnchorMSFTHandle :: Ptr SpatialAnchorMSFT_T
  , SpatialAnchorMSFT -> InstanceCmds
instanceCmds :: InstanceCmds
  }
  deriving stock (SpatialAnchorMSFT -> SpatialAnchorMSFT -> Bool
(SpatialAnchorMSFT -> SpatialAnchorMSFT -> Bool)
-> (SpatialAnchorMSFT -> SpatialAnchorMSFT -> Bool)
-> Eq SpatialAnchorMSFT
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SpatialAnchorMSFT -> SpatialAnchorMSFT -> Bool
$c/= :: SpatialAnchorMSFT -> SpatialAnchorMSFT -> Bool
== :: SpatialAnchorMSFT -> SpatialAnchorMSFT -> Bool
$c== :: SpatialAnchorMSFT -> SpatialAnchorMSFT -> Bool
Eq, Int -> SpatialAnchorMSFT -> ShowS
[SpatialAnchorMSFT] -> ShowS
SpatialAnchorMSFT -> String
(Int -> SpatialAnchorMSFT -> ShowS)
-> (SpatialAnchorMSFT -> String)
-> ([SpatialAnchorMSFT] -> ShowS)
-> Show SpatialAnchorMSFT
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SpatialAnchorMSFT] -> ShowS
$cshowList :: [SpatialAnchorMSFT] -> ShowS
show :: SpatialAnchorMSFT -> String
$cshow :: SpatialAnchorMSFT -> String
showsPrec :: Int -> SpatialAnchorMSFT -> ShowS
$cshowsPrec :: Int -> SpatialAnchorMSFT -> ShowS
Show)
  deriving anyclass (Eq SpatialAnchorMSFT
Zero SpatialAnchorMSFT
(Eq SpatialAnchorMSFT, Zero SpatialAnchorMSFT) =>
IsHandle SpatialAnchorMSFT
forall a. (Eq a, Zero a) => IsHandle a
$cp2IsHandle :: Zero SpatialAnchorMSFT
$cp1IsHandle :: Eq SpatialAnchorMSFT
IsHandle)
instance Zero SpatialAnchorMSFT where
  zero :: SpatialAnchorMSFT
zero = Ptr SpatialAnchorMSFT_T -> InstanceCmds -> SpatialAnchorMSFT
SpatialAnchorMSFT Ptr SpatialAnchorMSFT_T
forall a. Zero a => a
zero InstanceCmds
forall a. Zero a => a
zero
instance HasObjectType SpatialAnchorMSFT where
  objectTypeAndHandle :: SpatialAnchorMSFT -> (ObjectType, Word64)
objectTypeAndHandle (SpatialAnchorMSFT (Ptr SpatialAnchorMSFT_T -> WordPtr
forall a. Ptr a -> WordPtr
ptrToWordPtr -> WordPtr h :: Word
h) _) = (ObjectType
OBJECT_TYPE_SPATIAL_ANCHOR_MSFT, Word -> Word64
forall a b. (Integral a, Num b) => a -> b
fromIntegral Word
h)


-- | An opaque type for representing pointers to XrHandTrackerEXT handles
data HandTrackerEXT_T
-- | XrHandTrackerEXT - Represents a tracker for a hand joints.
--
-- = Description
--
-- An application creates separate 'HandTrackerEXT' handles for left and
-- right hands. This handle can be used to locate hand joints using
-- 'OpenXR.Extensions.XR_EXT_hand_tracking.locateHandJointsEXT' function.
--
-- A hand tracker provides accurate fidelity to the user’s actual hand
-- shape. When the hand tracking input requires the user to be holding a
-- controller in their hand, the hand tracking input will appear as the
-- user holding the controller. This input can be used to render the hand
-- shape together with rendering the controller in the hand.
--
-- = See Also
--
-- 'OpenXR.Extensions.XR_MSFT_hand_tracking_mesh.createHandMeshSpaceMSFT',
-- 'OpenXR.Extensions.XR_EXT_hand_tracking.createHandTrackerEXT',
-- 'OpenXR.Extensions.XR_EXT_hand_tracking.destroyHandTrackerEXT',
-- 'OpenXR.Extensions.XR_EXT_hand_tracking.locateHandJointsEXT',
-- 'OpenXR.Extensions.XR_MSFT_hand_tracking_mesh.updateHandMeshMSFT'
data HandTrackerEXT = HandTrackerEXT
  { HandTrackerEXT -> Ptr HandTrackerEXT_T
handTrackerEXTHandle :: Ptr HandTrackerEXT_T
  , HandTrackerEXT -> InstanceCmds
instanceCmds :: InstanceCmds
  }
  deriving stock (HandTrackerEXT -> HandTrackerEXT -> Bool
(HandTrackerEXT -> HandTrackerEXT -> Bool)
-> (HandTrackerEXT -> HandTrackerEXT -> Bool) -> Eq HandTrackerEXT
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: HandTrackerEXT -> HandTrackerEXT -> Bool
$c/= :: HandTrackerEXT -> HandTrackerEXT -> Bool
== :: HandTrackerEXT -> HandTrackerEXT -> Bool
$c== :: HandTrackerEXT -> HandTrackerEXT -> Bool
Eq, Int -> HandTrackerEXT -> ShowS
[HandTrackerEXT] -> ShowS
HandTrackerEXT -> String
(Int -> HandTrackerEXT -> ShowS)
-> (HandTrackerEXT -> String)
-> ([HandTrackerEXT] -> ShowS)
-> Show HandTrackerEXT
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [HandTrackerEXT] -> ShowS
$cshowList :: [HandTrackerEXT] -> ShowS
show :: HandTrackerEXT -> String
$cshow :: HandTrackerEXT -> String
showsPrec :: Int -> HandTrackerEXT -> ShowS
$cshowsPrec :: Int -> HandTrackerEXT -> ShowS
Show)
  deriving anyclass (Eq HandTrackerEXT
Zero HandTrackerEXT
(Eq HandTrackerEXT, Zero HandTrackerEXT) => IsHandle HandTrackerEXT
forall a. (Eq a, Zero a) => IsHandle a
$cp2IsHandle :: Zero HandTrackerEXT
$cp1IsHandle :: Eq HandTrackerEXT
IsHandle)
instance Zero HandTrackerEXT where
  zero :: HandTrackerEXT
zero = Ptr HandTrackerEXT_T -> InstanceCmds -> HandTrackerEXT
HandTrackerEXT Ptr HandTrackerEXT_T
forall a. Zero a => a
zero InstanceCmds
forall a. Zero a => a
zero
instance HasObjectType HandTrackerEXT where
  objectTypeAndHandle :: HandTrackerEXT -> (ObjectType, Word64)
objectTypeAndHandle (HandTrackerEXT (Ptr HandTrackerEXT_T -> WordPtr
forall a. Ptr a -> WordPtr
ptrToWordPtr -> WordPtr h :: Word
h) _) = (ObjectType
OBJECT_TYPE_HAND_TRACKER_EXT, Word -> Word64
forall a b. (Integral a, Num b) => a -> b
fromIntegral Word
h)