ホーム › UI.Input.GameInput › IGameInput
IGameInput
COMメソッド 19
vtbl = vtable インデックス(0始まり)。HSP等からCOMメソッドをインデックス指定で呼ぶ際に使用します。0〜2 は IUnknown。
vtbl 3 ULONGLONG GetCurrentTimestamp()
vtbl 4 HRESULT GetCurrentReading(GameInputKind inputKind, IGameInputDevice* device, IGameInputReading** reading)
| inputKind | GameInputKind | in | 対象とする入力の種類(GameInputKind)を指定する。 |
| device | IGameInputDevice* | inoptional | 対象の入力デバイス(IGameInputDevice)を指定する。NULL で任意のデバイスを対象とする。 |
| reading | IGameInputReading** | out | 最新の入力リーディングを受け取る。 |
vtbl 5 HRESULT GetNextReading(IGameInputReading* referenceReading, GameInputKind inputKind, IGameInputDevice* device, IGameInputReading** reading)
| referenceReading | IGameInputReading* | in | 基準となるリーディングへのポインタである。 |
| inputKind | GameInputKind | in | 対象とする入力の種類(GameInputKind)を指定する。 |
| device | IGameInputDevice* | inoptional | 対象の入力デバイス(IGameInputDevice)を指定する。NULL で任意のデバイスを対象とする。 |
| reading | IGameInputReading** | out | 基準より後の次のリーディングを受け取る。 |
vtbl 6 HRESULT GetPreviousReading(IGameInputReading* referenceReading, GameInputKind inputKind, IGameInputDevice* device, IGameInputReading** reading)
| referenceReading | IGameInputReading* | in | 基準となるリーディングへのポインタである。 |
| inputKind | GameInputKind | in | 対象とする入力の種類(GameInputKind)を指定する。 |
| device | IGameInputDevice* | inoptional | 対象の入力デバイス(IGameInputDevice)を指定する。NULL で任意のデバイスを対象とする。 |
| reading | IGameInputReading** | out | 基準より前のリーディングを受け取る。 |
vtbl 7 HRESULT GetTemporalReading(ULONGLONG timestamp, IGameInputDevice* device, IGameInputReading** reading)
| timestamp | ULONGLONG | in | 取得したい時刻のタイムスタンプ(マイクロ秒)を指定する。 |
| device | IGameInputDevice* | in | 対象の入力デバイス(IGameInputDevice)を指定する。NULL で任意のデバイスを対象とする。 |
| reading | IGameInputReading** | out | 指定時刻に最も近いリーディングを受け取る。 |
vtbl 8 HRESULT RegisterReadingCallback(IGameInputDevice* device, GameInputKind inputKind, FLOAT analogThreshold, void* context, GameInputReadingCallback callbackFunc, ULONGLONG* callbackToken)
| device | IGameInputDevice* | inoptional | 対象の入力デバイス(IGameInputDevice)を指定する。NULL で任意のデバイスを対象とする。 |
| inputKind | GameInputKind | in | 対象とする入力の種類(GameInputKind)を指定する。 |
| analogThreshold | FLOAT | in | コールバック発火のアナログ入力しきい値を指定する。 |
| context | void* | inoptional | コールバックへ渡される呼び出し側のコンテキストポインタである。 |
| callbackFunc | GameInputReadingCallback | in | リーディング受信時に呼び出すコールバック関数を指定する。 |
| callbackToken | ULONGLONG* | outoptional | 登録したコールバックを識別するトークンを受け取る。 |
vtbl 9 HRESULT RegisterDeviceCallback(IGameInputDevice* device, GameInputKind inputKind, GameInputDeviceStatus statusFilter, GameInputEnumerationKind enumerationKind, void* context, GameInputDeviceCallback callbackFunc, ULONGLONG* callbackToken)
| device | IGameInputDevice* | inoptional | 対象の入力デバイス(IGameInputDevice)を指定する。NULL で任意のデバイスを対象とする。 |
| inputKind | GameInputKind | in | 対象とする入力の種類(GameInputKind)を指定する。 |
| statusFilter | GameInputDeviceStatus | in | 通知対象とするデバイス状態(GameInputDeviceStatus)を指定する。 |
| enumerationKind | GameInputEnumerationKind | in | 列挙方法(GameInputEnumerationKind)を指定する。 |
| context | void* | inoptional | コールバックへ渡される呼び出し側のコンテキストポインタである。 |
| callbackFunc | GameInputDeviceCallback | in | デバイス状態変化時に呼び出すコールバック関数を指定する。 |
| callbackToken | ULONGLONG* | outoptional | 登録したコールバックを識別するトークンを受け取る。 |
vtbl 10 HRESULT RegisterSystemButtonCallback(IGameInputDevice* device, GameInputSystemButtons buttonFilter, void* context, GameInputSystemButtonCallback callbackFunc, ULONGLONG* callbackToken)
| device | IGameInputDevice* | inoptional | 対象の入力デバイス(IGameInputDevice)を指定する。NULL で任意のデバイスを対象とする。 |
| buttonFilter | GameInputSystemButtons | in | 通知対象とするシステムボタン(GameInputSystemButtons)を指定する。 |
| context | void* | inoptional | コールバックへ渡される呼び出し側のコンテキストポインタである。 |
| callbackFunc | GameInputSystemButtonCallback | in | システムボタン操作時に呼び出すコールバック関数を指定する。 |
| callbackToken | ULONGLONG* | outoptional | 登録したコールバックを識別するトークンを受け取る。 |
vtbl 11 HRESULT RegisterKeyboardLayoutCallback(IGameInputDevice* device, void* context, GameInputKeyboardLayoutCallback callbackFunc, ULONGLONG* callbackToken)
| device | IGameInputDevice* | inoptional | 対象の入力デバイス(IGameInputDevice)を指定する。NULL で任意のデバイスを対象とする。 |
| context | void* | inoptional | コールバックへ渡される呼び出し側のコンテキストポインタである。 |
| callbackFunc | GameInputKeyboardLayoutCallback | in | キーボードレイアウト変更時に呼び出すコールバック関数を指定する。 |
| callbackToken | ULONGLONG* | outoptional | 登録したコールバックを識別するトークンを受け取る。 |
vtbl 12 void StopCallback(ULONGLONG callbackToken)
| callbackToken | ULONGLONG | in | 停止するコールバックを識別するトークンを指定する。 |
| callbackToken | ULONGLONG | in | 登録解除するコールバックを識別するトークンを指定する。 |
| timeoutInMicroseconds | ULONGLONG | in | 解除完了を待機する最大時間(マイクロ秒)を指定する。 |
vtbl 14 HRESULT CreateDispatcher(IGameInputDispatcher** dispatcher)
| dispatcher | IGameInputDispatcher** | out | 生成されたディスパッチャ(IGameInputDispatcher)を受け取る。 |
vtbl 15 HRESULT CreateAggregateDevice(GameInputKind inputKind, IGameInputDevice** device)
| inputKind | GameInputKind | in | 対象とする入力の種類(GameInputKind)を指定する。 |
| device | IGameInputDevice** | out | 生成された集約デバイス(IGameInputDevice)を受け取る。 |
vtbl 16 HRESULT FindDeviceFromId(APP_LOCAL_DEVICE_ID* value, IGameInputDevice** device)
| value | APP_LOCAL_DEVICE_ID* | in | 検索するデバイス ID(APP_LOCAL_DEVICE_ID)へのポインタである。 |
| device | IGameInputDevice** | out | 見つかったデバイス(IGameInputDevice)を受け取る。 |
vtbl 17 HRESULT FindDeviceFromObject(IUnknown* value, IGameInputDevice** device)
| value | IUnknown* | in | 検索の手掛かりとなるオブジェクトへのポインタである。 |
| device | IGameInputDevice** | out | 見つかったデバイス(IGameInputDevice)を受け取る。 |
vtbl 18 HRESULT FindDeviceFromPlatformHandle(HANDLE value, IGameInputDevice** device)
| value | HANDLE | in | 検索するプラットフォームハンドルを指定する。 |
| device | IGameInputDevice** | out | 見つかったデバイス(IGameInputDevice)を受け取る。 |
vtbl 19 HRESULT FindDeviceFromPlatformString(LPWSTR value, IGameInputDevice** device)
| value | LPWSTR | in | 検索するプラットフォーム文字列を指定する。 |
| device | IGameInputDevice** | out | 見つかったデバイス(IGameInputDevice)を受け取る。 |
vtbl 20 HRESULT EnableOemDeviceSupport(WORD vendorId, WORD productId, BYTE interfaceNumber, BYTE collectionNumber)
| vendorId | WORD | in | 対象デバイスのベンダー ID を指定する。 |
| productId | WORD | in | 対象デバイスのプロダクト ID を指定する。 |
| interfaceNumber | BYTE | in | 対象 USB インターフェイス番号を指定する。 |
| collectionNumber | BYTE | in | 対象 HID コレクション番号を指定する。 |
vtbl 21 void SetFocusPolicy(GameInputFocusPolicy policy)
| policy | GameInputFocusPolicy | in | 入力フォーカスの扱い(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 指定が可能。#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,sptr #comfunc global IGameInput_RegisterDeviceCallback 9 sptr,int,int,int,sptr,sptr,sptr #comfunc global IGameInput_RegisterSystemButtonCallback 10 sptr,int,sptr,sptr,sptr #comfunc global IGameInput_RegisterKeyboardLayoutCallback 11 sptr,sptr,sptr,sptr #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 sptr,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が無いため "{}"(他メソッド/アクティベーションで取得)。 ; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。 ; ※ハンドル/void*等の不透明ポインタは IronHSP では intptr 指定が可能。