122 lines
5.9 KiB
C
122 lines
5.9 KiB
C
#ifndef FALLBACK_WINDOWS_NUI_NUI_INTERFACES_H
|
|
#define FALLBACK_WINDOWS_NUI_NUI_INTERFACES_H
|
|
|
|
// Clean-room COM interface declarations for INuiFrameTexture and INuiSensor.
|
|
//
|
|
// CLEAN-ROOM PROVENANCE: vtable method order and signatures are reproduced from
|
|
// public Kinect for Windows SDK 1.8 header knowledge (NuiImageCamera.h declares
|
|
// INuiFrameTexture; NuiSensor.h declares INuiSensor) per nui-contracts.md §3.5.
|
|
// No GPL third-party source was consulted. STDMETHODCALLTYPE is __stdcall, so the
|
|
// vtable binary layout matches the real Kinect10.dll for a drop-in replacement.
|
|
//
|
|
// RUNTIME-GATE NOTE: the INuiFrameTexture method order is pinned by nui-contracts
|
|
// §3.5 and is low-risk. The INuiSensor vtable is large; its exact method ordering
|
|
// can only be byte-verified on Windows against a real Kinect app (the [~] runtime
|
|
// gate). The flat C exports in nui_exports.h are the primary, Linux-auditable ABI
|
|
// surface; most Kinect v1.8 titles (DEA included, per spike todo 4) bind the flat
|
|
// API, and the sensor interface here delegates to the same VirtualKinectSensor the
|
|
// flat exports drive, so behaviour is identical whichever path a title uses.
|
|
|
|
#include <unknwn.h>
|
|
|
|
#include "nui_abi.h"
|
|
|
|
struct INuiCoordinateMapper;
|
|
struct INuiColorCameraSettings;
|
|
|
|
#ifdef __cplusplus
|
|
|
|
struct INuiFrameTexture : public IUnknown {
|
|
virtual int STDMETHODCALLTYPE BufferLen() = 0;
|
|
virtual int STDMETHODCALLTYPE Pitch() = 0;
|
|
virtual HRESULT STDMETHODCALLTYPE LockRect(UINT Level,
|
|
NUI_LOCKED_RECT* pLockedRect,
|
|
RECT* pRect,
|
|
DWORD Flags) = 0;
|
|
virtual HRESULT STDMETHODCALLTYPE GetLevelDesc(UINT Level,
|
|
NUI_SURFACE_DESC* pDesc) = 0;
|
|
virtual HRESULT STDMETHODCALLTYPE UnlockRect(UINT Level) = 0;
|
|
};
|
|
|
|
struct INuiSensor : public IUnknown {
|
|
virtual HRESULT STDMETHODCALLTYPE NuiInitialize(DWORD dwFlags) = 0;
|
|
virtual void STDMETHODCALLTYPE NuiShutdown() = 0;
|
|
virtual HRESULT STDMETHODCALLTYPE NuiSetFrameEndEvent(HANDLE hEvent,
|
|
DWORD dwFrameEventFlag) = 0;
|
|
virtual HRESULT STDMETHODCALLTYPE
|
|
NuiImageStreamOpen(NUI_IMAGE_TYPE eImageType,
|
|
NUI_IMAGE_RESOLUTION eResolution,
|
|
DWORD dwImageFrameFlags,
|
|
DWORD dwFrameLimit,
|
|
HANDLE hNextFrameEvent,
|
|
HANDLE* phStreamHandle) = 0;
|
|
virtual HRESULT STDMETHODCALLTYPE
|
|
NuiImageStreamSetImageFrameFlags(HANDLE hStream, DWORD dwImageFrameFlags) = 0;
|
|
virtual HRESULT STDMETHODCALLTYPE
|
|
NuiImageStreamGetImageFrameFlags(HANDLE hStream, DWORD* pdwImageFrameFlags) = 0;
|
|
virtual HRESULT STDMETHODCALLTYPE
|
|
NuiImageStreamGetNextFrame(HANDLE hStream,
|
|
DWORD dwMillisecondsToWait,
|
|
const NUI_IMAGE_FRAME** ppcImageFrame) = 0;
|
|
virtual HRESULT STDMETHODCALLTYPE
|
|
NuiImageStreamReleaseFrame(HANDLE hStream,
|
|
const NUI_IMAGE_FRAME* pImageFrame) = 0;
|
|
virtual HRESULT STDMETHODCALLTYPE
|
|
NuiImageGetColorPixelCoordinatesFromDepthPixel(NUI_IMAGE_RESOLUTION eColorResolution,
|
|
const NUI_IMAGE_VIEW_AREA* pcViewArea,
|
|
LONG lDepthX,
|
|
LONG lDepthY,
|
|
USHORT usDepthValue,
|
|
LONG* plColorX,
|
|
LONG* plColorY) = 0;
|
|
virtual HRESULT STDMETHODCALLTYPE
|
|
NuiImageGetColorPixelCoordinatesFromDepthPixelAtResolution(
|
|
NUI_IMAGE_RESOLUTION eColorResolution,
|
|
NUI_IMAGE_RESOLUTION eDepthResolution,
|
|
const NUI_IMAGE_VIEW_AREA* pcViewArea,
|
|
LONG lDepthX,
|
|
LONG lDepthY,
|
|
USHORT usDepthValue,
|
|
LONG* plColorX,
|
|
LONG* plColorY) = 0;
|
|
virtual HRESULT STDMETHODCALLTYPE
|
|
NuiGetColorPixelCoordinateFrameFromDepthPixelFrameAtResolution(
|
|
NUI_IMAGE_RESOLUTION eColorResolution,
|
|
NUI_IMAGE_RESOLUTION eDepthResolution,
|
|
DWORD cDepthValues,
|
|
USHORT* pDepthValues,
|
|
DWORD cColorCoordinates,
|
|
LONG* pColorCoordinates) = 0;
|
|
virtual HRESULT STDMETHODCALLTYPE NuiCameraElevationSetAngle(LONG lAngleDegrees) = 0;
|
|
virtual HRESULT STDMETHODCALLTYPE NuiCameraElevationGetAngle(LONG* plAngleDegrees) = 0;
|
|
virtual HRESULT STDMETHODCALLTYPE
|
|
NuiSkeletonTrackingEnable(HANDLE hNextFrameEvent, DWORD dwFlags) = 0;
|
|
virtual HRESULT STDMETHODCALLTYPE NuiSkeletonTrackingDisable() = 0;
|
|
virtual HRESULT STDMETHODCALLTYPE
|
|
NuiSkeletonSetTrackedSkeletons(DWORD* pTrackingIDs) = 0;
|
|
virtual HRESULT STDMETHODCALLTYPE
|
|
NuiSkeletonGetNextFrame(DWORD dwMillisecondsToWait,
|
|
NUI_SKELETON_FRAME* pSkeletonFrame) = 0;
|
|
virtual HRESULT STDMETHODCALLTYPE
|
|
NuiTransformSmooth(NUI_SKELETON_FRAME* pSkeletonFrame,
|
|
const NUI_TRANSFORM_SMOOTH_PARAMETERS* pSmoothingParams) = 0;
|
|
virtual HRESULT STDMETHODCALLTYPE NuiGetAudioSource(IUnknown** ppDmo) = 0;
|
|
virtual int STDMETHODCALLTYPE NuiInstanceIndex() = 0;
|
|
virtual BSTR STDMETHODCALLTYPE NuiDeviceConnectionId() = 0;
|
|
virtual BSTR STDMETHODCALLTYPE NuiUniqueId() = 0;
|
|
virtual BSTR STDMETHODCALLTYPE NuiAudioArrayId() = 0;
|
|
virtual HRESULT STDMETHODCALLTYPE NuiStatus() = 0;
|
|
virtual DWORD STDMETHODCALLTYPE NuiInitializationFlags() = 0;
|
|
virtual HRESULT STDMETHODCALLTYPE
|
|
NuiGetCoordinateMapper(INuiCoordinateMapper** ppCoordinateMapper) = 0;
|
|
virtual HRESULT STDMETHODCALLTYPE
|
|
NuiImageFrameGetDepthImagePixelFrameTexture(HANDLE hStream,
|
|
const NUI_IMAGE_FRAME* pImageFrame,
|
|
BOOL* pNearMode,
|
|
INuiFrameTexture** ppFrameTexture) = 0;
|
|
};
|
|
|
|
#endif // __cplusplus
|
|
|
|
#endif // FALLBACK_WINDOWS_NUI_NUI_INTERFACES_H
|