Crate xcomponent_sys

Crate xcomponent_sys 

Source
Expand description

Source:

English Documentation Chinese Documentation

§Feature flags

  • api-16 — Enables bindings for OpenHarmony API-level 16.
  • api-17 — Enables bindings for OpenHarmony API-level 17.
  • api-18 — Enables bindings for OpenHarmony API-level 18 (5.1.0).
  • api-19 — Enables bindings for OpenHarmony API-level 19.
  • api-20 — Enables bindings for OpenHarmony API-level 20.
  • api-21 — Enables bindings for OpenHarmony API-level 21.
  • arkui — Enables XComponent APIs that depend on ArkUI.
  • keyboard-types — Provides optional conversion from the OH keyboard enum to the keyboard-types enum.
  • document-features — Document available features when building the documentation

Modules§

keyboard_types_compatkeyboard-types

Structs§

ArkUI_XComponent_ImageAnalyzerStateapi-18
Status code for AI analyzer.
OH_ArkUI_SurfaceCallbackapi-19
Define the surface lifecycle callback.
OH_ArkUI_SurfaceHolderapi-19
Provides an encapsulated OH_ArkUI_SurfaceHolder instance.
OH_NativeXComponent
Provides an encapsulated OH_NativeXComponent instance.
OH_NativeXComponent_Callback
Registers the surface lifecycle and touch event callbacks.
OH_NativeXComponent_EventSourceType
Represents the touch event source type.
OH_NativeXComponent_ExpectedRateRangeapi-11
Defines the expected frame rate range struct.
OH_NativeXComponent_ExtraMouseEventInfoapi-20
Provides an encapsulated OH_NativeXComponent_ExtraMouseEventInfo instance which has extra info compared to OH_NativeXComponent_MouseEvent.
OH_NativeXComponent_HistoricalPoint
Represents the historical point.
OH_NativeXComponent_KeyAction
Represents the key event action.
OH_NativeXComponent_KeyCode
Represents the key event code.
OH_NativeXComponent_KeyEvent
Provides an encapsulated OH_NativeXComponent_KeyEvent instance.
OH_NativeXComponent_MouseEvent
Represents the mouse event information.
OH_NativeXComponent_MouseEventAction
Represents the mouse event action.
OH_NativeXComponent_MouseEventButton
Represents the mouse event button.
OH_NativeXComponent_MouseEvent_Callback
Registers the mouse event callbacks.
OH_NativeXComponent_TouchEvent
Represents the touch event.
OH_NativeXComponent_TouchEventType
Represents the type of touch event.
OH_NativeXComponent_TouchEvent_SourceTool
Represents the source tool type of TouchEvent
OH_NativeXComponent_TouchPoint
Represents the touch point information of touch event.
OH_NativeXComponent_TouchPointToolType
Represents the touch point tool type.
XcomponentResult
Enumerates the API access states.

Constants§

OH_MAX_TOUCH_POINTS_NUMBER
OH_NATIVE_XCOMPONENT_MAX_TOUCH_POINTS_NUMBER
OH_NATIVE_XCOMPONENT_OBJ
OH_XCOMPONENT_ID_LEN_MAX

Functions§

OH_ArkUI_AccessibilityProvider_Createapi-20
Create a ArkUI_AccessibilityProvider object from an XComponent node.
OH_ArkUI_AccessibilityProvider_Disposeapi-20
Disposes of an ArkUI_AccessibilityProvider object.
OH_ArkUI_SurfaceCallback_Createapi-19
Create a OH_ArkUI_SurfaceCallback object.
OH_ArkUI_SurfaceCallback_Disposeapi-19
Disposes of a OH_ArkUI_SurfaceCallback object.
OH_ArkUI_SurfaceCallback_SetSurfaceChangedEventapi-19
Set the surface changed event of the surface callback.
OH_ArkUI_SurfaceCallback_SetSurfaceCreatedEventapi-19
Set the surface created event of the surface callback.
OH_ArkUI_SurfaceCallback_SetSurfaceDestroyedEventapi-19
Set the surface destroyed event of the surface callback.
OH_ArkUI_SurfaceCallback_SetSurfaceHideEventapi-20
Set the surface hide event of the surface callback.
OH_ArkUI_SurfaceCallback_SetSurfaceShowEventapi-20
Set the surface show event of the surface callback.
OH_ArkUI_SurfaceHolder_AddSurfaceCallbackapi-19
Adds a surface lifecycle callback for this OH_ArkUI_SurfaceHolder instance.
OH_ArkUI_SurfaceHolder_Createapi-19
Create a OH_ArkUI_SurfaceHolder object from an XComponent node.
OH_ArkUI_SurfaceHolder_Disposeapi-19
Disposes of a OH_ArkUI_SurfaceHolder object.
OH_ArkUI_SurfaceHolder_GetUserDataapi-19
Obtains the custom data saved on the OH_ArkUI_SurfaceHolder instance.
OH_ArkUI_SurfaceHolder_RemoveSurfaceCallbackapi-19
Removes a previously added surface lifecycle callback from this OH_ArkUI_SurfaceHolder instance.
OH_ArkUI_SurfaceHolder_SetUserDataapi-19
Saves custom data on the OH_ArkUI_SurfaceHolder instance.
OH_ArkUI_XComponent_Finalizeapi-19
Finalize the XComponent node.
OH_ArkUI_XComponent_GetNativeWindowapi-19
Obtains the nativeWindow associated with a OH_ArkUI_SurfaceHolder instance.
OH_ArkUI_XComponent_Initializeapi-19
Initialize the XComponent node.
OH_ArkUI_XComponent_IsInitializedapi-19
Obtains whether the XComponent node has initalized or not.
OH_ArkUI_XComponent_RegisterOnFrameCallbackapi-20
Registers an onFrame callback for the XComponent node.
OH_ArkUI_XComponent_SetAutoInitializeapi-19
Set whether the XComponent node needs to initialize automatically.
OH_ArkUI_XComponent_SetExpectedFrameRateRangeapi-20
Set the Expected FrameRateRange for the XComponent node.
OH_ArkUI_XComponent_SetNeedSoftKeyboardapi-20
Set whether the XComponent node needs soft keyboard when focused.
OH_ArkUI_XComponent_StartImageAnalyzerapi-18
Start image analyzer for the specified XComponent instance created by the native API.
OH_ArkUI_XComponent_StopImageAnalyzerapi-18
Stop image analyzer for the specified XComponent instance created by the native API.
OH_ArkUI_XComponent_UnregisterOnFrameCallbackapi-20
UnRegister the onFrame callback for the XComponent node.
OH_NativeXComponent_AttachNativeRootNodeDeprecatedapi-12
Attaches the UI component created through the native API of ArkUI to this OH_NativeXComponent instance.
OH_NativeXComponent_DetachNativeRootNodeDeprecatedapi-12
Detaches the native component of ArkUI from this OH_NativeXComponent instance.
OH_NativeXComponent_GetExtraMouseEventInfoapi-20
Obtains the extra mouse event dispatched by the ArkUI XComponent.
OH_NativeXComponent_GetHistoricalPoints
Obtains the touch event dispatched by the ArkUI XComponent.
OH_NativeXComponent_GetKeyEvent
Obtains the key event dispatched by the ArkUI XComponent.
OH_NativeXComponent_GetKeyEventAction
Obtains the action of the key event.
OH_NativeXComponent_GetKeyEventCapsLockStateapi-20
Obtains the Caps Lock state of the key event.
OH_NativeXComponent_GetKeyEventCode
Obtains the keyCode of the key event.
OH_NativeXComponent_GetKeyEventDeviceId
Obtains the deviceId of the key event.
OH_NativeXComponent_GetKeyEventModifierKeyStatesapi-20
Obtains the state of the modifier keys of the key event.
OH_NativeXComponent_GetKeyEventNumLockStateapi-20
Obtains the Num Lock state of the key event.
OH_NativeXComponent_GetKeyEventScrollLockStateapi-20
Obtains the Scroll Lock state of the key event.
OH_NativeXComponent_GetKeyEventSourceType
Obtains the sourceType of the key event.
OH_NativeXComponent_GetKeyEventTimestamp
Obtains the timestamp of the key event.
OH_NativeXComponent_GetMouseEvent
Obtains the mouse event dispatched by the ArkUI XComponent.
OH_NativeXComponent_GetMouseEventModifierKeyStatesapi-20
Obtains the state of the modifier keys of the mouse event.
OH_NativeXComponent_GetNativeAccessibilityProviderapi-13
Obtains the pointer to the ArkUI_AccessibilityProvider instance of this OH_NativeXComponent instance.
OH_NativeXComponent_GetTouchEvent
Obtains the touch event dispatched by the ArkUI XComponent.
OH_NativeXComponent_GetTouchEventSourceTypeapi-12
Obtains the touch event’s source type dispatched by the ArkUI XComponent.
OH_NativeXComponent_GetTouchPointDisplayXapi-12
Obtains the x coordinate of a specific touch point relative to the upper left corner of
OH_NativeXComponent_GetTouchPointDisplayYapi-12
Obtains the y coordinate of a specific touch point relative to the upper left corner of
OH_NativeXComponent_GetTouchPointTiltX
Obtains the touch pointer tiltX by the ArkUI XComponent.
OH_NativeXComponent_GetTouchPointTiltY
Obtains the touch pointer tiltX by the ArkUI XComponent.
OH_NativeXComponent_GetTouchPointToolType
Obtains the touch pointer tool type by the ArkUI XComponent.
OH_NativeXComponent_GetTouchPointWindowXapi-12
Obtains the x coordinate of a specific touch point relative to the upper left corner of
OH_NativeXComponent_GetTouchPointWindowYapi-12
Obtains the y coordinate of a specific touch point relative to the upper left corner of
OH_NativeXComponent_GetXComponentId
Obtains the ID of the ArkUI XComponent.
OH_NativeXComponent_GetXComponentOffset
Obtains the offset of the surface held by the ArkUI XComponent.
OH_NativeXComponent_GetXComponentSize
Obtains the size of the surface held by the ArkUI XComponent.
OH_NativeXComponent_RegisterBlurEventCallback
Registers a callback for this OH_NativeXComponent instance.
OH_NativeXComponent_RegisterCallback
Registers a callback for this OH_NativeXComponent instance.
OH_NativeXComponent_RegisterFocusEventCallback
Registers a callback for this OH_NativeXComponent instance.
OH_NativeXComponent_RegisterKeyEventCallback
Registers a callback for this OH_NativeXComponent instance.
OH_NativeXComponent_RegisterKeyEventCallbackWithResultapi-14
Registers a callback for this OH_NativeXComponent instance.
OH_NativeXComponent_RegisterMouseEventCallback
Registers a callback for this OH_NativeXComponent instance.
OH_NativeXComponent_RegisterOnFrameCallbackapi-11
Registers a callback for this OH_NativeXComponent instance.
OH_NativeXComponent_RegisterOnTouchInterceptCallbackapi-12
Registers a custom event intercept callback for an OH_NativeXComponent instance. This enables the specified during hit testing. UI input-related operations are not supported on event objects received through this callback. For full functionality, use the NODE_ON_TOUCH_INTERCEPT event on native nodes instead.
OH_NativeXComponent_RegisterSurfaceHideCallbackapi-12
Registers a callback for this OH_NativeXComponent instance.
OH_NativeXComponent_RegisterSurfaceShowCallbackapi-12
Registers a callback for this OH_NativeXComponent instance.
OH_NativeXComponent_RegisterUIInputEventCallbackapi-12
Registers a UI input event callback for an OH_NativeXComponent instance and enables the callback to be invoked when a UI input event is received. Currently, only axis events are supported.
OH_NativeXComponent_SetExpectedFrameRateRangeapi-11
Set the Expected FrameRateRange.
OH_NativeXComponent_SetNeedSoftKeyboardapi-12
Set whether the OH_NativeXComponent instance needs soft keyboard.
OH_NativeXComponent_UnregisterOnFrameCallbackapi-11
UnRegister a callback for this OH_NativeXComponent instance.