1/* 2 * Copyright (c) 2025 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 16sequenceable OHOS.IRemoteObject; 17sequenceable OHOS.Media.PixelMap; 18sequenceable OHOS.Rosen.DisplayInfo; 19sequenceable OHOS.Rosen.DmVirtualScreenOption; 20sequenceable OHOS.Rosen.CutoutInfo; 21sequenceable OHOS.Rosen.DmRsSurfaceNode; 22sequenceable OHOS.Rosen.ScreenInfo; 23sequenceable OHOS.Rosen.ScreenGroupInfo; 24sequenceable dm_common..OHOS.Rosen.Point; 25sequenceable dm_common..OHOS.Rosen.DisplayPhysicalResolution; 26interface OHOS.IBufferProducer; 27interface zidl..OHOS.Rosen.IDisplayManagerAgent; 28 29interface OHOS.Rosen.IDisplayManager { 30 void GetDefaultDisplayInfo([out] sptr<DisplayInfo> displayInfo); 31 void GetDisplayInfoById([in] unsigned long displayId, [out] sptr<DisplayInfo> displayInfo); 32 void GetVisibleAreaDisplayInfoById([in] unsigned long displayId, [out] sptr<DisplayInfo> displayInfo); 33 void GetDisplayInfoByScreen([in] unsigned long screenId, [out] sptr<DisplayInfo> displayInfo); 34 void CreateVirtualScreen([in] DmVirtualScreenOption virtualOption, [in] IRemoteObject displayManagerAgent, 35 [out] unsigned long screenId); 36 void CreateVirtualScreen([in] DmVirtualScreenOption virtualOption, [in] IRemoteObject displayManagerAgent, 37 [out] unsigned long screenId, [in] IBufferProducer surface); 38 void DestroyVirtualScreen([in] unsigned long screenId, [out] int dmError); 39 void SetVirtualScreenSurface([in] unsigned long screenId, [in] IBufferProducer surface, [out] int dmError); 40 void SetOrientation([in] unsigned long screenId, [in] unsigned int orientation, [out] int dmError); 41 void GetDisplaySnapshot([in] unsigned long displayId, [out] int errorCode, [in] boolean isUseDma, 42 [in] boolean isCaptureFullOfScreen, [out] sharedptr<PixelMap> pixelMap); 43 void GetScreenSupportedColorGamuts([in] unsigned long screenId, [out] unsigned int[] colorGamuts, 44 [out] int dmError); 45 void GetScreenColorGamut([in] unsigned long screenId, [out] unsigned int colorGamut, [out] int dmError); 46 void SetScreenColorGamut([in] unsigned long screenId, [in] int colorGamutIdx, [out] int dmError); 47 void GetScreenGamutMap([in] unsigned long screenId, [out] unsigned int gamutMap, [out] int dmError); 48 void SetScreenGamutMap([in] unsigned long screenId, [in] unsigned int gamutMap, [out] int dmError); 49 void SetScreenColorTransform([in] unsigned long screenId); 50 void RegisterDisplayManagerAgent([in] IDisplayManagerAgent displayManagerAgent, [in] unsigned int type, 51 [out] int dmError); 52 void UnregisterDisplayManagerAgent([in] IDisplayManagerAgent displayManagerAgent, [in] unsigned int type, 53 [out] int dmError); 54 void WakeUpBegin([in] unsigned int reason, [out] boolean isSucc); 55 void WakeUpEnd([out] boolean isSucc); 56 void SuspendBegin([in] unsigned int reason, [out] boolean isSucc); 57 void SuspendEnd([out] boolean isSucc); 58 void SetScreenPowerForAll([in] unsigned int screenPowerState, [in] unsigned int reason, [out] boolean isSucc); 59 void SetSpecifiedScreenPower([in] unsigned long screenId, [in] unsigned int screenPowerState, 60 [in] unsigned int reason, [out] boolean isSucc); 61 void GetScreenPower([in] unsigned long dmsScreenId, [out] unsigned int screenPowerState); 62 void SetDisplayState([in] unsigned int displayState, [out] boolean isSucc); 63 void GetDisplayState([in] unsigned long displayId, [out] unsigned int displayState); 64 void TryToCancelScreenOff([out] boolean isSucc); 65 void GetAllDisplayIds([out] unsigned long[] displayIds); 66 void GetCutoutInfo([in] unsigned long displayId, [out] sptr<CutoutInfo> cutoutInfo); 67 void AddSurfaceNodeToDisplay([in] unsigned long displayId, [in] sharedptr<DmRsSurfaceNode> dmRsSurfaceNode, 68 [out] int dmError); 69 void RemoveSurfaceNodeFromDisplay([in] unsigned long displayId, [in] sharedptr<DmRsSurfaceNode> dmRsSurfaceNode, 70 [out] int dmError); 71 void HasPrivateWindow([in] unsigned long displayId, [out] boolean hasPrivateWindow, [out] int dmError); 72 void NotifyDisplayEvent([in] unsigned int displayEvent); 73 void SetFreeze([in] unsigned long[] displayIds, [in] boolean isFreeze, [out] boolean isSucc); 74 void MakeMirror([in] unsigned long mainScreenId, [in] unsigned long[] mirrorScreenId, 75 [out] unsigned long screenGroupId, [out] int dmError); 76 void StopMirror([in] unsigned long[] mirrorScreenIds, [out] int dmError); 77 void GetScreenInfoById([in] unsigned long screenId, [out] sptr<ScreenInfo> screenInfo); 78 void GetScreenGroupInfoById([in] unsigned long screenId, [out] sptr<ScreenGroupInfo> screenGroupInfo); 79 void GetAllScreenInfos([out] sptr<ScreenInfo>[] screenInfos, [out] int dmError); 80 void MakeExpand([in] unsigned long[] screenId, [in] Point[] startPoint, [out] unsigned long screenGroupId, 81 [out] int dmError); 82 void StopExpand([in] unsigned long[] expandScreenIds, [out] int dmError); 83 void RemoveVirtualScreenFromGroup([in] unsigned long[] screens); 84 void SetScreenActiveMode([in] unsigned long screenId, [in] unsigned int modeId, [out] int dmError); 85 void SetVirtualPixelRatio([in] unsigned long screenId, [in] float virtualPixelRatio, [out] int dmError); 86 void SetResolution([in] unsigned long screenId, [in] unsigned int width, [in] unsigned int height, 87 [in] float virtualPixelRatio, [out] int dmError); 88 void GetDensityInCurResolution([in] unsigned long screenId, [out] float virtualPixelRatio, [out] int dmError); 89 void IsScreenRotationLocked([out] boolean isLocked, [out] int dmError); 90 void SetScreenRotationLocked([in] boolean isLocked, [out] int dmError); 91 void SetScreenRotationLockedFromJs([in] boolean isLocked, [out] int dmError); 92 void GetAllDisplayPhysicalResolution([out] DisplayPhysicalResolution[] displayPhysicalResolutions); 93 void SetScreenBrightness([in] unsigned long screenId, [in] unsigned int level, [out] boolean isSucc); 94 void GetScreenBrightness([in] unsigned long screenId, [out] unsigned int level); 95 void SetVirtualScreenAsDefault([in] unsigned long screenId, [out] boolean isSucc); 96} 97