1/* 2 * Copyright (c) 2024 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_2; 17 18import ohos.hdi.display.composer.v1_1.IDisplayComposer; 19import ohos.hdi.display.composer.v1_2.DisplayComposerType; 20import ohos.hdi.display.composer.v1_2.IVBlankIdleCallback; 21 22sequenceable OHOS.HDI.Display.HdifdParcelable; 23 24interface IDisplayComposer extends ohos.hdi.display.composer.v1_1.IDisplayComposer { 25 /** 26 * @brief Registers the callback to be invoked when it's ready to change VBlankIdle. 27 * 28 * @param cb Indicates the instance used to notify graphics service that it's ready to change VBlankIdle. 29 * 30 * @return Returns <b>0</b> if the operation is successful; returns an error code defined 31 * in {@link DispErrCode} otherwise. 32 * @since 5.0 33 * @version 1.2 34 */ 35 RegDisplayVBlankIdleCallback([in] IVBlankIdleCallback cb); 36 37 /** 38 * @brief Clear all Client Buffer. 39 * 40 * @param devId Indicates which device. 41 * 42 * @return Returns <b>0</b> if the operation is successful; returns an error code defined 43 * in {@link DispErrCode} otherwise. 44 * @since 5.0 45 * @version 1.0 46 */ 47 ClearClientBuffer([in] unsigned int devId); 48 49 /** 50 * @brief Clear all Layer Buffer. 51 * 52 * @param devId Indicates which device, layerId Indicates which layer. 53 * 54 * @return Returns <b>0</b> if the operation is successful; returns an error code defined 55 * in {@link DispErrCode} otherwise. 56 * @since 5.0 57 * @version 1.0 58 */ 59 ClearLayerBuffer([in] unsigned int devId, [in] unsigned int layerId); 60 61 /** 62 * @brief Set Hardware Cursor Position. 63 * 64 * @param devId Indicates which device, x and y Indicates the position of hardware cursor. 65 * 66 * @return Returns <b>0</b> if the operation is successful; returns an error code defined 67 * in {@link DispErrCode} otherwise. 68 * @since 5.0 69 * @version 1.0 70 */ 71 SetHardwareCursorPosition([in] unsigned int devId, [in] int x, [in] int y); 72 73 /** 74 * @brief Enable Hardware Cursor. 75 * 76 * @param devId Indicates which device, enable Indicates which stats of enabled hardware cursor. 77 * 78 * @return Returns <b>0</b> if the operation is successful; returns an error code defined 79 * in {@link DispErrCode} otherwise. 80 * @since 5.0 81 * @version 1.0 82 */ 83 EnableHardwareCursorStats([in] unsigned int devId, [in] boolean enable); 84 85 /** 86 * @brief Get Hardware Cursor Stats. 87 * 88 * @param devId Indicates which device, frameCount Indicates hardware cursor frame count, 89 * vsyncCount Indicates hardware cursor vsync count. 90 * 91 * @return Returns <b>0</b> if the operation is successful; returns an error code defined 92 * in {@link DispErrCode} otherwise. 93 * @since 5.0 94 * @version 1.0 95 */ 96 GetHardwareCursorStats([in] unsigned int devId, [out] unsigned int frameCount, [out] unsigned int vsyncCount); 97} 98