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

# LampPurposes 枚举

> LampPurposes 枚举

# LampPurposes 枚举

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

<a id="syntaxSection" />

## 语法

```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);
```

<a id="constantsSection" />

## 常量

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

<a id="remarksSection" />

## 备注

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

<a id="requirementsSection" />

## 要求

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

<a id="seealsoSection" />

## 另请参阅

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


## Related topics

- [LampArray](/zh-CN/reference/lighting/lamparray/lamparray_members.md)
- [ILampArray::GetIndicesForPurposes](/zh-CN/reference/lighting/lamparray/interfaces/ilamparray/methods/ilamparray_getindicesforpurposes.md)
- [ILampArray::GetIndicesCountForPurposes](/zh-CN/reference/lighting/lamparray/interfaces/ilamparray/methods/ilamparray_getindicescountforpurposes.md)
- [ILampInfo::GetPurposes](/zh-CN/reference/lighting/lamparray/interfaces/ilampinfo/methods/ilampinfo_getpurposes.md)
- [ILampArray](/zh-CN/reference/lighting/lamparray/interfaces/ilamparray/ilamparray.md)
