From 94b00126e645e4b630534c862d30ff71673148c1 Mon Sep 17 00:00:00 2001 From: ArkUI Date: Sat, 13 Sep 2025 18:00:52 +0800 Subject: [PATCH] add xcomponent opaque interface Signed-off-by: sunbees --- api/@internal/component/ets/xcomponent.d.ts | 32 +++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/api/@internal/component/ets/xcomponent.d.ts b/api/@internal/component/ets/xcomponent.d.ts index 422c84bc0c..3db6a0afc1 100644 --- a/api/@internal/component/ets/xcomponent.d.ts +++ b/api/@internal/component/ets/xcomponent.d.ts @@ -172,6 +172,28 @@ declare interface SurfaceRotationOptions { lock?: boolean; } +/** + * Surface options. + * + * @interface SurfaceOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 22 + */ +declare interface SurfaceOptions { + /** + * Whether the surface held by XComponent is opaque. + * True if the surface is opaque (no alpha blending needed), false otherwise. + * + * @type { ?boolean } + * @default false + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since arkts 22 + */ + isOpaque?: boolean; +} + /** * Defines the controller of the XComponent. * You can bind the controller to the XComponent to call the component APIs through the controller. @@ -464,6 +486,16 @@ declare class XComponentController { * @since 20 */ unlockCanvasAndPost(canvas: DrawingCanvas):void; + + /** + * Set the options of the surface created by the XComponent. + * + * @param { SurfaceOptions } options - surface options + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 22 + */ + setXComponentSurfaceOptions(options: SurfaceOptions):void; } /** -- Gitee