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

# GameInputDeviceCallback

> GameInputDeviceCallback

# GameInputDeviceCallback

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

## 構文

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

### パラメーター

*callbackToken*   \_In\_\
型: GameInputCallbackToken

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

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

[IGameInput::RegisterDeviceCallback](/reference/input/gameinput/interfaces/igameinput/methods/igameinput_registerdevicecallback) に渡されたコンテキスト。

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

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

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

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

*currentStatus*   \_In\_\
型: [GameInputDeviceStatus](/reference/input/gameinput/enums/gameinputdevicestatus)

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

*previousStatus*   \_In\_\
型: [GameInputDeviceStatus](/reference/input/gameinput/enums/gameinputdevicestatus)

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

### 戻り値

[Input API の概要](/build/core-features/common/input/overviews/input-overview)\
[GameInput](/reference/input/gameinput/gameinput_members)\
[IGameInput::RegisterDeviceCallback](/reference/input/gameinput/interfaces/igameinput/methods/igameinput_registerdevicecallback)

## バージョン履歴

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


## Related topics

- [IGameInput::RegisterDeviceCallback](/ja-jp/reference/input/gameinput/interfaces/igameinput/methods/igameinput_registerdevicecallback.md)
- [GameInput](/ja-jp/reference/input/gameinput/gameinput_members.md)
- [GameInputDeviceStatus](/ja-jp/reference/input/gameinput/enums/gameinputdevicestatus.md)
- [IGameInput::StopCallback](/ja-jp/reference/input/gameinput/interfaces/igameinput/methods/igameinput_stopcallback.md)
- [GameInputSystemButtonCallback](/ja-jp/reference/input/gameinput/functions/gameinputsystembuttoncallback.md)
