• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 * Defines the interface of WindowScene.
23 *
24 * @interface WindowSceneInterface
25 * @syscap SystemCapability.ArkUI.ArkUI.Full
26 * @systemapi
27 * @since 10
28 */
29interface WindowSceneInterface {
30  /**
31   * Called when the WindowScene is used.
32   *
33   * @param { number } persistentId - indicates the persistent identifier of WindowScene.
34   * @returns { WindowSceneAttribute }
35   * @syscap SystemCapability.ArkUI.ArkUI.Full
36   * @systemapi
37   * @since 10
38   */
39  (persistentId: number): WindowSceneAttribute;
40}
41
42/**
43 * Defines the attribute functions of WindowScene.
44 *
45 * @extends CommonMethod<WindowSceneAttribute>
46 * @syscap SystemCapability.ArkUI.ArkUI.Full
47 * @systemapi
48 * @since 10
49 */
50declare class WindowSceneAttribute extends CommonMethod<WindowSceneAttribute> {
51  /**
52   * Set the attraction deformation effect of WindowScene.
53   * The window produces nonlinear deformation effect under the action of attraction point.
54   *
55   * @param { Position } destination - The position of the attraction target point in the component coordinate system.
56   * @param { number } fraction - The fraction of attraction deformation. The range of value is [0, 1].
57   * <br> 0 means not attracted to the target point, 1 means attracted to the target point completely.
58   * @returns { WindowSceneAttribute }
59   * @syscap SystemCapability.ArkUI.ArkUI.Full
60   * @systemapi
61   * @since 14
62   */
63  attractionEffect(destination: Position, fraction: number): WindowSceneAttribute;
64}
65
66/**
67 * Defines the WindowScene component.
68 *
69 * @syscap SystemCapability.ArkUI.ArkUI.Full
70 * @systemapi
71 * @since 10
72 */
73declare const WindowScene: WindowSceneInterface;
74
75/**
76 * Defines the WindowScene instance.
77 *
78 * @syscap SystemCapability.ArkUI.ArkUI.Full
79 * @systemapi
80 * @since 10
81 */
82declare const WindowSceneInstance: WindowSceneAttribute;
83