{-# language CPP #-}
module OpenXR.Extensions.XR_EXT_hand_tracking ( createHandTrackerEXT
, withHandTrackerEXT
, destroyHandTrackerEXT
, locateHandJointsEXT
, SystemHandTrackingPropertiesEXT(..)
, HandTrackerCreateInfoEXT(..)
, HandJointsLocateInfoEXT(..)
, HandJointLocationEXT(..)
, HandJointVelocityEXT(..)
, HandJointLocationsEXT(..)
, HandJointVelocitiesEXT(..)
, HandEXT( HAND_LEFT_EXT
, HAND_RIGHT_EXT
, ..
)
, HandJointEXT( HAND_JOINT_PALM_EXT
, HAND_JOINT_WRIST_EXT
, HAND_JOINT_THUMB_METACARPAL_EXT
, HAND_JOINT_THUMB_PROXIMAL_EXT
, HAND_JOINT_THUMB_DISTAL_EXT
, HAND_JOINT_THUMB_TIP_EXT
, HAND_JOINT_INDEX_METACARPAL_EXT
, HAND_JOINT_INDEX_PROXIMAL_EXT
, HAND_JOINT_INDEX_INTERMEDIATE_EXT
, HAND_JOINT_INDEX_DISTAL_EXT
, HAND_JOINT_INDEX_TIP_EXT
, HAND_JOINT_MIDDLE_METACARPAL_EXT
, HAND_JOINT_MIDDLE_PROXIMAL_EXT
, HAND_JOINT_MIDDLE_INTERMEDIATE_EXT
, HAND_JOINT_MIDDLE_DISTAL_EXT
, HAND_JOINT_MIDDLE_TIP_EXT
, HAND_JOINT_RING_METACARPAL_EXT
, HAND_JOINT_RING_PROXIMAL_EXT
, HAND_JOINT_RING_INTERMEDIATE_EXT
, HAND_JOINT_RING_DISTAL_EXT
, HAND_JOINT_RING_TIP_EXT
, HAND_JOINT_LITTLE_METACARPAL_EXT
, HAND_JOINT_LITTLE_PROXIMAL_EXT
, HAND_JOINT_LITTLE_INTERMEDIATE_EXT
, HAND_JOINT_LITTLE_DISTAL_EXT
, HAND_JOINT_LITTLE_TIP_EXT
, ..
)
, HandJointSetEXT( HAND_JOINT_SET_DEFAULT_EXT
, ..
)
, EXT_hand_tracking_SPEC_VERSION
, pattern EXT_hand_tracking_SPEC_VERSION
, EXT_HAND_TRACKING_EXTENSION_NAME
, pattern EXT_HAND_TRACKING_EXTENSION_NAME
, HandTrackerEXT(..)
, HAND_JOINT_COUNT_EXT
, pattern HAND_JOINT_COUNT_EXT
) 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 Data.Typeable (eqT)
import Foreign.Marshal.Alloc (allocaBytesAligned)
import Foreign.Marshal.Alloc (callocBytes)
import Foreign.Marshal.Alloc (free)
import GHC.Base (when)
import GHC.IO (throwIO)
import GHC.Ptr (castPtr)
import GHC.Ptr (nullFunPtr)
import Foreign.Ptr (nullPtr)
import Foreign.Ptr (plusPtr)
import GHC.Show (showsPrec)
import Data.Coerce (coerce)
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.String (IsString)
import Data.Type.Equality ((:~:)(Refl))
import Data.Typeable (Typeable)
import Foreign.C.Types (CFloat)
import Foreign.C.Types (CFloat(..))
import Foreign.C.Types (CFloat(CFloat))
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 Data.Int (Int32)
import Foreign.Ptr (FunPtr)
import Foreign.Ptr (Ptr)
import GHC.Read (Read(readPrec))
import GHC.Show (Show(showsPrec))
import Data.Word (Word32)
import Data.Kind (Type)
import Control.Monad.Trans.Cont (ContT(..))
import OpenXR.Core10.FundamentalTypes (bool32ToBool)
import OpenXR.Core10.FundamentalTypes (boolToBool32)
import OpenXR.CStruct.Extends (forgetExtensions)
import OpenXR.Core10.FundamentalTypes (Bool32)
import OpenXR.CStruct.Extends (Chain)
import OpenXR.CStruct.Extends (Extends)
import OpenXR.CStruct.Extends (Extendss)
import OpenXR.CStruct.Extends (Extensible(..))
import {-# SOURCE #-} OpenXR.Extensions.XR_MSFT_hand_tracking_mesh (HandPoseTypeInfoMSFT)
import OpenXR.Extensions.Handles (HandTrackerEXT)
import OpenXR.Extensions.Handles (HandTrackerEXT(..))
import OpenXR.Extensions.Handles (HandTrackerEXT(HandTrackerEXT))
import OpenXR.Extensions.Handles (HandTrackerEXT_T)
import OpenXR.Dynamic (InstanceCmds(pXrCreateHandTrackerEXT))
import OpenXR.Dynamic (InstanceCmds(pXrDestroyHandTrackerEXT))
import OpenXR.Dynamic (InstanceCmds(pXrLocateHandJointsEXT))
import OpenXR.Exception (OpenXrException(..))
import OpenXR.CStruct.Extends (PeekChain)
import OpenXR.CStruct.Extends (PeekChain(..))
import OpenXR.CStruct.Extends (PokeChain)
import OpenXR.CStruct.Extends (PokeChain(..))
import OpenXR.Core10.Space (Posef)
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.CStruct.Extends (SomeStruct)
import OpenXR.Core10.Enums.SpaceLocationFlags (SpaceLocationFlags)
import OpenXR.Core10.Enums.SpaceVelocityFlags (SpaceVelocityFlags)
import OpenXR.Core10.Handles (Space_T)
import OpenXR.Core10.Enums.StructureType (StructureType)
import OpenXR.Core10.FundamentalTypes (Time)
import OpenXR.Core10.Space (Vector3f)
import OpenXR.Core10.Enums.Result (Result(SUCCESS))
import OpenXR.Core10.Enums.StructureType (StructureType(TYPE_HAND_JOINTS_LOCATE_INFO_EXT))
import OpenXR.Core10.Enums.StructureType (StructureType(TYPE_HAND_JOINT_LOCATIONS_EXT))
import OpenXR.Core10.Enums.StructureType (StructureType(TYPE_HAND_JOINT_VELOCITIES_EXT))
import OpenXR.Core10.Enums.StructureType (StructureType(TYPE_HAND_TRACKER_CREATE_INFO_EXT))
import OpenXR.Core10.Enums.StructureType (StructureType(TYPE_SYSTEM_HAND_TRACKING_PROPERTIES_EXT))
import OpenXR.Core10.APIConstants (HAND_JOINT_COUNT_EXT)
import OpenXR.Extensions.Handles (HandTrackerEXT(..))
import OpenXR.Core10.APIConstants (pattern HAND_JOINT_COUNT_EXT)
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkXrCreateHandTrackerEXT
:: FunPtr (Ptr Session_T -> Ptr (SomeStruct HandTrackerCreateInfoEXT) -> Ptr (Ptr HandTrackerEXT_T) -> IO Result) -> Ptr Session_T -> Ptr (SomeStruct HandTrackerCreateInfoEXT) -> Ptr (Ptr HandTrackerEXT_T) -> IO Result
createHandTrackerEXT :: forall a io
. (Extendss HandTrackerCreateInfoEXT a, PokeChain a, MonadIO io)
=>
Session
->
(HandTrackerCreateInfoEXT a)
-> io (Result, HandTrackerEXT)
createHandTrackerEXT :: Session
-> HandTrackerCreateInfoEXT a -> io (Result, HandTrackerEXT)
createHandTrackerEXT session :: Session
session createInfo :: HandTrackerCreateInfoEXT a
createInfo = IO (Result, HandTrackerEXT) -> io (Result, HandTrackerEXT)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Result, HandTrackerEXT) -> io (Result, HandTrackerEXT))
-> (ContT (Result, HandTrackerEXT) IO (Result, HandTrackerEXT)
-> IO (Result, HandTrackerEXT))
-> ContT (Result, HandTrackerEXT) IO (Result, HandTrackerEXT)
-> io (Result, HandTrackerEXT)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT (Result, HandTrackerEXT) IO (Result, HandTrackerEXT)
-> IO (Result, HandTrackerEXT)
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT (Result, HandTrackerEXT) IO (Result, HandTrackerEXT)
-> io (Result, HandTrackerEXT))
-> ContT (Result, HandTrackerEXT) IO (Result, HandTrackerEXT)
-> io (Result, HandTrackerEXT)
forall a b. (a -> b) -> a -> b
$ do
let cmds :: InstanceCmds
cmds = Session -> InstanceCmds
instanceCmds (Session
session :: Session)
let xrCreateHandTrackerEXTPtr :: FunPtr
(Ptr Session_T
-> ("createInfo" ::: Ptr (SomeStruct HandTrackerCreateInfoEXT))
-> ("handTracker" ::: Ptr (Ptr HandTrackerEXT_T))
-> IO Result)
xrCreateHandTrackerEXTPtr = InstanceCmds
-> FunPtr
(Ptr Session_T
-> ("createInfo" ::: Ptr (SomeStruct HandTrackerCreateInfoEXT))
-> ("handTracker" ::: Ptr (Ptr HandTrackerEXT_T))
-> IO Result)
pXrCreateHandTrackerEXT InstanceCmds
cmds
IO () -> ContT (Result, HandTrackerEXT) IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT (Result, HandTrackerEXT) IO ())
-> IO () -> ContT (Result, HandTrackerEXT) IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr Session_T
-> ("createInfo" ::: Ptr (SomeStruct HandTrackerCreateInfoEXT))
-> ("handTracker" ::: Ptr (Ptr HandTrackerEXT_T))
-> IO Result)
xrCreateHandTrackerEXTPtr FunPtr
(Ptr Session_T
-> ("createInfo" ::: Ptr (SomeStruct HandTrackerCreateInfoEXT))
-> ("handTracker" ::: Ptr (Ptr HandTrackerEXT_T))
-> IO Result)
-> FunPtr
(Ptr Session_T
-> ("createInfo" ::: Ptr (SomeStruct HandTrackerCreateInfoEXT))
-> ("handTracker" ::: Ptr (Ptr HandTrackerEXT_T))
-> IO Result)
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
(Ptr Session_T
-> ("createInfo" ::: Ptr (SomeStruct HandTrackerCreateInfoEXT))
-> ("handTracker" ::: Ptr (Ptr HandTrackerEXT_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 xrCreateHandTrackerEXT is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
let xrCreateHandTrackerEXT' :: Ptr Session_T
-> ("createInfo" ::: Ptr (SomeStruct HandTrackerCreateInfoEXT))
-> ("handTracker" ::: Ptr (Ptr HandTrackerEXT_T))
-> IO Result
xrCreateHandTrackerEXT' = FunPtr
(Ptr Session_T
-> ("createInfo" ::: Ptr (SomeStruct HandTrackerCreateInfoEXT))
-> ("handTracker" ::: Ptr (Ptr HandTrackerEXT_T))
-> IO Result)
-> Ptr Session_T
-> ("createInfo" ::: Ptr (SomeStruct HandTrackerCreateInfoEXT))
-> ("handTracker" ::: Ptr (Ptr HandTrackerEXT_T))
-> IO Result
mkXrCreateHandTrackerEXT FunPtr
(Ptr Session_T
-> ("createInfo" ::: Ptr (SomeStruct HandTrackerCreateInfoEXT))
-> ("handTracker" ::: Ptr (Ptr HandTrackerEXT_T))
-> IO Result)
xrCreateHandTrackerEXTPtr
Ptr (HandTrackerCreateInfoEXT a)
createInfo' <- ((Ptr (HandTrackerCreateInfoEXT a) -> IO (Result, HandTrackerEXT))
-> IO (Result, HandTrackerEXT))
-> ContT
(Result, HandTrackerEXT) IO (Ptr (HandTrackerCreateInfoEXT a))
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr (HandTrackerCreateInfoEXT a) -> IO (Result, HandTrackerEXT))
-> IO (Result, HandTrackerEXT))
-> ContT
(Result, HandTrackerEXT) IO (Ptr (HandTrackerCreateInfoEXT a)))
-> ((Ptr (HandTrackerCreateInfoEXT a)
-> IO (Result, HandTrackerEXT))
-> IO (Result, HandTrackerEXT))
-> ContT
(Result, HandTrackerEXT) IO (Ptr (HandTrackerCreateInfoEXT a))
forall a b. (a -> b) -> a -> b
$ HandTrackerCreateInfoEXT a
-> (Ptr (HandTrackerCreateInfoEXT a)
-> IO (Result, HandTrackerEXT))
-> IO (Result, HandTrackerEXT)
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (HandTrackerCreateInfoEXT a
createInfo)
"handTracker" ::: Ptr (Ptr HandTrackerEXT_T)
pHandTracker <- ((("handTracker" ::: Ptr (Ptr HandTrackerEXT_T))
-> IO (Result, HandTrackerEXT))
-> IO (Result, HandTrackerEXT))
-> ContT
(Result, HandTrackerEXT)
IO
("handTracker" ::: Ptr (Ptr HandTrackerEXT_T))
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("handTracker" ::: Ptr (Ptr HandTrackerEXT_T))
-> IO (Result, HandTrackerEXT))
-> IO (Result, HandTrackerEXT))
-> ContT
(Result, HandTrackerEXT)
IO
("handTracker" ::: Ptr (Ptr HandTrackerEXT_T)))
-> ((("handTracker" ::: Ptr (Ptr HandTrackerEXT_T))
-> IO (Result, HandTrackerEXT))
-> IO (Result, HandTrackerEXT))
-> ContT
(Result, HandTrackerEXT)
IO
("handTracker" ::: Ptr (Ptr HandTrackerEXT_T))
forall a b. (a -> b) -> a -> b
$ IO ("handTracker" ::: Ptr (Ptr HandTrackerEXT_T))
-> (("handTracker" ::: Ptr (Ptr HandTrackerEXT_T)) -> IO ())
-> (("handTracker" ::: Ptr (Ptr HandTrackerEXT_T))
-> IO (Result, HandTrackerEXT))
-> IO (Result, HandTrackerEXT)
forall a b c. IO a -> (a -> IO b) -> (a -> IO c) -> IO c
bracket (Int -> IO ("handTracker" ::: Ptr (Ptr HandTrackerEXT_T))
forall a. Int -> IO (Ptr a)
callocBytes @(Ptr HandTrackerEXT_T) 8) ("handTracker" ::: Ptr (Ptr HandTrackerEXT_T)) -> IO ()
forall a. Ptr a -> IO ()
free
Result
r <- IO Result -> ContT (Result, HandTrackerEXT) IO Result
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO Result -> ContT (Result, HandTrackerEXT) IO Result)
-> IO Result -> ContT (Result, HandTrackerEXT) IO Result
forall a b. (a -> b) -> a -> b
$ String -> IO Result -> IO Result
forall a. String -> IO a -> IO a
traceAroundEvent "xrCreateHandTrackerEXT" (Ptr Session_T
-> ("createInfo" ::: Ptr (SomeStruct HandTrackerCreateInfoEXT))
-> ("handTracker" ::: Ptr (Ptr HandTrackerEXT_T))
-> IO Result
xrCreateHandTrackerEXT' (Session -> Ptr Session_T
sessionHandle (Session
session)) (Ptr (HandTrackerCreateInfoEXT a)
-> "createInfo" ::: Ptr (SomeStruct HandTrackerCreateInfoEXT)
forall (a :: [*] -> *) (es :: [*]).
Ptr (a es) -> Ptr (SomeStruct a)
forgetExtensions Ptr (HandTrackerCreateInfoEXT a)
createInfo') ("handTracker" ::: Ptr (Ptr HandTrackerEXT_T)
pHandTracker))
IO () -> ContT (Result, HandTrackerEXT) IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT (Result, HandTrackerEXT) IO ())
-> IO () -> ContT (Result, HandTrackerEXT) 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 HandTrackerEXT_T
handTracker <- IO (Ptr HandTrackerEXT_T)
-> ContT (Result, HandTrackerEXT) IO (Ptr HandTrackerEXT_T)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO (Ptr HandTrackerEXT_T)
-> ContT (Result, HandTrackerEXT) IO (Ptr HandTrackerEXT_T))
-> IO (Ptr HandTrackerEXT_T)
-> ContT (Result, HandTrackerEXT) IO (Ptr HandTrackerEXT_T)
forall a b. (a -> b) -> a -> b
$ ("handTracker" ::: Ptr (Ptr HandTrackerEXT_T))
-> IO (Ptr HandTrackerEXT_T)
forall a. Storable a => Ptr a -> IO a
peek @(Ptr HandTrackerEXT_T) "handTracker" ::: Ptr (Ptr HandTrackerEXT_T)
pHandTracker
(Result, HandTrackerEXT)
-> ContT (Result, HandTrackerEXT) IO (Result, HandTrackerEXT)
forall (f :: * -> *) a. Applicative f => a -> f a
pure ((Result, HandTrackerEXT)
-> ContT (Result, HandTrackerEXT) IO (Result, HandTrackerEXT))
-> (Result, HandTrackerEXT)
-> ContT (Result, HandTrackerEXT) IO (Result, HandTrackerEXT)
forall a b. (a -> b) -> a -> b
$ (Result
r, ((\h :: Ptr HandTrackerEXT_T
h -> Ptr HandTrackerEXT_T -> InstanceCmds -> HandTrackerEXT
HandTrackerEXT Ptr HandTrackerEXT_T
h InstanceCmds
cmds ) Ptr HandTrackerEXT_T
handTracker))
withHandTrackerEXT :: forall a io r . (Extendss HandTrackerCreateInfoEXT a, PokeChain a, MonadIO io) => Session -> HandTrackerCreateInfoEXT a -> (io (Result, HandTrackerEXT) -> ((Result, HandTrackerEXT) -> io ()) -> r) -> r
withHandTrackerEXT :: Session
-> HandTrackerCreateInfoEXT a
-> (io (Result, HandTrackerEXT)
-> ((Result, HandTrackerEXT) -> io ()) -> r)
-> r
withHandTrackerEXT session :: Session
session createInfo :: HandTrackerCreateInfoEXT a
createInfo b :: io (Result, HandTrackerEXT)
-> ((Result, HandTrackerEXT) -> io ()) -> r
b =
io (Result, HandTrackerEXT)
-> ((Result, HandTrackerEXT) -> io ()) -> r
b (Session
-> HandTrackerCreateInfoEXT a -> io (Result, HandTrackerEXT)
forall (a :: [*]) (io :: * -> *).
(Extendss HandTrackerCreateInfoEXT a, PokeChain a, MonadIO io) =>
Session
-> HandTrackerCreateInfoEXT a -> io (Result, HandTrackerEXT)
createHandTrackerEXT Session
session HandTrackerCreateInfoEXT a
createInfo)
(\(_, o1 :: HandTrackerEXT
o1) -> HandTrackerEXT -> io ()
forall (io :: * -> *). MonadIO io => HandTrackerEXT -> io ()
destroyHandTrackerEXT HandTrackerEXT
o1)
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkXrDestroyHandTrackerEXT
:: FunPtr (Ptr HandTrackerEXT_T -> IO Result) -> Ptr HandTrackerEXT_T -> IO Result
destroyHandTrackerEXT :: forall io
. (MonadIO io)
=>
HandTrackerEXT
-> io ()
destroyHandTrackerEXT :: HandTrackerEXT -> io ()
destroyHandTrackerEXT handTracker :: HandTrackerEXT
handTracker = 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 xrDestroyHandTrackerEXTPtr :: FunPtr (Ptr HandTrackerEXT_T -> IO Result)
xrDestroyHandTrackerEXTPtr = InstanceCmds -> FunPtr (Ptr HandTrackerEXT_T -> IO Result)
pXrDestroyHandTrackerEXT (HandTrackerEXT -> InstanceCmds
instanceCmds (HandTrackerEXT
handTracker :: HandTrackerEXT))
Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr (Ptr HandTrackerEXT_T -> IO Result)
xrDestroyHandTrackerEXTPtr FunPtr (Ptr HandTrackerEXT_T -> IO Result)
-> FunPtr (Ptr HandTrackerEXT_T -> IO Result) -> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr (Ptr HandTrackerEXT_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 xrDestroyHandTrackerEXT is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
let xrDestroyHandTrackerEXT' :: Ptr HandTrackerEXT_T -> IO Result
xrDestroyHandTrackerEXT' = FunPtr (Ptr HandTrackerEXT_T -> IO Result)
-> Ptr HandTrackerEXT_T -> IO Result
mkXrDestroyHandTrackerEXT FunPtr (Ptr HandTrackerEXT_T -> IO Result)
xrDestroyHandTrackerEXTPtr
Result
r <- String -> IO Result -> IO Result
forall a. String -> IO a -> IO a
traceAroundEvent "xrDestroyHandTrackerEXT" (Ptr HandTrackerEXT_T -> IO Result
xrDestroyHandTrackerEXT' (HandTrackerEXT -> Ptr HandTrackerEXT_T
handTrackerEXTHandle (HandTrackerEXT
handTracker)))
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" mkXrLocateHandJointsEXT
:: FunPtr (Ptr HandTrackerEXT_T -> Ptr HandJointsLocateInfoEXT -> Ptr (SomeStruct HandJointLocationsEXT) -> IO Result) -> Ptr HandTrackerEXT_T -> Ptr HandJointsLocateInfoEXT -> Ptr (SomeStruct HandJointLocationsEXT) -> IO Result
locateHandJointsEXT :: forall a io
. (Extendss HandJointLocationsEXT a, PokeChain a, PeekChain a, MonadIO io)
=>
HandTrackerEXT
->
HandJointsLocateInfoEXT
-> io (Result, HandJointLocationsEXT a)
locateHandJointsEXT :: HandTrackerEXT
-> HandJointsLocateInfoEXT -> io (Result, HandJointLocationsEXT a)
locateHandJointsEXT handTracker :: HandTrackerEXT
handTracker locateInfo :: HandJointsLocateInfoEXT
locateInfo = IO (Result, HandJointLocationsEXT a)
-> io (Result, HandJointLocationsEXT a)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Result, HandJointLocationsEXT a)
-> io (Result, HandJointLocationsEXT a))
-> (ContT
(Result, HandJointLocationsEXT a)
IO
(Result, HandJointLocationsEXT a)
-> IO (Result, HandJointLocationsEXT a))
-> ContT
(Result, HandJointLocationsEXT a)
IO
(Result, HandJointLocationsEXT a)
-> io (Result, HandJointLocationsEXT a)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT
(Result, HandJointLocationsEXT a)
IO
(Result, HandJointLocationsEXT a)
-> IO (Result, HandJointLocationsEXT a)
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT
(Result, HandJointLocationsEXT a)
IO
(Result, HandJointLocationsEXT a)
-> io (Result, HandJointLocationsEXT a))
-> ContT
(Result, HandJointLocationsEXT a)
IO
(Result, HandJointLocationsEXT a)
-> io (Result, HandJointLocationsEXT a)
forall a b. (a -> b) -> a -> b
$ do
let xrLocateHandJointsEXTPtr :: FunPtr
(Ptr HandTrackerEXT_T
-> Ptr HandJointsLocateInfoEXT
-> ("locations" ::: Ptr (SomeStruct HandJointLocationsEXT))
-> IO Result)
xrLocateHandJointsEXTPtr = InstanceCmds
-> FunPtr
(Ptr HandTrackerEXT_T
-> Ptr HandJointsLocateInfoEXT
-> ("locations" ::: Ptr (SomeStruct HandJointLocationsEXT))
-> IO Result)
pXrLocateHandJointsEXT (HandTrackerEXT -> InstanceCmds
instanceCmds (HandTrackerEXT
handTracker :: HandTrackerEXT))
IO () -> ContT (Result, HandJointLocationsEXT a) IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT (Result, HandJointLocationsEXT a) IO ())
-> IO () -> ContT (Result, HandJointLocationsEXT a) IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr HandTrackerEXT_T
-> Ptr HandJointsLocateInfoEXT
-> ("locations" ::: Ptr (SomeStruct HandJointLocationsEXT))
-> IO Result)
xrLocateHandJointsEXTPtr FunPtr
(Ptr HandTrackerEXT_T
-> Ptr HandJointsLocateInfoEXT
-> ("locations" ::: Ptr (SomeStruct HandJointLocationsEXT))
-> IO Result)
-> FunPtr
(Ptr HandTrackerEXT_T
-> Ptr HandJointsLocateInfoEXT
-> ("locations" ::: Ptr (SomeStruct HandJointLocationsEXT))
-> IO Result)
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
(Ptr HandTrackerEXT_T
-> Ptr HandJointsLocateInfoEXT
-> ("locations" ::: Ptr (SomeStruct HandJointLocationsEXT))
-> 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 xrLocateHandJointsEXT is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
let xrLocateHandJointsEXT' :: Ptr HandTrackerEXT_T
-> Ptr HandJointsLocateInfoEXT
-> ("locations" ::: Ptr (SomeStruct HandJointLocationsEXT))
-> IO Result
xrLocateHandJointsEXT' = FunPtr
(Ptr HandTrackerEXT_T
-> Ptr HandJointsLocateInfoEXT
-> ("locations" ::: Ptr (SomeStruct HandJointLocationsEXT))
-> IO Result)
-> Ptr HandTrackerEXT_T
-> Ptr HandJointsLocateInfoEXT
-> ("locations" ::: Ptr (SomeStruct HandJointLocationsEXT))
-> IO Result
mkXrLocateHandJointsEXT FunPtr
(Ptr HandTrackerEXT_T
-> Ptr HandJointsLocateInfoEXT
-> ("locations" ::: Ptr (SomeStruct HandJointLocationsEXT))
-> IO Result)
xrLocateHandJointsEXTPtr
Ptr HandJointsLocateInfoEXT
locateInfo' <- ((Ptr HandJointsLocateInfoEXT
-> IO (Result, HandJointLocationsEXT a))
-> IO (Result, HandJointLocationsEXT a))
-> ContT
(Result, HandJointLocationsEXT a) IO (Ptr HandJointsLocateInfoEXT)
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr HandJointsLocateInfoEXT
-> IO (Result, HandJointLocationsEXT a))
-> IO (Result, HandJointLocationsEXT a))
-> ContT
(Result, HandJointLocationsEXT a) IO (Ptr HandJointsLocateInfoEXT))
-> ((Ptr HandJointsLocateInfoEXT
-> IO (Result, HandJointLocationsEXT a))
-> IO (Result, HandJointLocationsEXT a))
-> ContT
(Result, HandJointLocationsEXT a) IO (Ptr HandJointsLocateInfoEXT)
forall a b. (a -> b) -> a -> b
$ HandJointsLocateInfoEXT
-> (Ptr HandJointsLocateInfoEXT
-> IO (Result, HandJointLocationsEXT a))
-> IO (Result, HandJointLocationsEXT a)
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (HandJointsLocateInfoEXT
locateInfo)
Ptr (HandJointLocationsEXT a)
pLocations <- ((Ptr (HandJointLocationsEXT a)
-> IO (Result, HandJointLocationsEXT a))
-> IO (Result, HandJointLocationsEXT a))
-> ContT
(Result, HandJointLocationsEXT a)
IO
(Ptr (HandJointLocationsEXT a))
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (forall b.
ToCStruct (HandJointLocationsEXT a) =>
(Ptr (HandJointLocationsEXT a) -> IO b) -> IO b
forall a b. ToCStruct a => (Ptr a -> IO b) -> IO b
withZeroCStruct @(HandJointLocationsEXT _))
Result
r <- IO Result -> ContT (Result, HandJointLocationsEXT a) IO Result
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO Result -> ContT (Result, HandJointLocationsEXT a) IO Result)
-> IO Result -> ContT (Result, HandJointLocationsEXT a) IO Result
forall a b. (a -> b) -> a -> b
$ String -> IO Result -> IO Result
forall a. String -> IO a -> IO a
traceAroundEvent "xrLocateHandJointsEXT" (Ptr HandTrackerEXT_T
-> Ptr HandJointsLocateInfoEXT
-> ("locations" ::: Ptr (SomeStruct HandJointLocationsEXT))
-> IO Result
xrLocateHandJointsEXT' (HandTrackerEXT -> Ptr HandTrackerEXT_T
handTrackerEXTHandle (HandTrackerEXT
handTracker)) Ptr HandJointsLocateInfoEXT
locateInfo' (Ptr (HandJointLocationsEXT a)
-> "locations" ::: Ptr (SomeStruct HandJointLocationsEXT)
forall (a :: [*] -> *) (es :: [*]).
Ptr (a es) -> Ptr (SomeStruct a)
forgetExtensions (Ptr (HandJointLocationsEXT a)
pLocations)))
IO () -> ContT (Result, HandJointLocationsEXT a) IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT (Result, HandJointLocationsEXT a) IO ())
-> IO () -> ContT (Result, HandJointLocationsEXT a) 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))
HandJointLocationsEXT a
locations <- IO (HandJointLocationsEXT a)
-> ContT
(Result, HandJointLocationsEXT a) IO (HandJointLocationsEXT a)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO (HandJointLocationsEXT a)
-> ContT
(Result, HandJointLocationsEXT a) IO (HandJointLocationsEXT a))
-> IO (HandJointLocationsEXT a)
-> ContT
(Result, HandJointLocationsEXT a) IO (HandJointLocationsEXT a)
forall a b. (a -> b) -> a -> b
$ Ptr (HandJointLocationsEXT a) -> IO (HandJointLocationsEXT a)
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @(HandJointLocationsEXT _) Ptr (HandJointLocationsEXT a)
pLocations
(Result, HandJointLocationsEXT a)
-> ContT
(Result, HandJointLocationsEXT a)
IO
(Result, HandJointLocationsEXT a)
forall (f :: * -> *) a. Applicative f => a -> f a
pure ((Result, HandJointLocationsEXT a)
-> ContT
(Result, HandJointLocationsEXT a)
IO
(Result, HandJointLocationsEXT a))
-> (Result, HandJointLocationsEXT a)
-> ContT
(Result, HandJointLocationsEXT a)
IO
(Result, HandJointLocationsEXT a)
forall a b. (a -> b) -> a -> b
$ (Result
r, HandJointLocationsEXT a
locations)
data SystemHandTrackingPropertiesEXT = SystemHandTrackingPropertiesEXT
{
SystemHandTrackingPropertiesEXT -> Bool
supportsHandTracking :: Bool }
deriving (Typeable, SystemHandTrackingPropertiesEXT
-> SystemHandTrackingPropertiesEXT -> Bool
(SystemHandTrackingPropertiesEXT
-> SystemHandTrackingPropertiesEXT -> Bool)
-> (SystemHandTrackingPropertiesEXT
-> SystemHandTrackingPropertiesEXT -> Bool)
-> Eq SystemHandTrackingPropertiesEXT
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SystemHandTrackingPropertiesEXT
-> SystemHandTrackingPropertiesEXT -> Bool
$c/= :: SystemHandTrackingPropertiesEXT
-> SystemHandTrackingPropertiesEXT -> Bool
== :: SystemHandTrackingPropertiesEXT
-> SystemHandTrackingPropertiesEXT -> Bool
$c== :: SystemHandTrackingPropertiesEXT
-> SystemHandTrackingPropertiesEXT -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (SystemHandTrackingPropertiesEXT)
#endif
deriving instance Show SystemHandTrackingPropertiesEXT
instance ToCStruct SystemHandTrackingPropertiesEXT where
withCStruct :: SystemHandTrackingPropertiesEXT
-> (Ptr SystemHandTrackingPropertiesEXT -> IO b) -> IO b
withCStruct x :: SystemHandTrackingPropertiesEXT
x f :: Ptr SystemHandTrackingPropertiesEXT -> IO b
f = Int -> Int -> (Ptr SystemHandTrackingPropertiesEXT -> IO b) -> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 24 8 ((Ptr SystemHandTrackingPropertiesEXT -> IO b) -> IO b)
-> (Ptr SystemHandTrackingPropertiesEXT -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \p :: Ptr SystemHandTrackingPropertiesEXT
p -> Ptr SystemHandTrackingPropertiesEXT
-> SystemHandTrackingPropertiesEXT -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr SystemHandTrackingPropertiesEXT
p SystemHandTrackingPropertiesEXT
x (Ptr SystemHandTrackingPropertiesEXT -> IO b
f Ptr SystemHandTrackingPropertiesEXT
p)
pokeCStruct :: Ptr SystemHandTrackingPropertiesEXT
-> SystemHandTrackingPropertiesEXT -> IO b -> IO b
pokeCStruct p :: Ptr SystemHandTrackingPropertiesEXT
p SystemHandTrackingPropertiesEXT{..} f :: IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SystemHandTrackingPropertiesEXT
p Ptr SystemHandTrackingPropertiesEXT -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
TYPE_SYSTEM_HAND_TRACKING_PROPERTIES_EXT)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SystemHandTrackingPropertiesEXT
p Ptr SystemHandTrackingPropertiesEXT -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SystemHandTrackingPropertiesEXT
p Ptr SystemHandTrackingPropertiesEXT -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
supportsHandTracking))
IO b
f
cStructSize :: Int
cStructSize = 24
cStructAlignment :: Int
cStructAlignment = 8
pokeZeroCStruct :: Ptr SystemHandTrackingPropertiesEXT -> IO b -> IO b
pokeZeroCStruct p :: Ptr SystemHandTrackingPropertiesEXT
p f :: IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SystemHandTrackingPropertiesEXT
p Ptr SystemHandTrackingPropertiesEXT -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
TYPE_SYSTEM_HAND_TRACKING_PROPERTIES_EXT)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SystemHandTrackingPropertiesEXT
p Ptr SystemHandTrackingPropertiesEXT -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SystemHandTrackingPropertiesEXT
p Ptr SystemHandTrackingPropertiesEXT -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
IO b
f
instance FromCStruct SystemHandTrackingPropertiesEXT where
peekCStruct :: Ptr SystemHandTrackingPropertiesEXT
-> IO SystemHandTrackingPropertiesEXT
peekCStruct p :: Ptr SystemHandTrackingPropertiesEXT
p = do
Bool32
supportsHandTracking <- Ptr Bool32 -> IO Bool32
forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr SystemHandTrackingPropertiesEXT
p Ptr SystemHandTrackingPropertiesEXT -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Bool32))
SystemHandTrackingPropertiesEXT
-> IO SystemHandTrackingPropertiesEXT
forall (f :: * -> *) a. Applicative f => a -> f a
pure (SystemHandTrackingPropertiesEXT
-> IO SystemHandTrackingPropertiesEXT)
-> SystemHandTrackingPropertiesEXT
-> IO SystemHandTrackingPropertiesEXT
forall a b. (a -> b) -> a -> b
$ Bool -> SystemHandTrackingPropertiesEXT
SystemHandTrackingPropertiesEXT
(Bool32 -> Bool
bool32ToBool Bool32
supportsHandTracking)
instance Storable SystemHandTrackingPropertiesEXT where
sizeOf :: SystemHandTrackingPropertiesEXT -> Int
sizeOf ~SystemHandTrackingPropertiesEXT
_ = 24
alignment :: SystemHandTrackingPropertiesEXT -> Int
alignment ~SystemHandTrackingPropertiesEXT
_ = 8
peek :: Ptr SystemHandTrackingPropertiesEXT
-> IO SystemHandTrackingPropertiesEXT
peek = Ptr SystemHandTrackingPropertiesEXT
-> IO SystemHandTrackingPropertiesEXT
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr SystemHandTrackingPropertiesEXT
-> SystemHandTrackingPropertiesEXT -> IO ()
poke ptr :: Ptr SystemHandTrackingPropertiesEXT
ptr poked :: SystemHandTrackingPropertiesEXT
poked = Ptr SystemHandTrackingPropertiesEXT
-> SystemHandTrackingPropertiesEXT -> IO () -> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr SystemHandTrackingPropertiesEXT
ptr SystemHandTrackingPropertiesEXT
poked (() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero SystemHandTrackingPropertiesEXT where
zero :: SystemHandTrackingPropertiesEXT
zero = Bool -> SystemHandTrackingPropertiesEXT
SystemHandTrackingPropertiesEXT
Bool
forall a. Zero a => a
zero
data HandTrackerCreateInfoEXT (es :: [Type]) = HandTrackerCreateInfoEXT
{
HandTrackerCreateInfoEXT es -> Chain es
next :: Chain es
,
HandTrackerCreateInfoEXT es -> HandEXT
hand :: HandEXT
,
HandTrackerCreateInfoEXT es -> HandJointSetEXT
handJointSet :: HandJointSetEXT
}
deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (HandTrackerCreateInfoEXT (es :: [Type]))
#endif
deriving instance Show (Chain es) => Show (HandTrackerCreateInfoEXT es)
instance Extensible HandTrackerCreateInfoEXT where
extensibleTypeName :: String
extensibleTypeName = "HandTrackerCreateInfoEXT"
setNext :: HandTrackerCreateInfoEXT ds
-> Chain es -> HandTrackerCreateInfoEXT es
setNext x :: HandTrackerCreateInfoEXT ds
x next :: Chain es
next = HandTrackerCreateInfoEXT ds
x{$sel:next:HandTrackerCreateInfoEXT :: Chain es
next = Chain es
next}
getNext :: HandTrackerCreateInfoEXT es -> Chain es
getNext HandTrackerCreateInfoEXT{..} = Chain es
next
extends :: forall e b proxy. Typeable e => proxy e -> (Extends HandTrackerCreateInfoEXT e => b) -> Maybe b
extends :: proxy e -> (Extends HandTrackerCreateInfoEXT e => b) -> Maybe b
extends _ f :: Extends HandTrackerCreateInfoEXT e => b
f
| Just Refl <- (Typeable e, Typeable HandPoseTypeInfoMSFT) =>
Maybe (e :~: HandPoseTypeInfoMSFT)
forall k (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
eqT @e @HandPoseTypeInfoMSFT = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends HandTrackerCreateInfoEXT e => b
f
| Bool
otherwise = Maybe b
forall a. Maybe a
Nothing
instance (Extendss HandTrackerCreateInfoEXT es, PokeChain es) => ToCStruct (HandTrackerCreateInfoEXT es) where
withCStruct :: HandTrackerCreateInfoEXT es
-> (Ptr (HandTrackerCreateInfoEXT es) -> IO b) -> IO b
withCStruct x :: HandTrackerCreateInfoEXT es
x f :: Ptr (HandTrackerCreateInfoEXT es) -> IO b
f = Int -> Int -> (Ptr (HandTrackerCreateInfoEXT es) -> IO b) -> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 24 8 ((Ptr (HandTrackerCreateInfoEXT es) -> IO b) -> IO b)
-> (Ptr (HandTrackerCreateInfoEXT es) -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \p :: Ptr (HandTrackerCreateInfoEXT es)
p -> Ptr (HandTrackerCreateInfoEXT es)
-> HandTrackerCreateInfoEXT es -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr (HandTrackerCreateInfoEXT es)
p HandTrackerCreateInfoEXT es
x (Ptr (HandTrackerCreateInfoEXT es) -> IO b
f Ptr (HandTrackerCreateInfoEXT es)
p)
pokeCStruct :: Ptr (HandTrackerCreateInfoEXT es)
-> HandTrackerCreateInfoEXT es -> IO b -> IO b
pokeCStruct p :: Ptr (HandTrackerCreateInfoEXT es)
p HandTrackerCreateInfoEXT{..} 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 (HandTrackerCreateInfoEXT es)
p Ptr (HandTrackerCreateInfoEXT es) -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
TYPE_HAND_TRACKER_CREATE_INFO_EXT)
Ptr ()
next'' <- (Ptr (Chain es) -> Ptr ())
-> ContT b IO (Ptr (Chain es)) -> ContT b IO (Ptr ())
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap Ptr (Chain es) -> Ptr ()
forall a b. Ptr a -> Ptr b
castPtr (ContT b IO (Ptr (Chain es)) -> ContT b IO (Ptr ()))
-> (((Ptr (Chain es) -> IO b) -> IO b)
-> ContT b IO (Ptr (Chain es)))
-> ((Ptr (Chain es) -> IO b) -> IO b)
-> ContT b IO (Ptr ())
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ((Ptr (Chain es) -> IO b) -> IO b) -> ContT b IO (Ptr (Chain es))
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr (Chain es) -> IO b) -> IO b) -> ContT b IO (Ptr ()))
-> ((Ptr (Chain es) -> IO b) -> IO b) -> ContT b IO (Ptr ())
forall a b. (a -> b) -> a -> b
$ Chain es -> (Ptr (Chain es) -> IO b) -> IO b
forall (es :: [*]) a.
PokeChain es =>
Chain es -> (Ptr (Chain es) -> IO a) -> IO a
withChain (Chain es
next)
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 (HandTrackerCreateInfoEXT es)
p Ptr (HandTrackerCreateInfoEXT es) -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) Ptr ()
next''
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 HandEXT -> HandEXT -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (HandTrackerCreateInfoEXT es)
p Ptr (HandTrackerCreateInfoEXT es) -> Int -> Ptr HandEXT
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr HandEXT)) (HandEXT
hand)
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 HandJointSetEXT -> HandJointSetEXT -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (HandTrackerCreateInfoEXT es)
p Ptr (HandTrackerCreateInfoEXT es) -> Int -> Ptr HandJointSetEXT
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 20 :: Ptr HandJointSetEXT)) (HandJointSetEXT
handJointSet)
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 :: Ptr (HandTrackerCreateInfoEXT es) -> IO b -> IO b
pokeZeroCStruct p :: Ptr (HandTrackerCreateInfoEXT es)
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 (HandTrackerCreateInfoEXT es)
p Ptr (HandTrackerCreateInfoEXT es) -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
TYPE_HAND_TRACKER_CREATE_INFO_EXT)
Ptr ()
pNext' <- (Ptr (Chain es) -> Ptr ())
-> ContT b IO (Ptr (Chain es)) -> ContT b IO (Ptr ())
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap Ptr (Chain es) -> Ptr ()
forall a b. Ptr a -> Ptr b
castPtr (ContT b IO (Ptr (Chain es)) -> ContT b IO (Ptr ()))
-> (((Ptr (Chain es) -> IO b) -> IO b)
-> ContT b IO (Ptr (Chain es)))
-> ((Ptr (Chain es) -> IO b) -> IO b)
-> ContT b IO (Ptr ())
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ((Ptr (Chain es) -> IO b) -> IO b) -> ContT b IO (Ptr (Chain es))
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr (Chain es) -> IO b) -> IO b) -> ContT b IO (Ptr ()))
-> ((Ptr (Chain es) -> IO b) -> IO b) -> ContT b IO (Ptr ())
forall a b. (a -> b) -> a -> b
$ forall a. PokeChain es => (Ptr (Chain es) -> IO a) -> IO a
forall (es :: [*]) a.
PokeChain es =>
(Ptr (Chain es) -> IO a) -> IO a
withZeroChain @es
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 (HandTrackerCreateInfoEXT es)
p Ptr (HandTrackerCreateInfoEXT es) -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) Ptr ()
pNext'
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 HandEXT -> HandEXT -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (HandTrackerCreateInfoEXT es)
p Ptr (HandTrackerCreateInfoEXT es) -> Int -> Ptr HandEXT
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr HandEXT)) (HandEXT
forall a. Zero a => a
zero)
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 HandJointSetEXT -> HandJointSetEXT -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (HandTrackerCreateInfoEXT es)
p Ptr (HandTrackerCreateInfoEXT es) -> Int -> Ptr HandJointSetEXT
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 20 :: Ptr HandJointSetEXT)) (HandJointSetEXT
forall a. Zero a => a
zero)
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 (Extendss HandTrackerCreateInfoEXT es, PeekChain es) => FromCStruct (HandTrackerCreateInfoEXT es) where
peekCStruct :: Ptr (HandTrackerCreateInfoEXT es)
-> IO (HandTrackerCreateInfoEXT es)
peekCStruct p :: Ptr (HandTrackerCreateInfoEXT es)
p = do
Ptr ()
next <- Ptr (Ptr ()) -> IO (Ptr ())
forall a. Storable a => Ptr a -> IO a
peek @(Ptr ()) ((Ptr (HandTrackerCreateInfoEXT es)
p Ptr (HandTrackerCreateInfoEXT es) -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ())))
Chain es
next' <- Ptr (Chain es) -> IO (Chain es)
forall (es :: [*]). PeekChain es => Ptr (Chain es) -> IO (Chain es)
peekChain (Ptr () -> Ptr (Chain es)
forall a b. Ptr a -> Ptr b
castPtr Ptr ()
next)
HandEXT
hand <- Ptr HandEXT -> IO HandEXT
forall a. Storable a => Ptr a -> IO a
peek @HandEXT ((Ptr (HandTrackerCreateInfoEXT es)
p Ptr (HandTrackerCreateInfoEXT es) -> Int -> Ptr HandEXT
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr HandEXT))
HandJointSetEXT
handJointSet <- Ptr HandJointSetEXT -> IO HandJointSetEXT
forall a. Storable a => Ptr a -> IO a
peek @HandJointSetEXT ((Ptr (HandTrackerCreateInfoEXT es)
p Ptr (HandTrackerCreateInfoEXT es) -> Int -> Ptr HandJointSetEXT
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 20 :: Ptr HandJointSetEXT))
HandTrackerCreateInfoEXT es -> IO (HandTrackerCreateInfoEXT es)
forall (f :: * -> *) a. Applicative f => a -> f a
pure (HandTrackerCreateInfoEXT es -> IO (HandTrackerCreateInfoEXT es))
-> HandTrackerCreateInfoEXT es -> IO (HandTrackerCreateInfoEXT es)
forall a b. (a -> b) -> a -> b
$ Chain es
-> HandEXT -> HandJointSetEXT -> HandTrackerCreateInfoEXT es
forall (es :: [*]).
Chain es
-> HandEXT -> HandJointSetEXT -> HandTrackerCreateInfoEXT es
HandTrackerCreateInfoEXT
Chain es
next' HandEXT
hand HandJointSetEXT
handJointSet
instance es ~ '[] => Zero (HandTrackerCreateInfoEXT es) where
zero :: HandTrackerCreateInfoEXT es
zero = Chain es
-> HandEXT -> HandJointSetEXT -> HandTrackerCreateInfoEXT es
forall (es :: [*]).
Chain es
-> HandEXT -> HandJointSetEXT -> HandTrackerCreateInfoEXT es
HandTrackerCreateInfoEXT
()
HandEXT
forall a. Zero a => a
zero
HandJointSetEXT
forall a. Zero a => a
zero
data HandJointsLocateInfoEXT = HandJointsLocateInfoEXT
{
HandJointsLocateInfoEXT -> Ptr Space_T
baseSpace :: Ptr Space_T
,
HandJointsLocateInfoEXT -> Time
time :: Time
}
deriving (Typeable, HandJointsLocateInfoEXT -> HandJointsLocateInfoEXT -> Bool
(HandJointsLocateInfoEXT -> HandJointsLocateInfoEXT -> Bool)
-> (HandJointsLocateInfoEXT -> HandJointsLocateInfoEXT -> Bool)
-> Eq HandJointsLocateInfoEXT
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: HandJointsLocateInfoEXT -> HandJointsLocateInfoEXT -> Bool
$c/= :: HandJointsLocateInfoEXT -> HandJointsLocateInfoEXT -> Bool
== :: HandJointsLocateInfoEXT -> HandJointsLocateInfoEXT -> Bool
$c== :: HandJointsLocateInfoEXT -> HandJointsLocateInfoEXT -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (HandJointsLocateInfoEXT)
#endif
deriving instance Show HandJointsLocateInfoEXT
instance ToCStruct HandJointsLocateInfoEXT where
withCStruct :: HandJointsLocateInfoEXT
-> (Ptr HandJointsLocateInfoEXT -> IO b) -> IO b
withCStruct x :: HandJointsLocateInfoEXT
x f :: Ptr HandJointsLocateInfoEXT -> IO b
f = Int -> Int -> (Ptr HandJointsLocateInfoEXT -> IO b) -> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 32 8 ((Ptr HandJointsLocateInfoEXT -> IO b) -> IO b)
-> (Ptr HandJointsLocateInfoEXT -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \p :: Ptr HandJointsLocateInfoEXT
p -> Ptr HandJointsLocateInfoEXT
-> HandJointsLocateInfoEXT -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr HandJointsLocateInfoEXT
p HandJointsLocateInfoEXT
x (Ptr HandJointsLocateInfoEXT -> IO b
f Ptr HandJointsLocateInfoEXT
p)
pokeCStruct :: Ptr HandJointsLocateInfoEXT
-> HandJointsLocateInfoEXT -> IO b -> IO b
pokeCStruct p :: Ptr HandJointsLocateInfoEXT
p HandJointsLocateInfoEXT{..} f :: IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr HandJointsLocateInfoEXT
p Ptr HandJointsLocateInfoEXT -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
TYPE_HAND_JOINTS_LOCATE_INFO_EXT)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr HandJointsLocateInfoEXT
p Ptr HandJointsLocateInfoEXT -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr (Ptr Space_T) -> Ptr Space_T -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr HandJointsLocateInfoEXT
p Ptr HandJointsLocateInfoEXT -> Int -> Ptr (Ptr Space_T)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr (Ptr Space_T))) (Ptr Space_T
baseSpace)
Ptr Time -> Time -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr HandJointsLocateInfoEXT
p Ptr HandJointsLocateInfoEXT -> Int -> Ptr Time
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr Time)) (Time
time)
IO b
f
cStructSize :: Int
cStructSize = 32
cStructAlignment :: Int
cStructAlignment = 8
pokeZeroCStruct :: Ptr HandJointsLocateInfoEXT -> IO b -> IO b
pokeZeroCStruct p :: Ptr HandJointsLocateInfoEXT
p f :: IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr HandJointsLocateInfoEXT
p Ptr HandJointsLocateInfoEXT -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
TYPE_HAND_JOINTS_LOCATE_INFO_EXT)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr HandJointsLocateInfoEXT
p Ptr HandJointsLocateInfoEXT -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr (Ptr Space_T) -> Ptr Space_T -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr HandJointsLocateInfoEXT
p Ptr HandJointsLocateInfoEXT -> Int -> Ptr (Ptr Space_T)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr (Ptr Space_T))) (Ptr Space_T
forall a. Zero a => a
zero)
Ptr Time -> Time -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr HandJointsLocateInfoEXT
p Ptr HandJointsLocateInfoEXT -> Int -> Ptr Time
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr Time)) (Time
forall a. Zero a => a
zero)
IO b
f
instance FromCStruct HandJointsLocateInfoEXT where
peekCStruct :: Ptr HandJointsLocateInfoEXT -> IO HandJointsLocateInfoEXT
peekCStruct p :: Ptr HandJointsLocateInfoEXT
p = do
Ptr Space_T
baseSpace <- Ptr (Ptr Space_T) -> IO (Ptr Space_T)
forall a. Storable a => Ptr a -> IO a
peek @(Ptr Space_T) ((Ptr HandJointsLocateInfoEXT
p Ptr HandJointsLocateInfoEXT -> Int -> Ptr (Ptr Space_T)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr (Ptr Space_T)))
Time
time <- Ptr Time -> IO Time
forall a. Storable a => Ptr a -> IO a
peek @Time ((Ptr HandJointsLocateInfoEXT
p Ptr HandJointsLocateInfoEXT -> Int -> Ptr Time
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr Time))
HandJointsLocateInfoEXT -> IO HandJointsLocateInfoEXT
forall (f :: * -> *) a. Applicative f => a -> f a
pure (HandJointsLocateInfoEXT -> IO HandJointsLocateInfoEXT)
-> HandJointsLocateInfoEXT -> IO HandJointsLocateInfoEXT
forall a b. (a -> b) -> a -> b
$ Ptr Space_T -> Time -> HandJointsLocateInfoEXT
HandJointsLocateInfoEXT
Ptr Space_T
baseSpace Time
time
instance Storable HandJointsLocateInfoEXT where
sizeOf :: HandJointsLocateInfoEXT -> Int
sizeOf ~HandJointsLocateInfoEXT
_ = 32
alignment :: HandJointsLocateInfoEXT -> Int
alignment ~HandJointsLocateInfoEXT
_ = 8
peek :: Ptr HandJointsLocateInfoEXT -> IO HandJointsLocateInfoEXT
peek = Ptr HandJointsLocateInfoEXT -> IO HandJointsLocateInfoEXT
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr HandJointsLocateInfoEXT -> HandJointsLocateInfoEXT -> IO ()
poke ptr :: Ptr HandJointsLocateInfoEXT
ptr poked :: HandJointsLocateInfoEXT
poked = Ptr HandJointsLocateInfoEXT
-> HandJointsLocateInfoEXT -> IO () -> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr HandJointsLocateInfoEXT
ptr HandJointsLocateInfoEXT
poked (() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero HandJointsLocateInfoEXT where
zero :: HandJointsLocateInfoEXT
zero = Ptr Space_T -> Time -> HandJointsLocateInfoEXT
HandJointsLocateInfoEXT
Ptr Space_T
forall a. Zero a => a
zero
Time
forall a. Zero a => a
zero
data HandJointLocationEXT = HandJointLocationEXT
{
HandJointLocationEXT -> SpaceLocationFlags
locationFlags :: SpaceLocationFlags
,
HandJointLocationEXT -> Posef
pose :: Posef
,
HandJointLocationEXT -> Float
radius :: Float
}
deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (HandJointLocationEXT)
#endif
deriving instance Show HandJointLocationEXT
instance ToCStruct HandJointLocationEXT where
withCStruct :: HandJointLocationEXT -> (Ptr HandJointLocationEXT -> IO b) -> IO b
withCStruct x :: HandJointLocationEXT
x f :: Ptr HandJointLocationEXT -> IO b
f = Int -> Int -> (Ptr HandJointLocationEXT -> IO b) -> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 36 4 ((Ptr HandJointLocationEXT -> IO b) -> IO b)
-> (Ptr HandJointLocationEXT -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \p :: Ptr HandJointLocationEXT
p -> Ptr HandJointLocationEXT -> HandJointLocationEXT -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr HandJointLocationEXT
p HandJointLocationEXT
x (Ptr HandJointLocationEXT -> IO b
f Ptr HandJointLocationEXT
p)
pokeCStruct :: Ptr HandJointLocationEXT -> HandJointLocationEXT -> IO b -> IO b
pokeCStruct p :: Ptr HandJointLocationEXT
p HandJointLocationEXT{..} f :: IO b
f = do
Ptr SpaceLocationFlags -> SpaceLocationFlags -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr HandJointLocationEXT
p Ptr HandJointLocationEXT -> Int -> Ptr SpaceLocationFlags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr SpaceLocationFlags)) (SpaceLocationFlags
locationFlags)
Ptr Posef -> Posef -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr HandJointLocationEXT
p Ptr HandJointLocationEXT -> Int -> Ptr Posef
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 4 :: Ptr Posef)) (Posef
pose)
Ptr CFloat -> CFloat -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr HandJointLocationEXT
p Ptr HandJointLocationEXT -> Int -> Ptr CFloat
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32 :: Ptr CFloat)) (Float -> CFloat
CFloat (Float
radius))
IO b
f
cStructSize :: Int
cStructSize = 36
cStructAlignment :: Int
cStructAlignment = 4
pokeZeroCStruct :: Ptr HandJointLocationEXT -> IO b -> IO b
pokeZeroCStruct p :: Ptr HandJointLocationEXT
p f :: IO b
f = do
Ptr SpaceLocationFlags -> SpaceLocationFlags -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr HandJointLocationEXT
p Ptr HandJointLocationEXT -> Int -> Ptr SpaceLocationFlags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr SpaceLocationFlags)) (SpaceLocationFlags
forall a. Zero a => a
zero)
Ptr Posef -> Posef -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr HandJointLocationEXT
p Ptr HandJointLocationEXT -> Int -> Ptr Posef
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 4 :: Ptr Posef)) (Posef
forall a. Zero a => a
zero)
Ptr CFloat -> CFloat -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr HandJointLocationEXT
p Ptr HandJointLocationEXT -> Int -> Ptr CFloat
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32 :: Ptr CFloat)) (Float -> CFloat
CFloat (Float
forall a. Zero a => a
zero))
IO b
f
instance FromCStruct HandJointLocationEXT where
peekCStruct :: Ptr HandJointLocationEXT -> IO HandJointLocationEXT
peekCStruct p :: Ptr HandJointLocationEXT
p = do
SpaceLocationFlags
locationFlags <- Ptr SpaceLocationFlags -> IO SpaceLocationFlags
forall a. Storable a => Ptr a -> IO a
peek @SpaceLocationFlags ((Ptr HandJointLocationEXT
p Ptr HandJointLocationEXT -> Int -> Ptr SpaceLocationFlags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr SpaceLocationFlags))
Posef
pose <- Ptr Posef -> IO Posef
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @Posef ((Ptr HandJointLocationEXT
p Ptr HandJointLocationEXT -> Int -> Ptr Posef
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 4 :: Ptr Posef))
CFloat
radius <- Ptr CFloat -> IO CFloat
forall a. Storable a => Ptr a -> IO a
peek @CFloat ((Ptr HandJointLocationEXT
p Ptr HandJointLocationEXT -> Int -> Ptr CFloat
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32 :: Ptr CFloat))
HandJointLocationEXT -> IO HandJointLocationEXT
forall (f :: * -> *) a. Applicative f => a -> f a
pure (HandJointLocationEXT -> IO HandJointLocationEXT)
-> HandJointLocationEXT -> IO HandJointLocationEXT
forall a b. (a -> b) -> a -> b
$ SpaceLocationFlags -> Posef -> Float -> HandJointLocationEXT
HandJointLocationEXT
SpaceLocationFlags
locationFlags Posef
pose (CFloat -> Float
forall a b. Coercible a b => a -> b
coerce @CFloat @Float CFloat
radius)
instance Storable HandJointLocationEXT where
sizeOf :: HandJointLocationEXT -> Int
sizeOf ~HandJointLocationEXT
_ = 36
alignment :: HandJointLocationEXT -> Int
alignment ~HandJointLocationEXT
_ = 4
peek :: Ptr HandJointLocationEXT -> IO HandJointLocationEXT
peek = Ptr HandJointLocationEXT -> IO HandJointLocationEXT
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr HandJointLocationEXT -> HandJointLocationEXT -> IO ()
poke ptr :: Ptr HandJointLocationEXT
ptr poked :: HandJointLocationEXT
poked = Ptr HandJointLocationEXT -> HandJointLocationEXT -> IO () -> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr HandJointLocationEXT
ptr HandJointLocationEXT
poked (() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero HandJointLocationEXT where
zero :: HandJointLocationEXT
zero = SpaceLocationFlags -> Posef -> Float -> HandJointLocationEXT
HandJointLocationEXT
SpaceLocationFlags
forall a. Zero a => a
zero
Posef
forall a. Zero a => a
zero
Float
forall a. Zero a => a
zero
data HandJointVelocityEXT = HandJointVelocityEXT
{
HandJointVelocityEXT -> SpaceVelocityFlags
velocityFlags :: SpaceVelocityFlags
,
HandJointVelocityEXT -> Vector3f
linearVelocity :: Vector3f
,
HandJointVelocityEXT -> Vector3f
angularVelocity :: Vector3f
}
deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (HandJointVelocityEXT)
#endif
deriving instance Show HandJointVelocityEXT
instance ToCStruct HandJointVelocityEXT where
withCStruct :: HandJointVelocityEXT -> (Ptr HandJointVelocityEXT -> IO b) -> IO b
withCStruct x :: HandJointVelocityEXT
x f :: Ptr HandJointVelocityEXT -> IO b
f = Int -> Int -> (Ptr HandJointVelocityEXT -> IO b) -> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 28 4 ((Ptr HandJointVelocityEXT -> IO b) -> IO b)
-> (Ptr HandJointVelocityEXT -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \p :: Ptr HandJointVelocityEXT
p -> Ptr HandJointVelocityEXT -> HandJointVelocityEXT -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr HandJointVelocityEXT
p HandJointVelocityEXT
x (Ptr HandJointVelocityEXT -> IO b
f Ptr HandJointVelocityEXT
p)
pokeCStruct :: Ptr HandJointVelocityEXT -> HandJointVelocityEXT -> IO b -> IO b
pokeCStruct p :: Ptr HandJointVelocityEXT
p HandJointVelocityEXT{..} f :: IO b
f = do
Ptr SpaceVelocityFlags -> SpaceVelocityFlags -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr HandJointVelocityEXT
p Ptr HandJointVelocityEXT -> Int -> Ptr SpaceVelocityFlags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr SpaceVelocityFlags)) (SpaceVelocityFlags
velocityFlags)
Ptr Vector3f -> Vector3f -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr HandJointVelocityEXT
p Ptr HandJointVelocityEXT -> Int -> Ptr Vector3f
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 4 :: Ptr Vector3f)) (Vector3f
linearVelocity)
Ptr Vector3f -> Vector3f -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr HandJointVelocityEXT
p Ptr HandJointVelocityEXT -> Int -> Ptr Vector3f
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Vector3f)) (Vector3f
angularVelocity)
IO b
f
cStructSize :: Int
cStructSize = 28
cStructAlignment :: Int
cStructAlignment = 4
pokeZeroCStruct :: Ptr HandJointVelocityEXT -> IO b -> IO b
pokeZeroCStruct p :: Ptr HandJointVelocityEXT
p f :: IO b
f = do
Ptr SpaceVelocityFlags -> SpaceVelocityFlags -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr HandJointVelocityEXT
p Ptr HandJointVelocityEXT -> Int -> Ptr SpaceVelocityFlags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr SpaceVelocityFlags)) (SpaceVelocityFlags
forall a. Zero a => a
zero)
Ptr Vector3f -> Vector3f -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr HandJointVelocityEXT
p Ptr HandJointVelocityEXT -> Int -> Ptr Vector3f
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 4 :: Ptr Vector3f)) (Vector3f
forall a. Zero a => a
zero)
Ptr Vector3f -> Vector3f -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr HandJointVelocityEXT
p Ptr HandJointVelocityEXT -> Int -> Ptr Vector3f
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Vector3f)) (Vector3f
forall a. Zero a => a
zero)
IO b
f
instance FromCStruct HandJointVelocityEXT where
peekCStruct :: Ptr HandJointVelocityEXT -> IO HandJointVelocityEXT
peekCStruct p :: Ptr HandJointVelocityEXT
p = do
SpaceVelocityFlags
velocityFlags <- Ptr SpaceVelocityFlags -> IO SpaceVelocityFlags
forall a. Storable a => Ptr a -> IO a
peek @SpaceVelocityFlags ((Ptr HandJointVelocityEXT
p Ptr HandJointVelocityEXT -> Int -> Ptr SpaceVelocityFlags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr SpaceVelocityFlags))
Vector3f
linearVelocity <- Ptr Vector3f -> IO Vector3f
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @Vector3f ((Ptr HandJointVelocityEXT
p Ptr HandJointVelocityEXT -> Int -> Ptr Vector3f
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 4 :: Ptr Vector3f))
Vector3f
angularVelocity <- Ptr Vector3f -> IO Vector3f
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @Vector3f ((Ptr HandJointVelocityEXT
p Ptr HandJointVelocityEXT -> Int -> Ptr Vector3f
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Vector3f))
HandJointVelocityEXT -> IO HandJointVelocityEXT
forall (f :: * -> *) a. Applicative f => a -> f a
pure (HandJointVelocityEXT -> IO HandJointVelocityEXT)
-> HandJointVelocityEXT -> IO HandJointVelocityEXT
forall a b. (a -> b) -> a -> b
$ SpaceVelocityFlags -> Vector3f -> Vector3f -> HandJointVelocityEXT
HandJointVelocityEXT
SpaceVelocityFlags
velocityFlags Vector3f
linearVelocity Vector3f
angularVelocity
instance Storable HandJointVelocityEXT where
sizeOf :: HandJointVelocityEXT -> Int
sizeOf ~HandJointVelocityEXT
_ = 28
alignment :: HandJointVelocityEXT -> Int
alignment ~HandJointVelocityEXT
_ = 4
peek :: Ptr HandJointVelocityEXT -> IO HandJointVelocityEXT
peek = Ptr HandJointVelocityEXT -> IO HandJointVelocityEXT
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr HandJointVelocityEXT -> HandJointVelocityEXT -> IO ()
poke ptr :: Ptr HandJointVelocityEXT
ptr poked :: HandJointVelocityEXT
poked = Ptr HandJointVelocityEXT -> HandJointVelocityEXT -> IO () -> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr HandJointVelocityEXT
ptr HandJointVelocityEXT
poked (() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero HandJointVelocityEXT where
zero :: HandJointVelocityEXT
zero = SpaceVelocityFlags -> Vector3f -> Vector3f -> HandJointVelocityEXT
HandJointVelocityEXT
SpaceVelocityFlags
forall a. Zero a => a
zero
Vector3f
forall a. Zero a => a
zero
Vector3f
forall a. Zero a => a
zero
data HandJointLocationsEXT (es :: [Type]) = HandJointLocationsEXT
{
HandJointLocationsEXT es -> Chain es
next :: Chain es
,
HandJointLocationsEXT es -> Bool
isActive :: Bool
,
HandJointLocationsEXT es -> Word32
jointCount :: Word32
,
HandJointLocationsEXT es -> Ptr HandJointLocationEXT
jointLocations :: Ptr HandJointLocationEXT
}
deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (HandJointLocationsEXT (es :: [Type]))
#endif
deriving instance Show (Chain es) => Show (HandJointLocationsEXT es)
instance Extensible HandJointLocationsEXT where
extensibleTypeName :: String
extensibleTypeName = "HandJointLocationsEXT"
setNext :: HandJointLocationsEXT ds -> Chain es -> HandJointLocationsEXT es
setNext x :: HandJointLocationsEXT ds
x next :: Chain es
next = HandJointLocationsEXT ds
x{$sel:next:HandJointLocationsEXT :: Chain es
next = Chain es
next}
getNext :: HandJointLocationsEXT es -> Chain es
getNext HandJointLocationsEXT{..} = Chain es
next
extends :: forall e b proxy. Typeable e => proxy e -> (Extends HandJointLocationsEXT e => b) -> Maybe b
extends :: proxy e -> (Extends HandJointLocationsEXT e => b) -> Maybe b
extends _ f :: Extends HandJointLocationsEXT e => b
f
| Just Refl <- (Typeable e, Typeable HandJointVelocitiesEXT) =>
Maybe (e :~: HandJointVelocitiesEXT)
forall k (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
eqT @e @HandJointVelocitiesEXT = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends HandJointLocationsEXT e => b
f
| Bool
otherwise = Maybe b
forall a. Maybe a
Nothing
instance (Extendss HandJointLocationsEXT es, PokeChain es) => ToCStruct (HandJointLocationsEXT es) where
withCStruct :: HandJointLocationsEXT es
-> (Ptr (HandJointLocationsEXT es) -> IO b) -> IO b
withCStruct x :: HandJointLocationsEXT es
x f :: Ptr (HandJointLocationsEXT es) -> IO b
f = Int -> Int -> (Ptr (HandJointLocationsEXT es) -> IO b) -> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 32 8 ((Ptr (HandJointLocationsEXT es) -> IO b) -> IO b)
-> (Ptr (HandJointLocationsEXT es) -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \p :: Ptr (HandJointLocationsEXT es)
p -> Ptr (HandJointLocationsEXT es)
-> HandJointLocationsEXT es -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr (HandJointLocationsEXT es)
p HandJointLocationsEXT es
x (Ptr (HandJointLocationsEXT es) -> IO b
f Ptr (HandJointLocationsEXT es)
p)
pokeCStruct :: Ptr (HandJointLocationsEXT es)
-> HandJointLocationsEXT es -> IO b -> IO b
pokeCStruct p :: Ptr (HandJointLocationsEXT es)
p HandJointLocationsEXT{..} 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 (HandJointLocationsEXT es)
p Ptr (HandJointLocationsEXT es) -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
TYPE_HAND_JOINT_LOCATIONS_EXT)
Ptr ()
next'' <- (Ptr (Chain es) -> Ptr ())
-> ContT b IO (Ptr (Chain es)) -> ContT b IO (Ptr ())
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap Ptr (Chain es) -> Ptr ()
forall a b. Ptr a -> Ptr b
castPtr (ContT b IO (Ptr (Chain es)) -> ContT b IO (Ptr ()))
-> (((Ptr (Chain es) -> IO b) -> IO b)
-> ContT b IO (Ptr (Chain es)))
-> ((Ptr (Chain es) -> IO b) -> IO b)
-> ContT b IO (Ptr ())
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ((Ptr (Chain es) -> IO b) -> IO b) -> ContT b IO (Ptr (Chain es))
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr (Chain es) -> IO b) -> IO b) -> ContT b IO (Ptr ()))
-> ((Ptr (Chain es) -> IO b) -> IO b) -> ContT b IO (Ptr ())
forall a b. (a -> b) -> a -> b
$ Chain es -> (Ptr (Chain es) -> IO b) -> IO b
forall (es :: [*]) a.
PokeChain es =>
Chain es -> (Ptr (Chain es) -> IO a) -> IO a
withChain (Chain es
next)
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 (HandJointLocationsEXT es)
p Ptr (HandJointLocationsEXT es) -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) Ptr ()
next''
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 Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (HandJointLocationsEXT es)
p Ptr (HandJointLocationsEXT es) -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
isActive))
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 (HandJointLocationsEXT es)
p Ptr (HandJointLocationsEXT es) -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 20 :: Ptr Word32)) (Word32
jointCount)
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 HandJointLocationEXT) -> Ptr HandJointLocationEXT -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (HandJointLocationsEXT es)
p Ptr (HandJointLocationsEXT es)
-> Int -> Ptr (Ptr HandJointLocationEXT)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr (Ptr HandJointLocationEXT))) (Ptr HandJointLocationEXT
jointLocations)
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 = 32
cStructAlignment :: Int
cStructAlignment = 8
pokeZeroCStruct :: Ptr (HandJointLocationsEXT es) -> IO b -> IO b
pokeZeroCStruct p :: Ptr (HandJointLocationsEXT es)
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 (HandJointLocationsEXT es)
p Ptr (HandJointLocationsEXT es) -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
TYPE_HAND_JOINT_LOCATIONS_EXT)
Ptr ()
pNext' <- (Ptr (Chain es) -> Ptr ())
-> ContT b IO (Ptr (Chain es)) -> ContT b IO (Ptr ())
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap Ptr (Chain es) -> Ptr ()
forall a b. Ptr a -> Ptr b
castPtr (ContT b IO (Ptr (Chain es)) -> ContT b IO (Ptr ()))
-> (((Ptr (Chain es) -> IO b) -> IO b)
-> ContT b IO (Ptr (Chain es)))
-> ((Ptr (Chain es) -> IO b) -> IO b)
-> ContT b IO (Ptr ())
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ((Ptr (Chain es) -> IO b) -> IO b) -> ContT b IO (Ptr (Chain es))
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr (Chain es) -> IO b) -> IO b) -> ContT b IO (Ptr ()))
-> ((Ptr (Chain es) -> IO b) -> IO b) -> ContT b IO (Ptr ())
forall a b. (a -> b) -> a -> b
$ forall a. PokeChain es => (Ptr (Chain es) -> IO a) -> IO a
forall (es :: [*]) a.
PokeChain es =>
(Ptr (Chain es) -> IO a) -> IO a
withZeroChain @es
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 (HandJointLocationsEXT es)
p Ptr (HandJointLocationsEXT es) -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) Ptr ()
pNext'
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 Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (HandJointLocationsEXT es)
p Ptr (HandJointLocationsEXT es) -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
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 (HandJointLocationsEXT es)
p Ptr (HandJointLocationsEXT es) -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 20 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
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 HandJointLocationEXT) -> Ptr HandJointLocationEXT -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (HandJointLocationsEXT es)
p Ptr (HandJointLocationsEXT es)
-> Int -> Ptr (Ptr HandJointLocationEXT)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr (Ptr HandJointLocationEXT))) (Ptr HandJointLocationEXT
forall a. Zero a => a
zero)
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 (Extendss HandJointLocationsEXT es, PeekChain es) => FromCStruct (HandJointLocationsEXT es) where
peekCStruct :: Ptr (HandJointLocationsEXT es) -> IO (HandJointLocationsEXT es)
peekCStruct p :: Ptr (HandJointLocationsEXT es)
p = do
Ptr ()
next <- Ptr (Ptr ()) -> IO (Ptr ())
forall a. Storable a => Ptr a -> IO a
peek @(Ptr ()) ((Ptr (HandJointLocationsEXT es)
p Ptr (HandJointLocationsEXT es) -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ())))
Chain es
next' <- Ptr (Chain es) -> IO (Chain es)
forall (es :: [*]). PeekChain es => Ptr (Chain es) -> IO (Chain es)
peekChain (Ptr () -> Ptr (Chain es)
forall a b. Ptr a -> Ptr b
castPtr Ptr ()
next)
Bool32
isActive <- Ptr Bool32 -> IO Bool32
forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr (HandJointLocationsEXT es)
p Ptr (HandJointLocationsEXT es) -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Bool32))
Word32
jointCount <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr (HandJointLocationsEXT es)
p Ptr (HandJointLocationsEXT es) -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 20 :: Ptr Word32))
Ptr HandJointLocationEXT
jointLocations <- Ptr (Ptr HandJointLocationEXT) -> IO (Ptr HandJointLocationEXT)
forall a. Storable a => Ptr a -> IO a
peek @(Ptr HandJointLocationEXT) ((Ptr (HandJointLocationsEXT es)
p Ptr (HandJointLocationsEXT es)
-> Int -> Ptr (Ptr HandJointLocationEXT)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr (Ptr HandJointLocationEXT)))
HandJointLocationsEXT es -> IO (HandJointLocationsEXT es)
forall (f :: * -> *) a. Applicative f => a -> f a
pure (HandJointLocationsEXT es -> IO (HandJointLocationsEXT es))
-> HandJointLocationsEXT es -> IO (HandJointLocationsEXT es)
forall a b. (a -> b) -> a -> b
$ Chain es
-> Bool
-> Word32
-> Ptr HandJointLocationEXT
-> HandJointLocationsEXT es
forall (es :: [*]).
Chain es
-> Bool
-> Word32
-> Ptr HandJointLocationEXT
-> HandJointLocationsEXT es
HandJointLocationsEXT
Chain es
next' (Bool32 -> Bool
bool32ToBool Bool32
isActive) Word32
jointCount Ptr HandJointLocationEXT
jointLocations
instance es ~ '[] => Zero (HandJointLocationsEXT es) where
zero :: HandJointLocationsEXT es
zero = Chain es
-> Bool
-> Word32
-> Ptr HandJointLocationEXT
-> HandJointLocationsEXT es
forall (es :: [*]).
Chain es
-> Bool
-> Word32
-> Ptr HandJointLocationEXT
-> HandJointLocationsEXT es
HandJointLocationsEXT
()
Bool
forall a. Zero a => a
zero
Word32
forall a. Zero a => a
zero
Ptr HandJointLocationEXT
forall a. Zero a => a
zero
data HandJointVelocitiesEXT = HandJointVelocitiesEXT
{
HandJointVelocitiesEXT -> Word32
jointCount :: Word32
,
HandJointVelocitiesEXT -> Ptr HandJointVelocityEXT
jointVelocities :: Ptr HandJointVelocityEXT
}
deriving (Typeable, HandJointVelocitiesEXT -> HandJointVelocitiesEXT -> Bool
(HandJointVelocitiesEXT -> HandJointVelocitiesEXT -> Bool)
-> (HandJointVelocitiesEXT -> HandJointVelocitiesEXT -> Bool)
-> Eq HandJointVelocitiesEXT
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: HandJointVelocitiesEXT -> HandJointVelocitiesEXT -> Bool
$c/= :: HandJointVelocitiesEXT -> HandJointVelocitiesEXT -> Bool
== :: HandJointVelocitiesEXT -> HandJointVelocitiesEXT -> Bool
$c== :: HandJointVelocitiesEXT -> HandJointVelocitiesEXT -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (HandJointVelocitiesEXT)
#endif
deriving instance Show HandJointVelocitiesEXT
instance ToCStruct HandJointVelocitiesEXT where
withCStruct :: HandJointVelocitiesEXT
-> (Ptr HandJointVelocitiesEXT -> IO b) -> IO b
withCStruct x :: HandJointVelocitiesEXT
x f :: Ptr HandJointVelocitiesEXT -> IO b
f = Int -> Int -> (Ptr HandJointVelocitiesEXT -> IO b) -> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 32 8 ((Ptr HandJointVelocitiesEXT -> IO b) -> IO b)
-> (Ptr HandJointVelocitiesEXT -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \p :: Ptr HandJointVelocitiesEXT
p -> Ptr HandJointVelocitiesEXT
-> HandJointVelocitiesEXT -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr HandJointVelocitiesEXT
p HandJointVelocitiesEXT
x (Ptr HandJointVelocitiesEXT -> IO b
f Ptr HandJointVelocitiesEXT
p)
pokeCStruct :: Ptr HandJointVelocitiesEXT
-> HandJointVelocitiesEXT -> IO b -> IO b
pokeCStruct p :: Ptr HandJointVelocitiesEXT
p HandJointVelocitiesEXT{..} f :: IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr HandJointVelocitiesEXT
p Ptr HandJointVelocitiesEXT -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
TYPE_HAND_JOINT_VELOCITIES_EXT)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr HandJointVelocitiesEXT
p Ptr HandJointVelocitiesEXT -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr HandJointVelocitiesEXT
p Ptr HandJointVelocitiesEXT -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Word32)) (Word32
jointCount)
Ptr (Ptr HandJointVelocityEXT) -> Ptr HandJointVelocityEXT -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr HandJointVelocitiesEXT
p Ptr HandJointVelocitiesEXT -> Int -> Ptr (Ptr HandJointVelocityEXT)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr (Ptr HandJointVelocityEXT))) (Ptr HandJointVelocityEXT
jointVelocities)
IO b
f
cStructSize :: Int
cStructSize = 32
cStructAlignment :: Int
cStructAlignment = 8
pokeZeroCStruct :: Ptr HandJointVelocitiesEXT -> IO b -> IO b
pokeZeroCStruct p :: Ptr HandJointVelocitiesEXT
p f :: IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr HandJointVelocitiesEXT
p Ptr HandJointVelocitiesEXT -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
TYPE_HAND_JOINT_VELOCITIES_EXT)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr HandJointVelocitiesEXT
p Ptr HandJointVelocitiesEXT -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr HandJointVelocitiesEXT
p Ptr HandJointVelocitiesEXT -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
Ptr (Ptr HandJointVelocityEXT) -> Ptr HandJointVelocityEXT -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr HandJointVelocitiesEXT
p Ptr HandJointVelocitiesEXT -> Int -> Ptr (Ptr HandJointVelocityEXT)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr (Ptr HandJointVelocityEXT))) (Ptr HandJointVelocityEXT
forall a. Zero a => a
zero)
IO b
f
instance FromCStruct HandJointVelocitiesEXT where
peekCStruct :: Ptr HandJointVelocitiesEXT -> IO HandJointVelocitiesEXT
peekCStruct p :: Ptr HandJointVelocitiesEXT
p = do
Word32
jointCount <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr HandJointVelocitiesEXT
p Ptr HandJointVelocitiesEXT -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Word32))
Ptr HandJointVelocityEXT
jointVelocities <- Ptr (Ptr HandJointVelocityEXT) -> IO (Ptr HandJointVelocityEXT)
forall a. Storable a => Ptr a -> IO a
peek @(Ptr HandJointVelocityEXT) ((Ptr HandJointVelocitiesEXT
p Ptr HandJointVelocitiesEXT -> Int -> Ptr (Ptr HandJointVelocityEXT)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr (Ptr HandJointVelocityEXT)))
HandJointVelocitiesEXT -> IO HandJointVelocitiesEXT
forall (f :: * -> *) a. Applicative f => a -> f a
pure (HandJointVelocitiesEXT -> IO HandJointVelocitiesEXT)
-> HandJointVelocitiesEXT -> IO HandJointVelocitiesEXT
forall a b. (a -> b) -> a -> b
$ Word32 -> Ptr HandJointVelocityEXT -> HandJointVelocitiesEXT
HandJointVelocitiesEXT
Word32
jointCount Ptr HandJointVelocityEXT
jointVelocities
instance Storable HandJointVelocitiesEXT where
sizeOf :: HandJointVelocitiesEXT -> Int
sizeOf ~HandJointVelocitiesEXT
_ = 32
alignment :: HandJointVelocitiesEXT -> Int
alignment ~HandJointVelocitiesEXT
_ = 8
peek :: Ptr HandJointVelocitiesEXT -> IO HandJointVelocitiesEXT
peek = Ptr HandJointVelocitiesEXT -> IO HandJointVelocitiesEXT
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr HandJointVelocitiesEXT -> HandJointVelocitiesEXT -> IO ()
poke ptr :: Ptr HandJointVelocitiesEXT
ptr poked :: HandJointVelocitiesEXT
poked = Ptr HandJointVelocitiesEXT
-> HandJointVelocitiesEXT -> IO () -> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr HandJointVelocitiesEXT
ptr HandJointVelocitiesEXT
poked (() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero HandJointVelocitiesEXT where
zero :: HandJointVelocitiesEXT
zero = Word32 -> Ptr HandJointVelocityEXT -> HandJointVelocitiesEXT
HandJointVelocitiesEXT
Word32
forall a. Zero a => a
zero
Ptr HandJointVelocityEXT
forall a. Zero a => a
zero
newtype HandEXT = HandEXT Int32
deriving newtype (HandEXT -> HandEXT -> Bool
(HandEXT -> HandEXT -> Bool)
-> (HandEXT -> HandEXT -> Bool) -> Eq HandEXT
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: HandEXT -> HandEXT -> Bool
$c/= :: HandEXT -> HandEXT -> Bool
== :: HandEXT -> HandEXT -> Bool
$c== :: HandEXT -> HandEXT -> Bool
Eq, Eq HandEXT
Eq HandEXT =>
(HandEXT -> HandEXT -> Ordering)
-> (HandEXT -> HandEXT -> Bool)
-> (HandEXT -> HandEXT -> Bool)
-> (HandEXT -> HandEXT -> Bool)
-> (HandEXT -> HandEXT -> Bool)
-> (HandEXT -> HandEXT -> HandEXT)
-> (HandEXT -> HandEXT -> HandEXT)
-> Ord HandEXT
HandEXT -> HandEXT -> Bool
HandEXT -> HandEXT -> Ordering
HandEXT -> HandEXT -> HandEXT
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 :: HandEXT -> HandEXT -> HandEXT
$cmin :: HandEXT -> HandEXT -> HandEXT
max :: HandEXT -> HandEXT -> HandEXT
$cmax :: HandEXT -> HandEXT -> HandEXT
>= :: HandEXT -> HandEXT -> Bool
$c>= :: HandEXT -> HandEXT -> Bool
> :: HandEXT -> HandEXT -> Bool
$c> :: HandEXT -> HandEXT -> Bool
<= :: HandEXT -> HandEXT -> Bool
$c<= :: HandEXT -> HandEXT -> Bool
< :: HandEXT -> HandEXT -> Bool
$c< :: HandEXT -> HandEXT -> Bool
compare :: HandEXT -> HandEXT -> Ordering
$ccompare :: HandEXT -> HandEXT -> Ordering
$cp1Ord :: Eq HandEXT
Ord, Ptr b -> Int -> IO HandEXT
Ptr b -> Int -> HandEXT -> IO ()
Ptr HandEXT -> IO HandEXT
Ptr HandEXT -> Int -> IO HandEXT
Ptr HandEXT -> Int -> HandEXT -> IO ()
Ptr HandEXT -> HandEXT -> IO ()
HandEXT -> Int
(HandEXT -> Int)
-> (HandEXT -> Int)
-> (Ptr HandEXT -> Int -> IO HandEXT)
-> (Ptr HandEXT -> Int -> HandEXT -> IO ())
-> (forall b. Ptr b -> Int -> IO HandEXT)
-> (forall b. Ptr b -> Int -> HandEXT -> IO ())
-> (Ptr HandEXT -> IO HandEXT)
-> (Ptr HandEXT -> HandEXT -> IO ())
-> Storable HandEXT
forall b. Ptr b -> Int -> IO HandEXT
forall b. Ptr b -> Int -> HandEXT -> 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 HandEXT -> HandEXT -> IO ()
$cpoke :: Ptr HandEXT -> HandEXT -> IO ()
peek :: Ptr HandEXT -> IO HandEXT
$cpeek :: Ptr HandEXT -> IO HandEXT
pokeByteOff :: Ptr b -> Int -> HandEXT -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> HandEXT -> IO ()
peekByteOff :: Ptr b -> Int -> IO HandEXT
$cpeekByteOff :: forall b. Ptr b -> Int -> IO HandEXT
pokeElemOff :: Ptr HandEXT -> Int -> HandEXT -> IO ()
$cpokeElemOff :: Ptr HandEXT -> Int -> HandEXT -> IO ()
peekElemOff :: Ptr HandEXT -> Int -> IO HandEXT
$cpeekElemOff :: Ptr HandEXT -> Int -> IO HandEXT
alignment :: HandEXT -> Int
$calignment :: HandEXT -> Int
sizeOf :: HandEXT -> Int
$csizeOf :: HandEXT -> Int
Storable, HandEXT
HandEXT -> Zero HandEXT
forall a. a -> Zero a
zero :: HandEXT
$czero :: HandEXT
Zero)
pattern $bHAND_LEFT_EXT :: HandEXT
$mHAND_LEFT_EXT :: forall r. HandEXT -> (Void# -> r) -> (Void# -> r) -> r
HAND_LEFT_EXT = HandEXT 1
pattern $bHAND_RIGHT_EXT :: HandEXT
$mHAND_RIGHT_EXT :: forall r. HandEXT -> (Void# -> r) -> (Void# -> r) -> r
HAND_RIGHT_EXT = HandEXT 2
{-# complete HAND_LEFT_EXT,
HAND_RIGHT_EXT :: HandEXT #-}
conNameHandEXT :: String
conNameHandEXT :: String
conNameHandEXT = "HandEXT"
enumPrefixHandEXT :: String
enumPrefixHandEXT :: String
enumPrefixHandEXT = "HAND_"
showTableHandEXT :: [(HandEXT, String)]
showTableHandEXT :: [(HandEXT, String)]
showTableHandEXT = [(HandEXT
HAND_LEFT_EXT, "LEFT_EXT"), (HandEXT
HAND_RIGHT_EXT, "RIGHT_EXT")]
instance Show HandEXT where
showsPrec :: Int -> HandEXT -> ShowS
showsPrec = String
-> [(HandEXT, String)]
-> String
-> (HandEXT -> Int32)
-> (Int32 -> ShowS)
-> Int
-> HandEXT
-> ShowS
forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec String
enumPrefixHandEXT [(HandEXT, String)]
showTableHandEXT String
conNameHandEXT (\(HandEXT x :: Int32
x) -> Int32
x) (Int -> Int32 -> ShowS
forall a. Show a => Int -> a -> ShowS
showsPrec 11)
instance Read HandEXT where
readPrec :: ReadPrec HandEXT
readPrec = String
-> [(HandEXT, String)]
-> String
-> (Int32 -> HandEXT)
-> ReadPrec HandEXT
forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec String
enumPrefixHandEXT [(HandEXT, String)]
showTableHandEXT String
conNameHandEXT Int32 -> HandEXT
HandEXT
newtype HandJointEXT = HandJointEXT Int32
deriving newtype (HandJointEXT -> HandJointEXT -> Bool
(HandJointEXT -> HandJointEXT -> Bool)
-> (HandJointEXT -> HandJointEXT -> Bool) -> Eq HandJointEXT
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: HandJointEXT -> HandJointEXT -> Bool
$c/= :: HandJointEXT -> HandJointEXT -> Bool
== :: HandJointEXT -> HandJointEXT -> Bool
$c== :: HandJointEXT -> HandJointEXT -> Bool
Eq, Eq HandJointEXT
Eq HandJointEXT =>
(HandJointEXT -> HandJointEXT -> Ordering)
-> (HandJointEXT -> HandJointEXT -> Bool)
-> (HandJointEXT -> HandJointEXT -> Bool)
-> (HandJointEXT -> HandJointEXT -> Bool)
-> (HandJointEXT -> HandJointEXT -> Bool)
-> (HandJointEXT -> HandJointEXT -> HandJointEXT)
-> (HandJointEXT -> HandJointEXT -> HandJointEXT)
-> Ord HandJointEXT
HandJointEXT -> HandJointEXT -> Bool
HandJointEXT -> HandJointEXT -> Ordering
HandJointEXT -> HandJointEXT -> HandJointEXT
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 :: HandJointEXT -> HandJointEXT -> HandJointEXT
$cmin :: HandJointEXT -> HandJointEXT -> HandJointEXT
max :: HandJointEXT -> HandJointEXT -> HandJointEXT
$cmax :: HandJointEXT -> HandJointEXT -> HandJointEXT
>= :: HandJointEXT -> HandJointEXT -> Bool
$c>= :: HandJointEXT -> HandJointEXT -> Bool
> :: HandJointEXT -> HandJointEXT -> Bool
$c> :: HandJointEXT -> HandJointEXT -> Bool
<= :: HandJointEXT -> HandJointEXT -> Bool
$c<= :: HandJointEXT -> HandJointEXT -> Bool
< :: HandJointEXT -> HandJointEXT -> Bool
$c< :: HandJointEXT -> HandJointEXT -> Bool
compare :: HandJointEXT -> HandJointEXT -> Ordering
$ccompare :: HandJointEXT -> HandJointEXT -> Ordering
$cp1Ord :: Eq HandJointEXT
Ord, Ptr b -> Int -> IO HandJointEXT
Ptr b -> Int -> HandJointEXT -> IO ()
Ptr HandJointEXT -> IO HandJointEXT
Ptr HandJointEXT -> Int -> IO HandJointEXT
Ptr HandJointEXT -> Int -> HandJointEXT -> IO ()
Ptr HandJointEXT -> HandJointEXT -> IO ()
HandJointEXT -> Int
(HandJointEXT -> Int)
-> (HandJointEXT -> Int)
-> (Ptr HandJointEXT -> Int -> IO HandJointEXT)
-> (Ptr HandJointEXT -> Int -> HandJointEXT -> IO ())
-> (forall b. Ptr b -> Int -> IO HandJointEXT)
-> (forall b. Ptr b -> Int -> HandJointEXT -> IO ())
-> (Ptr HandJointEXT -> IO HandJointEXT)
-> (Ptr HandJointEXT -> HandJointEXT -> IO ())
-> Storable HandJointEXT
forall b. Ptr b -> Int -> IO HandJointEXT
forall b. Ptr b -> Int -> HandJointEXT -> 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 HandJointEXT -> HandJointEXT -> IO ()
$cpoke :: Ptr HandJointEXT -> HandJointEXT -> IO ()
peek :: Ptr HandJointEXT -> IO HandJointEXT
$cpeek :: Ptr HandJointEXT -> IO HandJointEXT
pokeByteOff :: Ptr b -> Int -> HandJointEXT -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> HandJointEXT -> IO ()
peekByteOff :: Ptr b -> Int -> IO HandJointEXT
$cpeekByteOff :: forall b. Ptr b -> Int -> IO HandJointEXT
pokeElemOff :: Ptr HandJointEXT -> Int -> HandJointEXT -> IO ()
$cpokeElemOff :: Ptr HandJointEXT -> Int -> HandJointEXT -> IO ()
peekElemOff :: Ptr HandJointEXT -> Int -> IO HandJointEXT
$cpeekElemOff :: Ptr HandJointEXT -> Int -> IO HandJointEXT
alignment :: HandJointEXT -> Int
$calignment :: HandJointEXT -> Int
sizeOf :: HandJointEXT -> Int
$csizeOf :: HandJointEXT -> Int
Storable, HandJointEXT
HandJointEXT -> Zero HandJointEXT
forall a. a -> Zero a
zero :: HandJointEXT
$czero :: HandJointEXT
Zero)
pattern $bHAND_JOINT_PALM_EXT :: HandJointEXT
$mHAND_JOINT_PALM_EXT :: forall r. HandJointEXT -> (Void# -> r) -> (Void# -> r) -> r
HAND_JOINT_PALM_EXT = HandJointEXT 0
pattern $bHAND_JOINT_WRIST_EXT :: HandJointEXT
$mHAND_JOINT_WRIST_EXT :: forall r. HandJointEXT -> (Void# -> r) -> (Void# -> r) -> r
HAND_JOINT_WRIST_EXT = HandJointEXT 1
pattern $bHAND_JOINT_THUMB_METACARPAL_EXT :: HandJointEXT
$mHAND_JOINT_THUMB_METACARPAL_EXT :: forall r. HandJointEXT -> (Void# -> r) -> (Void# -> r) -> r
HAND_JOINT_THUMB_METACARPAL_EXT = HandJointEXT 2
pattern $bHAND_JOINT_THUMB_PROXIMAL_EXT :: HandJointEXT
$mHAND_JOINT_THUMB_PROXIMAL_EXT :: forall r. HandJointEXT -> (Void# -> r) -> (Void# -> r) -> r
HAND_JOINT_THUMB_PROXIMAL_EXT = HandJointEXT 3
pattern $bHAND_JOINT_THUMB_DISTAL_EXT :: HandJointEXT
$mHAND_JOINT_THUMB_DISTAL_EXT :: forall r. HandJointEXT -> (Void# -> r) -> (Void# -> r) -> r
HAND_JOINT_THUMB_DISTAL_EXT = HandJointEXT 4
pattern $bHAND_JOINT_THUMB_TIP_EXT :: HandJointEXT
$mHAND_JOINT_THUMB_TIP_EXT :: forall r. HandJointEXT -> (Void# -> r) -> (Void# -> r) -> r
HAND_JOINT_THUMB_TIP_EXT = HandJointEXT 5
pattern $bHAND_JOINT_INDEX_METACARPAL_EXT :: HandJointEXT
$mHAND_JOINT_INDEX_METACARPAL_EXT :: forall r. HandJointEXT -> (Void# -> r) -> (Void# -> r) -> r
HAND_JOINT_INDEX_METACARPAL_EXT = HandJointEXT 6
pattern $bHAND_JOINT_INDEX_PROXIMAL_EXT :: HandJointEXT
$mHAND_JOINT_INDEX_PROXIMAL_EXT :: forall r. HandJointEXT -> (Void# -> r) -> (Void# -> r) -> r
HAND_JOINT_INDEX_PROXIMAL_EXT = HandJointEXT 7
pattern $bHAND_JOINT_INDEX_INTERMEDIATE_EXT :: HandJointEXT
$mHAND_JOINT_INDEX_INTERMEDIATE_EXT :: forall r. HandJointEXT -> (Void# -> r) -> (Void# -> r) -> r
HAND_JOINT_INDEX_INTERMEDIATE_EXT = HandJointEXT 8
pattern $bHAND_JOINT_INDEX_DISTAL_EXT :: HandJointEXT
$mHAND_JOINT_INDEX_DISTAL_EXT :: forall r. HandJointEXT -> (Void# -> r) -> (Void# -> r) -> r
HAND_JOINT_INDEX_DISTAL_EXT = HandJointEXT 9
pattern $bHAND_JOINT_INDEX_TIP_EXT :: HandJointEXT
$mHAND_JOINT_INDEX_TIP_EXT :: forall r. HandJointEXT -> (Void# -> r) -> (Void# -> r) -> r
HAND_JOINT_INDEX_TIP_EXT = HandJointEXT 10
pattern $bHAND_JOINT_MIDDLE_METACARPAL_EXT :: HandJointEXT
$mHAND_JOINT_MIDDLE_METACARPAL_EXT :: forall r. HandJointEXT -> (Void# -> r) -> (Void# -> r) -> r
HAND_JOINT_MIDDLE_METACARPAL_EXT = HandJointEXT 11
pattern $bHAND_JOINT_MIDDLE_PROXIMAL_EXT :: HandJointEXT
$mHAND_JOINT_MIDDLE_PROXIMAL_EXT :: forall r. HandJointEXT -> (Void# -> r) -> (Void# -> r) -> r
HAND_JOINT_MIDDLE_PROXIMAL_EXT = HandJointEXT 12
pattern $bHAND_JOINT_MIDDLE_INTERMEDIATE_EXT :: HandJointEXT
$mHAND_JOINT_MIDDLE_INTERMEDIATE_EXT :: forall r. HandJointEXT -> (Void# -> r) -> (Void# -> r) -> r
HAND_JOINT_MIDDLE_INTERMEDIATE_EXT = HandJointEXT 13
pattern $bHAND_JOINT_MIDDLE_DISTAL_EXT :: HandJointEXT
$mHAND_JOINT_MIDDLE_DISTAL_EXT :: forall r. HandJointEXT -> (Void# -> r) -> (Void# -> r) -> r
HAND_JOINT_MIDDLE_DISTAL_EXT = HandJointEXT 14
pattern $bHAND_JOINT_MIDDLE_TIP_EXT :: HandJointEXT
$mHAND_JOINT_MIDDLE_TIP_EXT :: forall r. HandJointEXT -> (Void# -> r) -> (Void# -> r) -> r
HAND_JOINT_MIDDLE_TIP_EXT = HandJointEXT 15
pattern $bHAND_JOINT_RING_METACARPAL_EXT :: HandJointEXT
$mHAND_JOINT_RING_METACARPAL_EXT :: forall r. HandJointEXT -> (Void# -> r) -> (Void# -> r) -> r
HAND_JOINT_RING_METACARPAL_EXT = HandJointEXT 16
pattern $bHAND_JOINT_RING_PROXIMAL_EXT :: HandJointEXT
$mHAND_JOINT_RING_PROXIMAL_EXT :: forall r. HandJointEXT -> (Void# -> r) -> (Void# -> r) -> r
HAND_JOINT_RING_PROXIMAL_EXT = HandJointEXT 17
pattern $bHAND_JOINT_RING_INTERMEDIATE_EXT :: HandJointEXT
$mHAND_JOINT_RING_INTERMEDIATE_EXT :: forall r. HandJointEXT -> (Void# -> r) -> (Void# -> r) -> r
HAND_JOINT_RING_INTERMEDIATE_EXT = HandJointEXT 18
pattern $bHAND_JOINT_RING_DISTAL_EXT :: HandJointEXT
$mHAND_JOINT_RING_DISTAL_EXT :: forall r. HandJointEXT -> (Void# -> r) -> (Void# -> r) -> r
HAND_JOINT_RING_DISTAL_EXT = HandJointEXT 19
pattern $bHAND_JOINT_RING_TIP_EXT :: HandJointEXT
$mHAND_JOINT_RING_TIP_EXT :: forall r. HandJointEXT -> (Void# -> r) -> (Void# -> r) -> r
HAND_JOINT_RING_TIP_EXT = HandJointEXT 20
pattern $bHAND_JOINT_LITTLE_METACARPAL_EXT :: HandJointEXT
$mHAND_JOINT_LITTLE_METACARPAL_EXT :: forall r. HandJointEXT -> (Void# -> r) -> (Void# -> r) -> r
HAND_JOINT_LITTLE_METACARPAL_EXT = HandJointEXT 21
pattern $bHAND_JOINT_LITTLE_PROXIMAL_EXT :: HandJointEXT
$mHAND_JOINT_LITTLE_PROXIMAL_EXT :: forall r. HandJointEXT -> (Void# -> r) -> (Void# -> r) -> r
HAND_JOINT_LITTLE_PROXIMAL_EXT = HandJointEXT 22
pattern $bHAND_JOINT_LITTLE_INTERMEDIATE_EXT :: HandJointEXT
$mHAND_JOINT_LITTLE_INTERMEDIATE_EXT :: forall r. HandJointEXT -> (Void# -> r) -> (Void# -> r) -> r
HAND_JOINT_LITTLE_INTERMEDIATE_EXT = HandJointEXT 23
pattern $bHAND_JOINT_LITTLE_DISTAL_EXT :: HandJointEXT
$mHAND_JOINT_LITTLE_DISTAL_EXT :: forall r. HandJointEXT -> (Void# -> r) -> (Void# -> r) -> r
HAND_JOINT_LITTLE_DISTAL_EXT = HandJointEXT 24
pattern $bHAND_JOINT_LITTLE_TIP_EXT :: HandJointEXT
$mHAND_JOINT_LITTLE_TIP_EXT :: forall r. HandJointEXT -> (Void# -> r) -> (Void# -> r) -> r
HAND_JOINT_LITTLE_TIP_EXT = HandJointEXT 25
{-# complete HAND_JOINT_PALM_EXT,
HAND_JOINT_WRIST_EXT,
HAND_JOINT_THUMB_METACARPAL_EXT,
HAND_JOINT_THUMB_PROXIMAL_EXT,
HAND_JOINT_THUMB_DISTAL_EXT,
HAND_JOINT_THUMB_TIP_EXT,
HAND_JOINT_INDEX_METACARPAL_EXT,
HAND_JOINT_INDEX_PROXIMAL_EXT,
HAND_JOINT_INDEX_INTERMEDIATE_EXT,
HAND_JOINT_INDEX_DISTAL_EXT,
HAND_JOINT_INDEX_TIP_EXT,
HAND_JOINT_MIDDLE_METACARPAL_EXT,
HAND_JOINT_MIDDLE_PROXIMAL_EXT,
HAND_JOINT_MIDDLE_INTERMEDIATE_EXT,
HAND_JOINT_MIDDLE_DISTAL_EXT,
HAND_JOINT_MIDDLE_TIP_EXT,
HAND_JOINT_RING_METACARPAL_EXT,
HAND_JOINT_RING_PROXIMAL_EXT,
HAND_JOINT_RING_INTERMEDIATE_EXT,
HAND_JOINT_RING_DISTAL_EXT,
HAND_JOINT_RING_TIP_EXT,
HAND_JOINT_LITTLE_METACARPAL_EXT,
HAND_JOINT_LITTLE_PROXIMAL_EXT,
HAND_JOINT_LITTLE_INTERMEDIATE_EXT,
HAND_JOINT_LITTLE_DISTAL_EXT,
HAND_JOINT_LITTLE_TIP_EXT :: HandJointEXT #-}
conNameHandJointEXT :: String
conNameHandJointEXT :: String
conNameHandJointEXT = "HandJointEXT"
enumPrefixHandJointEXT :: String
enumPrefixHandJointEXT :: String
enumPrefixHandJointEXT = "HAND_JOINT_"
showTableHandJointEXT :: [(HandJointEXT, String)]
showTableHandJointEXT :: [(HandJointEXT, String)]
showTableHandJointEXT =
[ (HandJointEXT
HAND_JOINT_PALM_EXT , "PALM_EXT")
, (HandJointEXT
HAND_JOINT_WRIST_EXT , "WRIST_EXT")
, (HandJointEXT
HAND_JOINT_THUMB_METACARPAL_EXT , "THUMB_METACARPAL_EXT")
, (HandJointEXT
HAND_JOINT_THUMB_PROXIMAL_EXT , "THUMB_PROXIMAL_EXT")
, (HandJointEXT
HAND_JOINT_THUMB_DISTAL_EXT , "THUMB_DISTAL_EXT")
, (HandJointEXT
HAND_JOINT_THUMB_TIP_EXT , "THUMB_TIP_EXT")
, (HandJointEXT
HAND_JOINT_INDEX_METACARPAL_EXT , "INDEX_METACARPAL_EXT")
, (HandJointEXT
HAND_JOINT_INDEX_PROXIMAL_EXT , "INDEX_PROXIMAL_EXT")
, (HandJointEXT
HAND_JOINT_INDEX_INTERMEDIATE_EXT , "INDEX_INTERMEDIATE_EXT")
, (HandJointEXT
HAND_JOINT_INDEX_DISTAL_EXT , "INDEX_DISTAL_EXT")
, (HandJointEXT
HAND_JOINT_INDEX_TIP_EXT , "INDEX_TIP_EXT")
, (HandJointEXT
HAND_JOINT_MIDDLE_METACARPAL_EXT , "MIDDLE_METACARPAL_EXT")
, (HandJointEXT
HAND_JOINT_MIDDLE_PROXIMAL_EXT , "MIDDLE_PROXIMAL_EXT")
, (HandJointEXT
HAND_JOINT_MIDDLE_INTERMEDIATE_EXT, "MIDDLE_INTERMEDIATE_EXT")
, (HandJointEXT
HAND_JOINT_MIDDLE_DISTAL_EXT , "MIDDLE_DISTAL_EXT")
, (HandJointEXT
HAND_JOINT_MIDDLE_TIP_EXT , "MIDDLE_TIP_EXT")
, (HandJointEXT
HAND_JOINT_RING_METACARPAL_EXT , "RING_METACARPAL_EXT")
, (HandJointEXT
HAND_JOINT_RING_PROXIMAL_EXT , "RING_PROXIMAL_EXT")
, (HandJointEXT
HAND_JOINT_RING_INTERMEDIATE_EXT , "RING_INTERMEDIATE_EXT")
, (HandJointEXT
HAND_JOINT_RING_DISTAL_EXT , "RING_DISTAL_EXT")
, (HandJointEXT
HAND_JOINT_RING_TIP_EXT , "RING_TIP_EXT")
, (HandJointEXT
HAND_JOINT_LITTLE_METACARPAL_EXT , "LITTLE_METACARPAL_EXT")
, (HandJointEXT
HAND_JOINT_LITTLE_PROXIMAL_EXT , "LITTLE_PROXIMAL_EXT")
, (HandJointEXT
HAND_JOINT_LITTLE_INTERMEDIATE_EXT, "LITTLE_INTERMEDIATE_EXT")
, (HandJointEXT
HAND_JOINT_LITTLE_DISTAL_EXT , "LITTLE_DISTAL_EXT")
, (HandJointEXT
HAND_JOINT_LITTLE_TIP_EXT , "LITTLE_TIP_EXT")
]
instance Show HandJointEXT where
showsPrec :: Int -> HandJointEXT -> ShowS
showsPrec = String
-> [(HandJointEXT, String)]
-> String
-> (HandJointEXT -> Int32)
-> (Int32 -> ShowS)
-> Int
-> HandJointEXT
-> ShowS
forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec String
enumPrefixHandJointEXT
[(HandJointEXT, String)]
showTableHandJointEXT
String
conNameHandJointEXT
(\(HandJointEXT x :: Int32
x) -> Int32
x)
(Int -> Int32 -> ShowS
forall a. Show a => Int -> a -> ShowS
showsPrec 11)
instance Read HandJointEXT where
readPrec :: ReadPrec HandJointEXT
readPrec = String
-> [(HandJointEXT, String)]
-> String
-> (Int32 -> HandJointEXT)
-> ReadPrec HandJointEXT
forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec String
enumPrefixHandJointEXT [(HandJointEXT, String)]
showTableHandJointEXT String
conNameHandJointEXT Int32 -> HandJointEXT
HandJointEXT
newtype HandJointSetEXT = HandJointSetEXT Int32
deriving newtype (HandJointSetEXT -> HandJointSetEXT -> Bool
(HandJointSetEXT -> HandJointSetEXT -> Bool)
-> (HandJointSetEXT -> HandJointSetEXT -> Bool)
-> Eq HandJointSetEXT
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: HandJointSetEXT -> HandJointSetEXT -> Bool
$c/= :: HandJointSetEXT -> HandJointSetEXT -> Bool
== :: HandJointSetEXT -> HandJointSetEXT -> Bool
$c== :: HandJointSetEXT -> HandJointSetEXT -> Bool
Eq, Eq HandJointSetEXT
Eq HandJointSetEXT =>
(HandJointSetEXT -> HandJointSetEXT -> Ordering)
-> (HandJointSetEXT -> HandJointSetEXT -> Bool)
-> (HandJointSetEXT -> HandJointSetEXT -> Bool)
-> (HandJointSetEXT -> HandJointSetEXT -> Bool)
-> (HandJointSetEXT -> HandJointSetEXT -> Bool)
-> (HandJointSetEXT -> HandJointSetEXT -> HandJointSetEXT)
-> (HandJointSetEXT -> HandJointSetEXT -> HandJointSetEXT)
-> Ord HandJointSetEXT
HandJointSetEXT -> HandJointSetEXT -> Bool
HandJointSetEXT -> HandJointSetEXT -> Ordering
HandJointSetEXT -> HandJointSetEXT -> HandJointSetEXT
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 :: HandJointSetEXT -> HandJointSetEXT -> HandJointSetEXT
$cmin :: HandJointSetEXT -> HandJointSetEXT -> HandJointSetEXT
max :: HandJointSetEXT -> HandJointSetEXT -> HandJointSetEXT
$cmax :: HandJointSetEXT -> HandJointSetEXT -> HandJointSetEXT
>= :: HandJointSetEXT -> HandJointSetEXT -> Bool
$c>= :: HandJointSetEXT -> HandJointSetEXT -> Bool
> :: HandJointSetEXT -> HandJointSetEXT -> Bool
$c> :: HandJointSetEXT -> HandJointSetEXT -> Bool
<= :: HandJointSetEXT -> HandJointSetEXT -> Bool
$c<= :: HandJointSetEXT -> HandJointSetEXT -> Bool
< :: HandJointSetEXT -> HandJointSetEXT -> Bool
$c< :: HandJointSetEXT -> HandJointSetEXT -> Bool
compare :: HandJointSetEXT -> HandJointSetEXT -> Ordering
$ccompare :: HandJointSetEXT -> HandJointSetEXT -> Ordering
$cp1Ord :: Eq HandJointSetEXT
Ord, Ptr b -> Int -> IO HandJointSetEXT
Ptr b -> Int -> HandJointSetEXT -> IO ()
Ptr HandJointSetEXT -> IO HandJointSetEXT
Ptr HandJointSetEXT -> Int -> IO HandJointSetEXT
Ptr HandJointSetEXT -> Int -> HandJointSetEXT -> IO ()
Ptr HandJointSetEXT -> HandJointSetEXT -> IO ()
HandJointSetEXT -> Int
(HandJointSetEXT -> Int)
-> (HandJointSetEXT -> Int)
-> (Ptr HandJointSetEXT -> Int -> IO HandJointSetEXT)
-> (Ptr HandJointSetEXT -> Int -> HandJointSetEXT -> IO ())
-> (forall b. Ptr b -> Int -> IO HandJointSetEXT)
-> (forall b. Ptr b -> Int -> HandJointSetEXT -> IO ())
-> (Ptr HandJointSetEXT -> IO HandJointSetEXT)
-> (Ptr HandJointSetEXT -> HandJointSetEXT -> IO ())
-> Storable HandJointSetEXT
forall b. Ptr b -> Int -> IO HandJointSetEXT
forall b. Ptr b -> Int -> HandJointSetEXT -> 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 HandJointSetEXT -> HandJointSetEXT -> IO ()
$cpoke :: Ptr HandJointSetEXT -> HandJointSetEXT -> IO ()
peek :: Ptr HandJointSetEXT -> IO HandJointSetEXT
$cpeek :: Ptr HandJointSetEXT -> IO HandJointSetEXT
pokeByteOff :: Ptr b -> Int -> HandJointSetEXT -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> HandJointSetEXT -> IO ()
peekByteOff :: Ptr b -> Int -> IO HandJointSetEXT
$cpeekByteOff :: forall b. Ptr b -> Int -> IO HandJointSetEXT
pokeElemOff :: Ptr HandJointSetEXT -> Int -> HandJointSetEXT -> IO ()
$cpokeElemOff :: Ptr HandJointSetEXT -> Int -> HandJointSetEXT -> IO ()
peekElemOff :: Ptr HandJointSetEXT -> Int -> IO HandJointSetEXT
$cpeekElemOff :: Ptr HandJointSetEXT -> Int -> IO HandJointSetEXT
alignment :: HandJointSetEXT -> Int
$calignment :: HandJointSetEXT -> Int
sizeOf :: HandJointSetEXT -> Int
$csizeOf :: HandJointSetEXT -> Int
Storable, HandJointSetEXT
HandJointSetEXT -> Zero HandJointSetEXT
forall a. a -> Zero a
zero :: HandJointSetEXT
$czero :: HandJointSetEXT
Zero)
pattern $bHAND_JOINT_SET_DEFAULT_EXT :: HandJointSetEXT
$mHAND_JOINT_SET_DEFAULT_EXT :: forall r. HandJointSetEXT -> (Void# -> r) -> (Void# -> r) -> r
HAND_JOINT_SET_DEFAULT_EXT = HandJointSetEXT 0
{-# complete HAND_JOINT_SET_DEFAULT_EXT :: HandJointSetEXT #-}
conNameHandJointSetEXT :: String
conNameHandJointSetEXT :: String
conNameHandJointSetEXT = "HandJointSetEXT"
enumPrefixHandJointSetEXT :: String
enumPrefixHandJointSetEXT :: String
enumPrefixHandJointSetEXT = "HAND_JOINT_SET_DEFAULT_EXT"
showTableHandJointSetEXT :: [(HandJointSetEXT, String)]
showTableHandJointSetEXT :: [(HandJointSetEXT, String)]
showTableHandJointSetEXT = [(HandJointSetEXT
HAND_JOINT_SET_DEFAULT_EXT, "")]
instance Show HandJointSetEXT where
showsPrec :: Int -> HandJointSetEXT -> ShowS
showsPrec = String
-> [(HandJointSetEXT, String)]
-> String
-> (HandJointSetEXT -> Int32)
-> (Int32 -> ShowS)
-> Int
-> HandJointSetEXT
-> ShowS
forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec String
enumPrefixHandJointSetEXT
[(HandJointSetEXT, String)]
showTableHandJointSetEXT
String
conNameHandJointSetEXT
(\(HandJointSetEXT x :: Int32
x) -> Int32
x)
(Int -> Int32 -> ShowS
forall a. Show a => Int -> a -> ShowS
showsPrec 11)
instance Read HandJointSetEXT where
readPrec :: ReadPrec HandJointSetEXT
readPrec = String
-> [(HandJointSetEXT, String)]
-> String
-> (Int32 -> HandJointSetEXT)
-> ReadPrec HandJointSetEXT
forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec String
enumPrefixHandJointSetEXT [(HandJointSetEXT, String)]
showTableHandJointSetEXT String
conNameHandJointSetEXT Int32 -> HandJointSetEXT
HandJointSetEXT
type EXT_hand_tracking_SPEC_VERSION = 2
pattern EXT_hand_tracking_SPEC_VERSION :: forall a . Integral a => a
pattern $bEXT_hand_tracking_SPEC_VERSION :: a
$mEXT_hand_tracking_SPEC_VERSION :: forall r a. Integral a => a -> (Void# -> r) -> (Void# -> r) -> r
EXT_hand_tracking_SPEC_VERSION = 2
type EXT_HAND_TRACKING_EXTENSION_NAME = "XR_EXT_hand_tracking"
pattern EXT_HAND_TRACKING_EXTENSION_NAME :: forall a . (Eq a, IsString a) => a
pattern $bEXT_HAND_TRACKING_EXTENSION_NAME :: a
$mEXT_HAND_TRACKING_EXTENSION_NAME :: forall r a.
(Eq a, IsString a) =>
a -> (Void# -> r) -> (Void# -> r) -> r
EXT_HAND_TRACKING_EXTENSION_NAME = "XR_EXT_hand_tracking"