> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# GameInputDeviceCallback

> GameInputDeviceCallback

# GameInputDeviceCallback

デバイスの接続および切断イベント用のタイトル定義コールバック。この関数は [IGameInput::RegisterDeviceCallback](https://docs.xbox.com/ja-jp/reference/input/gameinput/interfaces/igameinput/methods/igameinput_registerdevicecallback.md) で登録されます。この関数は、登録関数で設定された条件によってトリガーされます。

## 構文

```cpp theme={null}
void GameInputDeviceCallback(
    GameInputCallbackToken callbackToken,
    void* context,
    IGameInputDevice* device,
    uint64_t timestamp,
    GameInputDeviceStatus currentStatus,
    GameInputDeviceStatus previousStatus
);
```

### パラメーター

*callbackToken*   \_In\_\
型: GameInputCallbackToken

登録された関数のコールバック トークン。[IGameInput::RegisterDeviceCallback](https://docs.xbox.com/ja-jp/reference/input/gameinput/interfaces/igameinput/methods/igameinput_registerdevicecallback.md) によって返されるトークン。

*context*   \_In\_\
型: void\*

[IGameInput::RegisterDeviceCallback](https://docs.xbox.com/ja-jp/reference/input/gameinput/interfaces/igameinput/methods/igameinput_registerdevicecallback.md) に渡されたコンテキスト。

*device*   \_In\_\
型: IGameInputDevice\*

コールバックをトリガーしたデバイス。

*timestamp*   \_In\_\
型: uint64\_t

ステータスの変化が発生した時刻を示すマイクロ秒タイムスタンプ。

*currentStatus*   \_In\_\
型: [GameInputDeviceStatus](https://docs.xbox.com/ja-jp/reference/input/gameinput/enums/gameinputdevicestatus.md)

デバイスの現在の接続と入力ステータス。

*previousStatus*   \_In\_\
型: [GameInputDeviceStatus](https://docs.xbox.com/ja-jp/reference/input/gameinput/enums/gameinputdevicestatus.md)

デバイスの以前の接続と入力ステータス。

### 戻り値

[Input API の概要](https://docs.xbox.com/ja-jp/build/core-features/common/input/overviews/input-overview.md)\
[GameInput](https://docs.xbox.com/ja-jp/reference/input/gameinput/gameinput_members.md)\
[IGameInput::RegisterDeviceCallback](https://docs.xbox.com/ja-jp/reference/input/gameinput/interfaces/igameinput/methods/igameinput_registerdevicecallback.md)

## バージョン履歴

| バージョン | 変更内容 |
| - | - |
| **v0** | 導入されました。 |


## Related topics

- [IGameInput::RegisterDeviceCallback](https://docs.xbox.com/ja-jp/reference/input/gameinput/interfaces/igameinput/methods/igameinput_registerdevicecallback.md)
- [GameInput API メンバー](https://docs.xbox.com/ja-jp/reference/input/gameinput/gameinput_members.md)
- [GameInputDeviceStatus](https://docs.xbox.com/ja-jp/reference/input/gameinput/enums/gameinputdevicestatus.md)
- [IGameInput::StopCallback](https://docs.xbox.com/ja-jp/reference/input/gameinput/interfaces/igameinput/methods/igameinput_stopcallback.md)
- [GameInputSystemButtonCallback](https://docs.xbox.com/ja-jp/reference/input/gameinput/functions/gameinputsystembuttoncallback.md)
