16e80583aSopenharmony_ci/**
26e80583aSopenharmony_ci * Copyright (c) 2022-2022 Huawei Device Co., Ltd.
36e80583aSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
46e80583aSopenharmony_ci * you may not use this file except in compliance with the License.
56e80583aSopenharmony_ci * You may obtain a copy of the License at
66e80583aSopenharmony_ci *
76e80583aSopenharmony_ci *     http://www.apache.org/licenses/LICENSE-2.0
86e80583aSopenharmony_ci *
96e80583aSopenharmony_ci * Unless required by applicable law or agreed to in writing, software
106e80583aSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
116e80583aSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
126e80583aSopenharmony_ci * See the License for the specific language governing permissions and
136e80583aSopenharmony_ci * limitations under the License.
146e80583aSopenharmony_ci */
156e80583aSopenharmony_ci
166e80583aSopenharmony_ciimport { Log } from '../utils/Log';
176e80583aSopenharmony_ci
186e80583aSopenharmony_ciconst TAG = 'BaseRemoteAnimationHandler';
196e80583aSopenharmony_ci
206e80583aSopenharmony_ciinterface appIconInfo {
216e80583aSopenharmony_ci    appIconSize: number,
226e80583aSopenharmony_ci    appIconPositionX: number,
236e80583aSopenharmony_ci    appIconPositionY: number
246e80583aSopenharmony_ci}
256e80583aSopenharmony_ci
266e80583aSopenharmony_ci/**
276e80583aSopenharmony_ci * remote animation base class
286e80583aSopenharmony_ci */
296e80583aSopenharmony_ciexport abstract class BaseRemoteAnimationHandler {
306e80583aSopenharmony_ci    public mAppIconSize: number = 0;
316e80583aSopenharmony_ci    public mAppIconPositionX: number = 0;
326e80583aSopenharmony_ci    public mAppIconPositionY: number = 0;
336e80583aSopenharmony_ci    public mAppIconHeight: number = 0;
346e80583aSopenharmony_ci
356e80583aSopenharmony_ci    constructor() {
366e80583aSopenharmony_ci    }
376e80583aSopenharmony_ci
386e80583aSopenharmony_ci    /**
396e80583aSopenharmony_ci     * set app icon size
406e80583aSopenharmony_ci     *
416e80583aSopenharmony_ci     * @param appIconSize appIconSize
426e80583aSopenharmony_ci    */
436e80583aSopenharmony_ci    public setAppIconSize(appIconSize: number, appIconHeight?: number): void {
446e80583aSopenharmony_ci        this.mAppIconHeight = appIconHeight;
456e80583aSopenharmony_ci        this.mAppIconSize = appIconSize;
466e80583aSopenharmony_ci        Log.showDebug(TAG, `setAppIconSize appIconSize is ${appIconSize} , appIconHeight is ${appIconHeight}`);
476e80583aSopenharmony_ci    }
486e80583aSopenharmony_ci
496e80583aSopenharmony_ci    /**
506e80583aSopenharmony_ci     * calculate app icon position.
516e80583aSopenharmony_ci     */
526e80583aSopenharmony_ci    protected abstract calculateAppIconPosition(): void;
536e80583aSopenharmony_ci
546e80583aSopenharmony_ci    /**
556e80583aSopenharmony_ci     * set app icon info.
566e80583aSopenharmony_ci     */
576e80583aSopenharmony_ci    public setAppIconInfo(): void {
586e80583aSopenharmony_ci        this.calculateAppIconPosition();
596e80583aSopenharmony_ci        Log.showDebug(TAG, `setAppIconInfo appIconSize is ${this.mAppIconSize} , appIconHeight is ${this.mAppIconHeight} ,
606e80583aSopenharmony_ci      appIconPositionX ${this.mAppIconPositionX} , appIconPositionY ${this.mAppIconPositionY}`);
616e80583aSopenharmony_ci    }
626e80583aSopenharmony_ci}
63