Win32 API 日本語リファレンス
ホームUI.Input.GameInput › IGameInput

IGameInput

COM
IID11be2a7e-4254-445a-9c09-ffc40f006918継承元IUnknown自前メソッド開始 vtbl3

メソッド 19

vtbl = vtable インデックス(0始まり)。HSP等からCOMメソッドをインデックス指定で呼ぶ際に使用します。0〜2 は IUnknown。

vtbl 3 ULONGLONG GetCurrentTimestamp()
vtbl 4 HRESULT GetCurrentReading(GameInputKind inputKind, IGameInputDevice* device, IGameInputReading** reading)
inputKindGameInputKindin対象とする入力の種類(GameInputKind)を指定する。
deviceIGameInputDevice*inoptional対象の入力デバイス(IGameInputDevice)を指定する。NULL で任意のデバイスを対象とする。
readingIGameInputReading**out最新の入力リーディングを受け取る。
vtbl 5 HRESULT GetNextReading(IGameInputReading* referenceReading, GameInputKind inputKind, IGameInputDevice* device, IGameInputReading** reading)
referenceReadingIGameInputReading*in基準となるリーディングへのポインタである。
inputKindGameInputKindin対象とする入力の種類(GameInputKind)を指定する。
deviceIGameInputDevice*inoptional対象の入力デバイス(IGameInputDevice)を指定する。NULL で任意のデバイスを対象とする。
readingIGameInputReading**out基準より後の次のリーディングを受け取る。
vtbl 6 HRESULT GetPreviousReading(IGameInputReading* referenceReading, GameInputKind inputKind, IGameInputDevice* device, IGameInputReading** reading)
referenceReadingIGameInputReading*in基準となるリーディングへのポインタである。
inputKindGameInputKindin対象とする入力の種類(GameInputKind)を指定する。
deviceIGameInputDevice*inoptional対象の入力デバイス(IGameInputDevice)を指定する。NULL で任意のデバイスを対象とする。
readingIGameInputReading**out基準より前のリーディングを受け取る。
vtbl 7 HRESULT GetTemporalReading(ULONGLONG timestamp, IGameInputDevice* device, IGameInputReading** reading)
timestampULONGLONGin取得したい時刻のタイムスタンプ(マイクロ秒)を指定する。
deviceIGameInputDevice*in対象の入力デバイス(IGameInputDevice)を指定する。NULL で任意のデバイスを対象とする。
readingIGameInputReading**out指定時刻に最も近いリーディングを受け取る。
vtbl 8 HRESULT RegisterReadingCallback(IGameInputDevice* device, GameInputKind inputKind, FLOAT analogThreshold, void* context, GameInputReadingCallback callbackFunc, ULONGLONG* callbackToken)
deviceIGameInputDevice*inoptional対象の入力デバイス(IGameInputDevice)を指定する。NULL で任意のデバイスを対象とする。
inputKindGameInputKindin対象とする入力の種類(GameInputKind)を指定する。
analogThresholdFLOATinコールバック発火のアナログ入力しきい値を指定する。
contextvoid*inoptionalコールバックへ渡される呼び出し側のコンテキストポインタである。
callbackFuncGameInputReadingCallbackinリーディング受信時に呼び出すコールバック関数を指定する。
callbackTokenULONGLONG*outoptional登録したコールバックを識別するトークンを受け取る。
vtbl 9 HRESULT RegisterDeviceCallback(IGameInputDevice* device, GameInputKind inputKind, GameInputDeviceStatus statusFilter, GameInputEnumerationKind enumerationKind, void* context, GameInputDeviceCallback callbackFunc, ULONGLONG* callbackToken)
deviceIGameInputDevice*inoptional対象の入力デバイス(IGameInputDevice)を指定する。NULL で任意のデバイスを対象とする。
inputKindGameInputKindin対象とする入力の種類(GameInputKind)を指定する。
statusFilterGameInputDeviceStatusin通知対象とするデバイス状態(GameInputDeviceStatus)を指定する。
enumerationKindGameInputEnumerationKindin列挙方法(GameInputEnumerationKind)を指定する。
contextvoid*inoptionalコールバックへ渡される呼び出し側のコンテキストポインタである。
callbackFuncGameInputDeviceCallbackinデバイス状態変化時に呼び出すコールバック関数を指定する。
callbackTokenULONGLONG*outoptional登録したコールバックを識別するトークンを受け取る。
vtbl 10 HRESULT RegisterSystemButtonCallback(IGameInputDevice* device, GameInputSystemButtons buttonFilter, void* context, GameInputSystemButtonCallback callbackFunc, ULONGLONG* callbackToken)
deviceIGameInputDevice*inoptional対象の入力デバイス(IGameInputDevice)を指定する。NULL で任意のデバイスを対象とする。
buttonFilterGameInputSystemButtonsin通知対象とするシステムボタン(GameInputSystemButtons)を指定する。
contextvoid*inoptionalコールバックへ渡される呼び出し側のコンテキストポインタである。
callbackFuncGameInputSystemButtonCallbackinシステムボタン操作時に呼び出すコールバック関数を指定する。
callbackTokenULONGLONG*outoptional登録したコールバックを識別するトークンを受け取る。
vtbl 11 HRESULT RegisterKeyboardLayoutCallback(IGameInputDevice* device, void* context, GameInputKeyboardLayoutCallback callbackFunc, ULONGLONG* callbackToken)
deviceIGameInputDevice*inoptional対象の入力デバイス(IGameInputDevice)を指定する。NULL で任意のデバイスを対象とする。
contextvoid*inoptionalコールバックへ渡される呼び出し側のコンテキストポインタである。
callbackFuncGameInputKeyboardLayoutCallbackinキーボードレイアウト変更時に呼び出すコールバック関数を指定する。
callbackTokenULONGLONG*outoptional登録したコールバックを識別するトークンを受け取る。
vtbl 12 void StopCallback(ULONGLONG callbackToken)
callbackTokenULONGLONGin停止するコールバックを識別するトークンを指定する。
vtbl 13 BOOLEAN UnregisterCallback(ULONGLONG callbackToken, ULONGLONG timeoutInMicroseconds)
callbackTokenULONGLONGin登録解除するコールバックを識別するトークンを指定する。
timeoutInMicrosecondsULONGLONGin解除完了を待機する最大時間(マイクロ秒)を指定する。
vtbl 14 HRESULT CreateDispatcher(IGameInputDispatcher** dispatcher)
dispatcherIGameInputDispatcher**out生成されたディスパッチャ(IGameInputDispatcher)を受け取る。
vtbl 15 HRESULT CreateAggregateDevice(GameInputKind inputKind, IGameInputDevice** device)
inputKindGameInputKindin対象とする入力の種類(GameInputKind)を指定する。
deviceIGameInputDevice**out生成された集約デバイス(IGameInputDevice)を受け取る。
vtbl 16 HRESULT FindDeviceFromId(APP_LOCAL_DEVICE_ID* value, IGameInputDevice** device)
valueAPP_LOCAL_DEVICE_ID*in検索するデバイス ID(APP_LOCAL_DEVICE_ID)へのポインタである。
deviceIGameInputDevice**out見つかったデバイス(IGameInputDevice)を受け取る。
vtbl 17 HRESULT FindDeviceFromObject(IUnknown* value, IGameInputDevice** device)
valueIUnknown*in検索の手掛かりとなるオブジェクトへのポインタである。
deviceIGameInputDevice**out見つかったデバイス(IGameInputDevice)を受け取る。
vtbl 18 HRESULT FindDeviceFromPlatformHandle(HANDLE value, IGameInputDevice** device)
valueHANDLEin検索するプラットフォームハンドルを指定する。
deviceIGameInputDevice**out見つかったデバイス(IGameInputDevice)を受け取る。
vtbl 19 HRESULT FindDeviceFromPlatformString(LPWSTR value, IGameInputDevice** device)
valueLPWSTRin検索するプラットフォーム文字列を指定する。
deviceIGameInputDevice**out見つかったデバイス(IGameInputDevice)を受け取る。
vtbl 20 HRESULT EnableOemDeviceSupport(WORD vendorId, WORD productId, BYTE interfaceNumber, BYTE collectionNumber)
vendorIdWORDin対象デバイスのベンダー ID を指定する。
productIdWORDin対象デバイスのプロダクト ID を指定する。
interfaceNumberBYTEin対象 USB インターフェイス番号を指定する。
collectionNumberBYTEin対象 HID コレクション番号を指定する。
vtbl 21 void SetFocusPolicy(GameInputFocusPolicy policy)
policyGameInputFocusPolicyin入力フォーカスの扱い(GameInputFocusPolicy)を指定する。

HSP用 COM定義

#usecom / #comfunc によるHSPのCOM呼び出し定義。数字は vtbl インデックス(0始まり)。クラスIDが無い場合 #usecom の末尾は "{}"、ある場合は "{CLSID}"

出力引数:
#define global IID_IGameInput "{11BE2A7E-4254-445A-9C09-FFC40F006918}"
#usecom global IGameInput IID_IGameInput "{}"
#comfunc global IGameInput_GetCurrentTimestamp             3
#comfunc global IGameInput_GetCurrentReading               4 int,sptr,sptr
#comfunc global IGameInput_GetNextReading                  5 sptr,int,sptr,sptr
#comfunc global IGameInput_GetPreviousReading              6 sptr,int,sptr,sptr
#comfunc global IGameInput_GetTemporalReading              7 int64,sptr,sptr
#comfunc global IGameInput_RegisterReadingCallback         8 sptr,int,float,sptr,sptr,var
#comfunc global IGameInput_RegisterDeviceCallback          9 sptr,int,int,int,sptr,sptr,var
#comfunc global IGameInput_RegisterSystemButtonCallback    10 sptr,int,sptr,sptr,var
#comfunc global IGameInput_RegisterKeyboardLayoutCallback  11 sptr,sptr,sptr,var
#comfunc global IGameInput_StopCallback                    12 int64
#comfunc global IGameInput_UnregisterCallback              13 int64,int64
#comfunc global IGameInput_CreateDispatcher                14 sptr
#comfunc global IGameInput_CreateAggregateDevice           15 int,sptr
#comfunc global IGameInput_FindDeviceFromId                16 var,sptr
#comfunc global IGameInput_FindDeviceFromObject            17 sptr,sptr
#comfunc global IGameInput_FindDeviceFromPlatformHandle    18 sptr,sptr
#comfunc global IGameInput_FindDeviceFromPlatformString    19 wstr,sptr
#comfunc global IGameInput_EnableOemDeviceSupport          20 int,int,int,int
#comfunc global IGameInput_SetFocusPolicy                  21 int
; ※数字は vtbl インデックス(0始まり)。0/1/2 は IUnknown(QueryInterface/AddRef/Release)。
; ※このインターフェースは直接 CoCreateInstance するクラスIDが無いため "{}"(他メソッド/アクティベーションで取得)。
; ※出力/バッファ引数は var(変数直渡し)。varptr 方式にも切替可。
; ※ハンドル/void*等の不透明ポインタは IronHSP では intptr 指定が可能。