1 /* 2 * Copyright (c) 2021-2022 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #ifndef FRAMEWORKS_WM_TEST_UT_MOCK_RS_IWINDOW_ANIMATION_CONTROLLER_H 17 #define FRAMEWORKS_WM_TEST_UT_MOCK_RS_IWINDOW_ANIMATION_CONTROLLER_H 18 #include <gmock/gmock.h> 19 20 #include <rs_iwindow_animation_controller.h> 21 #include <rs_window_animation_finished_callback.h> 22 #include <rs_window_animation_target.h> 23 24 namespace OHOS { 25 namespace Rosen { 26 class MockRSIWindowAnimationController : public RSIWindowAnimationController { 27 public: MockRSIWindowAnimationController()28 MockRSIWindowAnimationController() {}; 29 MOCK_METHOD3(OnStartApp, void(StartingAppType type, const sptr<RSWindowAnimationTarget>& startingWindowTarget, 30 const sptr<RSIWindowAnimationFinishedCallback>& finishedCallback)); 31 MOCK_METHOD3(OnAppTransition, void(const sptr<RSWindowAnimationTarget>& from, 32 const sptr<RSWindowAnimationTarget>& to, const sptr<RSIWindowAnimationFinishedCallback>& finishedCallback)); 33 MOCK_METHOD3(OnAppBackTransition, void(const sptr<RSWindowAnimationTarget>& from, 34 const sptr<RSWindowAnimationTarget>& to, const sptr<RSIWindowAnimationFinishedCallback>& finishedCallback)); 35 36 MOCK_METHOD2(OnMinimizeWindow, void(const sptr<RSWindowAnimationTarget>& minimizingWindow, 37 const sptr<RSIWindowAnimationFinishedCallback>& finishedCallback)); 38 MOCK_METHOD2(OnMinimizeAllWindow, void(std::vector<sptr<RSWindowAnimationTarget>> minimizingWindows, 39 const sptr<RSIWindowAnimationFinishedCallback>& finishedCallback)); 40 MOCK_METHOD2(OnCloseWindow, void(const sptr<RSWindowAnimationTarget>& closingWindow, 41 const sptr<RSIWindowAnimationFinishedCallback>& finishedCallback)); 42 43 MOCK_METHOD1(OnScreenUnlock, void(const sptr<RSIWindowAnimationFinishedCallback>& finishedCallback)); 44 MOCK_METHOD2(OnWindowAnimationTargetsUpdate, void(const sptr<RSWindowAnimationTarget>& fullScreenWindowTarget, 45 const std::vector<sptr<RSWindowAnimationTarget>>& floatingWindowTargets)); 46 MOCK_METHOD1(OnWallpaperUpdate, void(const sptr<RSWindowAnimationTarget>& wallpaperTarget)); 47 MOCK_METHOD0(AsObject, sptr<IRemoteObject>()); 48 }; 49 } 50 } // namespace OHOS 51 52 #endif // FRAMEWORKS_WM_TEST_UT_MOCK_RS_IWINDOW_ANIMATION_CONTROLLER_H 53