• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2023 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_1_IDISPLAY_COMPOSER_VDI_H
17 #define OHOS_HDI_DISPLAY_V1_1_IDISPLAY_COMPOSER_VDI_H
18 
19 #include <vector>
20 #include <string>
21 #include "common/include/display_common.h"
22 #include "idisplay_composer_vdi.h"
23 #include "v1_1/display_composer_type.h"
24 #include "v1_1/imode_callback.h"
25 #include "v1_1/iseamless_change_callback.h"
26 
27 namespace OHOS {
28 namespace HDI {
29 namespace Display {
30 namespace Composer {
31 using namespace OHOS::HDI::Display::Composer::V1_1;
32 
33 class IDisplayComposerVdiV1_1 : public IDisplayComposerVdi {
34     public:
35     virtual int32_t RegSeamlessChangeCallback(SeamlessChangeCallback cb, void* data) = 0;
36     virtual int32_t GetDisplaySupportedModesExt(uint32_t devId, std::vector<DisplayModeInfoExt>& modes) = 0;
37     virtual int32_t SetDisplayModeAsync(uint32_t devId, uint32_t modeId, ModeCallback cb, void *data) = 0;
38     virtual int32_t GetDisplayVBlankPeriod(uint32_t devId, uint64_t& period) = 0;
39     virtual int32_t SetLayerPerFrameParameter(uint32_t devId, uint32_t layerId, const std::string& key,
40         const std::vector<int8_t>& value) = 0;
41     virtual int32_t GetSupportedLayerPerFrameParameterKey(std::vector<std::string>& keys) = 0;
42     virtual int32_t SetDisplayOverlayResolution(uint32_t devId, uint32_t width, uint32_t height) = 0;
43     virtual int32_t RegRefreshCallback(RefreshCallback cb, void* data) = 0;
44     virtual int32_t GetDisplaySupportedColorGamuts(uint32_t devId, std::vector<ColorGamut>& gamuts) = 0;
45     virtual int32_t GetHDRCapabilityInfos(uint32_t devId, HDRCapability& info) = 0;
46 };
47 
48 using CreateComposerVdiFuncV1_1 = IDisplayComposerVdiV1_1* (*)();
49 using DestroyComposerVdiFuncV1_1 = void (*)(IDisplayComposerVdiV1_1* vdi);
50 extern "C" IDisplayComposerVdiV1_1* CreateComposerVdiV1_1();
51 extern "C" void DestroyComposerVdiV1_1(IDisplayComposerVdiV1_1* vdi);
52 } // namespace Composer
53 } // namespace Display
54 } // namespace HDI
55 } // namespace OHOS
56 #endif // OHOS_HDI_DISPLAY_V1_1_IDISPLAY_COMPOSER_VDI_H
57