/* * Copyright (c) 2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package ohos.hdi.display.composer.v1_2; import ohos.hdi.display.composer.v1_1.IDisplayComposer; import ohos.hdi.display.composer.v1_0.DisplayComposerType; import ohos.hdi.display.composer.v1_2.DisplayComposerType; import ohos.hdi.display.composer.v1_2.IVBlankIdleCallback; sequenceable OHOS.HDI.Display.HdifdParcelable; interface IDisplayComposer extends ohos.hdi.display.composer.v1_1.IDisplayComposer { /** * @brief Registers the callback to be invoked when it's ready to change VBlankIdle. * * @param cb Indicates the instance used to notify graphics service that it's ready to change VBlankIdle. * * @return Returns 0 if the operation is successful; returns an error code defined * in {@link DispErrCode} otherwise. * @since 5.0 * @version 1.2 */ RegDisplayVBlankIdleCallback([in] IVBlankIdleCallback cb); /** * @brief Clear all Client Buffer. * * @param devId Indicates which device. * * @return Returns 0 if the operation is successful; returns an error code defined * in {@link DispErrCode} otherwise. * @since 5.0 * @version 1.0 */ ClearClientBuffer([in] unsigned int devId); /** * @brief Clear all Layer Buffer. * * @param devId Indicates which device, layerId Indicates which layer. * * @return Returns 0 if the operation is successful; returns an error code defined * in {@link DispErrCode} otherwise. * @since 5.0 * @version 1.0 */ ClearLayerBuffer([in] unsigned int devId, [in] unsigned int layerId); /** * @brief Update Hardware Cursor Position and Style. * * @param devId Indicates which device, x and y Indicates the position of hardware cursor. * buffer Indicates input buffer handle. * * @return Returns 0 if the operation is successful; returns an error code defined * in {@link DispErrCode} otherwise. * @since 5.0 * @version 1.0 */ UpdateHardwareCursor([in] unsigned int devId, [in] int x, [in] int y, [in] NativeBuffer buffer); /** * @brief Enable Hardware Cursor. * * @param devId Indicates which device, enable Indicates which stats of enabled hardware cursor. * * @return Returns 0 if the operation is successful; returns an error code defined * in {@link DispErrCode} otherwise. * @since 5.0 * @version 1.0 */ EnableHardwareCursorStats([in] unsigned int devId, [in] boolean enable); /** * @brief Get Hardware Cursor stats. * * @param devId Indicates which device, frameCount Indicates hardware cursor frame count, * vsyncCount Indicates hardware cursor vsync count. * * @return Returns 0 if the operation is successful; returns an error code defined * in {@link DispErrCode} otherwise. * @since 5.0 * @version 1.0 */ GetHardwareCursorStats([in] unsigned int devId, [out] unsigned int frameCount, [out] unsigned int vsyncCount); /** * @brief Set Display Active Region. * * @param devId Indicates the ID of the display device. * @param rect Indicates the pointer to the cropped region of the client buffer. * * @return Returns 0 if the operation is successful; returns an error code defined * in {@link DispErrCode} otherwise. * @since 5.0 * @version 1.0 */ SetDisplayActiveRegion([in] unsigned int devId, [in] struct IRect rect); /** * @brief the function to fast present. * * @param devId Indicates which device, param Indicates data structure of present param, * inHandles Indicates input buffer handles. * * @return Returns 0 if the operation is successful; returns an error code defined * in {@link DispErrCode} otherwise. * @since 5.0 * @version 1.0 */ FastPresent([in] unsigned int devId, [in] struct PresentParam param, [in] NativeBuffer[] inHandles); /** * @brief the function to GetDisplayIdentificationData. * * @param devId Indicates which device, portId Indicates which port, * edidData Indicates the edid value. * * @return Returns 0 if the operation is successful; returns an error code defined * in {@link DispErrCode} otherwise. * @since 5.0 * @version 1.0 */ GetDisplayIdentificationData([in] unsigned int devId, [out] unsigned char portId, [out] unsigned char[] edidData); }