!37944 NDK C-API tdd fix

Merge pull request !37944 from firminly/liyi2
This commit is contained in:
openharmony_ci 2024-07-18 08:10:57 +00:00 committed by Gitee
commit 128644746b
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
6 changed files with 1697 additions and 149 deletions

View File

@ -143,10 +143,15 @@ void ExtensionHandler::InvalidateRender()
{
if (invalidateRender_) {
invalidateRender_();
} else {
if (node_) {
node_->MarkNeedRenderOnly();
}
if (overlayRender_) {
overlayRender_();
}
if (foreGroundRender_) {
foreGroundRender_();
}
if (node_ && !invalidateRender_ && !overlayRender_ && !foreGroundRender_) {
node_->MarkNeedRenderOnly();
}
needRender_ = true;
}

View File

@ -89,6 +89,16 @@ public:
invalidateRender_ = std::move(impl);
}
void SetOverlayRenderImpl(std::function<void()>&& impl)
{
overlayRender_ = std::move(impl);
}
void SetForeGroundRenderImpl(std::function<void()>&& impl)
{
foreGroundRender_ = std::move(impl);
}
void SetDrawModifier(const RefPtr<NG::DrawModifier>& drawModifier)
{
drawModifier_ = drawModifier;
@ -138,6 +148,8 @@ private:
std::function<void(DrawingContext&)> innerForegroundDrawImpl_;
std::function<void(DrawingContext&)> innerOverlayDrawImpl_;
std::function<void()> invalidateRender_;
std::function<void()> overlayRender_;
std::function<void()> foreGroundRender_;
bool needRender_ = true;
RefPtr<NG::DrawModifier> drawModifier_;

View File

@ -57,7 +57,7 @@ void OverlayModifier::Draw(DrawingContext& context)
void OverlayModifier::SetExtensionHandler(ExtensionHandler* extensionHandler)
{
extensionHandler_ = extensionHandler;
extensionHandler_->SetInvalidateRenderImpl([weak = WeakClaim(this)]() {
extensionHandler_->SetOverlayRenderImpl([weak = WeakClaim(this)]() {
auto modifier = weak.Upgrade();
if (modifier) {
modifier->SetOverlayChange();
@ -78,7 +78,7 @@ void ForegroundModifier::Draw(DrawingContext& context)
void ForegroundModifier::SetExtensionHandler(ExtensionHandler* extensionHandler)
{
extensionHandler_ = extensionHandler;
extensionHandler_->SetInvalidateRenderImpl([weak = WeakClaim(this)]() {
extensionHandler_->SetForeGroundRenderImpl([weak = WeakClaim(this)]() {
auto modifier = weak.Upgrade();
if (modifier) {
modifier->SetForegroundChange();

View File

@ -231,6 +231,8 @@ constexpr int32_t OUTLINE_TOP_WIDTH_INDEX = 1;
constexpr int32_t OUTLINE_RIGHT_WIDTH_INDEX = 2;
constexpr int32_t OUTLINE_BOTTOM_WIDTH_INDEX = 3;
constexpr uint32_t CONVERT_CONTENT_TYPE = 5;
constexpr uint32_t DEFAULT_PICKER_STYLE_COLOR = 0xFF182431;
constexpr uint32_t DEFAULT_PICKER_SELECTED_COLOR = 0xFF007DFF;
const std::string EMPTY_STR = "";
const std::vector<std::string> ACCESSIBILITY_LEVEL_VECTOR = { "auto", "yes", "no", "no-hide-descendants" };
std::map<std::string, int32_t> ACCESSIBILITY_LEVEL_MAP = { { "auto", 0 }, { "yes", 1 }, { "no", 2 },
@ -484,12 +486,12 @@ std::string ConvertAccessibilityRole(uint32_t nodeTypeInt)
return nodeTypeString;
}
uint32_t UnConvertAccessibilityRole(const std::string& nodeTypeString)
int32_t UnConvertAccessibilityRole(const std::string& nodeTypeString)
{
uint32_t nodeTypeInt = ERROR_CODE;
int32_t nodeTypeInt = ERROR_CODE;
auto it = ACCESSIBILITY_ROLE_CONVERT_NATIVE_MAP.find(nodeTypeString);
if (it != ACCESSIBILITY_ROLE_CONVERT_NATIVE_MAP.end()) {
return ACCESSIBILITY_ROLE_CONVERT_NATIVE_MAP[nodeTypeString];
return static_cast<int32_t>(ACCESSIBILITY_ROLE_CONVERT_NATIVE_MAP[nodeTypeString]);
}
return nodeTypeInt;
}
@ -2320,7 +2322,7 @@ const ArkUI_AttributeItem* GetAccessibilityRole(ArkUI_NodeHandle node)
auto* fullImpl = GetFullImpl();
std::string nodeTypeString = fullImpl->getNodeModifiers()->getCommonModifier()->getAccessibilityRole(
node->uiNodeHandle);
g_numberValues[0].u32 = UnConvertAccessibilityRole(nodeTypeString);
g_numberValues[0].u32 = static_cast<int32_t>(UnConvertAccessibilityRole(nodeTypeString));
g_attributeItem.size = REQUIRED_ONE_PARAM;
return &g_attributeItem;
}
@ -7652,9 +7654,9 @@ int32_t SetDatePickerDisappearTextStyle(ArkUI_NodeHandle node, const ArkUI_Attri
return ERROR_CODE_PARAM_INVALID;
}
ArkUI_Uint32 color = StringToColorInt(params[NUM_0].c_str(), ERROR_CODE);
ArkUI_Uint32 color = StringToColorInt(params[NUM_0].c_str(), DEFAULT_PICKER_STYLE_COLOR);
int size = StringToInt(params[NUM_1].c_str(), ERROR_CODE);
if (color == ERROR_CODE || size == ERROR_CODE) {
if (size == ERROR_CODE) {
return ERROR_CODE_PARAM_INVALID;
}
auto style = StringToEnumInt(params[NUM_4].c_str(), FONT_STYLES, NUM_0);
@ -7693,9 +7695,9 @@ int32_t SetDatePickerTextStyle(ArkUI_NodeHandle node, const ArkUI_AttributeItem*
return ERROR_CODE_PARAM_INVALID;
}
ArkUI_Uint32 color = StringToColorInt(params[NUM_0].c_str(), ERROR_CODE);
ArkUI_Uint32 color = StringToColorInt(params[NUM_0].c_str(), DEFAULT_PICKER_STYLE_COLOR);
int size = StringToInt(params[NUM_1].c_str(), ERROR_CODE);
if (color == ERROR_CODE || size == ERROR_CODE) {
if (size == ERROR_CODE) {
return ERROR_CODE_PARAM_INVALID;
}
auto style = StringToEnumInt(params[NUM_4].c_str(), FONT_STYLES, NUM_0);
@ -7734,9 +7736,9 @@ int32_t SetDatePickerSelectedTextStyle(ArkUI_NodeHandle node, const ArkUI_Attrib
return ERROR_CODE_PARAM_INVALID;
}
ArkUI_Uint32 color = StringToColorInt(params[NUM_0].c_str(), ERROR_CODE);
ArkUI_Uint32 color = StringToColorInt(params[NUM_0].c_str(), DEFAULT_PICKER_SELECTED_COLOR);
int size = StringToInt(params[NUM_1].c_str(), ERROR_CODE);
if (color == ERROR_CODE || size == ERROR_CODE) {
if (size == ERROR_CODE) {
return ERROR_CODE_PARAM_INVALID;
}
auto style = StringToEnumInt(params[NUM_4].c_str(), FONT_STYLES, NUM_0);
@ -7841,9 +7843,9 @@ int32_t SetTimePickerDisappearTextStyle(ArkUI_NodeHandle node, const ArkUI_Attri
return ERROR_CODE_PARAM_INVALID;
}
ArkUI_Uint32 color = StringToColorInt(params[NUM_0].c_str(), ERROR_CODE);
ArkUI_Uint32 color = StringToColorInt(params[NUM_0].c_str(), DEFAULT_PICKER_STYLE_COLOR);
int size = StringToInt(params[NUM_1].c_str(), ERROR_CODE);
if (color == ERROR_CODE || size == ERROR_CODE) {
if (size == ERROR_CODE) {
return ERROR_CODE_PARAM_INVALID;
}
auto style = StringToEnumInt(params[NUM_4].c_str(), FONT_STYLES, NUM_0);
@ -7882,9 +7884,9 @@ int32_t SetTimePickerTextStyle(ArkUI_NodeHandle node, const ArkUI_AttributeItem*
TAG_LOGE(AceLogTag::ACE_NATIVE_NODE, "params are invalid");
return ERROR_CODE_PARAM_INVALID;
}
ArkUI_Uint32 color = StringToColorInt(params[NUM_0].c_str(), ERROR_CODE);
ArkUI_Uint32 color = StringToColorInt(params[NUM_0].c_str(), DEFAULT_PICKER_STYLE_COLOR);
int size = StringToInt(params[NUM_1].c_str(), ERROR_CODE);
if (color == ERROR_CODE || size == ERROR_CODE) {
if (size == ERROR_CODE) {
return ERROR_CODE_PARAM_INVALID;
}
auto style = StringToEnumInt(params[NUM_4].c_str(), FONT_STYLES, NUM_0);
@ -7924,9 +7926,9 @@ int32_t SetTimePickerSelectedTextStyle(ArkUI_NodeHandle node, const ArkUI_Attrib
return ERROR_CODE_PARAM_INVALID;
}
ArkUI_Uint32 color = StringToColorInt(params[NUM_0].c_str(), ERROR_CODE);
ArkUI_Uint32 color = StringToColorInt(params[NUM_0].c_str(), DEFAULT_PICKER_SELECTED_COLOR);
int size = StringToInt(params[NUM_1].c_str(), ERROR_CODE);
if (color == ERROR_CODE || size == ERROR_CODE) {
if (size == ERROR_CODE) {
return ERROR_CODE_PARAM_INVALID;
}
auto style = StringToEnumInt(params[NUM_4].c_str(), FONT_STYLES, NUM_0);
@ -7966,9 +7968,9 @@ int32_t SetTextPickerDisappearTextStyle(ArkUI_NodeHandle node, const ArkUI_Attri
return ERROR_CODE_PARAM_INVALID;
}
ArkUI_Uint32 color = StringToColorInt(params[NUM_0].c_str(), ERROR_CODE);
ArkUI_Uint32 color = StringToColorInt(params[NUM_0].c_str(), DEFAULT_PICKER_STYLE_COLOR);
int size = StringToInt(params[NUM_1].c_str(), ERROR_CODE);
if (color == ERROR_CODE || size == ERROR_CODE) {
if (size == ERROR_CODE) {
return ERROR_CODE_PARAM_INVALID;
}
auto style = StringToEnumInt(params[NUM_4].c_str(), FONT_STYLES, NUM_0);
@ -8008,9 +8010,9 @@ int32_t SetTextPickerTextStyle(ArkUI_NodeHandle node, const ArkUI_AttributeItem*
return ERROR_CODE_PARAM_INVALID;
}
ArkUI_Uint32 color = StringToColorInt(params[NUM_0].c_str(), ERROR_CODE);
ArkUI_Uint32 color = StringToColorInt(params[NUM_0].c_str(), DEFAULT_PICKER_STYLE_COLOR);
int size = StringToInt(params[NUM_1].c_str(), ERROR_CODE);
if (color == ERROR_CODE || size == ERROR_CODE) {
if (size == ERROR_CODE) {
return ERROR_CODE_PARAM_INVALID;
}
auto style = StringToEnumInt(params[NUM_4].c_str(), FONT_STYLES, NUM_0);
@ -8050,9 +8052,9 @@ int32_t SetTextPickerSelectedTextStyle(ArkUI_NodeHandle node, const ArkUI_Attrib
return ERROR_CODE_PARAM_INVALID;
}
ArkUI_Uint32 color = StringToColorInt(params[NUM_0].c_str(), ERROR_CODE);
ArkUI_Uint32 color = StringToColorInt(params[NUM_0].c_str(), DEFAULT_PICKER_SELECTED_COLOR);
int size = StringToInt(params[NUM_1].c_str(), ERROR_CODE);
if (color == ERROR_CODE || size == ERROR_CODE) {
if (size == ERROR_CODE) {
return ERROR_CODE_PARAM_INVALID;
}
auto style = StringToEnumInt(params[NUM_4].c_str(), FONT_STYLES, NUM_0);
@ -10219,6 +10221,7 @@ void ResetDecoration(ArkUI_NodeHandle node)
break;
case ARKUI_NODE_TEXT:
fullImpl->getNodeModifiers()->getTextModifier()->resetTextDecoration(node->uiNodeHandle);
break;
default:
break;
}
@ -10233,6 +10236,7 @@ void ResetTextCase(ArkUI_NodeHandle node)
break;
case ARKUI_NODE_TEXT:
fullImpl->getNodeModifiers()->getTextModifier()->resetTextCase(node->uiNodeHandle);
break;
default:
break;
}
@ -10247,6 +10251,7 @@ void ResetLetterSpacing(ArkUI_NodeHandle node)
break;
case ARKUI_NODE_TEXT:
fullImpl->getNodeModifiers()->getTextModifier()->resetTextLetterSpacing(node->uiNodeHandle);
break;
default:
break;
}
@ -10755,6 +10760,7 @@ const ArkUI_AttributeItem* GetTextCase(ArkUI_NodeHandle node)
g_numberValues[NUM_0].i32 =
fullImpl->getNodeModifiers()->getTextModifier()->getTextTextCase(node->uiNodeHandle);
g_attributeItem.size = REQUIRED_ONE_PARAM;
break;
default:
break;
}
@ -10774,6 +10780,7 @@ const ArkUI_AttributeItem* GetLetterSpacing(ArkUI_NodeHandle node)
g_numberValues[NUM_0].f32 =
fullImpl->getNodeModifiers()->getTextModifier()->getTextLetterSpacing(node->uiNodeHandle);
g_attributeItem.size = REQUIRED_ONE_PARAM;
break;
default:
break;
}
@ -10788,14 +10795,17 @@ const ArkUI_AttributeItem* GetMaxLines(ArkUI_NodeHandle node)
g_numberValues[NUM_0].i32 =
fullImpl->getNodeModifiers()->getTextModifier()->getTextMaxLines(node->uiNodeHandle);
g_attributeItem.size = REQUIRED_ONE_PARAM;
break;
case ARKUI_NODE_TEXT_INPUT:
g_numberValues[NUM_0].i32 =
fullImpl->getNodeModifiers()->getTextInputModifier()->getTextInputMaxLines(node->uiNodeHandle);
g_attributeItem.size = REQUIRED_ONE_PARAM;
break;
case ARKUI_NODE_TEXT_AREA:
g_numberValues[NUM_0].i32 =
fullImpl->getNodeModifiers()->getTextAreaModifier()->getTextAreaMaxLines(node->uiNodeHandle);
g_attributeItem.size = REQUIRED_ONE_PARAM;
break;
default:
break;
}
@ -12589,7 +12599,7 @@ int32_t SetCommonAttribute(ArkUI_NodeHandle node, int32_t subTypeId, const ArkUI
SetAreaChangeRatio,
SetTransition,
};
if (subTypeId >= sizeof(setters) / sizeof(Setter*)) {
if (static_cast<uint32_t>(subTypeId) >= sizeof(setters) / sizeof(Setter*)) {
TAG_LOGE(AceLogTag::ACE_NATIVE_NODE, "common node attribute: %{public}d NOT IMPLEMENT", subTypeId);
return ERROR_CODE_NATIVE_IMPL_TYPE_NOT_SUPPORTED;
}
@ -12695,7 +12705,7 @@ const ArkUI_AttributeItem* GetCommonAttribute(ArkUI_NodeHandle node, int32_t sub
GetAreaChangeRatio,
GetTransition,
};
if (subTypeId >= sizeof(getters) / sizeof(Getter*)) {
if (static_cast<uint32_t>(subTypeId) >= sizeof(getters) / sizeof(Getter*)) {
TAG_LOGE(AceLogTag::ACE_NATIVE_NODE, "common node attribute: %{public}d NOT IMPLEMENT", subTypeId);
return nullptr;
}
@ -12805,7 +12815,7 @@ void ResetCommonAttribute(ArkUI_NodeHandle node, int32_t subTypeId)
ResetAreaChangeRatio,
nullptr,
};
if (subTypeId >= sizeof(resetters) / sizeof(Setter*)) {
if (static_cast<uint32_t>(subTypeId) >= sizeof(resetters) / sizeof(Resetter*)) {
TAG_LOGE(AceLogTag::ACE_NATIVE_NODE, "common node attribute: %{public}d NOT IMPLEMENT", subTypeId);
return;
}
@ -12822,7 +12832,7 @@ int32_t SetTextAttribute(ArkUI_NodeHandle node, int32_t subTypeId, const ArkUI_A
SetTextHeightAdaptivePolicy, SetTextIndent, SetTextWordBreak, SetTextEllipsisMode, SetLineSpacing,
SetFontFeature, SetTextEnableDateDetector, SetTextDataDetectorConfig, SetTextSelectedBackgroundColor,
SetTextContentWithStyledString };
if (subTypeId >= sizeof(setters) / sizeof(Setter*)) {
if (static_cast<uint32_t>(subTypeId) >= sizeof(setters) / sizeof(Setter*)) {
TAG_LOGE(AceLogTag::ACE_NATIVE_NODE, "text node attribute: %{public}d NOT IMPLEMENT", subTypeId);
return ERROR_CODE_NATIVE_IMPL_TYPE_NOT_SUPPORTED;
}
@ -12836,7 +12846,7 @@ const ArkUI_AttributeItem* GetTextAttribute(ArkUI_NodeHandle node, int32_t subTy
GetTextCopyOption, GetBaseLineOffset, GetTextShadow, GetTextMinFontSize, GetTextMaxFontSize, GetTextFont,
GetTextHeightAdaptivePolicy, GetTextIndent, GetTextWordBreak, GetTextEllipsisMode, GetLineSpacing,
GetFontFeature, GetTextEnableDateDetector, GetTextDataDetectorConfig, GetTextSelectedBackgroundColor };
if (subTypeId >= sizeof(getters) / sizeof(Getter*)) {
if (static_cast<uint32_t>(subTypeId) >= sizeof(getters) / sizeof(Getter*)) {
TAG_LOGE(AceLogTag::ACE_NATIVE_NODE, "text node attribute: %{public}d NOT IMPLEMENT", subTypeId);
return nullptr;
}
@ -12852,7 +12862,7 @@ void ResetTextAttribute(ArkUI_NodeHandle node, int32_t subTypeId)
ResetTextMinFontSize, ResetTextMaxFontSize, ResetTextFont, ResetTextHeightAdaptivePolicy, ResetTextIndent,
ResetTextWordBreak, ResetTextEllipsisMode, ResetLineSpacing, ResetFontFeature, ResetTextEnableDateDetector,
ResetTextDataDetectorConfig, ResetTextSelectedBackgroundColor, ResetTextContentWithStyledString };
if (subTypeId >= sizeof(resetters) / sizeof(Resetter*)) {
if (static_cast<uint32_t>(subTypeId) >= sizeof(resetters) / sizeof(Resetter*)) {
TAG_LOGE(AceLogTag::ACE_NATIVE_NODE, "text node attribute: %{public}d NOT IMPLEMENT", subTypeId);
return;
}
@ -12862,7 +12872,7 @@ void ResetTextAttribute(ArkUI_NodeHandle node, int32_t subTypeId)
int32_t SetSpanAttribute(ArkUI_NodeHandle node, int32_t subTypeId, const ArkUI_AttributeItem* value)
{
static Setter* setters[] = { SetSpanContent, SetSpanTextBackgroundStyle, SetBaseLineOffset };
if (subTypeId >= sizeof(setters) / sizeof(Setter*)) {
if (static_cast<uint32_t>(subTypeId) >= sizeof(setters) / sizeof(Setter*)) {
TAG_LOGE(AceLogTag::ACE_NATIVE_NODE, "span node attribute: %{public}d NOT IMPLEMENT", subTypeId);
return ERROR_CODE_NATIVE_IMPL_TYPE_NOT_SUPPORTED;
}
@ -12872,7 +12882,7 @@ int32_t SetSpanAttribute(ArkUI_NodeHandle node, int32_t subTypeId, const ArkUI_A
const ArkUI_AttributeItem* GetSpanAttribute(ArkUI_NodeHandle node, int32_t subTypeId)
{
static Getter* getters[] = { GetSpanContent, GetSpanTextBackgroundStyle, GetBaseLineOffset };
if (subTypeId >= sizeof(getters) / sizeof(Getter*)) {
if (static_cast<uint32_t>(subTypeId) >= sizeof(getters) / sizeof(Getter*)) {
TAG_LOGE(AceLogTag::ACE_NATIVE_NODE, "span node attribute: %{public}d NOT IMPLEMENT", subTypeId);
return nullptr;
}
@ -12882,7 +12892,7 @@ const ArkUI_AttributeItem* GetSpanAttribute(ArkUI_NodeHandle node, int32_t subTy
void ResetSpanAttribute(ArkUI_NodeHandle node, int32_t subTypeId)
{
static Resetter* resetters[] = { ResetSpanContent, ResetSpanTextBackgroundStyle, ResetBaselineOffset };
if (subTypeId >= sizeof(resetters) / sizeof(Resetter*)) {
if (static_cast<uint32_t>(subTypeId) >= sizeof(resetters) / sizeof(Resetter*)) {
TAG_LOGE(AceLogTag::ACE_NATIVE_NODE, "span node attribute: %{public}d NOT IMPLEMENT", subTypeId);
return;
}
@ -12902,7 +12912,7 @@ int32_t SetImageSpanAttribute(ArkUI_NodeHandle node, int32_t subTypeId, const Ar
const ArkUI_AttributeItem* GetImageSpanAttribute(ArkUI_NodeHandle node, int32_t subTypeId)
{
static Getter* getters[] = { GetImageSpanSrc, GetVerticalAlign, GetAlt };
if (subTypeId >= sizeof(getters) / sizeof(Getter*)) {
if (static_cast<uint32_t>(subTypeId) >= sizeof(getters) / sizeof(Getter*)) {
TAG_LOGE(AceLogTag::ACE_NATIVE_NODE, "image span node attribute: %{public}d NOT IMPLEMENT", subTypeId);
return nullptr;
}
@ -12934,7 +12944,7 @@ const ArkUI_AttributeItem* GetImageAttribute(ArkUI_NodeHandle node, int32_t subT
{
static Getter* getters[] = { GetImageSrc, GetObjectFit, GetInterpolation, GetObjectRepeat, GetColorFilter,
GetAutoResize, GetAlt, GetImageDraggable, GetRenderMode, GetFitOriginalSize, GetFillColor, GetResizable };
if (subTypeId >= sizeof(getters) / sizeof(Getter*)) {
if (static_cast<uint32_t>(subTypeId) >= sizeof(getters) / sizeof(Getter*)) {
TAG_LOGE(AceLogTag::ACE_NATIVE_NODE, "image node attribute: %{public}d NOT IMPLEMENT", subTypeId);
return nullptr;
}
@ -12957,7 +12967,7 @@ int32_t SetToggleAttribute(ArkUI_NodeHandle node, int32_t subTypeId, const ArkUI
{
static Setter* setters[] = { SetToggleSelectedColor, SetToggleSwitchPointColor, SetToggleValue,
SetToggleUnselectedColor };
if (subTypeId >= sizeof(setters) / sizeof(Setter*)) {
if (static_cast<uint32_t>(subTypeId) >= sizeof(setters) / sizeof(Setter*)) {
TAG_LOGE(AceLogTag::ACE_NATIVE_NODE, "toggle node attribute: %{public}d NOT IMPLEMENT", subTypeId);
return ERROR_CODE_NATIVE_IMPL_TYPE_NOT_SUPPORTED;
}
@ -12968,7 +12978,7 @@ const ArkUI_AttributeItem* GetToggleAttribute(ArkUI_NodeHandle node, int32_t sub
{
static Getter* getters[] = { GetToggleSelectedColor, GetToggleSwitchPointColor, GetToggleValue,
GetToggleUnselectedColor };
if (subTypeId >= sizeof(getters) / sizeof(Getter*)) {
if (static_cast<uint32_t>(subTypeId) >= sizeof(getters) / sizeof(Getter*)) {
TAG_LOGE(AceLogTag::ACE_NATIVE_NODE, "toggle node attribute: %{public}d NOT IMPLEMENT", subTypeId);
return nullptr;
}
@ -12980,7 +12990,7 @@ void ResetToggleAttribute(ArkUI_NodeHandle node, int32_t subTypeId)
{
static Resetter* resetters[] = { ResetToggleSelectedColor, ResetToggleSwitchPointColor, ResetToggleValue,
ResetToggleUnselectedColor };
if (subTypeId >= sizeof(resetters) / sizeof(Resetter*)) {
if (static_cast<uint32_t>(subTypeId) >= sizeof(resetters) / sizeof(Resetter*)) {
TAG_LOGE(AceLogTag::ACE_NATIVE_NODE, "toggle node attribute: %{public}d NOT IMPLEMENT", subTypeId);
return;
}
@ -12990,7 +13000,7 @@ void ResetToggleAttribute(ArkUI_NodeHandle node, int32_t subTypeId)
int32_t SetLoadingProgressAttribute(ArkUI_NodeHandle node, int32_t subTypeId, const ArkUI_AttributeItem* item)
{
static Setter* setters[] = { SetLoadingProgressColor, SetLoadingProgressEnableLoading };
if (subTypeId >= sizeof(setters) / sizeof(Setter*)) {
if (static_cast<uint32_t>(subTypeId) >= sizeof(setters) / sizeof(Setter*)) {
TAG_LOGE(AceLogTag::ACE_NATIVE_NODE, "loadingprogress node attribute: %{public}d NOT IMPLEMENT", subTypeId);
return ERROR_CODE_NATIVE_IMPL_TYPE_NOT_SUPPORTED;
}
@ -13000,7 +13010,7 @@ int32_t SetLoadingProgressAttribute(ArkUI_NodeHandle node, int32_t subTypeId, co
void ResetLoadingProgressAttribute(ArkUI_NodeHandle node, int32_t subTypeId)
{
static Resetter* resetters[] = { ResetLoadingProgressColor, ResetLoadingProgressEnableLoading };
if (subTypeId >= sizeof(resetters) / sizeof(Resetter*)) {
if (static_cast<uint32_t>(subTypeId) >= sizeof(resetters) / sizeof(Resetter*)) {
TAG_LOGE(AceLogTag::ACE_NATIVE_NODE, "loadingprogress node attribute: %{public}d NOT IMPLEMENT", subTypeId);
return;
}
@ -13010,7 +13020,7 @@ void ResetLoadingProgressAttribute(ArkUI_NodeHandle node, int32_t subTypeId)
const ArkUI_AttributeItem* GetLoadingProgressAttribute(ArkUI_NodeHandle node, int32_t subTypeId)
{
static Getter* getters[] = { GetLoadingProgressColor, GetLoadingProgressEnableLoading };
if (subTypeId >= sizeof(getters) / sizeof(Getter*)) {
if (static_cast<uint32_t>(subTypeId) >= sizeof(getters) / sizeof(Getter*)) {
TAG_LOGE(AceLogTag::ACE_NATIVE_NODE, "loadingprogress node attribute: %{public}d NOT IMPLEMENT", subTypeId);
return &g_attributeItem;
}
@ -13044,7 +13054,7 @@ const ArkUI_AttributeItem* GetTextInputAttribute(ArkUI_NodeHandle node, int32_t
GetTextInputStyle, GetTextInputCaretOffset, GetTextInputContentRect, GetTextInputContentLineCount,
GetTextInputSelectionMenuHidden, GetBlurOnSubmit, GetInputCustomKeyboard, GetTextInputWordBreak,
GetTextInputShowKeyBoardOnFocus, GetTextInputNumberOfLines};
if (subTypeId >= sizeof(getters) / sizeof(Getter*)) {
if (static_cast<uint32_t>(subTypeId) >= sizeof(getters) / sizeof(Getter*)) {
TAG_LOGE(AceLogTag::ACE_NATIVE_NODE, "textinput node attribute: %{public}d NOT IMPLEMENT", subTypeId);
return nullptr;
}
@ -13061,7 +13071,7 @@ void ResetTextInputAttribute(ArkUI_NodeHandle node, int32_t subTypeId)
ResetInputFilter, ResetTextInputStyle, ResetTextInputCaretOffset, nullptr, nullptr,
ResetTextInputSelectionMenuHidden, ResetBlurOnSubmit, ResetInputCustomKeyboard, ResetTextInputWordBreak,
ResetTextInputShowKeyBoardOnFocus, ResetTextInputNumberOfLines };
if (subTypeId >= sizeof(setters) / sizeof(Resetter*)) {
if (static_cast<uint32_t>(subTypeId) >= sizeof(setters) / sizeof(Resetter*)) {
TAG_LOGE(AceLogTag::ACE_NATIVE_NODE, "textinput node attribute: %{public}d NOT IMPLEMENT", subTypeId);
return;
}
@ -13078,7 +13088,7 @@ int32_t SetTextAreaAttribute(ArkUI_NodeHandle node, int32_t subTypeId, const Ark
SetEnterKeyType, SetEnableKeyboardOnFocus, SetTextInputCaretOffset, nullptr, nullptr,
SetTextInputTextSelection, SetTextInputEnableAutoFill, SetTextInputContentType,
SetTextInputShowKeyBoardOnFocus, SetTextInputNumberOfLines};
if (subTypeId >= sizeof(setters) / sizeof(Setter*)) {
if (static_cast<uint32_t>(subTypeId) >= sizeof(setters) / sizeof(Setter*)) {
TAG_LOGE(AceLogTag::ACE_NATIVE_NODE, "textarea node attribute: %{public}d NOT IMPLEMENT", subTypeId);
return ERROR_CODE_NATIVE_IMPL_TYPE_NOT_SUPPORTED;
}
@ -13093,7 +13103,7 @@ const ArkUI_AttributeItem* GetTextAreaAttribute(ArkUI_NodeHandle node, int32_t s
GetEnterKeyType, GetEnableKeyboardOnFocus, GetTextInputCaretOffset, GetTextInputContentRect,
GetTextInputContentLineCount, GetTextInputTextSelection, GetTextInputEnableAutoFill, GetTextInputContentType,
GetTextInputShowKeyBoardOnFocus, GetTextInputNumberOfLines};
if (subTypeId >= sizeof(getters) / sizeof(Getter*)) {
if (static_cast<uint32_t>(subTypeId) >= sizeof(getters) / sizeof(Getter*)) {
TAG_LOGE(AceLogTag::ACE_NATIVE_NODE, "textarea span node attribute: %{public}d NOT IMPLEMENT", subTypeId);
return nullptr;
}
@ -13111,7 +13121,7 @@ void ResetTextAreaAttribute(ArkUI_NodeHandle node, int32_t subTypeId)
ResetEnterKeyType, ResetEnableKeyboardOnFocus, ResetTextInputCaretOffset, nullptr, nullptr,
ResetTextInputTextSelection, ResetTextInputEnableAutoFill, ResetTextInputContentType,
ResetTextInputShowKeyBoardOnFocus, ResetTextInputNumberOfLines};
if (subTypeId >= sizeof(setters) / sizeof(Resetter*)) {
if (static_cast<uint32_t>(subTypeId) >= sizeof(setters) / sizeof(Resetter*)) {
TAG_LOGE(AceLogTag::ACE_NATIVE_NODE, "textarea node attribute: %{public}d NOT IMPLEMENT", subTypeId);
return;
}
@ -13123,7 +13133,7 @@ void ResetTextAreaAttribute(ArkUI_NodeHandle node, int32_t subTypeId)
int32_t SetButtonAttribute(ArkUI_NodeHandle node, int32_t subTypeId, const ArkUI_AttributeItem* item)
{
static Setter* setters[] = { SetButtonLabel, SetButtonType };
if (subTypeId >= sizeof(setters) / sizeof(Setter*)) {
if (static_cast<uint32_t>(subTypeId) >= sizeof(setters) / sizeof(Setter*)) {
TAG_LOGE(AceLogTag::ACE_NATIVE_NODE, "button node attribute: %{public}d NOT IMPLEMENT", subTypeId);
return ERROR_CODE_NATIVE_IMPL_TYPE_NOT_SUPPORTED;
}
@ -13133,7 +13143,7 @@ int32_t SetButtonAttribute(ArkUI_NodeHandle node, int32_t subTypeId, const ArkUI
const ArkUI_AttributeItem* GetButtonAttribute(ArkUI_NodeHandle node, int32_t subTypeId)
{
static Getter* getters[] = { GetButtonLabel, GetButtonType };
if (subTypeId >= sizeof(getters) / sizeof(Getter*)) {
if (static_cast<uint32_t>(subTypeId) >= sizeof(getters) / sizeof(Getter*)) {
TAG_LOGE(AceLogTag::ACE_NATIVE_NODE, "button node attribute: %{public}d NOT IMPLEMENT", subTypeId);
return nullptr;
}
@ -13144,7 +13154,7 @@ const ArkUI_AttributeItem* GetButtonAttribute(ArkUI_NodeHandle node, int32_t sub
void ResetButtonAttribute(ArkUI_NodeHandle node, int32_t subTypeId)
{
static Resetter* resetters[] = { ResetButtonLabel, ResetButtonType };
if (subTypeId >= sizeof(resetters) / sizeof(Resetter*)) {
if (static_cast<uint32_t>(subTypeId) >= sizeof(resetters) / sizeof(Resetter*)) {
TAG_LOGE(AceLogTag::ACE_NATIVE_NODE, "button node attribute: %{public}d NOT IMPLEMENT", subTypeId);
return;
}
@ -13154,7 +13164,7 @@ void ResetButtonAttribute(ArkUI_NodeHandle node, int32_t subTypeId)
int32_t SetProgressAttribute(ArkUI_NodeHandle node, int32_t subTypeId, const ArkUI_AttributeItem* item)
{
static Setter* setters[] = { SetProgressValue, SetProgressTotal, SetProgressColor, SetProgressType };
if (subTypeId >= sizeof(setters) / sizeof(Setter*)) {
if (static_cast<uint32_t>(subTypeId) >= sizeof(setters) / sizeof(Setter*)) {
TAG_LOGE(AceLogTag::ACE_NATIVE_NODE, "progress node attribute: %{public}d NOT IMPLEMENT", subTypeId);
return ERROR_CODE_NATIVE_IMPL_TYPE_NOT_SUPPORTED;
}
@ -13164,7 +13174,7 @@ int32_t SetProgressAttribute(ArkUI_NodeHandle node, int32_t subTypeId, const Ark
const ArkUI_AttributeItem* GetProgressAttribute(ArkUI_NodeHandle node, int32_t subTypeId)
{
static Getter* getters[] = { GetProgressValue, GetProgressTotal, GetProgressColor, GetProgressType };
if (subTypeId >= sizeof(getters) / sizeof(Getter*)) {
if (static_cast<uint32_t>(subTypeId) >= sizeof(getters) / sizeof(Getter*)) {
TAG_LOGE(AceLogTag::ACE_NATIVE_NODE, "progress node attribute: %{public}d NOT IMPLEMENT", subTypeId);
return nullptr;
}
@ -13175,7 +13185,7 @@ const ArkUI_AttributeItem* GetProgressAttribute(ArkUI_NodeHandle node, int32_t s
void ResetProgressAttribute(ArkUI_NodeHandle node, int32_t subTypeId)
{
static Resetter* resetters[] = { ResetProgressValue, ResetProgressTotal, ResetProgressColor, ResetProgressType };
if (subTypeId >= sizeof(resetters) / sizeof(Resetter*)) {
if (static_cast<uint32_t>(subTypeId) >= sizeof(resetters) / sizeof(Resetter*)) {
TAG_LOGE(AceLogTag::ACE_NATIVE_NODE, "progress node attribute: %{public}d NOT IMPLEMENT", subTypeId);
return;
}
@ -13186,7 +13196,7 @@ int32_t SetCheckboxAttribute(ArkUI_NodeHandle node, int32_t subTypeId, const Ark
{
static Setter* setters[] = { SetCheckboxSelect, SetCheckboxSelectedColor, SetCheckboxUnSelectedColor,
SetCheckboxMark, SetCheckboxShape };
if (subTypeId >= sizeof(setters) / sizeof(Setter*)) {
if (static_cast<uint32_t>(subTypeId) >= sizeof(setters) / sizeof(Setter*)) {
TAG_LOGE(AceLogTag::ACE_NATIVE_NODE, "Checkbox node attribute: %{public}d NOT IMPLEMENT", subTypeId);
return ERROR_CODE_NATIVE_IMPL_TYPE_NOT_SUPPORTED;
}
@ -13197,7 +13207,7 @@ const ArkUI_AttributeItem* GetCheckboxAttribute(ArkUI_NodeHandle node, int32_t s
{
static Getter* getters[] = { GetCheckboxSelect, GetCheckboxSelectedColor, GetCheckboxUnSelectedColor,
GetCheckboxMark, GetCheckboxShape };
if (subTypeId >= sizeof(getters) / sizeof(Getter*)) {
if (static_cast<uint32_t>(subTypeId) >= sizeof(getters) / sizeof(Getter*)) {
TAG_LOGE(AceLogTag::ACE_NATIVE_NODE, "Checkbox node attribute: %{public}d NOT IMPLEMENT", subTypeId);
return nullptr;
}
@ -13209,7 +13219,7 @@ void ResetCheckboxAttribute(ArkUI_NodeHandle node, int32_t subTypeId)
{
static Resetter* resetters[] = { ResetCheckboxSelect, ResetCheckboxSelectedColor, ResetCheckboxUnSelectedColor,
ResetCheckboxMark, ResetCheckboxShape };
if (subTypeId >= sizeof(resetters) / sizeof(Resetter*)) {
if (static_cast<uint32_t>(subTypeId) >= sizeof(resetters) / sizeof(Resetter*)) {
TAG_LOGE(AceLogTag::ACE_NATIVE_NODE, "Checkbox node attribute: %{public}d NOT IMPLEMENT", subTypeId);
return;
}
@ -13223,7 +13233,7 @@ int32_t SetXComponentAttribute(ArkUI_NodeHandle node, int32_t subTypeId, const A
SetXComponentType,
SetXComponentSurfaceSize,
};
if (subTypeId >= sizeof(setters) / sizeof(Setter*)) {
if (static_cast<uint32_t>(subTypeId) >= sizeof(setters) / sizeof(Setter*)) {
TAG_LOGE(AceLogTag::ACE_NATIVE_NODE, "xcomponent node attribute: %{public}d NOT IMPLEMENT", subTypeId);
return ERROR_CODE_NATIVE_IMPL_TYPE_NOT_SUPPORTED;
}
@ -13233,7 +13243,7 @@ int32_t SetXComponentAttribute(ArkUI_NodeHandle node, int32_t subTypeId, const A
const ArkUI_AttributeItem* GetXComponentAttribute(ArkUI_NodeHandle node, int32_t subTypeId)
{
static Getter* getters[] = { GetXComponentId, GetXComponentType, GetXComponentSurfaceSize, };
if (subTypeId >= sizeof(getters) / sizeof(Getter*)) {
if (static_cast<uint32_t>(subTypeId) >= sizeof(getters) / sizeof(Getter*)) {
TAG_LOGE(AceLogTag::ACE_NATIVE_NODE, "xcomponent node attribute: %{public}d NOT IMPLEMENT", subTypeId);
return nullptr;
}
@ -13244,7 +13254,7 @@ const ArkUI_AttributeItem* GetXComponentAttribute(ArkUI_NodeHandle node, int32_t
void ResetXComponentAttribute(ArkUI_NodeHandle node, int32_t subTypeId)
{
static Resetter* setters[] = { nullptr, ResetXComponentType, ResetXComponentSurfaceSize };
if (subTypeId >= sizeof(setters) / sizeof(Resetter*)) {
if (static_cast<uint32_t>(subTypeId) >= sizeof(setters) / sizeof(Resetter*)) {
TAG_LOGE(AceLogTag::ACE_NATIVE_NODE, "xcomponent node attribute: %{public}d NOT IMPLEMENT", subTypeId);
return;
}
@ -13257,7 +13267,7 @@ int32_t SetDatePickerAttribute(ArkUI_NodeHandle node, int32_t subTypeId, const A
{
static Setter* setters[] = { SetDatePickerLunar, SetDatePickerStart, SetDatePickerEnd, SetDatePickerSelected,
SetDatePickerDisappearTextStyle, SetDatePickerTextStyle, SetDatePickerSelectedTextStyle };
if (subTypeId >= sizeof(setters) / sizeof(Setter*)) {
if (static_cast<uint32_t>(subTypeId) >= sizeof(setters) / sizeof(Setter*)) {
TAG_LOGE(AceLogTag::ACE_NATIVE_NODE, "datepicker node attribute: %{public}d NOT IMPLEMENT", subTypeId);
return ERROR_CODE_NATIVE_IMPL_TYPE_NOT_SUPPORTED;
}
@ -13268,7 +13278,7 @@ const ArkUI_AttributeItem* GetDatePickerAttribute(ArkUI_NodeHandle node, int32_t
{
static Getter* getters[] = { GetDatePickerLunar, GetDatePickerStart, GetDatePickerEnd, GetDatePickerSelected,
GetDatePickerDisappearTextStyle, GetDatePickerTextStyle, GetDatePickerSelectedTextStyle };
if (subTypeId >= sizeof(getters) / sizeof(Getter*)) {
if (static_cast<uint32_t>(subTypeId) >= sizeof(getters) / sizeof(Getter*)) {
TAG_LOGE(AceLogTag::ACE_NATIVE_NODE, "datepicker node attribute: %{public}d NOT IMPLEMENT", subTypeId);
return &g_attributeItem;
}
@ -13280,7 +13290,7 @@ void ResetDatePickerAttribute(ArkUI_NodeHandle node, int32_t subTypeId)
static Resetter* resetters[] = { ResetDatePickerLunar, ResetDatePickerStart, ResetDatePickerEnd,
ResetDatePickerSelected, ResetDatePickerDisappearTextStyle, ResetDatePickerTextStyle,
ResetDatePickerSelectedTextStyle };
if (subTypeId >= sizeof(resetters) / sizeof(Resetter*)) {
if (static_cast<uint32_t>(subTypeId) >= sizeof(resetters) / sizeof(Resetter*)) {
TAG_LOGE(AceLogTag::ACE_NATIVE_NODE, "datepicker node attribute: %{public}d NOT IMPLEMENT", subTypeId);
return;
}
@ -13291,7 +13301,7 @@ int32_t SetTimePickerAttribute(ArkUI_NodeHandle node, int32_t subTypeId, const A
{
static Setter* setters[] = { SetTimePickerSelected, SetTimePickerUseMilitaryTime,
SetTimePickerDisappearTextStyle, SetTimePickerTextStyle, SetTimePickerSelectedTextStyle };
if (subTypeId >= sizeof(setters) / sizeof(Setter*)) {
if (static_cast<uint32_t>(subTypeId) >= sizeof(setters) / sizeof(Setter*)) {
TAG_LOGE(AceLogTag::ACE_NATIVE_NODE, "timepicker node attribute: %{public}d NOT IMPLEMENT", subTypeId);
return ERROR_CODE_NATIVE_IMPL_TYPE_NOT_SUPPORTED;
}
@ -13302,7 +13312,7 @@ const ArkUI_AttributeItem* GetTimePickerAttribute(ArkUI_NodeHandle node, int32_t
{
static Getter* getters[] = { GetTimePickerSelected, GetTimePickerUseMilitaryTime, GetTimePickerDisappearTextStyle,
GetTimePickerTextStyle, GetTimePickerSelectedTextStyle };
if (subTypeId >= sizeof(getters) / sizeof(Getter*)) {
if (static_cast<uint32_t>(subTypeId) >= sizeof(getters) / sizeof(Getter*)) {
TAG_LOGE(AceLogTag::ACE_NATIVE_NODE, "loadingprogress node attribute: %{public}d NOT IMPLEMENT", subTypeId);
return &g_attributeItem;
}
@ -13313,7 +13323,7 @@ void ResetTimePickerAttribute(ArkUI_NodeHandle node, int32_t subTypeId)
{
static Resetter* resetters[] = { ResetTimePickerSelected, ResetTimePickerUseMilitaryTime,
ResetTimePickerDisappearTextStyle, ResetTimePickerTextStyle, ResetTimePickerSelectedTextStyle };
if (subTypeId >= sizeof(resetters) / sizeof(Resetter*)) {
if (static_cast<uint32_t>(subTypeId) >= sizeof(resetters) / sizeof(Resetter*)) {
TAG_LOGE(AceLogTag::ACE_NATIVE_NODE, "timepicker node attribute: %{public}d NOT IMPLEMENT", subTypeId);
return;
}
@ -13325,7 +13335,7 @@ int32_t SetTextPickerAttribute(ArkUI_NodeHandle node, int32_t subTypeId, const A
static Setter* setters[] = { SetTextPickerRange, SetTextPickerSelected, SetTextPickerValue,
SetTextPickerDisappearTextStyle, SetTextPickerTextStyle, SetTextPickerSelectedTextStyle,
SetTextPickerSelectedIndex, SetTextPickerCanLoop, SetTextPickerDefaultPickerItemHeight };
if (subTypeId >= sizeof(setters) / sizeof(Setter*)) {
if (static_cast<uint32_t>(subTypeId) >= sizeof(setters) / sizeof(Setter*)) {
TAG_LOGE(AceLogTag::ACE_NATIVE_NODE, "textpicker node attribute: %{public}d NOT IMPLEMENT", subTypeId);
return ERROR_CODE_NATIVE_IMPL_TYPE_NOT_SUPPORTED;
}
@ -13337,7 +13347,7 @@ const ArkUI_AttributeItem* GetTextPickerAttribute(ArkUI_NodeHandle node, int32_t
static Getter* getters[] = { GetTextPickerRange, GetTextPickerSelected, GetTextPickerValue,
GetTextPickerDisappearTextStyle, GetTextPickerTextStyle, GetTextPickerSelectedTextStyle,
GetTextPickerSelectedIndex, GetTextPickerCanLoop, GetTextPickerDefaultPickerItemHeight };
if (subTypeId >= sizeof(getters) / sizeof(Getter*)) {
if (static_cast<uint32_t>(subTypeId) >= sizeof(getters) / sizeof(Getter*)) {
TAG_LOGE(AceLogTag::ACE_NATIVE_NODE, "loadingprogress node attribute: %{public}d NOT IMPLEMENT", subTypeId);
return &g_attributeItem;
}
@ -13349,7 +13359,7 @@ void ResetTextPickerAttribute(ArkUI_NodeHandle node, int32_t subTypeId)
static Resetter* resetters[] = { ResetTextPickerRange, ResetTextPickerSelectedIndex, ResetTextPickerValue,
ResetTextPickerDisappearTextStyle, ResetTextPickerTextStyle, ResetTextPickerSelectedTextStyle,
ResetTextPickerSelectedIndex, ResetTextPickerCanLoop, ResetTextPickerDefaultPickerItemHeight };
if (subTypeId >= sizeof(resetters) / sizeof(Resetter*)) {
if (static_cast<uint32_t>(subTypeId) >= sizeof(resetters) / sizeof(Resetter*)) {
TAG_LOGE(AceLogTag::ACE_NATIVE_NODE, "timepicker node attribute: %{public}d NOT IMPLEMENT", subTypeId);
return;
}
@ -13359,7 +13369,7 @@ void ResetTextPickerAttribute(ArkUI_NodeHandle node, int32_t subTypeId)
int32_t SetCalendarPickerAttribute(ArkUI_NodeHandle node, int32_t subTypeId, const ArkUI_AttributeItem* item)
{
static Setter* setters[] = { SetHintRadius, SetSelectedDate, SetEdgeAlignment, SetCalendarPickerTextStyle };
if (subTypeId >= sizeof(setters) / sizeof(Setter*)) {
if (static_cast<uint32_t>(subTypeId) >= sizeof(setters) / sizeof(Setter*)) {
TAG_LOGE(AceLogTag::ACE_NATIVE_NODE, "calendar picker node attribute: %{public}d NOT IMPLEMENT", subTypeId);
return ERROR_CODE_NATIVE_IMPL_TYPE_NOT_SUPPORTED;
}
@ -13370,7 +13380,7 @@ void ResetCalendarPickerAttribute(ArkUI_NodeHandle node, int32_t subTypeId)
{
static Resetter* resetters[] = { ResetHintRadius, ResetSelectedDate, ResetEdgeAlignment,
ResetCalendarPickerTextStyle };
if (subTypeId >= sizeof(resetters) / sizeof(Resetter*)) {
if (static_cast<uint32_t>(subTypeId) >= sizeof(resetters) / sizeof(Resetter*)) {
TAG_LOGE(AceLogTag::ACE_NATIVE_NODE, "calendar picker node attribute: %{public}d NOT IMPLEMENT", subTypeId);
return;
}
@ -13380,7 +13390,7 @@ void ResetCalendarPickerAttribute(ArkUI_NodeHandle node, int32_t subTypeId)
const ArkUI_AttributeItem* GetCalendarPickerAttribute(ArkUI_NodeHandle node, int32_t subTypeId)
{
static Getter* getters[] = { GetHintRadius, GetSelectedDate, GetEdgeAlignment, GetCalendarPickerTextStyle };
if (subTypeId >= sizeof(getters) / sizeof(Getter*)) {
if (static_cast<uint32_t>(subTypeId) >= sizeof(getters) / sizeof(Getter*)) {
TAG_LOGE(AceLogTag::ACE_NATIVE_NODE, "calendar picker node attribute: %{public}d NOT IMPLEMENT", subTypeId);
return nullptr;
}
@ -13405,7 +13415,7 @@ int32_t SetSliderAttribute(ArkUI_NodeHandle node, int32_t subTypeId, const ArkUI
SetSliderTrackThickness,
SetSliderValidSlideRange,
};
if (subTypeId >= sizeof(setters) / sizeof(Setter*)) {
if (static_cast<uint32_t>(subTypeId) >= sizeof(setters) / sizeof(Setter*)) {
TAG_LOGE(AceLogTag::ACE_NATIVE_NODE, "slider node attribute: %{public}d NOT IMPLEMENT", subTypeId);
return ERROR_CODE_NATIVE_IMPL_TYPE_NOT_SUPPORTED;
}
@ -13430,7 +13440,7 @@ const ArkUI_AttributeItem* GetSliderAttribute(ArkUI_NodeHandle node, int32_t sub
GetSliderTrackThickness,
GetSliderValidSlideRange,
};
if (subTypeId >= sizeof(getters) / sizeof(Getter*)) {
if (static_cast<uint32_t>(subTypeId) >= sizeof(getters) / sizeof(Getter*)) {
TAG_LOGE(AceLogTag::ACE_NATIVE_NODE, "slider node attribute: %{public}d NOT IMPLEMENT", subTypeId);
return nullptr;
}
@ -13456,7 +13466,7 @@ void ResetSliderAttribute(ArkUI_NodeHandle node, int32_t subTypeId)
ResetSliderTrackThickness,
ResetSliderValidSlideRange,
};
if (subTypeId >= sizeof(resetters) / sizeof(Resetter*)) {
if (static_cast<uint32_t>(subTypeId) >= sizeof(resetters) / sizeof(Resetter*)) {
TAG_LOGE(AceLogTag::ACE_NATIVE_NODE, "slider node attribute: %{public}d NOT IMPLEMENT", subTypeId);
return;
}
@ -13466,7 +13476,7 @@ void ResetSliderAttribute(ArkUI_NodeHandle node, int32_t subTypeId)
int32_t SetRadioAttribute(ArkUI_NodeHandle node, int32_t subTypeId, const ArkUI_AttributeItem* item)
{
static Setter* setters[] = { SetRadioChecked, SetRadioStyle, SetRadioValue, SetRadioGroup };
if (subTypeId >= sizeof(setters) / sizeof(Setter*)) {
if (static_cast<uint32_t>(subTypeId) >= sizeof(setters) / sizeof(Setter*)) {
TAG_LOGE(AceLogTag::ACE_NATIVE_NODE, "radio node attribute: %{public}d NOT IMPLEMENT", subTypeId);
return ERROR_CODE_NATIVE_IMPL_TYPE_NOT_SUPPORTED;
}
@ -13476,7 +13486,7 @@ int32_t SetRadioAttribute(ArkUI_NodeHandle node, int32_t subTypeId, const ArkUI_
const ArkUI_AttributeItem* GetRadioAttribute(ArkUI_NodeHandle node, int32_t subTypeId)
{
static Getter* getters[] = { GetRadioChecked, GetRadioStyle, GetRadioValue, GetRadioGroup };
if (subTypeId >= sizeof(getters) / sizeof(Getter*)) {
if (static_cast<uint32_t>(subTypeId) >= sizeof(getters) / sizeof(Getter*)) {
TAG_LOGE(AceLogTag::ACE_NATIVE_NODE, "radio node attribute: %{public}d NOT IMPLEMENT", subTypeId);
return nullptr;
}
@ -13487,7 +13497,7 @@ const ArkUI_AttributeItem* GetRadioAttribute(ArkUI_NodeHandle node, int32_t subT
void ResetRadioAttribute(ArkUI_NodeHandle node, int32_t subTypeId)
{
static Resetter* resetters[] = { ResetRadioChecked, ResetRadioStyle, ResetRadioValue, ResetRadioGroup };
if (subTypeId >= sizeof(resetters) / sizeof(Resetter*)) {
if (static_cast<uint32_t>(subTypeId) >= sizeof(resetters) / sizeof(Resetter*)) {
TAG_LOGE(AceLogTag::ACE_NATIVE_NODE, "radio node attribute: %{public}d NOT IMPLEMENT", subTypeId);
return;
}
@ -13498,7 +13508,7 @@ int32_t SetImageAnimatorAttribute(ArkUI_NodeHandle node, int32_t subTypeId, cons
{
static Setter* setters[] = { SetImageAnimatorSrc, SetImageAnimatorState, SetImageAnimatorDuration,
SetImageAnimatorReverse, SetImageAnimatorFixedSize, SetImageAnimatorFillMode, SetImageAnimatorIterations };
if (subTypeId >= sizeof(setters) / sizeof(Setter*)) {
if (static_cast<uint32_t>(subTypeId) >= sizeof(setters) / sizeof(Setter*)) {
TAG_LOGE(AceLogTag::ACE_NATIVE_NODE, "imageAnimator node attribute: %{public}d NOT IMPLEMENT", subTypeId);
return ERROR_CODE_NATIVE_IMPL_TYPE_NOT_SUPPORTED;
}
@ -13509,7 +13519,7 @@ const ArkUI_AttributeItem* GetImageAnimatorAttribute(ArkUI_NodeHandle node, int3
{
static Getter* getters[] = { GetImageAnimatorSrc, GetImageAnimatorState, GetImageAnimatorDuration,
GetImageAnimatorReverse, GetImageAnimatorFixedSize, GetImageAnimatorFillMode, GetImageAnimatorIterations };
if (subTypeId >= sizeof(getters) / sizeof(Getter*)) {
if (static_cast<uint32_t>(subTypeId) >= sizeof(getters) / sizeof(Getter*)) {
TAG_LOGE(AceLogTag::ACE_NATIVE_NODE, "imageAnimator node attribute: %{public}d NOT IMPLEMENT", subTypeId);
return nullptr;
}
@ -13521,7 +13531,7 @@ void ResetImageAnimatorAttribute(ArkUI_NodeHandle node, int32_t subTypeId)
static Resetter* setters[] = { ResetImageAnimatorSrc, ResetImageAnimatorState, ResetImageAnimatorDuration,
ResetImageAnimatorReverse, ResetImageAnimatorFixedSize, ResetImageAnimatorFillMode,
ResetImageAnimatorIterations };
if (subTypeId >= sizeof(setters) / sizeof(Resetter*)) {
if (static_cast<uint32_t>(subTypeId) >= sizeof(setters) / sizeof(Resetter*)) {
TAG_LOGE(AceLogTag::ACE_NATIVE_NODE, "imageAnimator node attribute: %{public}d NOT IMPLEMENT", subTypeId);
return;
}
@ -13531,7 +13541,7 @@ void ResetImageAnimatorAttribute(ArkUI_NodeHandle node, int32_t subTypeId)
int32_t SetStackAttribute(ArkUI_NodeHandle node, int32_t subTypeId, const ArkUI_AttributeItem* item)
{
static Setter* setters[] = { SetAlignContent };
if (subTypeId >= sizeof(setters) / sizeof(Setter*)) {
if (static_cast<uint32_t>(subTypeId) >= sizeof(setters) / sizeof(Setter*)) {
TAG_LOGE(AceLogTag::ACE_NATIVE_NODE, "stack node attribute: %{public}d NOT IMPLEMENT", subTypeId);
return ERROR_CODE_NATIVE_IMPL_TYPE_NOT_SUPPORTED;
}
@ -13541,7 +13551,7 @@ int32_t SetStackAttribute(ArkUI_NodeHandle node, int32_t subTypeId, const ArkUI_
const ArkUI_AttributeItem* GetStackAttribute(ArkUI_NodeHandle node, int32_t subTypeId)
{
static Getter* getters[] = { GetAlignContent };
if (subTypeId >= sizeof(getters) / sizeof(Getter*)) {
if (static_cast<uint32_t>(subTypeId) >= sizeof(getters) / sizeof(Getter*)) {
TAG_LOGE(AceLogTag::ACE_NATIVE_NODE, "stack node attribute: %{public}d NOT IMPLEMENT", subTypeId);
return nullptr;
}
@ -13551,7 +13561,7 @@ const ArkUI_AttributeItem* GetStackAttribute(ArkUI_NodeHandle node, int32_t subT
void ResetStackAttribute(ArkUI_NodeHandle node, int32_t subTypeId)
{
static Resetter* setters[] = { ResetAlignContent };
if (subTypeId >= sizeof(setters) / sizeof(Resetter*)) {
if (static_cast<uint32_t>(subTypeId) >= sizeof(setters) / sizeof(Resetter*)) {
TAG_LOGE(AceLogTag::ACE_NATIVE_NODE, "stack node attribute: %{public}d NOT IMPLEMENT", subTypeId);
return;
}
@ -13565,7 +13575,7 @@ int32_t SetSwiperAttribute(ArkUI_NodeHandle node, int32_t subTypeId, const ArkUI
SetSwiperDisableSwipe, SetSwiperShowDisplayArrow, SetSwiperEffectMode, SetSwiperNodeAdapter,
SetSwiperCachedCount, SetSwiperPrevMargin, SetSwiperNextMargin, SetSwiperIndicator, SetSwiperNestedScroll,
SetSwiperToIndex, SetSwiperIndicatorInteractive };
if (subTypeId >= sizeof(setters) / sizeof(Setter*)) {
if (static_cast<uint32_t>(subTypeId) >= sizeof(setters) / sizeof(Setter*)) {
TAG_LOGE(AceLogTag::ACE_NATIVE_NODE, "swiper node attribute: %{public}d NOT IMPLEMENT", subTypeId);
return ERROR_CODE_NATIVE_IMPL_TYPE_NOT_SUPPORTED;
}
@ -13594,7 +13604,7 @@ const ArkUI_AttributeItem* GetSwiperAttribute(ArkUI_NodeHandle node, int32_t sub
GetSwiperDisableSwipe, GetSwiperShowDisplayArrow, GetSwiperEffectMode, GetSwiperNodeAdapter,
GetSwiperCachedCount, GetSwiperPrevMargin, GetSwiperNextMargin, GetSwiperIndicator, GetSwiperNestedScroll,
nullptr, GetSwiperIndicatorInteractive };
if (subTypeId >= sizeof(getters) / sizeof(Getter*)) {
if (static_cast<uint32_t>(subTypeId) >= sizeof(getters) / sizeof(Getter*)) {
TAG_LOGE(AceLogTag::ACE_NATIVE_NODE, "swiper node attribute: %{public}d NOT IMPLEMENT", subTypeId);
return nullptr;
}
@ -13608,7 +13618,7 @@ int32_t SetScrollAttribute(ArkUI_NodeHandle node, int32_t subTypeId, const ArkUI
SetScrollScrollable, SetScrollEdgeEffect, SetScrollEnableScrollInteraction, SetScrollFriction,
SetScrollScrollSnap, SetScrollNestedScroll, SetScrollTo, SetScrollEdge, SetScrollEnablePaging,
SetScrollPage, SetScrollBy };
if (subTypeId >= sizeof(setters) / sizeof(Setter*)) {
if (static_cast<uint32_t>(subTypeId) >= sizeof(setters) / sizeof(Setter*)) {
TAG_LOGE(AceLogTag::ACE_NATIVE_NODE, "scroll node attribute: %{public}d NOT IMPLEMENT", subTypeId);
return ERROR_CODE_NATIVE_IMPL_TYPE_NOT_SUPPORTED;
}
@ -13621,7 +13631,7 @@ const ArkUI_AttributeItem* GetScrollAttribute(ArkUI_NodeHandle node, int32_t sub
GetScrollScrollable, GetScrollEdgeEffect, GetScrollEnableScrollInteraction, GetScrollFriction,
GetScrollScrollSnap, GetScrollNestedScroll, GetScrollOffset, GetScrollEdge, GetScrollEnablePaging,
nullptr, nullptr };
if (subTypeId >= sizeof(getters) / sizeof(Getter*)) {
if (static_cast<uint32_t>(subTypeId) >= sizeof(getters) / sizeof(Getter*)) {
TAG_LOGE(AceLogTag::ACE_NATIVE_NODE, "slider node attribute: %{public}d NOT IMPLEMENT", subTypeId);
return nullptr;
}
@ -13635,7 +13645,7 @@ void ResetScrollAttribute(ArkUI_NodeHandle node, int32_t subTypeId)
ResetScrollScrollable, ResetScrollEdgeEffect, ResetScrollEnableScrollInteraction, ResetScrollFriction,
ResetScrollScrollSnap, ResetScrollNestedScroll, ResetScrollTo, ResetScrollEdge, ResetScrollEnablePaging,
nullptr, nullptr };
if (subTypeId >= sizeof(resetters) / sizeof(Resetter*)) {
if (static_cast<uint32_t>(subTypeId) >= sizeof(resetters) / sizeof(Resetter*)) {
TAG_LOGE(AceLogTag::ACE_NATIVE_NODE, "list node attribute: %{public}d NOT IMPLEMENT", subTypeId);
return;
}
@ -13646,7 +13656,7 @@ int32_t SetListAttribute(ArkUI_NodeHandle node, int32_t subTypeId, const ArkUI_A
{
static Setter* setters[] = { SetListDirection, SetListSticky, SetListSpace, SetListNodeAdapter, SetListCachedCount,
SetListScrollToIndex, SetListAlignListItem, SetListChildrenMainSize, SetListInitialIndex, SetListDivider };
if (subTypeId >= sizeof(setters) / sizeof(Setter*)) {
if (static_cast<uint32_t>(subTypeId) >= sizeof(setters) / sizeof(Setter*)) {
TAG_LOGE(AceLogTag::ACE_NATIVE_NODE, "list node attribute: %{public}d NOT IMPLEMENT", subTypeId);
return ERROR_CODE_NATIVE_IMPL_TYPE_NOT_SUPPORTED;
}
@ -13657,7 +13667,7 @@ const ArkUI_AttributeItem* GetListAttribute(ArkUI_NodeHandle node, int32_t subTy
{
static Getter* getters[] = { GetListDirection, GetListSticky, GetListSpace, GetListNodeAdapter, GetListCachedCount,
nullptr, GetListAlignListItem, nullptr, GetListInitialIndex, GetListDivider };
if (subTypeId >= sizeof(getters) / sizeof(Getter*)) {
if (static_cast<uint32_t>(subTypeId) >= sizeof(getters) / sizeof(Getter*)) {
TAG_LOGE(AceLogTag::ACE_NATIVE_NODE, "loadingprogress node attribute: %{public}d NOT IMPLEMENT", subTypeId);
return &g_attributeItem;
}
@ -13669,7 +13679,7 @@ void ResetListAttribute(ArkUI_NodeHandle node, int32_t subTypeId)
static Resetter* resetters[] = { ResetListDirection, ResetListSticky, ResetListSpace, ResetListNodeAdapter,
ResetListCachedCount, nullptr, ResetListAlignListItem, ResetListChildrenMainSize, ResetListInitialIndex,
ResetListDivider };
if (subTypeId >= sizeof(resetters) / sizeof(Resetter*)) {
if (static_cast<uint32_t>(subTypeId) >= sizeof(resetters) / sizeof(Resetter*)) {
TAG_LOGE(AceLogTag::ACE_NATIVE_NODE, "list node attribute: %{public}d NOT IMPLEMENT", subTypeId);
return;
}
@ -13679,7 +13689,7 @@ void ResetListAttribute(ArkUI_NodeHandle node, int32_t subTypeId)
int32_t SetListItemAttribute(ArkUI_NodeHandle node, int32_t subTypeId, const ArkUI_AttributeItem* item)
{
static Setter* setters[] = { SetListItemSwiperAction };
if (subTypeId >= sizeof(setters) / sizeof(Setter*)) {
if (static_cast<uint32_t>(subTypeId) >= sizeof(setters) / sizeof(Setter*)) {
TAG_LOGE(AceLogTag::ACE_NATIVE_NODE, "listitem node attribute: %{public}d NOT IMPLEMENT", subTypeId);
return ERROR_CODE_NATIVE_IMPL_TYPE_NOT_SUPPORTED;
}
@ -13689,7 +13699,7 @@ int32_t SetListItemAttribute(ArkUI_NodeHandle node, int32_t subTypeId, const Ark
void ResetListItemAttribute(ArkUI_NodeHandle node, int32_t subTypeId)
{
static Resetter* resetters[] = { ResetListItemSwiperAction };
if (subTypeId >= sizeof(resetters) / sizeof(Resetter*)) {
if (static_cast<uint32_t>(subTypeId) >= sizeof(resetters) / sizeof(Resetter*)) {
TAG_LOGE(AceLogTag::ACE_NATIVE_NODE, "listitem node attribute: %{public}d NOT IMPLEMENT", subTypeId);
return;
}
@ -13702,7 +13712,7 @@ int32_t SetListItemGroupAttribute(ArkUI_NodeHandle node, int32_t subTypeId, cons
{
static Setter* setters[] = { SetListItemGroupHeader, SetListItemGroupFooter, SetListItemGroupDivider,
SetListItemGroupChildrenMainSize };
if (subTypeId >= sizeof(setters) / sizeof(Setter*)) {
if (static_cast<uint32_t>(subTypeId) >= sizeof(setters) / sizeof(Setter*)) {
TAG_LOGE(AceLogTag::ACE_NATIVE_NODE, "listitemgroup node attribute: %{public}d NOT IMPLEMENT", subTypeId);
return ERROR_CODE_NATIVE_IMPL_TYPE_NOT_SUPPORTED;
}
@ -13712,7 +13722,7 @@ int32_t SetListItemGroupAttribute(ArkUI_NodeHandle node, int32_t subTypeId, cons
void ResetListItemGroupAttribute(ArkUI_NodeHandle node, int32_t subTypeId)
{
static Resetter* resetters[] = { nullptr, nullptr, ResetListItemGroupDivider, ResetListItemGroupChildrenMainSize };
if (subTypeId >= sizeof(resetters) / sizeof(Resetter*)) {
if (static_cast<uint32_t>(subTypeId) >= sizeof(resetters) / sizeof(Resetter*)) {
TAG_LOGE(AceLogTag::ACE_NATIVE_NODE, "ListItemGroup node attribute: %{public}d NOT IMPLEMENT", subTypeId);
return;
}
@ -13724,7 +13734,7 @@ void ResetListItemGroupAttribute(ArkUI_NodeHandle node, int32_t subTypeId)
const ArkUI_AttributeItem* GetListItemGroupAttribute(ArkUI_NodeHandle node, int32_t subTypeId)
{
static Getter* getters[] = { nullptr, nullptr, GetListItemGroupDivider, nullptr };
if (subTypeId >= sizeof(getters) / sizeof(Getter*)) {
if (static_cast<uint32_t>(subTypeId) >= sizeof(getters) / sizeof(Getter*)) {
TAG_LOGE(AceLogTag::ACE_NATIVE_NODE, "ListItemGroup node attribute: %{public}d NOT IMPLEMENT", subTypeId);
return nullptr;
}
@ -13735,7 +13745,7 @@ const ArkUI_AttributeItem* GetListItemGroupAttribute(ArkUI_NodeHandle node, int3
int32_t SetColumnAttribute(ArkUI_NodeHandle node, int32_t subTypeId, const ArkUI_AttributeItem* item)
{
static Setter* setters[] = { SetAlignItems, SetJustifyContent };
if (subTypeId >= sizeof(setters) / sizeof(Setter*)) {
if (static_cast<uint32_t>(subTypeId) >= sizeof(setters) / sizeof(Setter*)) {
TAG_LOGE(AceLogTag::ACE_NATIVE_NODE, "column node attribute: %{public}d NOT IMPLEMENT", subTypeId);
return ERROR_CODE_NATIVE_IMPL_TYPE_NOT_SUPPORTED;
}
@ -13745,7 +13755,7 @@ int32_t SetColumnAttribute(ArkUI_NodeHandle node, int32_t subTypeId, const ArkUI
void ResetColumnAttribute(ArkUI_NodeHandle node, int32_t subTypeId)
{
static Resetter* resetters[] = { ResetAlignItems, ResetJustifyContent };
if (subTypeId >= sizeof(resetters) / sizeof(Resetter*)) {
if (static_cast<uint32_t>(subTypeId) >= sizeof(resetters) / sizeof(Resetter*)) {
TAG_LOGE(AceLogTag::ACE_NATIVE_NODE, "column node attribute: %{public}d NOT IMPLEMENT", subTypeId);
return;
}
@ -13755,7 +13765,7 @@ void ResetColumnAttribute(ArkUI_NodeHandle node, int32_t subTypeId)
const ArkUI_AttributeItem* GetColumnAttribute(ArkUI_NodeHandle node, int32_t subTypeId)
{
static Getter* getters[] = { GetAlignItems, GetJustifyContent };
if (subTypeId >= sizeof(getters) / sizeof(Getter*)) {
if (static_cast<uint32_t>(subTypeId) >= sizeof(getters) / sizeof(Getter*)) {
TAG_LOGE(AceLogTag::ACE_NATIVE_NODE, "column node attribute: %{public}d NOT IMPLEMENT", subTypeId);
return nullptr;
}
@ -13766,7 +13776,7 @@ const ArkUI_AttributeItem* GetColumnAttribute(ArkUI_NodeHandle node, int32_t sub
int32_t SetRowAttribute(ArkUI_NodeHandle node, int32_t subTypeId, const ArkUI_AttributeItem* item)
{
static Setter* setters[] = { SetAlignItems, SetJustifyContent };
if (subTypeId >= sizeof(setters) / sizeof(Setter*)) {
if (static_cast<uint32_t>(subTypeId) >= sizeof(setters) / sizeof(Setter*)) {
TAG_LOGE(AceLogTag::ACE_NATIVE_NODE, "row node attribute: %{public}d NOT IMPLEMENT", subTypeId);
return ERROR_CODE_NATIVE_IMPL_TYPE_NOT_SUPPORTED;
}
@ -13776,7 +13786,7 @@ int32_t SetRowAttribute(ArkUI_NodeHandle node, int32_t subTypeId, const ArkUI_At
void ResetRowAttribute(ArkUI_NodeHandle node, int32_t subTypeId)
{
static Resetter* resetters[] = { ResetAlignItems, ResetJustifyContent };
if (subTypeId >= sizeof(resetters) / sizeof(Resetter*)) {
if (static_cast<uint32_t>(subTypeId) >= sizeof(resetters) / sizeof(Resetter*)) {
TAG_LOGE(AceLogTag::ACE_NATIVE_NODE, "row node attribute: %{public}d NOT IMPLEMENT", subTypeId);
return;
}
@ -13786,7 +13796,7 @@ void ResetRowAttribute(ArkUI_NodeHandle node, int32_t subTypeId)
const ArkUI_AttributeItem* GetRowAttribute(ArkUI_NodeHandle node, int32_t subTypeId)
{
static Getter* getters[] = { GetAlignItems, GetJustifyContent };
if (subTypeId >= sizeof(getters) / sizeof(Getter*)) {
if (static_cast<uint32_t>(subTypeId) >= sizeof(getters) / sizeof(Getter*)) {
TAG_LOGE(AceLogTag::ACE_NATIVE_NODE, "row node attribute: %{public}d NOT IMPLEMENT", subTypeId);
return nullptr;
}
@ -13797,7 +13807,7 @@ const ArkUI_AttributeItem* GetRowAttribute(ArkUI_NodeHandle node, int32_t subTyp
int32_t SetFlexAttribute(ArkUI_NodeHandle node, int32_t subTypeId, const ArkUI_AttributeItem* item)
{
static Setter* setters[] = { SetFlexOptions };
if (subTypeId >= sizeof(setters) / sizeof(Setter*)) {
if (static_cast<uint32_t>(subTypeId) >= sizeof(setters) / sizeof(Setter*)) {
TAG_LOGE(AceLogTag::ACE_NATIVE_NODE, "flex node attribute: %{public}d NOT IMPLEMENT", subTypeId);
return ERROR_CODE_NATIVE_IMPL_TYPE_NOT_SUPPORTED;
}
@ -13807,7 +13817,7 @@ int32_t SetFlexAttribute(ArkUI_NodeHandle node, int32_t subTypeId, const ArkUI_A
void ResetFlexAttribute(ArkUI_NodeHandle node, int32_t subTypeId)
{
static Resetter* resetters[] = { ResetFlexOptions };
if (subTypeId >= sizeof(resetters) / sizeof(Resetter*)) {
if (static_cast<uint32_t>(subTypeId) >= sizeof(resetters) / sizeof(Resetter*)) {
TAG_LOGE(AceLogTag::ACE_NATIVE_NODE, "flex node attribute: %{public}d NOT IMPLEMENT", subTypeId);
return;
}
@ -13817,7 +13827,7 @@ void ResetFlexAttribute(ArkUI_NodeHandle node, int32_t subTypeId)
const ArkUI_AttributeItem* GetFlexAttribute(ArkUI_NodeHandle node, int32_t subTypeId)
{
static Getter* getters[] = { GetFlexOptions };
if (subTypeId >= sizeof(getters) / sizeof(Getter*)) {
if (static_cast<uint32_t>(subTypeId) >= sizeof(getters) / sizeof(Getter*)) {
TAG_LOGE(AceLogTag::ACE_NATIVE_NODE, "flex node attribute: %{public}d NOT IMPLEMENT", subTypeId);
return nullptr;
}
@ -13829,7 +13839,7 @@ int32_t SetRefreshAttribute(ArkUI_NodeHandle node, int32_t subTypeId, const ArkU
{
static Setter* setters[] = { SetRefreshRefreshing, SetRefreshContent, SetRefreshPullDownRatio, SetRefreshOffset,
SetPullToRefresh };
if (subTypeId >= sizeof(setters) / sizeof(Setter*)) {
if (static_cast<uint32_t>(subTypeId) >= sizeof(setters) / sizeof(Setter*)) {
TAG_LOGE(AceLogTag::ACE_NATIVE_NODE, "refresh node attribute: %{public}d NOT IMPLEMENT", subTypeId);
return ERROR_CODE_NATIVE_IMPL_TYPE_NOT_SUPPORTED;
}
@ -13840,7 +13850,7 @@ const ArkUI_AttributeItem* GetRefreshAttribute(ArkUI_NodeHandle node, int32_t su
{
static Getter* getters[] = { GetRefreshRefreshing, nullptr, GetRefreshPullDownRatio, GetRefreshOffset,
GetPullToRefresh };
if (subTypeId >= sizeof(getters) / sizeof(Getter*)) {
if (static_cast<uint32_t>(subTypeId) >= sizeof(getters) / sizeof(Getter*)) {
TAG_LOGE(AceLogTag::ACE_NATIVE_NODE, "refresh node attribute: %{public}d NOT IMPLEMENT", subTypeId);
return nullptr;
}
@ -13855,7 +13865,7 @@ void ResetRefreshAttribute(ArkUI_NodeHandle node, int32_t subTypeId)
{
static Resetter* resetters[] = { nullptr, ResetRefreshContent, ResetRefreshPullDownRatio, ResetRefreshOffset,
ResetPullToRefresh };
if (subTypeId >= sizeof(resetters) / sizeof(Resetter*)) {
if (static_cast<uint32_t>(subTypeId) >= sizeof(resetters) / sizeof(Resetter*)) {
TAG_LOGE(AceLogTag::ACE_NATIVE_NODE, "refresh node attribute: %{public}d NOT IMPLEMENT", subTypeId);
return;
}
@ -13869,7 +13879,7 @@ int32_t SetWaterFlowAttribute(ArkUI_NodeHandle node, int32_t subTypeId, const Ar
static Setter* setters[] = { SetLayoutDirection, SetColumnsTemplate, SetRowsTemplate, SetWaterFlowColumnsGap,
SetWaterFlowRowsGap, SetWaterFlowSectionOption, SetWaterFlowNodeAdapter, SetWaterFlowCachedCount,
SetWaterFlowFooter, SetWaterFlowScrollToIndex, SetItemConstraintSize };
if (subTypeId >= sizeof(setters) / sizeof(Setter*)) {
if (static_cast<uint32_t>(subTypeId) >= sizeof(setters) / sizeof(Setter*)) {
TAG_LOGE(AceLogTag::ACE_NATIVE_NODE, "waterFlow node attribute: %{public}d NOT IMPLEMENT", subTypeId);
return ERROR_CODE_NATIVE_IMPL_TYPE_NOT_SUPPORTED;
}
@ -13881,7 +13891,7 @@ void ResetWaterFlowAttribute(ArkUI_NodeHandle node, int32_t subTypeId)
static Resetter* resetters[] = { ResetLayoutDirection, ResetColumnsTemplate, ResetRowsTemplate,
ResetWaterFlowColumnsGap, ResetWaterFlowRowsGap, ResetWaterFlowSectionOption, ResetWaterFlowNodeAdapter,
ResetWaterFlowCachedCount, ResetWaterFlowFooter, nullptr, ResetItemConstraintSize };
if (subTypeId >= sizeof(resetters) / sizeof(Resetter*)) {
if (static_cast<uint32_t>(subTypeId) >= sizeof(resetters) / sizeof(Resetter*)) {
TAG_LOGE(AceLogTag::ACE_NATIVE_NODE, "waterFlow node attribute: %{public}d NOT IMPLEMENT", subTypeId);
return;
}
@ -13893,7 +13903,7 @@ const ArkUI_AttributeItem* GetWaterFlowAttribute(ArkUI_NodeHandle node, int32_t
static Getter* getters[] = { GetLayoutDirection, GetColumnsTemplate, GetRowsTemplate, GetWaterFlowColumnsGap,
GetWaterFlowRowsGap, GetWaterFlowSectionOption, GetWaterFlowNodeAdapter, GetWaterFlowCachedCount,
nullptr, nullptr, GetItemConstraintSize };
if (subTypeId >= sizeof(getters) / sizeof(Getter*)) {
if (static_cast<uint32_t>(subTypeId) >= sizeof(getters) / sizeof(Getter*)) {
TAG_LOGE(AceLogTag::ACE_NATIVE_NODE, "waterFlow node attribute: %{public}d NOT IMPLEMENT", subTypeId);
return nullptr;
}
@ -13904,7 +13914,7 @@ const ArkUI_AttributeItem* GetWaterFlowAttribute(ArkUI_NodeHandle node, int32_t
int32_t SetRelativeContainerAttribute(ArkUI_NodeHandle node, int32_t subTypeId, const ArkUI_AttributeItem* item)
{
static Setter* setters[] = { SetRelativeContainerGuideLine, SetRelativeContainerBarrier };
if (subTypeId >= sizeof(setters) / sizeof(Setter*)) {
if (static_cast<uint32_t>(subTypeId) >= sizeof(setters) / sizeof(Setter*)) {
TAG_LOGE(AceLogTag::ACE_NATIVE_NODE, "RelativeContainer node attribute: %{public}d NOT IMPLEMENT", subTypeId);
return ERROR_CODE_NATIVE_IMPL_TYPE_NOT_SUPPORTED;
}
@ -13915,7 +13925,7 @@ int32_t SetGridAttribute(ArkUI_NodeHandle node, int32_t subTypeId, const ArkUI_A
{
static Setter* setters[] = { SetGridColumnsTemplate, SetGridRowsTemplate, SetGridColumnsGap, SetGridRowsGap,
SetGridNodeAdapter, SetGridCachedCount };
if (subTypeId >= sizeof(setters) / sizeof(Setter*)) {
if (static_cast<uint32_t>(subTypeId) >= sizeof(setters) / sizeof(Setter*)) {
TAG_LOGE(AceLogTag::ACE_NATIVE_NODE, "Grid node attribute: %{public}d NOT IMPLEMENT", subTypeId);
return ERROR_CODE_NATIVE_IMPL_TYPE_NOT_SUPPORTED;
}
@ -13925,7 +13935,7 @@ int32_t SetGridAttribute(ArkUI_NodeHandle node, int32_t subTypeId, const ArkUI_A
void ResetRelativeContainerAttribute(ArkUI_NodeHandle node, int32_t subTypeId)
{
static Resetter* resetters[] = { ResetRelativeContainerGuideLine, ResetRelativeContainerBarrier };
if (subTypeId >= sizeof(resetters) / sizeof(Resetter*)) {
if (static_cast<uint32_t>(subTypeId) >= sizeof(resetters) / sizeof(Resetter*)) {
TAG_LOGE(AceLogTag::ACE_NATIVE_NODE, "RelativeContainer node attribute: %{public}d NOT IMPLEMENT", subTypeId);
return;
}
@ -13936,7 +13946,7 @@ void ResetGridAttribute(ArkUI_NodeHandle node, int32_t subTypeId)
{
static Resetter* resetters[] = { ResetGridColumnsTemplate, ResetGridRowsTemplate, ResetGridColumnsGap,
ResetGridRowsGap, ResetGridNodeAdapter, ResetGridCachedCount };
if (subTypeId >= sizeof(resetters) / sizeof(Resetter*)) {
if (static_cast<uint32_t>(subTypeId) >= sizeof(resetters) / sizeof(Resetter*)) {
TAG_LOGE(AceLogTag::ACE_NATIVE_NODE, "Grid node attribute: %{public}d NOT IMPLEMENT", subTypeId);
return;
}
@ -13946,7 +13956,7 @@ void ResetGridAttribute(ArkUI_NodeHandle node, int32_t subTypeId)
const ArkUI_AttributeItem* GetRelativeContainerAttribute(ArkUI_NodeHandle node, int32_t subTypeId)
{
static Getter* getters[] = { GetRelativeContainerGuideLine, GetRelativeContainerBarrier };
if (subTypeId >= sizeof(getters) / sizeof(Getter*)) {
if (static_cast<uint32_t>(subTypeId) >= sizeof(getters) / sizeof(Getter*)) {
TAG_LOGE(AceLogTag::ACE_NATIVE_NODE, "RelativeContainer node attribute: %{public}d NOT IMPLEMENT", subTypeId);
return nullptr;
}
@ -13958,7 +13968,7 @@ const ArkUI_AttributeItem* GetGridAttribute(ArkUI_NodeHandle node, int32_t subTy
{
static Getter* getters[] = { GetGridColumnsTemplate, GetGridRowsTemplate, GetGridColumnsGap, GetGridRowsGap,
GetGridNodeAdapter, GetGridCachedCount };
if (subTypeId >= sizeof(getters) / sizeof(Getter*)) {
if (static_cast<uint32_t>(subTypeId) >= sizeof(getters) / sizeof(Getter*)) {
TAG_LOGE(AceLogTag::ACE_NATIVE_NODE, "Grid node attribute: %{public}d NOT IMPLEMENT", subTypeId);
return nullptr;
}
@ -13983,7 +13993,7 @@ int32_t SetNodeAttribute(ArkUI_NodeHandle node, ArkUI_NodeAttributeType type, co
int32_t subTypeId = type % MAX_NODE_SCOPE_NUM;
int32_t nodeSubTypeClass =
subTypeClass < MAX_NODE_SCOPE_NUM ? subTypeClass : (subTypeClass - MAX_NODE_SCOPE_NUM + BASIC_COMPONENT_NUM);
if ((nodeSubTypeClass >= sizeof(setterClasses) / sizeof(AttributeSetterClass*)) ||
if ((static_cast<uint32_t>(nodeSubTypeClass) >= sizeof(setterClasses) / sizeof(AttributeSetterClass*)) ||
!CheckIfAttributeLegal(node, type)) {
return ERROR_CODE_NATIVE_IMPL_TYPE_NOT_SUPPORTED;
}
@ -14013,7 +14023,7 @@ const ArkUI_AttributeItem* GetNodeAttribute(ArkUI_NodeHandle node, ArkUI_NodeAtt
int32_t subTypeId = type % MAX_NODE_SCOPE_NUM;
int32_t nodeSubTypeClass =
subTypeClass < MAX_NODE_SCOPE_NUM ? subTypeClass : (subTypeClass - MAX_NODE_SCOPE_NUM + BASIC_COMPONENT_NUM);
if ((nodeSubTypeClass >= sizeof(getterClasses) / sizeof(AttributeGetterClass*)) ||
if ((static_cast<uint32_t>(nodeSubTypeClass) >= sizeof(getterClasses) / sizeof(AttributeGetterClass*)) ||
!CheckIfAttributeLegal(node, type)) {
TAG_LOGE(AceLogTag::ACE_NATIVE_NODE, "node attribute: %{public}d NOT IMPLEMENT", type);
return nullptr;
@ -14040,7 +14050,7 @@ int32_t ResetNodeAttribute(ArkUI_NodeHandle node, ArkUI_NodeAttributeType type)
int32_t subTypeId = type % MAX_NODE_SCOPE_NUM;
int32_t nodeSubTypeClass =
subTypeClass < MAX_NODE_SCOPE_NUM ? subTypeClass : (subTypeClass - MAX_NODE_SCOPE_NUM + BASIC_COMPONENT_NUM);
if ((nodeSubTypeClass >= sizeof(resetterClasses) / sizeof(AttributeResetterClass*)) ||
if ((static_cast<uint32_t>(nodeSubTypeClass) >= sizeof(resetterClasses) / sizeof(AttributeResetterClass*)) ||
!CheckIfAttributeLegal(node, type)) {
TAG_LOGE(AceLogTag::ACE_NATIVE_NODE, "node attribute: %{public}d NOT IMPLEMENT", type);
return ERROR_CODE_NATIVE_IMPL_TYPE_NOT_SUPPORTED;

View File

@ -510,8 +510,10 @@ ohos_unittest("native_node_napi_test") {
module_out_path = interface_test_output_path
sources = [
"$ace_root/adapter/ohos/osal/log_wrapper.cpp",
"$ace_root/frameworks/core/components/common/properties/color.cpp",
"$ace_root/frameworks/core/components_ng/manager/frame_rate/frame_rate_manager.cpp",
"$ace_root/frameworks/core/components_ng/manager/safe_area/safe_area_manager.cpp",
"$ace_root/frameworks/core/components_ng/manager/shared_overlay/shared_overlay_manager.cpp",
"$ace_root/frameworks/core/components_ng/manager/shared_overlay/shared_transition_effect.cpp",
"$ace_root/interfaces/native/node/animate_impl.cpp",
"$ace_root/interfaces/native/node/dialog_model.cpp",
"$ace_root/interfaces/native/node/event_converter.cpp",
@ -523,7 +525,6 @@ ohos_unittest("native_node_napi_test") {
"$ace_root/interfaces/native/node/node_node_relative_container.cpp",
"$ace_root/interfaces/native/node/node_transition.cpp",
"$ace_root/interfaces/native/node/style_modifier.cpp",
"$ace_root/test/mock/adapter/mock_log_wrapper.cpp",
"native_gesture_test.cpp",
"native_node_napi_test.cpp",
"native_node_test.cpp",
@ -543,7 +544,21 @@ ohos_unittest("native_node_napi_test") {
"$ace_root/interfaces/inner_api/drawable_descriptor",
]
deps = [ "//third_party/googletest:gmock_main" ]
deps = [
"$ace_root/test/unittest:ace_base",
"$ace_root/test/unittest:ace_components_base",
"$ace_root/test/unittest:ace_components_event",
"$ace_root/test/unittest:ace_components_gestures",
"$ace_root/test/unittest:ace_components_layout",
"$ace_root/test/unittest:ace_components_mock",
"$ace_root/test/unittest:ace_components_pattern",
"$ace_root/test/unittest:ace_components_property",
"$ace_root/test/unittest:ace_components_render",
"$ace_root/test/unittest:ace_components_syntax",
"$ace_root/test/unittest:ace_core_animation",
"$ace_root/test/unittest:ace_core_extra",
"//third_party/googletest:gmock_main",
]
public_deps = [
"//foundation/graphic/graphic_2d/rosen/modules/2d_graphics:2d_graphics",

File diff suppressed because it is too large Load Diff