diff --git a/api/@internal/component/ets/xcomponent.d.ts b/api/@internal/component/ets/xcomponent.d.ts index 422c84bc0c951bed4ec61f806ba0175985351843..3db6a0afc1bd88efeaccf357f38239bf8baf22e3 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; } /**