161847f8eSopenharmony_ci/*
261847f8eSopenharmony_ci * Copyright (c) 2023 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 * Enumerates the icon styles.
2361847f8eSopenharmony_ci *
2461847f8eSopenharmony_ci * @enum { number }
2561847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full
2661847f8eSopenharmony_ci * @since 10
2761847f8eSopenharmony_ci */
2861847f8eSopenharmony_ci/**
2961847f8eSopenharmony_ci * Enumerates the icon styles.
3061847f8eSopenharmony_ci *
3161847f8eSopenharmony_ci * @enum { number }
3261847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full
3361847f8eSopenharmony_ci * @atomicservice
3461847f8eSopenharmony_ci * @since 11
3561847f8eSopenharmony_ci */
3661847f8eSopenharmony_cideclare enum PasteIconStyle {
3761847f8eSopenharmony_ci  /**
3861847f8eSopenharmony_ci   * Icon rendered as lines.
3961847f8eSopenharmony_ci   *
4061847f8eSopenharmony_ci   * @syscap SystemCapability.ArkUI.ArkUI.Full
4161847f8eSopenharmony_ci   * @since 10
4261847f8eSopenharmony_ci   */
4361847f8eSopenharmony_ci  /**
4461847f8eSopenharmony_ci   * Icon rendered as lines.
4561847f8eSopenharmony_ci   *
4661847f8eSopenharmony_ci   * @syscap SystemCapability.ArkUI.ArkUI.Full
4761847f8eSopenharmony_ci   * @atomicservice
4861847f8eSopenharmony_ci   * @since 11
4961847f8eSopenharmony_ci   */
5061847f8eSopenharmony_ci  LINES = 0
5161847f8eSopenharmony_ci}
5261847f8eSopenharmony_ci
5361847f8eSopenharmony_ci/**
5461847f8eSopenharmony_ci * Enumerates the text that can be displayed on the paste button.
5561847f8eSopenharmony_ci *
5661847f8eSopenharmony_ci * @enum { number }
5761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full
5861847f8eSopenharmony_ci * @since 10
5961847f8eSopenharmony_ci */
6061847f8eSopenharmony_ci/**
6161847f8eSopenharmony_ci * Enumerates the text that can be displayed on the paste button.
6261847f8eSopenharmony_ci *
6361847f8eSopenharmony_ci * @enum { number }
6461847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full
6561847f8eSopenharmony_ci * @atomicservice
6661847f8eSopenharmony_ci * @since 11
6761847f8eSopenharmony_ci */
6861847f8eSopenharmony_cideclare enum PasteDescription {
6961847f8eSopenharmony_ci  /**
7061847f8eSopenharmony_ci   * Paste
7161847f8eSopenharmony_ci   *
7261847f8eSopenharmony_ci   * @syscap SystemCapability.ArkUI.ArkUI.Full
7361847f8eSopenharmony_ci   * @since 10
7461847f8eSopenharmony_ci   */
7561847f8eSopenharmony_ci  /**
7661847f8eSopenharmony_ci   * Paste
7761847f8eSopenharmony_ci   *
7861847f8eSopenharmony_ci   * @syscap SystemCapability.ArkUI.ArkUI.Full
7961847f8eSopenharmony_ci   * @atomicservice
8061847f8eSopenharmony_ci   * @since 11
8161847f8eSopenharmony_ci   */
8261847f8eSopenharmony_ci  PASTE = 0
8361847f8eSopenharmony_ci}
8461847f8eSopenharmony_ci
8561847f8eSopenharmony_ci/**
8661847f8eSopenharmony_ci * Declares the interface for setting the paste button options.
8761847f8eSopenharmony_ci *
8861847f8eSopenharmony_ci * @interface PasteButtonOptions
8961847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full
9061847f8eSopenharmony_ci * @since 10
9161847f8eSopenharmony_ci */
9261847f8eSopenharmony_ci/**
9361847f8eSopenharmony_ci * Declares the interface for setting the paste button options.
9461847f8eSopenharmony_ci *
9561847f8eSopenharmony_ci * @interface PasteButtonOptions
9661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full
9761847f8eSopenharmony_ci * @atomicservice
9861847f8eSopenharmony_ci * @since 11
9961847f8eSopenharmony_ci */
10061847f8eSopenharmony_cideclare interface PasteButtonOptions {
10161847f8eSopenharmony_ci  /**
10261847f8eSopenharmony_ci   * Style of the icon to be drawn.
10361847f8eSopenharmony_ci   *
10461847f8eSopenharmony_ci   * @type { ?PasteIconStyle }
10561847f8eSopenharmony_ci   * @syscap SystemCapability.ArkUI.ArkUI.Full
10661847f8eSopenharmony_ci   * @since 10
10761847f8eSopenharmony_ci   */
10861847f8eSopenharmony_ci  /**
10961847f8eSopenharmony_ci   * Style of the icon to be drawn.
11061847f8eSopenharmony_ci   *
11161847f8eSopenharmony_ci   * @type { ?PasteIconStyle }
11261847f8eSopenharmony_ci   * @syscap SystemCapability.ArkUI.ArkUI.Full
11361847f8eSopenharmony_ci   * @atomicservice
11461847f8eSopenharmony_ci   * @since 11
11561847f8eSopenharmony_ci   */
11661847f8eSopenharmony_ci  icon?: PasteIconStyle;
11761847f8eSopenharmony_ci
11861847f8eSopenharmony_ci  /**
11961847f8eSopenharmony_ci   * Text to be displayed on the button.
12061847f8eSopenharmony_ci   *
12161847f8eSopenharmony_ci   * @type { ?PasteDescription }
12261847f8eSopenharmony_ci   * @syscap SystemCapability.ArkUI.ArkUI.Full
12361847f8eSopenharmony_ci   * @since 10
12461847f8eSopenharmony_ci   */
12561847f8eSopenharmony_ci  /**
12661847f8eSopenharmony_ci   * Text to be displayed on the button.
12761847f8eSopenharmony_ci   *
12861847f8eSopenharmony_ci   * @type { ?PasteDescription }
12961847f8eSopenharmony_ci   * @syscap SystemCapability.ArkUI.ArkUI.Full
13061847f8eSopenharmony_ci   * @atomicservice
13161847f8eSopenharmony_ci   * @since 11
13261847f8eSopenharmony_ci   */
13361847f8eSopenharmony_ci  text?: PasteDescription;
13461847f8eSopenharmony_ci
13561847f8eSopenharmony_ci  /**
13661847f8eSopenharmony_ci   * Type of the button.
13761847f8eSopenharmony_ci   *
13861847f8eSopenharmony_ci   * @type { ?ButtonType }
13961847f8eSopenharmony_ci   * @syscap SystemCapability.ArkUI.ArkUI.Full
14061847f8eSopenharmony_ci   * @since 10
14161847f8eSopenharmony_ci   */
14261847f8eSopenharmony_ci  /**
14361847f8eSopenharmony_ci   * Type of the button.
14461847f8eSopenharmony_ci   *
14561847f8eSopenharmony_ci   * @type { ?ButtonType }
14661847f8eSopenharmony_ci   * @syscap SystemCapability.ArkUI.ArkUI.Full
14761847f8eSopenharmony_ci   * @atomicservice
14861847f8eSopenharmony_ci   * @since 11
14961847f8eSopenharmony_ci   */
15061847f8eSopenharmony_ci  buttonType?: ButtonType;
15161847f8eSopenharmony_ci}
15261847f8eSopenharmony_ci
15361847f8eSopenharmony_ci/**
15461847f8eSopenharmony_ci * Enumerates the click event results of the paste button.
15561847f8eSopenharmony_ci *
15661847f8eSopenharmony_ci * @enum { number }
15761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full
15861847f8eSopenharmony_ci * @since 10
15961847f8eSopenharmony_ci */
16061847f8eSopenharmony_ci/**
16161847f8eSopenharmony_ci * Enumerates the click event results of the paste button.
16261847f8eSopenharmony_ci *
16361847f8eSopenharmony_ci * @enum { number }
16461847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full
16561847f8eSopenharmony_ci * @atomicservice
16661847f8eSopenharmony_ci * @since 11
16761847f8eSopenharmony_ci */
16861847f8eSopenharmony_cideclare enum PasteButtonOnClickResult {
16961847f8eSopenharmony_ci  /**
17061847f8eSopenharmony_ci   * Success.
17161847f8eSopenharmony_ci   *
17261847f8eSopenharmony_ci   * @syscap SystemCapability.ArkUI.ArkUI.Full
17361847f8eSopenharmony_ci   * @since 10
17461847f8eSopenharmony_ci   */
17561847f8eSopenharmony_ci  /**
17661847f8eSopenharmony_ci   * Success.
17761847f8eSopenharmony_ci   *
17861847f8eSopenharmony_ci   * @syscap SystemCapability.ArkUI.ArkUI.Full
17961847f8eSopenharmony_ci   * @atomicservice
18061847f8eSopenharmony_ci   * @since 11
18161847f8eSopenharmony_ci   */
18261847f8eSopenharmony_ci  SUCCESS = 0,
18361847f8eSopenharmony_ci
18461847f8eSopenharmony_ci  /**
18561847f8eSopenharmony_ci   * Failure because the application is not temporarily authorized for accessing the current pasteboard data.
18661847f8eSopenharmony_ci   *
18761847f8eSopenharmony_ci   * @syscap SystemCapability.ArkUI.ArkUI.Full
18861847f8eSopenharmony_ci   * @since 10
18961847f8eSopenharmony_ci   */
19061847f8eSopenharmony_ci  /**
19161847f8eSopenharmony_ci   * Failure because the application is not temporarily authorized for accessing the current pasteboard data.
19261847f8eSopenharmony_ci   *
19361847f8eSopenharmony_ci   * @syscap SystemCapability.ArkUI.ArkUI.Full
19461847f8eSopenharmony_ci   * @atomicservice
19561847f8eSopenharmony_ci   * @since 11
19661847f8eSopenharmony_ci   */
19761847f8eSopenharmony_ci  TEMPORARY_AUTHORIZATION_FAILED = 1
19861847f8eSopenharmony_ci}
19961847f8eSopenharmony_ci
20061847f8eSopenharmony_ci/**
20161847f8eSopenharmony_ci * Defines the interface for setting a paste button.
20261847f8eSopenharmony_ci *
20361847f8eSopenharmony_ci * @interface PasteButtonInterface
20461847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full
20561847f8eSopenharmony_ci * @since 10
20661847f8eSopenharmony_ci */
20761847f8eSopenharmony_ci/**
20861847f8eSopenharmony_ci * Defines the interface for setting a paste button.
20961847f8eSopenharmony_ci *
21061847f8eSopenharmony_ci * @interface PasteButtonInterface
21161847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full
21261847f8eSopenharmony_ci * @atomicservice
21361847f8eSopenharmony_ci * @since 11
21461847f8eSopenharmony_ci */
21561847f8eSopenharmony_ciinterface PasteButtonInterface {
21661847f8eSopenharmony_ci  /**
21761847f8eSopenharmony_ci   * Creates a paste button.
21861847f8eSopenharmony_ci   *
21961847f8eSopenharmony_ci   * @returns { PasteButtonAttribute } Returns the attribute of the paste button.
22061847f8eSopenharmony_ci   * @syscap SystemCapability.ArkUI.ArkUI.Full
22161847f8eSopenharmony_ci   * @since 10
22261847f8eSopenharmony_ci   */
22361847f8eSopenharmony_ci  /**
22461847f8eSopenharmony_ci   * Creates a paste button.
22561847f8eSopenharmony_ci   *
22661847f8eSopenharmony_ci   * @returns { PasteButtonAttribute } Returns the attribute of the paste button.
22761847f8eSopenharmony_ci   * @syscap SystemCapability.ArkUI.ArkUI.Full
22861847f8eSopenharmony_ci   * @atomicservice
22961847f8eSopenharmony_ci   * @since 11
23061847f8eSopenharmony_ci   */
23161847f8eSopenharmony_ci  (): PasteButtonAttribute;
23261847f8eSopenharmony_ci
23361847f8eSopenharmony_ci  /**
23461847f8eSopenharmony_ci   * Creates a paste button with the specified composition.
23561847f8eSopenharmony_ci   * If an attribute is not set, the corresponding element will not be drawn.
23661847f8eSopenharmony_ci   *
23761847f8eSopenharmony_ci   * @param { PasteButtonOptions } options - Indicates the options of the paste button.
23861847f8eSopenharmony_ci   * @returns { PasteButtonAttribute } Returns the attribute of the paste button.
23961847f8eSopenharmony_ci   * @syscap SystemCapability.ArkUI.ArkUI.Full
24061847f8eSopenharmony_ci   * @since 10
24161847f8eSopenharmony_ci   */
24261847f8eSopenharmony_ci  /**
24361847f8eSopenharmony_ci   * Creates a paste button with the specified composition.
24461847f8eSopenharmony_ci   * If an attribute is not set, the corresponding element will not be drawn.
24561847f8eSopenharmony_ci   *
24661847f8eSopenharmony_ci   * @param { PasteButtonOptions } options - Indicates the options of the paste button.
24761847f8eSopenharmony_ci   * @returns { PasteButtonAttribute } Returns the attribute of the paste button.
24861847f8eSopenharmony_ci   * @syscap SystemCapability.ArkUI.ArkUI.Full
24961847f8eSopenharmony_ci   * @atomicservice
25061847f8eSopenharmony_ci   * @since 11
25161847f8eSopenharmony_ci   */
25261847f8eSopenharmony_ci  (options: PasteButtonOptions): PasteButtonAttribute;
25361847f8eSopenharmony_ci}
25461847f8eSopenharmony_ci
25561847f8eSopenharmony_ci/**
25661847f8eSopenharmony_ci * Defines the attributes of the paste button.
25761847f8eSopenharmony_ci *
25861847f8eSopenharmony_ci * @extends SecurityComponentMethod<PasteButtonAttribute>
25961847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full
26061847f8eSopenharmony_ci * @since 10
26161847f8eSopenharmony_ci */
26261847f8eSopenharmony_ci/**
26361847f8eSopenharmony_ci * Defines the attributes of the paste button.
26461847f8eSopenharmony_ci *
26561847f8eSopenharmony_ci * @extends SecurityComponentMethod<PasteButtonAttribute>
26661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full
26761847f8eSopenharmony_ci * @atomicservice
26861847f8eSopenharmony_ci * @since 11
26961847f8eSopenharmony_ci */
27061847f8eSopenharmony_cideclare class PasteButtonAttribute extends SecurityComponentMethod<PasteButtonAttribute> {
27161847f8eSopenharmony_ci  /**
27261847f8eSopenharmony_ci   * Called when the paste button is clicked.
27361847f8eSopenharmony_ci   *
27461847f8eSopenharmony_ci   * @param { function } event
27561847f8eSopenharmony_ci   * @returns { PasteButtonAttribute } Returns the attribute of the paste button.
27661847f8eSopenharmony_ci   * @syscap SystemCapability.ArkUI.ArkUI.Full
27761847f8eSopenharmony_ci   * @since 10
27861847f8eSopenharmony_ci   */
27961847f8eSopenharmony_ci  /**
28061847f8eSopenharmony_ci   * Called when the paste button is clicked.
28161847f8eSopenharmony_ci   *
28261847f8eSopenharmony_ci   * @param { function } event
28361847f8eSopenharmony_ci   * @returns { PasteButtonAttribute } Returns the attribute of the paste button.
28461847f8eSopenharmony_ci   * @syscap SystemCapability.ArkUI.ArkUI.Full
28561847f8eSopenharmony_ci   * @atomicservice
28661847f8eSopenharmony_ci   * @since 11
28761847f8eSopenharmony_ci   */
28861847f8eSopenharmony_ci  onClick(event: (event: ClickEvent, result: PasteButtonOnClickResult) => void): PasteButtonAttribute;
28961847f8eSopenharmony_ci}
29061847f8eSopenharmony_ci
29161847f8eSopenharmony_ci/**
29261847f8eSopenharmony_ci * Defines a button that interacts with the security component service to
29361847f8eSopenharmony_ci * request the permission for accessing the current pasteboard data.
29461847f8eSopenharmony_ci *
29561847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full
29661847f8eSopenharmony_ci * @since 10
29761847f8eSopenharmony_ci */
29861847f8eSopenharmony_ci/**
29961847f8eSopenharmony_ci * Defines a button that interacts with the security component service to
30061847f8eSopenharmony_ci * request the permission for accessing the current pasteboard data.
30161847f8eSopenharmony_ci *
30261847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full
30361847f8eSopenharmony_ci * @atomicservice
30461847f8eSopenharmony_ci * @since 11
30561847f8eSopenharmony_ci */
30661847f8eSopenharmony_cideclare const PasteButton: PasteButtonInterface;
30761847f8eSopenharmony_ci
30861847f8eSopenharmony_ci/**
30961847f8eSopenharmony_ci * Defines a paste button instance for secure access.
31061847f8eSopenharmony_ci *
31161847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full
31261847f8eSopenharmony_ci * @since 10
31361847f8eSopenharmony_ci */
31461847f8eSopenharmony_ci/**
31561847f8eSopenharmony_ci * Defines a paste button instance for secure access.
31661847f8eSopenharmony_ci *
31761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full
31861847f8eSopenharmony_ci * @atomicservice
31961847f8eSopenharmony_ci * @since 11
32061847f8eSopenharmony_ci */
32161847f8eSopenharmony_cideclare const PasteButtonInstance: PasteButtonAttribute;
322