/*
* Copyright (c) 2021-2025 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.
*/
/**
* @file
* @kit ArkUI
*/
/*** if arkts 1.2 */
import OriginalContext from '../../application/Context';
import { Resource } from '../../global/resource';
import pointer from '../../@ohos.multimodalInput.pointer';
import image from '../../@ohos.multimedia.image';
import unifiedDataChannel from '../../@ohos.data.unifiedDataChannel';
import promptAction from '../../@ohos.promptAction';
import uniformTypeDescriptor from '../../@ohos.data.uniformTypeDescriptor';
import Want from '../../@ohos.app.ability.Want';
import { IntentionCode } from '../../@ohos.multimodalInput.intentionCode';
import { SymbolGlyphModifier } from '../../arkui/SymbolGlyphModifier';
import { CircleShape, EllipseShape, PathShape, RectShape } from '../../@ohos.arkui.shape';
import uiObserver from '../../@ohos.arkui.observer';
import { UIContext } from '../../@ohos.arkui.UIContext';
import { DrawContext, LengthMetrics } from '../../arkui/Graphics';
import uiEffect from '../../@ohos.graphics.uiEffect';
import { FocusBoxStyle, FocusPriority } from './focus';
import { ComponentContent } from '../../arkui/ComponentContent';
import { ResizableOptions } from './image';
import { Theme } from '../../@ohos.arkui.theme';
import intl from '../../@ohos.intl';
import { ButtonType, ButtonStyleMode, ButtonRole } from './button';
import {
Area, ResourceColor, Dimension, ResourceStr, Font, Length, EdgeColors,
LocalizedEdgeColors, BorderRadiuses, EdgeWidths, LocalizedEdgeWidths, SizeOptions, Bias,
EdgeStyles, Position, LocalizedBorderRadiuses, Margin, ChainWeightOptions, Padding, LocalizedPadding, LocalizedMargin,
BorderOptions, OutlineOptions, EdgeOutlineStyles, EdgeOutlineWidths, OutlineRadiuses, Edges, LocalizedEdges, LocalizedPosition,
AccessibilityOptions, ConstraintSizeOptions, EdgeWidth, DirectionalEdgesT, VoidCallback
} from './units';
import { BaseGestureEvent, GestureRecognizer, GestureJudgeResult, GestureType,
GestureMask, GestureHandler, GesturePriority, GestureInfo
} from './gesture';
import { ScrollState } from './list';
import {
AccessibilityHoverType, Curve, PlayMode, SharedTransitionEffectType, KeySource, BorderStyle,
HorizontalAlign, VerticalAlign, MouseButton, MouseAction, TransitionType, FontWeight, TouchType,
FontStyle, Color, ColoringStrategy, Placement, ArrowPointPosition, ClickEffectLevel, NestedScrollMode, HitTestMode,
Alignment, ImageRepeat, ImageSize, HoverEffect, Visibility, ItemAlign, Direction, Axis, GradientDirection, FunctionKey,
ModifierKey, ObscuredReasons, RenderFit, LineCapStyle, LineJoinStyle, PixelRoundCalcPolicy, IlluminatedType, TextDecorationType,
TextDecorationStyle, KeyType, ResponseType, BarState, EdgeEffect, ScrollSource, InteractionHand, AxisAction, AxisModel, CrownAction,
FocusDrawLevel, CrownSensitivity
} from './enums';
import { TextRange } from './textCommon';
import { StyledString } from './styledString';
import { CircleAttribute } from './circle';
import { RectAttribute } from './rect';
import { PathAttribute } from './path';
import { EllipseAttribute } from './ellipse';
import { LocalStorage } from '../stateManagement/storages/localStorage';
import { CustomBuilder } from './builder';
/*** endif */
/**
* The type for SpringLoadingContext, see the detailed description in dragController.
*
* @typedef {import('../api/@ohos.arkui.dragController').default.SpringLoadingContext} SpringLoadingContext
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since 20
*/
declare type SpringLoadingContext = import('../api/@ohos.arkui.dragController').default.SpringLoadingContext;
/**
* The type for DragSpringLoadingConfiguration, see the detailed description in dragController.
*
* @typedef {import('../api/@ohos.arkui.dragController').default.DragSpringLoadingConfiguration} DragSpringLoadingConfiguration
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since 20
*/
declare type DragSpringLoadingConfiguration = import('../api/@ohos.arkui.dragController').default.DragSpringLoadingConfiguration;
/**
* Defines the options of Component ClassDecorator.
*
* @interface ComponentOptions
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 11
*/
/**
* Defines the options of Component ClassDecorator.
*
* @interface ComponentOptions
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 12
*/
declare interface ComponentOptions {
/**
* freeze UI state.
*
* @type { boolean }
* @default false
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 11
*/
/**
* freeze UI state.
*
* @type { boolean }
* @default false
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 12
*/
freezeWhenInactive : boolean,
}
/**
* Define the ratio of characters entered by the the percentage of InputCounterOptions.
*
* @interface InputCounterOptions
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
/**
* Define the ratio of characters entered by the the percentage of InputCounterOptions.
*
* @interface InputCounterOptions
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
declare interface InputCounterOptions {
/**
* It is the numerator bit of the percentage and used as a threshold. If the number of characters input
* reaches the maximum number of characters multiplied by this threshold, the counter is displayed.
* @type { ?number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
/**
* It is the numerator bit of the percentage and used as a threshold. If the number of characters input
* reaches the maximum number of characters multiplied by this threshold, the counter is displayed.
*
*
NOTE:
* Threshold percentage for displaying the character counter.
* The character counter is displayed when the number of characters that have been entered is greater than
* the maximum number of characters multiplied by the threshold percentage value.
* When displayed, the character counter is in the following format:
* Number of characters that have been entered/Maximum number of characters allowed.
* It is visible when the number of characters entered is greater than
* the character limit multiplied by the threshold percentage value.
* Value range: [1, 100]
* If the value is not an integer, it is rounded down to the nearest integer.
* If the value exceeds the valid value range, the character counter is not displayed.
* If the value is undefined, the character counter is displayed, but this parameter has no effect.
*
*
* @type { ?number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
thresholdPercentage?: number;
/**
* If the current input character count reaches the maximum character count and users want to exceed the
* normal input, the border will turn red. If this parameter is true, the red border displayed.
* @type { ?boolean }
* @default true
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
/**
* If the current input character count reaches the maximum character count and users want to exceed the
* normal input, the border will turn red. If this parameter is true, the red border displayed.
*
*
NOTE:
* Whether to highlight the text box border and character counter subscript in red.
* If options is not set, the text box border and character counter subscript turn red
* when the number of characters entered reaches the limit.
* If the character counter is displayed and thresholdPercentage is set to a valid value,
* the text box border and character counter subscript turn red when the number of entered characters exceeds the limit.
* The value true (default) means to highlight the text box border and character counter subscript in red.
*
*
* @type { ?boolean }
* @default true
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
highlightBorder?: boolean;
}
/**
* Defines the options of decoration.
*
* @interface TextDecorationOptions
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
declare interface TextDecorationOptions {
/**
* The decoration type.
*
* @type { TextDecorationType }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
type: TextDecorationType;
/**
* Sets the color of decoration.
*
* @type { ?ResourceColor }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
color?: ResourceColor;
/**
* The style value of decoration.
*
* @type { ?TextDecorationStyle }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
style?: TextDecorationStyle;
}
/**
* Defining Component ClassDecorator
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* Defining Component ClassDecorator
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* Defining Component ClassDecorator
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* Defining Component ClassDecorator
*
* Component is a ClassDecorator and it supports ComponentOptions as parameters.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 11
*/
declare const Component: ClassDecorator & ((options: ComponentOptions) => ClassDecorator);
/**
* Defining ComponentV2 ClassDecorator
*
* ComponentV2 is a ClassDecorator and it supports ComponentOptions as parameters.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
declare const ComponentV2: ClassDecorator & ((options: ComponentOptions) => ClassDecorator);
/**
* Defines the options of Entry ClassDecorator.
*
* @interface EntryOptions
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 10
*/
/**
* Defines the options of Entry ClassDecorator.
*
* @interface EntryOptions
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @atomicservice
* @since 11
*/
declare interface EntryOptions {
/**
* Named route name.
*
* @type { ?string }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 10
*/
/**
* Named route name.
*
* @type { ?string }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @atomicservice
* @since 11
*/
routeName? : string,
/**
* LocalStorage to be passed.
*
* @type { ?LocalStorage }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 10
*/
/**
* LocalStorage to be passed.
*
* @type { ?LocalStorage }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @atomicservice
* @since 11
*/
storage? : LocalStorage,
/**
* Determines whether to use the LocalStorage instance object returned by the LocalStorage.getShared() interface.
*
* @type { ?boolean }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
useSharedStorage? : boolean,
}
/**
* Provides an interface for the style of an divider including stroke width, color, start margin
* and end margin
*
* @interface DividerStyle
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since 20
* @arkts 1.2
*/
declare interface DividerStyle {
/**
* Define the stroke width of the divider
*
* @type { Length }
* @default 0
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since 20
* @arkts 1.2
*/
strokeWidth: Length;
/**
* Define the color of the divider
*
* @type { ?ResourceColor }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since 20
* @arkts 1.2
*/
color?: ResourceColor;
/**
* Define the start margin of the divider
*
* @type { ?Length }
* @default 0
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since 20
* @arkts 1.2
*/
startMargin?: Length;
/**
* Define the end margin of the divider
*
* @type { ?Length }
* @default 0
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since 20
* @arkts 1.2
*/
endMargin?: Length;
}
/**
* Defines Entry ClassDecorator.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* Defines Entry ClassDecorator.
*
* Entry is a ClassDecorator and it supports LocalStorage as parameters.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* Defines Entry ClassDecorator.
*
* Entry is a ClassDecorator and it supports LocalStorage or EntryOptions as parameters.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* Defines Entry ClassDecorator.
*
* Entry is a ClassDecorator and it supports LocalStorage or EntryOptions as parameters.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 11
*/
declare const Entry: ClassDecorator & ((options?: LocalStorage | EntryOptions) => ClassDecorator);
/**
* Defining Observed ClassDecorator.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* Defining Observed ClassDecorator.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* Defining Observed ClassDecorator.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* Defining Observed ClassDecorator.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 11
*/
declare const Observed: ClassDecorator;
/**
* Defining ObservedV2 ClassDecorator.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 12
*/
declare const ObservedV2: ClassDecorator;
/**
* Defining Preview ClassDecorator.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* Defining Preview ClassDecorator.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* Defining Preview ClassDecorator.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* Defining Preview ClassDecorator.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 11
*/
declare const Preview: ClassDecorator & ((value: PreviewParams) => ClassDecorator);
/**
* Defining Require PropertyDecorator.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 11
*/
declare const Require: PropertyDecorator;
/**
* Defining BuilderParam PropertyDecorator
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* Defining BuilderParam PropertyDecorator
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* Defining BuilderParam PropertyDecorator
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* Defining BuilderParam PropertyDecorator
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 11
*/
declare const BuilderParam: PropertyDecorator;
/**
* Defining Local PropertyDecorator.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
declare const Local: PropertyDecorator;
/**
* Defining Param PropertyDecorator.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
declare const Param: PropertyDecorator;
/**
* Defining Once PropertyDecorator.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
declare const Once: PropertyDecorator;
/**
* Defining Event PropertyDecorator.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
declare const Event: PropertyDecorator;
/**
* Defining State PropertyDecorator.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* Defining State PropertyDecorator.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* Defining State PropertyDecorator.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* Defining State PropertyDecorator.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 11
*/
declare const State: PropertyDecorator;
/**
* Defining Track PropertyDecorator.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 11
*/
/**
* Defining Track PropertyDecorator.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 12
*/
declare const Track: PropertyDecorator;
/**
* Defining Trace PropertyDecorator.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 12
*/
declare const Trace: PropertyDecorator;
/**
* Defining Prop PropertyDecorator.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* Defining Prop PropertyDecorator.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* Defining Prop PropertyDecorator.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* Defining Prop PropertyDecorator.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 11
*/
declare const Prop: PropertyDecorator;
/**
* Defining Link PropertyDecorator.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* Defining Link PropertyDecorator.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* Defining Link PropertyDecorator.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* Defining Link PropertyDecorator.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 11
*/
declare const Link: PropertyDecorator;
/**
* Defining ObjectLink PropertyDecorator.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* Defining ObjectLink PropertyDecorator.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* Defining ObjectLink PropertyDecorator.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* Defining ObjectLink PropertyDecorator.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 11
*/
declare const ObjectLink: PropertyDecorator;
/**
* Defines the options of Provide PropertyDecorator.
*
* @interface ProvideOptions
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 11
*/
declare interface ProvideOptions {
/**
* Override the @Provide of any parent or parent of parent @Component.@Provide({allowOverride: "name"}) is
* also allowed to be used even when there is no ancestor @Component whose @Provide would be overridden.
*
* @type { ?string }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 11
*/
allowOverride?: string,
}
/**
* Defining Provide PropertyDecorator.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* Defining Provide PropertyDecorator.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* Defining Provide PropertyDecorator.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* Defining Provide PropertyDecorator.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 11
*/
declare const Provide: PropertyDecorator & ((value: string | ProvideOptions) => PropertyDecorator);
/**
* Defining Provider PropertyDecorator, aliasName is the only matching key and if aliasName is the default, the default attribute name is regarded as aliasName.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
declare const Provider: (aliasName?: string) => PropertyDecorator;
/**
* Defining Consume PropertyDecorator.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* Defining Consume PropertyDecorator.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* Defining Consume PropertyDecorator.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* Defining Consume PropertyDecorator.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 11
*/
declare const Consume: PropertyDecorator & ((value: string) => PropertyDecorator);
/**
* Defining Consumer PropertyDecorator, aliasName is the only matching key and if aliasName is the default, the default attribute name is regarded as aliasName.
* And @Consumer will find the nearest @Provider.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
declare const Consumer: (aliasName?: string) => PropertyDecorator;
/**
* Defining Computed MethodDecorator.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
declare const Computed: MethodDecorator;
/**
* Defining StorageProp PropertyDecorator.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* Defining StorageProp PropertyDecorator.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Defining StorageProp PropertyDecorator.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 11
*/
declare const StorageProp: (value: string) => PropertyDecorator;
/**
* Defining StorageLink PropertyDecorator.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* Defining StorageLink PropertyDecorator.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Defining StorageLink PropertyDecorator.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 11
*/
declare const StorageLink: (value: string) => PropertyDecorator;
/**
* Defining Watch PropertyDecorator.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* Defining Watch PropertyDecorator.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* Defining Watch PropertyDecorator.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* Defining Watch PropertyDecorator.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 11
*/
declare const Watch: (value: string) => PropertyDecorator;
/**
* Defining Builder MethodDecorator
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* Defining Builder MethodDecorator
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* Defining Builder MethodDecorator
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* Defining Builder MethodDecorator
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 11
*/
declare const Builder: MethodDecorator;
/**
* Defining LocalBuilder MethodDecorator
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 12
*/
declare const LocalBuilder: MethodDecorator;
/**
* Defining Styles MethodDecorator
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 8
*/
/**
* Defining Styles MethodDecorator
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* Defining Styles MethodDecorator
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* Defining Styles MethodDecorator
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 11
*/
declare const Styles: MethodDecorator;
/**
* Defining Extend MethodDecorator
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* Defining Extend MethodDecorator
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* Defining Extend MethodDecorator
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* Defining Extend MethodDecorator
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 11
*/
declare const Extend: MethodDecorator & ((value: any) => MethodDecorator);
/**
* Define AnimatableExtend MethodDecorator
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Define AnimatableExtend MethodDecorator
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 11
*/
declare const AnimatableExtend: MethodDecorator & ((value: Object) => MethodDecorator);
/**
* Define Monitor MethodDecorator
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
declare const Monitor: MonitorDecorator;
/**
* Define Monitor Decorator type
*
* @typedef { function } MonitorDecorator
* @param { string } value - Monitored path input by the user
* @param { string[] } args - Monitored path(s) input by the user
* @returns { MethodDecorator } Monitor decorator
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
declare type MonitorDecorator = (value: string, ...args: string[]) => MethodDecorator;
/**
* Define IMonitor interface
*
* @interface IMonitor
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
declare interface IMonitor {
/**
* Array of changed paths(keys)
*
* @type { Array }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
dirty: Array;
/**
* Return the pair of the value before the most recent change and current value for given path.
* If path does not exist, return undefined; If path is not specified, return the value pair corresponding to the first path in dirty.
*
* @param { string } [path]
* @returns { IMonitorValue | undefined }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
value(path?: string): IMonitorValue | undefined;
}
/**
* Define IMonitorValue interface
*
* @interface IMonitorValue
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
declare interface IMonitorValue {
/**
* Get the previous value.
*
* @type { T }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
before: T;
/**
* Get current value.
*
* @type { T }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
now: T;
/**
* Monitored path input by the user.
*
* @type { string }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
path: string;
}
/**
* The **AnimatableArithmetic** API defines the animation operation rules for
* non-number data types. To animate non-number data (such as arrays, structs,
* and colors), implement the addition, subtraction, multiplication, and
* equality judgment functions in the **AnimatableArithmetic\** API.
* In this way, the data can be involved in an interpolation operation of the
* animation and identify whether the data changes, that is, the non-number data
* is defined as the types that implement the **AnimatableArithmetic\** API.
*
* @interface AnimatableArithmetic
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* The **AnimatableArithmetic** API defines the animation operation rules for
* non-number data types. To animate non-number data (such as arrays, structs,
* and colors), implement the addition, subtraction, multiplication, and
* equality judgment functions in the **AnimatableArithmetic\** API.
* In this way, the data can be involved in an interpolation operation of the
* animation and identify whether the data changes, that is, the non-number data
* is defined as the types that implement the **AnimatableArithmetic\** API.
*
* @interface AnimatableArithmetic
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
declare interface AnimatableArithmetic {
/**
* Defines the addition rule of the data type.
*
* @param { AnimatableArithmetic } rhs - another value
* @returns { AnimatableArithmetic } new value which implements AnimatableArithmetic interface
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Defines the addition rule of the data type.
*
* @param { AnimatableArithmetic } rhs - another value
* @returns { AnimatableArithmetic } new value which implements AnimatableArithmetic interface
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
plus(rhs: AnimatableArithmetic): AnimatableArithmetic;
/**
* Defines the subtraction rule of the data type.
*
* @param { AnimatableArithmetic } rhs - another value
* @returns { AnimatableArithmetic } new value which implements AnimatableArithmetic interface
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Defines the subtraction rule of the data type.
*
* @param { AnimatableArithmetic } rhs - another value
* @returns { AnimatableArithmetic } new value which implements AnimatableArithmetic interface
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
subtract(rhs: AnimatableArithmetic): AnimatableArithmetic;
/**
* Defines the multiplication rule of the data type.
*
* @param { number } scale - scale value
* @returns { AnimatableArithmetic } new value which implements AnimatableArithmetic interface
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Defines the multiplication rule of the data type.
*
* @param { number } scale - scale value
* @returns { AnimatableArithmetic } new value which implements AnimatableArithmetic interface
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
multiply(scale: number): AnimatableArithmetic;
/**
* Defines the equality judgment rule of the data type.
*
* @param { AnimatableArithmetic } rhs - another value
* @returns { boolean } is equals
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Defines the equality judgment rule of the data type.
*
* @param { AnimatableArithmetic } rhs - another value
* @returns { boolean } is equals
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
equals(rhs: AnimatableArithmetic): boolean;
}
/**
* Defining Concurrent MethodDecorator
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 9
*/
/**
* Defining Concurrent MethodDecorator
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Defining Concurrent MethodDecorator
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 11
*/
declare const Concurrent: MethodDecorator;
/**
* Defining Sendable ClassDecorator
* The Sendable decorator can be used only for classes. A class with this decorator is marked as sendable, and the class object can be shared globally.
* Since 12, the Sendable decorator can be used for function and typeAlias also.
* A function with this decorator is marked as sendable, and the function can be an shareable property of sendable-class object.
* A typeAlias with this decorator is marked as sendable, and the typeAlias can be used to declare properties, variables,
* and arguments that need to be assigned with sendable-function.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 11
*/
declare const Sendable: ClassDecorator;
/**
* Defining CustomDialog ClassDecorator
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* Defining CustomDialog ClassDecorator
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Defining CustomDialog ClassDecorator
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 11
*/
declare const CustomDialog: ClassDecorator;
/**
* Defining LocalStorageLink PropertyDecorator.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 9
*/
/**
* Defining LocalStorageLink PropertyDecorator.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Defining LocalStorageLink PropertyDecorator.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 11
*/
declare const LocalStorageLink: (value: string) => PropertyDecorator;
/**
* Defining LocalStorageProp PropertyDecorator
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* Defining LocalStorageProp PropertyDecorator
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* Defining LocalStorageProp PropertyDecorator
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 11
*/
declare const LocalStorageProp: (value: string) => PropertyDecorator;
/**
* Obtains the Context object associated with a component on the page.
*
* @param { Object } component - indicate the component on the page.
* If no component is passed in or the passed-in parameter type is invalid, the default context is returned.
* The default context is the context obtained by tracing the call chain of the API.
* If this API is used in an asynchronous callback or not initially called on the current page, the context of the
* instance may fail to be traced. In this case, undefined is returned.
* @returns { Context }
* The context type depends on the ability type.
* For example, if this API is called on a page of the UIAbility, the return value type is UIAbilityContext;
* if this API is called on a page of the ExtensionAbility, the return value type is ExtensionContext.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @StageModelOnly
* @since 9
*/
/**
* Obtains the Context object associated with a component on the page.
*
* @param { Object } component - indicate the component on the page.
* If no component is passed in or the passed-in parameter type is invalid, the default context is returned.
* The default context is the context obtained by tracing the call chain of the API.
* If this API is used in an asynchronous callback or not initially called on the current page, the context of the
* instance may fail to be traced. In this case, undefined is returned.
* @returns { Context }
* The context type depends on the ability type.
* For example, if this API is called on a page of the UIAbility, the return value type is UIAbilityContext;
* if this API is called on a page of the ExtensionAbility, the return value type is ExtensionContext.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @StageModelOnly
* @crossplatform
* @since 10
*/
/**
* Obtains the Context object associated with a component on the page.
*
* @param { Object } component - indicate the component on the page.
* If no component is passed in or the passed-in parameter type is invalid, the default context is returned.
* The default context is the context obtained by tracing the call chain of the API.
* If this API is used in an asynchronous callback or not initially called on the current page, the context of the
* instance may fail to be traced. In this case, undefined is returned.
* @returns { Context }
* The context type depends on the ability type.
* For example, if this API is called on a page of the UIAbility, the return value type is UIAbilityContext;
* if this API is called on a page of the ExtensionAbility, the return value type is ExtensionContext.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @StageModelOnly
* @crossplatform
* @atomicservice
* @since 11
* @deprecated since 18
* @useinstead ohos.arkui.UIContext.UIContext#getHostContext
*/
declare function getContext(component?: Object): Context;
/**
* Defining Reusable ClassDecorator.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Defining Reusable ClassDecorator.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 11
*/
declare const Reusable: ClassDecorator;
/**
* Defining ReusableV2 ClassDecorator that is used to decorate @ComponentV2.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 18
*/
declare const ReusableV2: ClassDecorator;
/**
* ReuseId callback type. It is used to compute reuseId.
*
* @typedef { function } ReuseIdCallback
* @returns { string }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
declare type ReuseIdCallback = () => string;
/**
* Defining the reusable configuration parameters.
*
* @interface ReuseOptions
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
declare interface ReuseOptions {
/**
* Defining reuseId function. The default reuseId is the custom component name.
*
* @type { ?ReuseIdCallback }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
reuseId? : ReuseIdCallback;
}
/**
* Get context.
*
* @typedef { import('../api/application/Context').default } Context
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @StageModelOnly
* @since 9
*/
/**
* Get context.
*
* @typedef { import('../api/application/Context').default } Context
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @StageModelOnly
* @crossplatform
* @since 10
*/
/**
* Get context.
*
* @typedef { import('../api/application/Context').default } Context
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @StageModelOnly
* @crossplatform
* @atomicservice
* @since 11
*/
declare type Context = import('../api/application/Context').default;
/**
* Export Context.
*
* @typedef { OriginalContext } Context
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 20
* @arkts 1.2
*/
export type Context = OriginalContext;
/**
* Post Card Action.
*
* @param { Object } component - indicate the card entry component.
* @param { Object } action - indicate the router, message or call event.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @StageModelOnly
* @form
* @since 9
*/
/**
* Post Card Action.
*
* @param { Object } component - indicate the card entry component.
* @param { Object } action - indicate the router, message or call event.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @StageModelOnly
* @crossplatform
* @form
* @since 10
*/
/**
* Post Card Action.
*
* @param { Object } component - indicate the card entry component.
* @param { Object } action - indicate the router, message or call event.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @StageModelOnly
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
declare function postCardAction(component: Object, action: Object): void;
/**
* Defines the data type of the interface restriction.
*
* @interface Configuration
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* Defines the data type of the interface restriction.
*
* @interface Configuration
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* Defines the data type of the interface restriction.
*
* @interface Configuration
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* Defines the data type of the interface restriction.
*
* @interface Configuration
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
declare interface Configuration {
/**
* Set colorMode.
*
* @type { string }
* @readonly
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* Set colorMode.
*
* @type { string }
* @readonly
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* Set colorMode.
*
* @type { string }
* @readonly
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* Set colorMode.
*
* @type { string }
* @readonly
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
readonly colorMode: string;
/**
* Set fontScale.
*
* @type { number }
* @readonly
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* Set fontScale.
*
* @type { number }
* @readonly
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* Set fontScale.
*
* @type { number }
* @readonly
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* Set fontScale.
*
* @type { number }
* @readonly
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
readonly fontScale: number;
}
/**
* Defines the data type of the interface restriction.
*
* @interface Rectangle
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 8
*/
/**
* Defines the data type of the interface restriction.
*
* @interface Rectangle
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* Defines the data type of the interface restriction.
*
* @interface Rectangle
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* Defines the data type of the interface restriction.
*
* @interface Rectangle
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
declare interface Rectangle {
/**
* x:Horizontal coordinate
*
* @type { ?Length }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 8
*/
/**
* x:Horizontal coordinate
*
* @type { ?Length }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* x:Horizontal coordinate
*
* @type { ?Length }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* x:Horizontal coordinate
*
* @type { ?Length }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
x?: Length;
/**
* y:Vertical axis coordinate.
*
* @type { ?Length }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 8
*/
/**
* y:Vertical axis coordinate.
*
* @type { ?Length }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* y:Vertical axis coordinate.
*
* @type { ?Length }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* y:Vertical axis coordinate.
*
* @type { ?Length }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
y?: Length;
/**
* Sets the width of the current touchRect.
*
* @type { ?Length }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 8
*/
/**
* Sets the width of the current touchRect.
*
* @type { ?Length }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* Sets the width of the current touchRect.
*
* @type { ?Length }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* Sets the width of the current touchRect.
*
* @type { ?Length }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
width?: Length;
/**
* Sets the height of the current touchRect.
*
* @type { ?Length }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 8
*/
/**
* Sets the height of the current touchRect.
*
* @type { ?Length }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* Sets the height of the current touchRect.
*
* @type { ?Length }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* Sets the height of the current touchRect.
*
* @type { ?Length }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
height?: Length;
}
/**
* Interface for ExpectedFrameRateRange.
*
* @interface ExpectedFrameRateRange
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 11
*/
/**
* Interface for ExpectedFrameRateRange.
*
* @interface ExpectedFrameRateRange
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since 12
*/
/**
* Interface for ExpectedFrameRateRange.
*
* @interface ExpectedFrameRateRange
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'19','1.2':'20'}
* @arkts 1.1&1.2
*/
declare interface ExpectedFrameRateRange {
/**
* The minimum animation drawing FPS.
* The minimum value should be less than or equal to the maximum value.
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 11
*/
/**
* The minimum animation drawing FPS.
* The minimum value should be less than or equal to the maximum value.
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since 12
*/
/**
* The minimum animation drawing FPS.
* The minimum value should be less than or equal to the maximum value.
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'19','1.2':'20'}
* @arkts 1.1&1.2
*/
min: number,
/**
* The maximum animation drawing FPS.
* The maximum value should be greater than or equal to the minimum value.
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 11
*/
/**
* The maximum animation drawing FPS.
* The maximum value should be greater than or equal to the minimum value.
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since 12
*/
/**
* The maximum animation drawing FPS.
* The maximum value should be greater than or equal to the minimum value.
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'19','1.2':'20'}
* @arkts 1.1&1.2
*/
max: number,
/**
* The expected frame rate of dynamical callback rate range.
* The value should be between the minimum and maximum value.
* Otherwise, the actual callback rate will be dynamically
* adjusted to better align with other animation sources.
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 11
*/
/**
* The expected frame rate of dynamical callback rate range.
* The value should be between the minimum and maximum value.
* Otherwise, the actual callback rate will be dynamically
* adjusted to better align with other animation sources.
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since 12
*/
/**
* The expected frame rate of dynamical callback rate range.
* The value should be between the minimum and maximum value.
* Otherwise, the actual callback rate will be dynamically
* adjusted to better align with other animation sources.
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'19','1.2':'20'}
* @arkts 1.1&1.2
*/
expected: number,
}
/**
* global $r function
*
* @param { string } value
* The value format is 'belonging.type.name'.
* belonging: group to which the resource belongs, which can be 'sys' or 'app'.
* type: resource type, which can be 'boolean', 'color', 'float', 'intarray', 'integer', 'pattern', 'plural',
* 'strarray', 'string', or 'media'.
* name: resource name, which is determined during resource definition.
* @param { any[] } params
* @returns { Resource }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* global $r function
*
* @param { string } value
* The value format is 'belonging.type.name'.
* belonging: group to which the resource belongs, which can be 'sys' or 'app'.
* type: resource type, which can be 'boolean', 'color', 'float', 'intarray', 'integer', 'pattern', 'plural',
* 'strarray', 'string', or 'media'.
* name: resource name, which is determined during resource definition.
* @param { any[] } params
* @returns { Resource }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* global $r function
*
* @param { string } value
* The value format is 'belonging.type.name'.
* belonging: group to which the resource belongs, which can be 'sys' or 'app'.
* type: resource type, which can be 'boolean', 'color', 'float', 'intarray', 'integer', 'pattern', 'plural',
* 'strarray', 'string', or 'media'.
* name: resource name, which is determined during resource definition.
* @param { any[] } params
* @returns { Resource }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* global $r function
*
* @param { string } value
* The value format is 'belonging.type.name'.
* belonging: group to which the resource belongs, which can be 'sys' or 'app'.
* type: resource type, which can be 'boolean', 'color', 'float', 'intarray', 'integer', 'pattern', 'plural',
* 'strarray', 'string', or 'media'.
* name: resource name, which is determined during resource definition.
* @param { any[] } params
* @returns { Resource }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 11
*/
declare function $r(value: string, ...params: any[]): Resource;
/**
* global $r function
*
* @param { string } value
* @param { (Object | null | undefined)[] } params
* @returns { Resource }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 20
* @arkts 1.2
*/
declare function $r(value: string, ...params: (Object | null | undefined)[]): Resource;
/**
* global $rawfile function
*
* @param { string } value
* name of the file in the resources/rawfile directory of the project.
* When referencing resources of the Resource type, make sure the data type is the same as that of the attribute method.
* For example, if an attribute method supports the string | Resource types, the data type of the Resource type must be
* string.
* @returns { Resource }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* global $rawfile function
*
* @param { string } value
* name of the file in the resources/rawfile directory of the project.
* When referencing resources of the Resource type, make sure the data type is the same as that of the attribute method.
* For example, if an attribute method supports the string | Resource types, the data type of the Resource type must be
* string.
* @returns { Resource }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* global $rawfile function
*
* @param { string } value
* name of the file in the resources/rawfile directory of the project.
* When referencing resources of the Resource type, make sure the data type is the same as that of the attribute method.
* For example, if an attribute method supports the string | Resource types, the data type of the Resource type must be
* string.
* @returns { Resource }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* global $rawfile function
*
* @param { string } value
* name of the file in the resources/rawfile directory of the project.
* When referencing resources of the Resource type, make sure the data type is the same as that of the attribute method.
* For example, if an attribute method supports the string | Resource types, the data type of the Resource type must be
* string.
* @returns { Resource }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
declare function $rawfile(value: string): Resource;
/**
* Defines the same page mode
* @enum { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
declare enum AccessibilitySamePageMode {
/**
* the first page and root page event is not send.but if application load new page whith navigation,the page event will be sent.
* this mode is to solve skipping focus
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
SEMI_SILENT = 0,
/**
* the all page event is not send
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
FULL_SILENT = 1,
}
/**
* Enum for accessibility component type
* @enum { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
declare enum AccessibilityRoleType {
/**
* ActionSheet component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
ACTION_SHEET = 0,
/**
* AlertDialog component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
ALERT_DIALOG = 1,
/**
* AlphabetIndexer component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
INDEXER_COMPONENT = 2,
/**
* badge component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
BADGE_COMPONENT = 3,
/**
* blank component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
BLANK = 4,
/**
* button component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
BUTTON = 5,
/**
* button component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
BACK_BUTTON = 6,
/**
* sheet drag bar component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
SHEET_DRAG_BAR = 7,
/**
* calendar picker component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
CALENDAR_PICKER = 8,
/**
* calendar component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
CALENDAR = 9,
/**
* canvas component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
CANVAS = 10,
/**
* canvas gradient component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
CANVAS_GRADIENT = 11,
/**
* canvas pattern component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
CANVAS_PATTERN = 12,
/**
* checkbox component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
CHECKBOX = 13,
/**
* checkbox group component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
CHECKBOX_GROUP = 14,
/**
* circle component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
CIRCLE = 15,
/**
* column split component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
COLUMN_SPLIT = 16,
/**
* column component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
COLUMN = 17,
/**
* canvas rendering context 2d component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
CANVAS_RENDERING_CONTEXT_2D = 18,
/**
* chart component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
CHART = 19,
/**
* counter component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
COUNTER = 20,
/**
* counter modal component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
CONTAINER_MODAL = 21,
/**
* data panel component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
DATA_PANEL = 22,
/**
* data picker component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
DATE_PICKER = 23,
/**
* dialog component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
DIALOG = 24,
/**
* divider component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
DIVIDER = 25,
/**
* drag bar component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
DRAG_BAR = 26,
/**
* effect component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
EFFECT_COMPONENT = 27,
/**
* ellipse component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
ELLIPSE = 28,
/**
* flex component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
FLEX = 29,
/**
* flow item component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
FLOW_ITEM = 30,
/**
* form component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
FORM_COMPONENT = 31,
/**
* form link component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
FORM_LINK = 32,
/**
* gauge component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
GAUGE = 33,
/**
* grid component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
GRID = 34,
/**
* grid col component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
GRID_COL = 35,
/**
* grid container component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
GRID_CONTAINER = 36,
/**
* grid item component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
GRID_ITEM = 37,
/**
* grid row component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
GRID_ROW = 38,
/**
* hyperlink component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
HYPERLINK = 39,
/**
* image component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
IMAGE = 40,
/**
* image animator component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
IMAGE_ANIMATOR = 41,
/**
* image bitmap component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
IMAGE_BITMAP = 42,
/**
* image data component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
IMAGE_DATA = 43,
/**
* image span component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
IMAGE_SPAN = 44,
/**
* label component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
LABEL = 45,
/**
* line component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
LINE = 46,
/**
* list component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
LIST = 47,
/**
* list item component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
LIST_ITEM = 48,
/**
* list item group component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
LIST_ITEM_GROUP = 49,
/**
* loading progress component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
LOADING_PROGRESS = 50,
/**
* marquee component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
MARQUEE = 51,
/**
* matrix2d component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
MATRIX2D = 52,
/**
* menu component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
MENU = 53,
/**
* menu item component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
MENU_ITEM = 54,
/**
* menu item group component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
MENU_ITEM_GROUP = 55,
/**
* navdestination component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
NAV_DESTINATION = 56,
/**
* navrouter component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
NAV_ROUTER = 57,
/**
* navigation component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
NAVIGATION = 58,
/**
* navigation bar component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
NAVIGATION_BAR = 59,
/**
* navigation menu component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
NAVIGATION_MENU = 60,
/**
* navigator component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
NAVIGATOR = 61,
/**
* offscreen canvas component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
OFFSCREEN_CANVAS = 62,
/**
* offscreen canvas rendering context2d component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
OFFSCREEN_CANVAS_RENDERING_CONTEXT2D = 63,
/**
* option component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
OPTION = 64,
/**
* panel component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
PANEL = 65,
/**
* paper page component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
PAPER_PAGE = 66,
/**
* path component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
PATH = 67,
/**
* path 2d component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
PATH2D = 68,
/**
* pattern lock component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
PATTERN_LOCK = 69,
/**
* picker component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
PICKER = 70,
/**
* picker view component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
PICKER_VIEW = 71,
/**
* plugin component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
PLUGIN_COMPONENT = 72,
/**
* polygon component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
POLYGON = 73,
/**
* polyline component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
POLYLINE = 74,
/**
* pop up component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
POPUP = 75,
/**
* progress component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
PROGRESS = 76,
/**
* qr code component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
QRCODE = 77,
/**
* radio component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
RADIO = 78,
/**
* rating component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
RATING = 79,
/**
* rect component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
RECT = 80,
/**
* refresh component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
REFRESH = 81,
/**
* relative container component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
RELATIVE_CONTAINER = 82,
/**
* remote window component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
REMOTE_WINDOW = 83,
/**
* rich editor component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
RICH_EDITOR = 84,
/**
* rich text component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
RICH_TEXT = 85,
/**
* rolepager component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
ROLE_PAGER = 86,
/**
* row component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
ROW = 87,
/**
* row split component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
ROW_SPLIT = 88,
/**
* scroll component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
SCROLL = 89,
/**
* scroll bar component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
SCROLL_BAR = 90,
/**
* search component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
SEARCH = 91,
/**
* search field component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
SEARCH_FIELD = 92,
/**
* select component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
SELECT = 93,
/**
* shape component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
SHAPE = 94,
/**
* sidebar container component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
SIDEBAR_CONTAINER = 95,
/**
* slider component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
SLIDER = 96,
/**
* span component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
SPAN = 97,
/**
* stack component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
STACK = 98,
/**
* stepper component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
STEPPER = 99,
/**
* stepper item component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
STEPPER_ITEM = 100,
/**
* swiper component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
SWIPER = 101,
/**
* swiper indicator component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
SWIPER_INDICATOR = 102,
/**
* switch component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
SWITCH = 103,
/**
* symbol glyph component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
SYMBOL_GLYPH = 104,
/**
* tab content component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
TAB_CONTENT = 105,
/**
* tab bar component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
TAB_BAR = 106,
/**
* tabs component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
TABS = 107,
/**
* text component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
TEXT = 108,
/**
* text clock component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
TEXT_CLOCK = 109,
/**
* text entry component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
TEXT_ENTRY = 110,
/**
* text input component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
TEXT_INPUT = 111,
/**
* text picker component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
TEXT_PICKER = 112,
/**
* text timer component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
TEXT_TIMER = 113,
/**
* text area component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
TEXT_AREA = 114,
/**
* text field component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
TEXT_FIELD = 115,
/**
* time picker component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
TIME_PICKER = 116,
/**
* title bar component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
TITLE_BAR = 117,
/**
* toggler component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
TOGGLER = 118,
/**
* uiextensioncomponent component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
UI_EXTENSION_COMPONENT = 119,
/**
* video component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
VIDEO = 120,
/**
* water flow component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
WATER_FLOW = 121,
/**
* web component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
WEB = 122,
/**
* xcomponent component type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
XCOMPONENT = 123,
/**
* none component type: screen reader will not broadcast the component type.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
ROLE_NONE = 124,
}
/**
* Defines the callback type used in accessibility focus. The value of isFocus indicates whether the current component is focused
* @typedef {function} AccessibilityFocusCallback
* @param {boolean} isFocus - if component is focused,isFocus will be true. else isFocus is false.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
declare type AccessibilityFocusCallback = (isFocus: boolean) => void;
/**
* Enum for accessibility action type
* @enum { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 20
*/
declare enum AccessibilityAction {
/**
* undefined action type
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 20
*/
UNDEFINED_ACTION = 0,
/**
* accessibility click action
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 20
*/
ACCESSIBILITY_CLICK = 1,
}
/**
* Enum for the result of accessibility action intercept function
* @enum { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 20
*/
declare enum AccessibilityActionInterceptResult {
/**
* intercept the accessibility action
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 20
*/
ACTION_INTERCEPT = 0,
/**
* the accessibility action can be continued
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 20
*/
ACTION_CONTINUE = 1,
/**
* the accessibility action need to bubble up for execution
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 20
*/
ACTION_RISE = 2,
}
/**
* Defines the callback type used in accessibility action intercept.
* The value of action indicates the accessibility action type.
* @typedef { function } AccessibilityActionInterceptCallback
* @param { AccessibilityAction } action - the enum of accessibility action type.
* @returns { AccessibilityActionInterceptResult } the result of continuing to execute the action or interrupting it or bubbling up
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 20
*/
declare type AccessibilityActionInterceptCallback = (action: AccessibilityAction) => AccessibilityActionInterceptResult;
/**
* Enum for FinishCallbackType.
*
* @enum { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 11
*/
/**
* Enum for FinishCallbackType.
*
* @enum { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
declare enum FinishCallbackType {
/**
* The callback is invoked when the entire animation is removed once it has finished.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 11
*/
/**
* The callback is invoked when the entire animation is removed once it has finished.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
REMOVED = 0,
/**
* When the animation is logically down but may still be in its long tail, the callback is triggered.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 11
*/
/**
* The callback is invoked when the animation logically enters the falling state,
* though it may still be in its long tail state.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
LOGICALLY = 1,
}
/**
* Defines the touch test strategy object.
*
* @enum { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 11
*/
/**
* Defines the touch test strategy object.
*
* @enum { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
declare enum TouchTestStrategy {
/**
* Do framework touch test.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 11
*/
/**
* Custom dispatch has no effect; the system distributes events based on the hit status of the current node.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
DEFAULT = 0,
/**
* Specify the component to do touch test and follow the framework touch test
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 11
*/
/**
* The specified event is forwarded to a particular child node, and the system determines whether to
* distribute the event to other sibling nodes.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
FORWARD_COMPETITION = 1,
/**
* Specify the component to do touch test and not follow the framework touch test
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 11
*/
/**
* The specified event is forwarded to a particular child node, and the system no longer distributes
* the event to other sibling nodes.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
FORWARD = 2
}
/**
* Defines the animate function params.
*
* @interface AnimateParam
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* Defines the animate function params.
*
* @interface AnimateParam
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* Defines the animate function params.
*
* @interface AnimateParam
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* Defines the animate function params.
*
* @interface AnimateParam
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
declare interface AnimateParam {
/**
* Animation duration, in ms.
*
* @type { ?number }
* @default 1000
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* Animation duration, in ms.
*
* @type { ?number }
* @default 1000
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* Animation duration, in ms.
*
* @type { ?number }
* @default 1000
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* Animation duration, in ms.
*
* @type { ?number }
* @default 1000
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
duration?: number;
/**
* Animation playback speed. A larger value indicates faster animation playback, and a smaller value indicates slower
* animation playback. The value 0 means that there is no animation.
* Default value: **1.0**.
*
* @type { ?number }
* @default 1.0
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* Animation playback speed. A larger value indicates faster animation playback, and a smaller value indicates slower
* animation playback. The value 0 means that there is no animation.
* Default value: **1.0**.
*
* @type { ?number }
* @default 1.0
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Animation playback speed. A larger value indicates faster animation playback, and a smaller value indicates slower
* animation playback. The value 0 means that there is no animation.
*
* @type { ?number }
* @default 1.0
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
tempo?: number;
/**
* Animation curve.
*
* @type { ?(Curve | string) }
* @default Curve.EaseInOut
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* Animation curve.
*
* @type { ?(Curve | string | ICurve) }
* @default Curve.EaseInOut
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* Animation curve.
*
* @type { ?(Curve | string | ICurve) }
* @default Curve.EaseInOut
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* Animation curve.
*
* @type { ?(Curve | string | ICurve) }
* @default Curve.EaseInOut
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
curve?: Curve | string | ICurve;
/**
* Animation delay time, in ms. By default, the animation has no delay.
*
* @type { ?number }
* @default 0
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* Animation delay time, in ms. By default, the animation has no delay.
*
* @type { ?number }
* @default 0
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Animation delay time, in ms. By default, the animation has no delay.
*
* @type { ?number }
* @default 0
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
delay?: number;
/**
* Number of times that the animation is played. By default, the animation is played once.
* The value **-1** indicates that the animation is played for an unlimited number of times.
* The value **0** indicates that there is no animation.
*
* @type { ?number }
* @default 1
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* Number of times that the animation is played. By default, the animation is played once.
* The value **-1** indicates that the animation is played for an unlimited number of times.
* The value **0** indicates that there is no animation.
*
* @type { ?number }
* @default 1
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Number of times that the animation is played. By default, the animation is played once.
* The value **-1** indicates that the animation is played for an unlimited number of times.
* The value **0** indicates that there is no animation.
*
* @type { ?number }
* @default 1
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
iterations?: number;
/**
* Playback mode. By default, the animation is played from the beginning after the playback is complete.
*
* @type { ?PlayMode }
* @default PlayMode.Normal
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* Playback mode. By default, the animation is played from the beginning after the playback is complete.
*
* @type { ?PlayMode }
* @default PlayMode.Normal
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* Playback mode. By default, the animation is played from the beginning after the playback is complete.
*
* @type { ?PlayMode }
* @default PlayMode.Normal
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* Playback mode. By default, the animation is played from the beginning after the playback is complete.
*
* @type { ?PlayMode }
* @default PlayMode.Normal
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
playMode?: PlayMode;
/**
* Callback invoked when the animation playback is complete.
*
* @type { ?function }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* Callback invoked when the animation playback is complete.
*
* @type { ?function }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* Callback invoked when the animation playback is complete.
*
* @type { ?function }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* Callback invoked when the animation playback is complete.
*
* @type { ?function }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
onFinish?: () => void;
/**
* Type of the **onFinish** callback.
*
* @type { ?FinishCallbackType }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 11
*/
/**
* Type of the **onFinish** callback.
* Default value: FinishCallbackType.REMOVED.
*
* @type { ?FinishCallbackType }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
finishCallbackType?: FinishCallbackType;
/**
* Expected frame rate range of the animation.
*
* @type { ?ExpectedFrameRateRange }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 11
*/
/**
* Expected frame rate range of the animation.
*
* @type { ?ExpectedFrameRateRange }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
expectedFrameRateRange?: ExpectedFrameRateRange;
}
/**
* Interface for curve object.
*
* @interface ICurve
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* Interface for curve object.
*
* @interface ICurve
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* Interface for curve object.
*
* @interface ICurve
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
interface ICurve {
/**
* Implements calculation.
*
* @param { number } fraction - Current normalized time. Value range: [0, 1].
*
**NOTE**:
* A value less than 0 is handed as **0**. A value greater than 1 is handed as **1**.
*
* @returns { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* Implements calculation.
*
* @param { number } fraction - Current normalized time. Value range: [0, 1].
*
**NOTE**:
* A value less than 0 is handed as **0**. A value greater than 1 is handed as **1**.
*
* @returns { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* Implements calculation.
*
* @param { number } fraction - Current normalized time. Value range: [0, 1].
*
**NOTE**:
* A value less than 0 is handed as **0**. A value greater than 1 is handed as **1**.
*
* @returns { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
interpolate(fraction: number): number;
}
/**
* Defines the motion path options.
*
* @interface MotionPathOptions
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* Defines the motion path options.
*
* @interface MotionPathOptions
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Defines the motion path options.
*
* @interface MotionPathOptions
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
declare interface MotionPathOptions {
/**
* Motion path of the translation animation.
* The **svg** path string is used.
* In the value, **start** and **end** can be used in place of the start point and end point,
* for example, **'Mstart.x start.y L50 50 Lend.x end.y Z'**.
* If this parameter is set to an empty string, the path animation is not set.
*
* @type { string }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* Motion path of the translation animation.
* The **svg** path string is used.
* In the value, **start** and **end** can be used in place of the start point and end point,
* for example, **'Mstart.x start.y L50 50 Lend.x end.y Z'**.
* If this parameter is set to an empty string, the path animation is not set.
*
* @type { string }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Motion path of the translation animation.
* The **svg** path string is used.
* In the value, **start** and **end** can be used in place of the start point and end point,
* for example, **'Mstart.x start.y L50 50 Lend.x end.y Z'**.
* If this parameter is set to an empty string, the path animation is not set.
*
* @type { string }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
path: string;
/**
* Start point of the motion path.
* Value range: [0, 1].
* A value less than 0 or greater than 1 evaluates to the default value **0**.
*
* @type { ?number }
* @default 0.0
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* Start point of the motion path.
* Value range: [0, 1].
* A value less than 0 or greater than 1 evaluates to the default value **0**.
*
* @type { ?number }
* @default 0.0
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Start point of the motion path.
* Value range: [0, 1].
* A value less than 0 or greater than 1 evaluates to the default value **0**.
*
* @type { ?number }
* @default 0.0
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
from?: number;
/**
* End point of the motion path.
* Value range: [0, 1].
* A value less than 0 or greater than 1 evaluates to the default value **1**,
* provided that the value of **to** is greater than or equal to the value of **from**.
*
* @type { ?number }
* @default 1.0
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* End point of the motion path.
* Value range: [0, 1].
* A value less than 0 or greater than 1 evaluates to the default value **1**,
* provided that the value of **to** is greater than or equal to the value of **from**.
*
* @type { ?number }
* @default 1.0
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* End point of the motion path.
* Value range: [0, 1].
* A value less than 0 or greater than 1 evaluates to the default value **1**,
* provided that the value of **to** is greater than or equal to the value of **from**.
*
* @type { ?number }
* @default 1.0
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
to?: number;
/**
* Whether to rotate along the path.
*
* @type { ?boolean }
* @default false
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* Whether to rotate along the path.
*
* @type { ?boolean }
* @default false
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Whether to rotate along the path.
*
* @type { ?boolean }
* @default false
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
rotatable?: boolean;
}
/**
* Defines the shard transition function params.
*
* @interface sharedTransitionOptions
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* Defines the shard transition function params.
*
* @interface sharedTransitionOptions
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Defines the shard transition function params.
*
* @interface sharedTransitionOptions
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
declare interface sharedTransitionOptions {
/**
* Animation duration, in ms.
*
* @type { ?number }
* @default 1000
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* Animation duration.
* Default value: **1000**.
* Unit: ms.
* Value range: [0, +∞).
*
* @type { ?number }
* @default 1000
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Animation duration.
* Default value: **1000**.
* Unit: ms.
* Value range: [0, +∞).
*
* @type { ?number }
* @default 1000
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
duration?: number;
/**
* Animation curve. You are advised to specify the curve using the Curve or ICurve type.
*
* @type { ?(Curve | string | ICurve) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* Animation curve. You are advised to specify the curve using the **Curve** or
* ** ICurve** type. For the string type, this parameter indicates an animation
* interpolation curve. For available values, see the **curve** parameter in
* AnimateParam.
* Default value: **Curve.Linear**.
*
* @type { ?(Curve | string | ICurve) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Animation curve. You are advised to specify the curve using the **Curve** or
* ** ICurve** type. For the string type, this parameter indicates an animation
* interpolation curve. For available values, see the **curve** parameter in
* AnimateParam.
* Default value: **Curve.Linear**.
*
* @type { ?(Curve | string | ICurve) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
curve?: Curve | string | ICurve;
/**
* Animation playback mode. By default, the animation is played from the beginning after the playback is complete.
*
* @type { ?number }
* @default 0
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* Animation delay time, in ms.
*
* @type { ?number }
* @default 0
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Animation delay time, in ms.
*
* @type { ?number }
* @default 0
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
delay?: number;
/**
* The motion path info.
*
* @type { ?MotionPathOptions }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* The motion path info.
*
* @type { ?MotionPathOptions }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* The motion path info.
*
* @type { ?MotionPathOptions }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
motionPath?: MotionPathOptions;
/**
* Z index info.
*
* @type { ?number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* Z index info.
*
* @type { ?number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Z index info.
*
* @type { ?number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
zIndex?: number;
/**
* the animate type.
*
* @type { ?SharedTransitionEffectType }
* @default SharedTransitionEffectType.Exchange
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* the animate type.
*
* @type { ?SharedTransitionEffectType }
* @default SharedTransitionEffectType.Exchange
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* the animate type.
*
* @type { ?SharedTransitionEffectType }
* @default SharedTransitionEffectType.Exchange
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
type?: SharedTransitionEffectType;
}
/**
* Defines the options of geometry transition.
*
* @interface GeometryTransitionOptions
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
/**
* Defines the options of geometry transition.
*
* @interface GeometryTransitionOptions
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
declare interface GeometryTransitionOptions {
/**
* whether follow target for the component still in the hierarchy, default: false, stay current.
*
* @type { ?boolean }
* @default false
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
/**
* whether follow target for the component still in the hierarchy, default: false, stay current.
*
* @type { ?boolean }
* @default false
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
follow?: boolean;
/**
* Defines movement strategy of source and target in the hierarchy during geometry transition.
*
* @type { ?TransitionHierarchyStrategy }
* @default TransitionHierarchyStrategy.ADAPTIVE
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @systemapi
* @atomicservice
* @since 12
*/
/**
* Defines movement strategy of source and target in the hierarchy during geometry transition.
*
* @type { ?TransitionHierarchyStrategy }
* @default TransitionHierarchyStrategy.ADAPTIVE
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @systemapi
* @since arkts {'1.1':'13','1.2':'20'}
* @arkts 1.1&1.2
*/
hierarchyStrategy?: TransitionHierarchyStrategy
}
/**
* Defines the options of linear gradient.
*
* @interface LinearGradientOptions
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
declare interface LinearGradientOptions {
/**
* angle: Angle of Linear Gradient. The default value is 180;
*
* @type { ?(number | string) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* angle: Angle of Linear Gradient. The default value is 180;
*
* @type { ?(number | string) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* angle: Angle of Linear Gradient. The default value is 180;
*
* @type { ?(number | string) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* angle: Angle of Linear Gradient. The default value is 180;
*
* @type { ?(number | string) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 11
*/
/**
* angle: Angle of Linear Gradient. The default value is 180;
*
* @type { ?(number | string) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 12
*/
/**
* Defines starting angle of linear gradient.
*
* Anonymous Object Rectification.
* @type { ?(number | string) }
* @default 180
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
angle?: number | string;
/**
* direction: Direction of Linear Gradient. The default value is GradientDirection.Bottom;
*
* @type { ?GradientDirection }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* direction: Direction of Linear Gradient. The default value is GradientDirection.Bottom;
*
* @type { ?GradientDirection }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* direction: Direction of Linear Gradient. The default value is GradientDirection.Bottom;
*
* @type { ?GradientDirection }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* direction: Direction of Linear Gradient. The default value is GradientDirection.Bottom;
*
* @type { ?GradientDirection }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 11
*/
/**
* direction: Direction of Linear Gradient. The default value is GradientDirection.Bottom;
*
* @type { ?GradientDirection }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 12
*/
/**
* Defines the direction of linear gradient.
*
* Anonymous Object Rectification.
* @type { ?GradientDirection }
* @default GradientDirection.Bottom
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
direction?: GradientDirection;
/**
* colors: Color description for gradients.
*
* @type { Array<[ResourceColor, number]> }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* colors: Color description for gradients.
*
* @type { Array<[ResourceColor, number]> }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* colors: Color description for gradients.
*
* @type { Array<[ResourceColor, number]> }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* colors: Color description for gradients.
*
* @type { Array<[ResourceColor, number]> }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 11
*/
/**
* colors: Color description for gradients.
*
* @type { Array<[ResourceColor, number]> }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 12
*/
/**
* Defines color description for gradients.
*
* Anonymous Object Rectification.
* @type { Array<[ResourceColor, number]> }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
colors: Array<[ResourceColor, number]>;
/**
* repeating: repeating. The default value is false
*
* @type { ?boolean }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* repeating: repeating. The default value is false
*
* @type { ?boolean }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* repeating: repeating. The default value is false
*
* @type { ?boolean }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* repeating: repeating. The default value is false
*
* @type { ?boolean }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 11
*/
/**
* repeating: repeating. The default value is false
*
* @type { ?boolean }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 12
*/
/**
* Defines gradient colors with repeated coloring.
*
* Anonymous Object Rectification.
* @type { ?boolean }
* @default false
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
repeating?: boolean;
}
/**
* Defines the options of radial gradient.
*
* @interface SweepGradientOptions
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
declare interface SweepGradientOptions {
/**
* center:is the center point of the angle gradient
*
* @type { [Length, Length] }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* center:is the center point of the angle gradient
*
* @type { [Length, Length] }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* center:is the center point of the angle gradient
*
* @type { [Length, Length] }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* center:is the center point of the angle gradient
*
* @type { [Length, Length] }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 11
*/
/**
* center:is the center point of the angle gradient
*
* @type { [Length, Length] }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 12
*/
/**
* Defines center point for angle gradient.
*
* Anonymous Object Rectification.
* @type { [Length, Length] }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
center: [Length, Length];
/**
* start:Start point of angle gradient. The default value is 0
*
* @param { ?(number | string) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* start:Start point of angle gradient. The default value is 0
*
* @type { ?(number | string) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* Angle Gradient
* start:Start point of angle gradient. The default value is 0
*
* @type { ?(number | string) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* start:Start point of angle gradient. The default value is 0
*
* @type { ?(number | string) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 11
*/
/**
* start:Start point of angle gradient. The default value is 0
*
* @type { ?(number | string) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 12
*/
/**
* Defines the starting point of angle gradient.
*
* Anonymous Object Rectification.
* @type { ?(number | string) }
* @default 0
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
start?: number | string;
/**
* end:End point of angle gradient. The default value is 0
* @type { ?(number | string) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* end:End point of angle gradient. The default value is 0
*
* @type { ?(number | string) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* end:End point of angle gradient. The default value is 0
*
* @type { ?(number | string) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* end:End point of angle gradient. The default value is 0
*
* @type { ?(number | string) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 11
*/
/**
* end:End point of angle gradient. The default value is 0
*
* @type { ?(number | string) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 12
*/
/**
* Defines end point of angle gradient.
*
* Anonymous Object Rectification.
* @type { ?(number | string) }
* @default 0
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
end?: number | string;
/**
* rotating:rotating. The default value is 0
*
* @type { ?(number | string) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* rotating:rotating. The default value is 0
*
* @type { ?(number | string) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* rotating:rotating. The default value is 0
*
* @type { ?(number | string) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* rotating:rotating. The default value is 0
*
* @type { ?(number | string) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 11
*/
/**
* rotating:rotating. The default value is 0
*
* @type { ?(number | string) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 12
*/
/**
* Defines the rotation angle of the gradient.
*
* Anonymous Object Rectification.
* @type { ?(number | string) }
* @default 0
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
rotation?: number | string;
/**
* colors:Color description for gradients
*
* @type { Array<[ResourceColor, number]> }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* colors:Color description for gradients
*
* @type { Array<[ResourceColor, number]> }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* colors:Color description for gradients
*
* @type { Array<[ResourceColor, number]> }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* colors:Color description for gradients
*
* @type { Array<[ResourceColor, number]> }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 11
*/
/**
* colors:Color description for gradients
*
* @type { Array<[ResourceColor, number]> }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 12
*/
/**
* Defines color description for gradients.
*
* Anonymous Object Rectification.
* @type { Array<[ResourceColor, number]> }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
colors: Array<[ResourceColor, number]>;
/**
* Defines color description in ColorMetrics format for gradients.
* This parameter takes precedence over colors parameter.
*
* @type { ?Array<[ColorMetrics, number]> }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
*/
metricsColors?: Array<[ColorMetrics, number]>;
/**
* repeating:repeating. The default value is false
*
* @type { ?boolean }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* repeating:repeating. The default value is false
*
* @type { ?boolean }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* repeating:repeating. The default value is false
*
* @type { ?boolean }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* repeating:repeating. The default value is false
*
* @type { ?boolean }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 11
*/
/**
* repeating:repeating. The default value is false
*
* @type { ?boolean }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 12
*/
/**
* Defines gradient colors with repeated coloring.
*
* Anonymous Object Rectification.
* @type { ?boolean }
* @default false
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
repeating?: boolean;
}
/**
* Defines the options of radial gradient.
*
* @interface RadialGradientOptions
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
declare interface RadialGradientOptions {
/**
* center:Center point of radial gradient
*
* @type { [Length, Length] }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* center:Center point of radial gradient
*
* @type { [Length, Length] }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* center:Center point of radial gradient
*
* @type { [Length, Length] }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* center:Center point of radial gradient
*
* @type { [Length, Length] }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 11
*/
/**
* center:Center point of radial gradient
*
* @type { [Length, Length] }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 12
*/
/**
* Defines center point for radial gradient.
*
* Anonymous Object Rectification.
* @type { [Length, Length] }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
center: [Length, Length];
/**
* radius:Radius of Radial Gradient. value range [0, +∞)
*
* @type { number | string }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* radius:Radius of Radial Gradient. value range [0, +∞)
*
* @type { number | string }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* radius:Radius of Radial Gradient. value range [0, +∞)
*
* @type { number | string }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* radius:Radius of Radial Gradient. value range [0, +∞)
*
* @type { number | string }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 11
*/
/**
* radius:Radius of Radial Gradient. value range [0, +∞)
*
* @type { number | string }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 12
*/
/**
* Defines radius of the radial gradient.
*
* Anonymous Object Rectification.
* @type { Length }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
radius: Length;
/**
* colors:Color description for gradients
*
* @type { Array<[ResourceColor, number]> }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* colors:Color description for gradients
*
* @type { Array<[ResourceColor, number]> }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* colors:Color description for gradients
*
* @type { Array<[ResourceColor, number]> }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* colors:Color description for gradients
*
* @type { Array<[ResourceColor, number]> }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 11
*/
/**
* colors:Color description for gradients
*
* @type { Array<[ResourceColor, number]> }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 12
*/
/**
* Defines color description for gradients.
*
* Anonymous Object Rectification.
* @type { Array<[ResourceColor, number]> }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
colors: Array<[ResourceColor, number]>;
/**
* repeating: Refill. The default value is false
*
* @type { ?boolean } value
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* repeating: Refill. The default value is false
*
* @type { ?boolean } value
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* repeating: Refill. The default value is false
*
* @type { ?boolean } value
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* repeating: Refill. The default value is false
*
* @type { ?boolean } value
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 11
*/
/**
* repeating: Refill. The default value is false
*
* @type { ?boolean }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 12
*/
/**
* Defines gradient colors with repeated coloring.
*
* Anonymous Object Rectification.
* @type { ?boolean }
* @default false
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
repeating?: boolean;
}
/**
* Source and target are two matched elements during the geometry transition.
* The animation starts at the source and ends at the target.
* TransitionHierarchyStrategy enumeration defines how levels of source and target elements
* would be changed in the hierarchy during the geometry transition.
*
* @enum { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @systemapi
* @atomicservice
* @since 12
*/
/**
* Source and target are two matched elements during the geometry transition.
* The animation starts at the source and ends at the target.
* TransitionHierarchyStrategy enumeration defines how levels of source and target elements
* would be changed in the hierarchy during the geometry transition.
*
* @enum { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @systemapi
* @since arkts {'1.1':'13','1.2':'20'}
* @arkts 1.1&1.2
*/
declare enum TransitionHierarchyStrategy {
/**
* None mode.
* Source and target staty in the original level in the hierarchy during geometry transition.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @systemapi
* @atomicservice
* @since 12
*/
/**
* None mode.
* Source and target staty in the original level in the hierarchy during geometry transition.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @systemapi
* @since arkts {'1.1':'13','1.2':'20'}
* @arkts 1.1&1.2
*/
NONE = 0,
/**
* ADAPTIVE mode.
* Lower level one of source and target is elevated to higher level of both,
* indicating that two elements are in same high level.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @systemapi
* @atomicservice
* @since 12
*/
/**
* ADAPTIVE mode.
* Lower level one of source and target is elevated to higher level of both,
* indicating that two elements are in same high level.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @systemapi
* @since arkts {'1.1':'13','1.2':'20'}
* @arkts 1.1&1.2
*/
ADAPTIVE = 1,
}
/**
* Defines the options of translate.
*
* @interface TranslateOptions
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* Defines the options of translate.
*
* @interface TranslateOptions
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* Defines the options of translate.
*
* @interface TranslateOptions
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* Defines the options of translate.
*
* @interface TranslateOptions
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
declare interface TranslateOptions {
/**
* Translation distance along the x-axis.
* For the number type, the unit is VP, and the value range is (-∞, +∞).
* For the string type, the value follows the format of Length string type.
*
* @type { ?(number | string) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* Translation distance along the x-axis.
* For the number type, the unit is VP, and the value range is (-∞, +∞).
* For the string type, the value follows the format of Length string type.
*
* @type { ?(number | string) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* Translation distance along the x-axis.
* For the number type, the unit is VP, and the value range is (-∞, +∞).
* For the string type, the value follows the format of Length string type.
*
* @type { ?(number | string) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* Translation distance along the x-axis.
* For the number type, the unit is VP, and the value range is (-∞, +∞).
* For the string type, the value follows the format of length string type.
*
* @type { ?(number | string) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
x?: number | string;
/**
* Translation distance along the y-axis.
* For the number type, the unit is VP, and the value range is (-∞, +∞).
* For the string type, the value follows the format of length string type.
*
* @type { ?(number | string) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* Translation distance along the y-axis.
* For the number type, the unit is VP, and the value range is (-∞, +∞).
* For the string type, the value follows the format of length string type.
*
* @type { ?(number | string) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* Translation distance along the y-axis.
* For the number type, the unit is VP, and the value range is (-∞, +∞).
* For the string type, the value follows the format of length string type.
*
* @type { ?(number | string) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* Translation distance along the y-axis.
* For the number type, the unit is VP, and the value range is (-∞, +∞).
* For the string type, the value follows the format of length string type.
*
* @type { ?(number | string) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
y?: number | string;
/**
* Distance to translate along the z-axis. The value is a floating
* point number, the default value is 0.0, and the unit is px.
*
* @type { ?(number | string) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* Distance to translate along the z-axis. The value is a floating
* point number, the default value is 0.0, and the unit is px.
*
* @type { ?(number | string) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* Distance to translate along the z-axis. The value is a floating
* point number, the default value is 0.0, and the unit is px.
*
* @type { ?(number | string) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* Distance to translate along the z-axis. The value is a floating
* point number, the default value is 0.0, and the unit is px.
*
* @type { ?(number | string) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
z?: number | string;
}
/**
* Defines the options of scale.
*
* @interface ScaleOptions
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* Defines the options of scale.
*
* @interface ScaleOptions
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* Defines the options of scale.
*
* @interface ScaleOptions
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* Defines the options of scale.
*
* @interface ScaleOptions
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
declare interface ScaleOptions {
/**
* Scale ratio along the x-axis.
* x > 1: The component is scaled up along the x-axis.
* 0 < x < 1: The component is scaled down along the x-axis.
* x < 0: The component is scaled in the reverse direction of the x-axis.
*
* @type { ?number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* Scale ratio along the x-axis.
* x > 1: The component is scaled up along the x-axis.
* 0 < x < 1: The component is scaled down along the x-axis.
* x < 0: The component is scaled in the reverse direction of the x-axis.
*
* @type { ?number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* Scale ratio along the x-axis.
* x > 1: The component is scaled up along the x-axis.
* 0 < x < 1: The component is scaled down along the x-axis.
* x < 0: The component is scaled in the reverse direction of the x-axis.
*
* @type { ?number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* Scale ratio along the x-axis.
* x > 1: The component is scaled up along the x-axis.
* 0 < x < 1: The component is scaled down along the x-axis.
* x < 0: The component is scaled in the reverse direction of the x-axis.
*
* @type { ?number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
x?: number;
/**
* Scale ratio along the y-axis.
* y > 1: The component is scaled up along the y-axis.
* 0 < y < 1: The component is scaled down along the y-axis.
* y < 0: The component is scaled in the reverse direction of the y-axis.
*
* @type { ?number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* Scale ratio along the y-axis.
* y > 1: The component is scaled up along the y-axis.
* 0 < y < 1: The component is scaled down along the y-axis.
* y < 0: The component is scaled in the reverse direction of the y-axis.
*
* @type { ?number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* Scale ratio along the y-axis.
* y > 1: The component is scaled up along the y-axis.
* 0 < y < 1: The component is scaled down along the y-axis.
* y < 0: The component is scaled in the reverse direction of the y-axis.
*
* @type { ?number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* Scale ratio along the y-axis.
* y > 1: The component is scaled up along the y-axis.
* 0 < y < 1: The component is scaled down along the y-axis.
* y < 0: The component is scaled in the reverse direction of the y-axis.
*
* @type { ?number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
y?: number;
/**
* Scale ratio along the z-axis. z > 1: The component is scaled up along the z-axis.
* 0 < z < 1: The component is scaled down along the z-axis.
* z < 0: The component is scaled in the reverse direction of the z-axis.
*
* @type { ?number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* Scale ratio along the z-axis. z > 1: The component is scaled up along the z-axis.
* 0 < z < 1: The component is scaled down along the z-axis.
* z < 0: The component is scaled in the reverse direction of the z-axis.
*
* @type { ?number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* Scale ratio along the z-axis. z > 1: The component is scaled up along the z-axis.
* 0 < z < 1: The component is scaled down along the z-axis.
* z < 0: The component is scaled in the reverse direction of the z-axis.
*
* @type { ?number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* Scale ratio along the z-axis. z > 1: The component is scaled up along the z-axis.
* 0 < z < 1: The component is scaled down along the z-axis.
* z < 0: The component is scaled in the reverse direction of the z-axis.
*
* @type { ?number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
z?: number;
/**
* X coordinate of the transformation center point (anchor). Unit is vp.
*
* @type { ?(number | string) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* X coordinate of the transformation center point (anchor). Unit is vp.
*
* @type { ?(number | string) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* X coordinate of the transformation center point (anchor). Unit is vp.
*
* @type { ?(number | string) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* X coordinate of the transformation center point (anchor). Unit is vp.
*
* @type { ?(number | string) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
centerX?: number | string;
/**
* Y coordinate of the transformation center point (anchor). Unit is vp.
*
* @type { ?(number | string) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* Y coordinate of the transformation center point (anchor). Unit is vp.
*
* @type { ?(number | string) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* Y coordinate of the transformation center point (anchor). Unit is vp.
*
* @type { ?(number | string) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* Y coordinate of the transformation center point (anchor). Unit is vp.
*
* @type { ?(number | string) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
centerY?: number | string;
}
/**
* Defines the align rule options of relative container.
*
* @interface AlignRuleParam
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 20
* @arkts 1.2
*/
declare interface AlignRuleParam {
/**
* The param of anchor.
*
* @type { ?string }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 20
* @arkts 1.2
*/
anchor: string;
/**
* The param of align.
*
* @type { T }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 20
* @arkts 1.2
*/
align: T
}
/**
* Defines the align rule options of relative container.
*
* @interface AlignRuleOption
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 20
* @arkts 1.2
*/
declare interface AlignRuleOption {
/**
* The param of left align.
*
* @type { ?AlignRuleParam }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 20
* @arkts 1.2
*/
left?:AlignRuleParam;
/**
* The param of right align.
*
* @type { ?AlignRuleParam }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 20
* @arkts 1.2
*/
right?: AlignRuleParam;
/**
* The param of middle align.
*
* @type { ?AlignRuleParam }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 20
* @arkts 1.2
*/
middle?: AlignRuleParam;
/**
* The param of top align.
*
* @type { ?AlignRuleParam }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 20
* @arkts 1.2
*/
top?: AlignRuleParam;
/**
* The param of bottom align.
*
* @type { ?AlignRuleParam }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @atomicservice
* @since 20
* @arkts 1.2
*/
bottom?: AlignRuleParam;
/**
* The param of center align.
*
* @type { ?AlignRuleParam }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 20
* @arkts 1.2
*/
center?: AlignRuleParam;
/**
* Defines the bias ratio in horizontal and vertical direction.
*
* @type { ?Bias }
* @default {horizontal:0.5,vertical:0.5}
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 20
* @arkts 1.2
*/
bias?: Bias;
}
/**
* Defines the align rule options of relative container.
*
* @interface AlignRuleOption
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* Defines the align rule options of relative container.
*
* @interface AlignRuleOption
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* Defines the align rule options of relative container.
*
* @interface AlignRuleOption
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 11
*/
declare interface AlignRuleOption {
/**
* The param of left align.
*
* @type { ?object }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* The param of left align.
*
* @type { ?object }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* Left alignment.
* anchor: ID of the component that functions as the anchor point.
* align: alignment mode relative to the anchor component.
*
* @type { ?object }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 11
*/
left?: { anchor: string, align: HorizontalAlign };
/**
* The param of right align.
*
* @type { ?object }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* The param of right align.
*
* @type { ?object }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* Right alignment.
* anchor: ID of the component that functions as the anchor point.
* align: alignment mode relative to the anchor component.
*
* @type { ?object }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 11
*/
right?: { anchor: string, align: HorizontalAlign };
/**
* The param of middle align.
*
* @type { ?object }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* The param of middle align.
*
* @type { ?object }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* Horizontal center alignment.
* anchor: ID of the component that functions as the anchor point.
* align: alignment mode relative to the anchor component.
*
* @type { ?object }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 11
*/
middle?: { anchor: string, align: HorizontalAlign };
/**
* The param of top align.
*
* @type { ?object }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* The param of top align.
*
* @type { ?object }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* Top alignment.
* anchor: ID of the component that functions as the anchor point.
* align: alignment mode relative to the anchor component.
*
* @type { ?object }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 11
*/
top?: { anchor: string, align: VerticalAlign };
/**
* The param of bottom align.
*
* @type { ?object }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* The param of bottom align.
*
* @type { ?object }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 10
*/
/**
* Bottom alignment.
* anchor: ID of the component that functions as the anchor point.
* align: alignment mode relative to the anchor component.
*
* @type { ?object }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @atomicservice
* @since 11
*/
bottom?: { anchor: string, align: VerticalAlign };
/**
* The param of center align.
*
* @type { ?object }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* The param of center align.
*
* @type { ?object }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* Vertical center alignment.
* anchor: ID of the component that functions as the anchor point.
* align: alignment mode relative to the anchor component.
*
* @type { ?object }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 11
*/
center?: { anchor: string, align: VerticalAlign };
/**
* Defines the bias ratio in horizontal and vertical direction.
*
* @type { ?Bias }
* @default {horizontal:0.5,vertical:0.5}
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 11
*/
/**
* Offset of the component under the anchor constraints.
* The value is the ratio of the distance to the left/upper anchor to the total distance between anchors.
*
* @type { ?Bias }
* @default {horizontal:0.5,vertical:0.5}
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 12
*/
bias?: Bias;
}
/**
* Defines the localized horizontal align param of relative container.
*
* @interface LocalizedHorizontalAlignParam
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
declare interface LocalizedHorizontalAlignParam {
/**
* ID of the component that serves as the anchor.
*
* @type { string }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
anchor: string;
/**
* Horizontal alignment mode relative to the anchor component.
*
* @type { HorizontalAlign }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
align: HorizontalAlign;
}
/**
* Defines the localized vertical align param of relative container.
*
* @interface LocalizedVerticalAlignParam
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
declare interface LocalizedVerticalAlignParam {
/**
* ID of the component that serves as the anchor.
*
* @type { string }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
anchor: string;
/**
* Vertical alignment mode relative to the anchor component.
*
* @type { VerticalAlign }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
align: VerticalAlign;
}
/**
* Defines the Localized align rule options of relative container.
*
* @interface LocalizedAlignRuleOptions
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
declare interface LocalizedAlignRuleOptions {
/**
* Left alignment with left-to-right scripts and right alignment with right-to-left scripts in the horizontal direction.
*
* @type { ?LocalizedHorizontalAlignParam }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
start?: LocalizedHorizontalAlignParam;
/**
* Right alignment with left-to-right scripts and left alignment with right-to-left scripts in the horizontal direction.
*
* @type { ?LocalizedHorizontalAlignParam }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
end?: LocalizedHorizontalAlignParam;
/**
* Center alignment in the horizontal direction.
*
* @type { ?LocalizedHorizontalAlignParam }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
middle?: LocalizedHorizontalAlignParam;
/**
* Top alignment in the vertical direction.
*
* @type { ?LocalizedVerticalAlignParam }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
top?: LocalizedVerticalAlignParam;
/**
* Bottom alignment in the vertical direction.
*
* @type { ?LocalizedVerticalAlignParam }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
bottom?: LocalizedVerticalAlignParam;
/**
* Center alignment in the vertical direction.
*
* @type { ?LocalizedVerticalAlignParam }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
center?: LocalizedVerticalAlignParam;
/**
* Offset of the component under the anchor constraints.
* The value is the ratio of the distance to the left/upper anchor to the total distance between anchors.
*
* @type { ?Bias }
* @default {horizontal:0.5,vertical:0.5}
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
bias?: Bias;
}
/**
* Enumerates the chain styles in relative container.
*
* @enum { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
declare enum ChainStyle {
/**
* Child components are evenly distributed among constraint anchors.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
SPREAD,
/**
* All child components except the first and last ones are evenly distributed among constraint anchors.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
SPREAD_INSIDE,
/**
* There is no gap between child components in the chain.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
PACKED,
}
/**
* The param of rotate.
*
* @interface RotateOptions
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* The param of rotate.
*
* @interface RotateOptions
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* The param of rotate.
*
* @interface RotateOptions
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* The param of rotate.
*
* @interface RotateOptions
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
declare interface RotateOptions {
/**
* X coordinate of the rotation axis vector.
*
* @type { ?number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* X coordinate of the rotation axis vector.
*
* @type { ?number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* X coordinate of the rotation axis vector.
*
* @type { ?number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* X coordinate of the rotation axis vector.
*
* @type { ?number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
x?: number;
/**
* Y coordinate of the rotation axis vector.
*
* @type { ?number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* Y coordinate of the rotation axis vector.
*
* @type { ?number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* Y coordinate of the rotation axis vector.
*
* @type { ?number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* Y coordinate of the rotation axis vector.
*
* @type { ?number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
y?: number;
/**
* Z coordinate of the rotation axis vector.
*
* @type { ?number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* Z coordinate of the rotation axis vector.
*
* @type { ?number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* Z coordinate of the rotation axis vector.
*
* @type { ?number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* Z coordinate of the rotation axis vector.
*
* @type { ?number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
z?: number;
/**
* X coordinate of the transformation center point (anchor). Unit is vp.
*
* @type { ?(number | string) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* X coordinate of the transformation center point (anchor). Unit is vp.
*
* @type { ?(number | string) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* X coordinate of the transformation center point (anchor). Unit is vp.
*
* @type { ?(number | string) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* X coordinate of the transformation center point (anchor). Unit is vp.
*
* @type { ?(number | string) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
centerX?: number | string;
/**
* Y coordinate of the transformation center point (anchor). Unit is vp.
*
* @type { ?(number | string) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* Y coordinate of the transformation center point (anchor). Unit is vp.
*
* @type { ?(number | string) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 9
*/
/**
* Y coordinate of the transformation center point (anchor). Unit is vp.
*
* @type { ?(number | string) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* Y coordinate of the transformation center point (anchor). Unit is vp.
*
* @type { ?(number | string) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
centerY?: number | string;
/**
* Z-axis anchor, that is, the z-component of the 3D rotation center point.
*
* @type { ?number }
* @default 0
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* Z-axis anchor, that is, the z-component of the 3D rotation center point.
*
* @type { ?number }
* @default 0
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
centerZ?: number;
/**
* Distance from the user to the z=0 plane.
* The axis and center of rotation are set based on the coordinate system,
* which remains where it is when the component is moved.
*
* @type { ?number }
* @default 0
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* Distance from the user to the z=0 plane.
* The axis and center of rotation are set based on the coordinate system,
* which remains where it is when the component is moved.
*
* @type { ?number }
* @default 0
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
perspective?: number;
/**
* The param of angle.
*
* @type { number | string }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* The param of angle.
*
* @type { number | string }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* The param of angle.
*
* @type { number | string }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* The param of angle.
*
* @type { number | string }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
angle: number | string;
}
/**
* The rotation parameters containing multi-axis angle information.
*
* @interface RotateAngleOptions
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 20
*/
declare interface RotateAngleOptions {
/**
* the angle of the x-axis direction.
*
* @type { ?(number | string) }
* @default 0
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 20
*/
angleX?: number | string;
/**
* the angle of the y-axis direction.
*
* @type { ?(number | string) }
* @default 0
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 20
*/
angleY?: number | string;
/**
* the angle of the z-axis direction.
*
* @type { ?(number | string) }
* @default 0
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 20
*/
angleZ?: number | string;
/**
* The param of center point of x.
*
* @type { ?(number | string) }
* @default '50%'
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 20
*/
centerX?: number | string;
/**
* The param of center point of y.
*
* @type { ?(number | string) }
* @default '50%'
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 20
*/
centerY?: number | string;
/**
* The param of center point of z.
*
* @type { ?number }
* @default 0
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 20
*/
centerZ?: number;
/**
* The param of camera distance, value range (-∞, ∞).
* @type { ?number }
* @default 0
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 20
*/
perspective?: number;
}
/**
* Defines the param of transition.
*
* @interface TransitionOptions
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
* @deprecated since 10
* @useinstead TransitionEffect
*/
declare interface TransitionOptions {
/**
* Transition type.
* Default value: **TransitionType.All**.
* **NOTE** If **type** is not specified, the default value **TransitionType.All**
* is used, which means that the transition effect works for both component addition and deletion.
*
* @type { ?TransitionType }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
* @deprecated since 10
*/
type?: TransitionType;
/**
* Opacity of the component during transition, which is the value of the
* start point of insertion and the end point of deletion.
* Value range: [0, 1].
* **NOTE** If the value specified is less than 0, the value **0** is used.
* If the value specified is greater than 1, the value **1** is used.
*
* @type { ?number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
* @deprecated since 10
*/
opacity?: number;
/**
* Translation of the component during transition,
* which is the value of the start point of insertion and the end point of deletion.
* **x**: distance to translate along the x-axis.
* **y**: distance to translate along the y-axis.
* **z**: distance to translate along the z-axis.
*
* @type { ?TranslateOptions }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
* @deprecated since 10
*/
translate?: TranslateOptions;
/**
* Scaling of the component during transition, which is the value of the start point of insertion and the end point
* of deletion. **x**: scale factor along the x-axis. **y**: scale factor along the y-axis. **z**: scale factor along
* the z-axis (not effective for the current 2D graphics). **centerX** and **centerY**: scale center point. The
* default values are both **"50%"**, indicating the center point of the page. If the center point is (0, 0), it
* refers to the upper left corner of the component.
*
**NOTE**:
* If **centerX** or **centerY** is set to an invalid string (for example, **"illegalString"**),
* the default value **"0"** is used.
*
*
* @type { ?ScaleOptions }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
* @deprecated since 10
*/
scale?: ScaleOptions;
/**
* Rotation of the component during transition, which is the value of the start point of insertion and the end point
* of deletion. **x**: X-component of the rotation vector. **y**: Y-component of the rotation vector. **z**:
* Z-component of the rotation vector. **centerX** and **centerY**: rotation center point. The default values are
* both **"50%"**, indicating the center point of the page.If the center point is (0, 0), it refers to the upper left
* corner of the component.
*
* @type { ?RotateOptions }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
* @deprecated since 10
*/
rotate?: RotateOptions;
}
/**
* Defines the Edge object.
*
* @enum { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* Defines the Edge object.
*
* @enum { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
declare enum TransitionEdge {
/**
* Top edge
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* Top edge
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
TOP,
/**
* Bottom edge of the window.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* Bottom edge of the window.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
BOTTOM,
/**
* Start edge of the window, which is the left edge for left-to-right
* scripts and the right edge for right-to-left scripts.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* Start edge of the window, which is the left edge for left-to-right
* scripts and the right edge for right-to-left scripts.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
START,
/**
* End edge of the window, which is the right edge for left-to-right scripts
* and the left edge for right-to-left scripts.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* End edge of the window, which is the right edge for left-to-right scripts
* and the left edge for right-to-left scripts.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
END
}
/**
* Defines all transition effects.
*
* @typedef { object } TransitionEffects
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* Defines all transition effects.
*
* @typedef { object } TransitionEffects
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 11
*/
declare type TransitionEffects = {
identity: undefined;
opacity: number;
slideSwitch: undefined;
move: TransitionEdge;
translate: TranslateOptions;
rotate: RotateOptions;
scale: ScaleOptions;
asymmetric: {
appear: TransitionEffect;
disappear: TransitionEffect;
};
};
/**
* Defines the option of asymmetric transition.
*
* @interface AsymmetricTransitionOption
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 20
* @arkts 1.2
*/
declare interface AsymmetricTransitionOption {
/**
* TransitionEffect used for appearing
*
* @type { TransitionEffect }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 20
* @arkts 1.2
*/
appear: TransitionEffect;
/**
* TransitionEffect used for disappearing
*
* @type { TransitionEffect }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 20
* @arkts 1.2
*/
disappear: TransitionEffect;
}
/**
* Defined the draw modifier of node. Provides draw callbacks for the associated Node.
* Each DrawModifier instance can be set for only one component. Repeated setting is not allowed.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
declare class DrawModifier {
/**
* drawBehind Method. Executed before drawing associated Node.
*
* @param { DrawContext } drawContext - The drawContext used to draw.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
drawBehind?(drawContext: DrawContext): void;
/**
* drawBehind Method. Executed before drawing associated Node.
*
* @param { DrawContext } drawContext - The drawContext used to draw.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
* @arkts 1.2
*/
drawBehind(drawContext: DrawContext): void;
/**
* drawContent Method. Executed when associated Node is drawing, the default drawContent method will be replaced
* if this method is set.
*
* @param { DrawContext } drawContext - The drawContext used to draw.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
drawContent?(drawContext: DrawContext): void;
/**
* drawContent Method. Executed when associated Node is drawing, the default drawContent method will be replaced
* if this method is set.
*
* @param { DrawContext } drawContext - The drawContext used to draw.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
* @arkts 1.2
*/
drawContent(drawContext: DrawContext): void;
/**
* drawFront Method. Executed after drawing associated Node.
*
* @param { DrawContext } drawContext - The drawContext used to draw.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
drawFront?(drawContext: DrawContext): void;
/**
* drawforeground Method. This method is executed after drawing associated Node and its children.
* It allows you to perform additional drawing operations on top of the already rendered content.
* This can be useful for adding visual elements that should appear above the main content.
*
* @param { DrawContext } drawContext - The drawContext used to draw
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
*/
drawForeground(drawContext: DrawContext): void;
/**
* drawforeground Method. This method is executed after drawing associated Node and its children.
* It allows you to perform additional drawing operations on top of the already rendered content.
* This can be useful for adding visual elements that should appear above the main content.
*
* @param { DrawContext } drawContext - The drawContext used to draw.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
* @arkts 1.2
*/
drawFront(drawContext: DrawContext): void;
/**
* Invalidate the component, which will cause a re-render of the component.
* No overloading is allowed or needed.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
invalidate(): void;
}
/**
* Defines the transition effect
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* Defines the transition effect
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 11
*/
declare class TransitionEffect<
Type extends keyof TransitionEffects = keyof TransitionEffects,
Effect extends TransitionEffects[Type] = TransitionEffects[Type]
> {
/**
* Disables the transition effect
*
* @type { TransitionEffect<"identity"> }
* @readonly
* @static
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* Disables the transition effect
*
* @type { TransitionEffect<"identity"> }
* @readonly
* @static
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 11
*/
static readonly IDENTITY: TransitionEffect<"identity">;
/**
* Applies a transition effect with the opacity changing from 0 to 1 when the component appears
* And from 1 to 0 when the component disappears. This is equivalent to **TransitionEffect.opacity(0)**
*
* @type { TransitionEffect<"opacity"> }
* @readonly
* @static
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* Applies a transition effect with the opacity changing from 0 to 1 when the component appears
* And from 1 to 0 when the component disappears. This is equivalent to **TransitionEffect.opacity(0)**
*
* @type { TransitionEffect<"opacity"> }
* @readonly
* @static
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 11
*/
static readonly OPACITY: TransitionEffect<"opacity">;
/**
* Applies a transition effect of sliding in from the start edge when the component
* appears and sliding out from the end edge when the component disappears.
* This means sliding in from the left edge and sliding out from the right edge for
* left-to-right scripts, and sliding in from the right edge and sliding out from
* the left edge for right-to-left scripts. This is equivalent to
* TransitionEffect.asymmetric(TransitionEffect.move(TransitionEdge.START),
* TransitionEffect.move(TransitionEdge.END)).
*
* @type { TransitionEffect<
* "asymmetric",
* {appear: TransitionEffect<"move", TransitionEdge>;
* disappear: TransitionEffect<"move", TransitionEdge>;
* }> }
* @readonly
* @static
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* Applies a transition effect of sliding in from the start edge when the component
* appears and sliding out from the end edge when the component disappears.
* This means sliding in from the left edge and sliding out from the right edge for
* left-to-right scripts, and sliding in from the right edge and sliding out from
* the left edge for right-to-left scripts. This is equivalent to
* TransitionEffect.asymmetric(TransitionEffect.move(TransitionEdge.START),
* TransitionEffect.move(TransitionEdge.END)).
*
* @type { TransitionEffect<
* "asymmetric",
* {appear: TransitionEffect<"move", TransitionEdge>;
* disappear: TransitionEffect<"move", TransitionEdge>;
* }> }
* @readonly
* @static
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 11
*/
static readonly SLIDE: TransitionEffect<
"asymmetric",
{
appear: TransitionEffect<"move", TransitionEdge>;
disappear: TransitionEffect<"move", TransitionEdge>;
}
>;
/**
* Applies a transition effect of sliding in from the right with first scaling down and then scaling up
* when the component appears and sliding out from the right
* with first scaling down and then scaling up when the component disappears.
* This transition effect comes with its own animation parameters, which can also be overridden.
* The default animation duration is 600 milliseconds,
* with a specified animation curve of cubicBezierCurve(0.24, 0.0, 0.50, 1.0) and a minimum scale factor of 0.8.
*
* @type { TransitionEffect<"slideSwitch"> }
* @readonly
* @static
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* Applies a transition effect of sliding in from the right with first scaling down and then scaling up
* when the component appears and sliding out from the right
* with first scaling down and then scaling up when the component disappears.
* This transition effect comes with its own animation parameters, which can also be overridden.
* The default animation duration is 600 milliseconds,
* with a specified animation curve of cubicBezierCurve(0.24, 0.0, 0.50, 1.0) and a minimum scale factor of 0.8.
*
* @type { TransitionEffect<"slideSwitch"> }
* @readonly
* @static
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 11
*/
static readonly SLIDE_SWITCH: TransitionEffect<"slideSwitch">;
/**
* Translation of the component during transition, which is the value of the start point
* of insertion and the end point of deletion.
*
* @param { TranslateOptions } options - translate options.
* -**x**: distance to translate along the x-axis. Unit is vp.
* -**y**: distance to translate along the y-axis. Unit is vp.
* -**z**: distance to translate along the z-axis. Unit is vp.
* @returns { TransitionEffect<"translate"> }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* Translation of the component during transition, which is the value of the start point
* of insertion and the end point of deletion.
*
* @param { TranslateOptions } options - translate options.
* -**x**: distance to translate along the x-axis. Unit is vp.
* -**y**: distance to translate along the y-axis. Unit is vp.
* -**z**: distance to translate along the z-axis. Unit is vp.
* @returns { TransitionEffect<"translate"> }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 11
*/
static translate(options: TranslateOptions): TransitionEffect<"translate">;
/**
* Rotation of the component during transition, which is the value of the start
* point of insertion and the end point of deletion.
* - **x**: X-component of the rotation vector.
* - **y**: Y-component of the rotation vector.
* - **z**: Z-component of the rotation vector.
* - **centerX** and **centerY**: rotation center point. The default values
* are both **"50%"**, indicating the center point of the page.
* - If the center point is (0, 0), it refers to the upper left corner of the component.
* - **centerZ**: z-axis anchor point, that is, the z-component of the 3D rotation
* center point. The default value is **0**.
* - **perspective**: viewing distance. It is not supported for use in transition animations.
* **Widget capability**: This API can be used in ArkTS widgets since API version 10.
*
* @param { RotateOptions } options - Rotate options.
* @returns { TransitionEffect<"rotate"> }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* Rotation of the component during transition, which is the value of the start
* point of insertion and the end point of deletion.
* - **x**: X-component of the rotation vector.
* - **y**: Y-component of the rotation vector.
* - **z**: Z-component of the rotation vector.
* - **centerX** and **centerY**: rotation center point. The default values
* are both **"50%"**, indicating the center point of the page.
* - If the center point is (0, 0), it refers to the upper left corner of the component.
* - **centerZ**: z-axis anchor point, that is, the z-component of the 3D rotation
* center point. The default value is **0**.
* - **perspective**: viewing distance. It is not supported for use in transition animations.
* **Widget capability**: This API can be used in ArkTS widgets since API version 10.
*
* @param { RotateOptions } options - Rotate options.
* @returns { TransitionEffect<"rotate"> }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 11
*/
static rotate(options: RotateOptions): TransitionEffect<"rotate">;
/**
* Scaling of the component during transition, which is the value of the start point of insertion and
* the end point of deletion.
*
* @param { ScaleOptions } options - scale options
* @returns { TransitionEffect<"scale"> }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* Scaling of the component during transition, which is the value of the start point of insertion and
* the end point of deletion.
*
* @param { ScaleOptions } options - scale options
* @returns { TransitionEffect<"scale"> }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 11
*/
static scale(options: ScaleOptions): TransitionEffect<"scale">;
/**
* Creates an opacity transition effect with alpha value
*
* @param { number } alpha - opacity alpha value, value range [0, 1].
* @returns { TransitionEffect<"opacity"> }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* Creates an opacity transition effect with alpha value
*
* @param { number } alpha - opacity alpha value, value range [0, 1].
* @returns { TransitionEffect<"opacity"> }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 11
*/
/**
* Creates an opacity transition effect with alpha value
*
* @param { number } alpha - opacity alpha value, value range [0, 1].
* Illegal values less than 0 are treated as 0, and illegal values greater than 1 are treated as 1.
* @returns { TransitionEffect<"opacity"> }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 12
*/
static opacity(alpha: number): TransitionEffect<"opacity">;
/**
* Slide-in and slide-out of the component from the screen edge during transition.
* It is essentially a translation effect, which is the value of the start point of insertion
* and the end point of deletion.
*
* @param { TransitionEdge } edge - the edge that component will move to
* @returns { TransitionEffect<"move"> }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* Slide-in and slide-out of the component from the screen edge during transition.
* It is essentially a translation effect, which is the value of the start point of insertion
* and the end point of deletion.
*
* @param { TransitionEdge } edge - the edge that component will move to
* @returns { TransitionEffect<"move"> }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 11
*/
static move(edge: TransitionEdge): TransitionEffect<"move">;
/**
* Creates an asymmetric transition effect
*
* @param { TransitionEffect } appear - the transition which will be attached when the component is appear
* @param { TransitionEffect } disappear - the transition which will be attached when the component is disappear
* @returns { TransitionEffect<"asymmetric"> }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* Creates an asymmetric transition effect
*
* @param { TransitionEffect } appear - the transition which will be attached when the component is appear
* @param { TransitionEffect } disappear - the transition which will be attached when the component is disappear
* @returns { TransitionEffect<"asymmetric"> }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 11
*/
static asymmetric(
appear: TransitionEffect,
disappear: TransitionEffect
): TransitionEffect<"asymmetric">;
/**
* TransitionEffect constructor
*
* @param { Type } type - transition type
* @param { Effect } effect - transition options
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* TransitionEffect constructor
*
* @param { Type } type - transition type
* @param { Effect } effect - transition options
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 11
*/
constructor(type: Type, effect: Effect);
/**
* Set the animation of current transition effect
*
* @param { AnimateParam } value - animation parameters
* @returns { TransitionEffect }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* Set the animation of current transition effect
*
* @param { AnimateParam } value - animation parameters
* @returns { TransitionEffect }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 11
*/
animation(value: AnimateParam): TransitionEffect;
/**
* Combination of transition effects.
*
* @param { TransitionEffect } transitionEffect - transition effect which is be combined
* @returns { TransitionEffect } combined transition effect
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* Combination of transition effects.
*
* @param { TransitionEffect } transitionEffect - transition effect which is be combined
* @returns { TransitionEffect } combined transition effect
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 11
*/
combine(transitionEffect: TransitionEffect): TransitionEffect;
}
/**
* Defines the transition effect
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 20
* @arkts 1.2
*/
declare class TransitionEffect {
/**
* Disables the transition effect
*
* @type { TransitionEffect }
* @readonly
* @static
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 20
* @arkts 1.2
*/
static readonly IDENTITY: TransitionEffect;
/**
* Specifies a transition effect with transparency of 0, which is equivalent to TransitionEffect.opacity(0).
*
* @type { TransitionEffect }
* @readonly
* @static
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 20
* @arkts 1.2
*/
static readonly OPACITY: TransitionEffect;
/**
* Defines a slide transition effect
*
* @type { TransitionEffect }
* @readonly
* @static
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 20
* @arkts 1.2
*/
static readonly SLIDE: TransitionEffect;
/**
* Specify a transition effect where the element enters by shrinking first and then expanding as it slides in from the right,
* and exits by shrinking first and then expanding as it slides out to the left, with a minimum scale ratio of 0.8.
* It comes with default animation parameters, which can also be overridden.
* The default animation duration is set to 600ms, and the specified animation curve is cubicBezierCurve(0.24, 0.0, 0.50, 1.0).
*
* @type { TransitionEffect }
* @readonly
* @static
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 20
* @arkts 1.2
*/
static readonly SLIDE_SWITCH: TransitionEffect;
/**
* Creates a translate transition effect
*
* @param { TranslateOptions } options - translate options
* @returns { TransitionEffect }
* @static
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 20
* @arkts 1.2
*/
static translate(options: TranslateOptions): TransitionEffect;
/**
* Creates a rotation transition effect
*
* @param { RotateOptions } options - rotate options
* Set the rotation effect for component transitions when inserting and deleting.
* The value represents the starting rotation point for the inserting animation and the ending rotation point for the deleting animation.
* -x: Horizontal component of the rotational vector.
* -y: Vertical component of the rotational vector.
* -z: Vertical component of the rotational vector.
* -centerX, centerY specify the rotation center point, with default values of "50%",
* meaning that the default rotation center point is the center point of the component.
* -The center point of (0, 0) represents the upper-left corner of the component.
* -centerZ refers to the Z-axis anchor point. The default value of centerZ is 0.
* -perspective indicates the visual distance. The perspective property does not support transition animation.
* @returns { TransitionEffect }
* @static
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 20
* @arkts 1.2
*/
static rotate(options: RotateOptions): TransitionEffect;
/**
* Creates a scale transition effect
*
* @param { ScaleOptions } options - scale options
* @returns { TransitionEffect }
* @static
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 20
* @arkts 1.2
*/
static scale(options: ScaleOptions): TransitionEffect;
/**
* Creates an opacity transition effect with alpha value
*
* @param { number } alpha - opacity alpha value, value range [0, 1].
* Illegal values less than 0 are treated as 0, and illegal values greater than 1 are treated as 1.
* @returns { TransitionEffect }
* @static
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 20
* @arkts 1.2
*/
static opacity(alpha: number): TransitionEffect;
/**
* Creates a move transition effect
*
* @param { TransitionEdge } edge - the edge that component will move to
* @returns { TransitionEffect }
* @static
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 20
* @arkts 1.2
*/
static move(edge: TransitionEdge): TransitionEffect;
/**
* Creates an asymmetric transition effect
*
* @param { TransitionEffect } appear - the transition which will be attached when the component is appear
* @param { TransitionEffect } disappear - the transition which will be attached when the component is disappear
* @returns { TransitionEffect }
* @static
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 20
* @arkts 1.2
*/
static asymmetric(appear: TransitionEffect, disappear: TransitionEffect): TransitionEffect;
/**
* identity or slideSwitch TransitionEffect constructor
*
* @param { 'identity' | 'slideSwitch' } type - transition type
* @param { undefined } effect - transition options
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 20
* @arkts 1.2
*/
constructor(type: 'identity' | 'slideSwitch', effect: undefined);
/**
* opacity TransitionEffect constructor
*
* @param { 'opacity' } type - transition type
* @param { number } effect - transition options
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 20
* @arkts 1.2
*/
constructor(type: 'opacity', effect: number);
/**
* move TransitionEffect constructor
*
* @param { 'move' } type - transition type
* @param { TransitionEdge } effect - transition options
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 20
* @arkts 1.2
*/
constructor(type: 'move', effect: TransitionEdge);
/**
* translate TransitionEffect constructor
*
* @param { 'translate' } type - transition type
* @param { TranslateOptions } effect - transition options
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 20
* @arkts 1.2
*/
constructor(type: 'translate', effect:TranslateOptions);
/**
* rotate TransitionEffect constructor
*
* @param { 'rotate' } type - transition type
* @param { RotateOptions } effect - transition options
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 20
* @arkts 1.2
*/
constructor(type: 'rotate', effect: RotateOptions);
/**
* scale TransitionEffect constructor
*
* @param { 'scale' } type - transition type
* @param { ScaleOptions } effect - transition options
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 20
* @arkts 1.2
*/
constructor(type: 'scale', effect: ScaleOptions);
/**
* asymmetric TransitionEffect constructor
*
* @param { 'asymmetric' } type - transition type
* @param { AsymmetricTransitionOption } effect - transition options
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 20
* @arkts 1.2
*/
constructor(type: 'asymmetric', effect: AsymmetricTransitionOption);
/**
* Set the animation of current transition effect
*
* @param { AnimateParam } value - animation parameters
* @returns { TransitionEffect }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 20
* @arkts 1.2
*/
animation(value: AnimateParam): TransitionEffect;
/**
* Combines another transition effect
*
* @param { TransitionEffect } transitionEffect - transition effect which is be combined
* @returns { TransitionEffect } combined transition effect
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 20
* @arkts 1.2
*/
combine(transitionEffect: TransitionEffect): TransitionEffect;
}
/**
* Define Preview property
*
* @interface PreviewParams
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* Define Preview property
*
* @interface PreviewParams
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 11
*/
interface PreviewParams {
/**
* Define Preview title
*
* @type { ?string }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* Define Preview title
*
* @type { ?string }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 11
*/
title?: string;
/**
* Define Preview width
*
* @type { ?number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* Define Preview width
*
* @type { ?number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 11
*/
width?: number;
/**
* Define Preview height
*
* @type { ?number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* Define Preview height
*
* @type { ?number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 11
*/
height?: number;
/**
* Define Preview locale
*
* @type { ?string }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* Define Preview locale
*
* @type { ?string }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @atomicservice
* @since 11
*/
locale?: string;
/**
* Define Preview colorMode
*
* @type { ?string }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* Define Preview colorMode
*
* @type { ?string }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 11
*/
colorMode?: string;
/**
* Define Preview deviceType
*
* @type { ?string }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* Define Preview deviceType
*
* @type { ?string }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @atomicservice
* @since 11
*/
deviceType?: string;
/**
* Define Preview dpi
*
* @type { ?number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* Define Preview dpi
*
* @type { ?number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @atomicservice
* @since 11
*/
dpi?: number;
/**
* Define Preview orientation
*
* @type { ?string }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* Define Preview orientation
*
* @type { ?string }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @atomicservice
* @since 11
*/
orientation?: string;
/**
* Define Preview roundScreen
*
* @type { ?boolean }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* Define Preview roundScreen
*
* @type { ?boolean }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @atomicservice
* @since 11
*/
roundScreen?: boolean;
}
/**
* ItemDragInfo object description
*
* @interface ItemDragInfo
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 8
*/
/**
* ItemDragInfo object description
*
* @interface ItemDragInfo
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* ItemDragInfo object description
*
* @interface ItemDragInfo
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
declare interface ItemDragInfo {
/**
* Obtains the X coordinate of the drag window, in vp.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 8
*/
/**
* Obtains the X coordinate of the drag window, in vp.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Obtains the X coordinate of the drag window, in vp.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
x: number;
/**
* Obtains the Y coordinate of the drag window, in vp.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 8
*/
/**
* Obtains the Y coordinate of the drag window, in vp.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Obtains the Y coordinate of the drag window, in vp.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
y: number;
}
/**
* Enum of using the effects template mode.
*
* @enum { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since arkts {'1.1':'14','1.2':'20'}
* @arkts 1.1&1.2
*/
declare enum EffectType {
/**
* Define use the effects template defined by the parent effectComponent.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since arkts {'1.1':'14','1.2':'20'}
* @arkts 1.1&1.2
*/
DEFAULT = 0,
/**
* Define use the effects template defined by the window.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since arkts {'1.1':'14','1.2':'20'}
* @arkts 1.1&1.2
*/
WINDOW_EFFECT = 1,
}
/**
* Defines the drag status before drag action.
*
* @enum { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
declare enum PreDragStatus {
/**
* Define the status for user prepare to start long press gesture.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
ACTION_DETECTING_STATUS = 0,
/**
* Define the status for user can start drag action.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
READY_TO_TRIGGER_DRAG_ACTION = 1,
/**
* Define the status for dragItem lift animation started.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
PREVIEW_LIFT_STARTED = 2,
/**
* Define the status for dragItem lift animation finished.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
PREVIEW_LIFT_FINISHED = 3,
/**
* Define the status for dragItem landing animation started.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
PREVIEW_LANDING_STARTED = 4,
/**
* Define the status for dragItem landing animation finished.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
PREVIEW_LANDING_FINISHED = 5,
/**
* Define the status for user cancel drag action.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
ACTION_CANCELED_BEFORE_DRAG = 6,
/**
* Define the status for user to sense the availability of drag in advance.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
PREPARING_FOR_DRAG_DETECTION = 7,
}
/**
* DragItemInfo object description
*
* @interface DragItemInfo
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 8
*/
/**
* DragItemInfo object description
*
* @interface DragItemInfo
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since 11
*/
/**
* DragItemInfo object description
*
* @interface DragItemInfo
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'14','1.2':'20'}
* @arkts 1.1&1.2
*/
declare interface DragItemInfo {
/**
* Uses the pixelMap object for drawing.
*
* @type { ?PixelMap }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 8
*/
/**
* Uses the pixelMap object for drawing.
*
* @type { ?PixelMap }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since 11
*/
/**
* Uses the pixelMap object for drawing.
*
* @type { ?PixelMap }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts{'1.1':'14','1.2':'20'}
* @arkts 1.1&1.2
*/
pixelMap?: PixelMap;
/**
* Uses the custom builder for drawing, if pixelMap is set, this value is ignored.
*
* @type { ?CustomBuilder }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 8
*/
/**
* Uses the custom builder for drawing, if pixelMap is set, this value is ignored.
*
* @type { ?CustomBuilder }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since 11
*/
/**
* Uses the custom builder for drawing, if pixelMap is set, this value is ignored.
*
* @type { ?CustomBuilder }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'14','1.2':'20'}
* @arkts 1.1&1.2
*/
builder?: CustomBuilder;
/**
* Sets the extra info for drag event.
*
* @type { ?string }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 8
*/
/**
* Sets the extra info for drag event.
*
* @type { ?string }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since 11
*/
/**
* Sets the extra info for drag event.
*
* @type { ?string }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'14','1.2':'20'}
* @arkts 1.1&1.2
*/
extraInfo?: string;
}
/**
* Defining animation function.
*
* @param { AnimateParam } value
* @param { function } event
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* Defining animation function.
*
* @param { AnimateParam } value
* @param { function } event
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* Defining animation function.
*
* @param { AnimateParam } value
* @param { function } event
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* Defining animation function.
*
* @param { AnimateParam } value
* @param { function } event
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
* @deprecated since 18
* @useinstead ohos.arkui.UIContext.UIContext#animateTo
*/
declare function animateTo(value: AnimateParam, event: () => void): void;
/**
* Implements immediate delivery of an explicit animation through a **UIContext** object.
* When multiple property animations are loaded at once, you can call this API to immediately
* execute the transition animation for state changes caused by the specified closure function.
*
* @param { AnimateParam } value - Set animation effect parameters.
* @param { function } event - Specify the closure function that displays dynamic effects,
* and the system will automatically insert transition animations for state changes caused by the closure function.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
declare function animateToImmediately(value: AnimateParam, event: () => void): void;
/**
* Converts a value in vp units to a value in px.
* By default, the virtual pixel ratio of the screen where the current UI instance is located is used for conversion.
* If no UI instance is available, the virtual pixel ratio of the default screen is used instead.
*
* @param { number } value
* Value range of value: (-∞, +∞).
* @returns { number }
* Value range of the return value: (-∞, +∞).
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* Converts a value in vp units to a value in px.
* By default, the virtual pixel ratio of the screen where the current UI instance is located is used for conversion.
* If no UI instance is available, the virtual pixel ratio of the default screen is used instead.
*
* @param { number } value
* Value range of value: (-∞, +∞).
* @returns { number }
* Value range of the return value: (-∞, +∞).
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* Converts a value in vp units to a value in px.
* By default, the virtual pixel ratio of the screen where the current UI instance is located is used for conversion.
* If no UI instance is available, the virtual pixel ratio of the default screen is used instead.
*
* @param { number } value
* Value range of value: (-∞, +∞).
* @returns { number }
* Value range of the return value: (-∞, +∞).
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* Converts a value in vp units to a value in px.
* By default, the virtual pixel ratio of the screen where the current UI instance is located is used for conversion.
* If no UI instance is available, the virtual pixel ratio of the default screen is used instead.
*
* @param { number } value
* Value range of value: (-∞, +∞).
* @returns { number }
* Value range of the return value: (-∞, +∞).
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
* @deprecated since 18
* @useinstead ohos.arkui.UIContext.UIContext#vp2px
*/
declare function vp2px(value: number): number;
/**
* Converts a number in units of px to a number in units of vp.
* By default, the virtual pixel ratio of the screen where the current UI instance is located is used for conversion.
* If no UI instance is available, the virtual pixel ratio of the default screen is used instead.
*
* @param { number } value
* Value range of value: (-∞, +∞).
* @returns { number }
* Value range of the return value: (-∞, +∞).
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* Converts a number in units of px to a number in units of vp.
* By default, the virtual pixel ratio of the screen where the current UI instance is located is used for conversion.
* If no UI instance is available, the virtual pixel ratio of the default screen is used instead.
*
* @param { number } value
* Value range of value: (-∞, +∞).
* @returns { number }
* Value range of the return value: (-∞, +∞).
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* Converts a number in units of px to a number in units of vp.
* By default, the virtual pixel ratio of the screen where the current UI instance is located is used for conversion.
* If no UI instance is available, the virtual pixel ratio of the default screen is used instead.
*
* @param { number } value
* Value range of value: (-∞, +∞).
* @returns { number }
* Value range of the return value: (-∞, +∞).
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* Converts a number in units of px to a number in units of vp.
* By default, the virtual pixel ratio of the screen where the current UI instance is located is used for conversion.
* If no UI instance is available, the virtual pixel ratio of the default screen is used instead.
*
* @param { number } value
* Value range of value: (-∞, +∞).
* @returns { number }
* Value range of the return value: (-∞, +∞).
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
* @deprecated since 18
* @useinstead ohos.arkui.UIContext.UIContext#px2vp
*/
declare function px2vp(value: number): number;
/**
* Converts a number in fp units to a number in px.
*
* @param { number } value
* Value range of value: (-∞, +∞).
* @returns { number }
* Value range of the return value: (-∞, +∞).
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* Converts a number in fp units to a number in px.
*
* @param { number } value
* Value range of value: (-∞, +∞).
* @returns { number }
* Value range of the return value: (-∞, +∞).
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* Converts a number in fp units to a number in px.
*
* @param { number } value
* Value range of value: (-∞, +∞).
* @returns { number }
* Value range of the return value: (-∞, +∞).
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* Converts a number in fp units to a number in px.
*
* @param { number } value
* Value range of value: (-∞, +∞).
* @returns { number }
* Value range of the return value: (-∞, +∞).
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 11
* @deprecated since 18
* @useinstead ohos.arkui.UIContext.UIContext#fp2px
*/
declare function fp2px(value: number): number;
/**
* Converts a number in units of px to a number in units of fp.
*
* @param { number } value
* Value range of value: (-∞, +∞).
* @returns { number }
* Value range of the return value: (-∞, +∞).
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* Converts a number in units of px to a number in units of fp.
*
* @param { number } value
* Value range of value: (-∞, +∞).
* @returns { number }
* Value range of the return value: (-∞, +∞).
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* Converts a number in units of px to a number in units of fp.
*
* @param { number } value
* Value range of value: (-∞, +∞).
* @returns { number }
* Value range of the return value: (-∞, +∞).
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* Converts a number in units of px to a number in units of fp.
*
* @param { number } value
* Value range of value: (-∞, +∞).
* @returns { number }
* Value range of the return value: (-∞, +∞).
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 11
* @deprecated since 18
* @useinstead ohos.arkui.UIContext.UIContext#px2fp
*/
declare function px2fp(value: number): number;
/**
* Converts a number in units of lpx to a number in units of px.
*
* @param { number } value
* Value range of value: (-∞, +∞).
* @returns { number }
* Value range of the return value: (-∞, +∞).
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* Converts a number in units of lpx to a number in units of px.
*
* @param { number } value
* Value range of value: (-∞, +∞).
* @returns { number }
* Value range of the return value: (-∞, +∞).
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* Converts a number in units of lpx to a number in units of px.
*
* @param { number } value
* Value range of value: (-∞, +∞).
* @returns { number }
* Value range of the return value: (-∞, +∞).
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* Converts a number in units of lpx to a number in units of px.
*
* @param { number } value
* Value range of value: (-∞, +∞).
* @returns { number }
* Value range of the return value: (-∞, +∞).
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 11
* @deprecated since 18
* @useinstead ohos.arkui.UIContext.UIContext#lpx2px
*/
declare function lpx2px(value: number): number;
/**
* Converts a number in units of px to a number in units of lpx.
*
* @param { number } value
* Value range of value: (-∞, +∞).
* @returns { number }
* Value range of the return value: (-∞, +∞).
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* Converts a number in units of px to a number in units of lpx.
*
* @param { number } value
* Value range of value: (-∞, +∞).
* @returns { number }
* Value range of the return value: (-∞, +∞).
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* Converts a number in units of px to a number in units of lpx.
*
* @param { number } value
* Value range of value: (-∞, +∞).
* @returns { number }
* Value range of the return value: (-∞, +∞).
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* Converts a number in units of px to a number in units of lpx.
*
* @param { number } value
* Value range of value: (-∞, +∞).
* @returns { number }
* Value range of the return value: (-∞, +∞).
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 11
* @deprecated since 18
* @useinstead ohos.arkui.UIContext.UIContext#px2lpx
*/
declare function px2lpx(value: number): number;
/**
* Defines the namespace of focus controller.
*
* @namespace focusControl
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 9
*/
/**
* Defines the namespace of focus controller.
*
* @namespace focusControl
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
declare namespace focusControl {
/**
* Request focus to the specific component by param: 'id/key'.
*
* @param { string } value
* @returns { boolean }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 9
*/
/**
* Request focus to the specific component by param: 'id/key'.
*
* @param { string } value
* @returns { boolean }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Request focus to the specific component by param: 'id/key'.
*
* @param { string } value
* @returns { boolean }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
function requestFocus(value: string): boolean;
}
/**
* Import the PointerStyle type object for setCursor.
*
* @typedef { import('../api/@ohos.multimodalInput.pointer').default.PointerStyle } PointerStyle
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 11
*/
/**
* Import the PointerStyle type object for setCursor.
*
* @typedef { import('../api/@ohos.multimodalInput.pointer').default.PointerStyle } PointerStyle
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since 12
*/
declare type PointerStyle = import('../api/@ohos.multimodalInput.pointer').default.PointerStyle;
/**
* Import the PointerStyle type object for setCursor.
*
* @typedef { pointer.PointerStyle } PointerStyle
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since 20
* @arkts 1.2
*/
declare type PointerStyle = pointer.PointerStyle;
/**
* CursorControl
*
* @namespace cursorControl
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 11
*/
/**
* CursorControl
*
* @namespace cursorControl
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
declare namespace cursorControl {
/**
* Change the mouse cursor style by param: 'PointerStyle'.
*
* @param { PointerStyle } value
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
/**
* Change the mouse cursor style by param: 'PointerStyle'.
*
* @param { PointerStyle } value - Cursor style.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
function setCursor(value: PointerStyle): void;
/**
* Restore the default mouse cursor style.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
/**
* Restore the default mouse cursor style.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
function restoreDefault(): void;
}
/**
* Defines the event target.
*
* @interface EventTarget
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 8
*/
/**
* Defines the event target.
*
* @interface EventTarget
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* Defines the event target.
*
* @interface EventTarget
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* Defines the event target.
*
* @interface EventTarget
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
declare interface EventTarget {
/**
* Area of current target.
*
* @type { Area }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 8
*/
/**
* Area of current target.
*
* @type { Area }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* Area of current target.
*
* @type { Area }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* Area information of the target element.
*
* @type { Area }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
area: Area;
/**
* Node id of current target.
*
* @type { ?string }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'15','1.2':'20'}
* @arkts 1.1&1.2
*/
id?: string;
}
/**
* Defines the event source type.
*
* @enum { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 8
*/
/**
* Defines the event source type.
*
* @enum { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Defines the event source type.
*
* @enum { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
declare enum SourceType {
/**
* Unknown type.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 8
*/
/**
* Unknown type.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Unknown device type.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
Unknown,
/**
* The mouse type.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 8
*/
/**
* The mouse type.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* The mouse type.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
Mouse,
/**
* The touch screen type.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 8
*/
/**
* The touch screen type.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* The touch screen type.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
TouchScreen,
}
/**
* Defines the event tool type.
*
* @enum { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 9
*/
/**
* Defines the event tool type.
*
* @enum { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Defines the event tool type.
*
* @enum { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
declare enum SourceTool {
/**
* Unknown type.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 9
*/
/**
* Unknown type.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Unknown input source.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
Unknown,
/**
* The finger type.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 9
*/
/**
* The finger type.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* The finger type.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
Finger,
/**
* The pen type.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 9
*/
/**
* The pen type.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* The pen type.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
Pen,
/**
* The mouse type.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
MOUSE,
/**
* The touchpad type.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
TOUCHPAD,
/**
* The joystick type.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
JOYSTICK,
}
/**
* Defines the Border Image Repeat Mode.
*
* @enum { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* Defines the Border Image Repeat Mode.
*
* @enum { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* Defines the Border Image Repeat Mode.
*
* @enum { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
declare enum RepeatMode {
/**
* Repeat mode.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* Repeat mode.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* The source image's slices are tiled. Tiles beyond the border box will be clipped.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
Repeat,
/**
* Stretch mode.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* Stretch mode.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* The source image's slices are stretched to fill the border box.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
Stretch,
/**
* Round mode.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* Round mode.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* The source image's slices are tiled to fill the border box. Tiles may be compressed when needed.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
Round,
/**
* Space mode.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* Space mode.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* The source image's slices are tiled to fill the border box. Extra space will be distributed in between tiles.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
Space,
}
/**
* enum Blur style
*
* @enum { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* enum Blur style
*
* @enum { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* enum Blur style
*
* @enum { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
declare enum BlurStyle {
/**
* Thin material.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* Thin material.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* Thin material.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
Thin,
/**
* Regular material.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* Regular material.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* Regular material.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
Regular,
/**
* Thick material.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* Thick material.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* Thick material.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
Thick,
/**
* Material that creates the minimum depth of field effect.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Material that creates the minimum depth of field effect.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
BACKGROUND_THIN,
/**
* Material that creates a medium shallow depth of field effect.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Material that creates a medium shallow depth of field effect.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
BACKGROUND_REGULAR,
/**
* Material that creates a high shallow depth of field effect.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Material that creates a high shallow depth of field effect.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
BACKGROUND_THICK,
/**
* Material that creates the maximum depth of field effect.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Material that creates the maximum depth of field effect.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
BACKGROUND_ULTRA_THICK,
/**
* No blur.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* No blur.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
NONE,
/**
* Component ultra-thin material.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 11
*/
/**
* Component ultra-thin material.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
COMPONENT_ULTRA_THIN = 8,
/**
* Defines the thin component material.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 11
*/
/**
* Component thin material.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
COMPONENT_THIN = 9,
/**
* Defines the regular component material.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 11
*/
/**
* Component regular material.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
COMPONENT_REGULAR = 10,
/**
* Defines the thick component material.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 11
*/
/**
* Defines the thick component material.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
COMPONENT_THICK = 11,
/**
* Defines the ultra thick component material.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 11
*/
/**
* Defines the ultra thick component material.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
COMPONENT_ULTRA_THICK = 12,
}
/**
* Enumerates the policies for activating the blur style.
*
* @enum { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'14','1.2':'20'}
* @arkts 1.1&1.2
*/
declare enum BlurStyleActivePolicy {
/**
* The component has the blur effect only when the window is focused.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'14','1.2':'20'}
* @arkts 1.1&1.2
*/
FOLLOWS_WINDOW_ACTIVE_STATE = 0,
/**
* The component always has the blur effect, regardless of whether the window is focused.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'14','1.2':'20'}
* @arkts 1.1&1.2
*/
ALWAYS_ACTIVE = 1,
/**
* The component does not have the blur effect, regardless of whether the window is focused.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'14','1.2':'20'}
* @arkts 1.1&1.2
*/
ALWAYS_INACTIVE = 2,
}
/**
* enum color mode
*
* @enum { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* enum color mode
*
* @enum { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
declare enum ThemeColorMode {
/**
* Defines the mode which is follow up with system.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Defines the mode which is follow up with system.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
SYSTEM,
/**
* Defines the light mode.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Defines the light mode.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
LIGHT,
/**
* Defines the dark mode.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Defines the dark mode.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
DARK,
}
/**
* Defines adaptive color
*
* @enum { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Defines adaptive color
*
* @enum { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
declare enum AdaptiveColor {
/**
* Adaptive color mode is not used.
* The default color is used as the mask color. Using a mode other than **DEFAULT** can be more time-consuming.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Adaptive color mode is not used.
* The default color is used as the mask color. Using a mode other than **DEFAULT** can be more time-consuming.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
DEFAULT,
/**
* Adaptive color mode is used. The average color value of the color picking area is used as the mask color.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Adaptive color mode is used. The average color value of the color picking area is used as the mask color.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
AVERAGE,
}
/**
* Defines modal transition type.
*
* @enum { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Defines modal transition type.
*
* @enum { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
declare enum ModalTransition {
/**
* Use default animation.
* Upward animation when entering and downward animation when exiting.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Use default animation.
* Upward animation when entering and downward animation when exiting.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
DEFAULT,
/**
* No transition animation for the modal.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* No transition animation for the modal.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
NONE,
/**
* Use alpha animation.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Use alpha animation.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
ALPHA,
}
/**
* Defines the options of backgroundBlurStyle
*
* @extends BlurStyleOption
* @interface BackgroundBlurStyleOptions
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Defines the options of backgroundBlurStyle
*
* @extends BlurStyleOption
* @interface BackgroundBlurStyleOptions
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
declare interface BackgroundBlurStyleOptions extends BlurStyleOptions {
/**
* Defines the policy for activating the blur style.
*
* @type { ?BlurStyleActivePolicy }
* @default BlurStyleActivePolicy.ALWAYS_ACTIVE
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'14','1.2':'20'}
* @arkts 1.1&1.2
*/
policy?: BlurStyleActivePolicy;
/**
* Color of the background effect when the window is not focused.
*
* @type { ?ResourceColor }
* @default Color.Transparent
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'14','1.2':'20'}
* @arkts 1.1&1.2
*/
inactiveColor?: ResourceColor;
}
/**
* Defines the options of ForegroundBlurStyle
*
* @extends BlurStyleOptions
* @interface ForegroundBlurStyleOptions
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Defines the options of ForegroundBlurStyle
*
* @extends BlurStyleOptions
* @interface ForegroundBlurStyleOptions
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
declare interface ForegroundBlurStyleOptions extends BlurStyleOptions {}
/**
* Defines the options of blur
*
* @interface BlurOptions
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
/**
* Defines the options of blur
*
* @interface BlurOptions
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
declare interface BlurOptions {
/**
* Fuzzy gray scale parameter.
* @type { [number, number] }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
/**
* Fuzzy gray scale parameter.
* @type { [number, number] }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
grayscale: [number, number];
}
/**
* Defines the SystemAdaptiveOptions interface
*
* @interface SystemAdaptiveOptions
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'19','1.2':'20'}
* @arkts 1.1&1.2
*/
declare interface SystemAdaptiveOptions {
/**
* Whether to disable system adaptive.
*
* @type { ?boolean }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'19','1.2':'20'}
* @arkts 1.1&1.2
*/
disableSystemAdaptation?: boolean;
}
/**
* Defines the options of blurStyle
*
* @interface BlurStyleOptions
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Defines the options of blurStyle
*
* @interface BlurStyleOptions
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
declare interface BlurStyleOptions {
/**
* Color mode used for the foreground blur.
* Default value: **ThemeColorMode.SYSTEM**.
*
* @type { ?ThemeColorMode }
* @default ThemeColorMode.SYSTEM
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 10
*/
/**
* Color mode used for the foreground blur.
* Default value: **ThemeColorMode.SYSTEM**.
*
* @type { ?ThemeColorMode }
* @default ThemeColorMode.SYSTEM
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
colorMode?: ThemeColorMode;
/**
* Adaptive color mode.
* Default value: **AdaptiveColor.DEFAULT**.
*
* @type { ?AdaptiveColor }
* @default AdaptiveColor.DEFAULT
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 10
*/
/**
* Adaptive color mode.
* Default value: **AdaptiveColor.DEFAULT**.
*
* @type { ?AdaptiveColor }
* @default AdaptiveColor.DEFAULT
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
adaptiveColor?: AdaptiveColor;
/**
* Foreground blur scale.
* Default value: **1.0**.
* Value range: [0.0, 1.0].
*
* @type { ?number }
* @default 1.0
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
scale?: number;
/**
* Defines the options of blur
*
* @type { ?BlurOptions }
* @default { grayScale: [0,0] }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
/**
* Defines the options of blur
*
* @type { ?BlurOptions }
* @default { grayScale: [0,0] }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
blurOptions?: BlurOptions;
}
/**
* Defines the options of BackgroundEffect
*
* @interface BackgroundEffectOptions
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
/**
* Defines the options of BackgroundEffect
*
* @interface BackgroundEffectOptions
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
declare interface BackgroundEffectOptions {
/**
* Blur radius.
* Value range: [0, +∞).
* Default value: **0**.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
/**
* Blur radius.
* Value range: [0, +∞).
* Default value: **0**.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
radius: number;
/**
* Saturation.
* Value range: [0, +∞).
* Recommended value range: [0, 50].
*
* @type { ?number }
* @default 1
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
/**
* Saturation.
* Value range: [0, +∞).
* Recommended value range: [0, 50].
*
* @type { ?number }
* @default 1
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
saturation?: number;
/**
* Brightness.
* Value range: [0, +∞).
* Default value: **1** Recommended value range: [0, 2].
*
* @type { ?number }
* @default 1
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
/**
* Brightness.
* Value range: [0, +∞).
* Default value: **1** Recommended value range: [0, 2].
*
* @type { ?number }
* @default 1
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
brightness?: number;
/**
* Color.
*
* @type { ?ResourceColor }
* @default Color.Transparent
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
/**
* Color.
*
* @type { ?ResourceColor }
* @default Color.Transparent
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
color?: ResourceColor;
/**
* Define the adaptiveColor of BackgroundEffect.
*
* @type { ?AdaptiveColor }
* @default AdaptiveColor.DEFAULT
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
/**
* Define the adaptiveColor of BackgroundEffect.
*
* @type { ?AdaptiveColor }
* @default AdaptiveColor.DEFAULT
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
adaptiveColor?: AdaptiveColor;
/**
* Define the blurOptions of BackgroundEffect.
*
* @type { ?BlurOptions }
* @default { grayScale: [0,1] }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
/**
* Define the blurOptions of BackgroundEffect.
*
* @type { ?BlurOptions }
* @default { grayScale: [0,0] }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
blurOptions?: BlurOptions;
/**
* Defines the policy for activating the blur style.
*
* @type { ?BlurStyleActivePolicy }
* @default BlurStyleActivePolicy.ALWAYS_ACTIVE
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'14','1.2':'20'}
* @arkts 1.1&1.2
*/
policy?: BlurStyleActivePolicy;
/**
* Color of the background effect when the window is not focused.
*
* @type { ?ResourceColor }
* @default Color.Transparent
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'14','1.2':'20'}
* @arkts 1.1&1.2
*/
inactiveColor?: ResourceColor;
}
/**
* Defines the options of ForegroundEffect
*
* @interface ForegroundEffectOptions
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
declare interface ForegroundEffectOptions {
/**
* Define the radius size of ForegroundEffect.The range of this value is [0, ∞)
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
radius: number;
}
/**
* Provide an interface for the text style of picker
*
* @interface PickerTextStyle
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Provide an interface for the text style of picker
*
* @interface PickerTextStyle
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
declare interface PickerTextStyle {
/**
* Define the text color of picker.
*
* @type { ?ResourceColor }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Font color.
*
* @type { ?ResourceColor }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
color?: ResourceColor;
/**
* Define the text font of picker.
* Only support size and weight.
*
* @type { ?Font }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Text style.
*
* @type { ?Font }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
font?: Font;
}
/**
* Provide an interface for the button style of picker
*
* @interface PickerDialogButtonStyle
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
declare interface PickerDialogButtonStyle {
/**
* Describes the button style.
*
* @type { ?ButtonType }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
type?: ButtonType;
/**
* Describes the button style.
*
* @type { ?ButtonStyleMode }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
style?: ButtonStyleMode;
/**
* Describes the button role.
*
* @type { ?ButtonRole }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
role?: ButtonRole;
/**
* Describes the button text size.
*
* @type { ?Length }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
fontSize?: Length;
/**
* Describes the button text color.
*
* @type { ?ResourceColor }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
fontColor?: ResourceColor;
/**
* Describes the button font weight.
*
* @type { ?(FontWeight | number | string) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
fontWeight?: FontWeight | number | string;
/**
* Describes the button font style.
*
* @type { ?FontStyle }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
fontStyle?: FontStyle;
/**
* Describes the button font family.
*
* @type { ?(Resource | string) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
fontFamily?: Resource | string;
/**
* Describes the button background color.
*
* @type { ?ResourceColor }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
backgroundColor?: ResourceColor;
/**
* Describes the button border radius.
*
* @type { ?(Length | BorderRadiuses) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
borderRadius?: Length | BorderRadiuses;
/**
* Define whether the button default to responding to the Enter key
*
* @type { ?boolean }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
primary?: boolean;
}
/**
* Define the type of shadow
*
* @enum { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Define the type of shadow
*
* @enum { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
declare enum ShadowType {
/**
* Define a color type of shadow
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Define a color type of shadow
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
COLOR,
/**
* Blur.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Blur.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
BLUR,
}
/**
* Define the options of shadow
*
* @interface ShadowOptions
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* Define the options of shadow
*
* @interface ShadowOptions
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* Define the options of shadow
*
* @interface ShadowOptions
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* Define the options of shadow
*
* @interface ShadowOptions
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
declare interface ShadowOptions {
/**
* Blur radius of the shadow.
*
* @type { number | Resource }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* Blur radius of the shadow.
*
* @type { number | Resource }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* Blur radius of the shadow.
*
* @type { number | Resource }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* Blur radius of the shadow.
*
* @type { number | Resource }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
radius: number | Resource;
/**
* Shadow type.
* Default value: **COLOR**.
*
* @type { ?ShadowType }
* @default ShadowType.COLOR
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Shadow type.
* Default value: **COLOR**.
*
* @type { ?ShadowType }
* @default ShadowType.COLOR
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
type?: ShadowType;
/**
* Color of the shadow. Default value: **Black**
*
* @type { ?(Color | string | Resource) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* Color of the shadow. Default value: **Black**
*
* @type { ?(Color | string | Resource) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* Color of the shadow. Default value: **Black**
*
* @type { ?(Color | string | Resource) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* Color of the shadow. Default value: **Black**
*
* @type { ?(Color | string | Resource| ColoringStrategy) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
color?: Color | string | Resource | ColoringStrategy;
/**
* Offset of the shadow along the x-axis. Unit is px. Default value is 0.
*
* @type { ?(number | Resource) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* Offset of the shadow along the x-axis. Unit is px. Default value is 0.
*
* @type { ?(number | Resource) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* Offset of the shadow along the x-axis. Unit is px. Default value is 0.
*
* @type { ?(number | Resource) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* Offset of the shadow along the x-axis. Unit is px. Default value is 0.
*
* @type { ?(number | Resource) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
offsetX?: number | Resource;
/**
* Offset of the shadow along the y-axis. Unit is px. Default value is 0.
*
* @type { ?(number | Resource) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* Offset of the shadow along the y-axis. Unit is px. Default value is 0.
*
* @type { ?(number | Resource) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* Offset of the shadow along the y-axis. Unit is px. Default value is 0.
*
* @type { ?(number | Resource) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* Offset of the shadow along the y-axis. Unit is px. Default value is 0.
*
* @type { ?(number | Resource) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
offsetY?: number | Resource;
/**
* Whether to fill the inside of the component with shadow. **true**: Fill
* the inside of the component with shadow.
* **false**: Do not fill the inside of the component with shadow.
* The default value is **false**.
* **NOTE** This attribute does not take effect in textShadow.
*
* @type { ?boolean }
* @default false
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
/**
* Whether to fill the inside of the component with shadow. **true**: Fill
* the inside of the component with shadow.
* **false**: Do not fill the inside of the component with shadow.
* The default value is **false**.
* **NOTE** This attribute does not take effect in textShadow.
*
* @type { ?boolean }
* @default false
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
fill?: boolean;
}
/**
* enum Shadow style
*
* @enum { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* enum Shadow style
*
* @enum { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
declare enum ShadowStyle {
/**
* Defines the super small default shadow style.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Defines the super small default shadow style.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
OUTER_DEFAULT_XS,
/**
* Defines the small default shadow style.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Defines the small default shadow style.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
OUTER_DEFAULT_SM,
/**
* Medium shadow.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Medium shadow.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
OUTER_DEFAULT_MD,
/**
* Large shadow.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Large shadow.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
OUTER_DEFAULT_LG,
/**
* Floating medium shadow.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Floating medium shadow.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
OUTER_FLOATING_SM,
/**
* Defines the medium floating shadow style.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Floating medium shadow.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
OUTER_FLOATING_MD,
}
/**
* Defines the options of Shadow.
*
* @interface MultiShadowOptions
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Defines the options of Shadow.
*
* @interface MultiShadowOptions
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
declare interface MultiShadowOptions {
/**
* Shadow blur radius.
* Unit: vp.
*
**NOTE**:
* A value less than or equal to 0 is handled as the default value.
*
**NOTE**:
* A value less than or equal to 0 is handled as the default value.
*
*
* @type { ?(number | Resource) }
* @default 20
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
radius?: number | Resource;
/**
* Offset on the x-axis.
* Unit: vp.
*
* @type { ?(number | Resource) }
* @default 5
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Offset on the x-axis.
* Unit: vp.
*
* @type { ?(number | Resource) }
* @default 5
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
offsetX?: number | Resource;
/**
* Offset on the y-axis.
* Unit: vp.
*
* @type { ?(number | Resource) }
* @default 5
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Offset on the y-axis.
* Unit: vp.
*
* @type { ?(number | Resource) }
* @default 5
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
offsetY?: number | Resource;
}
/**
* Enumerates the safe area types.
*
* @enum { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 10
*/
/**
* The types of expanded safe areas.
*
* @enum { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
declare enum SafeAreaType {
/**
* Default area of the system, including the status bar and navigation bar.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 10
*/
/**
* Default non-safe area of the system, including the status bar and navigation bar.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
SYSTEM,
/**
* Notch or punch hole.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 10
*/
/**
* Non-safe area of the device like Notch or punch hole.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
CUTOUT,
/**
* Soft keyboard area.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 10
*/
/**
* Soft keyboard area.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
KEYBOARD
}
/**
* Enumerates the safe area edges.
*
* @enum { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 10
*/
/**
* Enumerates the safe area edges.
*
* @enum { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
declare enum SafeAreaEdge {
/**
* Top edge of the safe area.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 10
*/
/**
* Top edge.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
TOP,
/**
* Bottom edge of the safe area.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 10
*/
/**
* Bottom edge.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
BOTTOM,
/**
* Start edge of the safe area.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 10
*/
/**
* Start edge.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
START,
/**
* End edge of the safe area.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 10
*/
/**
* End edge.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
END
}
/**
* Describe the types for expanding the safe area in layout.
*
* @enum { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
declare enum LayoutSafeAreaType {
/**
* Default non-safe area of the system, including the status bar and navigation bar.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
SYSTEM = 0,
}
/**
* Define the edges for expanding the safe area in layout.
*
* @enum { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
declare enum LayoutSafeAreaEdge {
/**
* Top edge.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
TOP = 0,
/**
* Bottom edge.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
BOTTOM = 1,
/**
* Start edge of the safe area.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
*/
START = 2,
/**
* End edge of the safe area.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
*/
END = 3,
/**
* Vertical edge of the safe area.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
*/
VERTICAL = 4,
/**
* Horizontal edge of the safe area.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
*/
HORIZONTAL = 5,
/**
* All edges of the safe area.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
*/
ALL = 6,
}
/**
* Defines sheet size type.
*
* @enum { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Defines sheet size type.
*
* @enum { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
declare enum SheetSize {
/**
* The sheet height is half of the screen height.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* The sheet height is half of the screen height.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
MEDIUM,
/**
* The sheet height is almost the screen height.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* The sheet height is almost the screen height.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
LARGE,
/**
* The sheet height automatically adapts to the content.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
/**
* The sheet height automatically adapts to the content.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
FIT_CONTENT = 2,
}
/**
* The modifier key state query function block.
*
* @typedef { function } ModifierKeyStateGetter
* @param { Array } keys - Indicate the modifier keys to query.
* @returns { boolean } - the query result
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
* @arkts 1.2
*/
declare type ModifierKeyStateGetter = (keys: Array) => boolean;
/**
* Defines the base event.
*
* @interface BaseEvent
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 8
*/
/**
* Defines the base event.
*
* @interface BaseEvent
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* Defines the base event.
*
* @interface BaseEvent
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* Defines the base event.
*
* @interface BaseEvent
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
declare interface BaseEvent {
/**
* Defines the current target which fires this event.
*
* @type { EventTarget }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 8
*/
/**
* Defines the current target which fires this event.
*
* @type { EventTarget }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* Defines the current target which fires this event.
*
* @type { EventTarget }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* Display area of the element that triggers the gesture event.
*
* @type { EventTarget }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
target: EventTarget;
/**
* Event timestamp.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 8
*/
/**
* Event timestamp.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* Event timestamp.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* Timestamp of the event.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
timestamp: number;
/**
* the event source info.
*
* @type { SourceType }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 8
*/
/**
* the event source info.
*
* @type { SourceType }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* the event source info.
*
* @type { SourceType }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* Event input device.
*
* @type { SourceType }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
source: SourceType;
/**
* the Horizontal axis coordinate.
*
* @type { ?number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
axisHorizontal?: number;
/**
* the Vertical axis coordinate.
*
* @type { ?number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
axisVertical?: number;
/**
* Touch pressure.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* Touch pressure.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* Press pressure.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
pressure: number;
/**
* The angle between pencil projection on plane-X-Y and axis-Z.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* The angle between pencil projection on plane-X-Y and axis-Z.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* Angle between the projection of the stylus on the device plane and the x-axis.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
tiltX: number;
/**
* The angle between pencil projection on plane-Y-Z and axis-Z.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* The angle between pencil projection on plane-Y-Z and axis-Z.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* Angle between the projection of the stylus on the device plane and the y-axis.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
tiltY: number;
/**
* Indicates the angle at which the stylus rotates around the Z-axis.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'17','1.2':'20'}
* @arkts 1.1&1.2
*/
rollAngle?: number;
/**
* The event tool type info.
*
* @type { SourceTool }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* The event tool type info.
*
* @type { SourceTool }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* Event input source.
*
* @type { SourceTool }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
sourceTool: SourceTool;
/**
* Obtains the pressed status of modifier keys. The following modifier keys are supported: 'Ctrl'|'Alt'|'Shift'.
*
* @param { Array } keys - indicate the keys of the ModifierKey.
* @returns { boolean }
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Incorrect parameter types. 2. Parameter verification failed.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
getModifierKeyState?(keys: Array): boolean;
/**
* Query the modifier key press state, support 'ctrl'|'alt'|'shift'
*
* @type { ?ModifierKeyStateGetter }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
* @arkts 1.2
*/
getModifierKeyState?: ModifierKeyStateGetter;
/**
* Indicates the ID of the input device that triggers the current event.
*
* @type { ?number } [deviceId] The ID of the input device that triggers the current event
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
deviceId?: number;
/**
* Indicates the screen ID on which the event occurred.
*
* @type { ?number } [targetDisplayId] The screen ID on which the event occurred.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'15','1.2':'20'}
* @arkts 1.1&1.2
*/
targetDisplayId?: number;
}
/**
* Border image option
*
* @interface BorderImageOption
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* Border image option
*
* @interface BorderImageOption
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* Border image option
*
* @interface BorderImageOption
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
declare interface BorderImageOption {
/**
* Border image slice
*
* @type { ?(Length | EdgeWidths) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* Border image slice
*
* @type { ?(Length | EdgeWidths) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* Border image slice
*
* @type { ?(Length | EdgeWidths) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 11
*/
/**
* Slice width of the upper left corner, upper right corner, lower left corner,
* and lower right corner of the border image.
*
* @type { ?(Length | EdgeWidths | LocalizedEdgeWidths) }
* @default 0
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
slice?: Length | EdgeWidths | LocalizedEdgeWidths,
/**
* Border image repeat
*
* @type { ?RepeatMode }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* Border image repeat
*
* @type { ?RepeatMode }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* Repeat mode of the source image's slices on the border.
*
* @type { ?RepeatMode }
* @default RepeatMode.Stretch
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
repeat?: RepeatMode,
/**
* Border image source
*
* @type { ?(string | Resource | LinearGradient) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* Border image source
*
* @type { ?(string | Resource | LinearGradient) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* Source or gradient color of the border image.
* When the type is string, this parameter sets the border image source.
* For details about how to reference image resources, see Loading Image Resources.
*
*
NOTE:
* The border image source applies only to container components, such as Row, Column, and Flex.
*
*
* @type { ?(string | Resource | LinearGradient) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 11
*/
source?: string | Resource | LinearGradient,
/**
* Border image source
*
* @type { ?(string | Resource | LinearGradientOptions) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 20
* @arkts 1.2
*/
source?: string | Resource | LinearGradientOptions,
/**
* Border image width
*
* @type { ?(Length | EdgeWidths) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* Border image width
*
* @type { ?(Length | EdgeWidths) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* Border image width
*
* @type { ?(Length | EdgeWidths) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 11
*/
/**
* Width of the border image.
*
* @type { ?(Length | EdgeWidths | LocalizedEdgeWidths) }
* @default 0
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
width?: Length | EdgeWidths | LocalizedEdgeWidths,
/**
* Border image outset
*
* @type { ?(Length | EdgeWidths) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* Border image outset
*
* @type { ?(Length | EdgeWidths) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* Border image outset
*
* @type { ?(Length | EdgeWidths) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 11
*/
/**
* Amount by which the border image is extended beyond the border box.
*
* @type { ?(Length | EdgeWidths | LocalizedEdgeWidths) }
* @default 0
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
outset?: Length | EdgeWidths | LocalizedEdgeWidths,
/**
* Border image center fill
*
* @type { ?boolean }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* Border image center fill
*
* @type { ?boolean }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* Whether to fill the center of the border image.
* true: Fill the center of the border image.
* false: Do not fill the center of the border image.
*
* @type { ?boolean }
* @default false
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
fill?: boolean
}
/**
* Defines the policy of Layout
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'15','1.2':'20'}
* @arkts 1.1&1.2
*/
declare class LayoutPolicy {
/**
* The component fills its parent which means its size is as large as its parent.
*
* @type { LayoutPolicy }
* @readonly
* @static
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'15','1.2':'20'}
* @arkts 1.1&1.2
*/
static readonly matchParent: LayoutPolicy;
/**
* The component fills its content which means its size is as large as its children but it is constained by its parent.
*
* @type { LayoutPolicy }
* @readonly
* @static
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 20
*/
static readonly wrapContent: LayoutPolicy;
/**
* The component fills its content which means its size is as large as its children.
*
* @type { LayoutPolicy }
* @readonly
* @static
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 20
*/
static readonly fixAtIdealSize: LayoutPolicy;
}
/**
* The tap action triggers this method invocation.
*
* @extends BaseEvent
* @interface ClickEvent
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* The tap action triggers this method invocation.
*
* @extends BaseEvent
* @interface ClickEvent
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* The tap action triggers this method invocation.
*
* @extends BaseEvent
* @interface ClickEvent
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* The tap action triggers this method invocation.
*
* @extends BaseEvent
* @interface ClickEvent
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
declare interface ClickEvent extends BaseEvent {
/**
* X coordinate of the point relative to the global display.
*
* @type { ?number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
*/
globalDisplayX?: number;
/**
* Y coordinate of the point relative to the global display.
*
* @type { ?number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
*/
globalDisplayY?: number;
/**
* X coordinate of the click point relative to the left edge of the device screen.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* X coordinate of the click relative to the upper left corner of the application screen.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
displayX: number;
/**
* Y coordinate of the click point relative to the upper edge of the device screen.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Y coordinate of the click relative to the upper left corner of the application screen.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
displayY: number;
/**
* X coordinate of the click point relative to the left edge of the current window.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* X coordinate of the click relative to the upper left corner of the application window.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
windowX: number;
/**
* Y coordinate of the click point relative to the upper edge of the current window.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Y coordinate of the click relative to the upper left corner of the application window.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
windowY: number;
/**
* X coordinate of the click relative to the upper left corner of the application window.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
* @deprecated since 10
* @useinstead ClickEvent#windowX
*/
screenX: number;
/**
* Y coordinate of the click relative to the upper left corner of the application window.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
* @deprecated since 10
* @useinstead ClickEvent#windowY
*/
screenY: number;
/**
* X coordinate of the click point relative to the left edge of the clicked element.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* X coordinate of the click point relative to the left edge of the clicked element.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* X coordinate of the click point relative to the left edge of the clicked element.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* X coordinate of the click point relative to the left edge of the clicked element.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
x: number;
/**
* Y coordinate of the click point relative to the upper edge of the clicked element.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* Y coordinate of the click point relative to the left edge of the clicked element.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* Y coordinate of the click point relative to the left edge of the clicked element.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* Y coordinate of the click point relative to the left edge of the clicked element.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
y: number;
/**
* Whether the event is triggered by a left-hand or right-hand tap.
*
* @type { InteractionHand }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'15','1.2':'20'}
* @arkts 1.1&1.2
*/
hand?: InteractionHand;
/**
* Prevent the default function.
*
* @type { function }
* @throws { BusinessError } 100017 - Component does not support prevent function.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
preventDefault: () => void;
}
/**
* The hover action triggers this method invocation.
*
* @extends BaseEvent
* @interface HoverEvent
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 10
*/
/**
* The hover action triggers this method invocation.
*
* @extends BaseEvent
* @interface HoverEvent
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
declare interface HoverEvent extends BaseEvent {
/**
* X coordinate of the hover point relative to the left edge of the hover element.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since arkts {'1.1':'15','1.2':'20'}
* @arkts 1.1&1.2
*/
x?: number;
/**
* Y coordinate of the hover point relative to the upper edge of the hover element.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since arkts {'1.1':'15','1.2':'20'}
* @arkts 1.1&1.2
*/
y?: number;
/**
* X coordinate of the hover point relative to the left edge of the current window.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since arkts {'1.1':'15','1.2':'20'}
* @arkts 1.1&1.2
*/
windowX?: number;
/**
* Y coordinate of the hover point relative to the upper edge of the current window.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since arkts {'1.1':'15','1.2':'20'}
* @arkts 1.1&1.2
*/
windowY?: number;
/**
* X coordinate of the hover point relative to the left edge of the device screen.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since arkts {'1.1':'15','1.2':'20'}
* @arkts 1.1&1.2
*/
displayX?: number;
/**
* Y coordinate of the hover point relative to the upper edge of the device screen.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since arkts {'1.1':'15','1.2':'20'}
* @arkts 1.1&1.2
*/
displayY?: number;
/**
* X coordinate of the point relative to the global display.
*
* @type { ?number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since 20
*/
globalDisplayX?: number;
/**
* Y coordinate of the point relative to the global display.
*
* @type { ?number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since 20
*/
globalDisplayY?: number;
/**
* The blocking hover event pops up.
*
* @type { function }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 10
*/
/**
* The blocking hover event pops up.
*
* @type { function }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
stopPropagation: () => void;
}
/**
* The mouse click action triggers this method invocation.
*
* @extends BaseEvent
* @interface MouseEvent
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 8
*/
/**
* The mouse click action triggers this method invocation.
*
* @extends BaseEvent
* @interface MouseEvent
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
declare interface MouseEvent extends BaseEvent {
/**
* Mouse button of the click event.
*
* @type { MouseButton }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 8
*/
/**
* Mouse button of the click event.
*
* @type { MouseButton }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
button: MouseButton;
/**
* Mouse action of the click event.
*
* @type { MouseAction }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 8
*/
/**
* Mouse action of the click event.
*
* @type { MouseAction }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
action: MouseAction;
/**
* X coordinate of the point relative to the global display.
*
* @type { ?number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since 20
*/
globalDisplayX?: number;
/**
* Y coordinate of the point relative to the global display.
*
* @type { ?number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since 20
*/
globalDisplayY?: number;
/**
* X coordinate of the mouse point relative to the left edge of the device screen.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 10
*/
/**
* X coordinate of the mouse pointer relative to the upper left corner of the application screen.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
displayX: number;
/**
* Y coordinate of the mouse point relative to the upper edge of the device screen.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 10
*/
/**
* Y coordinate of the mouse pointer relative to the upper left corner of the application screen.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
displayY: number;
/**
* X coordinate of the mouse point relative to the left edge of the current window.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 10
*/
/**
* X coordinate of the mouse pointer relative to the upper left corner of the application window.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
windowX: number;
/**
* Y coordinate of the mouse point relative to the upper edge of the current window.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 10
*/
/**
* Y coordinate of the mouse pointer relative to the upper left corner of the application window.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
windowY: number;
/**
* X coordinate of the mouse pointer relative to the upper left corner of the application window.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 8
* @deprecated since 10
* @useinstead MouseEvent#windowX
*/
screenX: number;
/**
* Y coordinate of the mouse pointer relative to the upper left corner of the application window.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 8
* @deprecated since 10
* @useinstead MouseEvent#windowY
*/
screenY: number;
/**
* X coordinate of the mouse point relative to the left edge of the mouse hit element.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 8
*/
/**
* X coordinate of the mouse pointer relative to the upper left corner of the component being clicked.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
x: number;
/**
* Y coordinate of the mouse point relative to the upper edge of the mouse hit element.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 8
*/
/**
* Y coordinate of the mouse pointer relative to the upper left corner of the component being clicked.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
y: number;
/**
* The blocking event pops up.
*
* @type { function }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 8
*/
/**
* Stops the event from bubbling upwards or downwards.
*
* @type { function }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
stopPropagation: () => void;
/**
* X axis offset relative to the previous reported mouse pointer position. When the mouse pointer is at
* the edge of the screen, the value may be less than the difference of the X coordinate reported twice.
*
* @type { ?number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since arkts {'1.1':'15','1.2':'20'}
* @arkts 1.1&1.2
*/
rawDeltaX?: number;
/**
* Y axis offset relative to the previous reported mouse pointer position. When the mouse pointer is at
* the edge of the screen, the value may be less than the difference of the Y coordinate reported twice.
*
* @type { ?number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since arkts {'1.1':'15','1.2':'20'}
* @arkts 1.1&1.2
*/
rawDeltaY?: number;
/**
* Array of all mouse buttons that are currently pressed.
*
* @type { ?MouseButton[] }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since arkts {'1.1':'15','1.2':'20'}
* @arkts 1.1&1.2
*/
pressedButtons?: MouseButton[];
}
/**
* The accessibility hover action triggers this method invocation.
*
* @extends BaseEvent
* @typedef AccessibilityHoverEvent
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
declare interface AccessibilityHoverEvent extends BaseEvent {
/**
* Type of the accessibility hover event.
*
* @type { AccessibilityHoverType }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
type: AccessibilityHoverType;
/**
* X coordinate of the accessibility hover point relative to the left edge of the event hit element.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
x: number;
/**
* Y coordinate of the accessibility hover point relative to the upper edge of the event hit element.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
y: number;
/**
* X coordinate of the accessibility hover point relative to the left edge of the device screen.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
displayX: number;
/**
* Y coordinate of the accessibility hover point relative to the upper edge of the device screen.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
displayY: number;
/**
* X coordinate of the accessibility hover point relative to the left edge of the current window.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
windowX: number;
/**
* Y coordinate of the accessibility hover point relative to the upper edge of the current window.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
windowY: number;
/**
* X coordinate of the point relative to the global display.
*
* @type { ?number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since 20
*/
globalDisplayX?: number;
/**
* Y coordinate of the point relative to the global display.
*
* @type { ?number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since 20
*/
globalDisplayY?: number;
}
/**
* Type of the touch event.
*
* @interface TouchObject
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* Type of the touch event.
*
* @interface TouchObject
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Type of the touch event.
*
* @interface TouchObject
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
declare interface TouchObject {
/**
* Type of the touch event.
*
* @type { TouchType }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* Type of the touch event.
*
* @type { TouchType }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Type of the touch event.
*
* @type { TouchType }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
type: TouchType;
/**
* Finger unique identifier.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* Finger unique identifier.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Unique identifier of a finger.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
id: number;
/**
* X coordinate of the point relative to the global display.
*
* @type { ?number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
*/
globalDisplayX?: number;
/**
* Y coordinate of the point relative to the global display.
*
* @type { ?number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
*/
globalDisplayY?: number;
/**
* X coordinate of the touch point relative to the left edge of the device screen.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* X coordinate of the touch point relative to the upper left corner of the application screen.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
displayX: number;
/**
* Y coordinate of the touch point relative to the upper edge of the device screen.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Y coordinate of the touch point relative to the upper left corner of the application screen.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
displayY: number;
/**
* X coordinate of the touch point relative to the left edge of the current window.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* X coordinate of the touch point relative to the upper left corner of the application window.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
windowX: number;
/**
* Y coordinate of the touch point relative to the upper edge of the current window.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Y coordinate of the touch point relative to the upper left corner of the application window.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
windowY: number;
/**
* X coordinate of the touch point relative to the upper left corner of the application window.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
* @deprecated since 10
* @useinstead TouchObject#windowX
*/
screenX: number;
/**
* Y coordinate of the touch point relative to the upper left corner of the application window.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
* @deprecated since 10
* @useinstead TouchObject#windowY
*/
screenY: number;
/**
* X coordinate of the touch point relative to the left edge of the touched element.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* X coordinate of the touch point relative to the left edge of the touched element.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* X coordinate of the touch point relative to the upper left corner of the event responding component.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
x: number;
/**
* Y coordinate of the touch point relative to the upper edge of the touched element.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* Y coordinate of the touch point relative to the upper edge of the touched element.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Y coordinate of the touch point relative to the upper left corner of the event responding component.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
y: number;
/**
* Whether the event is triggered by a left-hand or right-hand tap.
*
* @type { InteractionHand }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'15','1.2':'20'}
* @arkts 1.1&1.2
*/
hand?: InteractionHand;
/**
* Time when the finger is pressed.
*
* @type { ?number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'15','1.2':'20'}
* @arkts 1.1&1.2
*/
pressedTime?: number;
/**
* Pressure value of the finger press.
*
* @type { ?number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'15','1.2':'20'}
* @arkts 1.1&1.2
*/
pressure?: number;
/**
* Width of the area pressed by the finger.
*
* @type { ?number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'15','1.2':'20'}
* @arkts 1.1&1.2
*/
width?: number;
/**
* Height of the area pressed by the finger.
*
* @type { ?number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'15','1.2':'20'}
* @arkts 1.1&1.2
*/
height?: number;
}
/**
* TouchObject getHistoricalPoints Function Parameters
*
* @interface HistoricalPoint
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* TouchObject getHistoricalPoints Function Parameters
*
* @interface HistoricalPoint
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
declare interface HistoricalPoint {
/**
* The base touchObject information of historicalPoint
*
* @type { TouchObject }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* The base touchObject information of historicalPoint
*
* @type { TouchObject }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
touchObject: TouchObject;
/**
* Contact area between the finger pad and the screen.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Contact area between the finger pad and the screen.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
size: number;
/**
* Pressure of the touch event.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Pressure of the touch event.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
force: number;
/**
* Timestamp of the touch event.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Timestamp of the touch event.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
timestamp: number;
}
/**
* Touch Action Function Parameters
*
* @extends BaseEvent
* @interface TouchEvent
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* Touch Action Function Parameters
*
* @extends BaseEvent
* @interface TouchEvent
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Touch Action Function Parameters
*
* @extends BaseEvent
* @interface TouchEvent
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
declare interface TouchEvent extends BaseEvent {
/**
* Type of the touch event.
*
* @type { TouchType }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* Type of the touch event.
*
* @type { TouchType }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Type of the touch event.
*
* @type { TouchType }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
type: TouchType;
/**
* All finger information.
*
* @type { TouchObject[] }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* All finger information.
*
* @type { TouchObject[] }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* All finger information.
*
* @type { TouchObject[] }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
touches: TouchObject[];
/**
* Indicates the current changed finger information.
*
* @type { TouchObject[] }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* Indicates the current changed finger information.
*
* @type { TouchObject[] }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Finger information changed.
*
* @type { TouchObject[] }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
changedTouches: TouchObject[];
/**
* The blocking event pops up.
*
* @type { function }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* The blocking event pops up.
*
* @type { function }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Stops the event from bubbling upwards or downwards.
*
* @type { function }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
stopPropagation: () => void;
/**
* Get the historical points.
*
* @returns { Array } - return all historical points.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Obtains all historical points of the current frame.
*
* @returns { Array } - return all historical points.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
getHistoricalPoints(): Array;
/**
* Blocks the default event.
*
* @type { function }
* @throws { BusinessError } 100017 - Component does not support prevent function.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
preventDefault: () => void;
}
/**
* The axis event triggers this method invocation.
*
* @extends BaseEvent
* @interface AxisEvent
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since arkts {'1.1':'17','1.2':'20'}
* @arkts 1.1&1.2
*/
declare interface AxisEvent extends BaseEvent {
/**
* Axis action of the axis event.
*
* @type { AxisAction }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since arkts {'1.1':'17','1.2':'20'}
* @arkts 1.1&1.2
*/
action: AxisAction;
/**
* X coordinate of the point relative to the global display.
*
* @type { ?number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since 20
*/
globalDisplayX?: number;
/**
* Y coordinate of the point relative to the global display.
*
* @type { ?number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since 20
*/
globalDisplayY?: number;
/**
* X coordinate of the mouse cursor relative to the left edge of the device screen.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since arkts {'1.1':'17','1.2':'20'}
* @arkts 1.1&1.2
*/
displayX: number;
/**
* Y coordinate of the mouse cursor relative to the upper edge of the device screen.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since arkts {'1.1':'17','1.2':'20'}
* @arkts 1.1&1.2
*/
displayY: number;
/**
* X coordinate of the mouse cursor relative to the left edge of the current window.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since arkts {'1.1':'17','1.2':'20'}
* @arkts 1.1&1.2
*/
windowX: number;
/**
* Y coordinate of the mouse cursor relative to the upper edge of the current window.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since arkts {'1.1':'17','1.2':'20'}
* @arkts 1.1&1.2
*/
windowY: number;
/**
* X coordinate of the mouse cursor relative to the left edge of the axis event hit element.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since arkts {'1.1':'17','1.2':'20'}
* @arkts 1.1&1.2
*/
x: number;
/**
* Y coordinate of the mouse cursor relative to the upper edge of the axis event hit element.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since arkts {'1.1':'17','1.2':'20'}
* @arkts 1.1&1.2
*/
y: number;
/**
* Scroll step configuration which is only mouse wheel has.
* *
* @type { ?number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since arkts {'1.1':'17','1.2':'20'}
* @arkts 1.1&1.2
*/
scrollStep?: number;
/**
* Active event bubbling.
*
* @type { Callback }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since arkts {'1.1':'17','1.2':'20'}
* @arkts 1.1&1.2
*/
propagation: Callback;
/**
* Obtains the value of the horizontal scroll axis for this axis event.
*
* @returns { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since arkts {'1.1':'17','1.2':'20'}
* @arkts 1.1&1.2
*/
getHorizontalAxisValue(): number;
/**
* Obtains the value of the vertical scroll axis for this axis event.
*
* @returns { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since arkts {'1.1':'17','1.2':'20'}
* @arkts 1.1&1.2
*/
getVerticalAxisValue(): number;
}
/**
* Defines the callback type used in onSizeChange.
* oldValue - the width and height of the component before the change.
* newValue - the width and height of the component after the change.
*
* @typedef { function } SizeChangeCallback
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
declare type SizeChangeCallback = (oldValue: SizeOptions, newValue: SizeOptions) => void;
/**
* Defines the callback type used in onGestureRecognizerJudgeBegin.
*
* @typedef { function } GestureRecognizerJudgeBeginCallback
* @param { BaseGestureEvent } event - the event information
* @param { GestureRecognizer } current - the current gesture recognizer of the component
* @param { Array } recognizers - the gesture recognizers of the component on the response chain
* @returns { GestureJudgeResult } the gesture judge result
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
/**
* Defines the callback type used in onGestureRecognizerJudgeBegin.
*
* @typedef { function } GestureRecognizerJudgeBeginCallback
* @param { BaseGestureEvent } event - the event information
* @param { GestureRecognizer } current - the current gesture recognizer of the component
* @param { Array } recognizers - the gesture recognizers of the component on the response chain
* @param { Array } [touchRecognizers] - the touch recognizers of the component on the response chain
* @returns { GestureJudgeResult } the gesture judge result
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
*/
declare type GestureRecognizerJudgeBeginCallback = (event: BaseGestureEvent, current: GestureRecognizer, recognizers: Array,
touchRecognizers?: Array) => GestureJudgeResult;
/**
* Defines the callback type used in onGestureRecognizerJudgeBegin.
*
* @typedef { function } GestureRecognizerJudgeBeginCallback
* @param { BaseGestureEvent } event - the event information
* @param { GestureRecognizer } current - the current gesture recognizer of the component
* @param { Array } recognizers - the gesture recognizers of the component on the response chain
* @returns { GestureJudgeResult } the gesture judge result
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
* @arkts 1.2
*/
declare type GestureRecognizerJudgeBeginCallback = (event: BaseGestureEvent, current: GestureRecognizer, recognizers: Array) => GestureJudgeResult;
/**
* Defines the callback type used in shouldBuiltInRecognizerParallelWith.
*
* @typedef { function } ShouldBuiltInRecognizerParallelWithCallback
* @param { GestureRecognizer } current - the current gesture recognizer of the component
* @param { Array } others - the gesture recognizers of the component on the response chain
* @returns { GestureRecognizer } gesture recognizer of the component
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
declare type ShouldBuiltInRecognizerParallelWithCallback = (current: GestureRecognizer, others: Array) => GestureRecognizer;
/**
* Defines the finish callback type used in transition.
*
* @typedef { function } TransitionFinishCallback
* @param { boolean } transitionIn - a boolean value indicates whether it is the callback of transitionIn or transitionOut.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
declare type TransitionFinishCallback = (transitionIn: boolean) => void;
/**
* Defines the callback type used in onTouchTestDone.
* When the user touch down, the system performs hit test process to collect all gesture recognizers
* based on the press location, when the collection is completed, and before gesture begin to be recognizing,
* the callback is triggered, you can get all recognizer's information from this callback.
*
* @typedef { function } TouchTestDoneCallback
* @param { BaseGestureEvent } event - the event information, basicly is the touch down information
* @param { Array } recognizers - the gesture recognizers of the component on the response chain
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
*/
declare type TouchTestDoneCallback = (event: BaseGestureEvent, recognizers: Array) => void;
/**
* Defines the PixelMap type object for ui component.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* Defines the PixelMap type object for ui component.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Defines the PixelMap type object for ui component.
*
* @typedef { import('../api/@ohos.multimedia.image').default.PixelMap } PixelMap
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 11
*/
declare type PixelMap = import('../api/@ohos.multimedia.image').default.PixelMap;
/**
* Defines the PixelMap type object for ui component.
*
* @typedef { image.PixelMap } PixelMap
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
* @arkts 1.2
*/
declare type PixelMap = image.PixelMap;
/**
* pixelmap object with release function.
*
* @interface PixelMapMock
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @systemapi
* @since arkts {'1.1':'7','1.2':'20'}
* @arkts 1.1&1.2
*/
declare interface PixelMapMock {
/**
* release function.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @systemapi
* @since arkts {'1.1':'7','1.2':'20'}
* @arkts 1.1&1.2
*/
release(): void;
}
/**
* Enum for Drag Behavior.
*
* @enum { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 10
*/
/**
* Enum for Drag Behavior.
*
* @enum { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since 11
*/
/**
* Enum for Drag Behavior.
*
* NOTE:
* DragBehavior serves to inform you about the intended method of data handling,
* whether it's a copy or a move, but it does not actually dictate the real processing of the data.
*
* @enum { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
declare enum DragBehavior {
/**
* If drag use copy event, then set DragBehavior.COPY.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 10
*/
/**
* If drag use copy event, then set DragBehavior.COPY.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since 11
*/
/**
* If drag use copy event, then set DragBehavior.COPY.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
COPY,
/**
* If drag use move event, then set DragBehavior.MOVE.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 10
*/
/**
* If drag use move event, then set DragBehavior.MOVE.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since 11
*/
/**
* If drag use move event, then set DragBehavior.MOVE.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
MOVE
}
/**
* Import the UnifiedData type object for ui component.
*
* @typedef { import('../api/@ohos.data.unifiedDataChannel').default.UnifiedData } UnifiedData
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Import the UnifiedData type object for ui component.
*
* @typedef { import('../api/@ohos.data.unifiedDataChannel').default.UnifiedData } UnifiedData
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 11
*/
declare type UnifiedData = import('../api/@ohos.data.unifiedDataChannel').default.UnifiedData;
/**
* Import the UnifiedData type object for ui component.
*
* @typedef { unifiedDataChannel.UnifiedData } UnifiedData
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
* @arkts 1.2
*/
declare type UnifiedData = unifiedDataChannel.UnifiedData;
/**
* Import the Summary type object for ui component.
*
* @typedef { import('../api/@ohos.data.unifiedDataChannel').default.Summary } Summary
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 10
*/
/**
* Import the Summary type object for ui component.
*
* @typedef { import('../api/@ohos.data.unifiedDataChannel').default.Summary } Summary
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since 11
*/
declare type Summary = import('../api/@ohos.data.unifiedDataChannel').default.Summary;
/**
* Import the Summary type object for ui component.
*
* @typedef { unifiedDataChannel.Summary } Summary
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since 20
* @arkts 1.2
*/
declare type Summary = unifiedDataChannel.Summary;
/**
* Import the UniformDataType type object for ui component.
*
* @typedef { import('../api/@ohos.data.uniformTypeDescriptor').default.UniformDataType } UniformDataType
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 10
*/
/**
* Import the UniformDataType type object for ui component.
*
* @typedef { import('../api/@ohos.data.uniformTypeDescriptor').default.UniformDataType } UniformDataType
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since 11
*/
declare type UniformDataType = import('../api/@ohos.data.uniformTypeDescriptor').default.UniformDataType;
/**
* Import the GetDataParams type object for ui component.
*
* @typedef { import('../api/@ohos.data.unifiedDataChannel').default.GetDataParams } GetDataParams
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 15
*/
declare type DataSyncOptions = import('../api/@ohos.data.unifiedDataChannel').default.GetDataParams;
/**
* Import the UniformDataType type object for ui component.
*
* @typedef { uniformTypeDescriptor.UniformDataType } UniformDataType
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since 20
* @arkts 1.2
*/
declare type UniformDataType = uniformTypeDescriptor.UniformDataType;
/**
* Import the DataLoadParams type object for ui component.
*
* @typedef { import('../api/@ohos.data.unifiedDataChannel').default.DataLoadParams } DataLoadParams
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
*/
declare type DataLoadParams = import('../api/@ohos.data.unifiedDataChannel').default.DataLoadParams;
/**
* Enum for Drag Result.
*
* @enum { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 10
*/
/**
* Enum for Drag Result.
*
* @enum { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since 11
*/
/**
* Enum for Drag Result.
*
* @enum { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'14','1.2':'20'}
* @arkts 1.1&1.2
*/
declare enum DragResult {
/**
* If the drag is not finished and the result is not set by receiver, return DragResult.UNKNOWN.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
* @arkts 1.2
*/
UNKNOWN = -1,
/**
* If the drag is successful, return DragResult.DRAG_SUCCESSFUL.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 10
*/
/**
* If the drag is successful, return DragResult.DRAG_SUCCESSFUL.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since 11
*/
/**
* If the drag is successful, return DragResult.DRAG_SUCCESSFUL.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'14','1.2':'20'}
* @arkts 1.1&1.2
*/
DRAG_SUCCESSFUL = 0,
/**
* If drag fail, return DragResult.DRAG_FAILED.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 10
*/
/**
* If drag fail, return DragResult.DRAG_FAILED.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since 11
*/
/**
* If drag fail, return DragResult.DRAG_FAILED.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'14','1.2':'20'}
* @arkts 1.1&1.2
*/
DRAG_FAILED = 1,
/**
* If drag action cancel, return DragResult.DRAG_CANCELED.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 10
*/
/**
* If drag action cancel, return DragResult.DRAG_CANCELED.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
DRAG_CANCELED = 2,
/**
* If node allow drop in, return DragResult.DROP_ENABLED.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 10
*/
/**
* If node allow drop in, return DragResult.DROP_ENABLED.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
DROP_ENABLED = 3,
/**
* If node don't allow drop in, return DragResult.DROP_DISABLED.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 10
*/
/**
* If node don't allow drop in, return DragResult.DROP_DISABLED.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
DROP_DISABLED = 4
}
/**
* Enum for BlendMode.
* Blend modes for compositing current component
* with overlapping content. Use overlapping content
* as dst, current component as src.
*
* @enum { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 11
*/
/**
* Enum for BlendMode.
* Blend modes for compositing current component
* with overlapping content. Use overlapping content
* as dst, current component as src.
*
* @enum { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
declare enum BlendMode {
/**
* The top image is superimposed on the bottom image without any blending.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 11
*/
/**
* The top image is superimposed on the bottom image without any blending.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
NONE = 0,
/**
* The target pixels covered by the source pixels are erased by being turned to completely transparent.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 11
*/
/**
* The target pixels covered by the source pixels are erased by being turned to completely transparent.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
CLEAR = 1,
/**
* r = s: Only the source pixels are displayed.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 11
*/
/**
* r = s: Only the source pixels are displayed.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
SRC = 2,
/**
* r = d
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 11
*/
/**
* r = d
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
DST = 3,
/**
* r = s + (1 - sa) * d: The source pixels are blended based on opacity and cover the target pixels.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 11
*/
/**
* r = s + (1 - sa) * d: The source pixels are blended based on opacity and cover the target pixels.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
SRC_OVER = 4,
/**
* r = d + (1 - da) * s: The target pixels are blended based on opacity and cover on the source pixels.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 11
*/
/**
* r = d + (1 - da) * s: The target pixels are blended based on opacity and cover on the source pixels.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
DST_OVER = 5,
/**
* r = s * da: Only the part of the source pixels that overlap with the target pixels is displayed.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 11
*/
/**
* r = s * da: Only the part of the source pixels that overlap with the target pixels is displayed.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
SRC_IN = 6,
/**
* r = d * sa: Only the part of the target pixels that overlap with the source pixels is displayed.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 11
*/
/**
* r = d * sa: Only the part of the target pixels that overlap with the source pixels is displayed.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
DST_IN = 7,
/**
* r = s * (1 - da)
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 11
*/
/**
* r = s * (1 - da)
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
SRC_OUT = 8,
/**
* r = d * (1 - sa)
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 11
*/
/**
* r = d * (1 - sa), retains the parts of the destination pixels that do not overlap with the source.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
DST_OUT = 9,
/**
* r = s * da + d * (1 - sa): The part of the source pixels that overlap with the target pixels is displayed
* and the part of the target pixels that do not overlap with the source pixels are displayed.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 11
*/
/**
* r = s * da + d * (1 - sa): The part of the source pixels that overlap with the target pixels is displayed
* and the part of the target pixels that do not overlap with the source pixels are displayed.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
SRC_ATOP = 10,
/**
* r = d * sa + s * (1 - da)
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 11
*/
/**
* r = d * sa + s * (1 - da): The part of the target pixels that overlap with the source pixels
* and the part of the source pixels that do not overlap with the target pixels are displayed.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
DST_ATOP = 11,
/**
* r = s * (1 - da) + d * (1 - sa)
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 11
*/
/**
* r = s * (1 - da) + d * (1 - sa)
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
XOR = 12,
/**
* r = min(s + d, 1)
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 11
*/
/**
* r = min(s + d, 1):
* New pixels resulting from adding the source pixels to the target pixels are displayed.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
PLUS = 13,
/**
* r = s * d
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 11
*/
/**
* r = s * d
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
MODULATE = 14,
/**
* r = s + d - s * d
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 11
*/
/**
* r = s + d - s * d
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
SCREEN = 15,
/**
* multiply or screen, depending on destination
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 11
*/
/**
* multiply or screen, depending on destination
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
OVERLAY = 16,
/**
* rc = s + d - max(s * da, d * sa), ra = kSrcOver
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 11
*/
/**
* rc = s + d - max(s * da, d * sa), ra = kSrcOver
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
DARKEN = 17,
/**
* rc = s + d - min(s * da, d * sa), ra = kSrcOver
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 11
*/
/**
* rc = s + d - min(s * da, d * sa), ra = kSrcOver
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
LIGHTEN = 18,
/**
* brighten destination to reflect source
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 11
*/
/**
* brighten destination to reflect source
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
COLOR_DODGE = 19,
/**
* darken destination to reflect source
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 11
*/
/**
* darken destination to reflect source
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
COLOR_BURN = 20,
/**
* multiply or screen, depending on source
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 11
*/
/**
* multiply or screen, depending on source
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
HARD_LIGHT = 21,
/**
* The LIGHTEN or DARKEN mode is used, depending on the source pixels.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 11
*/
/**
* The LIGHTEN or DARKEN mode is used, depending on the source pixels.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
SOFT_LIGHT = 22,
/**
* rc = s + d - 2 * (min(s * da, d * sa)), ra = kSrcOver
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 11
*/
/**
* rc = s + d - 2 * (min(s * da, d * sa)), ra = kSrcOver: The final pixel is the result of subtracting
* the darker of the two pixels (source and target) from the lighter one.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
DIFFERENCE = 23,
/**
* rc = s + d - two(s * d), ra = kSrcOver
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 11
*/
/**
* rc = s + d - two(s * d), ra = kSrcOver
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
EXCLUSION = 24,
/**
* r = s * (1 - da) + d * (1 - sa) + s * d:
* The final pixel is the result of multiplying the source pixel by the target pixel.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 11
*/
/**
* r = s * (1 - da) + d * (1 - sa) + s * d:
* The final pixel is the result of multiplying the source pixel by the target pixel.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
MULTIPLY = 25,
/**
* hue of source with saturation and luminosity of destination
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 11
*/
/**
* hue of source with saturation and luminosity of destination
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
HUE = 26,
/**
* saturation of source with hue and luminosity of destination
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 11
*/
/**
* saturation of source with hue and luminosity of destination
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
SATURATION = 27,
/**
* hue and saturation of source with luminosity of destination
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 11
*/
/**
* hue and saturation of source with luminosity of destination
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
COLOR = 28,
/**
* luminosity of source with hue and saturation of destination
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 11
*/
/**
* luminosity of source with hue and saturation of destination
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
LUMINOSITY = 29
}
/**
* Enum for BlendApplyType.
* Indicate how to apply specified blend mode to
* the view's content.
*
* @enum { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 11
*/
/**
* Enum for BlendApplyType.
* Indicate how to apply specified blend mode to
* the view's content.
*
* @enum { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
declare enum BlendApplyType {
/**
* The content of the view is blended in sequence on the target image.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 11
*/
/**
* The content of the view is blended in sequence on the target image.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
FAST = 0,
/**
* The content of the component and its child components are drawn on the
* offscreen canvas, and then blended with the existing content on the canvas.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 11
*/
/**
* The content of the component and its child components are drawn on the
* offscreen canvas, and then blended with the existing content on the canvas.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
OFFSCREEN = 1,
}
/**
* DragEvent object description
*
* @interface DragEvent
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* DragEvent object description
*
* @interface DragEvent
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since 11
*/
/**
* DragEvent object description
*
* @interface DragEvent
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'14','1.2':'20'}
* @arkts 1.1&1.2
*/
declare interface DragEvent {
/**
* X coordinate of the point relative to the global display.
*
* @returns { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since 20
*/
getGlobalDisplayX(): number;
/**
* Y coordinate of the point relative to the global display.
*
* @returns { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since 20
*/
getGlobalDisplayY(): number;
/**
* X coordinate of the touch point relative to the left edge of the device screen.
*
* @returns { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 10
*/
/**
* X coordinate of the touch point relative to the left edge of the device screen.
*
* @returns { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since 11
*/
/**
* X coordinate of the touch point relative to the left edge of the device screen.
*
* @returns { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'14','1.2':'20'}
* @arkts 1.1&1.2
*/
getDisplayX(): number;
/**
* Y coordinate of the touch point relative to the upper edge of the device screen.
*
* @returns { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 10
*/
/**
* Y coordinate of the touch point relative to the upper edge of the device screen.
*
* @returns { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since 11
*/
/**
* Y coordinate of the touch point relative to the upper edge of the device screen.
*
* @returns { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'14','1.2':'20'}
* @arkts 1.1&1.2
*/
getDisplayY(): number;
/**
* X coordinate of the touch point relative to the left edge of the current window.
*
* @returns { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 10
*/
/**
* X coordinate of the touch point relative to the left edge of the current window.
*
* @returns { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since 11
*/
/**
* X coordinate of the touch point relative to the left edge of the current window.
*
* @returns { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'14','1.2':'20'}
* @arkts 1.1&1.2
*/
getWindowX(): number;
/**
* Y coordinate of the touch point relative to the left edge of the current window.
*
* @returns { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 10
*/
/**
* Y coordinate of the touch point relative to the left edge of the current window.
*
* @returns { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since 11
*/
/**
* Y coordinate of the touch point relative to the left edge of the current window.
*
* @returns { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'14','1.2':'20'}
* @arkts 1.1&1.2
*/
getWindowY(): number;
/**
* X coordinate of the touch point relative to the left edge of the current window. in vp.
*
* @returns { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
* @deprecated since 10
* @useinstead DragEvent#getWindowX
*/
getX(): number;
/**
* Y coordinate of the touch point relative to the left edge of the current window. in vp.
*
* @returns { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
* @deprecated since 10
* @useinstead DragEvent#getWindowY
*/
getY(): number;
/**
* If copy is COPY, this DragEvent is a copy event.
* @type { DragBehavior } Operation, if use copy then set COPY, else set MOVE.
* @default COPY
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 10
*/
/**
* If copy is COPY, this DragEvent is a copy event.
* @type { DragBehavior } Operation, if use copy then set COPY, else set MOVE.
* @default COPY
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since 11
*/
/**
* If copy is COPY, this DragEvent is a copy event.
* @type { DragBehavior } Operation, if use copy then set COPY, else set MOVE.
* @default COPY
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
dragBehavior: DragBehavior;
/**
* If useCustomDropAnimation is true, System will not use drop animation.
*
* @type { boolean }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 10
*/
/**
* If useCustomDropAnimation is true, System will not use drop animation.
*
* @type { boolean }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
useCustomDropAnimation: boolean;
/**
* Set dragData into DragEvent.
*
* @param { UnifiedData } unifiedData - dragData.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Set dragData into DragEvent.
*
* @param { UnifiedData } unifiedData - dragData.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
setData(unifiedData: UnifiedData): void;
/**
* Get dragData from DragEvent.
*
* @returns { UnifiedData } - get dragData.
* @throws { BusinessError } 190001 - Data not found.
* @throws { BusinessError } 190002 - Data error.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Get dragData from DragEvent.
*
* @returns { UnifiedData } - get dragData.
* @throws { BusinessError } 190001 - Data not found.
* @throws { BusinessError } 190002 - Data error.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
getData(): UnifiedData;
/**
* Get dragData summary from DragEvent.
*
* @returns { Summary } - get Summary Data.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Get dragData summary from DragEvent.
*
* @returns { Summary } - get Summary Data.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
getSummary(): Summary;
/**
* Set dragEvent result to DragEvent.
*
* @param { DragResult } dragResult - the return of dragEvent.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 10
*/
/**
* Set dragEvent result to DragEvent.
*
* @param { DragResult } dragResult - the return of dragEvent.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since 11
*/
/**
* Set dragEvent result to DragEvent.
*
* @param { DragResult } dragResult - the return of dragEvent.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'14','1.2':'20'}
* @arkts 1.1&1.2
*/
setResult(dragResult: DragResult): void;
/**
* Get dragEvent result from DragEvent.
*
* @returns { DragResult } - dragResult Data.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 10
*/
/**
* Get dragEvent result from DragEvent.
*
* @returns { DragResult } - dragResult Data.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since 11
*/
/**
* Get dragEvent result from DragEvent.
*
* @returns { DragResult } - dragResult Data.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'14','1.2':'20'}
* @arkts 1.1&1.2
*/
getResult(): DragResult;
/**
* Get the rectangle of drag window.
*
* @returns { Rectangle } - getPreview rectangle.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 10
*/
/**
* Get the rectangle of drag window.
*
* @returns { Rectangle } - getPreview rectangle.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since 11
*/
/**
* Get the rectangle of drag window.
*
* @returns { Rectangle } - getPreview rectangle.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'14','1.2':'20'}
* @arkts 1.1&1.2
*/
getPreviewRect(): Rectangle;
/**
* Get the x axis velocity of drag gesture.
*
* @returns { number } - get x axis velocity.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Get the x axis velocity of drag gesture.
*
* @returns { number } - get x axis velocity.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
getVelocityX(): number;
/**
* Get the y axis velocity of drag gesture.
*
* @returns { number } - get y axis velocity.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Get the y axis velocity of drag gesture.
*
* @returns { number } - get y axis velocity.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
getVelocityY(): number;
/**
* Get the velocity of drag gesture.
*
* @returns { number } - get velocity.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Get the velocity of drag gesture.
*
* @returns { number } - get velocity.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
getVelocity(): number;
/**
* Query the ModifierKey press state, support 'ctrl'|'alt'|'shift'
*
* @param { Array } keys - indicate the keys of the ModifierKey.
* @returns { boolean }
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Incorrect parameter types. 2. Parameter verification failed.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 12
*/
/**
* Query the ModifierKey press state, support 'ctrl'|'alt'|'shift'
*
* @param { Array } keys - indicate the keys of the ModifierKey.
* @returns { boolean }
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Incorrect parameter types. 2. Parameter verification failed.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 13
*/
getModifierKeyState?(keys: Array): boolean;
/**
* Query the modifier key press state, support 'ctrl'|'alt'|'shift'
*
* @type { ?ModifierKeyStateGetter }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
* @arkts 1.2
*/
getModifierKeyState?: ModifierKeyStateGetter;
/**
* Setup one drop animation execution callback, which will be triggered by system when user drops.
* Use this way to implement the custom drop animation instead of doing it in onDrop, as the system
* will decide when to trigger the callback during the drop handling.
* [Note]:
* 1. Please set useCustomDropAnimation to true as well when using this method.
* 2. Do not implement the animation no-related logics in the callback.
*
* @param { Callback } customDropAnimation - the custom drop animation function.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
executeDropAnimation(customDropAnimation: Callback): void;
/**
* Request the drag data to be synchronized to caller, can be notified with the synchronization progress.
* Only can be used in onDrop event processing.
*
* @param { DataSyncOptions } options - the data sync options.
* @returns { string } The data key returned by system, which can be used as the identify of the request.
* @throws { BusinessError } 401 - Parameter error.
* @throws { BusinessError } 190003 - Operation not allowed for current phase.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since 15
*/
startDataLoading(options: DataSyncOptions): string;
/**
* Retrieve the bundle information of the drag source application.
*
* @returns { string }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since 20
*/
getDragSource(): string;
/**
* Call this method to determine whether the current drag operation is a cross-device drag.
*
* @returns { boolean }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since 20
*/
isRemote(): boolean;
/**
* Get the id of display which the drag event is occuring on.
*
* @returns { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
*/
getDisplayId(): number;
/**
* Use this method to provide a data representation to the system instead of directly providing a complete data
* object. When the user releases the drag over the target application, the system will use this data
* representation to request the actual data from drag source. This approach significantly improves the
* efficiency of initiating drag operations for large volumes of data and enhances the effectiveness of data
* reception. It is recommended to use this method instead of the setData method.
*
* @param { DataLoadParams } dataLoadParams The data backend representation.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since 20
*/
setDataLoadParams(dataLoadParams: DataLoadParams): void;
/**
* Enable the internal drop animation, which is only avaiable for system applications.
*
* The animations' configuration need to be provided through the input paramerter, and it is a string in json format.
*
* This method can only be called in onDrop, and please do not use custom drop animation after this method,
* as it will reset the calling result, and use custom drop animation insteadly.
*
* @param { string } configuration - the internal drop animation's configuration.
* @throws { BusinessError } 202 - Permission verification failed, application which is not a system application uses system API.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 190003 - Operation not allowed for current phase.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @systemapi
* @since 20
*/
enableInternalDropAnimation(configuration: string): void;
}
/**
* The event callback function for drag and drop common interfaces.
* @typedef { function } OnDragEventCallback
* @param { DragEvent } event - the event object indicating current drag status.
* @param { string } [extraParams] - extra information set by user or system.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'15','1.2':'20'}
* @arkts 1.1&1.2
*/
declare type OnDragEventCallback = (event: DragEvent, extraParams?: string) => void;
/**
* Defines the options for the drop handling.
*
* @interface DropOptions
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'15','1.2':'20'}
* @arkts 1.1&1.2
*/
declare interface DropOptions {
/**
* Indicating to disable the UDMF data prefetch action by system or not.
* The system will try to fetch data before calling user's onDrop for some situation,
* it will retry to get data until the max time limit (2.4s for now) reaches,
* this's useful for the cross device draging operation, as the system helps to eliminate
* the communication instability, but it's redundant for startDataLoading method, as this
* method will take care the data fetching with asynchronous mechanism, so must set this
* field to true if using startDataLoading in onDrop to avoid the data is fetched before
* onDrop executing unexpectedly.
*
* @type { boolean }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'15','1.2':'20'}
* @arkts 1.1&1.2
*/
disableDataPrefetch?: boolean;
}
/**
* Import the IntentionCode type object for IntentionCode.
*
* @typedef { import('../api/@ohos.multimodalInput.intentionCode').IntentionCode } IntentionCode
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 10
*/
/**
* Import the IntentionCode type object for IntentionCode.
*
* @typedef { import('../api/@ohos.multimodalInput.intentionCode').IntentionCode } IntentionCode
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since 11
*/
declare type IntentionCode = import('../api/@ohos.multimodalInput.intentionCode').IntentionCode;
/**
* KeyEvent object description:
*
* @interface KeyEvent
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* KeyEvent object description:
*
* @interface KeyEvent
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* KeyEvent object description:
*
* @interface KeyEvent
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
declare interface KeyEvent {
/**
* Type of a key.
*
* @type { KeyType }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* Type of a key.
*
* @type { KeyType }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Type of a key.
*
* @type { KeyType }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
type: KeyType;
/**
* Key code of a key
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* Key code of a key
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Key code of a key
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
keyCode: number;
/**
* Key value of a key.
*
* @type { string }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* Key value of a key.
*
* @type { string }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Key value of a key.
*
* @type { string }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
keyText: string;
/**
* Type of the input device that triggers the current key, such as the keyboard or handle.
*
* @type { KeySource }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* Type of the input device that triggers the current key, such as the keyboard or handle.
*
* @type { KeySource }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Type of the input device that triggers the current key, such as the keyboard or handle.
*
* @type { KeySource }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
keySource: KeySource;
/**
* Indicates the ID of the input device that triggers the current key.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* Indicates the ID of the input device that triggers the current key.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Indicates the ID of the input device that triggers the current key.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
deviceId: number;
/**
* Indicates the status of the key when the key is pressed.
* The value 1 indicates the pressed state, and the value 0 indicates the unpressed state.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* Indicates the status of the key when the key is pressed.
* The value 1 indicates the pressed state, and the value 0 indicates the unpressed state.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Indicates the status of the key when the key is pressed.
* The value 1 indicates the pressed state, and the value 0 indicates the unpressed state.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
metaKey: number;
/**
* Timestamp when the key was pressed.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* Timestamp when the key was pressed.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Timestamp when the key was pressed.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
timestamp: number;
/**
* Block event bubbling.
*
* @type { function }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* Block event bubbling.
*
* @type { function }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Block event bubbling.
*
* @type { function }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
stopPropagation: () => void;
/**
* Intention code of a key or modifier keys.
*
* @type { IntentionCode }
* @default IntentionCode.INTENTION_UNKNOWN
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 10
*/
/**
* Intention code of a key or modifier keys.
*
* @type { IntentionCode }
* @default IntentionCode.INTENTION_UNKNOWN
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
intentionCode: IntentionCode;
/**
* Get the modifier keys press state, support 'ctrl'|'alt'|'shift'
*
* @param { Array } keys - indicate the modifier keys.
* @returns { boolean }
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Incorrect parameter types. 2. Parameter verification failed.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 12
*/
/**
* Get the modifier keys press state, support 'ctrl'|'alt'|'shift'
*
* @param { Array } keys - indicate the modifier keys.
* @returns { boolean }
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Incorrect parameter types. 2. Parameter verification failed.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 13
*/
getModifierKeyState?(keys: Array): boolean;
/**
* Query the modifier key press state, support 'ctrl'|'alt'|'shift'
*
* @type { ?ModifierKeyStateGetter }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
* @arkts 1.2
*/
getModifierKeyState?: ModifierKeyStateGetter;
/**
* Unicode of a key
*
* @type { ?number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since arkts {'1.1':'14','1.2':'20'}
* @arkts 1.1&1.2
*/
unicode?: number;
/**
* Whether Num Lock is on
*
* @type { ?boolean }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since 19
*/
isNumLockOn?: boolean;
/**
* Whether Caps Lock is on
*
* @type { ?boolean }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since 19
*/
isCapsLockOn?: boolean;
/**
* Whether Scroll Lock is on
*
* @type { ?boolean }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since 19
*/
isScrollLockOn?: boolean;
}
/**
* Focus axis event object description.
*
* @extends BaseEvent
* @interface FocusAxisEvent
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since arkts {'1.1':'15','1.2':'20'}
* @arkts 1.1&1.2
*/
declare interface FocusAxisEvent extends BaseEvent {
/**
* The axis values of axis event.
*
* @type { Map }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since arkts {'1.1':'15','1.2':'20'}
* @arkts 1.1&1.2
*/
axisMap: Map;
/**
* The blocking event pops up.
*
* @type { Callback }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since arkts {'1.1':'15','1.2':'20'}
* @arkts 1.1&1.2
*/
stopPropagation: Callback;
}
/**
* CrownEvent object description
*
* @interface CrownEvent
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
declare interface CrownEvent {
/**
*The timestamp of the rotating crown event.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
timestamp: number;
/**
* The angular velocity of a rotating crown.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
angularVelocity: number;
/**
* The rotation angle of the rotating crown.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
degree: number;
/**
* The behavior of rotating crown.
*
* @type { CrownAction }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
action: CrownAction;
/**
* The blocking event pops up.
*
* @type { Callback }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
stopPropagation: Callback;
}
/**
* Overlay module options
*
* @interface BindOptions
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Overlay module options
*
* @interface BindOptions
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
declare interface BindOptions {
/**
* Background color of the sheet.
* Default value: **Color.White**.
*
* @type { ?ResourceColor }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Background color of the sheet.
* Default value: **Color.White**.
*
* @type { ?ResourceColor }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
backgroundColor?: ResourceColor;
/**
* Callback for when the sheet is displayed (after the animation ends).
*
* @type { ?function }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Callback for when the sheet is displayed (after the animation ends).
*
* @type { ?function }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
onAppear?: () => void;
/**
* Callback for when the sheet disappears (after the animation ends).
*
* @type { ?function }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Callback for when the sheet disappears (after the animation ends).
*
* @type { ?function }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
onDisappear?: () => void;
/**
* Callback for when the sheet is about to be displayed (before the animation starts).
*
* @type { ?function }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
onWillAppear?: () => void;
/**
* Callback function before overlay popAnimation starts.
*
* @type { ?function }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
onWillDisappear?: () => void;
}
/**
* Component content cover dismiss
*
* @interface DismissContentCoverAction
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
declare interface DismissContentCoverAction {
/**
* Defines content cover dismiss function
*
* @type { Callback }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
dismiss: Callback;
/**
* Defines content cover dismiss reason
*
* @type { DismissReason }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
reason: DismissReason;
}
/**
* Component content cover dismiss
*
* @interface DismissContentCoverAction
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @arkts 1.2
* @since 20
*/
declare interface DismissContentCoverAction {
/**
* Defines content cover dismiss function
*
* @type { VoidCallback }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @arkts 1.2
* @since 20
*/
dismiss: VoidCallback;
/**
* Defines content cover dismiss reason
*
* @type { DismissReason }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @arkts 1.2
* @since 20
*/
reason: DismissReason;
}
/**
* Component content cover options
*
* @extends BindOptions
* @interface ContentCoverOptions
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Component content cover options
*
* @extends BindOptions
* @interface ContentCoverOptions
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
declare interface ContentCoverOptions extends BindOptions {
/**
* Defines transition type
*
* @type { ?ModalTransition }
* @default ModalTransition.DEFAULT
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Defines transition type
*
* @type { ?ModalTransition }
* @default ModalTransition.DEFAULT
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
modalTransition?: ModalTransition,
/**
* Callback function when the content cover interactive dismiss
*
* @type { ?Callback }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
onWillDismiss?: Callback;
/**
* Defines transition effect param
*
* @type { ?TransitionEffect }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
transition?: TransitionEffect;
/**
* Set contentCover content adapts to safeArea.
*
* @type { ?boolean }
* @default false
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
*/
enableSafeArea?: boolean;
}
/**
* Component sheet title options
*
* @interface SheetTitleOptions
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
/**
* Component sheet title options
*
* @interface SheetTitleOptions
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
declare interface SheetTitleOptions {
/**
* Defines title text
*
* @type { ResourceStr }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
/**
* Defines title text
*
* @type { ResourceStr }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
title: ResourceStr;
/**
* Defines subtitle text
*
* @type { ?ResourceStr }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
/**
* Defines subtitle text
*
* @type { ?ResourceStr }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
subtitle?: ResourceStr;
}
/**
* Defines the sheet type.
*
* @enum { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
/**
* Defines the sheet type.
*
* @enum { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
declare enum SheetType {
/**
* Bottom sheet.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
/**
* Bottom sheet.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
BOTTOM = 0,
/**
* Center sheet.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
/**
* Center sheet.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
CENTER = 1,
/**
* Popup sheet. The popup sheet cannot be dismissed with a pull-down gesture.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
/**
* Defines popup sheet type.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
POPUP = 2,
/**
* Defines side sheet type.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
*/
SIDE = 3,
/**
* Defines content cover type.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
*/
CONTENT_COVER = 4,
}
/**
* Define the display mode of the sheet.
*
* @enum { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
declare enum SheetMode {
/**
* The sheet is displayed at the top of the window corresponding to the current **UIContext** instance,
* above all pages. It is displayed at the same level as dialog boxes.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
OVERLAY = 0,
/**
* The sheet is displayed at the top of the current page.
* **NOTE** Currently, the sheet can only be mounted on a **Page**
* or **NavDestination** node, with priority given to the **NavDestination**
* node if it is present. This means that, the sheet can only be displayed at
* the top of these two types of pages. In this mode, new pages can overlay
* the sheet, and when the user returns to the previous page, the sheet remains
* present without losing its content. In this mode, you must ensure that
* the target page node, such as the **Page** node, has been attached to the tree
* before bringing up the sheet; otherwise, the sheet will not be able to be
* attached to the corresponding page node.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
EMBEDDED = 1,
}
/**
* Define the scroll size mode of the sheet.
*
* @enum { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
declare enum ScrollSizeMode {
/**
* Sheet change scroll size after the slide ends.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
FOLLOW_DETENT = 0,
/**
* Sheet change scroll size during the sliding process.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
CONTINUOUS = 1,
}
/**
* Define the mode of sheet how to avoid keyboard.
*
* @enum { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'13','1.2':'20'}
* @arkts 1.1&1.2
*/
declare enum SheetKeyboardAvoidMode {
/**
* Sheet will not aovid keyboard.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'13','1.2':'20'}
* @arkts 1.1&1.2
*/
NONE = 0,
/**
* Firstly sheet will avoid keyboard by changing its height.
* And then sheet will avoid by resizing after reaching its maximum height.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'13','1.2':'20'}
* @arkts 1.1&1.2
*/
TRANSLATE_AND_RESIZE = 1,
/**
* Sheet will only avoid keyboard by resizing the content.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'13','1.2':'20'}
* @arkts 1.1&1.2
*/
RESIZE_ONLY = 2,
/**
* Firstly sheet will avoid keyboard by changing its height.
* And then sheet will avoid keyboard by scrolling after reaching its maximum height.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'13','1.2':'20'}
* @arkts 1.1&1.2
*/
TRANSLATE_AND_SCROLL = 3,
/**
* Popup sheet will avoid keyboard by default.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
*/
POPUP_SHEET = 4,
}
/**
* Component sheet dismiss
*
* @interface SheetDismiss
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
/**
* Component sheet dismiss
*
* @interface SheetDismiss
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
declare interface SheetDismiss {
/**
* Defines sheet dismiss function
*
* @type { function }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
/**
* Defines sheet dismiss function
*
* @type { function }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
dismiss: () => void;
}
/**
* Component sheet dismiss
*
* @interface SheetDismiss
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
* @arkts 1.2
*/
declare interface SheetDismiss {
/**
* Defines sheet dismiss function
*
* @type { VoidCallback }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
* @arkts 1.2
*/
dismiss: VoidCallback;
}
/**
* Component sheet dismiss
*
* @interface DismissSheetAction
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
declare interface DismissSheetAction {
/**
* Defines sheet dismiss function
*
* @type { Callback }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
dismiss: Callback;
/**
* Dismiss reason type.
*
* @type { DismissReason }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
reason: DismissReason;
}
/**
* Component sheet dismiss
*
* @interface DismissSheetAction
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
* @arkts 1.2
*/
declare interface DismissSheetAction {
/**
* Defines sheet dismiss function
*
* @type { VoidCallback }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
* @arkts 1.2
*/
dismiss: VoidCallback;
/**
* Dismiss reason type.
*
* @type { DismissReason }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
* @arkts 1.2
*/
reason: DismissReason;
}
/**
* Defines sheet spring back action
*
* @interface SpringBackAction
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
declare interface SpringBackAction {
/**
* Defines spring back function
*
* @type { Callback }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
springBack: Callback;
}
/**
* Defines sheet spring back action
*
* @interface SpringBackAction
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
* @arkts 1.2
*/
declare interface SpringBackAction {
/**
* Defines spring back function
*
* @type { VoidCallback }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
* @arkts 1.2
*/
springBack: VoidCallback;
}
/**
* Defines the detent array of a single length.
*
* @typedef { [SheetSize | Length] } SingleLengthDetent
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
* @arkts 1.2
*/
declare type SingleLengthDetent = [SheetSize | Length];
/**
* Defines the detent array of a two-length.
*
* @typedef { [(SheetSize | Length), SheetSize | Length | undefined] } DoubleLengthDetents
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
* @arkts 1.2
*/
declare type DoubleLengthDetents = [(SheetSize | Length), SheetSize | Length | undefined];
/**
* Defines the detent array of a three-length.
*
* @typedef { [(SheetSize | Length), SheetSize | Length | undefined, SheetSize | Length | undefined] } TripleLengthDetents
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
* @arkts 1.2
*/
declare type TripleLengthDetents = [(SheetSize | Length), SheetSize | Length | undefined, SheetSize | Length | undefined];
/**
* Component sheet options
*
* @extends BindOptions
* @interface SheetOptions
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Component sheet options
*
* @extends BindOptions
* @interface SheetOptions
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
declare interface SheetOptions extends BindOptions {
/**
* Defines sheet height
*
* @type { ?(SheetSize | Length) }
* @default SheetSize.LARGE
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Defines sheet height
*
* @type { ?(SheetSize | Length) }
* @default SheetSize.LARGE
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
height?: SheetSize | Length;
/**
* Whether to display the drag bar.
* **NOTE** By default, the drag bar is displayed only when the sheet's
* **detents** attribute is set to multiple heights and the settings take effect.
*
* @type { ?boolean }
* @default true
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Whether to display the drag bar.
* **NOTE** By default, the drag bar is displayed only when the sheet's
* **detents** attribute is set to multiple heights and the settings take effect.
*
* @type { ?boolean }
* @default true
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
dragBar?: boolean;
/**
* Defines whether the sheet dragbar is floating, when it's displayed.
*
* @type { ?boolean }
* @default false
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
*/
enableFloatingDragBar?: boolean;
/**
* Defines transition type when preferType is SheetType.CONTENT_COVER.
*
* @type { ?ModalTransition }
* @default ModalTransition.DEFAULT
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
*/
modalTransition?: ModalTransition;
/**
* Mask color of the sheet.
*
* @type { ?ResourceColor }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Mask color of the sheet.
*
* @type { ?ResourceColor }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
maskColor?: ResourceColor;
/**
* Defines sheet detents
* @type { ?[(SheetSize | Length), (SheetSize | Length)?, (SheetSize | Length)?] }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
/**
* Array of heights where the sheet can rest.
*
**NOTE**:
* Since API version 12, this attribute takes effect for a bottom sheet in landscape mode.
* In earlier versions, this attribute takes effect only for the bottom sheet in portrait mode.
* The first height in the tuple is the initial height.
* The sheet can switch between heights by dragging.
* After the sheet is dragged and released, it switches to the target height or remains at the current height,
* depending on the velocity and distance.
* If the velocity exceeds the threshold, the sheet switches to the target height in the same direction as the
* velocity.
* If the velocity is less than the threshold, the displacement distance is used for judgement.
* If the displacement distance is greater than 1/2 of the distance between the current and target positions,
* the sheet switches to the target height in the same direction as the velocity; otherwise, the sheet remains at the
* current height.
* Velocity threshold: 1000; Distance threshold: 50%.
*
*
* @type { ?[(SheetSize | Length), (SheetSize | Length)?, (SheetSize | Length)?] }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
detents?: [(SheetSize | Length), (SheetSize | Length)?, (SheetSize | Length)?];
/**
* Defines sheet detents
*
* @type { ?(SingleLengthDetent | DoubleLengthDetents | TripleLengthDetents) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
* @arkts 1.2
*/
detents?: SingleLengthDetent | DoubleLengthDetents | TripleLengthDetents;
/**
* Background blur of the sheet. By default, there is no background blur.
*
* @type { ?BlurStyle }
* @default BlurStyle.NONE
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
/**
* Background blur of the sheet. By default, there is no background blur.
*
* @type { ?BlurStyle }
* @default BlurStyle.NONE
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
blurStyle?: BlurStyle;
/**
* Defines whether the close icon is displayed
*
* @type { ?(boolean | Resource) }
* @default true
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
/**
* Defines whether the close icon is displayed
*
* @type { ?(boolean | Resource) }
* @default true
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
showClose?: boolean | Resource;
/**
* Type of the sheet.
* **NOTE** The types supported by the sheet vary by window.
* 1. Width < 600 vp: bottom.
* 2. 600 vp <= Width: bottom, center, and popup (default).
* 3. Width >= 840 vp: bottom, center, and popup (default).
*
* @type { ?(SheetType.CENTER | SheetType.POPUP) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
/**
* Type of the sheet.
* **NOTE** The types supported by the sheet vary by window.
* 1. Width < 600 vp: bottom.
* 2. 600 vp <= Width: bottom, center, and popup (default).
* 3. Width >= 840 vp: bottom, center, and popup (default).
*
* @type { ?SheetType }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
preferType?: SheetType;
/**
* Title of the sheet.
*
* @type { ?(SheetTitleOptions | CustomBuilder) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
/**
* Title of the sheet.
*
* @type { ?(SheetTitleOptions | CustomBuilder) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
title?: SheetTitleOptions | CustomBuilder;
/**
* Callback invoked when the user performs an interactive dismiss operation: pulling down or clicking
* the back button, the mask, or the close icon. **NOTE** If this callback is registered, the
* sheet is not dismissed immediately when the user performs the above operations. To dismiss the sheet,
* you must call **shouldDismiss.dismiss()** in the callback. If this callback is not registered, the
* sheet is dismissed immediately when the user performs the above operations, without any additional
* behavior. It is recommended that this API be used in scenarios where a secondary confirmation is required.
*
* @type { ?function }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
/**
* Callback invoked when the user performs an interactive dismiss operation: pulling down or clicking
* the back button, the mask, or the close icon. **NOTE** If this callback is registered, the
* sheet is not dismissed immediately when the user performs the above operations. To dismiss the sheet,
* you must call **shouldDismiss.dismiss()** in the callback. If this callback is not registered, the
* sheet is dismissed immediately when the user performs the above operations, without any additional
* behavior. It is recommended that this API be used in scenarios where a secondary confirmation is required.
*
* @type { ?function }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
shouldDismiss?: (sheetDismiss: SheetDismiss) => void;
/**
* Callback invoked when the user performs an interactive dismiss operation:
* pulling down or clicking the back button, the mask, or the close icon,
* to obtain the type of dismiss operation and decide whether to dismiss the sheet.
*
**NOTE**:
* If this callback is registered, the sheet is not dismissed immediately when the user performs the above
* operations.
* Instead, you can use the DismissSheetAction parameter in the callback to determine the type of
* dismiss operation and decide whether to dismiss the sheet.
* If this callback is not registered, the sheet is dismissed immediately when the user performs the above
* operations, without any additional behavior.
* No further interception with onWillDismiss is allowed in an onWillDismiss callback.
*
*
* @type { ?Callback }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
onWillDismiss?: Callback;
/**
* Callback invoked when the user performs a pull-down-to-dismiss gesture, to control the bounce effect.
*
**NOTE**:
* If this callback is registered along with **shouldDismiss** or **onWillDismiss** you can control whether the
* sheet bounces back during the pull-down-to-dismiss operation by calling **springBack** in the callback.
* If this callback is not registered but **shouldDismiss** or **onWillDismiss** is registered, the sheet will
* bounce back before remaining open or being dismissed based on the callback behavior.
* If neither this callback nor **shouldDismiss** or **onWillDismiss** is registered, the sheet is dismissed by
* default during the pull-down-to-dismiss operation.
*
*
* @type { ?Callback }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
onWillSpringBackWhenDismiss?: Callback;
/**
* Whether to allow users to interact with the page pertaining to the sheet.
* **NOTE** The value **true** means that interactions are allowed, in which
* case no mask is not displayed. The value **false** means that interactions are not
* allowed, in which case a mask is displayed. If this parameter is not set, interactions
* are allowed for the popup sheet, but not for bottom and center sheets. If this parameter
* is set to **true**, the setting of **maskColor** does not take effect.
*
* @type { ?boolean }
* @default false
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
/**
* Whether to allow users to interact with the page pertaining to the sheet.
* **NOTE** The value **true** means that interactions are allowed, in which
* case no mask is not displayed. The value **false** means that interactions are not
* allowed, in which case a mask is displayed. If this parameter is not set, interactions
* are allowed for the popup sheet, but not for bottom and center sheets. If this parameter
* is set to **true**, the setting of **maskColor** does not take effect.
*
* @type { ?boolean }
* @default false
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
enableOutsideInteractive?: boolean;
/**
* Width of the sheet.
* Percentage parameter method: Set the width of the sheet as a percentage of the width of the parent element.
*
* @type { ?Dimension }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
width?: Dimension;
/**
* Border width of the sheet.
* You can set the width for all four sides or set separate widths for individual sides.
* Default value: **0**.
* Percentage parameter method:
* Set the border width of the sheet as a percentage of the width of the parent element.
* If the left and right border widths of the sheet are greater than the width of the sheet, and the top
* and bottom border widths are greater than the height of the sheet, the display may not appear as expected.
*
**Note**:
* For bottom sheets, the bottom border width setting is ineffective.
*
*
* @type { ?(Dimension | EdgeWidths | LocalizedEdgeWidths) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
borderWidth?: Dimension | EdgeWidths | LocalizedEdgeWidths;
/**
* Border color of the sheet.
* **borderColor** must be used with **borderWidth** in pairs.
*
**NOTE**:
* For bottom sheets, the bottom border color setting is ineffective.
*
**Note**:
* For a bottom sheet, the height of each frame is only returned when there are changes in detents or during drag
* actions.
* When the sheet is pulled up or making space for the soft keyboard, only the final height is returned.
* For other types of sheets, the final height is only returned when the sheet is pulled up.
* The return value is in px.
*
*
* @type { ?Callback }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
onHeightDidChange?: Callback;
/**
* Determine the level sheet shows, whether sheet should be displayed within the page.
*
* @type { ?SheetMode }
* @default SheetMode.OVERLAY
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
mode?: SheetMode;
/**
* Content update mode of the sheet when it is scrolled.
*
* @type { ?ScrollSizeMode }
* @default ScrollSizeMode.FELLOW_DETEND
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
scrollSizeMode?: ScrollSizeMode;
/**
* Callback for changes in the detents of the sheet.
*
**NOTE**:
* For a bottom sheet, the final height is returned when there are changes in detents.
* The return value is in px.
*
NOTE:
* This API is effective only in sheet transition.
*
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
SLIDE_DOWN = 3,
/**
* Slide, not slide down.
* Default means slide right, after mirroring it means slide left.
* Choosing to slide left or slide right is not supported.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
*/
SLIDE = 4,
}
/**
* Component popup dismiss
*
* @interface DismissPopupAction
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
declare interface DismissPopupAction {
/**
* Defines popup dismiss function
*
* @type { Callback }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
dismiss: Callback;
/**
* Defines popup dismiss reason
*
* @type { DismissReason }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
reason: DismissReason;
}
/**
* Popup state change param
*
* @interface PopupStateChangeParam
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
declare interface PopupStateChangeParam {
/**
* is Visible.
*
* @type { boolean }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
isVisible: boolean;
}
/**
* Popup state change callback
*
* @typedef { function } PopupStateChangeCallback
* @param { PopupStateChangeParam } event - The parameter of state change callback.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
declare type PopupStateChangeCallback = (event: PopupStateChangeParam) => void;
/**
* Popup mask type
*
* @interface PopupMaskType
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
declare interface PopupMaskType {
/**
* Color.
*
* @type { ResourceColor }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
color: ResourceColor;
}
/**
* Popup border LinearGradient
*
* @interface PopupBorderLinearGradient
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
*/
declare interface PopupBorderLinearGradient {
/**
* direction: Direction of Linear Gradient. The default value is GradientDirection.Bottom;
*
* @type { ?GradientDirection }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
*/
direction?: GradientDirection;
/**
* Defines color description for gradients.
* number: The position of the color stop. The value range is 0 to 1.
*
* @type { Array<[ResourceColor, number]> }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
*/
colors: Array<[ResourceColor, number]>;
}
/**
* Popup common options
*
* @interface PopupCommonOptions
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
declare interface PopupCommonOptions {
/**
* placement of popup.
*
* @type { ?Placement }
* @default Placement.Bottom
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
placement?: Placement;
/**
* Set the background color of the popup.
*
* @type { ?ResourceColor }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
popupColor?: ResourceColor;
/**
* whether show arrow
*
* @type { ?boolean }
* @default true
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
enableArrow?: boolean;
/**
* Whether hide popup when click mask
*
* @type { ?boolean }
* @default true
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
autoCancel?: boolean;
/**
* on State Change
*
* @type { ?function }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
onStateChange?: PopupStateChangeCallback;
/**
* The offset of the sharp corner of popup.
*
* @type { ?Length }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
arrowOffset?: Length;
/**
* Whether to display in the sub window.
*
* @type { ?boolean }
* @default false
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
showInSubWindow?: boolean;
/**
* The mask to block gesture events of popup.
* When mask is set false, gesture events are not blocked.
* When mask is set true, gesture events are blocked and mask color is transparent.
*
* @type { ?(boolean | PopupMaskType) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
mask?: boolean | PopupMaskType;
/**
* Sets the space of between the popup and target.
*
* @type { ?Length }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
targetSpace?: Length;
/**
* Sets the position offset of the popup.
*
* @type { ?Position }
* @default { x: 0, y: 0 }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
offset?: Position;
/**
* Set the width of the popup.
*
* @type { ?Dimension }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
width?: Dimension;
/**
* The position of the sharp corner of popup.
*
* @type { ?ArrowPointPosition }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
arrowPointPosition?: ArrowPointPosition;
/**
* The width of the arrow.
*
* @type { ?Dimension }
* @default 16.0_vp.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
arrowWidth?: Dimension;
/**
* The height of the arrow.
*
* @type { ?Dimension }
* @default 8.0_vp.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
arrowHeight?: Dimension;
/**
* The round corners of the popup.
*
* @type { ?Dimension }
* @default 20.0_vp.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
radius?: Dimension;
/**
* The style of popup Shadow.
*
* @type { ?(ShadowOptions | ShadowStyle) }
* @default ShadowStyle.OUTER_DEFAULT_MD.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
shadow?: ShadowOptions | ShadowStyle;
/**
* Defines popup background blur Style
*
* @type { ?BlurStyle }
* @default BlurStyle.COMPONENT_ULTRA_THICK
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
backgroundBlurStyle?: BlurStyle;
/**
* Set popup focusable
*
* @type { ?boolean }
* @default false
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
focusable?: boolean;
/**
* Defines the transition effect of popup opening and closing
*
* @type { ?TransitionEffect }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
transition?: TransitionEffect;
/**
* Callback function when the popup interactive dismiss.
* Use boolean to respond all interactive dismiss event. Use Callback to customize which event should be responded.
*
* @type { ?(boolean | Callback) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
onWillDismiss?: boolean | Callback;
/**
* Determine if it is compatible popup's half folded.
*
* @type { ?boolean }
* @default false
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
enableHoverMode?: boolean;
/**
* Determine if popup can follow the target node when it has rotation or scale.
*
* @type { ?boolean }
* @default false
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
followTransformOfTarget?: boolean;
/**
* Determine if popup can avoid the target when the display space is insufficient.
*
* @type { ?AvoidanceMode }
* @default AvoidanceMode.COVER_TARGET
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
*/
avoidTarget?: AvoidanceMode;
/**
* The width of popup's outline.
*
* @type { ?Dimension }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
*/
outlineWidth?: Dimension;
/**
* The width of popup's border.
*
* @type { ?Dimension }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
*/
borderWidth?: Dimension;
/**
* The LinearGradient of popup's outline.
*
* @type { ?PopupBorderLinearGradient }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
*/
outlineLinearGradient?: PopupBorderLinearGradient;
/**
* The LinearGradient of popup's innerline.
*
* @type { ?PopupBorderLinearGradient }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
*/
borderLinearGradient?: PopupBorderLinearGradient;
}
/**
* Defines the Tips options.
*
* @interface TipsOptions
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'19','1.2':'20'}
* @arkts 1.1&1.2
*/
declare interface TipsOptions {
/**
* Defines the delay time for appearing.
*
* @type { ?number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'19','1.2':'20'}
* @arkts 1.1&1.2
*/
appearingTime?: number;
/**
* Defines the delay time for disappearing.
*
* @type { ?number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'19','1.2':'20'}
* @arkts 1.1&1.2
*/
disappearingTime?: number;
/**
* Define the delay time for the appearance of continuous operations.
*
* @type { ?number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'19','1.2':'20'}
* @arkts 1.1&1.2
*/
appearingTimeWithContinuousOperation?: number;
/**
* Define the delay time for the disappearance of continuous operations.
*
* @type { ?number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'19','1.2':'20'}
* @arkts 1.1&1.2
*/
disappearingTimeWithContinuousOperation?: number;
/**
* whether show arrow
*
* @type { ?boolean }
* @default true
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'19','1.2':'20'}
* @arkts 1.1&1.2
*/
enableArrow?: boolean;
/**
* The position of the sharp corner of Tips.
*
* @type { ?ArrowPointPosition }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'19','1.2':'20'}
* @arkts 1.1&1.2
*/
arrowPointPosition?: ArrowPointPosition;
/**
* The width of the arrow.
*
* @type { ?Dimension }
* @default 16.0_vp.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'19','1.2':'20'}
* @arkts 1.1&1.2
*/
arrowWidth?: Dimension;
/**
* The height of the arrow.
*
* @type { ?Dimension }
* @default 8.0_vp.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'19','1.2':'20'}
* @arkts 1.1&1.2
*/
arrowHeight?: Dimension;
/**
* The position of the tips.
*
* @type { ?TipsAnchorType }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
*/
showAtAnchor?: TipsAnchorType;
}
/**
* Defines the popup button.
*
* @interface PopupButton
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
* @arkts 1.2
*/
declare interface PopupButton {
/**
* Button text value
*
* @type { string }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
* @arkts 1.2
*/
value: string;
/**
* action
*
* @type { VoidCallback }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
* @arkts 1.2
*/
action: VoidCallback;
}
/**
* Defines the popup options.
*
* @interface PopupOptions
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* Defines the popup options.
*
* @interface PopupOptions
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Defines the popup options.
*
* @interface PopupOptions
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
declare interface PopupOptions {
/**
* Information in the pop-up window.
*
* @type { string }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* Information in the pop-up window.
*
* @type { string }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Content of the popup message.
*
* @type { string }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
message: string;
/**
* placement On Top
*
* @type { ?boolean }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
* @deprecated since 10
* @useinstead PopupOptions#placement
*/
placementOnTop?: boolean;
/**
* The placement of popup.
* Supports all positions defined in Placement.
*
* @type { ?Placement }
* @default Placement.Bottom
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* The placement of popup.
* Supports all positions defined in Placement.
*
* @type { ?Placement }
* @default Placement.Bottom
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
placement?: Placement;
/**
* The first button.
*
* @type { ?object }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* The first button.
*
* @type { ?object }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* The first button.
*
* @type { ?object }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 11
*/
primaryButton?: {
/**
* Button text value
*
* @type { string }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* Button text value
*
* @type { string }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Button text value
*
* @type { string }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 11
*/
value: string;
/**
* action
*
* @type { function }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* action
*
* @type { function }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* action
*
* @type { function }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 11
*/
action: () => void;
};
/**
* The first button.
*
* @type { ?PopupButton }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
* @arkts 1.2
*/
primaryButton?: PopupButton;
/**
* The second button.
*
* @type { ?object }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* The second button.
*
* @type { ?object }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* The second button.
*
* @type { ?object }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 11
*/
secondaryButton?: {
/**
* Button text value
*
* @type { string }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* Button text value
*
* @type { string }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Button text value
*
* @type { string }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 11
*/
value: string;
/**
* action
*
* @type { function }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* action
*
* @type { function }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* action
*
* @type { function }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 11
*/
action: () => void;
};
/**
* The second button.
*
* @type { ?PopupButton }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
* @arkts 1.2
*/
secondaryButton?:PopupButton
/**
* on State Change
*
* @type { ?function }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* on State Change
*
* @type { ?function }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* on State Change
*
* @type { ?function }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 11
*/
onStateChange?: (event: {
/**
* is Visible.
*
* @type { boolean }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* is Visible.
*
* @type { boolean }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 11
*/
isVisible: boolean
}) => void;
/**
* on State Change
*
* @type { ?PopupStateChangeCallback }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
* @arkts 1.2
*/
onStateChange?: PopupStateChangeCallback;
/**
* The offset of the sharp corner of popup.
*
* @type { ?Length }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 9
*/
/**
* The offset of the sharp corner of popup.
*
* @type { ?Length }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* The offset of the sharp corner of popup.
*
* @type { ?Length }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
arrowOffset?: Length;
/**
* Whether to display in the sub window.
*
* @type { ?boolean }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 9
*/
/**
* Whether to display in the sub window.
*
* @type { ?boolean }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Whether to display in the sub window.
*
* @type { ?boolean }
* @default false
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
showInSubWindow?: boolean;
/**
* The mask to block gesture events of popup.
* When mask is set false, gesture events are not blocked.
* When mask is set true, gesture events are blocked and mask color is transparent.
*
* @type { ?(boolean | { color: ResourceColor }) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* The mask to block gesture events of popup.
* When mask is set false, gesture events are not blocked.
* When mask is set true, gesture events are blocked and mask color is transparent.
*
* @type { ?(boolean | { color: ResourceColor }) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 11
*/
mask?: boolean | { color: ResourceColor };
/**
* The mask to block gesture events of popup.
* When mask is set false, gesture events are not blocked.
* When mask is set true, gesture events are blocked and mask color is transparent.
*
* @type { ?(boolean | PopupMaskType) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
* @arkts 1.2
*/
mask?: boolean | PopupMaskType;
/**
* Sets the options of popup message.
*
* @type { ?PopupMessageOptions }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Parameters of the popup message.
*
* @type { ?PopupMessageOptions }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
messageOptions?: PopupMessageOptions
/**
* Sets the space of between the popup and target.
*
* @type { ?Length }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Sets the space of between the popup and target.
*
* @type { ?Length }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
targetSpace?: Length
/**
* whether show arrow
*
* @type { ?boolean }
* @default true
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 10
*/
/**
* whether show arrow
*
* @type { ?boolean }
* @default true
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
enableArrow?: boolean;
/**
* Sets the position offset of the popup.
*
* @type { ?Position }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Sets the position offset of the popup.
*
* @type { ?Position }
* @default { x: 0, y: 0 }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
offset?: Position
/**
* Set the background color of the popup.
*
* @type { ?(Color | string | Resource | number) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
/**
* Set the background color of the popup.
*
* @type { ?(Color | string | Resource | number) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
popupColor?: Color | string | Resource | number;
/**
* Whether hide popup when click mask.
*
* @type { ?boolean }
* @default true
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
/**
* Whether hide popup when click mask.
*
* @type { ?boolean }
* @default true
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
autoCancel?: boolean;
/**
* Set the width of the popup.
*
* @type { ?Dimension }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
/**
* Set the width of the popup.
*
* @type { ?Dimension }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
width?: Dimension;
/**
* The position of the sharp corner of popup.
*
* @type { ?ArrowPointPosition }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
/**
* The position of the sharp corner of popup.
*
* @type { ?ArrowPointPosition }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
arrowPointPosition?: ArrowPointPosition;
/**
* The width of the arrow.
*
* @type { ?Dimension }
* @default 16.0_vp.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
/**
* The width of the arrow.
*
* @type { ?Dimension }
* @default 16.0_vp.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
arrowWidth?: Dimension;
/**
* The height of the arrow.
*
* @type { ?Dimension }
* @default 8.0_vp.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
/**
* The height of the arrow.
*
* @type { ?Dimension }
* @default 8.0_vp.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
arrowHeight?: Dimension;
/**
* The round corners of the popup.
*
* @type { ?Dimension }
* @default 20.0_vp.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
/**
* The round corners of the popup.
*
* @type { ?Dimension }
* @default 20.0_vp.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
radius?: Dimension;
/**
* The style of popup Shadow.
*
* @type { ?(ShadowOptions | ShadowStyle) }
* @default ShadowStyle.OUTER_DEFAULT_MD.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
/**
* The style of popup Shadow.
*
* @type { ?(ShadowOptions | ShadowStyle) }
* @default ShadowStyle.OUTER_DEFAULT_MD.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
shadow?: ShadowOptions | ShadowStyle;
/**
* Defines popup background blur Style
*
* @type { ?BlurStyle }
* @default BlurStyle.COMPONENT_ULTRA_THICK
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
/**
* Defines popup background blur Style
*
* @type { ?BlurStyle }
* @default BlurStyle.COMPONENT_ULTRA_THICK
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
backgroundBlurStyle?: BlurStyle;
/**
* Defines the transition effect of popup opening and closing
*
* @type { ?TransitionEffect }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
transition?: TransitionEffect;
/**
* Callback function when the popup interactive dismiss
*
* @type { ?(boolean | Callback) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
onWillDismiss?: boolean | Callback;
/**
* Determine if it is compatible popup's half folded.
*
* @type { ?boolean }
* @default false
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
enableHoverMode?: boolean;
/**
* Determine if popup can follow the target node when it has rotation or scale.
*
* @type { ?boolean }
* @default false
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'13','1.2':'20'}
* @arkts 1.1&1.2
*/
followTransformOfTarget?: boolean;
/**
* Define the popup avoid keyboard mode.
*
* @type { ?KeyboardAvoidMode }
* @default KeyboardAvoidMode.NONE
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'15','1.2':'20'}
* @arkts 1.1&1.2
*/
keyboardAvoidMode?: KeyboardAvoidMode;
/**
* Determine if popup can avoid the target when the display space is insufficient.
*
* @type { ?AvoidanceMode }
* @default AvoidanceMode.COVER_TARGET
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
*/
avoidTarget?: AvoidanceMode;
/**
* The width of popup's outline.
*
* @type { ?Dimension }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
*/
outlineWidth?: Dimension;
/**
* The width of popup's border.
*
* @type { ?Dimension }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
*/
borderWidth?: Dimension;
/**
* The LinearGradient of popup's outline.
*
* @type { ?PopupBorderLinearGradient }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
*/
outlineLinearGradient?: PopupBorderLinearGradient;
/**
* The LinearGradient of popup's innerline.
*
* @type { ?PopupBorderLinearGradient }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
*/
borderLinearGradient?: PopupBorderLinearGradient;
}
/**
* Defines the custom popup options.
*
* @interface CustomPopupOptions
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 8
*/
/**
* Defines the custom popup options.
*
* @interface CustomPopupOptions
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Defines the custom popup options.
*
* @interface CustomPopupOptions
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
declare interface CustomPopupOptions {
/**
* builder of popup
*
* @type { CustomBuilder }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 8
*/
/**
* builder of popup
*
* @type { CustomBuilder }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Popup builder.
*
NOTE:
* The popup attribute is a universal attribute. A custom popup does not support display of another popup.
* The position attribute cannot be used for the first-layer container in the builder.
* If the position attribute is used, the popup will not be displayed.
* If a custom component is used in the builder, the aboutToAppear and aboutToDisappear lifecycle callbacks
* of the custom component are irrelevant to the visibility of the popup. As such, the lifecycle of the
* custom component cannot be used to determine whether the popup is displayed or not.
*
*
* @type { CustomBuilder }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
builder: CustomBuilder;
/**
* placement of popup
*
* @type { ?Placement }
* @default Placement.Bottom
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 8
*/
/**
* placement of popup
*
* @type { ?Placement }
* @default Placement.Bottom
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Preferred position of the popup. If the set position is insufficient for holding the popup,
* it will be automatically adjusted.
*
* @type { ?Placement }
* @default Placement.Bottom
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
placement?: Placement;
/**
* mask color of popup
*
* @type { ?(Color | string | Resource | number) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 8
* @deprecated since 10
* @useinstead CustomPopupOptions#mask
*/
maskColor?: Color | string | Resource | number;
/**
* background color of popup
*
* @type { ?(Color | string | Resource | number) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 8
*/
/**
* background color of popup
*
* @type { ?(Color | string | Resource | number) }
* @default '#4d4d4d'
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Color of the popup. To remove the background blur, set backgroundBlurStyle to BlurStyle.NONE.
*
* @type { ?(Color | string | Resource | number) }
* @default TRANSPARENT plus COMPONENT_ULTRA_THICK
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
popupColor?: Color | string | Resource | number;
/**
* whether show arrow
*
* @type { ?boolean }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 8
*/
/**
* whether show arrow
*
* @type { ?boolean }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* whether show arrow
*
* @type { ?boolean }
* @default true
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
enableArrow?: boolean;
/**
* whether hide popup when click mask.
*
* @type { ?boolean }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 8
*/
/**
* whether hide popup when click mask.
*
* @type { ?boolean }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Whether to automatically dismiss the popup when an operation is performed on the page.
*
NOTE:
* To enable the popup to disappear upon a click on it, place a layout component in the builder place the
* component in the layout component, and modify the value of the bindPopup variable (show: boolean)
* in the onClick event of the layout component.
*
*
* @type { ?boolean }
* @default true
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
autoCancel?: boolean;
/**
* on State Change
*
* @type { ?function }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 8
*/
/**
* on State Change
*
* @type { ?function }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Callback for the popup status change event.
*
* @type { ?function }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 11
*/
onStateChange?: (event: {
/**
* is Visible.
*
* @type { boolean }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* is Visible.
*
* @type { boolean }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 11
*/
isVisible: boolean
}) => void;
/**
* on State Change
*
* @type { ?PopupStateChangeCallback }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
* @arkts 1.2
*/
onStateChange?: PopupStateChangeCallback;
/**
* The offset of the sharp corner of popup.
*
* @type { ?Length }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 9
*/
/**
* The offset of the sharp corner of popup.
*
* @type { ?Length }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* The offset of the sharp corner of popup.
*
* Offset of the popup arrow relative to the popup. When the arrow is at the top or bottom of the popup:
* The value 0 indicates that the arrow is located on the leftmost, and any other value indicates the distance
* from the arrow to the leftmost; the arrow is centered by default. When the arrow is on the left or right
* side of the popup: The value indicates the distance from the arrow to the top; the arrow is centered by
* default. When the popup is displayed on either edge of the screen, it will automatically deviate leftward
* or rightward to stay within the safe area. When the value is 0, the arrow always points to the bound component.
*
* @type { ?Length }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
arrowOffset?: Length;
/**
* Whether to display in the sub window.
*
* @type { ?boolean }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 9
*/
/**
* Whether to display in the sub window.
*
* @type { ?boolean }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Whether to display in the sub window.
*
* @type { ?boolean }
* @default false
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
showInSubWindow?: boolean;
/**
* The mask to block gesture events of popup.
* When mask is set false, gesture events are not blocked.
* When mask is set true, gesture events are blocked and mask color is transparent.
*
* @type { ?(boolean | { color: ResourceColor }) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Whether to apply a mask to the popup.
* The value true means to apply a transparent mask to the popup, false means not to apply a mask to the popup,
* and a color value means to apply a mask in the corresponding color to the popup.
*
* @type { ?(boolean | { color: ResourceColor }) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 11
*/
mask?: boolean | { color: ResourceColor };
/**
* The mask to block gesture events of popup.
* When mask is set false, gesture events are not blocked.
* When mask is set true, gesture events are blocked and mask color is transparent.
*
* @type { ?(boolean | PopupMaskType) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
* @arkts 1.2
*/
mask?: boolean | PopupMaskType;
/**
* Sets the space of between the popup and target.
*
* @type { ?Length }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Sets the space of between the popup and target.
*
* @type { ?Length }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
targetSpace?: Length
/**
* Sets the position offset of the popup.
*
* @type { ?Position }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Sets the position offset of the popup.
*
* @type { ?Position }
* @default { x: 0, y: 0 }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
offset?: Position
/**
* Set the width of the popup.
*
* @type { ?Dimension }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
/**
* Width of the popup.
*
* @type { ?Dimension }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
width?: Dimension;
/**
* The position of the sharp corner of popup.
*
* @type { ?ArrowPointPosition }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
/**
* Position of the popup arrow relative to its parent component. Available positions are Start, Center, and End,
* in both vertical and horizontal directions. All these positions are within the parent component area.
*
* @type { ?ArrowPointPosition }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
arrowPointPosition?: ArrowPointPosition;
/**
* The width of the arrow.
*
* @type { ?Dimension }
* @default 16.0_vp.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
/**
* Arrow thickness. If the arrow thickness exceeds the length of the edge minus twice the size of the popup
* rounded corner, the arrow is not drawn.
*
* @type { ?Dimension }
* @default 16.0_vp.
*
NOTE:
* This parameter cannot be set in percentage.
*
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
arrowWidth?: Dimension;
/**
* The height of the arrow.
*
* @type { ?Dimension }
* @default 8.0_vp.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
/**
* The height of the arrow.
*
* @type { ?Dimension }
* @default 8.0_vp.
*
NOTE:
* This parameter cannot be set in percentage.
*
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
arrowHeight?: Dimension;
/**
* The round corners of the popup.
*
* @type { ?Dimension }
* @default 20.0_vp.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
/**
* Rounded corner radius of the popup.
*
* @type { ?Dimension }
* @default 20.0_vp.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
radius?: Dimension;
/**
* The style of popup Shadow.
*
* @type { ?(ShadowOptions | ShadowStyle) }
* @default ShadowStyle.OUTER_DEFAULT_MD.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
/**
* Popup shadow.
*
* @type { ?(ShadowOptions | ShadowStyle) }
* @default ShadowStyle.OUTER_DEFAULT_MD.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
shadow?: ShadowOptions | ShadowStyle;
/**
* Defines popup background blur Style
*
* @type { ?BlurStyle }
* @default BlurStyle.COMPONENT_ULTRA_THICK
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
/**
* Background blur style of the popup.
*
* @type { ?BlurStyle }
* @default BlurStyle.COMPONENT_ULTRA_THICK
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
backgroundBlurStyle?: BlurStyle;
/**
* Set popup focusable
*
* @type { ?boolean }
* @default true
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
/**
* Set popup focusable
*
* @type { ?boolean }
* @default false
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
focusable?: boolean;
/**
* Defines the transition effect of popup opening and closing
*
* @type { ?TransitionEffect }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
transition?: TransitionEffect;
/**
* Whether to perform dismissal event interception and interception callback.
* 1. If this parameter is set to false, the system does not respond to the dismissal event initiated by
* touching the Back button, swiping left or right on the screen, or pressing the Esc key; and the system
* dismisses the popup only when show is set to false. If this parameter is set to true, the system responds
* to the dismissal event as expected.
* 2. If this parameter is set to a function, the dismissal event is intercepted and the callback function
* is executed.
*
NOTE:
* No more onWillDismiss callback is allowed in an onWillDismiss callback.
*
*
* @type { ?(boolean | Callback) }
* @default true
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
onWillDismiss?: boolean | Callback;
/**
* Determine if it is compatible popup's half folded.
*
* @type { ?boolean }
* @default false
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
enableHoverMode?: boolean;
/**
* Determine if popup can follow the target node when it has rotation or scale.
*
* @type { ?boolean }
* @default false
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'13','1.2':'20'}
* @arkts 1.1&1.2
*/
followTransformOfTarget?: boolean;
/**
* Define the popup avoid keyboard mode.
*
* @type { ?KeyboardAvoidMode }
* @default KeyboardAvoidMode.NONE
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'15','1.2':'20'}
* @arkts 1.1&1.2
*/
keyboardAvoidMode?: KeyboardAvoidMode;
/**
* Determine if popup can avoid the target when the display space is insufficient.
*
* @type { ?AvoidanceMode }
* @default AvoidanceMode.COVER_TARGET
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
*/
avoidTarget?: AvoidanceMode;
/**
* The width of popup's outline.
*
* @type { ?Dimension }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
*/
outlineWidth?: Dimension;
/**
* The width of popup's border.
*
* @type { ?Dimension }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
*/
borderWidth?: Dimension;
/**
* The LinearGradient of popup's outline.
*
* @type { ?PopupBorderLinearGradient }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
*/
outlineLinearGradient?: PopupBorderLinearGradient;
/**
* The LinearGradient of popup's innerline.
*
* @type { ?PopupBorderLinearGradient }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
*/
borderLinearGradient?: PopupBorderLinearGradient;
}
/**
* Defines the menu preview mode.
*
* @enum { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
/**
* Defines the menu preview mode.
*
* @enum { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
declare enum MenuPreviewMode {
/**
* No preview content.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
/**
* No preview content.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
NONE = 0,
/**
* Defines image type preview content.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
/**
* The preview is a screenshot of the component on which a long-press triggers the context menu.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
IMAGE = 1
}
/**
* Defines the animator range of start and end property.
*
* @typedef { [from: T, to: T] } AnimationRange
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
/**
* Defines the animator range of start and end property.
*
* @typedef { [from: T, to: T] } AnimationRange
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
declare type AnimationRange = [from: T, to: T];
/**
* Defines the animator range of start and end property.
*
* @typedef { [number, number] } AnimationNumberRange
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
* @arkts 1.2
*/
declare type AnimationNumberRange = [number, number];
/**
* Defines the ContextMenu's preview animator options.
*
* @interface ContextMenuAnimationOptions
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
/**
* Defines the ContextMenu's preview animator options.
*
* @interface ContextMenuAnimationOptions
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
interface ContextMenuAnimationOptions {
/**
* Sets the start animator scale and end animator scale.
*
* @type { ?AnimationRange }
* @default [0.95, 1.1]
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
/**
* Sets the start animator scale and end animator scale.
*
* @type { ?AnimationRange }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
scale?: AnimationRange;
/**
* Sets the start animator scale and end animator scale.
*
* @type { ?AnimationNumberRange }
* @default -
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
* @arkts 1.2
*/
scale?: AnimationNumberRange;
/**
* Defines the transition effect of menu preview opening and closing.
*
* @type { ?TransitionEffect }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
transition?: TransitionEffect;
/**
* Sets the scale start and end animator of the image displayed before the custom builder preview is displayed.
*
* @type { ?AnimationRange }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
hoverScale?: AnimationRange;
/**
* Sets the scale start and end animator of the image displayed before the custom builder preview is displayed.
*
* @type { ?AnimationNumberRange }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
* @arkts 1.2
*/
hoverScale?: AnimationNumberRange;
/**
* Sets whether support to interrupt the process of hover scale.
*
* @type { ?boolean }
* @default false
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
*/
hoverScaleInterruption?: boolean;
}
/**
* Defines the type of border radius.
*
* @typedef { Length | BorderRadiuses | LocalizedBorderRadiuses }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'19','1.2':'20'}
* @arkts 1.1&1.2
*/
type BorderRadiusType = Length | BorderRadiuses | LocalizedBorderRadiuses;
/**
* Defines the menu haptic feedback mode.
*
* @enum { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
declare enum HapticFeedbackMode {
/**
* No haptic feedback.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
DISABLED = 0,
/**
* Defines menu always haptic feedback.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
ENABLED = 1,
/**
* Defines menu automatically haptic feedback.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
AUTO = 2
}
/**
* Define the modal mode of menu.
*
* @enum { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
*/
declare enum ModalMode {
/**
* Modal modal automatically.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
*/
AUTO = 0,
/**
* Operation takes effect around menu.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
*/
NONE = 1,
/**
* Operation takes no effect around menu in target window.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
*/
TARGET_WINDOW = 2
}
/**
* Menu mask type
*
* @interface MenuMaskType
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
*/
declare interface MenuMaskType {
/**
* Mask color of menu.
*
* @type { ?ResourceColor }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
*/
color?: ResourceColor;
/**
* Set menu mask background blur Style.
*
* @type { ?BlurStyle }
* @default BlurStyle.BACKGROUND_THIN
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
*/
backgroundBlurStyle?: BlurStyle;
}
/**
* Defines the scaling mode for custom preview of contextMenu.
*
* @enum { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
*/
declare enum PreviewScaleMode {
/**
* Automatically resize preview based on the layout area.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
*/
AUTO = 0,
/**
* Maintain original size of preview content without scaling.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
*/
CONSTANT = 1,
/**
* Maintain aspect ratio to scale preview.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
*/
MAINTAIN = 2,
}
/**
* Defines the available layout area.
*
* @enum { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
*/
declare enum AvailableLayoutArea {
/**
* Size of safe area.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
*/
SAFE_AREA = 0,
}
/**
* Defines the context menu options.
*
* @interface ContextMenuOptions
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Defines the context menu options.
*
* @interface ContextMenuOptions
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
declare interface ContextMenuOptions {
/**
* Sets the position offset of the context menu window.
*
* @type { ?Position }
* @default -
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Offset for showing the context menu, which should not cause the menu to extend beyond the screen.
*
NOTE:
* When the menu is displayed relative to the parent component area, the width or height of the area is
* automatically counted into the offset based on the placement attribute of the menu. When the menu is
* displayed above the parent component (that is, placement is set to Placement.TopLeft, Placement.Top, or
* Placement.TopRight), a positive value of x indicates rightward movement relative to the parent component,
* and a positive value of y indicates upward movement. When the menu is displayed below the parent component
* (that is, placement is set to Placement.BottomLeft, Placement.Bottom, or Placement.BottomRight), a positive
* value of x indicates rightward movement relative to the parent component, and a positive value of y indicates
* downward movement. When the menu is displayed on the left of the parent component (that is, placement is set
* to Placement.LeftTop, Placement.Left, or Placement.LeftBottom), a positive value of x indicates leftward
* movement relative to the parent component, and a positive value of y indicates downward movement. When the
* menu is displayed on the right of the parent component (that is, placement is set to Placement.RightTop,
* Placement.Right, or Placement.RightBottom), a positive value of x indicates rightward movement relative to
* the parent component, and a positive value of y indicates downward movement. If the display position of the
* menu is adjusted (different from the main direction of the initial placement value), the offset value is invalid.
*
*
* @type { ?Position }
* @default {x:0,y:0} - Percentage values are not supported.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
offset?: Position;
/**
* Sets the placement of the context menu window.
*
* @type { ?Placement }
* @default -
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Preferred position of the context menu. If the set position is insufficient for holding the component, it will be
* automatically adjusted.
*
NOTE:
* If a menu is displayed by pressing and holding or right-clicking, the menu is displayed at the clicked
* position.
*
NOTE:
* When enableArrow is true, an arrow is displayed in the position specified by placement.
* If placement is not set or its value is invalid, the arrow is displayed above the target.
* If the position is insufficient for holding the arrow, it is automatically adjusted.
* When enableArrow is undefined, no arrow is displayed.
* This API is supported in bindContextMenu since API version 10 and bindMenu since API version 12.
*
*
* @type { ?boolean }
* @default false
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
enableArrow?: boolean;
/**
* The horizontal offset to the left of menu or vertical offset to the top of menu
*
* @type { ?Length }
* @default 0vp
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 10
*/
/**
* Offset of the arrow relative to the context menu. The offset settings take effect only when the value is valid,
* can be converted to a number greater than 0, and does not cause the arrow to extend beyond the safe area of
* the context menu.
*
NOTE:
* The safe distance of the arrow from the four sides of the menu is the sum of the menu's corner radius and
* half the width of the arrow. The value of placement determines whether the offset is horizontal or vertical.
* When the arrow is in the horizontal direction of the menu, the offset is the distance from the arrow to the
* leftmost arrow's safe distance. When the arrow is in the vertical direction of the menu, the offset is the
* distance from the arrow to the topmost arrow's safe distance. The default position where the arrow is
* displayed varies with the value of placement: Without any avoidance by the menu, when placement is set to
* Placement.Top or Placement.Bottom, the arrow is displayed horizontally and is centered by default; when
* placement is set to Placement.Left or Placement.Right, the arrow is displayed vertically and is centered by
* default; when placement is set to Placement.TopLeft or Placement.BottomLeft, the arrow is displayed
* horizontally by default, and the distance from the arrow to the left edge of the menu is the arrow's safe
* distance; when placement is set to Placement.TopRight or Placement.BottomRight, the arrow is displayed
* horizontally by default, and the distance from the arrow to the right edge of the menu is the arrow's safe
* distance; when placement is set to Placement.LeftTop or Placement.RightTop, the arrow is displayed vertically
* by default, and the distance from the arrow to the top edge of the menu is the arrow's safe distance; when
* placement is set to Placement.LeftBottom or Placement.RightBottom, the arrow is displayed vertically by
* default, and the distance from the arrow to the bottom edge of the menu is the arrow's safe distance.
* This API is supported in bindContextMenu since API version 10 and bindMenu since API version 12.
*
*
* @type { ?Length }
* @default 0vp
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
arrowOffset?: Length;
/**
* The preview content of context menu.
*
* @type { ?(MenuPreviewMode | CustomBuilder) }
* @default MenuPreviewMode.NONE
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
/**
* Preview displayed when the context menu is triggered by a long-press or use the isShown variable of
* bindContextMenu to display the preview content style of the menu.
*
NOTE:
* This parameter has no effect when responseType is set to ResponseType.RightClick.
* If preview is set to MenuPreviewMode.NONE or is not set, the enableArrow parameter is effective.
* If preview is set to MenuPreviewMode.IMAGE or CustomBuilder, no arrow will be displayed even when
* enableArrow is true.
*
NOTE:
* The value can be in percentage.
* If the sum of the two maximum corner radii in the horizontal direction exceeds the menu's width, or if the sum
* of the two maximum corner radii in the vertical direction exceeds the menu's height, the default corner radius of
* the menu will be used.
*
*
* @type { ?(Length | BorderRadiuses | LocalizedBorderRadiuses) }
* @default 8vp for 2-in-1 devices and 20vp for other devices
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
borderRadius?: Length | BorderRadiuses | LocalizedBorderRadiuses;
/**
* Callback function when the context menu appears.
*
* @type { ?function }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Callback triggered when the menu is displayed.
*
* @type { ?function }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
onAppear?: () => void;
/**
* Callback triggered when the menu is hidden.
*
* @type { ?function }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Callback function when the context menu disappear.
*
* @type { ?function }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
onDisappear?: () => void;
/**
* Callback function before the context menu animation starts.
*
* @type { ?function }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
/**
* Callback triggered when the menu is about to appear.
*
* @type { ?function }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
aboutToAppear?: () => void;
/**
* Callback function before the context menu popAnimation starts.
*
* @type { ?function }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
/**
* Callback triggered when the menu is about to disappear.
*
* @type { ?function }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
aboutToDisappear?: () => void;
/**
* The margin of menu's layoutRegion.
*
* @type { ?Margin }
* @default 12vp for left and right, 16vp for top and bottom
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'13','1.2':'20'}
* @arkts 1.1&1.2
*/
layoutRegionMargin?: Margin;
/**
* The preview animator options.
*
* @type { ?ContextMenuAnimationOptions }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
/**
* The preview animator options.
*
* @type { ?ContextMenuAnimationOptions }
* @default { scale: [0.95, 1.1], transition: undefined, hoverScale: undefined }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
previewAnimationOptions?: ContextMenuAnimationOptions;
/**
* Defines the menu's background color
*
* @type { ?ResourceColor }
* @default Color.Transparent
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
/**
* Background color of the menu.
*
* @type { ?ResourceColor }
* @default Color.Transparent
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
backgroundColor?: ResourceColor;
/**
* Defines menu background blur Style
*
* @type { ?BlurStyle }
* @default BlurStyle.COMPONENT_ULTRA_THICK
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
/**
* Background blur style of the menu.
*
* @type { ?BlurStyle }
* @default BlurStyle.COMPONENT_ULTRA_THICK
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
backgroundBlurStyle?: BlurStyle;
/**
* Defines the menu's background blur style with options
*
* @type { ?BackgroundBlurStyleOptions }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
backgroundBlurStyleOptions?: BackgroundBlurStyleOptions;
/**
* Defines the menu's background effect with options
*
* @type { ?BackgroundEffectOptions }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
backgroundEffect?: BackgroundEffectOptions;
/**
* Defines the transition effect of menu opening and closing.
*
* @type { ?TransitionEffect }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
transition?: TransitionEffect;
/**
* Determine if it is compatible menu's half folded.
*
* @type { ?boolean }
* @default true for 2-in-1 devices and false for other devices
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
enableHoverMode?: boolean;
/**
* The color of menu's outer border.
*
* @type { ?(ResourceColor | EdgeColors) }
* @default '#19ffffff'
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
* @arkts 1.1&1.2
*/
outlineColor?: ResourceColor | EdgeColors;
/**
* The width of menu's outer border.
* If outline effects are required, outlineWidth is required.
*
* @type { ?(Dimension | EdgeOutlineWidths) }
* @default 0vp - Percentage values are not supported.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
* @arkts 1.1&1.2
*/
outlineWidth?: Dimension | EdgeOutlineWidths;
/**
* Defines the haptic feedback mode of menu.
*
* @type { ?HapticFeedbackMode }
* @default HapticFeedbackMode.DISABLED
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
hapticFeedbackMode?: HapticFeedbackMode;
/**
* Whether it is a menu without mask.
*
* @type { ?(boolean | MenuMaskType) }
* @default true when preview is enabled, or is false
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
*/
mask?: boolean | MenuMaskType;
/**
* Defines modal mode of menu.
*
* @type { ?ModalMode }
* @default ModalMode.AUTO
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
*/
modalMode?: ModalMode;
/**
* Callback function when the menu appears.
*
* @type { ?Callback }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
*/
onDidAppear?: Callback;
/**
* Callback function when the menu disappears.
*
* @type { ?Callback }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
*/
onDidDisappear?: Callback;
/**
* Callback function before the menu openAnimation starts.
*
* @type { ?Callback }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
*/
onWillAppear?: Callback;
/**
* Callback function before the menu closeAnimation starts.
*
* @type { ?Callback }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
*/
onWillDisappear?: Callback;
/**
* Defines the scaling mode for custom preview of contextMenu.
*
* @type { ?PreviewScaleMode }
* @default PreviewScaleMode.AUTO
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
*/
previewScaleMode?: PreviewScaleMode;
/**
* Defines the available layout area of preview.
*
* @type { ?AvailableLayoutArea }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
*/
availableLayoutArea?: AvailableLayoutArea;
/**
* Defines the menu position.
*
* @type { ?Position }
* @default { x: 0, y: 0 }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
*/
anchorPosition?: Position;
}
/**
* Defines the menu options.
*
* @extends ContextMenuOptions
* @interface MenuOptions
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Defines the menu options.
*
* @extends ContextMenuOptions
* @interface MenuOptions
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
declare interface MenuOptions extends ContextMenuOptions {
/**
* Sets the title of the menu window.
*
* @type { ?ResourceStr }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Sets the title of the menu window.
*
* @type { ?ResourceStr }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
title?: ResourceStr;
/**
* Whether to display in the sub window.
*
* @type { ?boolean }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
/**
* Whether to display in the sub window.
*
* @type { ?boolean }
* @default true for 2-in-1 devices
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
showInSubWindow?: boolean;
}
/**
* Defines the ProgressMask class.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Implements a ProgressMask object to set the progress, maximum value, and color of the mask.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
declare class ProgressMask {
/**
* constructor.
*
* @param { number } value - indicates the current value of the progress.
* @param { number } total - indicates the total value of the progress.
* @param { ResourceColor } color - indicates the color of the mask.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* constructor.
*
* @param { number } value - Current value of the progress mask. Value range: [0.0, +∞).
* @param { number } total - Maximum value of the progress mask. Value range: [0.0, +∞).
* @param { ResourceColor } color - Color of the progress mask.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
constructor(value: number, total: number, color: ResourceColor);
/**
* Update the current value of the progress.
*
* @param { number } value - indicates the current value of the progress.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Updates the progress value of the progress mask.
*
* @param { number } value - Current value of the progress mask.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
updateProgress(value: number): void;
/**
* Update the color of the mask.
*
* @param { ResourceColor } value - indicates the color of the mask.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Update the color of the mask.
*
* @param { ResourceColor } value - Color of the progress mask.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
updateColor(value: ResourceColor): void;
/**
* Enable the breathe animation of mask.
*
* @param { boolean } value
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
enableBreathingAnimation(value: boolean): void;
}
/**
* Defines TouchTestInfo class.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
/**
* Defines TouchTestInfo class.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
declare class TouchTestInfo {
/**
* Get the X-coordinate relative to the window.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
/**
* Get the X-coordinate relative to the window.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
windowX: number;
/**
* Get the Y-coordinate relative to the window.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
/**
* Get the Y-coordinate relative to the window.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
windowY: number;
/**
* Get the X-coordinate relative to the current component.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
/**
* Get the X-coordinate relative to the current component.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
parentX: number;
/**
* Get the Y-coordinate relative to the current component.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
/**
* Get the Y-coordinate relative to the current component.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
parentY: number;
/**
* Get the X-coordinate relative to the sub component.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
/**
* Get the X-coordinate relative to the sub component.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
x: number;
/**
* Get the Y-coordinate relative to the sub component.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
/**
* Get the Y-coordinate relative to the sub component.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
y: number;
/**
* Get the rectangle of sub component.
*
* @type { RectResult }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
/**
* Get the rectangle of sub component.
*
* @type { RectResult }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
rect: RectResult;
/**
* Get the name of sub component.
*
* @type { string }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
/**
* Get the name of sub component.
*
* @type { string }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
id: string;
}
/**
* Defines TouchResult class.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
/**
* Defines TouchResult class.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
declare class TouchResult {
/**
* Defines the touch test strategy.
*
* @type { TouchTestStrategy }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
/**
* Defines the touch test strategy.
*
* @type { TouchTestStrategy }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
strategy: TouchTestStrategy;
/**
* Defines the component's name.
*
* @type { ?string }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
/**
* Defines the component's name.
*
* @type { ?string }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
id?: string;
}
/**
* Set the edge blur effect distance of the corresponding defense line of the component
* When the component expand out, no re-layout is triggered
*
* @interface PixelStretchEffectOptions
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Set the edge blur effect distance of the corresponding defense line of the component
* When the component expand out, no re-layout is triggered
*
* @interface PixelStretchEffectOptions
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
declare interface PixelStretchEffectOptions {
/**
* top property. value range (-∞, ∞)
* If value > 0, expand outward elements. Else first shrink by value and then expand outward pixels.
*
* @type { ?Length }
* @default 0
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* top property. value range (-∞, ∞)
* If value > 0, expand outward elements. Else first shrink by value and then expand outward pixels.
*
* @type { ?Length }
* @default 0
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
top?: Length;
/**
* bottom property. value range (-∞, ∞)
* If value > 0, expand outward elements. Else first shrink by value and then expand outward pixels.
*
* @type { ?Length }
* @default 0
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* bottom property. value range (-∞, ∞)
* If value > 0, expand outward elements. Else first shrink by value and then expand outward pixels.
*
* @type { ?Length }
* @default 0
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
bottom?: Length;
/**
* left property. value range (-∞, ∞)
* If value > 0, expand outward elements. Else first shrink by value and then expand outward pixels.
*
* @type { ?Length }
* @default 0
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* left property. value range (-∞, ∞)
* If value > 0, expand outward elements. Else first shrink by value and then expand outward pixels.
*
* @type { ?Length }
* @default 0
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
left?: Length;
/**
* right property. value range (-∞, ∞)
* If value > 0, expand outward elements. Else first shrink by value and then expand outward pixels.
*
* @type { ?Length }
* @default 0
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* right property. value range (-∞, ∞)
* If value > 0, expand outward elements. Else first shrink by value and then expand outward pixels.
*
* @type { ?Length }
* @default 0
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
right?: Length;
}
/**
* Defines the click effect.
*
* @interface ClickEffect
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Defines the click effect.
*
* @interface ClickEffect
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
declare interface ClickEffect {
/**
* Set the click effect level.
*
* @type { ClickEffectLevel }
* @default ClickEffectLevel.Light
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 10
*/
/**
* Set the click effect level.
*
* @type { ClickEffectLevel }
* @default ClickEffectLevel.Light
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
level: ClickEffectLevel;
/**
* Set scale number.
* This default scale is same as the scale of click effect level.
*
* @type { ?number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 10
*/
/**
* Set scale number.
* This default scale is same as the scale of click effect level.
*
*
NOTE:
* This parameter works based on the setting of ClickEffectLevel.
* If level is set to ClickEffectLevel.LIGHT, the default value is 0.90.
* If level is set to ClickEffectLevel.MIDDLE or ClickEffectLevel.HEAVY, the default value is 0.95.
* If level is set to undefined or null (both of which evaluate to ClickEffectLevel.LIGHT), the default value is 0.90.
* If scale is set to undefined or null, the default zoom ratio for the set level will be used.
*
* @type { ?number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
scale?: number;
}
/**
* Defines the fadingEdge options.
*
* @typedef FadingEdgeOptions
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'14','1.2':'20'}
* @arkts 1.1&1.2
*/
declare interface FadingEdgeOptions {
/**
* The length of FadingEdge.
*
* @type { LengthMetrics }
* @default 32vp
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'14','1.2':'20'}
* @arkts 1.1&1.2
*/
fadingEdgeLength?: LengthMetrics;
}
/**
* Define nested scroll options
*
* @interface NestedScrollOptions
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 10
*/
/**
* Define nested scroll options
*
* @interface NestedScrollOptions
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
declare interface NestedScrollOptions {
/**
* Set NestedScrollMode when the scrollable component scrolls forward
*
* @type { NestedScrollMode }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 10
*/
/**
* Set NestedScrollMode when the scrollable component scrolls forward
*
* @type { NestedScrollMode }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
scrollForward: NestedScrollMode;
/**
* Set NestedScrollMode when the scrollable component scrolls backward
*
* @type { NestedScrollMode }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 10
*/
/**
* Set NestedScrollMode when the scrollable component scrolls backward
*
* @type { NestedScrollMode }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
scrollBackward: NestedScrollMode;
}
/**
* Defines the menu element.
*
* @interface MenuElement
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* Defines the menu element.
*
* @interface MenuElement
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Defines the menu element.
*
* @interface MenuElement
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
declare interface MenuElement {
/**
* Sets the value of the menu element.
*
* @type { ResourceStr }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* Sets the value of the menu element.
*
* @type { ResourceStr }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Sets the value of the menu element.
*
* @type { ResourceStr }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
value: ResourceStr;
/**
* Sets the icon of the menu element.
*
* @type { ?ResourceStr }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Sets the icon of the menu element.
*
* @type { ?ResourceStr }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
icon?: ResourceStr;
/**
* Sets the symbol of the menu element.
*
* @type { ?SymbolGlyphModifier }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since 12
*/
/**
* Sets the symbol of the menu element.
*
* @type { ?SymbolGlyphModifier }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
* @arkts 1.1&1.2
*/
symbolIcon?: SymbolGlyphModifier;
/**
* If the value is true, the menu element is available and can respond to operations such as clicking.
* If the value is false, the menu element is not available and click operations are not responded.
*
* @type { ?boolean }
* @default true
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
/**
* If the value is true, the menu element is available and can respond to operations such as clicking.
* If the value is false, the menu element is not available and click operations are not responded.
*
* @type { ?boolean }
* @default true
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
enabled?: boolean;
/**
* Method executed by the callback.
*
* @type { function }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* Method executed by the callback.
*
* @type { function }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Method executed by the callback.
*
* @type { function }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
action: () => void;
}
/**
* Defines the attribute modifier.
*
* @interface AttributeModifier
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
/**
* Defines the attribute modifier.
*
* @interface AttributeModifier
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
declare interface AttributeModifier {
/**
* Defines the normal update attribute function.
*
* @param { T } instance
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
/**
* Defines the normal update attribute function.
*
* @param { T } instance
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
applyNormalAttribute?(instance: T) : void;
/**
* Defines the pressed update attribute function.
*
* @param { T } instance
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
/**
* Defines the pressed update attribute function.
*
* @param { T } instance
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
applyPressedAttribute?(instance: T) : void;
/**
* Defines the focused update attribute function.
*
* @param { T } instance
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
/**
* Defines the focused update attribute function.
*
* @param { T } instance
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
applyFocusedAttribute?(instance: T) : void;
/**
* Defines the disabled update attribute function.
*
* @param { T } instance
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
/**
* Defines the disabled update attribute function.
*
* @param { T } instance
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
applyDisabledAttribute?(instance: T) : void;
/**
* Defines the selected update attribute function.
*
* @param { T } instance
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
/**
* Defines the selected update attribute function.
*
* @param { T } instance
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
applySelectedAttribute?(instance: T) : void;
}
/**
* Defines the attribute modifier.
*
* @interface AttributeModifier
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
* @arkts 1.2
*/
declare interface AttributeModifier {
/**
* Defines the normal update attribute function.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
* @arkts 1.2
*/
applyNormalAttribute?:(instance: T) => void;
/**
* Defines the pressed update attribute function.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
* @arkts 1.2
*/
applyPressedAttribute?:(instance: T) => void;
/**
* Defines the focused update attribute function.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
* @arkts 1.2
*/
applyFocusedAttribute?:(instance: T) => void;
/**
* Defines the disabled update attribute function.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
* @arkts 1.2
*/
applyDisabledAttribute?:(instance: T) => void;
/**
* Defines the selected update attribute function.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
* @arkts 1.2
*/
applySelectedAttribute?:(instance: T) => void;
}
/**
* Defines the content modifier.
*
* @interface ContentModifier
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
declare interface ContentModifier {
/**
* Defining applyContent function.
*
* @returns { WrappedBuilder<[T]> }
* Component attribute class, which is used to distinguish different information required by different components
* after content areas are customized, for example, ButtonConfiguration for the Button component and
* CheckBoxConfiguration of the Checkbox component.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
applyContent(): WrappedBuilder<[T]>
/**
* Defining applyContent function.
*
* @returns { WrappedBuilder<[T]> }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
* @arkts 1.2
*/
applyContent(): WrappedBuilder>
}
/**
* Defines the common configuration.
*
* @interface CommonConfiguration
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
declare interface CommonConfiguration {
/**
* If the value is true, the contentModifier is available and can respond to operations such as triggerChange.
* If it is set to false, triggerChange operations are not responded.
*
* @type { boolean }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
enabled: boolean,
/**
* Obtains the contentModifier instance object
*
* @type { ContentModifier }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
contentModifier: ContentModifier
}
/**
* Outline Style
*
* @enum { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 11
*/
/**
* Outline Style
*
* @enum { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
declare enum OutlineStyle {
/**
* Solid border.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 11
*/
/**
* Solid border.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
SOLID = 0,
/**
* Dashed border.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 11
*/
/**
* Dashed border.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
DASHED = 1,
/**
* Displays as a series of dots with a radius of half the borderWidth.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 11
*/
/**
* Dotted border. The radius of a dot is half of **outlineWidth**.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
DOTTED = 2,
}
/**
* Defines the drag preview mode.
*
* @enum { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 11
*/
/**
* Defines the drag preview mode.
*
* @enum { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since 12
*/
/**
* Defines the drag preview mode.
*
* @enum { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
declare enum DragPreviewMode {
/**
* Default preview mode, let system process preview scale.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 11
*/
/**
* Default preview mode, let system process preview scale.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since 12
*/
/**
* Default preview mode, let system process preview scale.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
AUTO = 1,
/**
* Disable system scale to preview panel
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 11
*/
/**
* Disable system scale to preview panel
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since 12
*/
/**
* Disable system scale to preview panel
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
DISABLE_SCALE = 2,
/**
* Enable the default shadow effect of preview.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since 12
*/
/**
* Enable the default shadow effect of preview.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
ENABLE_DEFAULT_SHADOW = 3,
/**
* Enable the default radius effect of preview.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since 12
*/
/**
* Enable the default radius effect of preview.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
ENABLE_DEFAULT_RADIUS = 4,
/**
* Enable the default gray effect on the dragging item.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
ENABLE_DRAG_ITEM_GRAY_EFFECT = 5,
/**
* Enable the tile effect for multi drag, each dragged graph is display in the original relative position.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
ENABLE_MULTI_TILE_EFFECT = 6,
/**
* Enable the touch point calculation position based on final preview rect.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since arkts {'1.1':'19','1.2':'20'}
* @arkts 1.1&1.2
*/
ENABLE_TOUCH_POINT_CALCULATION_BASED_ON_FINAL_PREVIEW = 7,
}
/**
* Define drag start animation effect from drag preview to the handle drag image
*
* @enum { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since arkts {'1.1':'19','1.2':'20'}
* @arkts 1.1&1.2
*/
declare enum DraggingSizeChangeEffect {
/**
* Default effect, no transition.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since arkts {'1.1':'19','1.2':'20'}
* @arkts 1.1&1.2
*/
DEFAULT = 0,
/**
* Only scaled transition, this parameter take effect when PREVIEW_MODE is not DISABLE_SCALE.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since arkts {'1.1':'19','1.2':'20'}
* @arkts 1.1&1.2
*/
SIZE_TRANSITION = 1,
/**
* Scaled and content transition together, this size transition take effect when PREVIEW_MODE is not DISABLE_SCALE.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since arkts {'1.1':'19','1.2':'20'}
* @arkts 1.1&1.2
*/
SIZE_CONTENT_TRANSITION = 2,
}
/**
* Define the menu pop-up policy
*
* @enum { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
declare enum MenuPolicy {
/**
* Default value. The default logic of whether to pop up a menu depends on the scene.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
DEFAULT = 0,
/**
* The menu is always hidden.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
HIDE = 1,
/**
* The menu is always displayed.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
SHOW = 2,
}
/**
* ImageModifier
*
* @typedef { import('../api/arkui/ImageModifier').ImageModifier } ImageModifier
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
declare type ImageModifier = import('../api/arkui/ImageModifier').ImageModifier;
/**
* SymbolGlyphModifier
*
* @typedef {import('../api/arkui/SymbolGlyphModifier').SymbolGlyphModifier} SymbolGlyphModifier
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since 12
*/
/**
* SymbolGlyphModifier
*
* @typedef {import('../api/arkui/SymbolGlyphModifier').SymbolGlyphModifier} SymbolGlyphModifier
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
*/
declare type SymbolGlyphModifier = import('../api/arkui/SymbolGlyphModifier').SymbolGlyphModifier;
/**
* Defines the preview options.
*
* @interface DragPreviewOptions
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 11
*/
/**
* Defines the preview options.
*
* @interface DragPreviewOptions
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since 12
*/
/**
* Defines the preview options.
*
* @interface DragPreviewOptions
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
declare interface DragPreviewOptions {
/**
* Drag preview mode.
*
* @type { ?DragPreviewMode }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 11
*/
/**
* Drag preview mode.
*
* @type { ?(DragPreviewMode | Array) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since 12
*/
/**
* Drag preview mode.
*
* @type { ?(DragPreviewMode | Array) }
* @default DragPreviewMode.AUTO
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
mode?: DragPreviewMode | Array;
/**
* Drag preview modifier.
*
* @type { ?ImageModifier }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since 12
*/
/**
* Drag preview modifier.
*
* @type { ?ImageModifier }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 18
*/
modifier?: ImageModifier;
/**
* The flag for number showing.
*
* @type { ?(boolean | number) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since 12
*/
/**
* The flag for number showing.
*
* @type { ?(boolean | number) }
* @default true
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
numberBadge?: boolean | number;
/**
* Drag start animation effect from drag preview to the handle drag image.
*
* @type { ?DraggingSizeChangeEffect }
* @default DraggingSizeChangeEffect.DEFAULT
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since arkts {'1.1':'19','1.2':'20'}
* @arkts 1.1&1.2
*/
sizeChangeEffect?: DraggingSizeChangeEffect;
}
/**
* Defines the drag options.
*
* @interface DragInteractionOptions
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
declare interface DragInteractionOptions {
/**
* Define whether to gather selected nodes in grid or list.
*
* @type { ?boolean }
* @default false
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
isMultiSelectionEnabled?: boolean;
/**
* Define whether to execute animation before preview floating.
*
* @type { ?boolean }
* @default false
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
defaultAnimationBeforeLifting?: boolean;
/**
* Define whether to enable the haptic feedback when dragging, the default value is false.
*
* @type { ?boolean }
* @default false
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
enableHapticFeedback?: boolean;
/**
* Config if auto scrolling should be triggered when the drag hovered on a scrollable controller's edge.
*
* @type { ?boolean }
* @default true
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
enableEdgeAutoScroll?: boolean;
/**
* Define whether to lifting trigger drag by finger.
*
* @type { ?boolean }
* @default false
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since arkts {'1.1':'15','1.2':'20'}
* @arkts 1.1&1.2
*/
isLiftingDisabled?: boolean;
}
/**
* Defines the drag preview configuration.
*
* @interface PreviewConfiguration
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since arkts {'1.1':'15','1.2':'20'}
* @arkts 1.1&1.2
*/
declare interface PreviewConfiguration {
/**
* Define whether to only use for lifting.
*
* @type { ?boolean }
* @default false
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since arkts {'1.1':'15','1.2':'20'}
* @arkts 1.1&1.2
*/
onlyForLifting?: boolean;
/**
* Define whether to delay create builder.
*
* @type { ?boolean }
* @default false
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since arkts {'1.1':'15','1.2':'20'}
* @arkts 1.1&1.2
*/
delayCreating?: boolean;
}
/**
* Define the options of invert
*
* @interface InvertOptions
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 11
*/
/**
* Define the options of invert
*
* @interface InvertOptions
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
declare interface InvertOptions {
/**
* Defines the low value of threshold
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
/**
* Defines the low value of threshold
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
low: number;
/**
* Defines the high value of threshold
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
/**
* Defines the high value of threshold
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
high: number;
/**
* Defines the threshold
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
/**
* Defines the threshold
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
threshold: number;
/**
*Defines the threshold range
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
/**
*Defines the threshold range
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
thresholdRange: number;
}
/**
* Import the CircleShape type object for common method.
*
* @typedef { import('../api/@ohos.arkui.shape').CircleShape } CircleShape
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 12
*/
declare type CircleShape = import('../api/@ohos.arkui.shape').CircleShape;
/**
* Import the EllipseShape type object for common method.
*
* @typedef { import('../api/@ohos.arkui.shape').EllipseShape } EllipseShape
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 12
*/
declare type EllipseShape = import('../api/@ohos.arkui.shape').EllipseShape;
/**
* Import the PathShape type object for common method.
*
* @typedef { import('../api/@ohos.arkui.shape').PathShape } PathShape
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 12
*/
declare type PathShape = import('../api/@ohos.arkui.shape').PathShape;
/**
* Import the RectShape type object for common method.
*
* @typedef { import('../api/@ohos.arkui.shape').RectShape } RectShape
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 12
*/
declare type RectShape = import('../api/@ohos.arkui.shape').RectShape;
/**
* Defines the type that can be undefined.
*
* @typedef { T | undefined } Optional
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
declare type Optional = T | undefined;
/**
* Defines the TipsMessageType property with ResourceStr and StyledString.
*
* @typedef { ResourceStr | StyledString } TipsMessageType
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'19','1.2':'20'}
* @arkts 1.1&1.2
*/
declare type TipsMessageType = ResourceStr | StyledString;
/**
* Import the Matrix4Transit type object for common method.
*
* @typedef { import('../api/@ohos.matrix4').default.Matrix4Transit } Matrix4Transit
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
*/
declare type Matrix4Transit = import('../api/@ohos.matrix4').default.Matrix4Transit;
/**
* Define the options for background image.
*
* @interface BackgroundImageOptions
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
interface BackgroundImageOptions {
/**
* Sets the synchronous or asynchronous mode for background image loading.
* The default parameter type is bool, and the default value is false.
*
* @type { ?boolean }
* @param { boolean } value
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
syncLoad?: boolean;
/**
* Set the repeat style of the background image.
*
* @type { ?ImageRepeat }
* @param { ImageRepeat } value
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'18','1.2':'20'}
* @arkts 1.1&1.2
*/
repeat?: ImageRepeat;
}
/**
* Defines background options.
*
* @interface BackgroundOptions
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
* @arkts 1.1&1.2
*/
declare interface BackgroundOptions {
/**
* Set the alignment of the custom background and component.
*
* @type { ?Alignment} align
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Set the alignment of the custom background and component.
*
* @type { ?Alignment} align
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 11
*/
/**
* Set the alignment of the custom background and component.
*
* Anonymous Object Rectification.
* @type { ?Alignment }
* @default Alignment.Center
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 20
* @arkts 1.1&1.2
*/
align?: Alignment;
/**
* The set of edges for which to ignore layout safe area. To respect safe area insets on all edges, explicitly pass empty edge set.
*
* @type { ?Array }
* @default The default value is LayoutSafeAreaEdge.ALL when background is ResourceColor, otherwise it is an empty array [].
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since 20
*/
ignoresLayoutSafeAreaEdges?: Array;
}
/**
* CommonMethod.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* CommonMethod.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* CommonMethod.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* CommonMethod.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
declare class CommonMethod {
/**
* constructor.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @systemapi
* @since 7
*/
/**
* constructor.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @systemapi
* @form
* @since arkts {'1.1':'9','1.2':'20'}
* @arkts 1.1&1.2
*/
constructor();
/**
* Sets the width of the current component.
*
* @param { Length } value
* @returns { T }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* Sets the width of the current component.
*
* @param { Length } value
* @returns { T }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* Sets the width of the current component.
*
* @param { Length } value
* @returns { T }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* Sets the width of the component. By default, the width required to fully hold the
* component content is used.If the width of the component is greater than that of
* the parent container, the component will be drawn beyond the parent container scope.
*
* @param { Length } value
* @returns { T }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
width(value: Length): T;
/**
* Sets the width of the component or its horizontal layout policy. By default, the
* component uses the width required for its content. If the width of the component is
* greater than that of the parent container, the component will be drawn beyond the
* parent container scope.
*
* @param { Length | LayoutPolicy } widthValue
* @returns { T }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'15','1.2':'20'}
* @arkts 1.1&1.2
*/
width(widthValue: Length | LayoutPolicy): T;
/**
* Sets the height of the current component.
*
* @param { Length } value
* @returns { T }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* Sets the height of the current component.
*
* @param { Length } value
* @returns { T }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @form
* @since 9
*/
/**
* Sets the height of the current component.
*
* @param { Length } value
* @returns { T }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @since 10
*/
/**
* Sets the height of the component. By default, the height required to fully hold the
* component content is used. If the height of the component is greater than that of
* the parent container, the component will be drawn beyond the parent container scope.
*
* @param { Length } value
* @returns { T }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'11','1.2':'20'}
* @arkts 1.1&1.2
*/
height(value: Length): T;
/**
* Sets the height of the component or its vertical layout policy. By default, the
* component uses the height required for its content. If the height of the component
* is greater than that of the parent container, the component will be drawn beyond
* the parent container scope.
*
* @param { Length | LayoutPolicy } heightValue
* @returns { T }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since arkts {'1.1':'15','1.2':'20'}
* @arkts 1.1&1.2
*/
height(heightValue: Length | LayoutPolicy): T;
/**
* Sets the drawModifier of the current component.
*
* @param { DrawModifier | undefined } modifier - drawModifier used to draw, or undefined if it is not available.
* Default value: undefined
* A custom modifier applies only to the FrameNode of the currently bound component, not to its subnodes.
* @returns { T }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'12','1.2':'20'}
* @arkts 1.1&1.2
*/
drawModifier(modifier: DrawModifier | undefined): T;
/**
* Sets the custom property of the current component.
* This API does not work for custom components.
*
* @param { string } name - the name of the custom property.
* @param { Optional