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

# LampPurposes 枚举

> LampPurposes 枚举

# LampPurposes 枚举

描述单个 Lamp 预期用于的一组用途。

## 语法

```cpp theme={null}
enum class LampPurposes : uint32_t
{
    Undefined       = 0x00,
    Control         = 0x01,
    Accent          = 0x02,
    Branding        = 0x04,
    Status          = 0x08,
    Illumination    = 0x10,
    Presentation    = 0x20
}; 

DEFINE_ENUM_FLAG_OPERATORS(LampPurposes);
```

## 常量

| 常量 | 描述 |
| - | - |
| Undefined | 此 Lamp 未指定 LampPurposes。 |
| Control | Lamp 与设备上的某个控件相关联（例如按钮、按键、滑块）。 |
| Accent | Lamp 用于美观点缀目的，不与用户交互（例如机箱风扇 LED、键盘上的发光侧板）。 |
| Branding | Lamp 用于设备品牌标识（例如制造商徽标）。 |
| Status | Lamp 用于指示系统状态信息（例如未读邮件、CPU 温度）。 |
| Illumination | Lamp 照亮 LampArray 外部的某个物体（例如舞台聚光灯、汽车前灯、相机闪光灯）。 |
| Presentation | 用户会直接看向的灯（例如艺术品或服装中的灯）。 |

## 备注

此列表将来很可能会扩展，因此请避免使用会验证 LampPurpose 是否在当前范围内的错误检查。推荐的做法是与应用程序支持的 LampPurposes 子集进行比较。

## 要求

**头文件：** 在 LampArray.h 中声明。

## 另请参阅

[光照 API 概览](https://docs.xbox.com/zh-CN/build/core-features/common/lighting/gc-lighting-toc.md)\
[ILampArray::GetIndicesCountForPurposes](https://docs.xbox.com/zh-CN/reference/lighting/lamparray/interfaces/ilamparray/methods/ilamparray_getindicescountforpurposes.md)\
[ILampArray::GetIndicesForPurposes](https://docs.xbox.com/zh-CN/reference/lighting/lamparray/interfaces/ilamparray/methods/ilamparray_getindicesforpurposes.md)\
[ILampInfo::GetPurposes](https://docs.xbox.com/zh-CN/reference/lighting/lamparray/interfaces/ilampinfo/methods/ilampinfo_getpurposes.md)


## Related topics

- [LampArray API 成员](https://docs.xbox.com/zh-CN/reference/lighting/lamparray/lamparray_members.md)
- [GetIndicesForPurposes](https://docs.xbox.com/zh-CN/reference/lighting/lamparray/interfaces/ilamparray/methods/ilamparray_getindicesforpurposes.md)
- [GetIndicesCountForPurposes](https://docs.xbox.com/zh-CN/reference/lighting/lamparray/interfaces/ilamparray/methods/ilamparray_getindicescountforpurposes.md)
- [GetPurposes](https://docs.xbox.com/zh-CN/reference/lighting/lamparray/interfaces/ilampinfo/methods/ilampinfo_getpurposes.md)
- [ILampArray（接口内容）](https://docs.xbox.com/zh-CN/reference/lighting/lamparray/interfaces/ilamparray/ilamparray.md)
