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