> ## 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.

# XGameStreamingTouchControlsStateValue

> XGameStreamingTouchControlsStateValue

# XGameStreamingTouchControlsStateValue

指定触摸控件状态的特定元素的类型和值。

## 语法

```cpp theme={null}
struct XGameStreamingTouchControlsStateValue {
    XGameStreamingTouchControlsStateValueKind valueKind;
        union
        {
            bool booleanValue;
            int64_t integerValue;
            double doubleValue;
            const char* stringValue;
        };
};
```

### 成员

*valueKind*\
类型：[XGameStreamingTouchControlsStateValueKind](https://docs.xbox.com/zh-CN/reference/system/xgamestreaming/enums/xgamestreamingtouchcontrolsstatevaluekind.md)

触摸控件状态的特定元素的类型。

*booleanValue*\
类型：bool

要应用的布尔值。

*integerValue*\
类型：int64\_t

要应用的整数值。

*doubleValue*\
类型：double

要应用的双精度值。

*stringValue*\
类型：const char\*

要应用的字符串值。

## 备注

你使用此结构来提供触摸控件状态的特定元素的类型和值。

你应只提供表示所修改变量类型的单个值。

如果指定了错误的值类型，则会导致运行时错误，在使用 [XGameStreamingShowTouchControlsWithStateUpdate](https://docs.xbox.com/zh-CN/reference/system/xgamestreaming/functions/xgamestreamingshowtouchcontrolswithstateupdate.md) 或 [XGameStreamingShowTouchControlsWithStateUpdateOnClient](https://docs.xbox.com/zh-CN/reference/system/xgamestreaming/functions/xgamestreamingshowtouchcontrolswithstateupdateonclient.md) 时返回。

## 要求

**标头：** XGameStreaming.h

**支持的平台**：Windows、XBOX One 系列主机和 XBOX Series 主机

## 另请参阅

[XGameStreaming](https://docs.xbox.com/zh-CN/reference/system/xgamestreaming/xgamestreaming_members.md)\
[XGameStreamingTouchControlsStateOperationKind](https://docs.xbox.com/zh-CN/reference/system/xgamestreaming/enums/xgamestreamingtouchcontrolsstateoperationkind.md)\
[XGameStreamingTouchControlsStateOperation](https://docs.xbox.com/zh-CN/reference/system/xgamestreaming/structs/xgamestreamingtouchcontrolsstateoperation.md)\
[XGameStreamingUpdateTouchControlsState](https://docs.xbox.com/zh-CN/reference/system/xgamestreaming/functions/xgamestreamingupdatetouchcontrolsstate.md)\
[XGameStreamingUpdateTouchControlsStateOnClient](https://docs.xbox.com/zh-CN/reference/system/xgamestreaming/functions/xgamestreamingupdatetouchcontrolsstateonclient.md)\
[XGameStreamingShowTouchControlsWithStateUpdate](https://docs.xbox.com/zh-CN/reference/system/xgamestreaming/functions/xgamestreamingshowtouchcontrolswithstateupdate.md)\
[XGameStreamingShowTouchControlsWithStateUpdateOnClient](https://docs.xbox.com/zh-CN/reference/system/xgamestreaming/functions/xgamestreamingshowtouchcontrolswithstateupdateonclient.md)


## Related topics

- [XGameStreamingTouchControlsStateValueKind](https://docs.xbox.com/zh-CN/reference/system/xgamestreaming/enums/xgamestreamingtouchcontrolsstatevaluekind.md)
- [XGameStreamingTouchControlsStateOperation](https://docs.xbox.com/zh-CN/reference/system/xgamestreaming/structs/xgamestreamingtouchcontrolsstateoperation.md)
- [XGameStreamingUpdateTouchControlsState](https://docs.xbox.com/zh-CN/reference/system/xgamestreaming/functions/xgamestreamingupdatetouchcontrolsstate.md)
- [XGameStreamingUpdateTouchControlsStateOnClient](https://docs.xbox.com/zh-CN/reference/system/xgamestreaming/functions/xgamestreamingupdatetouchcontrolsstateonclient.md)
- [XGameStreamingShowTouchControlsWithStateUpdate](https://docs.xbox.com/zh-CN/reference/system/xgamestreaming/functions/xgamestreamingshowtouchcontrolswithstateupdate.md)
