{-# language CPP #-}
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(..))
data DebugUtilsMessengerEXT_T
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)
data SpatialAnchorMSFT_T
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)
data HandTrackerEXT_T
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)