1 /*
2  * Copyright (c) 2023 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 FOUNDATION_ACE_FRAMEWORKS_CORE_COMPONENTS_NG_PATTERN_FOLDER_EVENT_INFO_H
17 #define FOUNDATION_ACE_FRAMEWORKS_CORE_COMPONENTS_NG_PATTERN_FOLDER_EVENT_INFO_H
18 
19 #include "core/common/display_info.h"
20 #include "core/event/ace_events.h"
21 
22 namespace OHOS::Ace::NG {
23 class ACE_EXPORT FolderEventInfo : public BaseEventInfo {
24     DECLARE_RELATIONSHIP_OF_CLASSES(FolderEventInfo, BaseEventInfo);
25 
26 public:
FolderEventInfo(FoldStatus foldStatus)27     FolderEventInfo(FoldStatus foldStatus) : BaseEventInfo("FolderStackInfo"), folderState_(foldStatus) {}
FolderEventInfo(FoldStatus foldStatus,bool intoHover,Rotation rotation,WindowMode windowMode)28     FolderEventInfo(FoldStatus foldStatus, bool intoHover, Rotation rotation, WindowMode windowMode)
29         : BaseEventInfo("FolderStackInfo"), folderState_(foldStatus), isHoverMode_(intoHover), appRotation_(rotation),
30           windowMode_(windowMode)
31     {}
32 
33     ~FolderEventInfo() = default;
34 
GetFolderState()35     FoldStatus GetFolderState() const
36     {
37         return folderState_;
38     }
IsHoverMode()39     bool IsHoverMode() const
40     {
41         return isHoverMode_;
42     }
43 
GetRotation()44     Rotation GetRotation() const
45     {
46         return appRotation_;
47     }
48 
GetWindowMode()49     WindowMode GetWindowMode() const
50     {
51         return windowMode_;
52     }
53 
54 private:
55     FoldStatus folderState_ = FoldStatus::UNKNOWN;
56     bool isHoverMode_ = false;
57     Rotation appRotation_ = Rotation::ROTATION_0;
58     WindowMode windowMode_ = WindowMode::WINDOW_MODE_UNDEFINED;
59 };
60 } // namespace OHOS::Ace::NG
61 
62 #endif // FOUNDATION_ACE_FRAMEWORKS_CORE_COMPONENTS_NG_PATTERN_FOLDER_EVENT_INFO_H
63