1/*
2 * Copyright (c) 2023 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 *     http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16/**
17 * @file
18 * @kit ArkUI
19 */
20
21
22
23import { UIContext } from '../@ohos.arkui.UIContext';
24import { NodeRenderType, RenderOptions } from './BuilderNode';
25import { FrameNode } from './FrameNode';
26
27/**
28 * Defines XComponent Node.
29 *
30 * @extends FrameNode
31 * @syscap SystemCapability.ArkUI.ArkUI.Full
32 * @since 11
33 * @deprecated since 12
34 */
35export declare class XComponentNode extends FrameNode {
36  /**
37   * constructor.
38   *
39   * @param { UIContext } uiContext - UIContext used to create the FrameNode
40   * @param { RenderOptions } options - Render options of the Builder Node
41   * @param { string } id - XComponent id defined by the application
42   * @param { XComponentType } type - XComponent type
43   * @param { string } libraryName - The name of the library to be loaded by XComponent
44   * @syscap SystemCapability.ArkUI.ArkUI.Full
45   * @since 11
46   * @deprecated since 12
47   */
48  constructor(uiContext: UIContext, options: RenderOptions,
49    id: string, type: XComponentType, libraryName?: string);
50
51  /**
52   * Called when the XComponent surface has been created.
53   *
54   * @param { Object } event - event from native when the library loaded
55   * @syscap SystemCapability.ArkUI.ArkUI.Full
56   * @since 11
57   * @deprecated since 12
58   */
59  onCreate(event?: Object): void;
60
61  /**
62   * Called when the XComponent surface has been destroyed.
63   *
64   * @syscap SystemCapability.ArkUI.ArkUI.Full
65   * @since 11
66   * @deprecated since 12
67   */
68  onDestroy(): void;
69
70  /**
71   * Set the render type of the builderNode.
72   *
73   * @param { NodeRenderType } type - render type
74   * @returns { boolean } - Returns if change the render type successfully.
75   * @syscap SystemCapability.ArkUI.ArkUI.Full
76   * @since 11
77   * @deprecated since 12
78   */
79  changeRenderType(type: NodeRenderType): boolean;
80}
81