1e0dac50fSopenharmony_ci/* 2e0dac50fSopenharmony_ci * Copyright (c) 2021-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 FOUNDATION_DMSERVER_DISPLAY_MANAGER_SERVICE_INNER_H 17e0dac50fSopenharmony_ci#define FOUNDATION_DMSERVER_DISPLAY_MANAGER_SERVICE_INNER_H 18e0dac50fSopenharmony_ci 19e0dac50fSopenharmony_ci#include <vector> 20e0dac50fSopenharmony_ci 21e0dac50fSopenharmony_ci#include <pixel_map.h> 22e0dac50fSopenharmony_ci#include <system_ability.h> 23e0dac50fSopenharmony_ci 24e0dac50fSopenharmony_ci#include "abstract_display.h" 25e0dac50fSopenharmony_ci#include "cutout_info.h" 26e0dac50fSopenharmony_ci#include "display_change_listener.h" 27e0dac50fSopenharmony_ci#include "singleton_delegator.h" 28e0dac50fSopenharmony_ci#include "wm_single_instance.h" 29e0dac50fSopenharmony_ci#include "window_info_queried_listener.h" 30e0dac50fSopenharmony_ci 31e0dac50fSopenharmony_cinamespace OHOS::Rosen { 32e0dac50fSopenharmony_ciclass DisplayManagerServiceInner { 33e0dac50fSopenharmony_ciWM_DECLARE_SINGLE_INSTANCE(DisplayManagerServiceInner); 34e0dac50fSopenharmony_ci 35e0dac50fSopenharmony_cipublic: 36e0dac50fSopenharmony_ci std::vector<sptr<DisplayInfo>> GetAllDisplays() const; 37e0dac50fSopenharmony_ci DisplayId GetDefaultDisplayId() const; 38e0dac50fSopenharmony_ci sptr<DisplayInfo> GetDefaultDisplay() const; 39e0dac50fSopenharmony_ci sptr<DisplayInfo> GetDisplayById(DisplayId displayId) const; 40e0dac50fSopenharmony_ci std::vector<DisplayId> GetAllDisplayIds() const; 41e0dac50fSopenharmony_ci sptr<ScreenInfo> GetScreenInfoByDisplayId(DisplayId displayId) const; 42e0dac50fSopenharmony_ci ScreenId GetScreenGroupIdByDisplayId(DisplayId displayId) const; 43e0dac50fSopenharmony_ci sptr<SupportedScreenModes> GetScreenModesByDisplayId(DisplayId displayId) const; 44e0dac50fSopenharmony_ci std::shared_ptr<Media::PixelMap> GetDisplaySnapshot(DisplayId displayId, DmErrorCode* errorCode = nullptr) const; 45e0dac50fSopenharmony_ci void UpdateRSTree(DisplayId displayId, DisplayId parentDisplayId, std::shared_ptr<RSSurfaceNode>& surfaceNode, 46e0dac50fSopenharmony_ci bool isAdd, bool isMultiDisplay); 47e0dac50fSopenharmony_ci void RegisterDisplayChangeListener(sptr<IDisplayChangeListener> listener); 48e0dac50fSopenharmony_ci DMError SetOrientationFromWindow(DisplayId displayId, Orientation orientation, bool withAnimation = true); 49e0dac50fSopenharmony_ci bool SetRotationFromWindow(DisplayId displayId, Rotation targetRotation, bool withAnimation = true); 50e0dac50fSopenharmony_ci void SetGravitySensorSubscriptionEnabled(); 51e0dac50fSopenharmony_ci void RegisterWindowInfoQueriedListener(const sptr<IWindowInfoQueriedListener>& listener); 52e0dac50fSopenharmony_ci sptr<CutoutInfo> GetCutoutInfo(DisplayId displayId) const; 53e0dac50fSopenharmony_ci void NotifyPrivateWindowStateChanged(bool hasPrivate); 54e0dac50fSopenharmony_ci}; 55e0dac50fSopenharmony_ci} // namespace OHOS::Rosen 56e0dac50fSopenharmony_ci 57e0dac50fSopenharmony_ci#endif // FOUNDATION_DMSERVER_DISPLAY_MANAGER_SERVICE_H