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 
32 FFI_EXPORT uint32_t FfiOHOSDisplayGetId(int64_t id);
33 FFI_EXPORT char* FfiOHOSGetDisplayName(int64_t id);
34 FFI_EXPORT bool FfiOHOSDisplayGetAlive(int64_t id);
35 FFI_EXPORT uint32_t FfiOHOSDisplayGetState(int64_t id);
36 FFI_EXPORT uint32_t FfiOHOSDisplayGetRefreshRate(int64_t id);
37 FFI_EXPORT uint32_t FfiOHOSDisplayGetRotation(int64_t id);
38 FFI_EXPORT uint32_t FfiOHOSDisplayGetOrientation(int64_t id);
39 FFI_EXPORT int32_t FfiOHOSDisplayGetWidth(int64_t id);
40 FFI_EXPORT int32_t FfiOHOSDisplayGetHeight(int64_t id);
41 FFI_EXPORT float FfiOHOSDisplayGetDensityDPI(int64_t id);
42 FFI_EXPORT float FfiOHOSDisplayGetVirtualPixelRatio(int64_t id);
43 FFI_EXPORT float FfiOHOSDisplayGetXDPI(int64_t id);
44 FFI_EXPORT float FfiOHOSDisplayGetYDPI(int64_t id);
45 FFI_EXPORT RetStruct FfiOHOSDisplayGetCutoutInfo(int64_t id);
46 }
47 
48 #endif // DISPLAY_FFI_H
49