/* * Copyright (c) 2020-2021 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import { Image, ImageData, ImageBitmap } from "./global"; import image from "../../@ohos.multimedia.image"; import { CanvasPattern } from './canvaspattern'; /** * Defines the focus param. * * @interface FocusParamObj * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 3 */ /** * Defines the focus param. * * @interface FocusParamObj * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ export interface FocusParamObj { /** * Whether needs to focus. * * @type { boolean } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 3 */ /** * Whether needs to focus. * * @type { boolean } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ focus: boolean; } /** * RectObj * * @interface RectObj * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 6 */ /** * RectObj * * @interface RectObj * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ export interface RectObj { /** * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 6 */ /** * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ width: number; /** * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 6 */ /** * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ height: number; /** * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 6 */ /** * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ left: number; /** * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 6 */ /** * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ top: number; } /** * ContextAttrOptions * * @interface ContextAttrOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 6 */ /** * ContextAttrOptions * * @interface ContextAttrOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ export interface ContextAttrOptions { /** * @type { boolean } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 6 */ /** * @type { boolean } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ antialias: boolean; } /** * AnimateStyle * * @interface AnimateStyle * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ /** * AnimateStyle * * @interface AnimateStyle * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ export interface AnimateStyle { /** * Width value applied to the component after the animation is executed. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ /** * Width value applied to the component after the animation is executed. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ width: number; /** * Height value applied to the component after the animation is executed. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ /** * Height value applied to the component after the animation is executed. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ height: number; /** * left offset applied to the component after the animation is executed. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ /** * left offset applied to the component after the animation is executed. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ left: number; /** * top offset applied to the component after the animation is executed. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ /** * top offset applied to the component after the animation is executed. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ top: number; /** * right offset applied to the component after the animation is executed. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ /** * right offset applied to the component after the animation is executed. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ right: number; /** * bottom offset applied to the component after the animation is executed. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ /** * bottom offset applied to the component after the animation is executed. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ bottom: number; /** * Background color applied to the component after the animation is executed. * The default value is none. * * @type { string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ /** * Background color applied to the component after the animation is executed. * The default value is none. * * @type { string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ backgroundColor: string; /** * Opacity applied to the component. The value ranges from 0 to 1. * The default value is 1. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ /** * Opacity applied to the component. The value ranges from 0 to 1. * The default value is 1. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ opacity: number; /** * The value format is "x y", in percentage or pixels. * The first value indicates the horizontal position, and the second value indicates the vertical position. * If only one value is specified, the other value is 50% by default. * * @type { string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ /** * The value format is "x y", in percentage or pixels. * The first value indicates the horizontal position, and the second value indicates the vertical position. * If only one value is specified, the other value is 50% by default. * * @type { string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ backgroundPosition: string; /** * Origin position of the transformed element. * The first value indicates the x-axis position. The value can be left, center, right, a length, or percentage. * The second value indicates the y-axis position. The value can be top, center, bottom, a length, or a percentage. * * @type { string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ /** * Origin position of the transformed element. * The first value indicates the x-axis position. The value can be left, center, right, a length, or percentage. * The second value indicates the y-axis position. The value can be top, center, bottom, a length, or a percentage. * * @type { string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ transformOrigin: string; /** * Transformation type applied to an element. * * @type { "none" | TransformObject } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ /** * Transformation type applied to an element. * * @type { "none" | TransformObject } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ transform: "none" | TransformObject; /** * The value of offset must be within (0.0,1.0] and sorted in ascending order if it is provided. * If there are only two frames, offset can be left empty. * If there are more than two frames, offset is mandatory. * * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ /** * The value of offset must be within (0.0,1.0] and sorted in ascending order if it is provided. * If there are only two frames, offset can be left empty. * If there are more than two frames, offset is mandatory. * * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ offset?: number; } /** * TransformObject * * @interface TransformObject * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ /** * TransformObject * * @interface TransformObject * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ export interface TransformObject { /** * Defines a 2D transformation, using a matrix of six values.. * * @param { number } scaleX - the scale value for x-axis * @param { number } skewX - the skew value for y-axis * @param { number } skewY - the skew value for x-axis * @param { number } scaleY - the scale value for y-axis * @param { number } translateX - the translate value for x-axis * @param { number } translateY - the translate value for y-axis * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 6 */ /** * Defines a 2D transformation, using a matrix of six values.. * * @param { number } scaleX - the scale value for x-axis * @param { number } skewX - the skew value for y-axis * @param { number } skewY - the skew value for x-axis * @param { number } scaleY - the scale value for y-axis * @param { number } translateX - the translate value for x-axis * @param { number } translateY - the translate value for y-axis * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ matrix(scaleX: number, skewX: number, skewY: number, scaleY: number, translateX: number, translateY: number): void; /** * Defines a 3D transformation using a 4x4 matrix of 16 values. * * @param { number } n00 - the value of the 0 row and 0 column of the 4x4 matrix * @param { number } n01 - the value of the 0 row and 1 column of the 4x4 matrix * @param { number } n02 - the value of the 0 row and 2 column of the 4x4 matrix * @param { number } n03 - the value of the 0 row and 3 column of the 4x4 matrix * @param { number } n10 - the value of the 1 row and 0 column of the 4x4 matrix * @param { number } n11 - the value of the 1 row and 1 column of the 4x4 matrix * @param { number } n12 - the value of the 1 row and 2 column of the 4x4 matrix * @param { number } n13 - the value of the 1 row and 3 column of the 4x4 matrix * @param { number } n20 - the value of the 2 row and 0 column of the 4x4 matrix * @param { number } n21 - the value of the 2 row and 1 column of the 4x4 matrix * @param { number } n22 - the value of the 2 row and 2 column of the 4x4 matrix * @param { number } n23 - the value of the 2 row and 3 column of the 4x4 matrix * @param { number } n30 - the value of the 3 row and 0 column of the 4x4 matrix * @param { number } n31 - the value of the 3 row and 1 column of the 4x4 matrix * @param { number } n32 - the value of the 3 row and 2 column of the 4x4 matrix * @param { number } n33 - the value of the 3 row and 3 column of the 4x4 matrix * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 6 */ /** * Defines a 3D transformation using a 4x4 matrix of 16 values. * * @param { number } n00 - the value of the 0 row and 0 column of the 4x4 matrix * @param { number } n01 - the value of the 0 row and 1 column of the 4x4 matrix * @param { number } n02 - the value of the 0 row and 2 column of the 4x4 matrix * @param { number } n03 - the value of the 0 row and 3 column of the 4x4 matrix * @param { number } n10 - the value of the 1 row and 0 column of the 4x4 matrix * @param { number } n11 - the value of the 1 row and 1 column of the 4x4 matrix * @param { number } n12 - the value of the 1 row and 2 column of the 4x4 matrix * @param { number } n13 - the value of the 1 row and 3 column of the 4x4 matrix * @param { number } n20 - the value of the 2 row and 0 column of the 4x4 matrix * @param { number } n21 - the value of the 2 row and 1 column of the 4x4 matrix * @param { number } n22 - the value of the 2 row and 2 column of the 4x4 matrix * @param { number } n23 - the value of the 2 row and 3 column of the 4x4 matrix * @param { number } n30 - the value of the 3 row and 0 column of the 4x4 matrix * @param { number } n31 - the value of the 3 row and 1 column of the 4x4 matrix * @param { number } n32 - the value of the 3 row and 2 column of the 4x4 matrix * @param { number } n33 - the value of the 3 row and 3 column of the 4x4 matrix * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ matrix3d( n00: number, n01: number, n02: number, n03: number, n10: number, n11: number, n12: number, n13: number, n20: number, n21: number, n22: number, n23: number, n30: number, n31: number, n32: number, n33: number, ): void; /** * Defines 2D transformations for translation of the X and Y axes * * @param { number } x - the translate value for x-axis * @param { number } y - the translate value for y-axis * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ /** * Defines 2D transformations for translation of the X and Y axes * * @param { number } x - the translate value for x-axis * @param { number } y - the translate value for y-axis * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ translate(x: number, y: number): void; /** * Defines 3D transformations for translation of the X / Y / Z axes * * @param { number } x - the translate value for x-axis * @param { number } y - the translate value for y-axis * @param { number } z - the translate value for z-axis * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 6 */ /** * Defines 3D transformations for translation of the X / Y / Z axes * * @param { number } x - the translate value for x-axis * @param { number } y - the translate value for y-axis * @param { number } z - the translate value for z-axis * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ translate3d(x: number, y: number, z: number): void; /** * Defines 2D transformations for translation of the X axes * * @param { number } x - the translate value for x-axis * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ /** * Defines 2D transformations for translation of the X axes * * @param { number } x - the translate value for x-axis * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ translateX(x: number): void; /** * Defines 2D transformations for translation of the Y axes * * @param { number } y - the translate value for y-axis * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ /** * Defines 2D transformations for translation of the Y axes * * @param { number } y - the translate value for y-axis * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ translateY(y: number): void; /** * Defines 3D transformations for translation of the Z axes * * @param { number } z the translate value for z-axis * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 6 */ /** * Defines 3D transformations for translation of the Z axes * * @param { number } z the translate value for z-axis * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ translateZ(z: number): void; /** * Defines 2D transformations for scaling of the X and Y axes * * @param { number } x - the scale value for x-axis * @param { number } y - the scale value for y-axis * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ /** * Defines 2D transformations for scaling of the X and Y axes * * @param { number } x - the scale value for x-axis * @param { number } y - the scale value for y-axis * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ scale(x: number, y: number): void; /** * Defines 3D transformations for scaling of the X / Y / Z axes * * @param { number } x - the scale value for x-axis * @param { number } y - the scale value for y-axis * @param { number } z - the scale value for z-axis * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 6 */ /** * Defines 3D transformations for scaling of the X / Y / Z axes * * @param { number } x - the scale value for x-axis * @param { number } y - the scale value for y-axis * @param { number } z - the scale value for z-axis * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ scale3d(x: number, y: number, z: number): void; /** * Defines 2D transformations for scaling of the X axes * * @param { number } x - the scale value for x-axis * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ /** * Defines 2D transformations for scaling of the X axes * * @param { number } x - the scale value for x-axis * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ scaleX(x: number): void; /** * Defines 2D transformations for scaling of the Y axes * * @param { number } y - the scale value for y-axis * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ /** * Defines 2D transformations for scaling of the Y axes * * @param { number } y - the scale value for y-axis * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ scaleY(y: number): void; /** * Defines 3D transformations for scaling of the Z axes * * @param { number } z - the scale value for z-axis * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 6 */ /** * Defines 3D transformations for scaling of the Z axes * * @param { number } z - the scale value for z-axis * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ scaleZ(z: number): void; /** * Define the 2D rotation and specify the angle in the parameters. * * @param { number } angle - the rotate value for z-axis * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ /** * Define the 2D rotation and specify the angle in the parameters. * * @param { number } angle - the rotate value for z-axis * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ rotate(angle: number): void; /** * Defines a 3D transformation for rotating the X / Y / Z axes. * * @param { number } x - the vector value of the x-axis * @param { number } y - the vector value of the y-axis * @param { number } z - the vector value of the z-axis * @param { number } angle - the rotate value for x&y&z vector. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 6 */ /** * Defines a 3D transformation for rotating the X / Y / Z axes. * * @param { number } x - the vector value of the x-axis * @param { number } y - the vector value of the y-axis * @param { number } z - the vector value of the z-axis * @param { number } angle - the rotate value for x&y&z vector. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ rotate3d(x: number, y: number, z: number, angle: number): void; /** * Defines 3D transformations for rotating of the X axes. * * @param { number } angle - the scale value for x-axis * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ /** * Defines 3D transformations for rotating of the X axes. * * @param { number } angle - the scale value for x-axis * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ rotateX(angle: number): void; /** * Defines 3D transformations for rotating of the Y axes. * * @param { number } angle - the scale value for y-axis * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ /** * Defines 3D transformations for rotating of the Y axes. * * @param { number } angle - the scale value for y-axis * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ rotateY(angle: number): void; /** * Defines 3D transformations for rotating of the Z axes. * * @param { number } angle - the scale value for z-axis * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 6 */ /** * Defines 3D transformations for rotating of the Z axes. * * @param { number } angle - the scale value for z-axis * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ rotateZ(angle: number): void; /** * Defines the 2D skew transition along the X and Y axes. * * @param { number } xAngle - the angle of inclination along the x axis. * @param { number } yAngle - the angle of inclination along the y axis. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 6 */ /** * Defines the 2D skew transition along the X and Y axes. * * @param { number } xAngle - the angle of inclination along the x axis. * @param { number } yAngle - the angle of inclination along the y axis. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ skew(xAngle: number, yAngle: number): void; /** * Defines the 2D skew transition along the X axes. * * @param { number } angle - the angle of inclination along the x axis. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 6 */ /** * Defines the 2D skew transition along the X axes. * * @param { number } angle - the angle of inclination along the x axis. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ skewX(angle: number): void; /** * Defines the 2D skew transition along the Y axes. * * @param { number } angle - the angle of inclination along the y axis. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 6 */ /** * Defines the 2D skew transition along the Y axes. * * @param { number } angle - the angle of inclination along the y axis. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ skewY(angle: number): void; /** * Defines a perspective view for the 3D transformation element. * * @param { number } verticalDistance - the vertical distance from the observation point to the component plane. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 6 */ /** * Defines a perspective view for the 3D transformation element. * * @param { number } verticalDistance - the vertical distance from the observation point to the component plane. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ perspective(verticalDistance: number): void; } /** * AnimateOptions * * @interface AnimateOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ /** * AnimateOptions * * @interface AnimateOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ export interface AnimateOptions { /** * Duration of the animation, in milliseconds. * The default value is 0. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ /** * Duration of the animation, in milliseconds. * The default value is 0. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ duration: number; /** * Time curve of the animation. For details about the supported types. * linear The animation speed keeps unchanged. * ease The animation starts and ends at a low speed, cubic-bezier(0.25, 0.1, 0.25, 1.0). * ease-in The animation starts at a low speed, cubic-bezier(0.42, 0.0, 1.0, 1.0). * ease-out The animation ends at a low speed, cubic-bezier(0.0, 0.0, 0.58, 1.0). * ease-in-out The animation starts and ends at a low speed, cubic-bezier(0.42, 0.0, 0.58, 1.0). * fast-out-slow-in Standard curve, cubic-bezier(0.4, 0.0, 0.2, 1.0). * linear-out-slow-in Deceleration curve, cubic-bezier(0.0, 0.0, 0.2, 1.0). * fast-out-linear-in Acceleration curve, cubic-bezier(0.4, 0.0, 1.0, 1.0). * friction Damping curve, cubic-bezier(0.2, 0.0, 0.2, 1.0). * extreme-deceleration Extreme deceleration curve, cubic-bezier(0.0, 0.0, 0.0, 1.0). * sharp Sharp curve, cubic-bezier(0.33, 0.0, 0.67, 1.0). * rhythm Rhythm curve, cubic-bezier(0.7, 0.0, 0.2, 1.0). * smooth Smooth curve, cubic-bezier(0.4, 0.0, 0.4, 1.0). * cubic-bezier(x1, y1, x2, y2) You can customize an animation speed curve in the cubic-bezier() function. * The x and y values of each input parameter must be between 0 and 1. * Step curve. The number must be set and only an integer is supported, step-position is optional. It can be set to start or end. The default value is end. * The default value is ease. * * @type { string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ /** * Time curve of the animation. For details about the supported types. * linear The animation speed keeps unchanged. * ease The animation starts and ends at a low speed, cubic-bezier(0.25, 0.1, 0.25, 1.0). * ease-in The animation starts at a low speed, cubic-bezier(0.42, 0.0, 1.0, 1.0). * ease-out The animation ends at a low speed, cubic-bezier(0.0, 0.0, 0.58, 1.0). * ease-in-out The animation starts and ends at a low speed, cubic-bezier(0.42, 0.0, 0.58, 1.0). * fast-out-slow-in Standard curve, cubic-bezier(0.4, 0.0, 0.2, 1.0). * linear-out-slow-in Deceleration curve, cubic-bezier(0.0, 0.0, 0.2, 1.0). * fast-out-linear-in Acceleration curve, cubic-bezier(0.4, 0.0, 1.0, 1.0). * friction Damping curve, cubic-bezier(0.2, 0.0, 0.2, 1.0). * extreme-deceleration Extreme deceleration curve, cubic-bezier(0.0, 0.0, 0.0, 1.0). * sharp Sharp curve, cubic-bezier(0.33, 0.0, 0.67, 1.0). * rhythm Rhythm curve, cubic-bezier(0.7, 0.0, 0.2, 1.0). * smooth Smooth curve, cubic-bezier(0.4, 0.0, 0.4, 1.0). * cubic-bezier(x1, y1, x2, y2) You can customize an animation speed curve in the cubic-bezier() function. * The x and y values of each input parameter must be between 0 and 1. * Step curve. The number must be set and only an integer is supported, step-position is optional. It can be set to start or end. The default value is end. * The default value is ease. * * @type { string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ easing: string; /** * Delay for the animation start. The default value indicates no delay. * The default value is 0. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ /** * Delay for the animation start. The default value indicates no delay. * The default value is 0. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ delay: number; /** * Number of times the animation will be played. number indicates a fixed number of playback operations, * and Infinity indicates an unlimited number of playback operations. * The default value is 1. * * @type { number | string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ /** * Number of times the animation will be played. number indicates a fixed number of playback operations, * and Infinity indicates an unlimited number of playback operations. * The default value is 1. * * @type { number | string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ iterations: number | string; /** * The animation playback mode. * The default value is "normal". * * @type { "normal" | "reverse" | "alternate" | "alternate-reverse" } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 6 */ /** * The animation playback mode. * The default value is "normal". * * @type { "normal" | "reverse" | "alternate" | "alternate-reverse" } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ direction: "normal" | "reverse" | "alternate" | "alternate-reverse"; /** * Whether to resume to the initial state after the animation is executed. * none: The initial state is restored after the animation is executed. * forwards: The state at the end of the animation (defined in the last key frame) is retained after the animation is executed. * * @type { "none" | "forwards" | "backwards" | "both" } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ /** * Whether to resume to the initial state after the animation is executed. * none: The initial state is restored after the animation is executed. * forwards: The state at the end of the animation (defined in the last key frame) is retained after the animation is executed. * * @type { "none" | "forwards" | "backwards" | "both" } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ fill: "none" | "forwards" | "backwards" | "both"; } /** * AnimationResult * * @interface AnimationResult * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ /** * AnimationResult * * @interface AnimationResult * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ export interface AnimationResult { /** * Read-only attribute, which indicates whether the animation playback is complete. * * @type { boolean } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ /** * Read-only attribute, which indicates whether the animation playback is complete. * * @type { boolean } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ finished: boolean; /** * Read-only attribute, which indicates whether an animation is waiting for the completion of other asynchronous operations * (for example, start an animation with a delay). * * @type { boolean } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ /** * Read-only attribute, which indicates whether an animation is waiting for the completion of other asynchronous operations * (for example, start an animation with a delay). * * @type { boolean } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ pending: boolean; /** * Animation running state: * idle: The animation is not running (playback ended or not started). * running: The animation is running. * paused: The animation is paused. * finished: Animation playback ends. * * @type { string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ /** * Animation running state: * idle: The animation is not running (playback ended or not started). * running: The animation is running. * paused: The animation is paused. * finished: Animation playback ends. * * @type { string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ playstate: string; /** * Animation start time. This attribute is similar to that of delay in the options parameters. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ /** * Animation start time. This attribute is similar to that of delay in the options parameters. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ startTime: number; /** * Starts the animation. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ /** * Starts the animation. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ play(): void; /** * Ends the animation. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ /** * Ends the animation. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ finish(): void; /** * Pauses the animation. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ /** * Pauses the animation. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ pause(): void; /** * Cancels the animation. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ /** * Cancels the animation. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ cancel(): void; /** * Plays the animation in reverse direction. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ /** * Plays the animation in reverse direction. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ reverse(): void; /** * The animation is started. * * @type { function } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ /** * The animation is started. * * @type { function } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ onstart: () => void; /** * The animation is finished. * * @type { function } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ /** * The animation is finished. * * @type { function } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ onfinish: () => void; /** * The animation is canceled. * * @type { function } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ /** * The animation is canceled. * * @type { function } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ oncancel: () => void; /** * The animation is repeated. * * @type { function } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ /** * The animation is repeated. * * @type { function } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ onrepeat: () => void; } /** * Element * * @interface Element * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ /** * Element * * @interface Element * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ export interface Element { /** * Requests or cancels the focus for a component. * If focus is set to true, the focus is requested for the component. * If focus is set to false, the focus is canceled for the component. * This attribute can be defaulted to true. * * @param { FocusParamObj } [obj] - { focus: true | false } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ /** * Requests or cancels the focus for a component. * If focus is set to true, the focus is requested for the component. * If focus is set to false, the focus is canceled for the component. * This attribute can be defaulted to true. * * @param { FocusParamObj } [obj] - { focus: true | false } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ focus(obj?: FocusParamObj): void; /** * Requests or cancels the crown rotation focus for a component. * If focus is set to true, the crown event focus is requested. * If focus is set to false, the crown event focus is canceled. * This attribute can be defaulted to true. * * @param { FocusParamObj } [obj] - { focus: true | false } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ /** * Requests or cancels the crown rotation focus for a component. * If focus is set to true, the crown event focus is requested. * If focus is set to false, the crown event focus is canceled. * This attribute can be defaulted to true. * * @param { FocusParamObj } [obj] - { focus: true | false } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ rotation(obj?: FocusParamObj): void; /** * Creates and runs an animation shortcut on the component. Specify the keyframes and options required for the animation. * * @param { Array } keyframes - keyframes is used to describe key frame parameters of the animation. * @param { AnimateOptions } options - Options. is used to describe animation parameters. * @returns { AnimationResult } This method returns the animation object. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ /** * Creates and runs an animation shortcut on the component. Specify the keyframes and options required for the animation. * * @param { Array } keyframes - keyframes is used to describe key frame parameters of the animation. * @param { AnimateOptions } options - Options. is used to describe animation parameters. * @returns { AnimationResult } This method returns the animation object. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ animate(keyframes: Array, options: AnimateOptions): AnimationResult; /** * Obtains the size and position of the element. * * @returns { RectObj } RectObj the size position of the element. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 6 */ /** * Obtains the size and position of the element. * * @returns { RectObj } RectObj the size position of the element. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ getBoundingClientRect(): RectObj; /** * Obtains attributes of the element. * * @returns { string } attributes of the element in json string. * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @since 8 */ getInspector(): string; /** * If 0.5 is returned, 50% of the current component is visible. * * @param { object } param - Scope of Monitoring components. * @returns { observer } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 6 */ /** * If 0.5 is returned, 50% of the current component is visible. * * @param { object } param - Scope of Monitoring components. * @returns { observer } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ createIntersectionObserver(param: { ratios: Array }): observer; /** * Adds a node to the end of the child node list of the current node. * * @param { Element } child - Subnode object to be added * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** * Adds a node to the end of the child node list of the current node. * * @param { Element } child - Subnode object to be added * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ addChild(child: Element): void; /** * Sets the value of an attribute on a specified element. If the attribute already exists, update the value. Otherwise, a new attribute is added with the specified name and value. * * @param { string } name - attribute name * @param { string } value - attribute value¡¢ * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** * Sets the value of an attribute on a specified element. If the attribute already exists, update the value. Otherwise, a new attribute is added with the specified name and value. * * @param { string } name - attribute name * @param { string } value - attribute value¡¢ * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ setAttribute(name: string, value: string): void; /** * Sets a style value on a specified element. If the style exists and the style value is valid, the setting is successful. Otherwise, the setting is invalid. * * @param { string } name - style name * @param { string } value - style value * @returns { boolean } If the setting is successful, true is returned. If the setting fails, false is returned. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** * Sets a style value on a specified element. If the style exists and the style value is valid, the setting is successful. Otherwise, the setting is invalid. * * @param { string } name - style name * @param { string } value - style value * @returns { boolean } If the setting is successful, true is returned. If the setting fails, false is returned. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ setStyle(name: string, value: string): boolean; } /** * Defines the observer interface. * * @interface observer * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 6 */ /** * Defines the observer interface. * * @interface observer * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ export interface observer { /** * Turn on the listener. * * @param { string } callback * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 6 */ /** * Turn on the listener. * * @param { string } callback * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ observe(callback: string): void; /** * Turn off the listener. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 6 */ /** * Turn off the listener. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ unobserve(): void; } /** * animation element * * @interface AnimationElement * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ /** * animation element * * @interface AnimationElement * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ export interface AnimationElement extends Element { /** * Starts the animation. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ /** * Starts the animation. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ play(): void; /** * Ends the animation. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ /** * Ends the animation. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ finish(): void; /** * Pauses the animation. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ /** * Pauses the animation. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ pause(): void; /** * Cancels the animation. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ /** * Cancels the animation. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ cancel(): void; /** * Plays the animation in reverse direction. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ /** * Plays the animation in reverse direction. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ reverse(): void; } /** * ScrollParam * * @interface ScrollParam * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ /** * ScrollParam * * @interface ScrollParam * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ export interface ScrollParam { /** * Offset for scrolling in the horizontal direction, in px. * * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ /** * Offset for scrolling in the horizontal direction, in px. * * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ dx?: number; /** * Offset for scrolling in the vertical direction, in px. * * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ /** * Offset for scrolling in the vertical direction, in px. * * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ dy?: number; /** * Whether a sliding animation is displayed when scroll position is changed. * * @type { ?boolean } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ /** * Whether a sliding animation is displayed when scroll position is changed. * * @type { ?boolean } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ smooth?: boolean; } /** * CurrentOffsetResultValue * * @interface CurrentOffsetResultValue * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ /** * CurrentOffsetResultValue * * @interface CurrentOffsetResultValue * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ export interface CurrentOffsetResultValue { /** * Scrolling offset in the x-axis, in px. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ /** * Scrolling offset in the x-axis, in px. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ x: number; /** * Scrolling offset in the y-axis, in px. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ /** * Scrolling offset in the y-axis, in px. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ y: number; } /** * ListScrollToOptions * * @interface ListScrollToOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ /** * ListScrollToOptions * * @interface ListScrollToOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ export interface ListScrollToOptions { /** * specified position. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Lite * @since 4 */ /** * specified position. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Lite * @atomicservice * @since 11 */ index: number; } /** * The component provides a list container. * * @interface ListElement * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ /** * The component provides a list container. * * @interface ListElement * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ export interface ListElement extends Element { /** * Scrolls the list to the position of the item at the specified index. * * @param { ListScrollToOptions } position * @syscap SystemCapability.ArkUI.ArkUI.Lite * @since 4 */ /** * Scrolls the list to the position of the item at the specified index. * * @param { ListScrollToOptions } position * @syscap SystemCapability.ArkUI.ArkUI.Lite * @atomicservice * @since 11 */ scrollTo(position: ListScrollToOptions): void; /** * Scrolls the list for a certain distance. * This method applies only to smart TVs. * * @param { ScrollParam } data * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ /** * Scrolls the list for a certain distance. * This method applies only to smart TVs. * * @param { ScrollParam } data * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ scrollBy(data: ScrollParam): void; /** * If smooth is set to false (default value), the list is directly scrolled to the top. * If smooth is set to true, the list is smoothly scrolled to the top. * * @param { object } param * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ /** * If smooth is set to false (default value), the list is directly scrolled to the top. * If smooth is set to true, the list is smoothly scrolled to the top. * * @param { object } param * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ scrollTop(param: { smooth: boolean }): void; /** * If smooth is set to false (default value), the list is directly scrolled to the bottom. * If smooth is set to true, the list is smoothly scrolled to the bottom. * * @param { object } param * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ /** * If smooth is set to false (default value), the list is directly scrolled to the bottom. * If smooth is set to true, the list is smoothly scrolled to the bottom. * * @param { object } param * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ scrollBottom(param: { smooth: boolean }): void; /** * If reverse is set to false (default value), the next page is displayed. If there is no next page, the list scrolls to the bottom. * If reverse is set to true, the previous page is displayed. If there is no previous page, the list scrolls to the top. * If smooth is set to false (default value), the list is directly scrolled to another page. * If smooth is set to true, the list is smoothly scrolled to another page. * * @param { object } params * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ /** * If reverse is set to false (default value), the next page is displayed. If there is no next page, the list scrolls to the bottom. * If reverse is set to true, the previous page is displayed. If there is no previous page, the list scrolls to the top. * If smooth is set to false (default value), the list is directly scrolled to another page. * If smooth is set to true, the list is smoothly scrolled to another page. * * @param { object } params * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ scrollPage(params: { reverse: boolean; smooth: boolean }): void; /** * If reverse is set to false (default value), the list scrolls towards the bottom for a certain distance. If there is no sufficient distance, the list scrolls to the bottom. * If reverse is set to true, the list scrolls towards the top for a certain distance. If there is no sufficient distance, the list scrolls to the top. * If smooth is set to false (default value), the list is directly scrolled. * If smooth is set to true, the list is smoothly scrolled. * * @param { object } params * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ /** * If reverse is set to false (default value), the list scrolls towards the bottom for a certain distance. If there is no sufficient distance, the list scrolls to the bottom. * If reverse is set to true, the list scrolls towards the top for a certain distance. If there is no sufficient distance, the list scrolls to the top. * If smooth is set to false (default value), the list is directly scrolled. * If smooth is set to true, the list is smoothly scrolled. * * @param { object } params * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ scrollArrow(params: { reverse: boolean; smooth: boolean }): void; /** * Collapses a group. * * @param { object } param * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ /** * Collapses a group. * * @param { object } param * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ collapseGroup(param: { /** * groupid: ID of the group to collapse. * All groups are collapsed when groupid is not specified. * * @type { string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ /** * groupid: ID of the group to collapse. * All groups are collapsed when groupid is not specified. * * @type { string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ groupid: string; }): void; /** * Expands a group. * * @param { object } param * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ /** * Expands a group. * * @param { object } param * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ expandGroup(param: { /** * groupid: ID of the group to expand. * All groups are expanded when groupid is not specified. * * @type { string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ /** * groupid: ID of the group to expand. * All groups are expanded when groupid is not specified. * * @type { string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ groupid: string; }): void; /** * Returns the offset of the current scrolling. The return value type is Object. * * @returns { CurrentOffsetResultValue } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ /** * Returns the offset of the current scrolling. The return value type is Object. * * @returns { CurrentOffsetResultValue } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ currentOffset(): CurrentOffsetResultValue; } /** * The component provides a swiper container. * * @interface SwiperElement * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ /** * The component provides a swiper container. * * @interface SwiperElement * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ export interface SwiperElement extends Element { /** * Scrolls the child component to the position at the specified index. * * @param { object } position * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ /** * Scrolls the child component to the position at the specified index. * * @param { object } position * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ swipeTo(position: { /** * specified position. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ /** * specified position. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ index: number; }): void; /** * Shows the next child component. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ /** * Shows the next child component. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ showNext(): void; /** * Shows the previous child component. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ /** * Shows the previous child component. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ showPrevious(): void; } /** * CameraTakePhotoOptions * * @interface CameraTakePhotoOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 6 */ /** * CameraTakePhotoOptions * * @interface CameraTakePhotoOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ export interface CameraTakePhotoOptions { /** * Picture quality. * * @type { "high" | "normal" | "low" } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 6 */ /** * Picture quality. * * @type { "high" | "normal" | "low" } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ quality: "high" | "normal" | "low"; /** * Callback function for successful interface invocation. * * @type { ?function } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 6 */ /** * Callback function for successful interface invocation. * * @type { ?function } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ success?: (result: Object) => void; /** * Callback function for interface invocation failure. * * @type { ?function } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 6 */ /** * Callback function for interface invocation failure. * * @type { ?function } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ fail?: (result: Object) => void; /** * Callback function at the end of the interface invoking (executed both successfully and unsuccessfully). * * @type { ?function } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 6 */ /** * Callback function at the end of the interface invoking (executed both successfully and unsuccessfully). * * @type { ?function } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ complete?: (result: Object) => void; } /** * The component provides preview and photographing functions. * * @interface CameraElement * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 6 */ /** * The component provides preview and photographing functions. * * @interface CameraElement * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ export interface CameraElement extends Element { /** * Take photos with specified parameters. * * @param { CameraTakePhotoOptions } options - the parameters of camera. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 6 */ /** * Take photos with specified parameters. * * @param { CameraTakePhotoOptions } options - the parameters of camera. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ takePhoto(options: CameraTakePhotoOptions): void; } /** * The component is a container for displaying web page content. * * @interface WebElement * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 6 */ /** * The component is a container for displaying web page content. * * @interface WebElement * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ export interface WebElement extends Element { /** * Reload the web page content * * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 6 */ /** * Reload the web page content * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ reload(): void; } /** * The component is a custom pop-up container. * * @interface DialogElement * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ /** * The component is a custom pop-up container. * * @interface DialogElement * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ export interface DialogElement extends Element { /** * Shows a dialog box. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ /** * Shows a dialog box. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ show(): void; /** * Closes a dialog box. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ /** * Closes a dialog box. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ close(): void; } /** * The component is used to provide an image frame animator. * * @interface ImageAnimatorElement * @syscap SystemCapability.ArkUI.ArkUI.Lite * @since 4 */ /** * The component is used to provide an image frame animator. * * @interface ImageAnimatorElement * @syscap SystemCapability.ArkUI.ArkUI.Lite * @atomicservice * @since 11 */ export interface ImageAnimatorElement extends Element { /** * Starts to play the frame animation of an image. If this method is called again, the playback starts from the first frame. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ /** * Starts to play the frame animation of an image. If this method is called again, the playback starts from the first frame. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ start(): void; /** * Pauses the frame animation playback of an image. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ /** * Pauses the frame animation playback of an image. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ pause(): void; /** * Stops the frame animation playback of an image. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ /** * Stops the frame animation playback of an image. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ stop(): void; /** * Resumes the frame animation playback of an image. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ /** * Resumes the frame animation playback of an image. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ resume(): void; /** * Obtains the playback state. Available values are as follows: * Playing * Paused * Stopped * * @returns { "Playing" | "Paused" | "Stopped" } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ /** * Obtains the playback state. Available values are as follows: * Playing * Paused * Stopped * * @returns { "Playing" | "Paused" | "Stopped" } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ getState(): "Playing" | "Paused" | "Stopped"; } /** * The component inserts scrolling text, which is displayed in a single line by default. * When the text length exceeds the display area of the component, the marquee effect is displayed. * * @interface MarqueeElement * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ /** * The component inserts scrolling text, which is displayed in a single line by default. * When the text length exceeds the display area of the component, the marquee effect is displayed. * * @interface MarqueeElement * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ export interface MarqueeElement extends Element { /** * Starts scrolling. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ /** * Starts scrolling. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ start(): void; /** * Stops scrolling. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ /** * Stops scrolling. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ stop(): void; } /** * The component provides menus as temporary pop-up windows to display operations that can be performed by users. * * @interface MenuElement * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ /** * The component provides menus as temporary pop-up windows to display operations that can be performed by users. * * @interface MenuElement * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ export interface MenuElement extends Element { /** * Displays the menu. * x and y specify the position of the displayed menu. * x indicates the X-axis coordinate from the left edge of the visible area, and does not include any scrolling offset. * y indicates the Y-axis coordinate from the upper edge of the visible area, and does not include any scrolling offset or a status bar. * The menu is preferentially displayed in the lower right corner. * When the visible space on the right is insufficient, the menu is moved leftward. * When the visible space in the lower part is insufficient, the menu is moved upward. * * @param { object } position * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ /** * Displays the menu. * x and y specify the position of the displayed menu. * x indicates the X-axis coordinate from the left edge of the visible area, and does not include any scrolling offset. * y indicates the Y-axis coordinate from the upper edge of the visible area, and does not include any scrolling offset or a status bar. * The menu is preferentially displayed in the lower right corner. * When the visible space on the right is insufficient, the menu is moved leftward. * When the visible space in the lower part is insufficient, the menu is moved upward. * * @param { object } position * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ show(position: { x: number; y: number }): void; } /** * The component displays line charts, gauge charts, and bar charts. * * @interface ChartElement * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ /** * The component displays line charts, gauge charts, and bar charts. * * @interface ChartElement * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ export interface ChartElement extends Element { /** * Data is dynamically added to an existing data sequence. * The target sequence is specified based on serial, which is the subscript of the datasets array and starts from 0. * datasets[index].data is not updated. Only line charts support this attribute. * The value is incremented by 1 based on the horizontal coordinate and is related to the xAxis min/max setting. * * @param { object } params * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ /** * Data is dynamically added to an existing data sequence. * The target sequence is specified based on serial, which is the subscript of the datasets array and starts from 0. * datasets[index].data is not updated. Only line charts support this attribute. * The value is incremented by 1 based on the horizontal coordinate and is related to the xAxis min/max setting. * * @param { object } params * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ append(params: { /** * Set the data subscript of the line chart to be updated. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ /** * Set the data subscript of the line chart to be updated. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ serial: number; /** * Set the new data. * * @type { Array } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ /** * Set the new data. * * @type { Array } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ data: Array; }): void; } /** * The component provides an interactive interface to receive user input, which is displayed in a single line by default. * * @interface InputElement * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ /** * The component provides an interactive interface to receive user input, which is displayed in a single line by default. * * @interface InputElement * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ export interface InputElement extends Element { /** * Obtains or loses the focus of a component. * When the component type is set to text, email, date, time, number, or password, the input method can be displayed or collapsed. * * @param { object } param - If focus is not passed, the default value true is used. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ /** * Obtains or loses the focus of a component. * When the component type is set to text, email, date, time, number, or password, the input method can be displayed or collapsed. * * @param { object } param - If focus is not passed, the default value true is used. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ focus(param: { focus: boolean }): void; /** * Displays the error message. * This attribute is available when the component type is set to text, email, date, time, number, or password. * * @param { object } param * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ /** * Displays the error message. * This attribute is available when the component type is set to text, email, date, time, number, or password. * * @param { object } param * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ showError(param: { error: string }): void; /** * Deletes the previous character at the cursor position. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 6 */ /** * Deletes the previous character at the cursor position. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ delete(): void; } /** * The