• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2021 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 * Provides an interface for RichText component.
18 *
19 * @interface RichTextInterface
20 * @syscap SystemCapability.ArkUI.ArkUI.Full
21 * @since 8
22 */
23/**
24 * Provides an interface for RichText component.
25 *
26 * @interface RichTextInterface
27 * @syscap SystemCapability.ArkUI.ArkUI.Full
28 * @crossplatform
29 * @atomicservice
30 * @since 11
31 */
32interface RichTextInterface {
33  /**
34   * Set value.
35   *
36   * @param { string } content
37   * @returns { RichTextAttribute }
38   * @syscap SystemCapability.ArkUI.ArkUI.Full
39   * @since 8
40   */
41  /**
42   * Set value.
43   *
44   * @param { string } content
45   * @returns { RichTextAttribute }
46   * @syscap SystemCapability.ArkUI.ArkUI.Full
47   * @crossplatform
48   * @atomicservice
49   * @since 11
50   */
51  (content: string): RichTextAttribute;
52}
53
54/**
55 * Defines the RichText attribute functions.
56 *
57 * @extends CommonMethod<RichTextAttribute>
58 * @syscap SystemCapability.ArkUI.ArkUI.Full
59 * @since 8
60 */
61/**
62 * Defines the RichText attribute functions.
63 *
64 * @extends CommonMethod<RichTextAttribute>
65 * @syscap SystemCapability.ArkUI.ArkUI.Full
66 * @crossplatform
67 * @atomicservice
68 * @since 11
69 */
70declare class RichTextAttribute extends CommonMethod<RichTextAttribute> {
71  /**
72   * Triggered when the RichText loading starts.
73   *
74   * @param { function } callback
75   * @returns { RichTextAttribute }
76   * @syscap SystemCapability.ArkUI.ArkUI.Full
77   * @since 8
78   */
79  /**
80   * Triggered when the RichText loading starts.
81   *
82   * @param { function } callback
83   * @returns { RichTextAttribute }
84   * @syscap SystemCapability.ArkUI.ArkUI.Full
85   * @crossplatform
86   * @atomicservice
87   * @since 11
88   */
89  onStart(callback: () => void): RichTextAttribute;
90
91  /**
92   * Triggered when the RichText loading ends.
93   *
94   * @param { function } callback
95   * @returns { RichTextAttribute }
96   * @syscap SystemCapability.ArkUI.ArkUI.Full
97   * @since 8
98   */
99  /**
100   * Triggered when the RichText loading ends.
101   *
102   * @param { function } callback
103   * @returns { RichTextAttribute }
104   * @syscap SystemCapability.ArkUI.ArkUI.Full
105   * @crossplatform
106   * @atomicservice
107   * @since 11
108   */
109  onComplete(callback: () => void): RichTextAttribute;
110}
111
112/**
113 * Defines RichText Component.
114 *
115 * @syscap SystemCapability.ArkUI.ArkUI.Full
116 * @since 8
117 */
118/**
119 * Defines RichText Component.
120 *
121 * @syscap SystemCapability.ArkUI.ArkUI.Full
122 * @crossplatform
123 * @atomicservice
124 * @since 11
125 */
126declare const RichText: RichTextInterface;
127
128/**
129 * Defines RichText Component instance.
130 *
131 * @syscap SystemCapability.ArkUI.ArkUI.Full
132 * @since 8
133 */
134/**
135 * Defines RichText Component instance.
136 *
137 * @syscap SystemCapability.ArkUI.ArkUI.Full
138 * @crossplatform
139 * @atomicservice
140 * @since 11
141 */
142declare const RichTextInstance: RichTextAttribute;
143