• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2025 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 
16 #ifndef OHOS_HDI_DISPLAY_V1_3_IDISPLAY_COMPOSER_INTERFACE_H
17 #define OHOS_HDI_DISPLAY_V1_3_IDISPLAY_COMPOSER_INTERFACE_H
18 
19 #include "v1_2/include/idisplay_composer_interface.h"
20 #include "v1_3/display_composer_type.h"
21 
22 namespace OHOS {
23 namespace HDI {
24 namespace Display {
25 namespace Composer {
26 namespace V1_3 {
27 
28 class IDisplayComposerInterface : public V1_2::IDisplayComposerInterface {
29 public:
30     /**
31      * @brief Obtains all interfaces of IDisplayComposerInterface.
32      *
33      * @return Returns <b>IDisplayComposerInterface*</b> if the operation is successful;
34      * returns an null point otherwise.
35      * @since 6.0
36      * @version 1.0
37      */
38     static IDisplayComposerInterface* Get(bool needSMQ = true);
39 
40     /**
41      * @brief Registers the callback to be invoked when the environment changes.
42      *
43      * @param cb Indicates the instance used to notify the graphics service of an environment change event occurred.
44      * @param data Data used by cb
45      *
46      * @return Returns <b>0</b> if the operation is successful; returns an error code defined
47      * in {@link DispErrCode} otherwise.
48      * @since 6.0
49      * @version 1.0
50      */
51     virtual int32_t RegHwcEventCallback(HwcEventCallback cb, void *data) = 0;
52 };
53 } // V1_3
54 } // Composer
55 } // Display
56 } // HDI
57 } // OHOS
58 #endif // OHOS_HDI_DISPLAY_V1_3_IDISPLAY_COMPOSER_INTERFACE_H
59