OH_ArkUI_CustomDialog_SetBackgroundBlurStyleOptions

Function OH_ArkUI_CustomDialog_SetBackgroundBlurStyleOptions 

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

Sets the background blur effect for a dialog box.

§Arguments

  • options - Dialog box parameters.

  • backgroundBlurStyleOptions - Background blur effect options of the dialog box. Format of the ArkUI_AttributeItem parameter:

.value[0].i32: color mode. The value is an enum of ArkUI_ColorMode.

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

.value[2]?.f32: blur degree. The value range is [0.0, 1.0].

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

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

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

.value[6]?.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