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_ACE_FRAMEWORK_CJ_RELATIVE_CONTAINER_FFI_H
17 #define OHOS_ACE_FRAMEWORK_CJ_RELATIVE_CONTAINER_FFI_H
18 
19 #include <cstdint>
20 
21 #include "bridge/cj_frontend/interfaces/cj_ffi/cj_macro.h"
22 
23 extern "C" {
24     struct CLength {
25         double value;
26         int32_t unit;
27     };
28 
29     struct CGuideLinePosition {
30         CLength start;
31         CLength end;
32     };
33 
34     struct CGuideLineStyle {
35         char* id;
36         int32_t direction;
37         CGuideLinePosition position;
38     };
39 
40     struct CGuideLineInfos {
41         int64_t size;
42         CGuideLineStyle* guideline;
43     };
44 
45     struct CArrString {
46         char** head;
47         int64_t size;
48     };
49 
50     struct CBarrierStyle {
51         char* id;
52         int32_t direction;
53         CArrString referencedId;
54     };
55 
56     struct CBarrierInfos {
57         int64_t size;
58         CBarrierStyle* barrier;
59     };
60 
61     CJ_EXPORT void FfiOHOSAceFrameworkRelativeContainerCreate();
62     CJ_EXPORT void FfiOHOSAceFrameworkReletiveContainerGuideLine(CGuideLineInfos guidelines);
63     CJ_EXPORT void FfiOHOSAceFrameworkReletiveContainerBarrier(CBarrierInfos barriers);
64 }
65 #endif // OHOS_ACE_FRAMEWORK_CJ_RELATIVE_CONTAINER_FFI_H
66