1e0dac50fSopenharmony_ci/* 2e0dac50fSopenharmony_ci * Copyright (c) 2022 Huawei Device Co., Ltd. 3e0dac50fSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"); 4e0dac50fSopenharmony_ci * you may not use this file except in compliance with the License. 5e0dac50fSopenharmony_ci * You may obtain a copy of the License at 6e0dac50fSopenharmony_ci * 7e0dac50fSopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 8e0dac50fSopenharmony_ci * 9e0dac50fSopenharmony_ci * Unless required by applicable law or agreed to in writing, software 10e0dac50fSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 11e0dac50fSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12e0dac50fSopenharmony_ci * See the License for the specific language governing permissions and 13e0dac50fSopenharmony_ci * limitations under the License. 14e0dac50fSopenharmony_ci */ 15e0dac50fSopenharmony_ci 16e0dac50fSopenharmony_ci#ifndef OHOS_ABILITY_RUNTIME_WINDOW_INFO_H 17e0dac50fSopenharmony_ci#define OHOS_ABILITY_RUNTIME_WINDOW_INFO_H 18e0dac50fSopenharmony_ci 19e0dac50fSopenharmony_ci#include "parcel.h" 20e0dac50fSopenharmony_ci#include "context.h" 21e0dac50fSopenharmony_ci 22e0dac50fSopenharmony_cinamespace OHOS { 23e0dac50fSopenharmony_cinamespace AAFwk { 24e0dac50fSopenharmony_cienum class TransitionReason : uint32_t { 25e0dac50fSopenharmony_ci MINIMIZE = 0, 26e0dac50fSopenharmony_ci CLOSE, 27e0dac50fSopenharmony_ci ABILITY_TRANSITION, 28e0dac50fSopenharmony_ci BACK_TRANSITION, 29e0dac50fSopenharmony_ci}; 30e0dac50fSopenharmony_cistruct AbilityTransitionInfo : public Parcelable { 31e0dac50fSopenharmony_ci std::string bundleName_; 32e0dac50fSopenharmony_ci std::string abilityName_; 33e0dac50fSopenharmony_ci uint32_t mode_ = 0; 34e0dac50fSopenharmony_ci std::vector<AppExecFwk::SupportWindowMode> windowModes_; 35e0dac50fSopenharmony_ci sptr<IRemoteObject> abilityToken_ = nullptr; 36e0dac50fSopenharmony_ci uint64_t displayId_ = 0; 37e0dac50fSopenharmony_ci bool isShowWhenLocked_ = false; 38e0dac50fSopenharmony_ci bool isRecent_ = false; 39e0dac50fSopenharmony_ci double maxWindowRatio_; 40e0dac50fSopenharmony_ci double minWindowRatio_; 41e0dac50fSopenharmony_ci uint32_t maxWindowWidth_; 42e0dac50fSopenharmony_ci uint32_t minWindowWidth_; 43e0dac50fSopenharmony_ci uint32_t maxWindowHeight_; 44e0dac50fSopenharmony_ci uint32_t minWindowHeight_; 45e0dac50fSopenharmony_ci TransitionReason reason_ = TransitionReason::ABILITY_TRANSITION; 46e0dac50fSopenharmony_ci int32_t missionId_ = -1; 47e0dac50fSopenharmony_ci AppExecFwk::DisplayOrientation orientation_ = AppExecFwk::DisplayOrientation::UNSPECIFIED; 48e0dac50fSopenharmony_ci uint32_t apiCompatibleVersion_ = 0; 49e0dac50fSopenharmony_ci 50e0dac50fSopenharmony_ci virtual bool Marshalling(Parcel& parcel) const override 51e0dac50fSopenharmony_ci { 52e0dac50fSopenharmony_ci return true; 53e0dac50fSopenharmony_ci } 54e0dac50fSopenharmony_ci 55e0dac50fSopenharmony_ci bool WriteWindowInfo(Parcel& parcel) const 56e0dac50fSopenharmony_ci { 57e0dac50fSopenharmony_ci return true; 58e0dac50fSopenharmony_ci } 59e0dac50fSopenharmony_ci 60e0dac50fSopenharmony_ci static AbilityTransitionInfo* Unmarshalling(Parcel& parcel) 61e0dac50fSopenharmony_ci { 62e0dac50fSopenharmony_ci return nullptr; 63e0dac50fSopenharmony_ci } 64e0dac50fSopenharmony_ci}; 65e0dac50fSopenharmony_ci} // namespace AAFwk 66e0dac50fSopenharmony_ci} // namespace OHOS 67e0dac50fSopenharmony_ci#endif // OHOS_ABILITY_RUNTIME_WINDOW_INFO_H 68