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_MENU_FFI_H 17 #define OHOS_ACE_FRAMEWORK_CJ_MENU_FFI_H 18 19 #include "bridge/cj_frontend/interfaces/cj_ffi/cj_common_ffi.h" 20 #include "bridge/cj_frontend/interfaces/cj_ffi/cj_macro.h" 21 22 struct CBorderRadiuses { 23 double topLeftRadiuses; 24 int32_t topLeftUnit; 25 double topRightRadiuses; 26 int32_t topRightUnit; 27 double bottomLeftRadiuses; 28 int32_t bottomLeftUnit; 29 double bottomRightRadiuses; 30 int32_t bottomRightUnit; 31 }; 32 33 extern "C" { 34 CJ_EXPORT void FfiOHOSAceFrameworkMenuCreate(); 35 CJ_EXPORT void FfiOHOSAceFrameworkMenuFont( 36 double size, int32_t unit, const char* weight, const char* family, int32_t style); 37 CJ_EXPORT void FfiOHOSAceFrameworkMenuSetFontColor(uint32_t color); 38 CJ_EXPORT void FfiOHOSAceFrameworkMenuSetWidth(double width, int32_t unit); 39 CJ_EXPORT void FfiOHOSAceFrameworkMenuSetRadiusByLength(double size, int32_t unit); 40 CJ_EXPORT void FfiOHOSAceFrameworkMenuSetRadiusByBorderRadiuses(CBorderRadiuses radius); 41 } 42 #endif // OHOS_ACE_FRAMEWORK_CJ_MENU_FFI_H 43