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_CHECKBOX_GROUP_FFI_H 17 #define OHOS_ACE_FRAMEWORK_CJ_CHECKBOX_GROUP_FFI_H 18 19 #include <cstdint> 20 21 #include "bridge/cj_frontend/interfaces/cj_ffi/cj_macro.h" 22 #include "bridge/cj_frontend/interfaces/cj_ffi/cj_view_abstract_ffi.h" 23 #include "core/components/checkable/checkable_component.h" 24 25 extern "C" { 26 struct FFiCheckboxGroupResult { 27 int32_t status; 28 int64_t size; 29 const char** nameBuffer; 30 }; 31 32 CJ_EXPORT void FfiOHOSAceFrameworkCheckBoxGroupCreate(const char* name); 33 CJ_EXPORT void FfiOHOSAceFrameworkCheckBoxGroupSelectAll(bool value); 34 CJ_EXPORT void FfiOHOSAceFrameworkCheckBoxGroupSetSelectedColor(uint32_t color); 35 CJ_EXPORT void FfiOHOSAceFrameworkCheckBoxGroupSetWidth(double width, uint32_t unit); 36 CJ_EXPORT void FfiOHOSAceFrameworkCheckBoxGroupSetHeight(double height, uint32_t unit); 37 CJ_EXPORT void FfiOHOSAceFrameworkCheckBoxGroupSetSize( 38 double width, uint32_t widthUnit, double height, uint32_t heightUnit); 39 CJ_EXPORT void FfiOHOSAceFrameworkCheckBoxGroupSetPadding(double padding, uint32_t unit); 40 CJ_EXPORT void FfiOHOSAceFrameworkCheckBoxGroupSetPaddings(CJEdge params); 41 CJ_EXPORT void FfiOHOSAceFrameworkCheckBoxGroupSetOnChange(void (*callback)(FFiCheckboxGroupResult info)); 42 CJ_EXPORT void FfiCheckBoxGroupSetResponseRegion(CJResponseRegion value); 43 CJ_EXPORT void FfiCheckBoxGroupSetResponseRegionArray(VectorStringPtr vecContent); 44 } 45 46 #endif // OHOS_ACE_FRAMEWORK_CJ_CHECKBOX_GROUP_FFI_H 47