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_MANAGER_SERVICE_HANDLER_H 17 #define OHOS_ABILITY_RUNTIME_WINDOW_MANAGER_SERVICE_HANDLER_H 18 19 #ifdef SUPPORT_GRAPHICS 20 #include "iremote_broker.h" 21 #include "pixel_map.h" 22 #include "window_info.h" 23 24 namespace OHOS { 25 namespace AAFwk { 26 /** 27 * @class IWindowManagerServiceHandler 28 * Window Manager Service Handler, use to call methods of WMS 29 */ 30 class IWindowManagerServiceHandler : public OHOS::IRemoteBroker { 31 public: 32 DECLARE_INTERFACE_DESCRIPTOR(u"ohos.aafwk.WindowManagerServiceHandler"); 33 34 virtual void NotifyWindowTransition(sptr<AbilityTransitionInfo> fromInfo, sptr<AbilityTransitionInfo> toInfo) = 0; 35 36 virtual int32_t GetFocusWindow(sptr<IRemoteObject>& abilityToken) = 0; 37 38 virtual void StartingWindow(sptr<AbilityTransitionInfo> info, 39 std::shared_ptr<Media::PixelMap> pixelMap, uint32_t bgColor) = 0; 40 41 virtual void StartingWindow(sptr<AbilityTransitionInfo> info, std::shared_ptr<Media::PixelMap> pixelMap) = 0; 42 43 virtual void CancelStartingWindow(sptr<IRemoteObject> abilityToken) = 0; 44 45 enum WMSCmd { 46 // ipc id for NotifyWindowTransition 47 ON_NOTIFY_WINDOW_TRANSITION, 48 49 // ipc id for GetFocusWindow 50 ON_GET_FOCUS_ABILITY, 51 52 // ipc id for Cold StartingWindow 53 ON_COLD_STARTING_WINDOW, 54 55 // ipc id for Hot StartingWindow 56 ON_HOT_STARTING_WINDOW, 57 58 // ipc id for CancelStartingWindow 59 ON_CANCEL_STARTING_WINDOW, 60 }; 61 }; 62 } // namespace AAFwk 63 } // namespace OHOS 64 #endif 65 #endif // OHOS_ABILITY_RUNTIME_WINDOW_MANAGER_SERVICE_HANDLER_H 66