Struct ArkUI_AccessibilityProviderCallbacks

Source
#[repr(C)]
pub struct ArkUI_AccessibilityProviderCallbacks { pub findAccessibilityNodeInfosById: Option<unsafe extern "C" fn(elementId: i64, mode: ArkUI_AccessibilitySearchMode, requestId: i32, elementList: *mut ArkUI_AccessibilityElementInfoList) -> i32>, pub findAccessibilityNodeInfosByText: Option<unsafe extern "C" fn(elementId: i64, text: *const c_char, requestId: i32, elementList: *mut ArkUI_AccessibilityElementInfoList) -> i32>, pub findFocusedAccessibilityNode: Option<unsafe extern "C" fn(elementId: i64, focusType: ArkUI_AccessibilityFocusType, requestId: i32, elementInfo: *mut ArkUI_AccessibilityElementInfo) -> i32>, pub findNextFocusAccessibilityNode: Option<unsafe extern "C" fn(elementId: i64, direction: ArkUI_AccessibilityFocusMoveDirection, requestId: i32, elementInfo: *mut ArkUI_AccessibilityElementInfo) -> i32>, pub executeAccessibilityAction: Option<unsafe extern "C" fn(elementId: i64, action: ArkUI_Accessibility_ActionType, actionArguments: *mut ArkUI_AccessibilityActionArguments, requestId: i32) -> i32>, pub clearFocusedFocusAccessibilityNode: Option<unsafe extern "C" fn() -> i32>, pub getAccessibilityNodeCursorPosition: Option<unsafe extern "C" fn(elementId: i64, requestId: i32, index: *mut i32) -> i32>, }
Available on crate feature api-13 only.
Expand description

Registers callbacks for the accessibility provider.

Available since API-level: 13

Fields§

§findAccessibilityNodeInfosById: Option<unsafe extern "C" fn(elementId: i64, mode: ArkUI_AccessibilitySearchMode, requestId: i32, elementList: *mut ArkUI_AccessibilityElementInfoList) -> i32>

Called to obtain element information based on a specified node.

§Arguments

  • elementId - Indicates the element ID.

  • mode - Indicates accessibility search mode.

  • requestId - Indicates the request ID.

  • elementList - Indicates accessibility elementInfo list.

§Returns

  • Returns [ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL] if the operation is successful. Returns [ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER] if a parameter is incorrect.
§findAccessibilityNodeInfosByText: Option<unsafe extern "C" fn(elementId: i64, text: *const c_char, requestId: i32, elementList: *mut ArkUI_AccessibilityElementInfoList) -> i32>

Called to obtain element information based on a specified node and text content.

§Arguments

  • elementId - Indicates the element ID.

  • text - Indicates accessibility text.

  • requestId - Indicates the request ID.

  • elementList - Indicates accessibility elementInfo list.

§Returns

  • Returns [ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL] if the operation is successful. Returns [ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER] if a parameter is incorrect.
§findFocusedAccessibilityNode: Option<unsafe extern "C" fn(elementId: i64, focusType: ArkUI_AccessibilityFocusType, requestId: i32, elementInfo: *mut ArkUI_AccessibilityElementInfo) -> i32>

Called to obtain focused element information based on a specified node.

§Arguments

  • elementId - Indicates the element ID.

  • focusType - Indicates focus type.

  • requestId - Indicates the request ID.

  • elementInfo - Indicates accessibility elementInfo.

§Returns

  • Returns [ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL] if the operation is successful. Returns [ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER] if a parameter is incorrect.
§findNextFocusAccessibilityNode: Option<unsafe extern "C" fn(elementId: i64, direction: ArkUI_AccessibilityFocusMoveDirection, requestId: i32, elementInfo: *mut ArkUI_AccessibilityElementInfo) -> i32>

Called to find the next focusable node based on the reference node.

§Arguments

  • elementId - Indicates the element ID.

  • direction - Indicates direction.

  • requestId - Indicates the request ID.

  • elementInfo - Indicates accessibility elementInfo.

§Returns

  • Returns [ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL] if the operation is successful. Returns [ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER] if a parameter is incorrect.
§executeAccessibilityAction: Option<unsafe extern "C" fn(elementId: i64, action: ArkUI_Accessibility_ActionType, actionArguments: *mut ArkUI_AccessibilityActionArguments, requestId: i32) -> i32>

Called to execute a specified action on a specified node.

§Arguments

  • elementId - Indicates the element ID.

  • action - Indicates action.

  • actionArguments - Indicates action arguments.

  • requestId - Indicates the request ID.

§Returns

  • Returns [ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL] if the operation is successful. Returns [ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER] if a parameter is incorrect.
§clearFocusedFocusAccessibilityNode: Option<unsafe extern "C" fn() -> i32>

Called to clear the focus state of the current focused node.

§Returns

  • Returns [ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL] if the operation is successful. Returns [ARKUI_ACCESSIBILITY_NATIVE_RESULT_FAILED] if the operation is failed.
§getAccessibilityNodeCursorPosition: Option<unsafe extern "C" fn(elementId: i64, requestId: i32, index: *mut i32) -> i32>

Called to query the current cursor position of the specified node.

§Arguments

  • elementId - Indicates the element ID.

  • requestId - Indicates the request ID.

  • index - Indicates index.

§Returns

  • Returns [ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL] if the operation is successful. Returns [ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER] if a parameter is incorrect.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.