• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 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 OHOS_ABILITY_RUNTIME_WINDOW_INFO_H
17 #define OHOS_ABILITY_RUNTIME_WINDOW_INFO_H
18 
19 #include "parcel.h"
20 
21 namespace OHOS {
22 namespace AAFwk {
23 enum class TransitionReason : uint32_t {
24     MINIMIZE = 0,
25     CLOSE,
26     ABILITY_TRANSITION,
27     BACK_TRANSITION,
28 };
29 struct AbilityTransitionInfo : public Parcelable {
30     std::string bundleName_;
31     std::string abilityName_;
32     uint32_t mode_ = 0;
33     std::vector<AppExecFwk::SupportWindowMode> windowModes_;
34     sptr<IRemoteObject> abilityToken_ = nullptr;
35     uint64_t displayId_ = 0;
36     bool isShowWhenLocked_ = false;
37     bool isRecent_ = false;
38     double maxWindowRatio_;
39     double minWindowRatio_;
40     uint32_t maxWindowWidth_;
41     uint32_t minWindowWidth_;
42     uint32_t maxWindowHeight_;
43     uint32_t minWindowHeight_;
44     TransitionReason reason_ = TransitionReason::ABILITY_TRANSITION;
45     int32_t missionId_ = -1;
46 
MarshallingAbilityTransitionInfo47     virtual bool Marshalling(Parcel& parcel) const override
48     {
49         return true;
50     }
51 
WriteWindowInfoAbilityTransitionInfo52     bool WriteWindowInfo(Parcel& parcel) const
53     {
54         return true;
55     }
56 
UnmarshallingAbilityTransitionInfo57     static AbilityTransitionInfo* Unmarshalling(Parcel& parcel)
58     {
59         return nullptr;
60     }
61 };
62 } // namespace AAFwk
63 } // namespace OHOS
64 #endif // OHOS_ABILITY_RUNTIME_WINDOW_INFO_H
65