diff --git a/api/@internal/component/ets/focus.d.ts b/api/@internal/component/ets/focus.d.ts index 74bdff450b6a9735dd7d6475a2efb14f5f0e4970..36d2fba5787497d0e1348b8e90667be2663473d0 100644 --- a/api/@internal/component/ets/focus.d.ts +++ b/api/@internal/component/ets/focus.d.ts @@ -12,16 +12,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - /** * @file Provide some common interface for focus. * @kit ArkUI */ - -/*** if arkts 1.2 */ -import { LengthMetrics , ColorMetrics } from '../Graphics'; -/*** endif */ - /** * Focus box style. * @@ -29,45 +23,40 @@ import { LengthMetrics , ColorMetrics } from '../Graphics'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare interface FocusBoxStyle { - /** - * Describes the focus-box margin. - * - * @type { ?LengthMetrics } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - margin?: LengthMetrics; - /** - * Describes the focus-box color. - * - * @type { ?ColorMetrics } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - strokeColor?: ColorMetrics; - /** - * Describes the focus-box stroke width. - * - * @type { ?LengthMetrics } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - strokeWidth?: LengthMetrics; + /** + * Describes the focus-box margin. + * + * @type { ?LengthMetrics } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + margin?: LengthMetrics; + /** + * Describes the focus-box color. + * + * @type { ?ColorMetrics } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + strokeColor?: ColorMetrics; + /** + * Describes the focus-box stroke width. + * + * @type { ?LengthMetrics } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + strokeWidth?: LengthMetrics; } - /** * Focus Priority * @@ -75,44 +64,37 @@ declare interface FocusBoxStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare enum FocusPriority { - /** - * Default priority. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - AUTO = 0, - - /** - * Prior priority. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - PRIOR = 2000, - - /** - * Previous focus priority. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - PREVIOUS = 3000, + /** + * Default priority. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + AUTO = 0, + /** + * Prior priority. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + PRIOR = 2000, + /** + * Previous focus priority. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + PREVIOUS = 3000 } - /** * Key processing mode. * Determines the priority of key event processing when component cannot handle the key event. @@ -121,29 +103,25 @@ declare enum FocusPriority { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ declare enum KeyProcessingMode { - /** - * Key events are used to move focus. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 - */ - FOCUS_NAVIGATION = 0, - - /** - * Key events bubble up to ancestors. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 - */ - ANCESTOR_EVENT = 1, -} \ No newline at end of file + /** + * Key events are used to move focus. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 15 + */ + FOCUS_NAVIGATION = 0, + /** + * Key events bubble up to ancestors. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 15 + */ + ANCESTOR_EVENT = 1 +} diff --git a/api/@internal/component/ets/gesture.d.ts b/api/@internal/component/ets/gesture.d.ts index 46e684bbe9e16ae663e273d1aafbc3faf47f8d34..8256b6d75b3e7fe57905ed4dac54c014672123f2 100644 --- a/api/@internal/component/ets/gesture.d.ts +++ b/api/@internal/component/ets/gesture.d.ts @@ -12,17 +12,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - /** * @file * @kit ArkUI */ - -/*** if arkts 1.2 */ -import { BaseEvent, SourceTool, Callback } from './common' -import { InteractionHand } from './enums' -/*** endif */ - /** * Creating an Object * @@ -45,908 +38,834 @@ import { InteractionHand } from './enums' * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ -declare enum PanDirection { - /** - * Default. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Default. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Default. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - None, - - /** - * Sliding horizontally. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Sliding horizontally. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Sliding horizontally. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - Horizontal, - - /** - * Sliding left. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Sliding left. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Sliding left. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - Left, - - /** - * Sliding right. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Sliding right. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Sliding right. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - Right, - - /** - * Sliding Vertical - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Sliding Vertical - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Sliding Vertical - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - Vertical, - - /** - * Sliding up. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Sliding up. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Sliding up. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - Up, - - /** - * Sliding Down. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Sliding Down. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Sliding Down. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - Down, - - /** - * Sliding in all directions. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Sliding in all directions. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Sliding in all directions. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - All, -} - -/** - * Creating an Object - * - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ -/** - * Creating an Object - * - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ -/** - * Creating an Object - * - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ -declare enum SwipeDirection { - /** - * Default. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Default. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Default. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - None, - - /** - * Sliding horizontally. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Sliding horizontally. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Sliding horizontally. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - Horizontal, - - /** - * Sliding Vertical - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Sliding Vertical - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Sliding Vertical - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - Vertical, - - /** - * Sliding in all directions. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Sliding in all directions. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Sliding in all directions. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - All, -} - -/** - * Creating an Object - * - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ -/** - * Creating an Object - * - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ -/** - * Creating an Object - * - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ -declare enum GestureMode { - /** - * Sequential gesture recognition is performed in sequence according to the gesture registration sequence. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Sequential gesture recognition is performed in sequence according to the gesture registration sequence. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Sequential gesture recognition is performed in sequence according to the gesture registration sequence. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - Sequence, - - /** - * Simultaneous recognition. Registration gestures participate in recognition. Everything can be triggered. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Simultaneous recognition. Registration gestures participate in recognition. Everything can be triggered. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Simultaneous recognition. Registration gestures participate in recognition. Everything can be triggered. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - Parallel, - - /** - * Mutually exclusive recognition. Only one gesture is successfully recognized. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Mutually exclusive recognition. Only one gesture is successfully recognized. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Mutually exclusive recognition. Only one gesture is successfully recognized. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - Exclusive, -} - -/** - * Creating an Object - * - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ -/** - * Creating an Object - * - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ -/** - * Creating an Object - * - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ -declare enum GestureMask { - /** - * High-priority response to the current gesture.When the current gesture fails to be recognized, other gesture responses are triggered.For gestures with the same priority, responses are performed based on the recognition sequence. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * High-priority response to the current gesture.When the current gesture fails to be recognized, other gesture responses are triggered.For gestures with the same priority, responses are performed based on the recognition sequence. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * High-priority response to the current gesture.When the current gesture fails to be recognized, other gesture responses are triggered.For gestures with the same priority, responses are performed based on the recognition sequence. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - Normal, - - /** - * Ignore internal gestures and recognize the current gesture first. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Ignore internal gestures and recognize the current gesture first. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Ignore internal gestures and recognize the current gesture first. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - IgnoreInternal, -} - -/** - * Creating an Object - * - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 11 - */ -/** - * Creating an Object - * - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ -declare enum GestureJudgeResult { - /** - * The system gesture determination is not affected. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 11 - */ - /** - * The system gesture determination is not affected. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - CONTINUE = 0, - - /** - * The user-defined gesture determination result of the current component is fail. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 11 - */ - /** - * The user-defined gesture determination result of the current component is fail. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - REJECT = 1, -} - -/** - * Creating an Object - * - * @namespace GestureControl - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform * @since 11 */ -/** - * Creating an Object - * - * @namespace GestureControl - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ -declare namespace GestureControl { - /** - * Creating an Object - * - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 11 - */ - /** - * Creating an Object - * - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - enum GestureType { - /** - * TapGesture. +declare enum PanDirection { + /** + * Default. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Default. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @since 11 + * @since 10 */ /** - * TapGesture. + * Default. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + */ + None, + /** + * Sliding horizontally. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 */ - TAP_GESTURE = 0, - /** - * LongPressGesture. + * Sliding horizontally. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @since 11 + * @since 10 */ /** - * LongPressGesture. + * Sliding horizontally. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + */ + Horizontal, + /** + * Sliding left. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 */ - LONG_PRESS_GESTURE = 1, - /** - * PanGesture. + * Sliding left. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @since 11 + * @since 10 */ /** - * PanGesture. + * Sliding left. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + */ + Left, + /** + * Sliding right. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 */ - PAN_GESTURE = 2, - /** - * PinchGesture. + * Sliding right. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @since 11 + * @since 10 */ /** - * PinchGesture. + * Sliding right. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + */ + Right, + /** + * Sliding Vertical + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 */ - PINCH_GESTURE = 3, - /** - * SwipeGesture. + * Sliding Vertical * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @since 11 + * @since 10 */ /** - * SwipeGesture. + * Sliding Vertical * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + */ + Vertical, + /** + * Sliding up. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 */ - SWIPE_GESTURE = 4, - /** - * RotationGesture. + * Sliding up. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @since 11 + * @since 10 */ /** - * RotationGesture. + * Sliding up. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + */ + Up, + /** + * Sliding Down. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 */ - ROTATION_GESTURE = 5, - /** - * Drag. + * Sliding Down. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @since 11 + * @since 10 */ /** - * Drag. + * Sliding Down. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + */ + Down, + /** + * Sliding in all directions. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 */ - DRAG = 6, - /** - * Click. + * Sliding in all directions. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @since 11 + * @since 10 */ /** - * Click. + * Sliding in all directions. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ - CLICK = 7, - } + All } - /** - * The description of gesture information. + * Creating an Object * - * @interface GestureInfo + * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 11 + * @since 8 */ /** - * The description of gesture information. + * Creating an Object * - * @interface GestureInfo + * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 10 */ -declare interface GestureInfo { - /** - * The tag of gesture. - * - * @type { ?string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 11 - */ - /** - * The tag of gesture. - * - * @type { ?string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - tag?: string; - - /** - * The type of gesture. - * - * @type { GestureControl.GestureType } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 11 - */ - /** - * The type of gesture. - * - * @type { GestureControl.GestureType } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - type: GestureControl.GestureType; - - /** - * The flag whether it is a system gesture. - * - * @type { boolean } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 11 - */ - /** - * The flag whether it is a system gesture. - * - * @type { boolean } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - isSystemGesture: boolean; -} - /** - * The location info used in gesture event. + * Creating an Object * - * @interface EventLocationInfo + * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 20 + * @since 11 */ -declare interface EventLocationInfo { - /** - * X-axis coordinates relative to the upper left corner of the component. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - x: number; - - /** - * Y-axis coordinates relative to the upper left corner of the component. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - y: number; - - /** - * X-axis coordinates relative to the upper left corner of the window. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - windowX: number; - - /** - * Y-axis coordinates relative to the upper left corner of the window. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - windowY: number; - - /** - * X-axis coordinates relative to the upper left corner of the screen. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - displayX: number; - - /** - * Y-axis coordinates relative to the upper left corner of the screen. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - displayY: number; +declare enum SwipeDirection { + /** + * Default. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Default. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Default. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + None, + /** + * Sliding horizontally. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Sliding horizontally. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Sliding horizontally. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + Horizontal, + /** + * Sliding Vertical + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Sliding Vertical + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Sliding Vertical + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + Vertical, + /** + * Sliding in all directions. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Sliding in all directions. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Sliding in all directions. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + All } - /** - * Type of the finger information. + * Creating an Object * - * @interface FingerInfo + * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 + * @since 7 */ /** - * Type of the finger information. + * Creating an Object * - * @interface FingerInfo + * @enum { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ +/** + * Creating an Object + * + * @enum { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ +declare enum GestureMode { + /** + * Sequential gesture recognition is performed in sequence according to the gesture registration sequence. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Sequential gesture recognition is performed in sequence according to the gesture registration sequence. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Sequential gesture recognition is performed in sequence according to the gesture registration sequence. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + Sequence, + /** + * Simultaneous recognition. Registration gestures participate in recognition. Everything can be triggered. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Simultaneous recognition. Registration gestures participate in recognition. Everything can be triggered. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Simultaneous recognition. Registration gestures participate in recognition. Everything can be triggered. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + Parallel, + /** + * Mutually exclusive recognition. Only one gesture is successfully recognized. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Mutually exclusive recognition. Only one gesture is successfully recognized. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Mutually exclusive recognition. Only one gesture is successfully recognized. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + Exclusive +} +/** + * Creating an Object + * + * @enum { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ +/** + * Creating an Object + * + * @enum { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ +/** + * Creating an Object + * + * @enum { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ +declare enum GestureMask { + /** + * High-priority response to the current gesture.When the current gesture fails to be recognized, other gesture responses are triggered.For gestures with the same priority, responses are performed based on the recognition sequence. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * High-priority response to the current gesture.When the current gesture fails to be recognized, other gesture responses are triggered.For gestures with the same priority, responses are performed based on the recognition sequence. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * High-priority response to the current gesture.When the current gesture fails to be recognized, other gesture responses are triggered.For gestures with the same priority, responses are performed based on the recognition sequence. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + Normal, + /** + * Ignore internal gestures and recognize the current gesture first. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Ignore internal gestures and recognize the current gesture first. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Ignore internal gestures and recognize the current gesture first. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + IgnoreInternal +} +/** + * Creating an Object + * + * @enum { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 11 + */ +/** + * Creating an Object + * + * @enum { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ +declare enum GestureJudgeResult { + /** + * The system gesture determination is not affected. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 11 + */ + /** + * The system gesture determination is not affected. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + CONTINUE = 0, + /** + * The user-defined gesture determination result of the current component is fail. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 11 + */ + /** + * The user-defined gesture determination result of the current component is fail. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + REJECT = 1 +} +/** + * Creating an Object + * + * @namespace GestureControl + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 11 + */ +/** + * Creating an Object + * + * @namespace GestureControl + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ +declare namespace GestureControl { + /** + * Creating an Object + * + * @enum { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 11 + */ + /** + * Creating an Object + * + * @enum { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + enum GestureType { + /** + * TapGesture. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 11 + */ + /** + * TapGesture. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + TAP_GESTURE = 0, + /** + * LongPressGesture. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 11 + */ + /** + * LongPressGesture. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + LONG_PRESS_GESTURE = 1, + /** + * PanGesture. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 11 + */ + /** + * PanGesture. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + PAN_GESTURE = 2, + /** + * PinchGesture. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 11 + */ + /** + * PinchGesture. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + PINCH_GESTURE = 3, + /** + * SwipeGesture. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 11 + */ + /** + * SwipeGesture. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + SWIPE_GESTURE = 4, + /** + * RotationGesture. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 11 + */ + /** + * RotationGesture. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + ROTATION_GESTURE = 5, + /** + * Drag. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 11 + */ + /** + * Drag. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + DRAG = 6, + /** + * Click. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 11 + */ + /** + * Click. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + CLICK = 7 + } +} +/** + * The description of gesture information. + * + * @interface GestureInfo + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 11 + */ +/** + * The description of gesture information. + * + * @interface GestureInfo + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ +declare interface GestureInfo { + /** + * The tag of gesture. + * + * @type { ?string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 11 + */ + /** + * The tag of gesture. + * + * @type { ?string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + tag?: string; + /** + * The type of gesture. + * + * @type { GestureControl.GestureType } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 11 + */ + /** + * The type of gesture. + * + * @type { GestureControl.GestureType } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + type: GestureControl.GestureType; + /** + * The flag whether it is a system gesture. + * + * @type { boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 11 + */ + /** + * The flag whether it is a system gesture. + * + * @type { boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + isSystemGesture: boolean; +} +/** + * The location info used in gesture event. + * + * @interface EventLocationInfo + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ +declare interface EventLocationInfo { + /** + * X-axis coordinates relative to the upper left corner of the component. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + x: number; + /** + * Y-axis coordinates relative to the upper left corner of the component. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + y: number; + /** + * X-axis coordinates relative to the upper left corner of the window. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + windowX: number; + /** + * Y-axis coordinates relative to the upper left corner of the window. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + windowY: number; + /** + * X-axis coordinates relative to the upper left corner of the screen. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + displayX: number; + /** + * Y-axis coordinates relative to the upper left corner of the screen. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + displayY: number; +} +/** + * Type of the finger information. + * + * @interface FingerInfo + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ +/** + * Type of the finger information. + * + * @interface FingerInfo * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 @@ -958,204 +877,185 @@ declare interface EventLocationInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ interface FingerInfo { - /** - * Finger unique identifier. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Finger unique identifier. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Finger unique identifier. - * - * @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 position of the click point relative to the global display coordinate. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - globalDisplayX?: number; - - /** - * Y position of the click point relative to the global display coordinate. - * - * @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 - * @since 8 - */ - /** - * 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 left edge of the device screen. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - globalX: number; - - /** - * The Y coordinate of the touch point relative to the upper edge of the device screen. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * The 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 - */ - /** - * The Y coordinate of the touch point relative to the upper edge of the device screen. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - globalY: number; - - /** - * X coordinate of the touch point relative to the left edge of the touched element. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * 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 left edge of the touched element. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - localX: number; - - /** - * Y coordinate of the touch point relative to the upper edge of the touched element. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * 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 edge of the touched element. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - localY: number; - - /** - * X coordinate of the touch point relative to the left edge of the device screen. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','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 - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - displayY: number; - - /** - * Type of the touch hand. - * - * @type { InteractionHand } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 - */ - hand?: InteractionHand; + /** + * Finger unique identifier. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Finger unique identifier. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Finger unique identifier. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + id: number; + /** + * X position of the click point relative to the global display coordinate. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + globalDisplayX?: number; + /** + * Y position of the click point relative to the global display coordinate. + * + * @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 + * @since 8 + */ + /** + * 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 left edge of the device screen. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + globalX: number; + /** + * The Y coordinate of the touch point relative to the upper edge of the device screen. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * The 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 + */ + /** + * The Y coordinate of the touch point relative to the upper edge of the device screen. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + globalY: number; + /** + * X coordinate of the touch point relative to the left edge of the touched element. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * 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 left edge of the touched element. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + localX: number; + /** + * Y coordinate of the touch point relative to the upper edge of the touched element. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * 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 edge of the touched element. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + localY: number; + /** + * X coordinate of the touch point relative to the left edge of the device screen. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + 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 + * @atomicservice + * @since 12 + */ + displayY: number; + /** + * Type of the touch hand. + * + * @type { InteractionHand } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 15 + */ + hand?: InteractionHand; } - /** * Defines the Gesture Type. * @@ -1180,27 +1080,7 @@ interface FingerInfo { * @atomicservice * @since 11 */ -declare type GestureType = - TapGestureInterface - | LongPressGestureInterface - | PanGestureInterface - | PinchGestureInterface - | SwipeGestureInterface - | RotationGestureInterface - | GestureGroupInterface; - -/** - * Defines the Gesture Type. - * - * @typedef { Gesture | GestureGroup } GestureType - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ -export type GestureType = Gesture | GestureGroup; - +declare type GestureType = TapGestureInterface | LongPressGestureInterface | PanGestureInterface | PinchGestureInterface | SwipeGestureInterface | RotationGestureInterface | GestureGroupInterface; /** * Defines the gesture base event. * @@ -1218,43 +1098,39 @@ export type GestureType = Gesture | GestureGroup; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ interface BaseGestureEvent extends BaseEvent { - /** - * All finger information. - * - * @type { FingerInfo[] } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 11 - */ - /** - * All finger information. - * - * @type { FingerInfo[] } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - fingerList: FingerInfo[]; - - /** - * All finger information when the gesture event is triggered, the return value - * is one array, and the array length is just the total fingers count. - * - * @type { ?FingerInfo[] } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - fingerInfos?: FingerInfo[]; + /** + * All finger information. + * + * @type { FingerInfo[] } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 11 + */ + /** + * All finger information. + * + * @type { FingerInfo[] } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + fingerList: FingerInfo[]; + /** + * All finger information when the gesture event is triggered, the return value + * is one array, and the array length is just the total fingers count. + * + * @type { ?FingerInfo[] } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + fingerInfos?: FingerInfo[]; } - /** * Defines event info for tap gesture. * @@ -1272,22 +1148,20 @@ interface BaseGestureEvent extends BaseEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ interface TapGestureEvent extends BaseGestureEvent { - /** - * The tap location info used in tap gesture. - * - * @type {?EventLocationInfo} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - tapLocation?: EventLocationInfo; + /** + * The tap location info used in tap gesture. + * + * @type {?EventLocationInfo} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + tapLocation?: EventLocationInfo; } - /** * Defines event info for long press gesture. * @@ -1305,31 +1179,28 @@ interface TapGestureEvent extends BaseGestureEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ interface LongPressGestureEvent extends BaseGestureEvent { - /** - * Indicates whether an event is triggered repeatedly. - * - * @type { boolean } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 11 - */ - /** - * Indicates whether an event is triggered repeatedly. - * - * @type { boolean } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - repeat: boolean; + /** + * Indicates whether an event is triggered repeatedly. + * + * @type { boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 11 + */ + /** + * Indicates whether an event is triggered repeatedly. + * + * @type { boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + repeat: boolean; } - /** * Defines event info for pan gesture. * @@ -1347,109 +1218,98 @@ interface LongPressGestureEvent extends BaseGestureEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ interface PanGestureEvent extends BaseGestureEvent { - /** - * Gesture event offset X. - * The unit is vp. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 11 - */ - /** - * Gesture event offset X. - * The unit is vp. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - offsetX: number; - - /** - * Gesture event offset Y. - * The unit is vp. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 11 - */ - /** - * Gesture event offset Y. - * The unit is vp. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - offsetY: number; - - /** - * X-axis velocity of the gesture. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 11 - */ - /** - * X-axis velocity of the gesture. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - velocityX: number; - - /** - * Y-axis velocity of the gesture. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 11 - */ - /** - * Y-axis velocity of the gesture. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - velocityY: number; - - /** - * velocity of the gesture. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 11 - */ - /** - * velocity of the gesture. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - velocity: number; + /** + * Gesture event offset X. + * The unit is vp. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 11 + */ + /** + * Gesture event offset X. + * The unit is vp. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + offsetX: number; + /** + * Gesture event offset Y. + * The unit is vp. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 11 + */ + /** + * Gesture event offset Y. + * The unit is vp. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + offsetY: number; + /** + * X-axis velocity of the gesture. + * @type { number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 11 + */ + /** + * X-axis velocity of the gesture. + * @type { number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + velocityX: number; + /** + * Y-axis velocity of the gesture. + * @type { number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 11 + */ + /** + * Y-axis velocity of the gesture. + * @type { number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + velocityY: number; + /** + * velocity of the gesture. + * @type { number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 11 + */ + /** + * velocity of the gesture. + * @type { number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + velocity: number; } - /** * Defines event info for pinch gesture. * @@ -1467,75 +1327,68 @@ interface PanGestureEvent extends BaseGestureEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ interface PinchGestureEvent extends BaseGestureEvent { - /** - * Scaling ratio. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 11 - */ - /** - * Scaling ratio. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - scale: number; - - /** - * X-axis coordinate of the kneading center point. - * The unit is vp. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 11 - */ - /** - * X-axis coordinate of the kneading center point. - * The unit is vp. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - pinchCenterX: number; - - /** - * Y-axis coordinate of the kneading center point. - * The unit is vp. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 11 - */ - /** - * Y-axis coordinate of the kneading center point. - * The unit is vp. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - pinchCenterY: number; + /** + * Scaling ratio. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 11 + */ + /** + * Scaling ratio. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + scale: number; + /** + * X-axis coordinate of the kneading center point. + * The unit is vp. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 11 + */ + /** + * X-axis coordinate of the kneading center point. + * The unit is vp. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + pinchCenterX: number; + /** + * Y-axis coordinate of the kneading center point. + * The unit is vp. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 11 + */ + /** + * Y-axis coordinate of the kneading center point. + * The unit is vp. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + pinchCenterY: number; } - /** * Defines event info for rotation gesture. * @@ -1553,33 +1406,30 @@ interface PinchGestureEvent extends BaseGestureEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ interface RotationGestureEvent extends BaseGestureEvent { - /** - * Gesture event direction angle. - * The unit is deg. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 11 - */ - /** - * Gesture event direction angle. - * The unit is deg. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - angle: number; + /** + * Gesture event direction angle. + * The unit is deg. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 11 + */ + /** + * Gesture event direction angle. + * The unit is deg. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + angle: number; } - /** * Defines event info for swipe gesture. * @@ -1597,55 +1447,50 @@ interface RotationGestureEvent extends BaseGestureEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ interface SwipeGestureEvent extends BaseGestureEvent { - /** - * Gesture event direction angle. - * The unit is deg. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 11 - */ - /** - * Gesture event direction angle. - * The unit is deg. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - angle: number; - - /** - * Gesture event slide speed. - * The unit is vp. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 11 - */ - /** - * Gesture event slide speed. - * The unit is vp. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - speed: number; + /** + * Gesture event direction angle. + * The unit is deg. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 11 + */ + /** + * Gesture event direction angle. + * The unit is deg. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + angle: number; + /** + * Gesture event slide speed. + * The unit is vp. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 11 + */ + /** + * Gesture event slide speed. + * The unit is vp. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + speed: number; } - /** * Defines event info for gesture. * @@ -1671,376 +1516,349 @@ interface SwipeGestureEvent extends BaseGestureEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ interface GestureEvent extends BaseEvent { - /** - * Indicates whether an event is triggered repeatedly. - * Used in LongPressGesture. - * - * @type { boolean } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Indicates whether an event is triggered repeatedly. - * Used in LongPressGesture. - * - * @type { boolean } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Indicates whether an event is triggered repeatedly. - * Used in LongPressGesture. - * - * @type { boolean } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - repeat: boolean; - - /** - * All finger information. - * Used in LongPressGesture and TapGesture. - * - * @type { FingerInfo[] } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * All finger information. - * Used in LongPressGesture and TapGesture. - * - * @type { FingerInfo[] } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * All finger information. - * Used in LongPressGesture and TapGesture. - * - * @type { FingerInfo[] } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - fingerList: FingerInfo[]; - - /** - * All finger information when the gesture event is triggered, the return value - * is one array, and the array length is just the total fingers count. - * - * @type { ?FingerInfo[] } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - fingerInfos?: FingerInfo[]; - - /** - * Gesture event offset X. - * The unit is vp. - * Used in PanGesture. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Gesture event offset X. - * The unit is vp. - * Used in PanGesture. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Gesture event offset X. - * The unit is vp. - * Used in PanGesture. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - offsetX: number; - - /** - * Gesture event offset Y. - * The unit is vp. - * Used in PanGesture. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Gesture event offset Y. - * The unit is vp. - * Used in PanGesture. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Gesture event offset Y. - * The unit is vp. - * Used in PanGesture. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - offsetY: number; - - /** - * Gesture event direction angle. - * The unit is deg. - * Used in RotationGesture and SwipeGesture. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Gesture event direction angle. - * The unit is deg. - * Used in RotationGesture and SwipeGesture. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Gesture event direction angle. - * The unit is deg. - * Used in RotationGesture and SwipeGesture. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - angle: number; - - /** - * Gesture event slide speed. - * The unit is vp. - * Used in SwipeGesture. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Gesture event slide speed. - * The unit is vp. - * Used in SwipeGesture. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Gesture event slide speed. - * The unit is vp. - * Used in SwipeGesture. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - speed: number; - - /** - * Scaling ratio. - * Used in PinchGesture. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Scaling ratio. - * Used in PinchGesture. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Scaling ratio. - * Used in PinchGesture. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - scale: number; - - /** - * X-axis coordinate of the kneading center point. - * The unit is vp. - * Used in PinchGesture. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * X-axis coordinate of the kneading center point. - * The unit is vp. - * Used in PinchGesture. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * X-axis coordinate of the kneading center point. - * The unit is vp. - * Used in PinchGesture. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - pinchCenterX: number; - - /** - * Y-axis coordinate of the kneading center point. - * The unit is vp. - * Used in PinchGesture. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Y-axis coordinate of the kneading center point. - * The unit is vp. - * Used in PinchGesture. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Y-axis coordinate of the kneading center point. - * The unit is vp. - * Used in PinchGesture. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - pinchCenterY: number; - - /** - * X-axis velocity of the gesture. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * X-axis velocity of the gesture. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - velocityX: number; - - /** - * Y-axis velocity of the gesture. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Y-axis velocity of the gesture. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - velocityY: number; - - /** - * velocity of the gesture. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * velocity of the gesture. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - velocity: number; - - /** - * The tap location info used in tap gesture. - * - * @type {?EventLocationInfo} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - tapLocation?: EventLocationInfo; + /** + * Indicates whether an event is triggered repeatedly. + * Used in LongPressGesture. + * + * @type { boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Indicates whether an event is triggered repeatedly. + * Used in LongPressGesture. + * + * @type { boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Indicates whether an event is triggered repeatedly. + * Used in LongPressGesture. + * + * @type { boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + repeat: boolean; + /** + * All finger information. + * Used in LongPressGesture and TapGesture. + * + * @type { FingerInfo[] } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * All finger information. + * Used in LongPressGesture and TapGesture. + * + * @type { FingerInfo[] } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * All finger information. + * Used in LongPressGesture and TapGesture. + * + * @type { FingerInfo[] } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + fingerList: FingerInfo[]; + /** + * All finger information when the gesture event is triggered, the return value + * is one array, and the array length is just the total fingers count. + * + * @type { ?FingerInfo[] } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + fingerInfos?: FingerInfo[]; + /** + * Gesture event offset X. + * The unit is vp. + * Used in PanGesture. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Gesture event offset X. + * The unit is vp. + * Used in PanGesture. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Gesture event offset X. + * The unit is vp. + * Used in PanGesture. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + offsetX: number; + /** + * Gesture event offset Y. + * The unit is vp. + * Used in PanGesture. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Gesture event offset Y. + * The unit is vp. + * Used in PanGesture. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Gesture event offset Y. + * The unit is vp. + * Used in PanGesture. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + offsetY: number; + /** + * Gesture event direction angle. + * The unit is deg. + * Used in RotationGesture and SwipeGesture. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Gesture event direction angle. + * The unit is deg. + * Used in RotationGesture and SwipeGesture. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Gesture event direction angle. + * The unit is deg. + * Used in RotationGesture and SwipeGesture. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + angle: number; + /** + * Gesture event slide speed. + * The unit is vp. + * Used in SwipeGesture. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Gesture event slide speed. + * The unit is vp. + * Used in SwipeGesture. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Gesture event slide speed. + * The unit is vp. + * Used in SwipeGesture. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + speed: number; + /** + * Scaling ratio. + * Used in PinchGesture. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Scaling ratio. + * Used in PinchGesture. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Scaling ratio. + * Used in PinchGesture. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + scale: number; + /** + * X-axis coordinate of the kneading center point. + * The unit is vp. + * Used in PinchGesture. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * X-axis coordinate of the kneading center point. + * The unit is vp. + * Used in PinchGesture. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * X-axis coordinate of the kneading center point. + * The unit is vp. + * Used in PinchGesture. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + pinchCenterX: number; + /** + * Y-axis coordinate of the kneading center point. + * The unit is vp. + * Used in PinchGesture. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Y-axis coordinate of the kneading center point. + * The unit is vp. + * Used in PinchGesture. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Y-axis coordinate of the kneading center point. + * The unit is vp. + * Used in PinchGesture. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + pinchCenterY: number; + /** + * X-axis velocity of the gesture. + * @type { number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * X-axis velocity of the gesture. + * @type { number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + velocityX: number; + /** + * Y-axis velocity of the gesture. + * @type { number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Y-axis velocity of the gesture. + * @type { number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + velocityY: number; + /** + * velocity of the gesture. + * @type { number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * velocity of the gesture. + * @type { number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + velocity: number; + /** + * The tap location info used in tap gesture. + * + * @type {?EventLocationInfo} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + tapLocation?: EventLocationInfo; } - /** * Defines Gesture interface. * @@ -2051,92 +1869,50 @@ interface GestureEvent extends BaseEvent { * @since 11 */ interface GestureInterface { - /** - * Set gesture's tag. - * - * @param { string } tag - * @returns { T } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - tag(tag: string): T; - - /** - * Input source type for gesture response. - * - * @param { Array } types - indicate the allowed input source for gesture to response - * @returns { T } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 14 - */ - allowedTypes(types: Array): T; -} - - /** - * Defines the BaseHandlerOptions options. - * @interface BaseHandlerOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 - */ - interface BaseHandlerOptions { - /** - * The flag to strict verification fingers, if touch finger size is over or less than fingers, gesture can not be accepted. - * The default value is false. - * - * @type { ?boolean } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 - */ - isFingerCountLimited?: boolean; + /** + * Set gesture's tag. + * + * @param { string } tag + * @returns { T } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + tag(tag: string): T; + /** + * Input source type for gesture response. + * + * @param { Array } types - indicate the allowed input source for gesture to response + * @returns { T } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 14 + */ + allowedTypes(types: Array): T; } - /** - * Defines Gesture interface. - * + * Defines the BaseHandlerOptions options. + * @interface BaseHandlerOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 20 - * @arkts 1.2 + * @since 15 */ -export declare class Gesture { - /** - * Set gesture's tag. - * - * @param { string } tag - * @returns { this } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - tag(tag: string): this; - - /** - * Input source type for gesture response. - * - * @param { Array } types - indicate the allowed input source for gesture to response - * @returns { this } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - allowedTypes(types: Array): this; +interface BaseHandlerOptions { + /** + * The flag to strict verification fingers, if touch finger size is over or less than fingers, gesture can not be accepted. + * The default value is false. + * + * @type { ?boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 15 + */ + isFingerCountLimited?: boolean; } - /** * Defines TapGesture parameters. * @@ -2154,45 +1930,40 @@ export declare class Gesture { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ declare interface TapGestureParameters extends BaseHandlerOptions { - /** - * Number of consecutive clicks recognized. If the value is less than 1, the default value is used. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - count?: number; - /** - * The hand index that triggers the click. If the value is less than 1, the default value is used. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - fingers?: number; - /** - * The limited move distance of click. If the value is less than 0, the default value is used. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - distanceThreshold?: number; + /** + * Number of consecutive clicks recognized. If the value is less than 1, the default value is used. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + count?: number; + /** + * The hand index that triggers the click. If the value is less than 1, the default value is used. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + fingers?: number; + /** + * The limited move distance of click. If the value is less than 0, the default value is used. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + distanceThreshold?: number; } - /** * Defines TapGesture interface. * @@ -2221,122 +1992,80 @@ declare interface TapGestureParameters extends BaseHandlerOptions { * @since 11 */ interface TapGestureInterface extends GestureInterface { - /** - * Set the value. - * count:Number of consecutive clicks recognized. If the value is less than 1, the default value is used. - * fingers:The hand index that triggers the click. If the value is less than 1, the default value is used. - * - * @param { object } value - * @returns { TapGestureInterface } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Set the value. - * count:Number of consecutive clicks recognized. If the value is less than 1, the default value is used. - * fingers:The hand index that triggers the click. If the value is less than 1, the default value is used. - * - * @param { object } value - * @returns { TapGestureInterface } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Set the value. - * count:Number of consecutive clicks recognized. If the value is less than 1, the default value is used. - * fingers:The hand index that triggers the click. If the value is less than 1, the default value is used. - * - * @param { object } value - * @returns { TapGestureInterface } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - /** - * Set the value. - * TapGestureParameters: The parameters of the tapGesture. - * - * @param { TapGestureParameters } value - * @returns { TapGestureInterface } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - (value?: TapGestureParameters): TapGestureInterface; - - /** - * Tap gesture recognition success callback. - * - * @param { function } event - * @returns { TapGestureInterface } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Tap gesture recognition success callback. - * - * @param { function } event - * @returns { TapGestureInterface } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Tap gesture recognition success callback. - * - * @param { function } event - * @returns { TapGestureInterface } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - onAction(event: (event: GestureEvent) => void): TapGestureInterface; -} - -/*** if arkts 1.2 */ -/** - * Defines TapGesture. - * - * @extends Gesture - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ -export declare class TapGesture extends Gesture { - /** - * Set the value. - * TapGestureParameters: The parameters of the tapGesture. - * - * @param { function } factory - * @param { TapGestureParameters } value - * @returns { TapGesture } - * @static - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - static $_instantiate(factory: () => TapGesture, value?: TapGestureParameters): TapGesture - - /** - * Tap gesture recognition success callback. - * - * @param { Callback } event - * @returns { this } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - onAction(event: Callback): this; + /** + * Set the value. + * count:Number of consecutive clicks recognized. If the value is less than 1, the default value is used. + * fingers:The hand index that triggers the click. If the value is less than 1, the default value is used. + * + * @param { object } value + * @returns { TapGestureInterface } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Set the value. + * count:Number of consecutive clicks recognized. If the value is less than 1, the default value is used. + * fingers:The hand index that triggers the click. If the value is less than 1, the default value is used. + * + * @param { object } value + * @returns { TapGestureInterface } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Set the value. + * count:Number of consecutive clicks recognized. If the value is less than 1, the default value is used. + * fingers:The hand index that triggers the click. If the value is less than 1, the default value is used. + * + * @param { object } value + * @returns { TapGestureInterface } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + /** + * Set the value. + * TapGestureParameters: The parameters of the tapGesture. + * + * @param { TapGestureParameters } value + * @returns { TapGestureInterface } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + (value?: TapGestureParameters): TapGestureInterface; + /** + * Tap gesture recognition success callback. + * + * @param { function } event + * @returns { TapGestureInterface } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Tap gesture recognition success callback. + * + * @param { function } event + * @returns { TapGestureInterface } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Tap gesture recognition success callback. + * + * @param { function } event + * @returns { TapGestureInterface } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + onAction(event: (event: GestureEvent) => void): TapGestureInterface; } -/*** endif */ - /** * Defines LongPressGesture interface. * @@ -2365,221 +2094,155 @@ export declare class TapGesture extends Gesture { * @since 11 */ interface LongPressGestureInterface extends GestureInterface { - /** - * Set the value. - * fingers: Indicates the hand index that triggers the long press. - * repeat: Indicates whether to trigger event callback continuously. - * duration: Minimum press and hold time, in milliseconds. - * - * @param { object } value - * @returns { LongPressGestureInterface } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Set the value. - * fingers: Indicates the hand index that triggers the long press. - * repeat: Indicates whether to trigger event callback continuously. - * duration: Minimum press and hold time, in milliseconds. - * - * @param { object } value - * @returns { LongPressGestureInterface } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Set the value. - * fingers: Indicates the hand index that triggers the long press. - * repeat: Indicates whether to trigger event callback continuously. - * duration: Minimum press and hold time, in milliseconds. - * - * @param { object } value - * @returns { LongPressGestureInterface } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - (value?: { fingers?: number; repeat?: boolean; duration?: number }): LongPressGestureInterface; - - /** - * Set the options. - * options: The options of the long press gesture. - * - * @param { LongPressGestureHandlerOptions } options - * @returns { LongPressGestureInterface } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 15 - */ + /** + * Set the value. + * fingers: Indicates the hand index that triggers the long press. + * repeat: Indicates whether to trigger event callback continuously. + * duration: Minimum press and hold time, in milliseconds. + * + * @param { object } value + * @returns { LongPressGestureInterface } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Set the value. + * fingers: Indicates the hand index that triggers the long press. + * repeat: Indicates whether to trigger event callback continuously. + * duration: Minimum press and hold time, in milliseconds. + * + * @param { object } value + * @returns { LongPressGestureInterface } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Set the value. + * fingers: Indicates the hand index that triggers the long press. + * repeat: Indicates whether to trigger event callback continuously. + * duration: Minimum press and hold time, in milliseconds. + * + * @param { object } value + * @returns { LongPressGestureInterface } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + (value?: { + fingers?: number; + repeat?: boolean; + duration?: number; + }): LongPressGestureInterface; + /** + * Set the options. + * options: The options of the long press gesture. + * + * @param { LongPressGestureHandlerOptions } options + * @returns { LongPressGestureInterface } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 15 + */ (options?: LongPressGestureHandlerOptions): LongPressGestureInterface; - /** - * LongPress gesture recognition success callback. - * - * @param { function } event - * @returns { LongPressGestureInterface } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * LongPress gesture recognition success callback. - * - * @param { function } event - * @returns { LongPressGestureInterface } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * LongPress gesture recognition success callback. - * - * @param { function } event - * @returns { LongPressGestureInterface } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - onAction(event: (event: GestureEvent) => void): LongPressGestureInterface; - - /** - * The LongPress gesture is successfully recognized. When the finger is lifted, the callback is triggered. - * - * @param { function } event - * @returns { LongPressGestureInterface } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * The LongPress gesture is successfully recognized. When the finger is lifted, the callback is triggered. - * - * @param { function } event - * @returns { LongPressGestureInterface } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * The LongPress gesture is successfully recognized. When the finger is lifted, the callback is triggered. - * - * @param { function } event - * @returns { LongPressGestureInterface } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - onActionEnd(event: (event: GestureEvent) => void): LongPressGestureInterface; - - /** - * The LongPress gesture is successfully recognized and a callback is triggered when the touch cancel event is received. - * - * @param { function } event - * @returns { LongPressGestureInterface } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * The LongPress gesture is successfully recognized and a callback is triggered when the touch cancel event is received. - * - * @param { function } event - * @returns { LongPressGestureInterface } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * The LongPress gesture is successfully recognized and a callback is triggered when the touch cancel event is received. - * - * @param { function } event - * @returns { LongPressGestureInterface } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - onActionCancel(event: () => void): LongPressGestureInterface; - /** - * The LongPress gesture is successfully recognized and a callback is triggered when the touch cancel event is received. - * - * @param { function } event - * @returns { LongPressGestureInterface } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - onActionCancel(event: Callback): LongPressGestureInterface; -} - -/*** if arkts 1.2 */ -/** - * Defines LongPressGesture. - * - * @extends Gesture - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ -export declare class LongPressGesture extends Gesture { - /** - * Set the value. - * fingers: Indicates the hand index that triggers the long press. - * repeat: Indicates whether to trigger event callback continuously. - * duration: Minimum press and hold time, in milliseconds. - * - * @param { function } factory - * @param { LongPressGestureHandlerOptions } value - * @returns { LongPressGesture } - * @static - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - static $_instantiate(factory: () => LongPressGesture, value?: LongPressGestureHandlerOptions): LongPressGesture - - /** - * LongPress gesture recognition success callback. - * - * @param { Callback } event - * @returns { this } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - onAction(event: Callback): this; - - /** - * The LongPress gesture is successfully recognized. When the finger is lifted, the callback is triggered. - * - * @param { Callback } event - * @returns { this } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - onActionEnd(event: Callback): this; - - /** - * The LongPress gesture is successfully recognized and a callback is triggered when the touch cancel event is received. - * - * @param { Callback } event - * @returns { this } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - onActionCancel(event: Callback): this; + /** + * LongPress gesture recognition success callback. + * + * @param { function } event + * @returns { LongPressGestureInterface } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * LongPress gesture recognition success callback. + * + * @param { function } event + * @returns { LongPressGestureInterface } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * LongPress gesture recognition success callback. + * + * @param { function } event + * @returns { LongPressGestureInterface } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + onAction(event: (event: GestureEvent) => void): LongPressGestureInterface; + /** + * The LongPress gesture is successfully recognized. When the finger is lifted, the callback is triggered. + * + * @param { function } event + * @returns { LongPressGestureInterface } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * The LongPress gesture is successfully recognized. When the finger is lifted, the callback is triggered. + * + * @param { function } event + * @returns { LongPressGestureInterface } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * The LongPress gesture is successfully recognized. When the finger is lifted, the callback is triggered. + * + * @param { function } event + * @returns { LongPressGestureInterface } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + onActionEnd(event: (event: GestureEvent) => void): LongPressGestureInterface; + /** + * The LongPress gesture is successfully recognized and a callback is triggered when the touch cancel event is received. + * + * @param { function } event + * @returns { LongPressGestureInterface } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * The LongPress gesture is successfully recognized and a callback is triggered when the touch cancel event is received. + * + * @param { function } event + * @returns { LongPressGestureInterface } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * The LongPress gesture is successfully recognized and a callback is triggered when the touch cancel event is received. + * + * @param { function } event + * @returns { LongPressGestureInterface } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + onActionCancel(event: () => void): LongPressGestureInterface; + /** + * The LongPress gesture is successfully recognized and a callback is triggered when the touch cancel event is received. + * + * @param { function } event + * @returns { LongPressGestureInterface } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + onActionCancel(event: Callback): LongPressGestureInterface; } -/*** endif */ - /** * Defines the PanGesture options. * @@ -2599,187 +2262,135 @@ export declare class LongPressGesture extends Gesture { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare class PanGestureOptions { - /** - * Constructor parameters. - * - * @param { object } value - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Constructor parameters. - * - * @param { object } value - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Constructor parameters. - * - * @param { object } value - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - constructor(value?: { fingers?: number; direction?: PanDirection; distance?: number }); - - /** - * Constructor parameters. - * - * @param { PanGestureHandlerOptions } value - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - constructor(value?: PanGestureHandlerOptions); - - /** - * Sets the direction attribute. - * - * @param { PanDirection } value - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Sets the direction attribute. - * - * @param { PanDirection } value - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Sets the direction attribute. - * - * @param { PanDirection } value - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - setDirection(value: PanDirection); - - /** - * Sets the direction attribute. - * - * @param { PanDirection } value - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - setDirection(value: PanDirection): void; - - /** - * Sets the setDistance attribute. - * - * @param { number } value - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Sets the setDistance attribute. - * - * @param { number } value - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Sets the setDistance attribute. - * - * @param { number } value - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - setDistance(value: number); - - /** - * Sets the setDistance attribute. - * - * @param { number } value - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - setDistance(value: number): void; - - /** - * Sets the setFingers attribute. - * - * @param { number } value - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Sets the setFingers attribute. - * - * @param { number } value - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Sets the setFingers attribute. - * - * @param { number } value - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - setFingers(value: number); - - /** - * Sets the setFingers attribute. - * - * @param { number } value - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - setFingers(value: number): void; - - /** - * Get the pan direction attribute. - * - * @returns { PanDirection } - Pan gesture direction - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - getDirection(): PanDirection; - /** - * Returns the pan gesture's distance. - * The unit is vp. - * - * @returns { number } - the distance of the pan gesture. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - getDistance(): number; + /** + * Constructor parameters. + * + * @param { object } value + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Constructor parameters. + * + * @param { object } value + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Constructor parameters. + * + * @param { object } value + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + constructor(value?: { + fingers?: number; + direction?: PanDirection; + distance?: number; + }); + /** + * Sets the direction attribute. + * + * @param { PanDirection } value + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Sets the direction attribute. + * + * @param { PanDirection } value + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Sets the direction attribute. + * + * @param { PanDirection } value + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + setDirection(value: PanDirection); + /** + * Sets the setDistance attribute. + * + * @param { number } value + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Sets the setDistance attribute. + * + * @param { number } value + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Sets the setDistance attribute. + * + * @param { number } value + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + setDistance(value: number); + /** + * Sets the setFingers attribute. + * + * @param { number } value + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Sets the setFingers attribute. + * + * @param { number } value + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Sets the setFingers attribute. + * + * @param { number } value + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + setFingers(value: number); + /** + * Get the pan direction attribute. + * + * @returns { PanDirection } - Pan gesture direction + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + getDirection(): PanDirection; + /** + * Returns the pan gesture's distance. + * The unit is vp. + * + * @returns { number } - the distance of the pan gesture. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + getDistance(): number; } - /** * Defines the PanGesture interface. * @@ -2808,251 +2419,185 @@ declare class PanGestureOptions { * @since 11 */ interface PanGestureInterface extends GestureInterface { - /** - * Set the value. - * - * @param { { fingers?: number; direction?: PanDirection; distance?: number } | PanGestureOptions } value - * @returns { PanGestureInterface } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Set the value. - * - * @param { { fingers?: number; direction?: PanDirection; distance?: number } | PanGestureOptions } value - * @returns { PanGestureInterface } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Set the value. - * - * @param { { fingers?: number; direction?: PanDirection; distance?: number } | PanGestureOptions } value - * @returns { PanGestureInterface } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - (value?: { fingers?: number; direction?: PanDirection; distance?: number } | PanGestureOptions): PanGestureInterface; - - /** - * Set the value. - * - * @param { PanGestureHandlerOptions } options - * @returns { PanGestureInterface } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 15 - */ - (options?: PanGestureHandlerOptions): PanGestureInterface; - - /** - * Pan gesture recognition success callback. - * - * @param { function } event - * @returns { PanGestureInterface } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Pan gesture recognition success callback. - * - * @param { function } event - * @returns { PanGestureInterface } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Pan gesture recognition success callback. - * - * @param { function } event - * @returns { PanGestureInterface } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - onActionStart(event: (event: GestureEvent) => void): PanGestureInterface; - - /** - * Callback when the Pan gesture is moving. - * - * @param { function } event - * @returns { PanGestureInterface } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Callback when the Pan gesture is moving. - * - * @param { function } event - * @returns { PanGestureInterface } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Callback when the Pan gesture is moving. - * - * @param { function } event - * @returns { PanGestureInterface } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - onActionUpdate(event: (event: GestureEvent) => void): PanGestureInterface; - - /** - * The Pan gesture is successfully recognized. When the finger is lifted, the callback is triggered. - * - * @param { function } event - * @returns { PanGestureInterface } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * The Pan gesture is successfully recognized. When the finger is lifted, the callback is triggered. - * - * @param { function } event - * @returns { PanGestureInterface } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * The Pan gesture is successfully recognized. When the finger is lifted, the callback is triggered. - * - * @param { function } event - * @returns { PanGestureInterface } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - onActionEnd(event: (event: GestureEvent) => void): PanGestureInterface; - - /** - * The Pan gesture is successfully recognized and a callback is triggered when the touch cancel event is received. - * - * @param { function } event - * @returns { PanGestureInterface } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * The Pan gesture is successfully recognized and a callback is triggered when the touch cancel event is received. - * - * @param { function } event - * @returns { PanGestureInterface } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * The Pan gesture is successfully recognized and a callback is triggered when the touch cancel event is received. - * - * @param { function } event - * @returns { PanGestureInterface } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - onActionCancel(event: () => void): PanGestureInterface; - /** - * The Pan gesture is successfully recognized and a callback is triggered when the touch cancel event is received. - * - * @param { function } event - * @returns { PanGestureInterface } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - onActionCancel(event: Callback): PanGestureInterface; - -} - -/*** if arkts 1.2 */ -/** - * Defines PanGesture. - * - * @extends Gesture - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ -export declare class PanGesture extends Gesture { - /** - * Set the value. - * - * @param { function } factory - * @param { PanGestureHandlerOptions | PanGestureOptions } value - * @returns { PanGesture } - * @static - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - static $_instantiate(factory: () => PanGesture, value?: PanGestureHandlerOptions | PanGestureOptions): PanGesture - - /** - * Pan gesture recognition success callback. - * - * @param { Callback } event - * @returns { this } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - onActionStart(event: Callback): this; - - /** - * Callback when the Pan gesture is moving. - * - * @param { Callback } event - * @returns { this } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - onActionUpdate(event: Callback): this; - - /** - * The Pan gesture is successfully recognized. When the finger is lifted, the callback is triggered. - * - * @param { Callback } event - * @returns { this } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - onActionEnd(event: Callback): this; - - /** - * The Pan gesture is successfully recognized and a callback is triggered when the touch cancel event is received. - * - * @param { Callback } event - * @returns { this } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - onActionCancel(event: Callback): this; + /** + * Set the value. + * + * @param { { + fingers?: number; + direction?: PanDirection; + distance?: number; +} | PanGestureOptions } value + * @returns { PanGestureInterface } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Set the value. + * + * @param { { + fingers?: number; + direction?: PanDirection; + distance?: number; +} | PanGestureOptions } value + * @returns { PanGestureInterface } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Set the value. + * + * @param { { + fingers?: number; + direction?: PanDirection; + distance?: number; +} | PanGestureOptions } value + * @returns { PanGestureInterface } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + (value?: { + fingers?: number; + direction?: PanDirection; + distance?: number; + } | PanGestureOptions): PanGestureInterface; + /** + * Set the value. + * + * @param { PanGestureHandlerOptions } options + * @returns { PanGestureInterface } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 15 + */ + (options?: PanGestureHandlerOptions): PanGestureInterface; + /** + * Pan gesture recognition success callback. + * + * @param { function } event + * @returns { PanGestureInterface } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Pan gesture recognition success callback. + * + * @param { function } event + * @returns { PanGestureInterface } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Pan gesture recognition success callback. + * + * @param { function } event + * @returns { PanGestureInterface } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + onActionStart(event: (event: GestureEvent) => void): PanGestureInterface; + /** + * Callback when the Pan gesture is moving. + * + * @param { function } event + * @returns { PanGestureInterface } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Callback when the Pan gesture is moving. + * + * @param { function } event + * @returns { PanGestureInterface } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Callback when the Pan gesture is moving. + * + * @param { function } event + * @returns { PanGestureInterface } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + onActionUpdate(event: (event: GestureEvent) => void): PanGestureInterface; + /** + * The Pan gesture is successfully recognized. When the finger is lifted, the callback is triggered. + * + * @param { function } event + * @returns { PanGestureInterface } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * The Pan gesture is successfully recognized. When the finger is lifted, the callback is triggered. + * + * @param { function } event + * @returns { PanGestureInterface } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * The Pan gesture is successfully recognized. When the finger is lifted, the callback is triggered. + * + * @param { function } event + * @returns { PanGestureInterface } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + onActionEnd(event: (event: GestureEvent) => void): PanGestureInterface; + /** + * The Pan gesture is successfully recognized and a callback is triggered when the touch cancel event is received. + * + * @param { function } event + * @returns { PanGestureInterface } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * The Pan gesture is successfully recognized and a callback is triggered when the touch cancel event is received. + * + * @param { function } event + * @returns { PanGestureInterface } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * The Pan gesture is successfully recognized and a callback is triggered when the touch cancel event is received. + * + * @param { function } event + * @returns { PanGestureInterface } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + onActionCancel(event: () => void): PanGestureInterface; + /** + * The Pan gesture is successfully recognized and a callback is triggered when the touch cancel event is received. + * + * @param { function } event + * @returns { PanGestureInterface } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + onActionCancel(event: Callback): PanGestureInterface; } -/*** endif */ - /** * Defines the SwipeGesture interface. * @@ -3081,117 +2626,79 @@ export declare class PanGesture extends Gesture { * @since 11 */ interface SwipeGestureInterface extends GestureInterface { - /** - * Set the value. - * - * @param { object } value - * @returns { SwipeGestureInterface } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Set the value. - * - * @param { object } value - * @returns { SwipeGestureInterface } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Set the value. - * - * @param { object } value - * @returns { SwipeGestureInterface } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - (value?: { fingers?: number; direction?: SwipeDirection; speed?: number }): SwipeGestureInterface; - - /** - * Set the options. - * options: The options of the swipe gesture. - * - * @param { SwipeGestureHandlerOptions } options - * @returns { SwipeGestureInterface } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 15 - */ - (options?: SwipeGestureHandlerOptions): SwipeGestureInterface; - - /** - * Slide gesture recognition success callback. - * - * @param { function } event - * @returns { SwipeGestureInterface } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Slide gesture recognition success callback. - * - * @param { function } event - * @returns { SwipeGestureInterface } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Slide gesture recognition success callback. - * - * @param { function } event - * @returns { SwipeGestureInterface } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - onAction(event: (event: GestureEvent) => void): SwipeGestureInterface; -} - -/*** if arkts 1.2 */ -/** - * Defines SwipeGesture. - * - * @extends Gesture - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ -export declare class SwipeGesture extends Gesture { - /** - * Set the value. - * - * @param { function } factory - * @param { SwipeGestureHandlerOptions } value - * @returns { SwipeGesture } - * @static - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - static $_instantiate(factory: () => SwipeGesture, value?: SwipeGestureHandlerOptions): SwipeGesture - - /** - * Slide gesture recognition success callback. - * - * @param { Callback } event - * @returns { this } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - onAction(event: Callback): this; + /** + * Set the value. + * + * @param { object } value + * @returns { SwipeGestureInterface } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Set the value. + * + * @param { object } value + * @returns { SwipeGestureInterface } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Set the value. + * + * @param { object } value + * @returns { SwipeGestureInterface } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + (value?: { + fingers?: number; + direction?: SwipeDirection; + speed?: number; + }): SwipeGestureInterface; + /** + * Set the options. + * options: The options of the swipe gesture. + * + * @param { SwipeGestureHandlerOptions } options + * @returns { SwipeGestureInterface } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 15 + */ + (options?: SwipeGestureHandlerOptions): SwipeGestureInterface; + /** + * Slide gesture recognition success callback. + * + * @param { function } event + * @returns { SwipeGestureInterface } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Slide gesture recognition success callback. + * + * @param { function } event + * @returns { SwipeGestureInterface } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Slide gesture recognition success callback. + * + * @param { function } event + * @returns { SwipeGestureInterface } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + onAction(event: (event: GestureEvent) => void): SwipeGestureInterface; } -/*** endif */ - /** * Defines the PinchGesture interface. * @@ -3220,251 +2727,173 @@ export declare class SwipeGesture extends Gesture { * @since 11 */ interface PinchGestureInterface extends GestureInterface { - /** - * Set the value. - * - * @param { object } value - * @returns { PinchGestureInterface } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Set the value. - * - * @param { object } value - * @returns { PinchGestureInterface } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Set the value. - * - * @param { object } value - * @returns { PinchGestureInterface } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - (value?: { fingers?: number; distance?: number }): PinchGestureInterface; - - /** - * Set the options. - * options: The options of the pinch gesture. - * - * @param { PinchGestureHandlerOptions } options - * @returns { PinchGestureInterface } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 15 - */ - (options?: PinchGestureHandlerOptions): PinchGestureInterface; - - /** - * Pan gesture recognition success callback. - * - * @param { function } event - * @returns { PinchGestureInterface } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Pan gesture recognition success callback. - * - * @param { function } event - * @returns { PinchGestureInterface } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Pan gesture recognition success callback. - * - * @param { function } event - * @returns { PinchGestureInterface } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - onActionStart(event: (event: GestureEvent) => void): PinchGestureInterface; - - /** - * Callback when the Pan gesture is moving. - * - * @param { function } event - * @returns { PinchGestureInterface } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Callback when the Pan gesture is moving. - * - * @param { function } event - * @returns { PinchGestureInterface } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Callback when the Pan gesture is moving. - * - * @param { function } event - * @returns { PinchGestureInterface } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - onActionUpdate(event: (event: GestureEvent) => void): PinchGestureInterface; - - /** - * The Pan gesture is successfully recognized. When the finger is lifted, the callback is triggered. - * - * @param { function } event - * @returns { PinchGestureInterface } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * The Pan gesture is successfully recognized. When the finger is lifted, the callback is triggered. - * - * @param { function } event - * @returns { PinchGestureInterface } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * The Pan gesture is successfully recognized. When the finger is lifted, the callback is triggered. - * - * @param { function } event - * @returns { PinchGestureInterface } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - onActionEnd(event: (event: GestureEvent) => void): PinchGestureInterface; - - /** - * The Pan gesture is successfully recognized and a callback is triggered when the touch cancel event is received. - * - * @param { function } event - * @returns { PinchGestureInterface } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * The Pan gesture is successfully recognized and a callback is triggered when the touch cancel event is received. - * - * @param { function } event - * @returns { PinchGestureInterface } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * The Pan gesture is successfully recognized and a callback is triggered when the touch cancel event is received. - * - * @param { function } event - * @returns { PinchGestureInterface } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - onActionCancel(event: () => void): PinchGestureInterface; - /** - * The Pan gesture is successfully recognized and a callback is triggered when the touch cancel event is received. - * - * @param { function } event - * @returns { PinchGestureInterface } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - onActionCancel(event: Callback): PinchGestureInterface; -} - -/*** if arkts 1.2 */ -/** - * Defines PinchGesture. - * - * @extends Gesture - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ -export declare class PinchGesture extends Gesture { - /** - * Set the value. - * - * @param { function } factory - * @param { PinchGestureHandlerOptions } value - * @returns { PinchGesture } - * @static - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - static $_instantiate(factory: () => PinchGesture, value?: PinchGestureHandlerOptions): PinchGesture - - /** - * Pinch gesture recognition success callback. - * - * @param { Callback } event - * @returns { this } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - onActionStart(event: Callback): this; - - /** - * Callback when the Pinch gesture is moving. - * - * @param { Callback } event - * @returns { this } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - onActionUpdate(event: Callback): this; - - /** - * The Pinch gesture is successfully recognized. When the finger is lifted, the callback is triggered. - * - * @param { Callback } event - * @returns { this } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - onActionEnd(event: Callback): this; - - /** - * The Pinch gesture is successfully recognized and a callback is triggered when the touch cancel event is received. - * - * @param { Callback } event - * @returns { this } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - onActionCancel(event: Callback): this; + /** + * Set the value. + * + * @param { object } value + * @returns { PinchGestureInterface } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Set the value. + * + * @param { object } value + * @returns { PinchGestureInterface } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Set the value. + * + * @param { object } value + * @returns { PinchGestureInterface } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + (value?: { + fingers?: number; + distance?: number; + }): PinchGestureInterface; + /** + * Set the options. + * options: The options of the pinch gesture. + * + * @param { PinchGestureHandlerOptions } options + * @returns { PinchGestureInterface } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 15 + */ + (options?: PinchGestureHandlerOptions): PinchGestureInterface; + /** + * Pan gesture recognition success callback. + * + * @param { function } event + * @returns { PinchGestureInterface } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Pan gesture recognition success callback. + * + * @param { function } event + * @returns { PinchGestureInterface } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Pan gesture recognition success callback. + * + * @param { function } event + * @returns { PinchGestureInterface } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + onActionStart(event: (event: GestureEvent) => void): PinchGestureInterface; + /** + * Callback when the Pan gesture is moving. + * + * @param { function } event + * @returns { PinchGestureInterface } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Callback when the Pan gesture is moving. + * + * @param { function } event + * @returns { PinchGestureInterface } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Callback when the Pan gesture is moving. + * + * @param { function } event + * @returns { PinchGestureInterface } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + onActionUpdate(event: (event: GestureEvent) => void): PinchGestureInterface; + /** + * The Pan gesture is successfully recognized. When the finger is lifted, the callback is triggered. + * + * @param { function } event + * @returns { PinchGestureInterface } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * The Pan gesture is successfully recognized. When the finger is lifted, the callback is triggered. + * + * @param { function } event + * @returns { PinchGestureInterface } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * The Pan gesture is successfully recognized. When the finger is lifted, the callback is triggered. + * + * @param { function } event + * @returns { PinchGestureInterface } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + onActionEnd(event: (event: GestureEvent) => void): PinchGestureInterface; + /** + * The Pan gesture is successfully recognized and a callback is triggered when the touch cancel event is received. + * + * @param { function } event + * @returns { PinchGestureInterface } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * The Pan gesture is successfully recognized and a callback is triggered when the touch cancel event is received. + * + * @param { function } event + * @returns { PinchGestureInterface } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * The Pan gesture is successfully recognized and a callback is triggered when the touch cancel event is received. + * + * @param { function } event + * @returns { PinchGestureInterface } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + onActionCancel(event: () => void): PinchGestureInterface; + /** + * The Pan gesture is successfully recognized and a callback is triggered when the touch cancel event is received. + * + * @param { function } event + * @returns { PinchGestureInterface } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + onActionCancel(event: Callback): PinchGestureInterface; } -/*** endif */ - /** * Defines the RotationGesture interface. * @@ -3493,251 +2922,173 @@ export declare class PinchGesture extends Gesture { * @since 11 */ interface RotationGestureInterface extends GestureInterface { - /** - * Set the value. - * - * @param { object } value - * @returns { RotationGestureInterface } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Set the value. - * - * @param { object } value - * @returns { RotationGestureInterface } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Set the value. - * - * @param { object } value - * @returns { RotationGestureInterface } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - (value?: { fingers?: number; angle?: number }): RotationGestureInterface; - - /** - * Set the options. - * options: The options of the rotation gesture. - * - * @param { RotationGestureHandlerOptions } options - * @returns { RotationGestureInterface } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 15 - */ - (options?: RotationGestureHandlerOptions): RotationGestureInterface; - - /** - * Pan gesture recognition success callback. - * - * @param { function } event - * @returns { RotationGestureInterface } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Pan gesture recognition success callback. - * - * @param { function } event - * @returns { RotationGestureInterface } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Pan gesture recognition success callback. - * - * @param { function } event - * @returns { RotationGestureInterface } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - onActionStart(event: (event: GestureEvent) => void): RotationGestureInterface; - - /** - * Callback when the Pan gesture is moving. - * - * @param { function } event - * @returns { RotationGestureInterface } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Callback when the Pan gesture is moving. - * - * @param { function } event - * @returns { RotationGestureInterface } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Callback when the Pan gesture is moving. - * - * @param { function } event - * @returns { RotationGestureInterface } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - onActionUpdate(event: (event: GestureEvent) => void): RotationGestureInterface; - - /** - * The Pan gesture is successfully recognized. When the finger is lifted, the callback is triggered. - * - * @param { function } event - * @returns { RotationGestureInterface } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * The Pan gesture is successfully recognized. When the finger is lifted, the callback is triggered. - * - * @param { function } event - * @returns { RotationGestureInterface } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * The Pan gesture is successfully recognized. When the finger is lifted, the callback is triggered. - * - * @param { function } event - * @returns { RotationGestureInterface } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - onActionEnd(event: (event: GestureEvent) => void): RotationGestureInterface; - - /** - * The Pan gesture is successfully recognized and a callback is triggered when the touch cancel event is received. - * - * @param { function } event - * @returns { RotationGestureInterface } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * The Pan gesture is successfully recognized and a callback is triggered when the touch cancel event is received. - * - * @param { function } event - * @returns { RotationGestureInterface } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * The Pan gesture is successfully recognized and a callback is triggered when the touch cancel event is received. - * - * @param { function } event - * @returns { RotationGestureInterface } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - onActionCancel(event: () => void): RotationGestureInterface; - /** - * The Pan gesture is successfully recognized and a callback is triggered when the touch cancel event is received. - * - * @param { function } event - * @returns { RotationGestureInterface } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - onActionCancel(event: Callback): RotationGestureInterface; -} - -/*** if arkts 1.2 */ -/** - * Defines RotationGesture. - * - * @extends Gesture - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ -export declare class RotationGesture extends Gesture { - /** - * Set the value. - * - * @param { function } factory - * @param { RotationGestureHandlerOptions } value - * @returns { RotationGesture } - * @static - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - static $_instantiate(factory: () => RotationGesture, value?: RotationGestureHandlerOptions): RotationGesture - - /** - * Rotation gesture recognition success callback. - * - * @param { Callback } event - * @returns { this } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - onActionStart(event: Callback): this; - - /** - * Callback when the Rotation gesture is moving. - * - * @param { Callback } event - * @returns { this } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - onActionUpdate(event: Callback): this; - - /** - * The Rotation gesture is successfully recognized. When the finger is lifted, the callback is triggered. - * - * @param { Callback } event - * @returns { this } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - onActionEnd(event: Callback): this; - - /** - * The Rotation gesture is successfully recognized and a callback is triggered when the touch cancel event is received. - * - * @param { Callback } event - * @returns { this } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - onActionCancel(event: Callback): this; + /** + * Set the value. + * + * @param { object } value + * @returns { RotationGestureInterface } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Set the value. + * + * @param { object } value + * @returns { RotationGestureInterface } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Set the value. + * + * @param { object } value + * @returns { RotationGestureInterface } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + (value?: { + fingers?: number; + angle?: number; + }): RotationGestureInterface; + /** + * Set the options. + * options: The options of the rotation gesture. + * + * @param { RotationGestureHandlerOptions } options + * @returns { RotationGestureInterface } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 15 + */ + (options?: RotationGestureHandlerOptions): RotationGestureInterface; + /** + * Pan gesture recognition success callback. + * + * @param { function } event + * @returns { RotationGestureInterface } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Pan gesture recognition success callback. + * + * @param { function } event + * @returns { RotationGestureInterface } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Pan gesture recognition success callback. + * + * @param { function } event + * @returns { RotationGestureInterface } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + onActionStart(event: (event: GestureEvent) => void): RotationGestureInterface; + /** + * Callback when the Pan gesture is moving. + * + * @param { function } event + * @returns { RotationGestureInterface } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Callback when the Pan gesture is moving. + * + * @param { function } event + * @returns { RotationGestureInterface } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Callback when the Pan gesture is moving. + * + * @param { function } event + * @returns { RotationGestureInterface } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + onActionUpdate(event: (event: GestureEvent) => void): RotationGestureInterface; + /** + * The Pan gesture is successfully recognized. When the finger is lifted, the callback is triggered. + * + * @param { function } event + * @returns { RotationGestureInterface } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * The Pan gesture is successfully recognized. When the finger is lifted, the callback is triggered. + * + * @param { function } event + * @returns { RotationGestureInterface } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * The Pan gesture is successfully recognized. When the finger is lifted, the callback is triggered. + * + * @param { function } event + * @returns { RotationGestureInterface } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + onActionEnd(event: (event: GestureEvent) => void): RotationGestureInterface; + /** + * The Pan gesture is successfully recognized and a callback is triggered when the touch cancel event is received. + * + * @param { function } event + * @returns { RotationGestureInterface } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * The Pan gesture is successfully recognized and a callback is triggered when the touch cancel event is received. + * + * @param { function } event + * @returns { RotationGestureInterface } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * The Pan gesture is successfully recognized and a callback is triggered when the touch cancel event is received. + * + * @param { function } event + * @returns { RotationGestureInterface } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + onActionCancel(event: () => void): RotationGestureInterface; + /** + * The Pan gesture is successfully recognized and a callback is triggered when the touch cancel event is received. + * + * @param { function } event + * @returns { RotationGestureInterface } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + onActionCancel(event: Callback): RotationGestureInterface; } -/*** endif */ - /** * Defines the GestureGroup interface. * @@ -3763,107 +3114,66 @@ export declare class RotationGesture extends Gesture { * @since 11 */ interface GestureGroupInterface { - /** - * Return to Obtain GestureGroup. - * - * @param { GestureMode } mode - * @param { GestureType[] } gesture - * @returns { GestureGroupInterface } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Return to Obtain GestureGroup. - * - * @param { GestureMode } mode - * @param { GestureType[] } gesture - * @returns { GestureGroupInterface } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Return to Obtain GestureGroup. - * - * @param { GestureMode } mode - * @param { GestureType[] } gesture - * @returns { GestureGroupInterface } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - (mode: GestureMode, ...gesture: GestureType[]): GestureGroupInterface; - - /** - * The Pan gesture is successfully recognized and a callback is triggered when the touch cancel event is received. - * - * @param { function } event - * @returns { GestureGroupInterface } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * The Pan gesture is successfully recognized and a callback is triggered when the touch cancel event is received. - * - * @param { function } event - * @returns { GestureGroupInterface } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * The Pan gesture is successfully recognized and a callback is triggered when the touch cancel event is received. - * - * @param { function } event - * @returns { GestureGroupInterface } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - onCancel(event: () => void): GestureGroupInterface; -} - -/*** if arkts 1.2 */ -/** - * Defines the GestureGroup. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ -export declare class GestureGroup { - /** - * Return to Obtain GestureGroup. - * - * @param { function } factory - * @param { GestureMode } mode - * @param { GestureType[] } gesture - * @returns { GestureGroup } - * @static - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - static $_instantiate(factory: () => GestureGroup, mode: GestureMode, ...gesture: GestureType[]): GestureGroup; - - /** - * The Gesture group is successfully recognized and a callback is triggered when the touch cancel event is received. - * - * @param { Callback } event - * @returns { GestureGroup } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - onCancel(event: Callback): GestureGroup; + /** + * Return to Obtain GestureGroup. + * + * @param { GestureMode } mode + * @param { GestureType[] } gesture + * @returns { GestureGroupInterface } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Return to Obtain GestureGroup. + * + * @param { GestureMode } mode + * @param { GestureType[] } gesture + * @returns { GestureGroupInterface } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Return to Obtain GestureGroup. + * + * @param { GestureMode } mode + * @param { GestureType[] } gesture + * @returns { GestureGroupInterface } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + (mode: GestureMode, ...gesture: GestureType[]): GestureGroupInterface; + /** + * The Pan gesture is successfully recognized and a callback is triggered when the touch cancel event is received. + * + * @param { function } event + * @returns { GestureGroupInterface } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * The Pan gesture is successfully recognized and a callback is triggered when the touch cancel event is received. + * + * @param { function } event + * @returns { GestureGroupInterface } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * The Pan gesture is successfully recognized and a callback is triggered when the touch cancel event is received. + * + * @param { function } event + * @returns { GestureGroupInterface } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + onCancel(event: () => void): GestureGroupInterface; } -/*** endif */ - /** * Defines TapGesture Component. * @@ -3886,7 +3196,6 @@ export declare class GestureGroup { * @since 11 */ declare const TapGesture: TapGestureInterface; - /** * Defines LongPressGesture Component. * @@ -3909,7 +3218,6 @@ declare const TapGesture: TapGestureInterface; * @since 11 */ declare const LongPressGesture: LongPressGestureInterface; - /** * Defines PanGesture Component. * @@ -3932,7 +3240,6 @@ declare const LongPressGesture: LongPressGestureInterface; * @since 11 */ declare const PanGesture: PanGestureInterface; - /** * Defines SwipeGesture Component. * @@ -3955,7 +3262,6 @@ declare const PanGesture: PanGestureInterface; * @since 11 */ declare const SwipeGesture: SwipeGestureInterface; - /** * Defines PinchGesture Component. * @@ -3978,7 +3284,6 @@ declare const SwipeGesture: SwipeGestureInterface; * @since 11 */ declare const PinchGesture: PinchGestureInterface; - /** * Defines RotationGesture Component. * @@ -4001,7 +3306,6 @@ declare const PinchGesture: PinchGestureInterface; * @since 11 */ declare const RotationGesture: RotationGestureInterface; - /** * Defines GestureGroup Component. * @@ -4024,7 +3328,6 @@ declare const RotationGesture: RotationGestureInterface; * @since 11 */ declare const GestureGroup: GestureGroupInterface; - /** * Defines the gesture handler. * @@ -4035,67 +3338,29 @@ declare const GestureGroup: GestureGroupInterface; * @since 12 */ declare class GestureHandler implements GestureInterface { - /** - * Set the GestureHandler's tag. - * - * @param { string } tag - * @returns { T } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - tag(tag: string): T; - - /** - * Input source type for gesture response. - * - * @param { Array } types - indicate the allowed input source for gesture to response - * @returns { T } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 14 - */ - allowedTypes(types: Array): T; -} - -/*** if arkts 1.2 */ -/** - * Defines the gesture handler. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ -export declare class GestureHandler { - /** - * Set the GestureHandler's tag. - * - * @param { string } tag - * @returns { this } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - tag(tag: string): this; - - /** - * Input source type for gesture response. - * - * @param { Array } types - indicate the allowed input source for gesture to response - * @returns { this } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - allowedTypes(types: Array): this; + /** + * Set the GestureHandler's tag. + * + * @param { string } tag + * @returns { T } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + tag(tag: string): T; + /** + * Input source type for gesture response. + * + * @param { Array } types - indicate the allowed input source for gesture to response + * @returns { T } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 14 + */ + allowedTypes(types: Array): T; } -/*** endif */ - /** * Defines the TapGestureHandler options. * @@ -4113,36 +3378,32 @@ export declare class GestureHandler { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ interface TapGestureHandlerOptions extends BaseHandlerOptions { - /** - * Indicates the number of consecutive clicks recognized. If the value is less than 1, the default value is used. - * The default value is 1. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - count?: number; - /** - * Indicates the hand index that triggers the click. If the value is less than 1, the default value is used. - * The default value is 1. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - fingers?: number; + /** + * Indicates the number of consecutive clicks recognized. If the value is less than 1, the default value is used. + * The default value is 1. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + count?: number; + /** + * Indicates the hand index that triggers the click. If the value is less than 1, the default value is used. + * The default value is 1. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + fingers?: number; } - /** * Defines the TapGesture handler. * @@ -4153,64 +3414,28 @@ interface TapGestureHandlerOptions extends BaseHandlerOptions { * @since 12 */ declare class TapGestureHandler extends GestureHandler { - /** - * Constructor parameters. - * - * @param { TapGestureHandlerOptions } options - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - constructor(options?: TapGestureHandlerOptions); - /** - * Tap gesture recognition success callback. - * - * @param { Callback } event - * @returns { TapGestureHandler } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - onAction(event: Callback): TapGestureHandler; -} - -/*** if arkts 1.2 */ -/** - * Defines the TapGesture handler. - * - * @extends GestureHandler - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ -export declare class TapGestureHandler extends GestureHandler { - /** - * Constructor parameters. - * - * @param { TapGestureHandlerOptions } options - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - constructor(options?: TapGestureHandlerOptions); - /** - * Tap gesture recognition success callback. - * - * @param { Callback } event - * @returns { this } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - onAction(event: Callback): this; + /** + * Constructor parameters. + * + * @param { TapGestureHandlerOptions } options + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + constructor(options?: TapGestureHandlerOptions); + /** + * Tap gesture recognition success callback. + * + * @param { Callback } event + * @returns { TapGestureHandler } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + onAction(event: Callback): TapGestureHandler; } -/*** endif */ - /** * Defines the LongPressGestureHandler options. * @@ -4228,48 +3453,43 @@ export declare class TapGestureHandler extends GestureHandler { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ interface LongPressGestureHandlerOptions extends BaseHandlerOptions { - /** - * Indicates the hand index that triggers the long press. If the value is less than 1, the default value is used. - * The default value is 1. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - fingers?: number; - /** - * Indicates whether an event is triggered repeatedly. - * The default value is false. - * - * @type { ?boolean } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - repeat?: boolean; - /** - * Indicates minimum press and hold time, in milliseconds. - * The default value is 500ms. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - duration?: number; + /** + * Indicates the hand index that triggers the long press. If the value is less than 1, the default value is used. + * The default value is 1. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + fingers?: number; + /** + * Indicates whether an event is triggered repeatedly. + * The default value is false. + * + * @type { ?boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + repeat?: boolean; + /** + * Indicates minimum press and hold time, in milliseconds. + * The default value is 500ms. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + duration?: number; } - /** * Defines the LongPressGesture handler. * @@ -4280,120 +3500,62 @@ interface LongPressGestureHandlerOptions extends BaseHandlerOptions { * @since 12 */ declare class LongPressGestureHandler extends GestureHandler { - /** - * Constructor parameters. - * - * @param { LongPressGestureHandlerOptions } options - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - constructor(options?: LongPressGestureHandlerOptions); - /** - * LongPress gesture recognition success callback. - * - * @param { Callback } event - * @returns { LongPressGestureHandler } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - onAction(event: Callback): LongPressGestureHandler; - /** - * The LongPress gesture is successfully recognized. When the finger is lifted, the callback is triggered. - * - * @param { Callback } event - * @returns { LongPressGestureHandler } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - onActionEnd(event: Callback): LongPressGestureHandler; - /** - * The LongPress gesture is successfully recognized and a callback is triggered when the touch cancel event is received. - * - * @param { Callback } event - * @returns { LongPressGestureHandler } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - onActionCancel(event: Callback): LongPressGestureHandler; - /** - * The LongPress gesture is successfully recognized and a callback is triggered when the touch cancel event is received. - * Add GestureEvent in cancel callback. - * - * @param { Callback } event - * @returns { LongPressGestureHandler } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - onActionCancel(event: Callback): LongPressGestureHandler; -} - -/*** if arkts 1.2 */ -/** - * Defines the LongPressGesture handler. - * - * @extends GestureHandler - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ -export declare class LongPressGestureHandler extends GestureHandler { - /** - * Constructor parameters. - * - * @param { LongPressGestureHandlerOptions } options - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - constructor(options?: LongPressGestureHandlerOptions); - /** - * LongPress gesture recognition success callback. - * - * @param { Callback } event - * @returns { this } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - onAction(event: Callback): this; - /** - * The LongPress gesture is successfully recognized. When the finger is lifted, the callback is triggered. - * - * @param { Callback } event - * @returns { this } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - onActionEnd(event: Callback): this; - /** - * The LongPress gesture is successfully recognized and a callback is triggered when the touch cancel event is received. - * - * @param { Callback } event - * @returns { this } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - onActionCancel(event: Callback): this; + /** + * Constructor parameters. + * + * @param { LongPressGestureHandlerOptions } options + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + constructor(options?: LongPressGestureHandlerOptions); + /** + * LongPress gesture recognition success callback. + * + * @param { Callback } event + * @returns { LongPressGestureHandler } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + onAction(event: Callback): LongPressGestureHandler; + /** + * The LongPress gesture is successfully recognized. When the finger is lifted, the callback is triggered. + * + * @param { Callback } event + * @returns { LongPressGestureHandler } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + onActionEnd(event: Callback): LongPressGestureHandler; + /** + * The LongPress gesture is successfully recognized and a callback is triggered when the touch cancel event is received. + * + * @param { Callback } event + * @returns { LongPressGestureHandler } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + onActionCancel(event: Callback): LongPressGestureHandler; + /** + * The LongPress gesture is successfully recognized and a callback is triggered when the touch cancel event is received. + * Add GestureEvent in cancel callback. + * + * @param { Callback } event + * @returns { LongPressGestureHandler } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + onActionCancel(event: Callback): LongPressGestureHandler; } -/*** endif */ - /** * Defines the PanGestureHandler options. * @@ -4411,58 +3573,53 @@ export declare class LongPressGestureHandler extends GestureHandler { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ interface PanGestureHandlerOptions extends BaseHandlerOptions { - /** - * Indicates the hand index that triggers the pan. If the value is less than 1, the default value is used. - * The default value is 1. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - fingers?: number; - /** - * Indicates the move direction of the pan gesture. - * The default value is PanDirection.All. - * - * @type { ?PanDirection } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - direction?: PanDirection; - /** - * Indicates minimum move distance. - * The default value is 5vp. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - distance?: number; - /** - * Indicates minimum move distance map. - * - * @type { ?Map } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 19 - */ - distanceMap?: Map; + /** + * Indicates the hand index that triggers the pan. If the value is less than 1, the default value is used. + * The default value is 1. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + fingers?: number; + /** + * Indicates the move direction of the pan gesture. + * The default value is PanDirection.All. + * + * @type { ?PanDirection } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + direction?: PanDirection; + /** + * Indicates minimum move distance. + * The default value is 5vp. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + distance?: number; + /** + * Indicates minimum move distance map. + * + * @type { ?Map } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 19 + */ + distanceMap?: Map; } - /** * Defines the PanGesture handler. * @@ -4473,142 +3630,73 @@ interface PanGestureHandlerOptions extends BaseHandlerOptions { * @since 12 */ declare class PanGestureHandler extends GestureHandler { - /** - * Constructor parameters. - * - * @param { PanGestureHandlerOptions } options - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - constructor(options?: PanGestureHandlerOptions); - /** - * Pan gesture recognition success callback. - * - * @param { Callback } event - * @returns { PanGestureHandler } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - onActionStart(event: Callback): PanGestureHandler; - /** - * Callback when the Pan gesture is moving. - * - * @param { Callback } event - * @returns { PanGestureHandler } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - onActionUpdate(event: Callback): PanGestureHandler; - /** - * The Pan gesture is successfully recognized. When the finger is lifted, the callback is triggered. - * - * @param { Callback } event - * @returns { PanGestureHandler } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - onActionEnd(event: Callback): PanGestureHandler; - /** - * The Pan gesture is successfully recognized and a callback is triggered when the touch cancel event is received. - * - * @param { Callback } event - * @returns { PanGestureHandler } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - onActionCancel(event: Callback): PanGestureHandler; - /** - * The Pan gesture is successfully recognized and a callback is triggered when the touch cancel event is received. - * Add GestureEvent in cancel callback. - * - * @param { Callback } event - * @returns { PanGestureHandler } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - onActionCancel(event: Callback): PanGestureHandler; -} - -/*** if arkts 1.2 */ -/** - * Defines the PanGesture handler. - * - * @extends GestureHandler - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ -export declare class PanGestureHandler extends GestureHandler { - /** - * Constructor parameters. - * - * @param { PanGestureHandlerOptions } options - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - constructor(options?: PanGestureHandlerOptions); - /** - * Pan gesture recognition success callback. - * - * @param { Callback } event - * @returns { this } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - onActionStart(event: Callback): this; - /** - * Callback when the Pan gesture is moving. - * - * @param { Callback } event - * @returns { this } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - onActionUpdate(event: Callback): this; - /** - * The Pan gesture is successfully recognized. When the finger is lifted, the callback is triggered. - * - * @param { Callback } event - * @returns { this } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - onActionEnd(event: Callback): this; - /** - * The Pan gesture is successfully recognized and a callback is triggered when the touch cancel event is received. - * - * @param { Callback } event - * @returns { this } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - onActionCancel(event: Callback): this; + /** + * Constructor parameters. + * + * @param { PanGestureHandlerOptions } options + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + constructor(options?: PanGestureHandlerOptions); + /** + * Pan gesture recognition success callback. + * + * @param { Callback } event + * @returns { PanGestureHandler } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + onActionStart(event: Callback): PanGestureHandler; + /** + * Callback when the Pan gesture is moving. + * + * @param { Callback } event + * @returns { PanGestureHandler } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + onActionUpdate(event: Callback): PanGestureHandler; + /** + * The Pan gesture is successfully recognized. When the finger is lifted, the callback is triggered. + * + * @param { Callback } event + * @returns { PanGestureHandler } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + onActionEnd(event: Callback): PanGestureHandler; + /** + * The Pan gesture is successfully recognized and a callback is triggered when the touch cancel event is received. + * + * @param { Callback } event + * @returns { PanGestureHandler } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + onActionCancel(event: Callback): PanGestureHandler; + /** + * The Pan gesture is successfully recognized and a callback is triggered when the touch cancel event is received. + * Add GestureEvent in cancel callback. + * + * @param { Callback } event + * @returns { PanGestureHandler } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + onActionCancel(event: Callback): PanGestureHandler; } -/*** endif */ - /** * Defines the SwipeGestureHandler options. * @@ -4626,48 +3714,43 @@ export declare class PanGestureHandler extends GestureHandler { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ interface SwipeGestureHandlerOptions extends BaseHandlerOptions { - /** - * Indicates the hand index that triggers the swipe. If the value is less than 1, the default value is used. - * The default value is 1. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - fingers?: number; - /** - * Indicates the move direction of the swipe gesture. - * The default value is SwipeDirection.All. - * - * @type { ?SwipeDirection } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - direction?: SwipeDirection; - /** - * Indicates minimum move speed. - * The default value is 100vp/s. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - speed?: number; + /** + * Indicates the hand index that triggers the swipe. If the value is less than 1, the default value is used. + * The default value is 1. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + fingers?: number; + /** + * Indicates the move direction of the swipe gesture. + * The default value is SwipeDirection.All. + * + * @type { ?SwipeDirection } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + direction?: SwipeDirection; + /** + * Indicates minimum move speed. + * The default value is 100vp/s. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + speed?: number; } - /** * Defines the SwipeGesture handler. * @@ -4678,64 +3761,28 @@ interface SwipeGestureHandlerOptions extends BaseHandlerOptions { * @since 12 */ declare class SwipeGestureHandler extends GestureHandler { - /** - * Constructor parameters. - * - * @param { SwipeGestureHandlerOptions } options - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - constructor(options?: SwipeGestureHandlerOptions); - /** - * Swipe gesture recognition success callback. - * - * @param { Callback } event - * @returns { SwipeGestureHandler } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - onAction(event: Callback): SwipeGestureHandler; -} - -/*** if arkts 1.2 */ -/** - * Defines the SwipeGesture handler. - * - * @extends GestureHandler - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ -export declare class SwipeGestureHandler extends GestureHandler { - /** - * Constructor parameters. - * - * @param { SwipeGestureHandlerOptions } options - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - constructor(options?: SwipeGestureHandlerOptions); - /** - * Swipe gesture recognition success callback. - * - * @param { Callback } event - * @returns { this } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - onAction(event: Callback): this; + /** + * Constructor parameters. + * + * @param { SwipeGestureHandlerOptions } options + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + constructor(options?: SwipeGestureHandlerOptions); + /** + * Swipe gesture recognition success callback. + * + * @param { Callback } event + * @returns { SwipeGestureHandler } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + onAction(event: Callback): SwipeGestureHandler; } -/*** endif */ - /** * Defines the PinchGestureHandler options. * @@ -4753,36 +3800,32 @@ export declare class SwipeGestureHandler extends GestureHandler { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ interface PinchGestureHandlerOptions extends BaseHandlerOptions { - /** - * Indicates the hand index that triggers the pinch. If the value is less than 1, the default value is used. - * The default value is 1. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - fingers?: number; - /** - * Indicates minimum pinch move distance. - * The default value is 5vp. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - distance?: number; + /** + * Indicates the hand index that triggers the pinch. If the value is less than 1, the default value is used. + * The default value is 1. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + fingers?: number; + /** + * Indicates minimum pinch move distance. + * The default value is 5vp. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + distance?: number; } - /** * Defines the PinchGesture handler. * @@ -4793,142 +3836,73 @@ interface PinchGestureHandlerOptions extends BaseHandlerOptions { * @since 12 */ declare class PinchGestureHandler extends GestureHandler { - /** - * Constructor parameters. - * - * @param { PinchGestureHandlerOptions } options - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - constructor(options?: PinchGestureHandlerOptions); - /** - * Pinch gesture recognition success callback. - * - * @param { Callback } event - * @returns { PinchGestureHandler } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - onActionStart(event: Callback): PinchGestureHandler; - /** - * Callback when the Pinch gesture is moving. - * - * @param { Callback } event - * @returns { PinchGestureHandler } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - onActionUpdate(event: Callback): PinchGestureHandler; - /** - * The Pinch gesture is successfully recognized. When the finger is lifted, the callback is triggered. - * - * @param { Callback } event - * @returns { PinchGestureHandler } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - onActionEnd(event: Callback): PinchGestureHandler; - /** - * The Pinch gesture is successfully recognized and a callback is triggered when the touch cancel event is received. - * - * @param { Callback } event - * @returns { PinchGestureHandler } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - onActionCancel(event: Callback): PinchGestureHandler; - /** - * The Pinch gesture is successfully recognized and a callback is triggered when the touch cancel event is received. - * Add GestureEvent in cancel callback. - * - * @param { Callback } event - * @returns { PinchGestureHandler } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - onActionCancel(event: Callback): PinchGestureHandler; -} - -/*** if arkts 1.2 */ -/** - * Defines the PinchGesture handler. - * - * @extends GestureHandler - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ -export declare class PinchGestureHandler extends GestureHandler { - /** - * Constructor parameters. - * - * @param { PinchGestureHandlerOptions } options - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - constructor(options?: PinchGestureHandlerOptions); - /** - * Pinch gesture recognition success callback. - * - * @param { Callback } event - * @returns { this } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - onActionStart(event: Callback): this; - /** - * Callback when the Pinch gesture is moving. - * - * @param { Callback } event - * @returns { this } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - onActionUpdate(event: Callback): this; - /** - * The Pinch gesture is successfully recognized. When the finger is lifted, the callback is triggered. - * - * @param { Callback } event - * @returns { this } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - onActionEnd(event: Callback): this; - /** - * The Pinch gesture is successfully recognized and a callback is triggered when the touch cancel event is received. - * - * @param { Callback } event - * @returns { this } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - onActionCancel(event: Callback): this; + /** + * Constructor parameters. + * + * @param { PinchGestureHandlerOptions } options + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + constructor(options?: PinchGestureHandlerOptions); + /** + * Pinch gesture recognition success callback. + * + * @param { Callback } event + * @returns { PinchGestureHandler } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + onActionStart(event: Callback): PinchGestureHandler; + /** + * Callback when the Pinch gesture is moving. + * + * @param { Callback } event + * @returns { PinchGestureHandler } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + onActionUpdate(event: Callback): PinchGestureHandler; + /** + * The Pinch gesture is successfully recognized. When the finger is lifted, the callback is triggered. + * + * @param { Callback } event + * @returns { PinchGestureHandler } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + onActionEnd(event: Callback): PinchGestureHandler; + /** + * The Pinch gesture is successfully recognized and a callback is triggered when the touch cancel event is received. + * + * @param { Callback } event + * @returns { PinchGestureHandler } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + onActionCancel(event: Callback): PinchGestureHandler; + /** + * The Pinch gesture is successfully recognized and a callback is triggered when the touch cancel event is received. + * Add GestureEvent in cancel callback. + * + * @param { Callback } event + * @returns { PinchGestureHandler } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + onActionCancel(event: Callback): PinchGestureHandler; } -/*** endif */ - /** * Defines the RotationGestureHandler options. * @@ -4946,36 +3920,32 @@ export declare class PinchGestureHandler extends GestureHandler { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ interface RotationGestureHandlerOptions extends BaseHandlerOptions { - /** - * Indicates the hand index that triggers the rotation. If the value is less than 1, the default value is used. - * The default value is 1. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - fingers?: number; - /** - * Indicates minimum rotate angle. - * The default value is 1deg. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - angle?: number; + /** + * Indicates the hand index that triggers the rotation. If the value is less than 1, the default value is used. + * The default value is 1. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + fingers?: number; + /** + * Indicates minimum rotate angle. + * The default value is 1deg. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + angle?: number; } - /** * Defines the RotationGesture handler. * @@ -4986,142 +3956,73 @@ interface RotationGestureHandlerOptions extends BaseHandlerOptions { * @since 12 */ declare class RotationGestureHandler extends GestureHandler { - /** - * Constructor parameters. - * - * @param { RotationGestureHandlerOptions } options - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - constructor(options?: RotationGestureHandlerOptions); - /** - * Rotation gesture recognition success callback. - * - * @param { Callback } event - * @returns { RotationGestureHandler } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - onActionStart(event: Callback): RotationGestureHandler; - /** - * Callback when the Rotation gesture is moving. - * - * @param { Callback } event - * @returns { RotationGestureHandler } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - onActionUpdate(event: Callback): RotationGestureHandler; - /** - * The Rotation gesture is successfully recognized. When the finger is lifted, the callback is triggered. - * - * @param { Callback } event - * @returns { RotationGestureHandler } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - onActionEnd(event: Callback): RotationGestureHandler; - /** - * The Rotation gesture is successfully recognized and a callback is triggered when the touch cancel event is received. - * - * @param { Callback } event - * @returns { RotationGestureHandler } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - onActionCancel(event: Callback): RotationGestureHandler; - /** - * The Rotation gesture is successfully recognized and a callback is triggered when the touch cancel event is received. - * Add GestureEvent in cancel callback. - * - * @param { Callback } event - * @returns { RotationGestureHandler } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - onActionCancel(event: Callback): RotationGestureHandler; -} - -/*** if arkts 1.2 */ -/** - * Defines the RotationGesture handler. - * - * @extends GestureHandler - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ -export declare class RotationGestureHandler extends GestureHandler { - /** - * Constructor parameters. - * - * @param { RotationGestureHandlerOptions } options - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - constructor(options?: RotationGestureHandlerOptions); - /** - * Rotation gesture recognition success callback. - * - * @param { Callback } event - * @returns { this } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - onActionStart(event: Callback): this; - /** - * Callback when the Rotation gesture is moving. - * - * @param { Callback } event - * @returns { this } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - onActionUpdate(event: Callback): this; - /** - * The Rotation gesture is successfully recognized. When the finger is lifted, the callback is triggered. - * - * @param { Callback } event - * @returns { this } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - onActionEnd(event: Callback): this; - /** - * The Rotation gesture is successfully recognized and a callback is triggered when the touch cancel event is received. - * - * @param { Callback } event - * @returns { this } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - onActionCancel(event: Callback): this; + /** + * Constructor parameters. + * + * @param { RotationGestureHandlerOptions } options + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + constructor(options?: RotationGestureHandlerOptions); + /** + * Rotation gesture recognition success callback. + * + * @param { Callback } event + * @returns { RotationGestureHandler } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + onActionStart(event: Callback): RotationGestureHandler; + /** + * Callback when the Rotation gesture is moving. + * + * @param { Callback } event + * @returns { RotationGestureHandler } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + onActionUpdate(event: Callback): RotationGestureHandler; + /** + * The Rotation gesture is successfully recognized. When the finger is lifted, the callback is triggered. + * + * @param { Callback } event + * @returns { RotationGestureHandler } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + onActionEnd(event: Callback): RotationGestureHandler; + /** + * The Rotation gesture is successfully recognized and a callback is triggered when the touch cancel event is received. + * + * @param { Callback } event + * @returns { RotationGestureHandler } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + onActionCancel(event: Callback): RotationGestureHandler; + /** + * The Rotation gesture is successfully recognized and a callback is triggered when the touch cancel event is received. + * Add GestureEvent in cancel callback. + * + * @param { Callback } event + * @returns { RotationGestureHandler } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + onActionCancel(event: Callback): RotationGestureHandler; } -/*** endif */ - /** * Defines the GestureGroupGestureHandler options. * @@ -5129,44 +4030,30 @@ export declare class RotationGestureHandler extends GestureHandler { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ interface GestureGroupGestureHandlerOptions { - /** - * Indicates the mode of gesture group. - * - * @type { GestureMode } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - mode: GestureMode; - /** - * Indicates the gestures included in the gesture group. - * - * @type { GestureHandler[] } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - gestures: GestureHandler[]; - /** - * Indicates the gestures included in the gesture group. - * - * @type { GestureHandler[] } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - gestures: GestureHandler[]; + /** + * Indicates the mode of gesture group. + * + * @type { GestureMode } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + mode: GestureMode; + /** + * Indicates the gestures included in the gesture group. + * + * @type { GestureHandler[] } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + gestures: GestureHandler[]; } - /** * Defines the GestureGroup handler. * @@ -5177,64 +4064,28 @@ interface GestureGroupGestureHandlerOptions { * @since 12 */ declare class GestureGroupHandler extends GestureHandler { - /** - * Constructor parameters. - * - * @param { GestureGroupGestureHandlerOptions } options - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - constructor(options?: GestureGroupGestureHandlerOptions); - /** - * The GestureGroup gesture is successfully recognized and a callback is triggered when the touch cancel event is received. - * - * @param { Callback } event - * @returns { GestureGroupHandler } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - onCancel(event: Callback): GestureGroupHandler; -} - -/*** if arkts 1.2 */ -/** - * Defines the GestureGroup handler. - * - * @extends GestureHandler - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ -export declare class GestureGroupHandler extends GestureHandler { - /** - * Constructor parameters. - * - * @param { GestureGroupGestureHandlerOptions } options - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - constructor(options?: GestureGroupGestureHandlerOptions); - /** - * The GestureGroup gesture is successfully recognized and a callback is triggered when the touch cancel event is received. - * - * @param { Callback } event - * @returns { this } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - onCancel(event: Callback): this; + /** + * Constructor parameters. + * + * @param { GestureGroupGestureHandlerOptions } options + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + constructor(options?: GestureGroupGestureHandlerOptions); + /** + * The GestureGroup gesture is successfully recognized and a callback is triggered when the touch cancel event is received. + * + * @param { Callback } event + * @returns { GestureGroupHandler } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + onCancel(event: Callback): GestureGroupHandler; } -/*** endif */ - /** * Creating an Object * @@ -5242,32 +4093,28 @@ export declare class GestureGroupHandler extends GestureHandler { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare enum GesturePriority { - /** - * The normal gesture priority. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - NORMAL = 0, - /** - * The high gesture priority. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - PRIORITY = 1, + /** + * The normal gesture priority. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + NORMAL = 0, + /** + * The high gesture priority. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + PRIORITY = 1 } - /** * Creating an Object * @@ -5275,72 +4122,64 @@ declare enum GesturePriority { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare enum GestureRecognizerState { - /** - * Ready state. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - READY = 0, - /** - * Detecting state. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - DETECTING = 1, - /** - * Pending state. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - PENDING = 2, - /** - * Blocked state. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - BLOCKED = 3, - /** - * Successful state. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - SUCCESSFUL = 4, - /** - * Failed state. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - FAILED = 5, + /** + * Ready state. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + READY = 0, + /** + * Detecting state. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + DETECTING = 1, + /** + * Pending state. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + PENDING = 2, + /** + * Blocked state. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + BLOCKED = 3, + /** + * Successful state. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + SUCCESSFUL = 4, + /** + * Failed state. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + FAILED = 5 } - /** * Defines the scrollable target information. * @@ -5348,57 +4187,50 @@ declare enum GestureRecognizerState { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare class ScrollableTargetInfo extends EventTargetInfo { - /** - * Returns whether the scrollable component is at begin. - * - * @returns { boolean } - true is at begin, false is not at begin - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - isBegin(): boolean; - /** - * Returns whether the scrollable component is at end. - * - * @returns { boolean } - true is at end, false is not at end - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - isEnd(): boolean; + /** + * Returns whether the scrollable component is at begin. + * + * @returns { boolean } - true is at begin, false is not at begin + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + isBegin(): boolean; + /** + * Returns whether the scrollable component is at end. + * + * @returns { boolean } - true is at end, false is not at end + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + isEnd(): boolean; } - /** * Defines the event target information. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare class EventTargetInfo { - /** - * Returns the component's inspector id. - * - * @returns { string } - the inspector id of the component - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - getId(): string; + /** + * Returns the component's inspector id. + * + * @returns { string } - the inspector id of the component + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + getId(): string; } - /** * Defines the touch recognizer. * @@ -5428,143 +4260,130 @@ declare class TouchRecognizer { */ cancelTouch(): void; } - /** * Defines the gesture recognizer. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare class GestureRecognizer { - /** - * Returns the gesture's tag. - * - * @returns { string } - the gesture's tag - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - getTag(): string; - /** - * Returns the gesture's type. - * - * @returns { GestureControl.GestureType } - the gesture's type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - getType(): GestureControl.GestureType; - /** - * Returns whether the gesture recognizer is built in recognizer. - * - * @returns { boolean } - true is built in recognizer, false is not built in recognizer - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - isBuiltIn(): boolean; - /** - * set the enabled state of the gesture recognizer. - * - * @param { boolean } isEnabled - Indicates the enabled state. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - setEnabled(isEnabled: boolean): void; - /** - * Returns whether the gesture recognizer is enabled. - * - * @returns { boolean } - true is enabled, false is not enabled - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - isEnabled(): boolean; - /** - * Returns the gesture recognizer's state. - * - * @returns { GestureRecognizerState } - the gesture recognizer's state - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - getState(): GestureRecognizerState; - /** - * Returns the event target information of the component. - * - * @returns { EventTargetInfo } - the event target information of the component. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - getEventTargetInfo(): EventTargetInfo; - /** - * Returns whether the gesture recognizer is valid. - * - * @returns { boolean } - true is valid, false is invalid - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - isValid(): boolean; - /** - * Returns the tap gesture's finger count. - * - * @returns { number } - the finger count of the tap gesture. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - getFingerCount(): number; - /** - * Returns the tap gesture's limitFingerCount. - * - * @returns { boolean } - the limitFingerCount of the tap gesture. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - isFingerCountLimit(): boolean; - /** - * Prevent the gesture recognizer from participating in this gesture recognition until all fingers are lifted. - * If the system has already made out the result of this gesture recognizer (success and failure), calling this - * function will have no any effect. - * - * [Note]: This method is different from GestureRecognizer.setEnabled(isEnabled: boolean), setEnabled does not - * prevent a gesture recognizer object from participating in the gesture recognition process, but only affects - * whether the gesture's corresponding callback function is executed. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - preventBegin(): void; + /** + * Returns the gesture's tag. + * + * @returns { string } - the gesture's tag + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + getTag(): string; + /** + * Returns the gesture's type. + * + * @returns { GestureControl.GestureType } - the gesture's type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + getType(): GestureControl.GestureType; + /** + * Returns whether the gesture recognizer is built in recognizer. + * + * @returns { boolean } - true is built in recognizer, false is not built in recognizer + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + isBuiltIn(): boolean; + /** + * set the enabled state of the gesture recognizer. + * + * @param { boolean } isEnabled - Indicates the enabled state. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + setEnabled(isEnabled: boolean): void; + /** + * Returns whether the gesture recognizer is enabled. + * + * @returns { boolean } - true is enabled, false is not enabled + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + isEnabled(): boolean; + /** + * Returns the gesture recognizer's state. + * + * @returns { GestureRecognizerState } - the gesture recognizer's state + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + getState(): GestureRecognizerState; + /** + * Returns the event target information of the component. + * + * @returns { EventTargetInfo } - the event target information of the component. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + getEventTargetInfo(): EventTargetInfo; + /** + * Returns whether the gesture recognizer is valid. + * + * @returns { boolean } - true is valid, false is invalid + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 12 + */ + isValid(): boolean; + /** + * Returns the tap gesture's finger count. + * + * @returns { number } - the finger count of the tap gesture. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + getFingerCount(): number; + /** + * Returns the tap gesture's limitFingerCount. + * + * @returns { boolean } - the limitFingerCount of the tap gesture. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + isFingerCountLimit(): boolean; + /** + * Prevent the gesture recognizer from participating in this gesture recognition until all fingers are lifted. + * If the system has already made out the result of this gesture recognizer (success and failure), calling this + * function will have no any effect. + * + * [Note]: This method is different from GestureRecognizer.setEnabled(isEnabled: boolean), setEnabled does not + * prevent a gesture recognizer object from participating in the gesture recognition process, but only affects + * whether the gesture's corresponding callback function is executed. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + preventBegin(): void; } - /** * Defines the tap gesture recognizer. * @@ -5572,23 +4391,20 @@ declare class GestureRecognizer { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ declare class TapRecognizer extends GestureRecognizer { - /** - * Returns the tap gesture's count. - * - * @returns { number } - the count of the tap gesture. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - getTapCount(): number; + /** + * Returns the tap gesture's count. + * + * @returns { number } - the count of the tap gesture. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + getTapCount(): number; } - /** * Defines the long press gesture recognizer. * @@ -5596,35 +4412,31 @@ declare class TapRecognizer extends GestureRecognizer { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ declare class LongPressRecognizer extends GestureRecognizer { - /** - * Returns the long press gesture's repeat state. - * - * @returns { boolean } - the repeat state of the long press gesture. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - isRepeat(): boolean; - /** - * Returns the long press gesture's duration. - * The unit is ms. - * - * @returns { number } - the duration of the long press gesture. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - getDuration(): number; + /** + * Returns the long press gesture's repeat state. + * + * @returns { boolean } - the repeat state of the long press gesture. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + isRepeat(): boolean; + /** + * Returns the long press gesture's duration. + * The unit is ms. + * + * @returns { number } - the duration of the long press gesture. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + getDuration(): number; } - /** * Defines the swipe gesture recognizer. * @@ -5632,35 +4444,31 @@ declare class LongPressRecognizer extends GestureRecognizer { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ declare class SwipeRecognizer extends GestureRecognizer { - /** - * Returns the swipe gesture's speed. - * The unit is vp/s. - * - * @returns { number } - the velocity threshold of the swipe gesture. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - getVelocityThreshold(): number; - /** - * Returns the swipe gesture's direction. - * - * @returns { SwipeDirection } - the direction of the swipe gesture. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - getDirection(): SwipeDirection; + /** + * Returns the swipe gesture's speed. + * The unit is vp/s. + * + * @returns { number } - the velocity threshold of the swipe gesture. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + getVelocityThreshold(): number; + /** + * Returns the swipe gesture's direction. + * + * @returns { SwipeDirection } - the direction of the swipe gesture. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + getDirection(): SwipeDirection; } - /** * Defines the pinch gesture recognizer. * @@ -5668,24 +4476,21 @@ declare class SwipeRecognizer extends GestureRecognizer { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ declare class PinchRecognizer extends GestureRecognizer { - /** - * Returns the pinch gesture's distance. - * The unit is vp. - * - * @returns { number } - the distance of the pinch gesture. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - getDistance(): number; + /** + * Returns the pinch gesture's distance. + * The unit is vp. + * + * @returns { number } - the distance of the pinch gesture. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + getDistance(): number; } - /** * Defines the rotation gesture recognizer. * @@ -5693,23 +4498,20 @@ declare class PinchRecognizer extends GestureRecognizer { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ declare class RotationRecognizer extends GestureRecognizer { - /** - * Returns the rotation gesture's angle. - * - * @returns { number } - the angle of the rotation gesture. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - getAngle(): number; + /** + * Returns the rotation gesture's angle. + * + * @returns { number } - the angle of the rotation gesture. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + getAngle(): number; } - /** * Defines the gesture recognizer. * @@ -5717,51 +4519,49 @@ declare class RotationRecognizer extends GestureRecognizer { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare class PanRecognizer extends GestureRecognizer { - /** - * Returns the the pan gesture options of the recognizer. - * - * @returns { PanGestureOptions } - Pan gesture options - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - getPanGestureOptions(): PanGestureOptions; - /** - * Returns the pan recognizer's direction attribute. - * - * @returns { PanDirection } - Pan recognizer direction - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 19 - */ - getDirection(): PanDirection; - /** - * Returns the pan recognizer's distance. - * The unit is vp. - * - * @returns { number } - the distance of the pan recognizer. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 19 - */ - getDistance(): number; - /** - * Returns the pan recognizer's distance map. - * The unit is vp. - * - * @returns { Map } - the distance map of the pan recognizer. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 19 - */ - getDistanceMap(): Map; + /** + * Returns the the pan gesture options of the recognizer. + * + * @returns { PanGestureOptions } - Pan gesture options + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + getPanGestureOptions(): PanGestureOptions; + /** + * Returns the pan recognizer's direction attribute. + * + * @returns { PanDirection } - Pan recognizer direction + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 19 + */ + getDirection(): PanDirection; + /** + * Returns the pan recognizer's distance. + * The unit is vp. + * + * @returns { number } - the distance of the pan recognizer. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 19 + */ + getDistance(): number; + /** + * Returns the pan recognizer's distance map. + * The unit is vp. + * + * @returns { Map } - the distance map of the pan recognizer. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 19 + */ + getDistanceMap(): Map; } diff --git a/api/@internal/component/ets/toolbar.d.ts b/api/@internal/component/ets/toolbar.d.ts index a874af7b589d80ae5586eb531a98ddc72504851a..9a1e952505c0166baf7c8a9adffb97d13ef50be5 100644 --- a/api/@internal/component/ets/toolbar.d.ts +++ b/api/@internal/component/ets/toolbar.d.ts @@ -12,12 +12,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - /** * @file Defines toolbar attributes. * @kit ArkUI */ - /** * Declare the placement of the toolbar item. * @@ -27,25 +25,23 @@ * @since 20 */ declare enum ToolBarItemPlacement { - /** - * Place toolbar item at the leading of top bar. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 20 - */ - TOP_BAR_LEADING = 0, - - /** - * Place toolbar item at the trailing of top bar. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 20 - */ - TOP_BAR_TRAILING = 1, + /** + * Place toolbar item at the leading of top bar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 20 + */ + TOP_BAR_LEADING = 0, + /** + * Place toolbar item at the trailing of top bar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 20 + */ + TOP_BAR_TRAILING = 1 } - /** * ToolBarItem constructor options. * @@ -55,17 +51,16 @@ declare enum ToolBarItemPlacement { * @since 20 */ interface ToolBarItemOptions { - /** - * Vertical layout element spacing. - * - * @type { ?ToolBarItemPlacement } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 20 - */ - placement?: ToolBarItemPlacement; + /** + * Vertical layout element spacing. + * + * @type { ?ToolBarItemPlacement } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 20 + */ + placement?: ToolBarItemPlacement; } - /** * Defines the ToolBarItem Component. * @@ -75,18 +70,17 @@ interface ToolBarItemOptions { * @since 20 */ interface ToolBarItemInterface { - /** - * Set the options. - * - * @param { ToolBarItemOptions } [options] - column options - * @returns { ToolBarItemAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 20 - */ - (options?: ToolBarItemOptions): ToolBarItemAttribute; + /** + * Set the options. + * + * @param { ToolBarItemOptions } [options] - column options + * @returns { ToolBarItemAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 20 + */ + (options?: ToolBarItemOptions): ToolBarItemAttribute; } - /** * Defines the ToolBarItem component attribute functions. * @@ -94,8 +88,8 @@ interface ToolBarItemInterface { * @crossplatform * @since 20 */ -declare class ToolBarItemAttribute { } - +declare class ToolBarItemAttribute { +} /** * Defines ToolBarItem Component. * @@ -105,7 +99,6 @@ declare class ToolBarItemAttribute { } * @since 20 */ declare const ToolBarItem: ToolBarItemInterface; - /** * Defines ToolBarItem Component instance. * @@ -114,4 +107,4 @@ declare const ToolBarItem: ToolBarItemInterface; * @crossplatform * @since 20 */ -declare const ToolBarItemInstance: ToolBarItemAttribute; \ No newline at end of file +declare const ToolBarItemInstance: ToolBarItemAttribute; diff --git a/api/@ohos.arkui.componentSnapshot.d.ts b/api/@ohos.arkui.componentSnapshot.d.ts index 9d76a24829f7ec7508377272affc3e7df6480d2e..3e45c6085b0db1c53197452d315c7228d8ae7346 100644 --- a/api/@ohos.arkui.componentSnapshot.d.ts +++ b/api/@ohos.arkui.componentSnapshot.d.ts @@ -12,19 +12,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - /** * @file * @kit ArkUI */ - -/*** if arkts 1.2 */ -import { CustomBuilder } from './arkui/component/builder'; -/*** endif */ - import { AsyncCallback } from './@ohos.base'; import image from './@ohos.multimedia.image'; - /** * This module allows developers to export snapshot image from a component or a custom builder. * @@ -40,362 +33,322 @@ import image from './@ohos.multimedia.image'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare namespace componentSnapshot { - /** - * Defines the extra options for snapshot taking. - * - * @typedef SnapshotRegion - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 - */ - export interface SnapshotRegion { /** - * Left side position of rectangle, in PX. + * Defines the extra options for snapshot taking. * - * @type { number } + * @typedef SnapshotRegion * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ - left: number; - + interface SnapshotRegion { + /** + * Left side position of rectangle, in PX. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 15 + */ + left: number; + /** + * Right side position of Rectangle, in PX. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 15 + */ + right: number; + /** + * Top side position of Rectangle, in PX. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 15 + */ + top: number; + /** + * Bottom side position of Rectangle, in PX. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 15 + */ + bottom: number; + } /** - * Right side position of Rectangle, in PX. + * Defines the extra options for snapshot taking, if this is used, the start and end will + * be assigned to left and right value according to the layout direction of node automaticlly. * - * @type { number } + * @typedef LocalizedSnapshotRegion * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ - right: number; - + interface LocalizedSnapshotRegion { + /** + * Left/Right side position of rectangle, in PX + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 15 + */ + start: number; + /** + * End side position of Rectangle, in PX. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 15 + */ + end: number; + /** + * Left/Right side position of rectangle, in PX + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 15 + */ + top: number; + /** + * Bottom side position of Rectangle, in PX. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 15 + */ + bottom: number; + } /** - * Top side position of Rectangle, in PX. + * Defines the snapshot region rect type. * - * @type { number } + * @typedef { SnapshotRegion | LocalizedSnapshotRegion } SnapshotRegionType * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ - top: number; - + type SnapshotRegionType = SnapshotRegion | LocalizedSnapshotRegion; /** - * Bottom side position of Rectangle, in PX. + * Defines the extra options for snapshot taking. * - * @type { number } + * @typedef SnapshotOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ - bottom: number; - } - - /** - * Defines the extra options for snapshot taking, if this is used, the start and end will - * be assigned to left and right value according to the layout direction of node automaticlly. - * - * @typedef LocalizedSnapshotRegion - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 - */ - export interface LocalizedSnapshotRegion { + interface SnapshotOptions { + /** + * Defines the scale property to render the snapshot. + * + * @type { ?number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + scale?: number; + /** + * Whether to wait the rendering is finished. + * + * @type {?boolean} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + waitUntilRenderFinished?: boolean; + /** + * Defines the rect reigon type of the snapshot. + * + * @type {?SnapshotRegionType} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 15 + */ + region?: SnapshotRegionType; + } /** - * Left/Right side position of rectangle, in PX + * Take a snapshot of the target component. * - * @type { number } + * @param { string } id - Target component ID, set by developer through .id attribute. + * @param { AsyncCallback } callback - Callback that contains the snapshot in PixelMap format. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified. + *
2. Incorrect parameters types. + *
3. Parameter verification failed. + * @throws { BusinessError } 100001 - Invalid ID. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 10 */ - start: number; - /** - * End side position of Rectangle, in PX. + * Take a snapshot of the target component. * - * @type { number } + * @param { string } id - Target component ID, set by developer through .id attribute. + * @param { AsyncCallback } callback - Callback that contains the snapshot in PixelMap format. + * @param { SnapshotOptions } [options] - Define the snapshot options. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified. + *
2. Incorrect parameters types. + *
3. Parameter verification failed. + * @throws { BusinessError } 100001 - Invalid ID. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 + * @deprecated since 18 + * @useinstead ohos.arkui.UIContext.ComponentSnapshot#get */ - end: number; - + function get(id: string, callback: AsyncCallback, options?: SnapshotOptions): void; /** - * Left/Right side position of rectangle, in PX + * Take a snapshot of the target component. * - * @type { number } + * @param { string } id - Target component ID, set by developer through .id attribute. + * @returns { Promise } A Promise with the snapshot in PixelMap format. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified. + *
2. Incorrect parameters types. + *
3. Parameter verification failed. + * @throws { BusinessError } 100001 - Invalid ID. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 10 */ - top: number; - /** - * Bottom side position of Rectangle, in PX. + * Take a snapshot of the target component. * - * @type { number } + * @param { string } id - Target component ID, set by developer through .id attribute. + * @param { SnapshotOptions } [options] - Define the snapshot options. + * @returns { Promise } A Promise with the snapshot in PixelMap format. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified. + *
2. Incorrect parameters types. + *
3. Parameter verification failed. + * @throws { BusinessError } 100001 - Invalid ID. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 + * @deprecated since 18 + * @useinstead ohos.arkui.UIContext.ComponentSnapshot#get + */ + function get(id: string, options?: SnapshotOptions): Promise; + /** + * Generate a snapshot from a custom component builder. + * + * @param { CustomBuilder } builder - Builder function of a custom component. + * @param { AsyncCallback } callback - Callback that contains the snapshot in PixelMap format. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified. + *
2. Incorrect parameters types. + *
3. Parameter verification failed. + * @throws { BusinessError } 100001 - The builder is not a valid build function. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 */ - bottom: number; - } - - /** - * Defines the snapshot region rect type. - * - * @typedef { SnapshotRegion | LocalizedSnapshotRegion } SnapshotRegionType - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 - */ - export type SnapshotRegionType = SnapshotRegion | LocalizedSnapshotRegion; - - /** - * Defines the extra options for snapshot taking. - * - * @typedef SnapshotOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - export interface SnapshotOptions { /** - * Defines the scale property to render the snapshot. + * Generate a snapshot from a custom component builder. * - * @type {?number} + * @param { CustomBuilder } builder - Builder function of a custom component. + * @param { AsyncCallback } callback - Callback that contains the snapshot in PixelMap format. + * @param { number } [delay] - Defines the delay time to render the snapshot. + * @param { boolean } [checkImageStatus] - Defines if check the image decoding status before taking snapshot. + * @param { SnapshotOptions } [options] - Define the snapshot options. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified. + *
2. Incorrect parameters types. + *
3. Parameter verification failed. + * @throws { BusinessError } 100001 - The builder is not a valid build function. + * @throws { BusinessError } 160001 - An image component in builder is not ready for taking a snapshot. The check for + * the ready state is required when the checkImageStatus option is enabled. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 + * @deprecated since 18 + * @useinstead ohos.arkui.UIContext.ComponentSnapshot#createFromBuilder + */ + function createFromBuilder(builder: CustomBuilder, callback: AsyncCallback, delay?: number, checkImageStatus?: boolean, options?: SnapshotOptions): void; + /** + * Generate a snapshot from a custom component builder. + * + * @param { CustomBuilder } builder - Builder function of a custom component. + * @returns { Promise } A Promise with the snapshot in PixelMap format. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified. + *
2. Incorrect parameters types. + *
3. Parameter verification failed. + * @throws { BusinessError } 100001 - The builder is not a valid build function. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 */ - scale?: number - /** - * Whether to wait the rendering is finished. + * Generate a snapshot from a custom component builder. * - * @type {?boolean} + * @param { CustomBuilder } builder - Builder function of a custom component. + * @param { number } [delay] - Defines the delay time to render the snapshot. + * @param { boolean } [checkImageStatus] - Defines if check the image decoding status before taking snapshot. + * @param { SnapshotOptions } [options] - Define the snapshot options. + * @returns { Promise } A Promise with the snapshot in PixelMap format. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified. + *
2. Incorrect parameters types. + *
3. Parameter verification failed. + * @throws { BusinessError } 100001 - The builder is not a valid build function. + * @throws { BusinessError } 160001 - An image component in builder is not ready for taking a snapshot. The check for + * the ready state is required when the checkImageStatus option is enabled. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 + * @deprecated since 18 + * @useinstead ohos.arkui.UIContext.ComponentSnapshot#createFromBuilder */ - waitUntilRenderFinished?: boolean - + function createFromBuilder(builder: CustomBuilder, delay?: number, checkImageStatus?: boolean, options?: SnapshotOptions): Promise; /** - * Defines the rect reigon type of the snapshot. + * Take a screenshot of the specified component in synchronous mode, + * this mode will block the main thread, please use it with caution, the maximum + * waiting time of the interface is 3s, if it does not return after 3s, an exception will be thrown. * - * @type {?SnapshotRegionType} + * @param { string } id - Target component ID, set by developer through .id attribute. + * @param { SnapshotOptions } [options] - Define the snapshot options. + * @returns { image.PixelMap } The snapshot result in PixelMap format. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified. + *
2. Incorrect parameters types. + *
3. Parameter verification failed. + * @throws { BusinessError } 100001 - Invalid ID. + * @throws { BusinessError } 160002 - Timeout. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ - region?: SnapshotRegionType - } - - /** - * Take a snapshot of the target component. - * - * @param { string } id - Target component ID, set by developer through .id attribute. - * @param { AsyncCallback } callback - Callback that contains the snapshot in PixelMap format. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. - * @throws { BusinessError } 100001 - Invalid ID. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Take a snapshot of the target component. - * - * @param { string } id - Target component ID, set by developer through .id attribute. - * @param { AsyncCallback } callback - Callback that contains the snapshot in PixelMap format. - * @param { SnapshotOptions } [options] - Define the snapshot options. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. - * @throws { BusinessError } 100001 - Invalid ID. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @deprecated since 18 - * @useinstead ohos.arkui.UIContext.ComponentSnapshot#get - * @arkts 1.1&1.2 - */ - function get(id: string, callback: AsyncCallback, options?: SnapshotOptions): void; - - /** - * Take a snapshot of the target component. - * - * @param { string } id - Target component ID, set by developer through .id attribute. - * @returns { Promise } A Promise with the snapshot in PixelMap format. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. - * @throws { BusinessError } 100001 - Invalid ID. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Take a snapshot of the target component. - * - * @param { string } id - Target component ID, set by developer through .id attribute. - * @param { SnapshotOptions } [options] - Define the snapshot options. - * @returns { Promise } A Promise with the snapshot in PixelMap format. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. - * @throws { BusinessError } 100001 - Invalid ID. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @deprecated since 18 - * @useinstead ohos.arkui.UIContext.ComponentSnapshot#get - * @arkts 1.1&1.2 - */ - function get(id: string, options?: SnapshotOptions): Promise; - - /** - * Generate a snapshot from a custom component builder. - * - * @param { CustomBuilder } builder - Builder function of a custom component. - * @param { AsyncCallback } callback - Callback that contains the snapshot in PixelMap format. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. - * @throws { BusinessError } 100001 - The builder is not a valid build function. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Generate a snapshot from a custom component builder. - * - * @param { CustomBuilder } builder - Builder function of a custom component. - * @param { AsyncCallback } callback - Callback that contains the snapshot in PixelMap format. - * @param { number } [delay] - Defines the delay time to render the snapshot. - * @param { boolean } [checkImageStatus] - Defines if check the image decoding status before taking snapshot. - * @param { SnapshotOptions } [options] - Define the snapshot options. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. - * @throws { BusinessError } 100001 - The builder is not a valid build function. - * @throws { BusinessError } 160001 - An image component in builder is not ready for taking a snapshot. The check for - * the ready state is required when the checkImageStatus option is enabled. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @deprecated since 18 - * @useinstead ohos.arkui.UIContext.ComponentSnapshot#createFromBuilder - * @arkts 1.1&1.2 - */ - function createFromBuilder(builder: CustomBuilder, callback: AsyncCallback, - delay?: number, checkImageStatus?: boolean, options?: SnapshotOptions): void; - - /** - * Generate a snapshot from a custom component builder. - * - * @param { CustomBuilder } builder - Builder function of a custom component. - * @returns { Promise } A Promise with the snapshot in PixelMap format. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. - * @throws { BusinessError } 100001 - The builder is not a valid build function. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Generate a snapshot from a custom component builder. - * - * @param { CustomBuilder } builder - Builder function of a custom component. - * @param { number } [delay] - Defines the delay time to render the snapshot. - * @param { boolean } [checkImageStatus] - Defines if check the image decoding status before taking snapshot. - * @param { SnapshotOptions } [options] - Define the snapshot options. - * @returns { Promise } A Promise with the snapshot in PixelMap format. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. - * @throws { BusinessError } 100001 - The builder is not a valid build function. - * @throws { BusinessError } 160001 - An image component in builder is not ready for taking a snapshot. The check for - * the ready state is required when the checkImageStatus option is enabled. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @deprecated since 18 - * @useinstead ohos.arkui.UIContext.ComponentSnapshot#createFromBuilder - * @arkts 1.1&1.2 - */ - function createFromBuilder(builder: CustomBuilder, delay?: number, - checkImageStatus?: boolean, options?: SnapshotOptions): Promise; - - /** - * Take a screenshot of the specified component in synchronous mode, - * this mode will block the main thread, please use it with caution, the maximum - * waiting time of the interface is 3s, if it does not return after 3s, an exception will be thrown. - * - * @param { string } id - Target component ID, set by developer through .id attribute. - * @param { SnapshotOptions } [options] - Define the snapshot options. - * @returns { image.PixelMap } The snapshot result in PixelMap format. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. - * @throws { BusinessError } 100001 - Invalid ID. - * @throws { BusinessError } 160002 - Timeout. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - export function getSync(id: string, options?: SnapshotOptions): image.PixelMap; + function getSync(id: string, options?: SnapshotOptions): image.PixelMap; } - export default componentSnapshot; diff --git a/api/@ohos.arkui.componentSnapshot.static.d.ets b/api/@ohos.arkui.componentSnapshot.static.d.ets new file mode 100644 index 0000000000000000000000000000000000000000..f24eb7c1e67aa9f5b50ad05921e459e0bcd69855 --- /dev/null +++ b/api/@ohos.arkui.componentSnapshot.static.d.ets @@ -0,0 +1,175 @@ +/* + * Copyright (c) 2023 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 + * @arkts 1.2 + */ +import { CustomBuilder } from './arkui/component/builder'; +import { AsyncCallback } from './@ohos.base'; +import image from './@ohos.multimedia.image'; + +/** + * This module allows developers to export snapshot image from a component or a custom builder. + * + * @namespace componentSnapshot + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +declare namespace componentSnapshot { + /** + * Defines the extra options for snapshot taking. + * + * @typedef SnapshotRegion + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + export interface SnapshotRegion { + /** + * Left side position of rectangle, in PX. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + left: number; + /** + * Right side position of Rectangle, in PX. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + right: number; + /** + * Top side position of Rectangle, in PX. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + top: number; + /** + * Bottom side position of Rectangle, in PX. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + bottom: number; + } + /** + * Defines the extra options for snapshot taking, if this is used, the start and end will + * be assigned to left and right value according to the layout direction of node automaticlly. + * + * @typedef LocalizedSnapshotRegion + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + export interface LocalizedSnapshotRegion { + /** + * Left/Right side position of rectangle, in PX + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + start: number; + /** + * End side position of Rectangle, in PX. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + end: number; + /** + * Left/Right side position of rectangle, in PX + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + top: number; + /** + * Bottom side position of Rectangle, in PX. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + bottom: number; + } + /** + * Defines the snapshot region rect type. + * + * @typedef { SnapshotRegion | LocalizedSnapshotRegion } SnapshotRegionType + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + export type SnapshotRegionType = SnapshotRegion | LocalizedSnapshotRegion; + /** + * Defines the extra options for snapshot taking. + * + * @typedef SnapshotOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + export interface SnapshotOptions { + /** + * Defines the scale property to render the snapshot. + * + * @type {?number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + scale?: number; + /** + * Whether to wait the rendering is finished. + * + * @type {?boolean} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + waitUntilRenderFinished?: boolean; + /** + * Defines the rect reigon type of the snapshot. + * + * @type {?SnapshotRegionType} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + region?: SnapshotRegionType; + } + /** + * Take a screenshot of the specified component in synchronous mode, + * this mode will block the main thread, please use it with caution, the maximum + * waiting time of the interface is 3s, if it does not return after 3s, an exception will be thrown. + * + * @param { string } id - Target component ID, set by developer through .id attribute. + * @param { SnapshotOptions } [options] - Define the snapshot options. + * @returns { image.PixelMap } The snapshot result in PixelMap format. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified. + *
2. Incorrect parameters types. + *
3. Parameter verification failed. + * @throws { BusinessError } 100001 - Invalid ID. + * @throws { BusinessError } 160002 - Timeout. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + export function getSync(id: string, options?: SnapshotOptions): image.PixelMap; +} +export default componentSnapshot; diff --git a/api/@ohos.arkui.componentUtils.d.ts b/api/@ohos.arkui.componentUtils.d.ts index 5f2b6268df7841b1c25d4b4b01f67dd361d7d6b0..b4db748fac5e549a260cf7ce04eaa1c7538354fb 100644 --- a/api/@ohos.arkui.componentUtils.d.ts +++ b/api/@ohos.arkui.componentUtils.d.ts @@ -12,12 +12,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - /** * @file * @kit ArkUI */ - /** * This module provides functionality for component coordinates and sizes. * @namespace componentUtils @@ -37,809 +35,769 @@ * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare namespace componentUtils { - - /** - * Component information. - * @typedef ComponentInfo - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Component information. - * @typedef ComponentInfo - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * Component information. - * @typedef ComponentInfo - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - export interface ComponentInfo { - /** - * component size. - * @type {Size} + * Component information. + * @typedef ComponentInfo * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ /** - * component size. - * @type {Size} + * Component information. + * @typedef ComponentInfo * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ /** - * component size. - * @type {Size} + * Component information. + * @typedef ComponentInfo * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - size: Size - - /** - * Obtain attribute information relative to the local. - * @type {Offset} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Obtain attribute information relative to the local. - * @type {Offset} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * Obtain attribute information relative to the local. - * @type {Offset} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - localOffset: Offset - - /** - * Obtain attribute information relative to the window. - * @type {Offset} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Obtain attribute information relative to the window. - * @type {Offset} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * Obtain attribute information relative to the window. - * @type {Offset} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - windowOffset: Offset - - /** - * Obtain attribute information relative to the screen. - * @type {Offset} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Obtain attribute information relative to the screen. - * @type {Offset} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * Obtain attribute information relative to the screen. - * @type {Offset} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - screenOffset: Offset - - /** - * Obtain attribute information for translation. - * @type {TranslateResult} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Obtain attribute information for translation. - * @type {TranslateResult} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * Obtain attribute information for translation. - * @type {TranslateResult} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - translate: TranslateResult - - /** - * Obtain attribute information for scale. - * @type {ScaleResult} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Obtain attribute information for scale. - * @type {ScaleResult} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * Obtain attribute information for scale. - * @type {ScaleResult} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - scale: ScaleResult - - /** - * Obtain attribute information for rotate. - * @type {RotateResult} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Obtain attribute information for rotate. - * @type {RotateResult} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * Obtain attribute information for rotate. - * @type {RotateResult} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - rotate: RotateResult - - /** - * Obtain attribute information of the transformation matrix. - * @type {Matrix4Result} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Obtain attribute information of the transformation matrix. - * @type {Matrix4Result} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * Obtain attribute information of the transformation matrix. - * @type {Matrix4Result} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - transform: Matrix4Result - } - - /** - * Defines the size property. - * @typedef Size - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Defines the size property. - * @typedef Size - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * Defines the size property. - * @typedef Size - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - export interface Size { - - /** - * Defines the width property. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Defines the width property. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * Defines the width property. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - width: number - - /** - * Defines the height property. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Defines the height property. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * Defines the height property. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - height: number - } - - /** - * Defines the offset property. - * @typedef Offset - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Defines the offset property. - * @typedef Offset - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * Defines the offset property. - * @typedef Offset - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - export interface Offset { - - /** - * Coordinate x of the Position. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Coordinate x of the Position. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * Coordinate x of the Position. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - x: number - - /** - * Coordinate y of the Position. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Coordinate y of the Position. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * Coordinate y of the Position. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - y: number - } - - /** - * Translation Result - * @typedef TranslateResult - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Translation Result - * @typedef TranslateResult - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * Translation Result - * @typedef TranslateResult - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - export interface TranslateResult { - - /** - * Indicates the translation distance of the x-axis, in vp. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Indicates the translation distance of the x-axis, in vp. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * Indicates the translation distance of the x-axis, in vp. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - x: number - - /** - * Indicates the translation distance of the y-axis, in vp. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Indicates the translation distance of the y-axis, in vp. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * Indicates the translation distance of the y-axis, in vp. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - y: number - - /** - * Indicates the translation distance of the z-axis, in vp. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Indicates the translation distance of the z-axis, in vp. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * Indicates the translation distance of the z-axis, in vp. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - z: number - } - - /** - * Scale Result - * @typedef ScaleResult - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Scale Result - * @typedef ScaleResult - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * Scale Result - * @typedef ScaleResult - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - export interface ScaleResult { - - /** - * Zoom factor of the x-axis. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Zoom factor of the x-axis. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * Zoom factor of the x-axis. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - x: number - - /** - * Zoom factor of the y-axis. - * @type {number} + * @since 12 + */ + interface ComponentInfo { + /** + * component size. + * @type {Size} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * component size. + * @type {Size} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ + /** + * component size. + * @type {Size} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + size: Size; + /** + * Obtain attribute information relative to the local. + * @type {Offset} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Obtain attribute information relative to the local. + * @type {Offset} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ + /** + * Obtain attribute information relative to the local. + * @type {Offset} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + localOffset: Offset; + /** + * Obtain attribute information relative to the window. + * @type {Offset} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Obtain attribute information relative to the window. + * @type {Offset} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ + /** + * Obtain attribute information relative to the window. + * @type {Offset} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + windowOffset: Offset; + /** + * Obtain attribute information relative to the screen. + * @type {Offset} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Obtain attribute information relative to the screen. + * @type {Offset} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ + /** + * Obtain attribute information relative to the screen. + * @type {Offset} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + screenOffset: Offset; + /** + * Obtain attribute information for translation. + * @type {TranslateResult} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Obtain attribute information for translation. + * @type {TranslateResult} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ + /** + * Obtain attribute information for translation. + * @type {TranslateResult} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + translate: TranslateResult; + /** + * Obtain attribute information for scale. + * @type {ScaleResult} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Obtain attribute information for scale. + * @type {ScaleResult} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ + /** + * Obtain attribute information for scale. + * @type {ScaleResult} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + scale: ScaleResult; + /** + * Obtain attribute information for rotate. + * @type {RotateResult} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Obtain attribute information for rotate. + * @type {RotateResult} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ + /** + * Obtain attribute information for rotate. + * @type {RotateResult} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + rotate: RotateResult; + /** + * Obtain attribute information of the transformation matrix. + * @type {Matrix4Result} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Obtain attribute information of the transformation matrix. + * @type {Matrix4Result} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ + /** + * Obtain attribute information of the transformation matrix. + * @type {Matrix4Result} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + transform: Matrix4Result; + } + /** + * Defines the size property. + * @typedef Size * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ /** - * Zoom factor of the y-axis. - * @type {number} + * Defines the size property. + * @typedef Size * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ /** - * Zoom factor of the y-axis. - * @type {number} + * Defines the size property. + * @typedef Size * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - y: number - - /** - * Zoom factor of the z-axis. - * @type {number} + * @since 12 + */ + interface Size { + /** + * Defines the width property. + * @type { number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Defines the width property. + * @type { number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ + /** + * Defines the width property. + * @type { number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + width: number; + /** + * Defines the height property. + * @type { number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Defines the height property. + * @type { number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ + /** + * Defines the height property. + * @type { number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + height: number; + } + /** + * Defines the offset property. + * @typedef Offset * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ /** - * Zoom factor of the z-axis. - * @type {number} + * Defines the offset property. + * @typedef Offset * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ /** - * Zoom factor of the z-axis. - * @type {number} + * Defines the offset property. + * @typedef Offset * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - z: number - - /** - * Transform the x-axis coordinate of the center point. - * @type {number} + * @since 12 + */ + interface Offset { + /** + * Coordinate x of the Position. + * @type { number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Coordinate x of the Position. + * @type { number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ + /** + * Coordinate x of the Position. + * @type { number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + x: number; + /** + * Coordinate y of the Position. + * @type { number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Coordinate y of the Position. + * @type { number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ + /** + * Coordinate y of the Position. + * @type { number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + y: number; + } + /** + * Translation Result + * @typedef TranslateResult * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ /** - * Transform the x-axis coordinate of the center point. - * @type {number} + * Translation Result + * @typedef TranslateResult * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ /** - * Transform the x-axis coordinate of the center point. - * @type {number} + * Translation Result + * @typedef TranslateResult * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - centerX: number - - /** - * Transform the y-axis coordinate of the center point. - * @type {number} + * @since 12 + */ + interface TranslateResult { + /** + * Indicates the translation distance of the x-axis, in vp. + * @type { number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Indicates the translation distance of the x-axis, in vp. + * @type { number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ + /** + * Indicates the translation distance of the x-axis, in vp. + * @type { number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + x: number; + /** + * Indicates the translation distance of the y-axis, in vp. + * @type { number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Indicates the translation distance of the y-axis, in vp. + * @type { number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ + /** + * Indicates the translation distance of the y-axis, in vp. + * @type { number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + y: number; + /** + * Indicates the translation distance of the z-axis, in vp. + * @type { number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Indicates the translation distance of the z-axis, in vp. + * @type { number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ + /** + * Indicates the translation distance of the z-axis, in vp. + * @type { number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + z: number; + } + /** + * Scale Result + * @typedef ScaleResult * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ /** - * Transform the y-axis coordinate of the center point. - * @type {number} + * Scale Result + * @typedef ScaleResult * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ /** - * Transform the y-axis coordinate of the center point. - * @type {number} + * Scale Result + * @typedef ScaleResult * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - centerY: number - } - - /** - * Rotation Result. - * @typedef RotateResult - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Rotation Result. - * @typedef RotateResult - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * Rotation Result. - * @typedef RotateResult - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - export interface RotateResult { - - /** - * Axis of rotation vector x coordinate. - * @type {number} + * @since 12 + */ + interface ScaleResult { + /** + * Zoom factor of the x-axis. + * @type { number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Zoom factor of the x-axis. + * @type { number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ + /** + * Zoom factor of the x-axis. + * @type { number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + x: number; + /** + * Zoom factor of the y-axis. + * @type { number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Zoom factor of the y-axis. + * @type { number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ + /** + * Zoom factor of the y-axis. + * @type { number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + y: number; + /** + * Zoom factor of the z-axis. + * @type { number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Zoom factor of the z-axis. + * @type { number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ + /** + * Zoom factor of the z-axis. + * @type { number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + z: number; + /** + * Transform the x-axis coordinate of the center point. + * @type { number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Transform the x-axis coordinate of the center point. + * @type { number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ + /** + * Transform the x-axis coordinate of the center point. + * @type { number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + centerX: number; + /** + * Transform the y-axis coordinate of the center point. + * @type { number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Transform the y-axis coordinate of the center point. + * @type { number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ + /** + * Transform the y-axis coordinate of the center point. + * @type { number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + centerY: number; + } + /** + * Rotation Result. + * @typedef RotateResult * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ /** - * Axis of rotation vector x coordinate. - * @type {number} + * Rotation Result. + * @typedef RotateResult * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ /** - * Axis of rotation vector x coordinate. - * @type {number} + * Rotation Result. + * @typedef RotateResult * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - x: number - - /** - * Axis of rotation vector y coordinate. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Axis of rotation vector y coordinate. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * Axis of rotation vector y coordinate. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - y: number - - /** - * Axis of rotation vector z coordinate. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Axis of rotation vector z coordinate. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * Axis of rotation vector z coordinate. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - z: number - - /** - * Transform the x-axis coordinate of the center point. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Transform the x-axis coordinate of the center point. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * Transform the x-axis coordinate of the center point. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - centerX: number - - /** - * Transform the y-axis coordinate of the center point. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Transform the y-axis coordinate of the center point. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * Transform the y-axis coordinate of the center point. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - centerY: number - - /** - * Rotation angle. - * @type {number} + * @since 12 + */ + interface RotateResult { + /** + * Axis of rotation vector x coordinate. + * @type { number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Axis of rotation vector x coordinate. + * @type { number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ + /** + * Axis of rotation vector x coordinate. + * @type { number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + x: number; + /** + * Axis of rotation vector y coordinate. + * @type { number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Axis of rotation vector y coordinate. + * @type { number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ + /** + * Axis of rotation vector y coordinate. + * @type { number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + y: number; + /** + * Axis of rotation vector z coordinate. + * @type { number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Axis of rotation vector z coordinate. + * @type { number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ + /** + * Axis of rotation vector z coordinate. + * @type { number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + z: number; + /** + * Transform the x-axis coordinate of the center point. + * @type { number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Transform the x-axis coordinate of the center point. + * @type { number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ + /** + * Transform the x-axis coordinate of the center point. + * @type { number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + centerX: number; + /** + * Transform the y-axis coordinate of the center point. + * @type { number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Transform the y-axis coordinate of the center point. + * @type { number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ + /** + * Transform the y-axis coordinate of the center point. + * @type { number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + centerY: number; + /** + * Rotation angle. + * @type { number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Rotation angle. + * @type { number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ + /** + * Rotation angle. + * @type { number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + angle: number; + } + /** + * The matrix is column-first fourth-order matrix. + * @typedef { [ + number, + number, + number, + number, + number, + number, + number, + number, + number, + number, + number, + number, + number, + number, + number, + number +] } Matrix4Result * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ /** - * Rotation angle. - * @type {number} + * The matrix is column-first fourth-order matrix. + * @typedef { [ + number, + number, + number, + number, + number, + number, + number, + number, + number, + number, + number, + number, + number, + number, + number, + number +] } Matrix4Result * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ /** - * Rotation angle. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - angle: number - } - - /** - * The matrix is column-first fourth-order matrix. - * @typedef { [number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number,] } Matrix4Result - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * The matrix is column-first fourth-order matrix. - * @typedef { [number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number,] } Matrix4Result - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * The matrix is column-first fourth-order matrix. - * @typedef { [number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number,] } Matrix4Result - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - export type Matrix4Result = [ - number, + * The matrix is column-first fourth-order matrix. + * @typedef { [ number, number, number, @@ -855,30 +813,52 @@ declare namespace componentUtils { number, number, number, - ]; - - /** - * Provide the ability to obtain the coordinates and size of component drawing areas. - * @param {string} id - component id. - * @returns {ComponentInfo} the object of ComponentInfo. - * @throws { BusinessError } 100001 - UI execution context not found. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Provide the ability to obtain the coordinates and size of component drawing areas. - * @param {string} id - component id. - * @returns {ComponentInfo} the object of ComponentInfo. - * @throws { BusinessError } 100001 - UI execution context not found. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - * @deprecated since 18 - * @useinstead ohos.arkui.UIContext.ComponentUtils#getRectangleById - */ - function getRectangleById(id: string): ComponentInfo; + number +] } Matrix4Result + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + type Matrix4Result = [ + number, + number, + number, + number, + number, + number, + number, + number, + number, + number, + number, + number, + number, + number, + number, + number + ]; + /** + * Provide the ability to obtain the coordinates and size of component drawing areas. + * @param {string} id - component id. + * @returns {ComponentInfo} the object of ComponentInfo. + * @throws { BusinessError } 100001 - UI execution context not found. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Provide the ability to obtain the coordinates and size of component drawing areas. + * @param {string} id - component id. + * @returns {ComponentInfo} the object of ComponentInfo. + * @throws { BusinessError } 100001 - UI execution context not found. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + * @deprecated since 18 + * @useinstead ohos.arkui.UIContext.ComponentUtils#getRectangleById + */ + function getRectangleById(id: string): ComponentInfo; } - export default componentUtils; diff --git a/api/@ohos.arkui.componentUtils.static.d.ets b/api/@ohos.arkui.componentUtils.static.d.ets new file mode 100644 index 0000000000000000000000000000000000000000..3db3aebc22143d861e79fbddaada1e8f0c494f79 --- /dev/null +++ b/api/@ohos.arkui.componentUtils.static.d.ets @@ -0,0 +1,351 @@ +/* + * Copyright (c) 2023-2024 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 + * @arkts 1.2 + */ + + +/** + * This module provides functionality for component coordinates and sizes. + * @namespace componentUtils + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +declare namespace componentUtils { + + + /** + * Component information. + * @typedef ComponentInfo + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + export interface ComponentInfo { + + + /** + * component size. + * @type {Size} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + size: Size; + + + /** + * Obtain attribute information relative to the local. + * @type {Offset} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + localOffset: Offset; + + + /** + * Obtain attribute information relative to the window. + * @type {Offset} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + windowOffset: Offset; + + + /** + * Obtain attribute information relative to the screen. + * @type {Offset} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + screenOffset: Offset; + + + /** + * Obtain attribute information for translation. + * @type {TranslateResult} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + translate: TranslateResult; + + + /** + * Obtain attribute information for scale. + * @type {ScaleResult} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + scale: ScaleResult; + + + /** + * Obtain attribute information for rotate. + * @type {RotateResult} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + rotate: RotateResult; + + + /** + * Obtain attribute information of the transformation matrix. + * @type {Matrix4Result} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + transform: Matrix4Result; + } + + + /** + * Defines the size property. + * @typedef Size + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + export interface Size { + + + /** + * Defines the width property. + * @type {number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + width: number; + + + /** + * Defines the height property. + * @type {number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + height: number; + } + + + /** + * Defines the offset property. + * @typedef Offset + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + export interface Offset { + + + /** + * Coordinate x of the Position. + * @type {number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + x: number; + + + /** + * Coordinate y of the Position. + * @type {number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + y: number; + } + + + /** + * Translation Result + * @typedef TranslateResult + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + export interface TranslateResult { + + + /** + * Indicates the translation distance of the x-axis, in vp. + * @type {number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + x: number; + + + /** + * Indicates the translation distance of the y-axis, in vp. + * @type {number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + y: number; + + + /** + * Indicates the translation distance of the z-axis, in vp. + * @type {number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + z: number; + } + + + /** + * Scale Result + * @typedef ScaleResult + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + export interface ScaleResult { + + + /** + * Zoom factor of the x-axis. + * @type {number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + x: number; + + + /** + * Zoom factor of the y-axis. + * @type {number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + y: number; + + + /** + * Zoom factor of the z-axis. + * @type {number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + z: number; + + + /** + * Transform the x-axis coordinate of the center point. + * @type {number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + centerX: number; + + + /** + * Transform the y-axis coordinate of the center point. + * @type {number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + centerY: number; + } + + + /** + * Rotation Result. + * @typedef RotateResult + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + export interface RotateResult { + + + /** + * Axis of rotation vector x coordinate. + * @type {number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + x: number; + + + /** + * Axis of rotation vector y coordinate. + * @type {number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + y: number; + + + /** + * Axis of rotation vector z coordinate. + * @type {number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + z: number; + + + /** + * Transform the x-axis coordinate of the center point. + * @type {number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + centerX: number; + + + /** + * Transform the y-axis coordinate of the center point. + * @type {number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + centerY: number; + + + /** + * Rotation angle. + * @type {number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + angle: number; + } + + + /** + * The matrix is column-first fourth-order matrix. + * @typedef { [number, number, number, number, number, number, number, number, number, number, number, number, + * number, number, number, number,] } Matrix4Result + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + export type Matrix4Result = [ + number, + number, + number, + number, + number, + number, + number, + number, + number, + number, + number, + number, + number, + number, + number, + number + ]; +} +export default componentUtils; diff --git a/api/@ohos.arkui.dragController.d.ts b/api/@ohos.arkui.dragController.d.ts index 66e64fdfd041b32699423121805d1f43729b5480..c85a4355aa9187be3e52b047048795a1595e45f1 100644 --- a/api/@ohos.arkui.dragController.d.ts +++ b/api/@ohos.arkui.dragController.d.ts @@ -12,23 +12,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - /** * @file * @kit ArkUI */ - -/*** if arkts 1.2 */ -import { DragEvent, DragPreviewOptions, DragItemInfo, ICurve } from './arkui/component/common'; -import { CustomBuilder } from './arkui/component/builder'; -import { TouchPoint, ResourceColor } from './arkui/component/units'; -import { Curve } from './arkui/component/enums'; -/*** endif */ - - import type { AsyncCallback, BusinessError, Callback } from './@ohos.base'; import type unifiedDataChannel from './@ohos.data.unifiedDataChannel'; - /** * This module allows developers to trigger a drag event. * @namespace dragController @@ -48,1086 +37,1022 @@ import type unifiedDataChannel from './@ohos.data.unifiedDataChannel'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ declare namespace dragController { - /** - * Defines the Drag Status. - * - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 - */ - /** - * Defines the Drag Status. - * - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - /** - * Defines the Drag Status. - * - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - const enum DragStatus { /** - * Drag has started. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 - */ - /** - * Drag has started. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - /** - * Drag has started. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - STARTED = 0, - /** - * Drag has ended. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 - */ - /** - * Drag has ended. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - /** - * Drag has ended. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - ENDED = 1, - } - - /** - * Drag and drop information - * - * @interface DragAndDropInfo - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 - */ - /** - * Drag and drop information - * - * @interface DragAndDropInfo - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - /** - * Drag and drop information - * - * @interface DragAndDropInfo - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - interface DragAndDropInfo { - /** - * The drag status. - * @type { DragStatus } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 - */ - /** - * The drag status. - * @type { DragStatus } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - /** - * The drag status. - * @type { DragStatus } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - status: DragStatus; - /** - * The information containing the drag event. - * @type { DragEvent } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 - */ - /** - * The information containing the drag event. - * @type { DragEvent } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - /** - * The information containing the drag event. - * @type { DragEvent } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - event: DragEvent; - /** - * Additional information about the drag info. - * @type { ?string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 - */ - /** - * Additional information about the drag info. - * @type { ?string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - /** - * Additional information about the drag info. - * @type { ?string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - extraParams?: string; - } - - /** - * One drag action object for drag process - * - * @interface DragAction - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 - */ - /** - * One drag action object for drag process - * - * @interface DragAction - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - /** - * One drag action object for drag process - * - * @interface DragAction - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - interface DragAction { - /** - * trigger drag action + * Defines the Drag Status. * - * @returns { Promise } A Promise can indicate the start result. - * @throws { BusinessError } 100001 - Internal handling failed. + * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 11 */ /** - * trigger drag action + * Defines the Drag Status. * - * @returns { Promise } A Promise can indicate the start result. - * @throws { BusinessError } 100001 - Internal handling failed. + * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 12 */ /** - * trigger drag action + * Defines the Drag Status. * - * @returns { Promise } A Promise can indicate the start result. - * @throws { BusinessError } 100001 - Internal handling failed. + * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - startDrag(): Promise; - /** - * Registers a callback for listening on drag status changes. - * This callback is triggered when the drag status change. + * @since 18 + */ + const enum DragStatus { + /** + * Drag has started. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 11 + */ + /** + * Drag has started. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 12 + */ + /** + * Drag has started. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + STARTED = 0, + /** + * Drag has ended. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 11 + */ + /** + * Drag has ended. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 12 + */ + /** + * Drag has ended. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + ENDED = 1 + } + /** + * Drag and drop information * - * @param { 'statusChange' } type for status changing - * @param { Callback } callback with drag event and status information + * @interface DragAndDropInfo * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 11 */ /** - * Registers a callback for listening on drag status changes. - * This callback is triggered when the drag status change. + * Drag and drop information * - * @param { 'statusChange' } type for status changing - * @param { Callback } callback with drag event and status information + * @interface DragAndDropInfo * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 12 */ /** - * Registers a callback for listening on drag status changes. - * This callback is triggered when the drag status change. + * Drag and drop information * - * @param { 'statusChange' } type for status changing - * @param { Callback } callback with drag event and status information + * @interface DragAndDropInfo * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - on(type: 'statusChange', callback: Callback): void; - - /** - * Deregisters a callback for listening on drag status changes. - * This callback is not triggered when the drag status change. + * @since 18 + */ + interface DragAndDropInfo { + /** + * The drag status. + * @type { DragStatus } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 11 + */ + /** + * The drag status. + * @type { DragStatus } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 12 + */ + /** + * The drag status. + * @type { DragStatus } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + status: DragStatus; + /** + * The information containing the drag event. + * @type { DragEvent } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 11 + */ + /** + * The information containing the drag event. + * @type { DragEvent } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 12 + */ + /** + * The information containing the drag event. + * @type { DragEvent } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + event: DragEvent; + /** + * Additional information about the drag info. + * @type { ?string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 11 + */ + /** + * Additional information about the drag info. + * @type { ?string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 12 + */ + /** + * Additional information about the drag info. + * @type { ?string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + extraParams?: string; + } + /** + * One drag action object for drag process * - * @param { 'statusChange' } type for status changing - * @param { Callback } callback with drag event and status information + * @interface DragAction * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 11 */ /** - * Deregisters a callback for listening on drag status changes. - * This callback is not triggered when the drag status change. + * One drag action object for drag process * - * @param { 'statusChange' } type for status changing - * @param { Callback } callback with drag event and status information + * @interface DragAction * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 12 */ /** - * Deregisters a callback for listening on drag status changes. - * This callback is not triggered when the drag status change. + * One drag action object for drag process * - * @param { 'statusChange' } type for status changing - * @param { Callback } callback with drag event and status information + * @interface DragAction * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - off(type: 'statusChange', callback?: Callback): void; - } - - /** - * DragInfo object description - * - * @interface DragInfo - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * DragInfo object description - * - * @interface DragInfo - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - /** - * DragInfo object description - * - * @interface DragInfo - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - interface DragInfo { - /** - * A unique identifier to identify which touch point. - * @type { number } + * @since 18 + */ + interface DragAction { + /** + * trigger drag action + * + * @returns { Promise } A Promise can indicate the start result. + * @throws { BusinessError } 100001 - Internal handling failed. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 11 + */ + /** + * trigger drag action + * + * @returns { Promise } A Promise can indicate the start result. + * @throws { BusinessError } 100001 - Internal handling failed. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 12 + */ + /** + * trigger drag action + * + * @returns { Promise } A Promise can indicate the start result. + * @throws { BusinessError } 100001 - Internal handling failed. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + startDrag(): Promise; + /** + * Registers a callback for listening on drag status changes. + * This callback is triggered when the drag status change. + * + * @param { 'statusChange' } type for status changing + * @param { Callback } callback with drag event and status information + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 11 + */ + /** + * Registers a callback for listening on drag status changes. + * This callback is triggered when the drag status change. + * + * @param { 'statusChange' } type for status changing + * @param { Callback } callback with drag event and status information + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 12 + */ + /** + * Registers a callback for listening on drag status changes. + * This callback is triggered when the drag status change. + * + * @param { 'statusChange' } type for status changing + * @param { Callback } callback with drag event and status information + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + on(type: 'statusChange', callback: Callback): void; + /** + * Deregisters a callback for listening on drag status changes. + * This callback is not triggered when the drag status change. + * + * @param { 'statusChange' } type for status changing + * @param { Callback } callback with drag event and status information + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 11 + */ + /** + * Deregisters a callback for listening on drag status changes. + * This callback is not triggered when the drag status change. + * + * @param { 'statusChange' } type for status changing + * @param { Callback } callback with drag event and status information + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 12 + */ + /** + * Deregisters a callback for listening on drag status changes. + * This callback is not triggered when the drag status change. + * + * @param { 'statusChange' } type for status changing + * @param { Callback } callback with drag event and status information + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + off(type: 'statusChange', callback?: Callback): void; + } + /** + * DragInfo object description + * + * @interface DragInfo * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ /** - * A unique identifier to identify which touch point. - * @type { number } + * DragInfo object description + * + * @interface DragInfo * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 12 */ /** - * A unique identifier to identify which touch point. - * @type { number } + * DragInfo object description + * + * @interface DragInfo * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - pointerId: number; - - /** - * Drag data. - * @type { ?unifiedDataChannel.UnifiedData } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Drag data. - * @type { ?unifiedDataChannel.UnifiedData } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - /** - * Drag data. - * @type { ?unifiedDataChannel.UnifiedData } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - data?: unifiedDataChannel.UnifiedData; - - /** - * Additional information about the drag info. - * @type { ?string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Additional information about the drag info. - * @type { ?string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - /** - * Additional information about the drag info. - * @type { ?string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - extraParams?: string; - - /** - * Touch point coordinates. - * @type { ?TouchPoint } + * @since 18 + */ + interface DragInfo { + /** + * A unique identifier to identify which touch point. + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * A unique identifier to identify which touch point. + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 12 + */ + /** + * A unique identifier to identify which touch point. + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + pointerId: number; + /** + * Drag data. + * @type { ?unifiedDataChannel.UnifiedData } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Drag data. + * @type { ?unifiedDataChannel.UnifiedData } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 12 + */ + /** + * Drag data. + * @type { ?unifiedDataChannel.UnifiedData } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + data?: unifiedDataChannel.UnifiedData; + /** + * Additional information about the drag info. + * @type { ?string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Additional information about the drag info. + * @type { ?string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 12 + */ + /** + * Additional information about the drag info. + * @type { ?string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + extraParams?: string; + /** + * Touch point coordinates. + * @type { ?TouchPoint } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 11 + */ + /** + * Touch point coordinates. + * @type { ?TouchPoint } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 12 + */ + /** + * Touch point coordinates. + * @type { ?TouchPoint } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + touchPoint?: TouchPoint; + /** + * Drag preview options. + * @type { ?DragPreviewOptions } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 11 + */ + /** + * Drag preview options. + * @type { ?DragPreviewOptions } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 12 + */ + /** + * Drag preview options. + * @type { ?DragPreviewOptions } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + previewOptions?: DragPreviewOptions; + /** + * Provide a data representation to the system instead of providing a complete data + * object directly. 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 instead of the data field. + * + * @type { ?unifiedDataChannel.DataLoadParams } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + dataLoadParams?: unifiedDataChannel.DataLoadParams; + } + /** + * Defines the animation options for drag preview. + * + * @interface AnimationOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 11 */ /** - * Touch point coordinates. - * @type { ?TouchPoint } + * Defines the animation options for drag preview. + * + * @interface AnimationOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 12 */ /** - * Touch point coordinates. - * @type { ?TouchPoint } + * Defines the animation options for drag preview. + * + * @interface AnimationOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - touchPoint?: TouchPoint; - - /** - * Drag preview options. - * @type { ?DragPreviewOptions } + * @since 18 + */ + interface AnimationOptions { + /** + * Animation duration, in ms. + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 11 + */ + /** + * Animation duration, in ms. + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 12 + */ + /** + * Animation duration, in ms. + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + duration?: number; + /** + * Animation curve. + * @type { ?(Curve | ICurve) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 11 + */ + /** + * Animation curve. + * @type { ?(Curve | ICurve) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 12 + */ + /** + * Animation curve. + * @type { ?(Curve | ICurve) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + curve?: Curve | ICurve; + } + /** + * Provides the functions of setting color or updating animation. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 11 */ /** - * Drag preview options. - * @type { ?DragPreviewOptions } + * Provides the functions of setting color or updating animation. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 12 */ /** - * Drag preview options. - * @type { ?DragPreviewOptions } + * Provides the functions of setting color or updating animation. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - previewOptions?: DragPreviewOptions; - - /** - * Provide a data representation to the system instead of providing a complete data - * object directly. 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 instead of the data field. + * @since 18 + */ + export class DragPreview { + /** + * change foreground color of preview + * @param { ResourceColor } color - color value + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 11 + */ + /** + * change foreground color of preview + * @param { ResourceColor } color - color value + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 12 + */ + /** + * change foreground color of preview + * @param { ResourceColor } color - color value + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + setForegroundColor(color: ResourceColor): void; + /** + * update preview style with animation + * @param { AnimationOptions } options - animation options + * @param { function } handler - change style functions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 11 + */ + /** + * update preview style with animation + * @param { AnimationOptions } options - animation options + * @param { function } handler - change style functions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 12 + */ + /** + * update preview style with animation + * @param { AnimationOptions } options - animation options + * @param { function } handler - change style functions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + animate(options: AnimationOptions, handler: () => void): void; + } + /** + * Define the drag event paramters * - * @type { ?unifiedDataChannel.DataLoadParams } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - */ - dataLoadParams?: unifiedDataChannel.DataLoadParams; - } - - /** - * Defines the animation options for drag preview. - * - * @interface AnimationOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 - */ - /** - * Defines the animation options for drag preview. - * - * @interface AnimationOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - /** - * Defines the animation options for drag preview. - * - * @interface AnimationOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - interface AnimationOptions { - /** - * Animation duration, in ms. - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 - */ - /** - * Animation duration, in ms. - * @type { ?number } + * @interface DragEventParam * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 12 */ /** - * Animation duration, in ms. - * @type { ?number } + * Define the drag event paramters + * + * @interface DragEventParam * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - duration?: number; - /** - * Animation curve. - * @type { ?(Curve | ICurve) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 - */ - /** - * Animation curve. - * @type { ?(Curve | ICurve) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - /** - * Animation curve. - * @type { ?(Curve | ICurve) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - curve?: Curve | ICurve; - } - - /** - * Provides the functions of setting color or updating animation. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 - */ - /** - * Provides the functions of setting color or updating animation. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - /** - * Provides the functions of setting color or updating animation. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - export class DragPreview { - /** - * change foreground color of preview - * @param { ResourceColor } color - color value + * @since 18 + */ + interface DragEventParam { + /** + * The information containing the drag event. + * @type { DragEvent } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * The information containing the drag event. + * @type { DragEvent } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 12 + */ + /** + * The information containing the drag event. + * @type { DragEvent } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + event: DragEvent; + /** + * Additional information about the drag info. + * @type { string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Additional information about the drag info. + * @type { string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 12 + */ + /** + * Additional information about the drag info. + * @type { string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + extraParams: string; + } + /** + * Execute a drag event. + * @param { CustomBuilder | DragItemInfo } custom - Object used for prompts displayed when the object is dragged. + * @param { DragInfo } dragInfo - Information about the drag event. + * @param { AsyncCallback<{ event: DragEvent, extraParams: string }> } callback - Callback that contains the drag + * event information. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified. + *
2. Incorrect parameters types. + *
3. Parameter verification failed. + * @throws { BusinessError } 100001 - Internal handling failed. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 + * @since 10 */ /** - * change foreground color of preview - * @param { ResourceColor } color - color value + * Execute a drag event. + * @param { CustomBuilder | DragItemInfo } custom - Object used for prompts displayed when the object is dragged. + * @param { DragInfo } dragInfo - Information about the drag event. + * @param { AsyncCallback } callback - Callback that contains the drag event information. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified. + *
2. Incorrect parameters types. + *
3. Parameter verification failed. + * @throws { BusinessError } 100001 - Internal handling failed. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 12 */ /** - * change foreground color of preview - * @param { ResourceColor } color - color value + * Execute a drag event. + * @param { CustomBuilder | DragItemInfo } custom - Object used for prompts displayed when the object is dragged. + * @param { DragInfo } dragInfo - Information about the drag event. + * @param { AsyncCallback } callback - Callback that contains the drag event information. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified. + *
2. Incorrect parameters types. + *
3. Parameter verification failed. + * @throws { BusinessError } 100001 - Internal handling failed. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - setForegroundColor(color: ResourceColor): void; - /** - * update preview style with animation - * @param { AnimationOptions } options - animation options - * @param { function } handler - change style functions + * @since 18 + * @deprecated since 18 + * @useinstead ohos.arkui.UIContext.DragController#executeDrag + */ + function executeDrag(custom: CustomBuilder | DragItemInfo, dragInfo: DragInfo, callback: AsyncCallback): void; + /** + * Execute a drag event. + * @param { CustomBuilder | DragItemInfo } custom - Object used for prompts displayed when the object is dragged. + * @param { DragInfo } dragInfo - Information about the drag event. + * @returns { Promise<{ event: DragEvent, extraParams: string }> } A Promise with the drag event information. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified. + *
2. Incorrect parameters types. + *
3. Parameter verification failed. + * @throws { BusinessError } 100001 - Internal handling failed. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 + * @since 10 */ /** - * update preview style with animation - * @param { AnimationOptions } options - animation options - * @param { function } handler - change style functions + * Execute a drag event. + * @param { CustomBuilder | DragItemInfo } custom - Object used for prompts displayed when the object is dragged. + * @param { DragInfo } dragInfo - Information about the drag event. + * @returns { Promise } A Promise with the drag event information. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified. + *
2. Incorrect parameters types. + *
3. Parameter verification failed. + * @throws { BusinessError } 100001 - Internal handling failed. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 12 */ /** - * update preview style with animation - * @param { AnimationOptions } options - animation options - * @param { function } handler - change style functions + * Execute a drag event. + * @param { CustomBuilder | DragItemInfo } custom - Object used for prompts displayed when the object is dragged. + * @param { DragInfo } dragInfo - Information about the drag event. + * @returns { Promise } A Promise with the drag event information. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified. + *
2. Incorrect parameters types. + *
3. Parameter verification failed. + * @throws { BusinessError } 100001 - Internal handling failed. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - animate(options: AnimationOptions, handler: () =>void): void; - } - - /** - * Define the drag event paramters - * - * @interface DragEventParam - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - /** - * Define the drag event paramters - * - * @interface DragEventParam - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - interface DragEventParam { - - /** - * The information containing the drag event. - * @type { DragEvent } + * @since 18 + * @deprecated since 18 + * @useinstead ohos.arkui.UIContext.DragController#executeDrag + */ + function executeDrag(custom: CustomBuilder | DragItemInfo, dragInfo: DragInfo): Promise; + /** + * Create one drag action object, which can be used for starting drag later or monitoring + * the drag status after drag started. + * @param { Array } customArray - Objects used for prompts + * displayed when the objects are dragged. + * @param { DragInfo } dragInfo - Information about the drag event. + * @returns { DragAction } one drag action object + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified. + *
2. Incorrect parameters types. + *
3. Parameter verification failed. + * @throws { BusinessError } 100001 - Internal handling failed. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 + * @since 11 */ /** - * The information containing the drag event. - * @type { DragEvent } + * Create one drag action object, which can be used for starting drag later or monitoring + * the drag status after drag started. + * @param { Array } customArray - Objects used for prompts + * displayed when the objects are dragged. + * @param { DragInfo } dragInfo - Information about the drag event. + * @returns { DragAction } one drag action object + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified. + *
2. Incorrect parameters types. + *
3. Parameter verification failed. + * @throws { BusinessError } 100001 - Internal handling failed. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 12 */ /** - * The information containing the drag event. - * @type { DragEvent } + * Create one drag action object, which can be used for starting drag later or monitoring + * the drag status after drag started. + * @param { Array } customArray - Objects used for prompts + * displayed when the objects are dragged. + * @param { DragInfo } dragInfo - Information about the drag event. + * @returns { DragAction } one drag action object + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified. + *
2. Incorrect parameters types. + *
3. Parameter verification failed. + * @throws { BusinessError } 100001 - Internal handling failed. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 + * @deprecated since 18 + * @useinstead ohos.arkui.UIContext.DragController#createDragAction */ - event: DragEvent; - + function createDragAction(customArray: Array, dragInfo: DragInfo): DragAction; /** - * Additional information about the drag info. - * @type { string } + * Get drag preview object. + * @returns { DragPreview } An drag preview object. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 + * @since 11 */ /** - * Additional information about the drag info. - * @type { string } + * Get drag preview object. + * @returns { DragPreview } An drag preview object. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 12 */ /** - * Additional information about the drag info. - * @type { string } + * Get drag preview object. + * @returns { DragPreview } An drag preview object. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - extraParams: string; - } - - /** - * Execute a drag event. - * @param { CustomBuilder | DragItemInfo } custom - Object used for prompts displayed when the object is dragged. - * @param { DragInfo } dragInfo - Information about the drag event. - * @param { AsyncCallback<{ event: DragEvent, extraParams: string }> } callback - Callback that contains the drag - * event information. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. - * @throws { BusinessError } 100001 - Internal handling failed. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Execute a drag event. - * @param { CustomBuilder | DragItemInfo } custom - Object used for prompts displayed when the object is dragged. - * @param { DragInfo } dragInfo - Information about the drag event. - * @param { AsyncCallback } callback - Callback that contains the drag event information. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. - * @throws { BusinessError } 100001 - Internal handling failed. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - /** - * Execute a drag event. - * @param { CustomBuilder | DragItemInfo } custom - Object used for prompts displayed when the object is dragged. - * @param { DragInfo } dragInfo - Information about the drag event. - * @param { AsyncCallback } callback - Callback that contains the drag event information. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. - * @throws { BusinessError } 100001 - Internal handling failed. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @deprecated since 18 - * @useinstead ohos.arkui.UIContext.DragController#executeDrag - * @arkts 1.1&1.2 - */ - function executeDrag(custom: CustomBuilder | DragItemInfo, dragInfo: DragInfo, - callback: AsyncCallback): void; - - /** - * Execute a drag event. - * @param { CustomBuilder | DragItemInfo } custom - Object used for prompts displayed when the object is dragged. - * @param { DragInfo } dragInfo - Information about the drag event. - * @returns { Promise<{ event: DragEvent, extraParams: string }> } A Promise with the drag event information. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. - * @throws { BusinessError } 100001 - Internal handling failed. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Execute a drag event. - * @param { CustomBuilder | DragItemInfo } custom - Object used for prompts displayed when the object is dragged. - * @param { DragInfo } dragInfo - Information about the drag event. - * @returns { Promise } A Promise with the drag event information. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. - * @throws { BusinessError } 100001 - Internal handling failed. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - /** - * Execute a drag event. - * @param { CustomBuilder | DragItemInfo } custom - Object used for prompts displayed when the object is dragged. - * @param { DragInfo } dragInfo - Information about the drag event. - * @returns { Promise } A Promise with the drag event information. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. - * @throws { BusinessError } 100001 - Internal handling failed. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @deprecated since 18 - * @useinstead ohos.arkui.UIContext.DragController#executeDrag - * @arkts 1.1&1.2 - */ - function executeDrag(custom: CustomBuilder | DragItemInfo, dragInfo: DragInfo): Promise; - - /** - * Create one drag action object, which can be used for starting drag later or monitoring - * the drag status after drag started. - * @param { Array } customArray - Objects used for prompts - * displayed when the objects are dragged. - * @param { DragInfo } dragInfo - Information about the drag event. - * @returns { DragAction } one drag action object - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. - * @throws { BusinessError } 100001 - Internal handling failed. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 - */ - /** - * Create one drag action object, which can be used for starting drag later or monitoring - * the drag status after drag started. - * @param { Array } customArray - Objects used for prompts - * displayed when the objects are dragged. - * @param { DragInfo } dragInfo - Information about the drag event. - * @returns { DragAction } one drag action object - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. - * @throws { BusinessError } 100001 - Internal handling failed. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - /** - * Create one drag action object, which can be used for starting drag later or monitoring - * the drag status after drag started. - * @param { Array } customArray - Objects used for prompts - * displayed when the objects are dragged. - * @param { DragInfo } dragInfo - Information about the drag event. - * @returns { DragAction } one drag action object - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. - * @throws { BusinessError } 100001 - Internal handling failed. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @deprecated since 18 - * @useinstead ohos.arkui.UIContext.DragController#createDragAction - * @arkts 1.1&1.2 - */ - function createDragAction(customArray: Array, dragInfo: DragInfo): DragAction; - - /** - * Get drag preview object. - * @returns { DragPreview } An drag preview object. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 - */ - /** - * Get drag preview object. - * @returns { DragPreview } An drag preview object. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - /** - * Get drag preview object. - * @returns { DragPreview } An drag preview object. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @deprecated since 18 - * @useinstead ohos.arkui.UIContext.DragController#getDragPreview - * @arkts 1.1&1.2 - */ - function getDragPreview(): DragPreview; - - /** - * Define the status for the application to notify the framework whether to execute drag. - * - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - const enum DragStartRequestStatus { - /** - * Notify the framework that the application is not yet ready and needs to temporarily block - * the start of drag, only effective in onDragStart calls. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - WAITING = 0, - - /** - * Notify the framework that the drag can continue to be started, but only during the start - * of drag, and will not take effect when the drag is started. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - READY = 1, - } - - /** - * Defines the drag spring loading state. - * Under default system configuration, if no CANCEL occurs, the state reporting is as follows: - * Hover still--500ms-->BEGIN-->100ms-->UPDATE-->100ms-->UPDATE-->100ms-->UPDATE-->100ms-->END - * - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - */ - const enum DragSpringLoadingState { - /** - * The user has remained stationary for a period, initiating the spring loading process. - * This state allows for some preparatory operations during spring loading. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - */ - BEGIN, - /** - * Already in the spring loading state. The system periodically checks the user's hover status. - * If the user remains stationary, it triggers an UPDATE state notification at regular intervals. - * This state allows for UI effect refreshes to emphasize the hover state. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - */ - UPDATE, - /** - * The entire spring loading state ends. The application can perform cleanup operations - * and execute navigation or view switching actions when this state occurs. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - */ - END, - /** - * After entering the BEGIN state, if the user moves out of the component range, exceeds the displacement - * threshold, lifts the finger, or switches windows (pull out), the CANCEL state is triggered. - * The application should restore the UI style and cancel any pending navigation or view switching actions. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - */ - CANCEL - } - - /** - * Defines parameters affecting spring loading detection. Typically, default system configurations suffice. - * Customization can be done by specifying the config when binding onDragSpringLoading or dynamically modifying it - * using the updateConfiguration method during the BEGIN state. - * - * @typedef { DragSpringLoadingConfiguration } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - */ - interface DragSpringLoadingConfiguration { - /** - * Time interval to maintain a stationary state before entering spring loading. Default: 500 ms. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - */ - stillTimeLimit?: number; - - /** - * Interval between update notifications after entering the spring loading state. Default: 100ms. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - */ - updateInterval?: number; - - /** - * Maximum number of update notifications to report while in the spring loading state. Default: 3. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - */ - updateNotifyCount?: number; - - /** - * Maximum wait time from the last UPDATE state to the end of spring loading. Default: 100ms. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - */ - updateToFinishInterval?: number; - } - - /** - * Defines drag-related information when triggering spring loading callbacks. - * This interface provides drag data summaries and additional drag information, useful for applications - * needing to dynamically determine whether to respond to spring loading callbacks based on drag data. - * - * @typedef { SpringLoadingDragInfos } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - */ - interface SpringLoadingDragInfos { - /** - * Summary of the dragged data. This field is absent if the source application did not configure data. - * - * @type { ?unifiedDataChannel.Summary } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - */ - dataSummary?: unifiedDataChannel.Summary; - - /** - * Additional information provided by the source application when initiating the drag operation. - * This field is absent if the source application did not configure it. - * - * @type { ?string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 + * @since 18 + * @deprecated since 18 + * @useinstead ohos.arkui.UIContext.DragController#getDragPreview */ - extraInfos?: string; - } - - /** - * Context information for the current spring loading trigger. This object is passed to the application - * in the spring loading callback, allowing it to obtain the current state, dynamically refresh UI effects, - * and access drag data to determine whether to handle the drag operation. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - */ - class SpringLoadingContext { + function getDragPreview(): DragPreview; /** - * Current spring loading state. Refer to the DragSpringLoadingState enum for details. + * Define the status for the application to notify the framework whether to execute drag. * - * @type { DragSpringLoadingState } + * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 20 - */ - state: DragSpringLoadingState; - /** - * Sequence number of the current spring loading state notification. Begins at 0 for BEGIN and increments - * with each callback. + * @since 18 + */ + const enum DragStartRequestStatus { + /** + * Notify the framework that the application is not yet ready and needs to temporarily block + * the start of drag, only effective in onDragStart calls. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 18 + */ + WAITING = 0, + /** + * Notify the framework that the drag can continue to be started, but only during the start + * of drag, and will not take effect when the drag is started. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 18 + */ + READY = 1 + } + /** + * Defines the drag spring loading state. + * Under default system configuration, if no CANCEL occurs, the state reporting is as follows: + * Hover still--500ms-->BEGIN-->100ms-->UPDATE-->100ms-->UPDATE-->100ms-->UPDATE-->100ms-->END * - * @type { number } + * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 20 */ - currentNotifySequence: number; - /** - * Drag-related information. Absent when the state is CANCEL. + const enum DragSpringLoadingState { + /** + * The user has remained stationary for a period, initiating the spring loading process. + * This state allows for some preparatory operations during spring loading. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + BEGIN, + /** + * Already in the spring loading state. The system periodically checks the user's hover status. + * If the user remains stationary, it triggers an UPDATE state notification at regular intervals. + * This state allows for UI effect refreshes to emphasize the hover state. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + UPDATE, + /** + * The entire spring loading state ends. The application can perform cleanup operations + * and execute navigation or view switching actions when this state occurs. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + END, + /** + * After entering the BEGIN state, if the user moves out of the component range, exceeds the displacement + * threshold, lifts the finger, or switches windows (pull out), the CANCEL state is triggered. + * The application should restore the UI style and cancel any pending navigation or view switching actions. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + CANCEL + } + /** + * Defines parameters affecting spring loading detection. Typically, default system configurations suffice. + * Customization can be done by specifying the config when binding onDragSpringLoading or dynamically modifying it + * using the updateConfiguration method during the BEGIN state. * - * @type { ?SpringLoadingDragInfos } + * @typedef { DragSpringLoadingConfiguration } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 20 */ - dragInfos?: SpringLoadingDragInfos; - /** - * Current spring loading configuration. Absent when the state is CANCEL. + interface DragSpringLoadingConfiguration { + /** + * Time interval to maintain a stationary state before entering spring loading. Default: 500 ms. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + stillTimeLimit?: number; + /** + * Interval between update notifications after entering the spring loading state. Default: 100ms. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + updateInterval?: number; + /** + * Maximum number of update notifications to report while in the spring loading state. Default: 3. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + updateNotifyCount?: number; + /** + * Maximum wait time from the last UPDATE state to the end of spring loading. Default: 100ms. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + updateToFinishInterval?: number; + } + /** + * Defines drag-related information when triggering spring loading callbacks. + * This interface provides drag data summaries and additional drag information, useful for applications + * needing to dynamically determine whether to respond to spring loading callbacks based on drag data. * - * @type { ?DragSpringLoadingConfiguration } + * @typedef { SpringLoadingDragInfos } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 20 */ - currentConfig?: DragSpringLoadingConfiguration; - /** - * Aborts subsequent spring loading triggers. - * Note: Aborting does not trigger a CANCEL notification, the application must handle state cleanup when aborting. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - */ - abort(): void; - /** - * Updates the spring loading configuration for the current trigger. Only effective during the BEGIN state. - * This method does not modify the original configuration set during onDragSpringLoading binding. - * It provides an opportunity for dynamic configuration updates during the current trigger. - * Typically, applications should use default configurations or set them once during binding. - * Use this method sparingly, e.g., for different drag data types requiring varied UX timing. + interface SpringLoadingDragInfos { + /** + * Summary of the dragged data. This field is absent if the source application did not configure data. + * + * @type { ?unifiedDataChannel.Summary } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + dataSummary?: unifiedDataChannel.Summary; + /** + * Additional information provided by the source application when initiating the drag operation. + * This field is absent if the source application did not configure it. + * + * @type { ?string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + extraInfos?: string; + } + /** + * Context information for the current spring loading trigger. This object is passed to the application + * in the spring loading callback, allowing it to obtain the current state, dynamically refresh UI effects, + * and access drag data to determine whether to handle the drag operation. * - * @param { DragSpringLoadingConfiguration } config - The spring loading detection configuration * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 20 */ - updateConfiguration(config: DragSpringLoadingConfiguration): void; - } + class SpringLoadingContext { + /** + * Current spring loading state. Refer to the DragSpringLoadingState enum for details. + * + * @type { DragSpringLoadingState } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + state: DragSpringLoadingState; + /** + * Sequence number of the current spring loading state notification. Begins at 0 for BEGIN and increments + * with each callback. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + currentNotifySequence: number; + /** + * Drag-related information. Absent when the state is CANCEL. + * + * @type { ?SpringLoadingDragInfos } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + dragInfos?: SpringLoadingDragInfos; + /** + * Current spring loading configuration. Absent when the state is CANCEL. + * + * @type { ?DragSpringLoadingConfiguration } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + currentConfig?: DragSpringLoadingConfiguration; + /** + * Aborts subsequent spring loading triggers. + * Note: Aborting does not trigger a CANCEL notification, the application must handle state cleanup when aborting. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + abort(): void; + /** + * Updates the spring loading configuration for the current trigger. Only effective during the BEGIN state. + * This method does not modify the original configuration set during onDragSpringLoading binding. + * It provides an opportunity for dynamic configuration updates during the current trigger. + * Typically, applications should use default configurations or set them once during binding. + * Use this method sparingly, e.g., for different drag data types requiring varied UX timing. + * + * @param { DragSpringLoadingConfiguration } config - The spring loading detection configuration + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + updateConfiguration(config: DragSpringLoadingConfiguration): void; + } } - export default dragController; diff --git a/api/@ohos.arkui.dragController.static.d.ets b/api/@ohos.arkui.dragController.static.d.ets new file mode 100644 index 0000000000000000000000000000000000000000..a78d8c648fa5e0b2f760775e65be8c1f7c816299 --- /dev/null +++ b/api/@ohos.arkui.dragController.static.d.ets @@ -0,0 +1,313 @@ +/* + * Copyright (c) 2023 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 + * @arkts 1.2 + */ +import { DragEvent, DragPreviewOptions, DragItemInfo, ICurve } from './arkui/component/common'; +import { CustomBuilder } from './arkui/component/builder'; +import { TouchPoint, ResourceColor } from './arkui/component/units'; +import { Curve } from './arkui/component/enums'; +import type { AsyncCallback, BusinessError, Callback } from './@ohos.base'; +import type unifiedDataChannel from './@ohos.data.unifiedDataChannel'; + + +/** + * This module allows developers to trigger a drag event. + * @namespace dragController + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +declare namespace dragController { + + + /** + * Defines the Drag Status. + * + * @enum { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + const enum DragStatus { + + + /** + * Drag has started. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + STARTED = 0, + + + /** + * Drag has ended. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + ENDED = 1 + } + + + /** + * Drag and drop information + * + * @interface DragAndDropInfo + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + interface DragAndDropInfo { + + + /** + * The drag status. + * @type { DragStatus } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + status: DragStatus; + + + /** + * The information containing the drag event. + * @type { DragEvent } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + event: DragEvent; + + + /** + * Additional information about the drag info. + * @type { ?string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + extraParams?: string; + } + + + /** + * One drag action object for drag process + * + * @interface DragAction + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + interface DragAction { + + + /** + * trigger drag action + * + * @returns { Promise } A Promise can indicate the start result. + * @throws { BusinessError } 100001 - Internal handling failed. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + startDrag(): Promise; + + + /** + * Registers a callback for listening on drag status changes. + * This callback is triggered when the drag status change. + * + * @param { 'statusChange' } type for status changing + * @param { Callback } callback with drag event and status information + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + on(type: 'statusChange', callback: Callback): void; + + + /** + * Deregisters a callback for listening on drag status changes. + * This callback is not triggered when the drag status change. + * + * @param { 'statusChange' } type for status changing + * @param { Callback } callback with drag event and status information + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + off(type: 'statusChange', callback?: Callback): void; + } + + + /** + * DragInfo object description + * + * @interface DragInfo + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + interface DragInfo { + + + /** + * A unique identifier to identify which touch point. + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + pointerId: number; + + + /** + * Drag data. + * @type { ?unifiedDataChannel.UnifiedData } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + data?: unifiedDataChannel.UnifiedData; + + + /** + * Additional information about the drag info. + * @type { ?string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + extraParams?: string; + + + /** + * Touch point coordinates. + * @type { ?TouchPoint } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + touchPoint?: TouchPoint; + + + /** + * Drag preview options. + * @type { ?DragPreviewOptions } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + previewOptions?: DragPreviewOptions; + } + + + /** + * Defines the animation options for drag preview. + * + * @interface AnimationOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + interface AnimationOptions { + + + /** + * Animation duration, in ms. + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + duration?: number; + + + /** + * Animation curve. + * @type { ?(Curve | ICurve) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + curve?: Curve | ICurve; + } + + + /** + * Provides the functions of setting color or updating animation. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + export class DragPreview { + + + /** + * change foreground color of preview + * @param { ResourceColor } color - color value + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + setForegroundColor(color: ResourceColor): void; + + + /** + * update preview style with animation + * @param { AnimationOptions } options - animation options + * @param { function } handler - change style functions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + animate(options: AnimationOptions, handler: () => void): void; + } + + /** + * Define the drag event paramters + * + * @interface DragEventParam + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + interface DragEventParam { + + + /** + * The information containing the drag event. + * @type { DragEvent } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + event: DragEvent; + + + /** + * Additional information about the drag info. + * @type { string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + extraParams: string; + } + /** + * Define the status for the application to notify the framework whether to execute drag. + * + * @enum { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + const enum DragStartRequestStatus { + /** + * Notify the framework that the application is not yet ready and needs to temporarily block + * the start of drag, only effective in onDragStart calls. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + WAITING = 0, + /** + * Notify the framework that the drag can continue to be started, but only during the start + * of drag, and will not take effect when the drag is started. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + READY = 1 + } +} +export default dragController; diff --git a/api/arkui/component/focus.static.d.ets b/api/arkui/component/focus.static.d.ets new file mode 100644 index 0000000000000000000000000000000000000000..13b6b1197903770a567a3996d71c1485525f0136 --- /dev/null +++ b/api/arkui/component/focus.static.d.ets @@ -0,0 +1,107 @@ +/* + * Copyright (c) 2024 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 Provide some common interface for focus. + * @kit ArkUI + * @arkts 1.2 + */ +import { LengthMetrics, ColorMetrics } from '../Graphics'; +/** + * Focus box style. + * + * @interface FocusBoxStyle + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare interface FocusBoxStyle { + /** + * Describes the focus-box margin. + * + * @type { ?LengthMetrics } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + margin?: LengthMetrics; + /** + * Describes the focus-box color. + * + * @type { ?ColorMetrics } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + strokeColor?: ColorMetrics; + /** + * Describes the focus-box stroke width. + * + * @type { ?LengthMetrics } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + strokeWidth?: LengthMetrics; +} +/** + * Focus Priority + * + * @enum { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare enum FocusPriority { + /** + * Default priority. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + AUTO = 0, + /** + * Prior priority. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + PRIOR = 2000, + /** + * Previous focus priority. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + PREVIOUS = 3000 +} +/** + * Key processing mode. + * Determines the priority of key event processing when component cannot handle the key event. + * + * @enum { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare enum KeyProcessingMode { + /** + * Key events are used to move focus. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + FOCUS_NAVIGATION = 0, + /** + * Key events bubble up to ancestors. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + ANCESTOR_EVENT = 1 +} diff --git a/api/arkui/component/gesture.static.d.ets b/api/arkui/component/gesture.static.d.ets new file mode 100644 index 0000000000000000000000000000000000000000..d9d0eb49af154aee87917dd6960f3909cea8189e --- /dev/null +++ b/api/arkui/component/gesture.static.d.ets @@ -0,0 +1,1982 @@ +/* + * Copyright (c) 2021-2023 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 + * @arkts 1.2 + */ +import { BaseEvent, SourceTool, Callback } from './common'; +import { InteractionHand } from './enums'; +/** + * Creating an Object + * + * @enum { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare enum PanDirection { + /** + * Default. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + None, + /** + * Sliding horizontally. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + Horizontal, + /** + * Sliding left. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + Left, + /** + * Sliding right. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + Right, + /** + * Sliding Vertical + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + Vertical, + /** + * Sliding up. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + Up, + /** + * Sliding Down. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + Down, + /** + * Sliding in all directions. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + All +} +/** + * Creating an Object + * + * @enum { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare enum SwipeDirection { + /** + * Default. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + None, + /** + * Sliding horizontally. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + Horizontal, + /** + * Sliding Vertical + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + Vertical, + /** + * Sliding in all directions. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + All +} +/** + * Creating an Object + * + * @enum { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare enum GestureMode { + /** + * Sequential gesture recognition is performed in sequence according to the gesture registration sequence. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + Sequence, + /** + * Simultaneous recognition. Registration gestures participate in recognition. Everything can be triggered. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + Parallel, + /** + * Mutually exclusive recognition. Only one gesture is successfully recognized. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + Exclusive +} +/** + * Creating an Object + * + * @enum { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare enum GestureMask { + /** + * High-priority response to the current gesture.When the current gesture fails to be recognized, + * other gesture responses are triggered.For gestures with the same priority, + * responses are performed based on the recognition sequence. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + Normal, + /** + * Ignore internal gestures and recognize the current gesture first. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + IgnoreInternal +} +/** + * Creating an Object + * + * @enum { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare enum GestureJudgeResult { + /** + * The system gesture determination is not affected. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + CONTINUE = 0, + /** + * The user-defined gesture determination result of the current component is fail. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + REJECT = 1 +} +/** + * Creating an Object + * + * @namespace GestureControl + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare namespace GestureControl { + /** + * Creating an Object + * + * @enum { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + enum GestureType { + /** + * TapGesture. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + TAP_GESTURE = 0, + /** + * LongPressGesture. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + LONG_PRESS_GESTURE = 1, + /** + * PanGesture. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + PAN_GESTURE = 2, + /** + * PinchGesture. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + PINCH_GESTURE = 3, + /** + * SwipeGesture. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + SWIPE_GESTURE = 4, + /** + * RotationGesture. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + ROTATION_GESTURE = 5, + /** + * Drag. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + DRAG = 6, + /** + * Click. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + CLICK = 7 + } +} +/** + * The description of gesture information. + * + * @interface GestureInfo + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare interface GestureInfo { + /** + * The tag of gesture. + * + * @type { ?string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + tag?: string; + /** + * The type of gesture. + * + * @type { GestureControl.GestureType } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + type: GestureControl.GestureType; + /** + * The flag whether it is a system gesture. + * + * @type { boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + isSystemGesture: boolean; +} +/** + * Type of the finger information. + * + * @interface FingerInfo + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export interface FingerInfo { + /** + * Finger unique identifier. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + id: number; + /** + * X coordinate of the touch point relative to the left edge of the device screen. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + globalX: number; + /** + * The Y coordinate of the touch point relative to the upper edge of the device screen. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + globalY: number; + /** + * X coordinate of the touch point relative to the left edge of the touched element. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + localX: number; + /** + * Y coordinate of the touch point relative to the upper edge of the touched element. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + localY: number; + /** + * X coordinate of the touch point relative to the left edge of the device screen. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + displayX: number; + /** + * Y coordinate of the touch point relative to the upper edge of the device screen. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + displayY: number; + /** + * Type of the touch hand. + * + * @type { ?InteractionHand } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + hand?: InteractionHand; +} +/** + * Defines the Gesture Type. + * + * @typedef { Gesture | GestureGroup } GestureType + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export type GestureType = Gesture | GestureGroup; +/** + * Defines the gesture base event. + * + * @extends BaseEvent + * @interface BaseGestureEvent + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export interface BaseGestureEvent extends BaseEvent { + /** + * All finger information. + * + * @type { FingerInfo[] } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + fingerList: FingerInfo[]; +} +/** + * Defines event info for tap gesture. + * + * @extends BaseGestureEvent + * @interface TapGestureEvent + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export interface TapGestureEvent extends BaseGestureEvent { +} +/** + * Defines event info for long press gesture. + * + * @extends BaseGestureEvent + * @interface LongPressGestureEvent + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export interface LongPressGestureEvent extends BaseGestureEvent { + /** + * Indicates whether an event is triggered repeatedly. + * + * @type { boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + repeat: boolean; +} +/** + * Defines event info for pan gesture. + * + * @extends BaseGestureEvent + * @interface PanGestureEvent + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export interface PanGestureEvent extends BaseGestureEvent { + /** + * Gesture event offset X. + * The unit is vp. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + offsetX: number; + /** + * Gesture event offset Y. + * The unit is vp. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + offsetY: number; + /** + * X-axis velocity of the gesture. + * @type {number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + velocityX: number; + /** + * Y-axis velocity of the gesture. + * @type {number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + velocityY: number; + /** + * velocity of the gesture. + * @type {number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + velocity: number; +} +/** + * Defines event info for pinch gesture. + * + * @extends BaseGestureEvent + * @interface PinchGestureEvent + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export interface PinchGestureEvent extends BaseGestureEvent { + /** + * Scaling ratio. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + scale: number; + /** + * X-axis coordinate of the kneading center point. + * The unit is vp. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + pinchCenterX: number; + /** + * Y-axis coordinate of the kneading center point. + * The unit is vp. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + pinchCenterY: number; +} +/** + * Defines event info for rotation gesture. + * + * @extends BaseGestureEvent + * @interface RotationGestureEvent + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export interface RotationGestureEvent extends BaseGestureEvent { + /** + * Gesture event direction angle. + * The unit is deg. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + angle: number; +} +/** + * Defines event info for swipe gesture. + * + * @extends BaseGestureEvent + * @interface SwipeGestureEvent + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export interface SwipeGestureEvent extends BaseGestureEvent { + /** + * Gesture event direction angle. + * The unit is deg. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + angle: number; + /** + * Gesture event slide speed. + * The unit is vp. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + speed: number; +} +/** + * Defines event info for gesture. + * + * @extends BaseEvent + * @interface GestureEvent + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export interface GestureEvent extends BaseEvent { + /** + * Indicates whether an event is triggered repeatedly. + * Used in LongPressGesture. + * + * @type { boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + repeat: boolean; + /** + * All finger information. + * Used in LongPressGesture and TapGesture. + * + * @type { FingerInfo[] } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + fingerList: FingerInfo[]; + /** + * Gesture event offset X. + * The unit is vp. + * Used in PanGesture. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + offsetX: number; + /** + * Gesture event offset Y. + * The unit is vp. + * Used in PanGesture. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + offsetY: number; + /** + * Gesture event direction angle. + * The unit is deg. + * Used in RotationGesture and SwipeGesture. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + angle: number; + /** + * Gesture event slide speed. + * The unit is vp. + * Used in SwipeGesture. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + speed: number; + /** + * Scaling ratio. + * Used in PinchGesture. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + scale: number; + /** + * X-axis coordinate of the kneading center point. + * The unit is vp. + * Used in PinchGesture. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + pinchCenterX: number; + /** + * Y-axis coordinate of the kneading center point. + * The unit is vp. + * Used in PinchGesture. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + pinchCenterY: number; + /** + * X-axis velocity of the gesture. + * @type {number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + velocityX: number; + /** + * Y-axis velocity of the gesture. + * @type {number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + velocityY: number; + /** + * velocity of the gesture. + * @type {number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + velocity: number; +} +/** + * Defines the BaseHandlerOptions options. + * @interface BaseHandlerOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export interface BaseHandlerOptions { + /** + * The flag to strict verification fingers, if touch finger size is over or less than fingers, gesture can not be + * accepted. + * The default value is false. + * + * @type { ?boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + isFingerCountLimited?: boolean; +} +/** + * Defines Gesture interface. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare class Gesture { + /** + * Set gesture's tag. + * + * @param { string } tag + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + tag(tag: string): this; + /** + * Input source type for gesture response. + * + * @param { Array } types - indicate the allowed input source for gesture to response + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + allowedTypes(types: Array): this; +} +/** + * Defines TapGesture parameters. + * + * @extends BaseHandlerOptions + * @interface TapGestureParameters + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare interface TapGestureParameters extends BaseHandlerOptions { + /** + * Number of consecutive clicks recognized. If the value is less than 1, the default value is used. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + count?: number; + /** + * The hand index that triggers the click. If the value is less than 1, the default value is used. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + fingers?: number; + /** + * The limited move distance of click. If the value is less than 0, the default value is used. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + distanceThreshold?: number; +} +/** + * Defines TapGesture. + * + * @extends Gesture + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare class TapGesture extends Gesture { + /** + * Set the value. + * TapGestureParameters: The parameters of the tapGesture. + * + * @param { function } factory + * @param { TapGestureParameters } [value] + * @returns { TapGesture } + * @static + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + static $_instantiate(factory: () => TapGesture, value?: TapGestureParameters): TapGesture; + /** + * Tap gesture recognition success callback. + * + * @param { Callback } event + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + onAction(event: Callback): this; +} +/** + * Defines LongPressGesture. + * + * @extends Gesture + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare class LongPressGesture extends Gesture { + /** + * Set the value. + * fingers: Indicates the hand index that triggers the long press. + * repeat: Indicates whether to trigger event callback continuously. + * duration: Minimum press and hold time, in milliseconds. + * + * @param { function } factory + * @param { LongPressGestureHandlerOptions } [value] + * @returns { LongPressGesture } + * @static + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + static $_instantiate(factory: () => LongPressGesture, value?: LongPressGestureHandlerOptions): LongPressGesture; + /** + * LongPress gesture recognition success callback. + * + * @param { Callback } event + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + onAction(event: Callback): this; + /** + * The LongPress gesture is successfully recognized. When the finger is lifted, the callback is triggered. + * + * @param { Callback } event + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + onActionEnd(event: Callback): this; + /** + * The LongPress gesture is successfully recognized and a callback is triggered when the touch cancel event is + * received. + * + * @param { Callback } event + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + onActionCancel(event: Callback): this; +} +/** + * Defines the PanGesture options. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare class PanGestureOptions { + /** + * Constructor parameters. + * + * @param { PanGestureHandlerOptions } [value] + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + constructor(value?: PanGestureHandlerOptions); + /** + * Sets the direction attribute. + * + * @param { PanDirection } value + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + setDirection(value: PanDirection): void; + /** + * Sets the setDistance attribute. + * + * @param { number } value + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + setDistance(value: number): void; + /** + * Sets the setFingers attribute. + * + * @param { number } value + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + setFingers(value: number): void; + /** + * Get the pan direction attribute. + * + * @returns { PanDirection } - Pan gesture direction + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + getDirection(): PanDirection; + /** + * Returns the pan gesture's distance. + * The unit is vp. + * + * @returns { number } - the distance of the pan gesture. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + getDistance(): number; +} +/** + * Defines PanGesture. + * + * @extends Gesture + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare class PanGesture extends Gesture { + /** + * Set the value. + * + * @param { function } factory + * @param { PanGestureHandlerOptions | PanGestureOptions } [value] + * @returns { PanGesture } + * @static + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + static $_instantiate(factory: () => PanGesture, value?: PanGestureHandlerOptions | PanGestureOptions): PanGesture; + /** + * Pan gesture recognition success callback. + * + * @param { Callback } event + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + onActionStart(event: Callback): this; + /** + * Callback when the Pan gesture is moving. + * + * @param { Callback } event + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + onActionUpdate(event: Callback): this; + /** + * The Pan gesture is successfully recognized. When the finger is lifted, the callback is triggered. + * + * @param { Callback } event + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + onActionEnd(event: Callback): this; + /** + * The Pan gesture is successfully recognized and a callback is triggered when the touch cancel event is received. + * + * @param { Callback } event + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + onActionCancel(event: Callback): this; +} +/** + * Defines SwipeGesture. + * + * @extends Gesture + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare class SwipeGesture extends Gesture { + /** + * Set the value. + * + * @param { function } factory + * @param { SwipeGestureHandlerOptions } [value] + * @returns { SwipeGesture } + * @static + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + static $_instantiate(factory: () => SwipeGesture, value?: SwipeGestureHandlerOptions): SwipeGesture; + /** + * Slide gesture recognition success callback. + * + * @param { Callback } event + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + onAction(event: Callback): this; +} +/** + * Defines PinchGesture. + * + * @extends Gesture + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare class PinchGesture extends Gesture { + /** + * Set the value. + * + * @param { function } factory + * @param { PinchGestureHandlerOptions } [value] + * @returns { PinchGesture } + * @static + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + static $_instantiate(factory: () => PinchGesture, value?: PinchGestureHandlerOptions): PinchGesture; + /** + * Pinch gesture recognition success callback. + * + * @param { Callback } event + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + onActionStart(event: Callback): this; + /** + * Callback when the Pinch gesture is moving. + * + * @param { Callback } event + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + onActionUpdate(event: Callback): this; + /** + * The Pinch gesture is successfully recognized. When the finger is lifted, the callback is triggered. + * + * @param { Callback } event + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + onActionEnd(event: Callback): this; + /** + * The Pinch gesture is successfully recognized and a callback is triggered when the touch cancel event is received. + * + * @param { Callback } event + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + onActionCancel(event: Callback): this; +} +/** + * Defines RotationGesture. + * + * @extends Gesture + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare class RotationGesture extends Gesture { + /** + * Set the value. + * + * @param { function } factory + * @param { RotationGestureHandlerOptions } [value] + * @returns { RotationGesture } + * @static + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + static $_instantiate(factory: () => RotationGesture, value?: RotationGestureHandlerOptions): RotationGesture; + /** + * Rotation gesture recognition success callback. + * + * @param { Callback } event + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + onActionStart(event: Callback): this; + /** + * Callback when the Rotation gesture is moving. + * + * @param { Callback } event + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + onActionUpdate(event: Callback): this; + /** + * The Rotation gesture is successfully recognized. When the finger is lifted, the callback is triggered. + * + * @param { Callback } event + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + onActionEnd(event: Callback): this; + /** + * The Rotation gesture is successfully recognized and a callback is triggered when the touch cancel event is + * received. + * + * @param { Callback } event + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + onActionCancel(event: Callback): this; +} +/** + * Defines the GestureGroup. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare class GestureGroup { + /** + * Return to Obtain GestureGroup. + * + * @param { function } factory + * @param { GestureMode } mode + * @param { GestureType[] } gesture + * @returns { GestureGroup } + * @static + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + static $_instantiate(factory: () => GestureGroup, mode: GestureMode, ...gesture: GestureType[]): GestureGroup; + /** + * The Gesture group is successfully recognized and a callback is triggered when the touch cancel event is received. + * + * @param { Callback } event + * @returns { GestureGroup } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + onCancel(event: Callback): GestureGroup; +} +/** + * Defines the gesture handler. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare class GestureHandler { + /** + * Set the GestureHandler's tag. + * + * @param { string } tag + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + tag(tag: string): this; + /** + * Input source type for gesture response. + * + * @param { Array } types - indicate the allowed input source for gesture to response + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + allowedTypes(types: Array): this; +} +/** + * Defines the TapGestureHandler options. + * + * @extends BaseHandlerOptions + * @interface TapGestureHandlerOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export interface TapGestureHandlerOptions extends BaseHandlerOptions { + /** + * Indicates the number of consecutive clicks recognized. If the value is less than 1, the default value is used. + * The default value is 1. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + count?: number; + /** + * Indicates the hand index that triggers the click. If the value is less than 1, the default value is used. + * The default value is 1. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + fingers?: number; +} +/** + * Defines the TapGesture handler. + * + * @extends GestureHandler + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare class TapGestureHandler extends GestureHandler { + /** + * Constructor parameters. + * + * @param { TapGestureHandlerOptions } [options] + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + constructor(options?: TapGestureHandlerOptions); + /** + * Tap gesture recognition success callback. + * + * @param { Callback } event + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + onAction(event: Callback): this; +} +/** + * Defines the LongPressGestureHandler options. + * + * @extends BaseHandlerOptions + * @interface LongPressGestureHandlerOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export interface LongPressGestureHandlerOptions extends BaseHandlerOptions { + /** + * Indicates the hand index that triggers the long press. If the value is less than 1, the default value is used. + * The default value is 1. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + fingers?: number; + /** + * Indicates whether an event is triggered repeatedly. + * The default value is false. + * + * @type { ?boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + repeat?: boolean; + /** + * Indicates minimum press and hold time, in milliseconds. + * The default value is 500ms. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + duration?: number; +} +/** + * Defines the LongPressGesture handler. + * + * @extends GestureHandler + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare class LongPressGestureHandler extends GestureHandler { + /** + * Constructor parameters. + * + * @param { LongPressGestureHandlerOptions } [options] + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + constructor(options?: LongPressGestureHandlerOptions); + /** + * LongPress gesture recognition success callback. + * + * @param { Callback } event + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + onAction(event: Callback): this; + /** + * The LongPress gesture is successfully recognized. When the finger is lifted, the callback is triggered. + * + * @param { Callback } event + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + onActionEnd(event: Callback): this; + /** + * The LongPress gesture is successfully recognized and a callback is triggered when the touch cancel event is + * received. + * + * @param { Callback } event + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + onActionCancel(event: Callback): this; +} +/** + * Defines the PanGestureHandler options. + * + * @extends BaseHandlerOptions + * @interface PanGestureHandlerOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export interface PanGestureHandlerOptions extends BaseHandlerOptions { + /** + * Indicates the hand index that triggers the pan. If the value is less than 1, the default value is used. + * The default value is 1. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + fingers?: number; + /** + * Indicates the move direction of the pan gesture. + * The default value is PanDirection.All. + * + * @type { ?PanDirection } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + direction?: PanDirection; + /** + * Indicates minimum move distance. + * The default value is 5vp. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + distance?: number; +} +/** + * Defines the PanGesture handler. + * + * @extends GestureHandler + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare class PanGestureHandler extends GestureHandler { + /** + * Constructor parameters. + * + * @param { PanGestureHandlerOptions } [options] + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + constructor(options?: PanGestureHandlerOptions); + /** + * Pan gesture recognition success callback. + * + * @param { Callback } event + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + onActionStart(event: Callback): this; + /** + * Callback when the Pan gesture is moving. + * + * @param { Callback } event + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + onActionUpdate(event: Callback): this; + /** + * The Pan gesture is successfully recognized. When the finger is lifted, the callback is triggered. + * + * @param { Callback } event + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + onActionEnd(event: Callback): this; + /** + * The Pan gesture is successfully recognized and a callback is triggered when the touch cancel event is received. + * + * @param { Callback } event + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + onActionCancel(event: Callback): this; +} +/** + * Defines the SwipeGestureHandler options. + * + * @extends BaseHandlerOptions + * @interface SwipeGestureHandlerOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export interface SwipeGestureHandlerOptions extends BaseHandlerOptions { + /** + * Indicates the hand index that triggers the swipe. If the value is less than 1, the default value is used. + * The default value is 1. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + fingers?: number; + /** + * Indicates the move direction of the swipe gesture. + * The default value is SwipeDirection.All. + * + * @type { ?SwipeDirection } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + direction?: SwipeDirection; + /** + * Indicates minimum move speed. + * The default value is 100vp/s. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + speed?: number; +} +/** + * Defines the SwipeGesture handler. + * + * @extends GestureHandler + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare class SwipeGestureHandler extends GestureHandler { + /** + * Constructor parameters. + * + * @param { SwipeGestureHandlerOptions } [options] + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + constructor(options?: SwipeGestureHandlerOptions); + /** + * Swipe gesture recognition success callback. + * + * @param { Callback } event + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + onAction(event: Callback): this; +} +/** + * Defines the PinchGestureHandler options. + * + * @extends BaseHandlerOptions + * @interface PinchGestureHandlerOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export interface PinchGestureHandlerOptions extends BaseHandlerOptions { + /** + * Indicates the hand index that triggers the pinch. If the value is less than 1, the default value is used. + * The default value is 1. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + fingers?: number; + /** + * Indicates minimum pinch move distance. + * The default value is 5vp. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + distance?: number; +} +/** + * Defines the PinchGesture handler. + * + * @extends GestureHandler + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare class PinchGestureHandler extends GestureHandler { + /** + * Constructor parameters. + * + * @param { PinchGestureHandlerOptions } [options] + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + constructor(options?: PinchGestureHandlerOptions); + /** + * Pinch gesture recognition success callback. + * + * @param { Callback } event + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + onActionStart(event: Callback): this; + /** + * Callback when the Pinch gesture is moving. + * + * @param { Callback } event + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + onActionUpdate(event: Callback): this; + /** + * The Pinch gesture is successfully recognized. When the finger is lifted, the callback is triggered. + * + * @param { Callback } event + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + onActionEnd(event: Callback): this; + /** + * The Pinch gesture is successfully recognized and a callback is triggered when the touch cancel event is received. + * + * @param { Callback } event + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + onActionCancel(event: Callback): this; +} +/** + * Defines the RotationGestureHandler options. + * + * @extends BaseHandlerOptions + * @interface RotationGestureHandlerOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export interface RotationGestureHandlerOptions extends BaseHandlerOptions { + /** + * Indicates the hand index that triggers the rotation. If the value is less than 1, the default value is used. + * The default value is 1. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + fingers?: number; + /** + * Indicates minimum rotate angle. + * The default value is 1deg. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + angle?: number; +} +/** + * Defines the RotationGesture handler. + * + * @extends GestureHandler + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare class RotationGestureHandler extends GestureHandler { + /** + * Constructor parameters. + * + * @param { RotationGestureHandlerOptions } [options] + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + constructor(options?: RotationGestureHandlerOptions); + /** + * Rotation gesture recognition success callback. + * + * @param { Callback } event + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + onActionStart(event: Callback): this; + /** + * Callback when the Rotation gesture is moving. + * + * @param { Callback } event + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + onActionUpdate(event: Callback): this; + /** + * The Rotation gesture is successfully recognized. When the finger is lifted, the callback is triggered. + * + * @param { Callback } event + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + onActionEnd(event: Callback): this; + /** + * The Rotation gesture is successfully recognized and a callback is triggered when the touch cancel event is + * received. + * + * @param { Callback } event + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + onActionCancel(event: Callback): this; +} +/** + * Defines the GestureGroupGestureHandler options. + * + * @interface GestureGroupGestureHandlerOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export interface GestureGroupGestureHandlerOptions { + /** + * Indicates the mode of gesture group. + * + * @type { GestureMode } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + mode: GestureMode; + /** + * Indicates the gestures included in the gesture group. + * + * @type { GestureHandler[] } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + gestures: GestureHandler[]; +} +/** + * Defines the GestureGroup handler. + * + * @extends GestureHandler + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare class GestureGroupHandler extends GestureHandler { + /** + * Constructor parameters. + * + * @param { GestureGroupGestureHandlerOptions } [options] + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + constructor(options?: GestureGroupGestureHandlerOptions); + /** + * The GestureGroup gesture is successfully recognized and a callback is triggered when the touch cancel event is + * received. + * + * @param { Callback } event + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + onCancel(event: Callback): this; +} +/** + * Creating an Object + * + * @enum { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare enum GesturePriority { + /** + * The normal gesture priority. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + NORMAL = 0, + /** + * The high gesture priority. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + PRIORITY = 1 +} +/** + * Creating an Object + * + * @enum { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare enum GestureRecognizerState { + /** + * Ready state. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + READY = 0, + /** + * Detecting state. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + DETECTING = 1, + /** + * Pending state. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + PENDING = 2, + /** + * Blocked state. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + BLOCKED = 3, + /** + * Successful state. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + SUCCESSFUL = 4, + /** + * Failed state. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + FAILED = 5 +} +/** + * Defines the scrollable target information. + * + * @extends EventTargetInfo + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare class ScrollableTargetInfo extends EventTargetInfo { + /** + * Returns whether the scrollable component is at begin. + * + * @returns { boolean } - true is at begin, false is not at begin + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + isBegin(): boolean; + /** + * Returns whether the scrollable component is at end. + * + * @returns { boolean } - true is at end, false is not at end + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + isEnd(): boolean; +} +/** + * Defines the event target information. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare class EventTargetInfo { + /** + * Returns the component's inspector id. + * + * @returns { string } - the inspector id of the component + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + getId(): string; +} +/** + * Defines the gesture recognizer. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare class GestureRecognizer { + /** + * Returns the gesture's tag. + * + * @returns { string } - the gesture's tag + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + getTag(): string; + /** + * Returns the gesture's type. + * + * @returns { GestureControl.GestureType } - the gesture's type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + getType(): GestureControl.GestureType; + /** + * Returns whether the gesture recognizer is built in recognizer. + * + * @returns { boolean } - true is built in recognizer, false is not built in recognizer + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + isBuiltIn(): boolean; + /** + * set the enabled state of the gesture recognizer. + * + * @param { boolean } isEnabled - Indicates the enabled state. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + setEnabled(isEnabled: boolean): void; + /** + * Returns whether the gesture recognizer is enabled. + * + * @returns { boolean } - true is enabled, false is not enabled + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + isEnabled(): boolean; + /** + * Returns the gesture recognizer's state. + * + * @returns { GestureRecognizerState } - the gesture recognizer's state + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + getState(): GestureRecognizerState; + /** + * Returns the event target information of the component. + * + * @returns { EventTargetInfo } - the event target information of the component. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + getEventTargetInfo(): EventTargetInfo; + /** + * Returns whether the gesture recognizer is valid. + * + * @returns { boolean } - true is valid, false is invalid + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + isValid(): boolean; + /** + * Returns the tap gesture's finger count. + * + * @returns { number } - the finger count of the tap gesture. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + getFingerCount(): number; + /** + * Returns the tap gesture's limitFingerCount. + * + * @returns { boolean } - the limitFingerCount of the tap gesture. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + isFingerCountLimit(): boolean; +} +/** + * Defines the tap gesture recognizer. + * + * @extends GestureRecognizer + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare class TapRecognizer extends GestureRecognizer { + /** + * Returns the tap gesture's count. + * + * @returns { number } - the count of the tap gesture. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + getTapCount(): number; +} +/** + * Defines the long press gesture recognizer. + * + * @extends GestureRecognizer + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare class LongPressRecognizer extends GestureRecognizer { + /** + * Returns the long press gesture's repeat state. + * + * @returns { boolean } - the repeat state of the long press gesture. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + isRepeat(): boolean; + /** + * Returns the long press gesture's duration. + * The unit is ms. + * + * @returns { number } - the duration of the long press gesture. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + getDuration(): number; +} +/** + * Defines the swipe gesture recognizer. + * + * @extends GestureRecognizer + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare class SwipeRecognizer extends GestureRecognizer { + /** + * Returns the swipe gesture's speed. + * The unit is vp/s. + * + * @returns { number } - the velocity threshold of the swipe gesture. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + getVelocityThreshold(): number; + /** + * Returns the swipe gesture's direction. + * + * @returns { SwipeDirection } - the direction of the swipe gesture. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + getDirection(): SwipeDirection; +} +/** + * Defines the pinch gesture recognizer. + * + * @extends GestureRecognizer + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare class PinchRecognizer extends GestureRecognizer { + /** + * Returns the pinch gesture's distance. + * The unit is vp. + * + * @returns { number } - the distance of the pinch gesture. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + getDistance(): number; +} +/** + * Defines the rotation gesture recognizer. + * + * @extends GestureRecognizer + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare class RotationRecognizer extends GestureRecognizer { + /** + * Returns the rotation gesture's angle. + * + * @returns { number } - the angle of the rotation gesture. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + getAngle(): number; +} +/** + * Defines the gesture recognizer. + * + * @extends GestureRecognizer + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare class PanRecognizer extends GestureRecognizer { + /** + * Returns the the pan gesture options of the recognizer. + * + * @returns { PanGestureOptions } - Pan gesture options + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + getPanGestureOptions(): PanGestureOptions; +} diff --git a/api/arkui/component/toolbar.static.d.ets b/api/arkui/component/toolbar.static.d.ets new file mode 100644 index 0000000000000000000000000000000000000000..337350c6198b34d548584144369392391581d102 --- /dev/null +++ b/api/arkui/component/toolbar.static.d.ets @@ -0,0 +1,101 @@ +/* + * Copyright (c) 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 Defines toolbar attributes. + * @kit ArkUI + * @arkts 1.2 + */ +/** + * Declare the placement of the toolbar item. + * + * @enum { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +declare enum ToolBarItemPlacement { + /** + * Place toolbar item at the leading of top bar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + TOP_BAR_LEADING = 0, + /** + * Place toolbar item at the trailing of top bar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + TOP_BAR_TRAILING = 1 +} +/** + * ToolBarItem constructor options. + * + * @interface ToolBarItemOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +interface ToolBarItemOptions { + /** + * Vertical layout element spacing. + * + * @type { ?ToolBarItemPlacement } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + placement?: ToolBarItemPlacement; +} +/** + * Defines the ToolBarItem Component. + * + * @interface ToolBarItemInterface + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +interface ToolBarItemInterface { + /** + * Set the options. + * + * @param { ToolBarItemOptions } [options] - column options + * @returns { ToolBarItemAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + (options?: ToolBarItemOptions): ToolBarItemAttribute; +} +/** + * Defines the ToolBarItem component attribute functions. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +declare class ToolBarItemAttribute { +} +/** + * Defines ToolBarItem Component. + * + * @type { ToolBarItemInterface } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +declare const ToolBarItem: ToolBarItemInterface; +/** + * Defines ToolBarItem Component instance. + * + * @type { ToolBarItemAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +declare const ToolBarItemInstance: ToolBarItemAttribute;