161847f8eSopenharmony_ci/*
261847f8eSopenharmony_ci * Copyright (c) 2021 Huawei Device Co., Ltd.
361847f8eSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
461847f8eSopenharmony_ci * you may not use this file except in compliance with the License.
561847f8eSopenharmony_ci * You may obtain a copy of the License at
661847f8eSopenharmony_ci *
761847f8eSopenharmony_ci *     http://www.apache.org/licenses/LICENSE-2.0
861847f8eSopenharmony_ci *
961847f8eSopenharmony_ci * Unless required by applicable law or agreed to in writing, software
1061847f8eSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
1161847f8eSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1261847f8eSopenharmony_ci * See the License for the specific language governing permissions and
1361847f8eSopenharmony_ci * limitations under the License.
1461847f8eSopenharmony_ci */
1561847f8eSopenharmony_ci
1661847f8eSopenharmony_ci/**
1761847f8eSopenharmony_ci * @file
1861847f8eSopenharmony_ci * @kit ArkUI
1961847f8eSopenharmony_ci */
2061847f8eSopenharmony_ci
2161847f8eSopenharmony_ci/**
2261847f8eSopenharmony_ci * Surface Rectangle information.
2361847f8eSopenharmony_ci *
2461847f8eSopenharmony_ci * @interface SurfaceRect
2561847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full
2661847f8eSopenharmony_ci * @atomicservice
2761847f8eSopenharmony_ci * @since 12
2861847f8eSopenharmony_ci */
2961847f8eSopenharmony_cideclare interface SurfaceRect {
3061847f8eSopenharmony_ci  /**
3161847f8eSopenharmony_ci   * The horizontal offset of the surface relative to XComponent.
3261847f8eSopenharmony_ci   *
3361847f8eSopenharmony_ci   * @type { ?number }
3461847f8eSopenharmony_ci   * @syscap SystemCapability.ArkUI.ArkUI.Full
3561847f8eSopenharmony_ci   * @atomicservice
3661847f8eSopenharmony_ci   * @since 12
3761847f8eSopenharmony_ci   */
3861847f8eSopenharmony_ci  offsetX?: number;
3961847f8eSopenharmony_ci
4061847f8eSopenharmony_ci  /**
4161847f8eSopenharmony_ci   * The vertical offset of the surface relative to XComponent.
4261847f8eSopenharmony_ci   *
4361847f8eSopenharmony_ci   * @type { ?number }
4461847f8eSopenharmony_ci   * @syscap SystemCapability.ArkUI.ArkUI.Full
4561847f8eSopenharmony_ci   * @atomicservice
4661847f8eSopenharmony_ci   * @since 12
4761847f8eSopenharmony_ci   */
4861847f8eSopenharmony_ci  offsetY?: number;
4961847f8eSopenharmony_ci
5061847f8eSopenharmony_ci  /**
5161847f8eSopenharmony_ci   * The width of the surface created by XComponent
5261847f8eSopenharmony_ci   *
5361847f8eSopenharmony_ci   * @type { number }
5461847f8eSopenharmony_ci   * @syscap SystemCapability.ArkUI.ArkUI.Full
5561847f8eSopenharmony_ci   * @atomicservice
5661847f8eSopenharmony_ci   * @since 12
5761847f8eSopenharmony_ci   */
5861847f8eSopenharmony_ci  surfaceWidth: number;
5961847f8eSopenharmony_ci
6061847f8eSopenharmony_ci  /**
6161847f8eSopenharmony_ci   * The height of the surface created by XComponent
6261847f8eSopenharmony_ci   *
6361847f8eSopenharmony_ci   * @type { number }
6461847f8eSopenharmony_ci   * @syscap SystemCapability.ArkUI.ArkUI.Full
6561847f8eSopenharmony_ci   * @atomicservice
6661847f8eSopenharmony_ci   * @since 12
6761847f8eSopenharmony_ci   */
6861847f8eSopenharmony_ci  surfaceHeight: number;
6961847f8eSopenharmony_ci}
7061847f8eSopenharmony_ci
7161847f8eSopenharmony_ci/**
7261847f8eSopenharmony_ci * Surface rotation options.
7361847f8eSopenharmony_ci *
7461847f8eSopenharmony_ci * @interface SurfaceRotationOptions
7561847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full
7661847f8eSopenharmony_ci * @atomicservice
7761847f8eSopenharmony_ci * @since 12
7861847f8eSopenharmony_ci */
7961847f8eSopenharmony_cideclare interface SurfaceRotationOptions {
8061847f8eSopenharmony_ci  /**
8161847f8eSopenharmony_ci   * Lock property of the surface rotation.
8261847f8eSopenharmony_ci   *
8361847f8eSopenharmony_ci   * @type { ?boolean }
8461847f8eSopenharmony_ci   * @syscap SystemCapability.ArkUI.ArkUI.Full
8561847f8eSopenharmony_ci   * @atomicservice
8661847f8eSopenharmony_ci   * @since 12
8761847f8eSopenharmony_ci   */
8861847f8eSopenharmony_ci  lock?: boolean;
8961847f8eSopenharmony_ci}
9061847f8eSopenharmony_ci
9161847f8eSopenharmony_ci/**
9261847f8eSopenharmony_ci * Defines XComponentController
9361847f8eSopenharmony_ci *
9461847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full
9561847f8eSopenharmony_ci * @since 8
9661847f8eSopenharmony_ci */
9761847f8eSopenharmony_ci/**
9861847f8eSopenharmony_ci * Defines XComponentController
9961847f8eSopenharmony_ci *
10061847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full
10161847f8eSopenharmony_ci * @crossplatform
10261847f8eSopenharmony_ci * @atomicservice
10361847f8eSopenharmony_ci * @since 12
10461847f8eSopenharmony_ci */
10561847f8eSopenharmony_cideclare class XComponentController {
10661847f8eSopenharmony_ci  /**
10761847f8eSopenharmony_ci   * Constructor.
10861847f8eSopenharmony_ci   *
10961847f8eSopenharmony_ci   * @syscap SystemCapability.ArkUI.ArkUI.Full
11061847f8eSopenharmony_ci   * @since 8
11161847f8eSopenharmony_ci   */
11261847f8eSopenharmony_ci  /**
11361847f8eSopenharmony_ci   * Constructor.
11461847f8eSopenharmony_ci   *
11561847f8eSopenharmony_ci   * @syscap SystemCapability.ArkUI.ArkUI.Full
11661847f8eSopenharmony_ci   * @crossplatform
11761847f8eSopenharmony_ci   * @atomicservice
11861847f8eSopenharmony_ci   * @since 12
11961847f8eSopenharmony_ci   */
12061847f8eSopenharmony_ci  constructor();
12161847f8eSopenharmony_ci
12261847f8eSopenharmony_ci  /**
12361847f8eSopenharmony_ci   * Get the id of surface created by XComponent.
12461847f8eSopenharmony_ci   *
12561847f8eSopenharmony_ci   * @returns { string } The id of surface created by XComponent.
12661847f8eSopenharmony_ci   * @syscap SystemCapability.ArkUI.ArkUI.Full
12761847f8eSopenharmony_ci   * @since 9
12861847f8eSopenharmony_ci   */
12961847f8eSopenharmony_ci  /**
13061847f8eSopenharmony_ci   * Get the id of surface created by XComponent.
13161847f8eSopenharmony_ci   *
13261847f8eSopenharmony_ci   * @returns { string } The id of surface created by XComponent.
13361847f8eSopenharmony_ci   * @syscap SystemCapability.ArkUI.ArkUI.Full
13461847f8eSopenharmony_ci   * @crossplatform
13561847f8eSopenharmony_ci   * @atomicservice
13661847f8eSopenharmony_ci   * @since 12
13761847f8eSopenharmony_ci   */
13861847f8eSopenharmony_ci  getXComponentSurfaceId(): string;
13961847f8eSopenharmony_ci
14061847f8eSopenharmony_ci  /**
14161847f8eSopenharmony_ci   * Get the context of native XComponent.
14261847f8eSopenharmony_ci   *
14361847f8eSopenharmony_ci   * @returns { Object } The context of native XComponent.
14461847f8eSopenharmony_ci   * @syscap SystemCapability.ArkUI.ArkUI.Full
14561847f8eSopenharmony_ci   * @since 8
14661847f8eSopenharmony_ci   */
14761847f8eSopenharmony_ci  /**
14861847f8eSopenharmony_ci   * Get the context of native XComponent.
14961847f8eSopenharmony_ci   *
15061847f8eSopenharmony_ci   * @returns { Object } The context of native XComponent.
15161847f8eSopenharmony_ci   * @syscap SystemCapability.ArkUI.ArkUI.Full
15261847f8eSopenharmony_ci   * @crossplatform
15361847f8eSopenharmony_ci   * @atomicservice
15461847f8eSopenharmony_ci   * @since 12
15561847f8eSopenharmony_ci   */
15661847f8eSopenharmony_ci  getXComponentContext(): Object;
15761847f8eSopenharmony_ci
15861847f8eSopenharmony_ci  /**
15961847f8eSopenharmony_ci   * Set the surface size created by XComponent.
16061847f8eSopenharmony_ci   *
16161847f8eSopenharmony_ci   * @param { object } value - surface size
16261847f8eSopenharmony_ci   * @syscap SystemCapability.ArkUI.ArkUI.Full
16361847f8eSopenharmony_ci   * @since 9
16461847f8eSopenharmony_ci   * @deprecated since 12
16561847f8eSopenharmony_ci   * @useinstead setXComponentSurfaceRect
16661847f8eSopenharmony_ci   */
16761847f8eSopenharmony_ci  setXComponentSurfaceSize(value: {
16861847f8eSopenharmony_ci    surfaceWidth: number;
16961847f8eSopenharmony_ci    surfaceHeight: number;
17061847f8eSopenharmony_ci  }): void;
17161847f8eSopenharmony_ci
17261847f8eSopenharmony_ci  /**
17361847f8eSopenharmony_ci   * Set the rectangle information of surface created by XComponent.
17461847f8eSopenharmony_ci   *
17561847f8eSopenharmony_ci   * @param { SurfaceRect } rect - The surface rectangle information.
17661847f8eSopenharmony_ci   * @syscap SystemCapability.ArkUI.ArkUI.Full
17761847f8eSopenharmony_ci   * @atomicservice
17861847f8eSopenharmony_ci   * @since 12
17961847f8eSopenharmony_ci   */
18061847f8eSopenharmony_ci  setXComponentSurfaceRect(rect: SurfaceRect): void;
18161847f8eSopenharmony_ci
18261847f8eSopenharmony_ci  /**
18361847f8eSopenharmony_ci   * Get the rectangle information of Surface created by XComponent.
18461847f8eSopenharmony_ci   *
18561847f8eSopenharmony_ci   * @returns { SurfaceRect } The surface rectangle information.
18661847f8eSopenharmony_ci   * @syscap SystemCapability.ArkUI.ArkUI.Full
18761847f8eSopenharmony_ci   * @atomicservice
18861847f8eSopenharmony_ci   * @since 12
18961847f8eSopenharmony_ci   */
19061847f8eSopenharmony_ci  getXComponentSurfaceRect(): SurfaceRect;
19161847f8eSopenharmony_ci
19261847f8eSopenharmony_ci  /**
19361847f8eSopenharmony_ci   * Set the rotation options of the Surface created by XComponent.
19461847f8eSopenharmony_ci   *
19561847f8eSopenharmony_ci   * @param { SurfaceRotationOptions } rotationOptions - The surface rotation options.
19661847f8eSopenharmony_ci   * @syscap SystemCapability.ArkUI.ArkUI.Full
19761847f8eSopenharmony_ci   * @atomicservice
19861847f8eSopenharmony_ci   * @since 12
19961847f8eSopenharmony_ci   */
20061847f8eSopenharmony_ci  setXComponentSurfaceRotation(rotationOptions: SurfaceRotationOptions): void;
20161847f8eSopenharmony_ci
20261847f8eSopenharmony_ci  /**
20361847f8eSopenharmony_ci   * Get the rotation options result of the Surface created by XComponent.
20461847f8eSopenharmony_ci   *
20561847f8eSopenharmony_ci   * @returns { Required<SurfaceRotationOptions> } The surface rotation options result.
20661847f8eSopenharmony_ci   * @syscap SystemCapability.ArkUI.ArkUI.Full
20761847f8eSopenharmony_ci   * @atomicservice
20861847f8eSopenharmony_ci   * @since 12
20961847f8eSopenharmony_ci   */
21061847f8eSopenharmony_ci  getXComponentSurfaceRotation(): Required<SurfaceRotationOptions>;
21161847f8eSopenharmony_ci
21261847f8eSopenharmony_ci  /**
21361847f8eSopenharmony_ci   * Called after the surface is first created.
21461847f8eSopenharmony_ci   *
21561847f8eSopenharmony_ci   * @param { string } surfaceId - The id of the surface created by XComponent.
21661847f8eSopenharmony_ci   * @syscap SystemCapability.ArkUI.ArkUI.Full
21761847f8eSopenharmony_ci   * @atomicservice
21861847f8eSopenharmony_ci   * @since 12
21961847f8eSopenharmony_ci   */
22061847f8eSopenharmony_ci  onSurfaceCreated(surfaceId: string): void;
22161847f8eSopenharmony_ci
22261847f8eSopenharmony_ci  /**
22361847f8eSopenharmony_ci   * Called after the surface rectangle information is changed.
22461847f8eSopenharmony_ci   *
22561847f8eSopenharmony_ci   * @param { string } surfaceId - The id of the surface created by XComponent.
22661847f8eSopenharmony_ci   * @param { SurfaceRect } rect - The rectangle information of the surface created by XComponent.
22761847f8eSopenharmony_ci   * @syscap SystemCapability.ArkUI.ArkUI.Full
22861847f8eSopenharmony_ci   * @atomicservice
22961847f8eSopenharmony_ci   * @since 12
23061847f8eSopenharmony_ci   */
23161847f8eSopenharmony_ci  onSurfaceChanged(surfaceId: string, rect: SurfaceRect): void;
23261847f8eSopenharmony_ci
23361847f8eSopenharmony_ci  /**
23461847f8eSopenharmony_ci   * Called when the surface is about to be destroyed.
23561847f8eSopenharmony_ci   *
23661847f8eSopenharmony_ci   * @param { string } surfaceId - The id of the surface created by XComponent.
23761847f8eSopenharmony_ci   * @syscap SystemCapability.ArkUI.ArkUI.Full
23861847f8eSopenharmony_ci   * @atomicservice
23961847f8eSopenharmony_ci   * @since 12
24061847f8eSopenharmony_ci   */
24161847f8eSopenharmony_ci  onSurfaceDestroyed(surfaceId: string): void;
24261847f8eSopenharmony_ci
24361847f8eSopenharmony_ci  /**
24461847f8eSopenharmony_ci   * Start image analyzer.
24561847f8eSopenharmony_ci   *
24661847f8eSopenharmony_ci   * @param { ImageAnalyzerConfig } config - Image analyzer config.
24761847f8eSopenharmony_ci   * @returns { Promise<void> } The promise returned by the function.
24861847f8eSopenharmony_ci   * @throws { BusinessError } 110001 - Image analysis feature is unsupported.
24961847f8eSopenharmony_ci   * @throws { BusinessError } 110002 - Image analysis is currently being executed.
25061847f8eSopenharmony_ci   * @throws { BusinessError } 110003 - Image analysis is stopped.
25161847f8eSopenharmony_ci   * @syscap SystemCapability.ArkUI.ArkUI.Full
25261847f8eSopenharmony_ci   * @atomicservice
25361847f8eSopenharmony_ci   * @since 12
25461847f8eSopenharmony_ci   */
25561847f8eSopenharmony_ci  startImageAnalyzer(config: ImageAnalyzerConfig): Promise<void>;
25661847f8eSopenharmony_ci
25761847f8eSopenharmony_ci  /**
25861847f8eSopenharmony_ci   * Stop image analyzer.
25961847f8eSopenharmony_ci   * 
26061847f8eSopenharmony_ci   * @syscap SystemCapability.ArkUI.ArkUI.Full
26161847f8eSopenharmony_ci   * @atomicservice
26261847f8eSopenharmony_ci   * @since 12
26361847f8eSopenharmony_ci   */
26461847f8eSopenharmony_ci  stopImageAnalyzer(): void;
26561847f8eSopenharmony_ci}
26661847f8eSopenharmony_ci
26761847f8eSopenharmony_ci/**
26861847f8eSopenharmony_ci * Defines the xcomponent options.
26961847f8eSopenharmony_ci *
27061847f8eSopenharmony_ci * @interface XComponentOptions
27161847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full
27261847f8eSopenharmony_ci * @atomicservice
27361847f8eSopenharmony_ci * @since 12
27461847f8eSopenharmony_ci */
27561847f8eSopenharmony_cideclare interface XComponentOptions {
27661847f8eSopenharmony_ci  /**
27761847f8eSopenharmony_ci   * The type of xcomponent
27861847f8eSopenharmony_ci   *
27961847f8eSopenharmony_ci   * @type { XComponentType }
28061847f8eSopenharmony_ci   * @syscap SystemCapability.ArkUI.ArkUI.Full
28161847f8eSopenharmony_ci   * @atomicservice
28261847f8eSopenharmony_ci   * @since 12
28361847f8eSopenharmony_ci   */
28461847f8eSopenharmony_ci  type: XComponentType;
28561847f8eSopenharmony_ci
28661847f8eSopenharmony_ci  /**
28761847f8eSopenharmony_ci   * The controller of xcomponent.
28861847f8eSopenharmony_ci   *
28961847f8eSopenharmony_ci   * @type { XComponentController }
29061847f8eSopenharmony_ci   * @syscap SystemCapability.ArkUI.ArkUI.Full
29161847f8eSopenharmony_ci   * @atomicservice
29261847f8eSopenharmony_ci   * @since 12
29361847f8eSopenharmony_ci   */
29461847f8eSopenharmony_ci  controller: XComponentController;
29561847f8eSopenharmony_ci
29661847f8eSopenharmony_ci  /**
29761847f8eSopenharmony_ci   * Image ai options.
29861847f8eSopenharmony_ci   *
29961847f8eSopenharmony_ci   * @type { ?ImageAIOptions }
30061847f8eSopenharmony_ci   * @syscap SystemCapability.ArkUI.ArkUI.Full
30161847f8eSopenharmony_ci   * @atomicservice
30261847f8eSopenharmony_ci   * @since 12
30361847f8eSopenharmony_ci   */
30461847f8eSopenharmony_ci  imageAIOptions?: ImageAIOptions;
30561847f8eSopenharmony_ci}
30661847f8eSopenharmony_ci
30761847f8eSopenharmony_ci/**
30861847f8eSopenharmony_ci * Defines XComponent.
30961847f8eSopenharmony_ci *
31061847f8eSopenharmony_ci * @interface XComponentInterface
31161847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full
31261847f8eSopenharmony_ci * @since 8
31361847f8eSopenharmony_ci */
31461847f8eSopenharmony_ci/**
31561847f8eSopenharmony_ci * Defines XComponent.
31661847f8eSopenharmony_ci *
31761847f8eSopenharmony_ci * @interface XComponentInterface
31861847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full
31961847f8eSopenharmony_ci * @crossplatform
32061847f8eSopenharmony_ci * @atomicservice
32161847f8eSopenharmony_ci * @since 12
32261847f8eSopenharmony_ci */
32361847f8eSopenharmony_ciinterface XComponentInterface {
32461847f8eSopenharmony_ci  /**
32561847f8eSopenharmony_ci   * Constructor parameters
32661847f8eSopenharmony_ci   *
32761847f8eSopenharmony_ci   * @param { object } value - Indicates the options of the xcomponent.
32861847f8eSopenharmony_ci   * @returns { XComponentAttribute }
32961847f8eSopenharmony_ci   * @syscap SystemCapability.ArkUI.ArkUI.Full
33061847f8eSopenharmony_ci   * @since 8
33161847f8eSopenharmony_ci   * @deprecated since 12
33261847f8eSopenharmony_ci   */
33361847f8eSopenharmony_ci  (value: { id: string; type: string; libraryname?: string; controller?: XComponentController }): XComponentAttribute;
33461847f8eSopenharmony_ci
33561847f8eSopenharmony_ci  /**
33661847f8eSopenharmony_ci   * Constructor parameters
33761847f8eSopenharmony_ci   *
33861847f8eSopenharmony_ci   * @param { object } value - Indicates the options of the xcomponent.
33961847f8eSopenharmony_ci   * @returns { XComponentAttribute } The attribute of the xcomponent.
34061847f8eSopenharmony_ci   * @syscap SystemCapability.ArkUI.ArkUI.Full
34161847f8eSopenharmony_ci   * @since 10
34261847f8eSopenharmony_ci   */
34361847f8eSopenharmony_ci  /**
34461847f8eSopenharmony_ci   * Constructor parameters
34561847f8eSopenharmony_ci   *
34661847f8eSopenharmony_ci   * @param { object } value - Indicates the options of the xcomponent.
34761847f8eSopenharmony_ci   * @returns { XComponentAttribute } The attribute of the xcomponent.
34861847f8eSopenharmony_ci   * @syscap SystemCapability.ArkUI.ArkUI.Full
34961847f8eSopenharmony_ci   * @crossplatform
35061847f8eSopenharmony_ci   * @atomicservice
35161847f8eSopenharmony_ci   * @since 12
35261847f8eSopenharmony_ci   */
35361847f8eSopenharmony_ci  (value: { id: string; type: XComponentType; libraryname?: string; controller?: XComponentController }): XComponentAttribute;
35461847f8eSopenharmony_ci
35561847f8eSopenharmony_ci  /**
35661847f8eSopenharmony_ci   * Constructor parameters
35761847f8eSopenharmony_ci   *
35861847f8eSopenharmony_ci   * @param { XComponentOptions } options - Indicates the options of the xcomponent.
35961847f8eSopenharmony_ci   * @returns { XComponentAttribute } The attribute of the xcomponent.
36061847f8eSopenharmony_ci   * @syscap SystemCapability.ArkUI.ArkUI.Full
36161847f8eSopenharmony_ci   * @atomicservice
36261847f8eSopenharmony_ci   * @since 12
36361847f8eSopenharmony_ci   */
36461847f8eSopenharmony_ci  (options: XComponentOptions): XComponentAttribute;
36561847f8eSopenharmony_ci}
36661847f8eSopenharmony_ci
36761847f8eSopenharmony_ci/**
36861847f8eSopenharmony_ci * Callback invoked when XComponent onload.
36961847f8eSopenharmony_ci *
37061847f8eSopenharmony_ci * @typedef { function } OnNativeLoadCallback
37161847f8eSopenharmony_ci * @param { object } [event] - Get the context of the XCompoonent instance object,
37261847f8eSopenharmony_ci * and the methods mounted on the context are defined by the developer in the C++layer.
37361847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full
37461847f8eSopenharmony_ci * @crossplatform
37561847f8eSopenharmony_ci * @atomicservice
37661847f8eSopenharmony_ci * @since 14
37761847f8eSopenharmony_ci */
37861847f8eSopenharmony_cideclare type OnNativeLoadCallback = (event?: object) => void
37961847f8eSopenharmony_ci
38061847f8eSopenharmony_ci/**
38161847f8eSopenharmony_ci * Defines XComponentAttribute.
38261847f8eSopenharmony_ci *
38361847f8eSopenharmony_ci * @extends CommonMethod<XComponentAttribute>
38461847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full
38561847f8eSopenharmony_ci * @since 8
38661847f8eSopenharmony_ci */
38761847f8eSopenharmony_ci/**
38861847f8eSopenharmony_ci * Defines XComponentAttribute.
38961847f8eSopenharmony_ci *
39061847f8eSopenharmony_ci * @extends CommonMethod<XComponentAttribute>
39161847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full
39261847f8eSopenharmony_ci * @crossplatform
39361847f8eSopenharmony_ci * @atomicservice
39461847f8eSopenharmony_ci * @since 12
39561847f8eSopenharmony_ci */
39661847f8eSopenharmony_cideclare class XComponentAttribute extends CommonMethod<XComponentAttribute> {
39761847f8eSopenharmony_ci  /**
39861847f8eSopenharmony_ci   * Called when judging whether the xcomponent surface is created.
39961847f8eSopenharmony_ci   *
40061847f8eSopenharmony_ci   * @param { function } [callback] - Called when judging whether the xcomponent surface is created.
40161847f8eSopenharmony_ci   * @returns { XComponentAttribute }
40261847f8eSopenharmony_ci   * @syscap SystemCapability.ArkUI.ArkUI.Full
40361847f8eSopenharmony_ci   * @since 8
40461847f8eSopenharmony_ci   */
40561847f8eSopenharmony_ci  /**
40661847f8eSopenharmony_ci   * Called when judging whether the xcomponent surface is created.
40761847f8eSopenharmony_ci   *
40861847f8eSopenharmony_ci   * @param { function } [callback] - Called when judging whether the xcomponent surface is created.
40961847f8eSopenharmony_ci   * @returns { XComponentAttribute }
41061847f8eSopenharmony_ci   * @syscap SystemCapability.ArkUI.ArkUI.Full
41161847f8eSopenharmony_ci   * @crossplatform
41261847f8eSopenharmony_ci   * @atomicservice
41361847f8eSopenharmony_ci   * @since 12
41461847f8eSopenharmony_ci   */
41561847f8eSopenharmony_ci  /**
41661847f8eSopenharmony_ci   * Called when judging whether the xcomponent surface is created.
41761847f8eSopenharmony_ci   *
41861847f8eSopenharmony_ci   * @param { OnNativeLoadCallback } callback - Called when judging whether the xcomponent surface is created.
41961847f8eSopenharmony_ci   * @returns { XComponentAttribute }
42061847f8eSopenharmony_ci   * @syscap SystemCapability.ArkUI.ArkUI.Full
42161847f8eSopenharmony_ci   * @crossplatform
42261847f8eSopenharmony_ci   * @atomicservice
42361847f8eSopenharmony_ci   * @since 14
42461847f8eSopenharmony_ci   */
42561847f8eSopenharmony_ci  onLoad(callback: OnNativeLoadCallback): XComponentAttribute;
42661847f8eSopenharmony_ci
42761847f8eSopenharmony_ci  /**
42861847f8eSopenharmony_ci   * Called when judging whether the xcomponent is destroyed.
42961847f8eSopenharmony_ci   *
43061847f8eSopenharmony_ci   * @param { function } event - Called when judging whether the xcomponent is destroyed.
43161847f8eSopenharmony_ci   * @returns { XComponentAttribute }
43261847f8eSopenharmony_ci   * @syscap SystemCapability.ArkUI.ArkUI.Full
43361847f8eSopenharmony_ci   * @since 8
43461847f8eSopenharmony_ci   */
43561847f8eSopenharmony_ci  /**
43661847f8eSopenharmony_ci   * Called when judging whether the xcomponent is destroyed.
43761847f8eSopenharmony_ci   *
43861847f8eSopenharmony_ci   * @param { function } event - Called when judging whether the xcomponent is destroyed.
43961847f8eSopenharmony_ci   * @returns { XComponentAttribute }
44061847f8eSopenharmony_ci   * @syscap SystemCapability.ArkUI.ArkUI.Full
44161847f8eSopenharmony_ci   * @crossplatform
44261847f8eSopenharmony_ci   * @atomicservice
44361847f8eSopenharmony_ci   * @since 12
44461847f8eSopenharmony_ci   */
44561847f8eSopenharmony_ci  /**
44661847f8eSopenharmony_ci   * Called when judging whether the xcomponent is destroyed.
44761847f8eSopenharmony_ci   *
44861847f8eSopenharmony_ci   * @param { VoidCallback } event - Called when judging whether the xcomponent is destroyed.
44961847f8eSopenharmony_ci   * @returns { XComponentAttribute }
45061847f8eSopenharmony_ci   * @syscap SystemCapability.ArkUI.ArkUI.Full
45161847f8eSopenharmony_ci   * @crossplatform
45261847f8eSopenharmony_ci   * @atomicservice
45361847f8eSopenharmony_ci   * @since 14
45461847f8eSopenharmony_ci   */
45561847f8eSopenharmony_ci  onDestroy(event: VoidCallback): XComponentAttribute;
45661847f8eSopenharmony_ci
45761847f8eSopenharmony_ci  /**
45861847f8eSopenharmony_ci   * Enable image analyzer for XComponent.
45961847f8eSopenharmony_ci   *
46061847f8eSopenharmony_ci   * @param { boolean } enable
46161847f8eSopenharmony_ci   * @returns { XComponentAttribute }
46261847f8eSopenharmony_ci   * @syscap SystemCapability.ArkUI.ArkUI.Full
46361847f8eSopenharmony_ci   * @atomicservice
46461847f8eSopenharmony_ci   * @since 12
46561847f8eSopenharmony_ci   */
46661847f8eSopenharmony_ci  enableAnalyzer(enable: boolean): XComponentAttribute;
46761847f8eSopenharmony_ci
46861847f8eSopenharmony_ci  /**
46961847f8eSopenharmony_ci   * Enable privacy protection for XComponent.
47061847f8eSopenharmony_ci   *
47161847f8eSopenharmony_ci   * @param { boolean } isSecure
47261847f8eSopenharmony_ci   * @returns { XComponentAttribute }
47361847f8eSopenharmony_ci   * @syscap SystemCapability.ArkUI.ArkUI.Full
47461847f8eSopenharmony_ci   * @atomicservice
47561847f8eSopenharmony_ci   * @since 13
47661847f8eSopenharmony_ci   */
47761847f8eSopenharmony_ci  enableSecure(isSecure: boolean): XComponentAttribute;
47861847f8eSopenharmony_ci}
47961847f8eSopenharmony_ci
48061847f8eSopenharmony_ci/**
48161847f8eSopenharmony_ci * Defines XComponent Component.
48261847f8eSopenharmony_ci *
48361847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full
48461847f8eSopenharmony_ci * @since 8
48561847f8eSopenharmony_ci */
48661847f8eSopenharmony_ci/**
48761847f8eSopenharmony_ci * Defines XComponent Component.
48861847f8eSopenharmony_ci *
48961847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full
49061847f8eSopenharmony_ci * @crossplatform
49161847f8eSopenharmony_ci * @atomicservice
49261847f8eSopenharmony_ci * @since 12
49361847f8eSopenharmony_ci */
49461847f8eSopenharmony_cideclare const XComponent: XComponentInterface;
49561847f8eSopenharmony_ci
49661847f8eSopenharmony_ci/**
49761847f8eSopenharmony_ci * Defines XComponent Component instance.
49861847f8eSopenharmony_ci *
49961847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full
50061847f8eSopenharmony_ci * @since 8
50161847f8eSopenharmony_ci */
50261847f8eSopenharmony_ci/**
50361847f8eSopenharmony_ci * Defines XComponent Component instance.
50461847f8eSopenharmony_ci *
50561847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full
50661847f8eSopenharmony_ci * @crossplatform
50761847f8eSopenharmony_ci * @atomicservice
50861847f8eSopenharmony_ci * @since 12
50961847f8eSopenharmony_ci */
51061847f8eSopenharmony_cideclare const XComponentInstance: XComponentAttribute;
511