同步操作将从 OpenHarmony/docs 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
Related Modules:
Description:
Defines pointers to the layer driver functions.
InitDisplay )(uint32_t devId) |
|
DeinitDisplay )(uint32_t devId) |
|
GetDisplayInfo )(uint32_t devId, DisplayInfo *dispInfo) |
|
OpenLayer )(uint32_t devId, const LayerInfo *layerInfo, uint32_t *layerId) |
|
CloseLayer )(uint32_t devId, uint32_t layerId) |
Closes a layer that is no longer required on a specified display device. |
SetLayerVisible )(uint32_t devId, uint32_t layerId, bool visible) |
|
GetLayerVisibleState )(uint32_t devId, uint32_t layerId, bool *visible) |
|
SetLayerSize )(uint32_t devId, uint32_t layerId, IRect *rect) |
|
GetLayerSize )(uint32_t devId, uint32_t layerId, IRect *rect) |
|
SetLayerCrop )(uint32_t devId, uint32_t layerId, IRect *rect) |
|
SetLayerZorder )(uint32_t devId, uint32_t layerId, uint32_t zorder) |
|
GetLayerZorder )(uint32_t devId, uint32_t layerId, uint32_t *zorder) |
|
SetLayerPreMulti )(uint32_t devId, uint32_t layerId, bool preMul) |
|
GetLayerPreMulti )(uint32_t devId, uint32_t layerId, bool *preMul) |
|
SetLayerAlpha )(uint32_t devId, uint32_t layerid, LayerAlpha *alpha) |
|
GetLayerAlpha )(uint32_t devId, uint32_t layerId, LayerAlpha *alpha) |
|
SetLayerColorKey )(uint32_t devId, uint32_t layerId, bool enable, uint32_t key) |
|
GetLayerColorKey )(uint32_t devId, uint32_t layerId, bool *enable, uint32_t *key) |
|
SetLayerPalette )(uint32_t devId, uint32_t layerId, uint32_t *palette, uint32_t len) |
|
GetLayerPalette )(uint32_t devId, uint32_t layerId, uint32_t *palette, uint32_t len) |
|
SetTransformMode )(uint32_t devId, uint32_t layerId, TransformType type) |
|
SetLayerCompression )(uint32_t devId, uint32_t layerId, int32_t compType) |
|
GetLayerCompression )(uint32_t devId, uint32_t layerId, int32_t *compType) |
Checks whether the compression feature is enabled for a layer. |
SetLayerDirtyRegion )(uint32_t devId, uint32_t layerId, IRect *region) |
|
GetLayerBuffer )(uint32_t devId, uint32_t layerId, LayerBuffer *buffer) |
|
Flush )(uint32_t devId, uint32_t layerId, LayerBuffer *buffer) |
|
WaitForVBlank )(uint32_t devId, uint32_t layerId) |
|
SnapShot )(uint32_t devId, LayerBuffer *buffer) |
int32_t(* LayerFuncs::CloseLayer) (uint32_t devId, uint32_t layerId)
Description:
Closes a layer that is no longer required on a specified display device.
Parameters:
devId | Indicates the ID of a display device. The value ranges from 0 to 4, where 0 indicates the first display device and 4 indicates the last display device. |
layerId | Indicates the layer ID, which identifies a unique layer. You can perform operations on the layer with the specified layer ID. |
Returns:
Returns 0 if the operation is successful; returns an error code defined in DispErrCode otherwise.
See also:
int32_t(* LayerFuncs::DeinitDisplay) (uint32_t devId)
Description:
Deinitializes a display device.
Parameters:
devId | Indicates the ID of a display device. The value ranges from 0 to 4, where 0 indicates the first display device and 4 indicates the last display device. |
Returns:
Returns 0 if the operation is successful; returns an error code defined in DispErrCode otherwise.
See also:
int32_t(* LayerFuncs::Flush) (uint32_t devId, uint32_t layerId, [LayerBuffer](LayerBuffer.md) *buffer)
Description:
Flushes a layer.
Display data in the buffer is flushed to a specified layer so that the image data is displayed on the screen.
Parameters:
devId | Indicates the ID of a display device. The value ranges from 0 to 4, where 0 indicates the first display device and 4 indicates the last display device. |
layerId | Indicates the layer ID, which identifies a unique layer. You can perform operations on the layer with the specified layer ID. |
buffer | Indicates the pointer to the buffer in which the display data is to flush. |
Returns:
Returns 0 if the operation is successful; returns an error code defined in DispErrCode otherwise.
int32_t(* LayerFuncs::GetDisplayInfo) (uint32_t devId, [DisplayInfo](DisplayInfo.md) *dispInfo)
Description:
Obtains information about a display device.
Parameters:
devId | Indicates the ID of a display device. The value ranges from 0 to 4, where 0 indicates the first display device and 4 indicates the last display device. |
dispInfo | Indicates the pointer to the display device information obtained. |
Returns:
Returns 0 if the operation is successful; returns an error code defined in DispErrCode otherwise.
int32_t(* LayerFuncs::GetLayerAlpha) (uint32_t devId, uint32_t layerId, [LayerAlpha](LayerAlpha.md) *alpha)
Description:
Obtains the alpha value of a layer.
Parameters:
devId | Indicates the ID of a display device. The value ranges from 0 to 4, where 0 indicates the first display device and 4 indicates the last display device. |
layerId | Indicates the layer ID, which identifies a unique layer. You can perform operations on the layer with the specified layer ID. |
alpha | Indicates the pointer to the obtained alpha value. |
Returns:
Returns 0 if the operation is successful; returns an error code defined in DispErrCode otherwise.
See also:
int32_t(* LayerFuncs::GetLayerBuffer) (uint32_t devId, uint32_t layerId, [LayerBuffer](LayerBuffer.md) *buffer)
Description:
Obtains the buffer of a layer.
After drawing a picture in the buffer, the application calls the Flush function to display the picture on the screen.
Parameters:
devId | Indicates the ID of a display device. The value ranges from 0 to 4, where 0 indicates the first display device and 4 indicates the last display device. |
layerId | Indicates the layer ID, which identifies a unique layer. You can perform operations on the layer with the specified layer ID. |
buffer | Indicates the pointer to the obtained buffer. |
Returns:
Returns 0 if the operation is successful; returns an error code defined in DispErrCode otherwise.
See also:
int32_t(* LayerFuncs::GetLayerColorKey) (uint32_t devId, uint32_t layerId, bool *enable, uint32_t *key)
Description:
Obtains the color key of a layer.
Parameters:
devId | Indicates the ID of a display device. The value ranges from 0 to 4, where 0 indicates the first display device and 4 indicates the last display device. |
layerId | Indicates the layer ID, which identifies a unique layer. You can perform operations on the layer with the specified layer ID. |
enable | Indicates the pointer to the color key enable bit. |
key | Indicates the pointer to the color key. |
Returns:
Returns 0 if the operation is successful; returns an error code defined in DispErrCode otherwise.
See also:
int32_t(* LayerFuncs::GetLayerCompression) (uint32_t devId, uint32_t layerId, int32_t *compType)
Description:
Checks whether the compression feature is enabled for a layer.
Parameters:
devId | Indicates the ID of a display device. The value ranges from 0 to 4, where 0 indicates the first display device and 4 indicates the last display device. |
layerId | Indicates the layer ID, which identifies a unique layer. You can perform operations on the layer with the specified layer ID. |
compType | Indicates the pointer to the variable specifying whether the compression feature is enabled. |
Returns:
Returns 0 if the operation is successful; returns an error code defined in DispErrCode otherwise.
See also:
int32_t(* LayerFuncs::GetLayerPalette) (uint32_t devId, uint32_t layerId, uint32_t *palette, uint32_t len)
Description:
Obtains the palette of a layer.
Parameters:
devId | Indicates the ID of a display device. The value ranges from 0 to 4, where 0 indicates the first display device and 4 indicates the last display device. |
layerId | Indicates the layer ID, which identifies a unique layer. You can perform operations on the layer with the specified layer ID. |
palette | Indicates the pointer to the obtained palette. |
len | Indicates the length of the palette. |
Returns:
Returns 0 if the operation is successful; returns an error code defined in DispErrCode otherwise.
See also:
int32_t(* LayerFuncs::GetLayerPreMulti) (uint32_t devId, uint32_t layerId, bool *preMul)
Description:
Obtains the premultiplication flag of a layer.
Parameters:
devId | Indicates the ID of a display device. The value ranges from 0 to 4, where 0 indicates the first display device and 4 indicates the last display device. |
layerId | Indicates the layer ID, which identifies a unique layer. You can perform operations on the layer with the specified layer ID. |
preMul | Indicates the pointer to the obtained layer premultiplication flag. |
Returns:
Returns 0 if the operation is successful; returns an error code defined in DispErrCode otherwise.
See also:
int32_t(* LayerFuncs::GetLayerSize) (uint32_t devId, uint32_t layerId, [IRect](IRect.md) *rect)
Description:
Obtains the size of a layer.
Parameters:
devId | Indicates the ID of a display device. The value ranges from 0 to 4, where 0 indicates the first display device and 4 indicates the last display device. |
layerId | Indicates the layer ID, which identifies a unique layer. You can perform operations on the layer with the specified layer ID. |
rect | Indicates the pointer to the obtained layer size. |
Returns:
Returns 0 if the operation is successful; returns an error code defined in DispErrCode otherwise.
See also:
int32_t(* LayerFuncs::GetLayerVisibleState) (uint32_t devId, uint32_t layerId, bool *visible)
Description:
Checks whether a layer is visible.
Parameters:
Returns:
Returns 0 if the operation is successful; returns an error code defined in DispErrCode otherwise.
See also:
int32_t(* LayerFuncs::GetLayerZorder) (uint32_t devId, uint32_t layerId, uint32_t *zorder)
Description:
Obtains the z-order of a layer.
Parameters:
devId | Indicates the ID of a display device. The value ranges from 0 to 4, where 0 indicates the first display device and 4 indicates the last display device. |
layerId | Indicates the layer ID, which identifies a unique layer. You can perform operations on the layer with the specified layer ID. |
zorder | Indicates the pointer to the obtained z-order. The value is an integer ranging from 0 to 255. A larger z-order value indicates a higher layer. |
Returns:
Returns 0 if the operation is successful; returns an error code defined in DispErrCode otherwise.
See also:
int32_t(* LayerFuncs::InitDisplay) (uint32_t devId)
Description:
Initializes a display device.
Parameters:
devId | Indicates the ID of a display device. The value ranges from 0 to 4, where 0 indicates the first display device and 4 indicates the last display device. |
Returns:
Returns 0 if the operation is successful; returns an error code defined in DispErrCode otherwise.
See also:
int32_t(* LayerFuncs::OpenLayer) (uint32_t devId, const [LayerInfo](LayerInfo.md) *layerInfo, uint32_t *layerId)
Description:
Opens a layer on a specified display device.
Before using a layer on the GUI, you must open the layer based on the layer information. After the layer is opened, you can obtain the layer ID and then use other functions based on the layer ID.
Parameters:
devId | Indicates the ID of a display device. The value ranges from 0 to 4, where 0 indicates the first display device and 4 indicates the last display device. |
layerInfo | Indicates the pointer to the layer information passed to open a layer, including the layer type, layer size, and pixel format. |
layerId | Indicates the pointer to the layer ID, which identifies a unique layer. The layer ID is returned to the GUI after the layer is successfully opened. |
Returns:
Returns 0 if the operation is successful; returns an error code defined in DispErrCode otherwise.
See also:
int32_t(* LayerFuncs::SetLayerAlpha) (uint32_t devId, uint32_t layerid, [LayerAlpha](LayerAlpha.md) *alpha)
Description:
Sets the alpha value for a layer.
Parameters:
devId | Indicates the ID of a display device. The value ranges from 0 to 4, where 0 indicates the first display device and 4 indicates the last display device. |
layerId | Indicates the layer ID, which identifies a unique layer. You can perform operations on the layer with the specified layer ID. |
alpha | Indicates the pointer to the alpha value to set. |
Returns:
Returns 0 if the operation is successful; returns an error code defined in DispErrCode otherwise.
See also:
int32_t(* LayerFuncs::SetLayerColorKey) (uint32_t devId, uint32_t layerId, bool enable, uint32_t key)
Description:
Sets the color key for a layer.
The color key is used during layer overlay.
Parameters:
devId | Indicates the ID of a display device. The value ranges from 0 to 4, where 0 indicates the first display device and 4 indicates the last display device. |
layerId | Indicates the layer ID, which identifies a unique layer. You can perform operations on the layer with the specified layer ID. |
enable | Specify whether to enable the color key. |
key | Indicates the color key. |
Returns:
Returns 0 if the operation is successful; returns an error code defined in DispErrCode otherwise.
See also:
int32_t(* LayerFuncs::SetLayerCompression) (uint32_t devId, uint32_t layerId, int32_t compType)
Description:
Sets the compression feature for a layer.
In specific scenarios, images need to be compressed. You can set whether to enable layer compression.
Parameters:
Returns:
**** Returns 0 if the operation is successful; returns an error code defined in DispErrCode otherwise. ****
See also:
**** GetLayerCompression ****
int32_t(* LayerFuncs::SetLayerCrop) (uint32_t devId, uint32_t layerId, [IRect](IRect.md) *rect)
Description:
Sets the rectangular area to crop for a layer.
Parameters:
devId | Indicates the ID of a display device. The value ranges from 0 to 4, where 0 indicates the first display device and 4 indicates the last display device. |
layerId | Indicates the layer ID, which identifies a unique layer. You can perform operations on the layer with the specified layer ID. |
rect | Indicates the pointer to the rectangular area to crop. |
Returns:
Returns 0 if the operation is successful; returns an error code defined in DispErrCode otherwise.
int32_t(* LayerFuncs::SetLayerDirtyRegion) (uint32_t devId, uint32_t layerId, [IRect](IRect.md) *region)
Description:
Sets the flushing area for a layer.
After the GUI draws an image, you must set the layer flushing area before calling the Flush function to flush the screen.
Parameters:
devId | Indicates the ID of a display device. The value ranges from 0 to 4, where 0 indicates the first display device and 4 indicates the last display device. |
layerId | Indicates the layer ID, which identifies a unique layer. You can perform operations on the layer with the specified layer ID. |
region | Indicates the pointer to the flushing area to set. |
Returns:
Returns 0 if the operation is successful; returns an error code defined in DispErrCode otherwise.
int32_t(* LayerFuncs::SetLayerPalette) (uint32_t devId, uint32_t layerId, uint32_t *palette, uint32_t len)
Description:
Sets the palette for a layer.
Parameters:
devId | Indicates the ID of a display device. The value ranges from 0 to 4, where 0 indicates the first display device and 4 indicates the last display device. |
layerId | Indicates the layer ID, which identifies a unique layer. You can perform operations on the layer with the specified layer ID. |
palette | Indicates the pointer to the palette to set. |
len | Indicates the length of the palette. |
Returns:
Returns 0 if the operation is successful; returns an error code defined in DispErrCode otherwise.
See also:
int32_t(* LayerFuncs::SetLayerPreMulti) (uint32_t devId, uint32_t layerId, bool preMul)
Description:
Sets layer premultiplication.
Parameters:
Returns:
Returns 0 if the operation is successful; returns an error code defined in DispErrCode otherwise.
See also:
int32_t(* LayerFuncs::SetLayerSize) (uint32_t devId, uint32_t layerId, [IRect](IRect.md) *rect)
Description:
Sets the size of a layer.
Parameters:
devId | Indicates the ID of a display device. The value ranges from 0 to 4, where 0 indicates the first display device and 4 indicates the last display device. |
layerId | Indicates the layer ID, which identifies a unique layer. You can perform operations on the layer with the specified layer ID. |
rect | Indicates the pointer to the layer size to set, in pixels. |
Returns:
Returns 0 if the operation is successful; returns an error code defined in DispErrCode otherwise.
See also:
int32_t(* LayerFuncs::SetLayerVisible) (uint32_t devId, uint32_t layerId, bool visible)
Description:
Sets whether a layer is visible.
A visible layer is displayed on the screen, whereas an invisible layer is not displayed on the screen.
Parameters:
Returns:
Returns 0 if the operation is successful; returns an error code defined in DispErrCode otherwise.
See also:
int32_t(* LayerFuncs::SetLayerZorder) (uint32_t devId, uint32_t layerId, uint32_t zorder)
Description:
Sets the z-order for a layer.
A larger z-order value indicates a higher layer.
Parameters:
devId | Indicates the ID of a display device. The value ranges from 0 to 4, where 0 indicates the first display device and 4 indicates the last display device. |
layerId | Indicates the layer ID, which identifies a unique layer. You can perform operations on the layer with the specified layer ID. |
zorder | Indicates the z-order to set. The value is an integer ranging from 0 to 255. |
Returns:
Returns 0 if the operation is successful; returns an error code defined in DispErrCode otherwise.
See also:
int32_t(* LayerFuncs::SetTransformMode) (uint32_t devId, uint32_t layerId, [TransformType](Display.md#gaa65f3b21a9a92ff022e435a7304126d2) type)
Description:
Sets the transform mode for a layer.
Using this function, you can rotate, scale, and move the layer.
Parameters:
devId | Indicates the ID of a display device. The value ranges from 0 to 4, where 0 indicates the first display device and 4 indicates the last display device. |
layerId | Indicates the layer ID, which identifies a unique layer. You can perform operations on the layer with the specified layer ID. |
type | Indicates the transformation mode to set. |
Returns:
Returns 0 if the operation is successful; returns an error code defined in DispErrCode otherwise.
int32_t(* LayerFuncs::SnapShot) (uint32_t devId, [LayerBuffer](LayerBuffer.md) *buffer)
Description:
Implements the snapshot feature.
This function saves the screenshot of image data on the display device to the buffer for debugging or as requested by applications.
Parameters:
devId | Indicates the ID of a display device. The value ranges from 0 to 4, where 0 indicates the first display device and 4 indicates the last display device. |
buffer | Indicates the pointer to the buffer for saving screenshots. |
Returns:
Returns 0 if the operation is successful; returns an error code defined in DispErrCode otherwise.
int32_t(* LayerFuncs::WaitForVBlank) (uint32_t devId, uint32_t layerId)
Description:
Waits for the arrival of vertical blanking.
This function blocks the process until vertical blanking arrives, implementing the synchronization between software and hardware.
Parameters:
devId | Indicates the ID of a display device. The value ranges from 0 to 4, where 0 indicates the first display device and 4 indicates the last display device. |
layerId | Indicates the layer ID, which identifies a unique layer. You can perform operations on the layer with the specified layer ID. |
timeOut | Indicates the maximum duration that the process waits for the arrival of vertical blanking. |
Returns:
Returns 0 if the operation is successful; returns an error code defined in DispErrCode otherwise.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。