OH_ArkUI_CustomDialog_SetBackgroundEffect

Function OH_ArkUI_CustomDialog_SetBackgroundEffect 

Source
pub unsafe extern "C" fn OH_ArkUI_CustomDialog_SetBackgroundEffect(
    options: *mut ArkUI_CustomDialogOptions,
    backgroundEffect: *const ArkUI_AttributeItem,
) -> i32
Available on crate features api-12 and api-19 only.
Expand description

Sets the background effect parameters for a dialog box.

§Arguments

  • options - Dialog box parameters.

  • backgroundEffect - Background effect of the dialog box. Format of the ArkUI_AttributeItem parameter:

.value[0].f32: blur radius, in vp.

.value[1]?.f32: saturation.

.value[2]?.f32: brightness.

.value[3]?.u32: color, in 0xARGB format.

.value[4]?.i32: adaptive color mode. The value is an enum of ArkUI_AdaptiveColor.

.value[5]?.u32: brightness of black in the grayscale blur. The value range is [0, 127].

.value[6]?.u32: degree of darkening the white color in the grayscale blur. The value range is [0, 127].

.value[7]?.i32: blur activation policy. The value is an enum of ArkUI_BlurStyleActivePolicy.

.value[8]?.u32: background color, in 0xARGB format, of the components within the window after the window loses focus (in which case, the blur effect on the components within the window is removed).

§Returns

  • Returns the result code. Returns [ARKUI_ERROR_CODE_NO_ERROR] if the operation is successful. Returns [ARKUI_ERROR_CODE_PARAM_INVALID] if a parameter error occurs.

Available since API-level: 19