• 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 Update Hardware Cursor Position and Style.
64     *
65     * @param devId Indicates which device, x and y Indicates the position of hardware cursor.
66     * buffer Indicates input buffer handle.
67     *
68     * @return Returns <b>0</b> if the operation is successful; returns an error code defined
69     * in {@link DispErrCode} otherwise.
70     * @since 5.0
71     * @version 1.0
72     */
73     UpdateHardwareCursor([in] unsigned int devId, [in] int x, [in] int y, [in] NativeBuffer buffer);
74
75     /**
76     * @brief Enable Hardware Cursor.
77     *
78     * @param devId Indicates which device, enable Indicates which stats of enabled hardware cursor.
79     *
80     * @return Returns <b>0</b> if the operation is successful; returns an error code defined
81     * in {@link DispErrCode} otherwise.
82     * @since 5.0
83     * @version 1.0
84     */
85     EnableHardwareCursorStats([in] unsigned int devId, [in] boolean enable);
86
87     /**
88     * @brief Get Hardware Cursor stats.
89     *
90     * @param devId Indicates which device, frameCount Indicates hardware cursor frame count,
91     * vsyncCount Indicates hardware cursor vsync count.
92     *
93     * @return Returns <b>0</b> if the operation is successful; returns an error code defined
94     * in {@link DispErrCode} otherwise.
95     * @since 5.0
96     * @version 1.0
97     */
98     GetHardwareCursorStats([in] unsigned int devId, [out] unsigned int frameCount, [out] unsigned int vsyncCount);
99
100     /**
101     * @brief Set Display Active Region.
102     *
103     * @param devId Indicates the ID of the display device.
104     * @param rect Indicates the pointer to the cropped region of the client buffer.
105     *
106     * @return Returns <b>0</b> if the operation is successful; returns an error code defined
107     * in {@link DispErrCode} otherwise.
108     * @since 5.0
109     * @version 1.0
110     */
111     SetDisplayActiveRegion([in] unsigned int devId, [in] struct IRect rect);
112
113     /**
114     * @brief the function to fast present.
115     *
116     * @param devId Indicates which device, param Indicates data structure of present param,
117     * inHandles Indicates input buffer handles.
118     *
119     * @return Returns <b>0</b> if the operation is successful; returns an error code defined
120     * in {@link DispErrCode} otherwise.
121     * @since 5.0
122     * @version 1.0
123     */
124     FastPresent([in] unsigned int devId, [in] struct PresentParam param, [in] NativeBuffer[] inHandles);
125
126     /**
127     * @brief the function to GetDisplayIdentificationData.
128     *
129     * @param devId Indicates which device, portId Indicates which port,
130     * edidData Indicates the edid value.
131     *
132     * @return Returns <b>0</b> if the operation is successful; returns an error code defined
133     * in {@link DispErrCode} otherwise.
134     * @since 5.0
135     * @version 1.0
136     */
137     GetDisplayIdentificationData([in] unsigned int devId, [out] unsigned char portId, [out] unsigned char[] edidData);
138}
139