• 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 
16 #ifndef OHOS_DISPLAY_FFI_H
17 #define OHOS_DISPLAY_FFI_H
18 
19 #include "cj_common_ffi.h"
20 #include "display_utils.h"
21 
22 extern "C" {
23 FFI_EXPORT RetStruct FfiOHOSGetDefaultDisplaySync();
24 FFI_EXPORT RetStruct FfiOHOSGetAllDisplays();
25 FFI_EXPORT RetStruct FfiOHOSHasPrivateWindow(uint32_t displayId);
26 FFI_EXPORT bool FfiOHOSIsFoldable();
27 FFI_EXPORT void FfiOHOSSetFoldDisplayMode(uint32_t mode);
28 FFI_EXPORT uint32_t FfiOHOSGetFoldStatus();
29 FFI_EXPORT uint32_t FfiOHOSGetFoldDisplayMode();
30 FFI_EXPORT RetStruct FfiOHOSGetCurrentFoldCreaseRegion();
31 FFI_EXPORT bool FfiOHOSIsCaptured();
32 FFI_EXPORT RetStruct FfiOHOSGetAllDisplayPhysicalResolution();
33 FFI_EXPORT int32_t FfiOHOSUnRegisterAllDisplayManagerCallback(const char* type);
34 FFI_EXPORT int32_t FfiOHOSRegisterDisplayManagerCallback(const char* type, int64_t callbackId);
35 FFI_EXPORT int32_t FfiOHOSUnRegisterDisplayManagerCallback(const char* type, int64_t callbackId);
36 
37 FFI_EXPORT uint32_t FfiOHOSDisplayGetId(int64_t id);
38 FFI_EXPORT char* FfiOHOSGetDisplayName(int64_t id);
39 FFI_EXPORT bool FfiOHOSDisplayGetAlive(int64_t id);
40 FFI_EXPORT uint32_t FfiOHOSDisplayGetState(int64_t id);
41 FFI_EXPORT uint32_t FfiOHOSDisplayGetRefreshRate(int64_t id);
42 FFI_EXPORT uint32_t FfiOHOSDisplayGetRotation(int64_t id);
43 FFI_EXPORT uint32_t FfiOHOSDisplayGetOrientation(int64_t id);
44 FFI_EXPORT int32_t FfiOHOSDisplayGetWidth(int64_t id);
45 FFI_EXPORT int32_t FfiOHOSDisplayGetHeight(int64_t id);
46 FFI_EXPORT float FfiOHOSDisplayGetDensityDPI(int64_t id);
47 FFI_EXPORT float FfiOHOSDisplayGetVirtualPixelRatio(int64_t id);
48 FFI_EXPORT float FfiOHOSDisplayGetXDPI(int64_t id);
49 FFI_EXPORT float FfiOHOSDisplayGetYDPI(int64_t id);
50 FFI_EXPORT RetStruct FfiOHOSDisplayGetColorSapces(int64_t id);
51 FFI_EXPORT RetStruct FfiOHOSDisplayGetHdrFormats(int64_t id);
52 FFI_EXPORT uint32_t FfiOHOSDisplayGetAvailableWidth(int64_t id);
53 FFI_EXPORT uint32_t FfiOHOSDisplayGetAvailableHeight(int64_t id);
54 FFI_EXPORT RetStruct FfiOHOSDisplayGetCutoutInfo(int64_t id);
55 FFI_EXPORT RetStruct FfiOHOSDisplayGetAvailableArea(int64_t id);
56 FFI_EXPORT int32_t FfiOHOSDisplayUnRegisterAllDisplayManagerCallback(const char* type, int64_t id);
57 FFI_EXPORT int32_t FfiOHOSDisplayRegisterDisplayManagerCallback(const char* type, int64_t id, int64_t callbackId);
58 FFI_EXPORT int32_t FfiOHOSDisplayUnRegisterDisplayManagerCallback(const char* type, int64_t id, int64_t callbackId);
59 }
60 
61 #endif // DISPLAY_FFI_H
62