按SDK变更修改接口

Signed-off-by: zoulinken <zoulinken1@huawei.com>
This commit is contained in:
zoulinken 2024-08-10 18:04:51 +08:00
parent 3930df2820
commit 949b4ea005
3 changed files with 10 additions and 9 deletions

View File

@ -1845,11 +1845,11 @@
},
{
"first_introduced": "12",
"name": "OH_ArkUI_SystemFontStyleEvent_GetFontSize"
"name": "OH_ArkUI_SystemFontStyleEvent_GetFontSizeScale"
},
{
"first_introduced": "12",
"name": "OH_ArkUI_SystemFontStyleEvent_GetFontWeight"
"name": "OH_ArkUI_SystemFontStyleEvent_GetFontWeightScale"
},
{
"first_introduced": "12",

View File

@ -7447,20 +7447,21 @@ void OH_ArkUI_UnregisterSystemFontStyleChangeEvent(ArkUI_NodeHandle node);
* @brief Retrieve the font size value for system font change events.
*
* @param event Indicates a pointer to the current system font change event.
* @return Updated system font size. -1 indicates a retrieval error.
* @return Updated system font size scaling factor. Default value: 1.0.
* -1 indicates a retrieval error.
* @since 12
*/
int32_t OH_ArkUI_SystemFontStyleEvent_GetFontSize(const ArkUI_SystemFontStyleEvent* event);
float OH_ArkUI_SystemFontStyleEvent_GetFontSizeScale(const ArkUI_SystemFontStyleEvent* event);
/**
* @brief Retrieve the font thickness values for system font change events.
*
* @param event Indicates a pointer to the current system font change event.
* @return Updated system font thickness, return value type {@link ArkUI_fontWeight},
* default value:ARKUI_FONT_WEIGHT_W100
* @return The updated system font thickness scaling factor. Default value: 1.0.
* -1 indicates a retrieval error.
* @since 12
*/
int32_t OH_ArkUI_SystemFontStyleEvent_GetFontWeight(const ArkUI_SystemFontStyleEvent* event);
float OH_ArkUI_SystemFontStyleEvent_GetFontWeightScale(const ArkUI_SystemFontStyleEvent* event);
#ifdef __cplusplus
};

View File

@ -154,12 +154,12 @@ void OH_ArkUI_UnregisterSystemFontStyleChangeEvent(ArkUI_NodeHandle node)
impl->getNodeModifiers()->getFrameNodeModifier()->resetSystemFontStyleChangeEvent(node->uiNodeHandle);
}
int32_t OH_ArkUI_SystemFontStyleEvent_GetFontSize(const ArkUI_SystemFontStyleEvent* event)
float OH_ArkUI_SystemFontStyleEvent_GetFontSizeScale(const ArkUI_SystemFontStyleEvent* event)
{
return event->fontSize;
}
int32_t OH_ArkUI_SystemFontStyleEvent_GetFontWeight(const ArkUI_SystemFontStyleEvent* event)
float OH_ArkUI_SystemFontStyleEvent_GetFontWeightScale(const ArkUI_SystemFontStyleEvent* event)
{
return event->fontWeight;
}