/* * 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_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 Set Hardware Cursor Position. * * @param devId Indicates which device, x and y Indicates the position of 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 */ SetHardwareCursorPosition([in] unsigned int devId, [in] int x, [in] int y); /** * @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); }