harmony 鸿蒙native_interface_focus.h

  • 2025-06-12
  • 浏览 (7)

native_interface_focus.h

Overview

Declares the APIs of NativeFocus.

Library: libace_ndk.z.so

File to include:

System capability: SystemCapability.ArkUI.ArkUI.Full

Since: 15

Related module: ArkUI_NativeModule

Summary

ArkUI_KeyProcessingMode

enum ArkUI_KeyProcessingMode

Description

Sets the mode for processing key events when a component cannot process them.

Since: 15

Name Description
ARKUI_KEY_PROCESSING_MODE_FOCUS_NAVIGATION Key events are used for focus navigation. Default value.
ARKUI_KEY_PROCESSING_MODE_FOCUS_ANCESTOR_EVENT Key events are propagated upwards to the ancestor components.

Functions

Name Description
ArkUI_ErrorCode OH_ArkUI_FocusRequest(ArkUI_NodeHandle node); Requests focus for a specific node.
void OH_ArkUI_FocusClear(ArkUI_ContextHandle uiContext); Clears the focus to the root container node.
void OH_ArkUI_FocusActivate(ArkUI_ContextHandle uiContext, bool isActive, bool isAutoInactive); Sets the focus activation state for the current page. When activated, the focused node displays a focus box.
void OH_ArkUI_FocusSetAutoTransfer(ArkUI_ContextHandle uiContext, bool autoTransfer); Configures the focus transfer behavior when pages are switched.
void OH_ArkUI_FocusSetKeyProcessingMode(ArkUI_ContextHandle uiContext, ArkUI_KeyProcessingMode mode); Configures the focus transfer behavior when pages are switched.

你可能感兴趣的鸿蒙文章

harmony 鸿蒙ArkUI

harmony 鸿蒙ARKUI_TextPickerCascadeRangeContent

harmony 鸿蒙ARKUI_TextPickerRangeContent

harmony 鸿蒙ArkUI_AnimateCompleteCallback

harmony 鸿蒙ArkUI_AttributeItem

harmony 鸿蒙ArkUI_ColorStop

harmony 鸿蒙ArkUI_ContextCallback

harmony 鸿蒙ArkUI_EventModule

harmony 鸿蒙ArkUI_ExpectedFrameRateRange

harmony 鸿蒙ArkUI_IntOffset

0  赞