* Copyright (c) Huawei Device Co., Ltd. 2024-2025. All rights reserved.
* 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.
*/
* back手势识别失败的原因
*/
export enum GestureFailReason {
INVALID_ANGLE = 'invalid_angle',
TIMEOUT = 'timeout',
CANCEL_FROM_USER = 'cancel_from_user',
CANCEL_FROM_SYSTEM = 'cancel_from_system'
}
* back热区视图的回调
*/
export interface BackEventViewModelCallBack {
onRecognizeFail(reason: GestureFailReason): void;
onBackGestureStart(event: GestureEvent, isLeftGesture: boolean, startY: number): void;
onBackGestureUpdate(isLeftGesture: boolean, event: GestureEvent, processAnim: number): void;
onBackGestureEnd(): void;
onBackGestureCancel(): void;
onBackGestureCancelForUser(): void;
onSendClickEventTo(downEvent: TouchEvent, upEvent: TouchEvent): void;
onSendGestureBackTo(isLeftArea: boolean, event: GestureEvent): void;
}