1c5e268c6Sopenharmony_ci/*
2c5e268c6Sopenharmony_ci * Copyright (c) 2024 Huawei Device Co., Ltd.
3c5e268c6Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
4c5e268c6Sopenharmony_ci * you may not use this file except in compliance with the License.
5c5e268c6Sopenharmony_ci * You may obtain a copy of the License at
6c5e268c6Sopenharmony_ci *
7c5e268c6Sopenharmony_ci *     http://www.apache.org/licenses/LICENSE-2.0
8c5e268c6Sopenharmony_ci *
9c5e268c6Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software
10c5e268c6Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
11c5e268c6Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12c5e268c6Sopenharmony_ci * See the License for the specific language governing permissions and
13c5e268c6Sopenharmony_ci * limitations under the License.
14c5e268c6Sopenharmony_ci */
15c5e268c6Sopenharmony_ci
16c5e268c6Sopenharmony_cipackage ohos.hdi.display.composer.v1_2;
17c5e268c6Sopenharmony_ci
18c5e268c6Sopenharmony_ciimport ohos.hdi.display.composer.v1_1.IDisplayComposer;
19c5e268c6Sopenharmony_ciimport ohos.hdi.display.composer.v1_2.DisplayComposerType;
20c5e268c6Sopenharmony_ciimport ohos.hdi.display.composer.v1_2.IVBlankIdleCallback;
21c5e268c6Sopenharmony_ci
22c5e268c6Sopenharmony_cisequenceable OHOS.HDI.Display.HdifdParcelable;
23c5e268c6Sopenharmony_ci
24c5e268c6Sopenharmony_ciinterface IDisplayComposer extends ohos.hdi.display.composer.v1_1.IDisplayComposer {
25c5e268c6Sopenharmony_ci    /**
26c5e268c6Sopenharmony_ci     * @brief Registers the callback to be invoked when it's ready to change VBlankIdle.
27c5e268c6Sopenharmony_ci     *
28c5e268c6Sopenharmony_ci     * @param cb Indicates the instance used to notify graphics service that it's ready to change VBlankIdle.
29c5e268c6Sopenharmony_ci     *
30c5e268c6Sopenharmony_ci     * @return Returns <b>0</b> if the operation is successful; returns an error code defined
31c5e268c6Sopenharmony_ci     * in {@link DispErrCode} otherwise.
32c5e268c6Sopenharmony_ci     * @since 5.0
33c5e268c6Sopenharmony_ci     * @version 1.2
34c5e268c6Sopenharmony_ci     */
35c5e268c6Sopenharmony_ci     RegDisplayVBlankIdleCallback([in] IVBlankIdleCallback cb);
36c5e268c6Sopenharmony_ci
37c5e268c6Sopenharmony_ci    /**
38c5e268c6Sopenharmony_ci     * @brief Clear all Client Buffer.
39c5e268c6Sopenharmony_ci     *
40c5e268c6Sopenharmony_ci     * @param devId Indicates which device.
41c5e268c6Sopenharmony_ci     *
42c5e268c6Sopenharmony_ci     * @return Returns <b>0</b> if the operation is successful; returns an error code defined
43c5e268c6Sopenharmony_ci     * in {@link DispErrCode} otherwise.
44c5e268c6Sopenharmony_ci     * @since 5.0
45c5e268c6Sopenharmony_ci     * @version 1.0
46c5e268c6Sopenharmony_ci     */
47c5e268c6Sopenharmony_ci     ClearClientBuffer([in] unsigned int devId);
48c5e268c6Sopenharmony_ci
49c5e268c6Sopenharmony_ci    /**
50c5e268c6Sopenharmony_ci     * @brief Clear all Layer Buffer.
51c5e268c6Sopenharmony_ci     *
52c5e268c6Sopenharmony_ci     * @param devId Indicates which device, layerId Indicates which layer.
53c5e268c6Sopenharmony_ci     *
54c5e268c6Sopenharmony_ci     * @return Returns <b>0</b> if the operation is successful; returns an error code defined
55c5e268c6Sopenharmony_ci     * in {@link DispErrCode} otherwise.
56c5e268c6Sopenharmony_ci     * @since 5.0
57c5e268c6Sopenharmony_ci     * @version 1.0
58c5e268c6Sopenharmony_ci     */
59c5e268c6Sopenharmony_ci     ClearLayerBuffer([in] unsigned int devId, [in] unsigned int layerId);
60c5e268c6Sopenharmony_ci
61c5e268c6Sopenharmony_ci     /**
62c5e268c6Sopenharmony_ci     * @brief Set Hardware Cursor Position.
63c5e268c6Sopenharmony_ci     *
64c5e268c6Sopenharmony_ci     * @param devId Indicates which device, x and y Indicates the position of hardware cursor.
65c5e268c6Sopenharmony_ci     *
66c5e268c6Sopenharmony_ci     * @return Returns <b>0</b> if the operation is successful; returns an error code defined
67c5e268c6Sopenharmony_ci     * in {@link DispErrCode} otherwise.
68c5e268c6Sopenharmony_ci     * @since 5.0
69c5e268c6Sopenharmony_ci     * @version 1.0
70c5e268c6Sopenharmony_ci     */
71c5e268c6Sopenharmony_ci     SetHardwareCursorPosition([in] unsigned int devId, [in] int x, [in] int y);
72c5e268c6Sopenharmony_ci
73c5e268c6Sopenharmony_ci     /**
74c5e268c6Sopenharmony_ci     * @brief Enable Hardware Cursor.
75c5e268c6Sopenharmony_ci     *
76c5e268c6Sopenharmony_ci     * @param devId Indicates which device, enable Indicates which stats of enabled hardware cursor.
77c5e268c6Sopenharmony_ci     *
78c5e268c6Sopenharmony_ci     * @return Returns <b>0</b> if the operation is successful; returns an error code defined
79c5e268c6Sopenharmony_ci     * in {@link DispErrCode} otherwise.
80c5e268c6Sopenharmony_ci     * @since 5.0
81c5e268c6Sopenharmony_ci     * @version 1.0
82c5e268c6Sopenharmony_ci     */
83c5e268c6Sopenharmony_ci     EnableHardwareCursorStats([in] unsigned int devId, [in] boolean enable);
84c5e268c6Sopenharmony_ci
85c5e268c6Sopenharmony_ci     /**
86c5e268c6Sopenharmony_ci     * @brief Get Hardware Cursor stats.
87c5e268c6Sopenharmony_ci     *
88c5e268c6Sopenharmony_ci     * @param devId Indicates which device, frameCount Indicates hardware cursor frame count,
89c5e268c6Sopenharmony_ci     * vsyncCount Indicates hardware cursor vsync count.
90c5e268c6Sopenharmony_ci     *
91c5e268c6Sopenharmony_ci     * @return Returns <b>0</b> if the operation is successful; returns an error code defined
92c5e268c6Sopenharmony_ci     * in {@link DispErrCode} otherwise.
93c5e268c6Sopenharmony_ci     * @since 5.0
94c5e268c6Sopenharmony_ci     * @version 1.0
95c5e268c6Sopenharmony_ci     */
96c5e268c6Sopenharmony_ci     GetHardwareCursorStats([in] unsigned int devId, [out] unsigned int frameCount, [out] unsigned int vsyncCount);
97c5e268c6Sopenharmony_ci}
98