!11770 swiper提供设置动态帧率的接口

Merge pull request !11770 from ShihaoWang/0603
This commit is contained in:
openharmony_ci 2024-06-06 15:16:47 +00:00 committed by Gitee
commit a45dac3628
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -1802,6 +1802,55 @@ export interface AtomicServiceBar {
setIconColor(color: Nullable< Color | number | string>): void;
}
/**
* Represents a dynamic synchronization scene.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since 12
*/
export class DynamicSyncScene {
/**
* Sets the FrameRateRange of the DynamicSyncScene.
*
* @param { ExpectedFrameRateRange } range - The range of frameRate.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since 12
*/
setFrameRateRange(range: ExpectedFrameRateRange): void;
/**
* Gets the FrameRateRange of the DynamicSyncScene.
*
* @returns { ExpectedFrameRateRange } The range of frameRate.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since 12
*/
getFrameRateRange(): ExpectedFrameRateRange;
}
/**
* Represents a dynamic synchronization scene of Swiper.
*
* @extends DynamicSyncScene
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since 12
*/
export class SwiperDynamicSyncScene extends DynamicSyncScene {
/**
* Type of the SwiperDynamicSyncSceneType.
* @type { SwiperDynamicSyncSceneType }
* @readonly
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since 12
*/
readonly type: SwiperDynamicSyncSceneType;
}
/**
* class DragController
* @syscap SystemCapability.ArkUI.ArkUI.Full
@ -2779,6 +2828,17 @@ export class UIContext {
* @since 12
*/
postDelayedFrameCallback(frameCallback: FrameCallback, delayTime: number): void;
/**
* Require DynamicSyncScene by id.
*
* @param { string } id - The id of DynamicSyncScene.
* @returns { Array<DynamicSyncScene>} The instance of SwiperDynamicSyncScene.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since 12
*/
requireDynamicSyncScene(id: string): Array<DynamicSyncScene>;
}
/**
@ -2810,3 +2870,31 @@ export const enum KeyboardAvoidMode {
*/
RESIZE = 1
}
/**
* Enum of SwiperDynamicSyncSceneType
*
* @enum { number } SwiperDynamicSyncSceneType
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since 12
*/
export const enum SwiperDynamicSyncSceneType {
/**
* Scene type is GESTURE.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since 12
*/
GESTURE = 0,
/**
* Scene type is ANIMATION.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @atomicservice
* @since 12
*/
ANIMATION = 1
}