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 16package ohos.hdi.display.composer.v1_0; 17 18import ohos.hdi.display.composer.v1_0.DisplayComposerType; 19import ohos.hdi.display.composer.v1_0.IHotPlugCallback; 20import ohos.hdi.display.composer.v1_0.IVBlankCallback; 21import ohos.hdi.display.composer.v1_0.IRefreshCallback; 22 23sequenceable OHOS.HDI.Display.HdifdParcelable; 24sequenceable OHOS.HDI.Display.BufferHandleParcelable; 25 26interface IDisplayComposer { 27 RegHotPlugCallback([in] IHotPlugCallback cb); 28 GetDisplayCapability([in] unsigned int devId, [out] struct DisplayCapability info); 29 GetDisplaySupportedModes([in] unsigned int devId, [out] struct DisplayModeInfo[] modes); 30 GetDisplayMode([in] unsigned int devId, [out] unsigned int modeId); 31 SetDisplayMode([in] unsigned int devId, [in] unsigned int modeId); 32 GetDisplayPowerStatus([in] unsigned int devId, [out] enum DispPowerStatus status); 33 SetDisplayPowerStatus([in] unsigned int devId, [in] enum DispPowerStatus status); 34 GetDisplayBacklight([in] unsigned int devId, [out] unsigned int level); 35 SetDisplayBacklight([in] unsigned int devId, [in] unsigned int level); 36 GetDisplayProperty([in] unsigned int devId, [in] unsigned int id, [out] unsigned long value); 37 GetDisplayCompChange([in] unsigned int devId, [out] unsigned int[] layers, [out] int[] type); 38 SetDisplayClientCrop([in] unsigned int devId, [in] struct IRect rect); 39 SetDisplayClientDestRect([in] unsigned int devId, [in] struct IRect rect); 40 SetDisplayVsyncEnabled([in] unsigned int devId, [in] boolean enabled); 41 RegDisplayVBlankCallback([in] unsigned int devId, [in] IVBlankCallback cb); 42 GetDisplayReleaseFence([in] unsigned int devId, [out] unsigned int[] layers, [out] HdifdParcelable[] fences); 43 CreateVirtualDisplay([in] unsigned int width, [in] unsigned int height, [out] int format, [out] unsigned int devId); 44 DestroyVirtualDisplay([in] unsigned int devId); 45 SetVirtualDisplayBuffer([in] unsigned int devId, [in] BufferHandleParcelable buffer, [in] HdifdParcelable fence); 46 SetDisplayProperty([in] unsigned int devId, [in] unsigned int id, [in] unsigned long value); 47 CreateLayer([in] unsigned int devId, [in] struct LayerInfo layerInfo, [out] unsigned int layerId); 48 DestroyLayer([in] unsigned int devId, [in] unsigned int layerId); 49 /* func for smq transfer */ 50 InitCmdRequest([in] SharedMemQueue<int> request); 51 CmdRequest([in] unsigned int inEleCnt, [in] struct HdifdInfo[] inFds, [out] unsigned int outEleCnt, 52 [out] struct HdifdInfo[] outFds); 53 GetCmdReply([out] SharedMemQueue<int> reply); 54}