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