Cargo Features

xcomponent-sys has no features set by default.

[dependencies]
xcomponent-sys = { version = "0.3.0", features = ["api-10", "api-11", "api-12", "api-13", "arkui", "keyboard-types", "document-features"] }
api-10 api-11?
api-11 api-12? = api-10

Affects xcomponent_ffi::OH_NativeXComponent_ExpectedRateRange, xcomponent_ffi::OH_NativeXComponent_SetExpectedFrameRateRange, xcomponent_ffi::OH_NativeXComponent_RegisterOnFrameCallback, xcomponent_ffi::OH_NativeXComponent_UnregisterOnFrameCallback

api-12 api-13? = api-11

Enables api-12 of optional arkui-sys

arkui-sys:

OpenHarmony API level

The arkUI native module was added in API-level 12. Defaults to no bindings at all, to maintain feature composability in ohos-sys. Optionally enable one of the api-* features to get access to bindings for newer OpenHarmony versions.

Enables bindings for OpenHarmony API-level 12.

Affects xcomponent_arkui_ffi::OH_NativeXComponent_AttachNativeRootNode, xcomponent_arkui_ffi::OH_NativeXComponent_DetachNativeRootNode, xcomponent_arkui_ffi::OH_NativeXComponent_RegisterUIInputEventCallback, xcomponent_arkui_ffi::OH_NativeXComponent_RegisterOnTouchInterceptCallback, xcomponent_ffi::OH_NativeXComponent_GetTouchPointWindowX, xcomponent_ffi::OH_NativeXComponent_GetTouchPointWindowY, xcomponent_ffi::OH_NativeXComponent_GetTouchPointDisplayX, xcomponent_ffi::OH_NativeXComponent_GetTouchPointDisplayY, xcomponent_ffi::OH_NativeXComponent_RegisterSurfaceShowCallback, xcomponent_ffi::OH_NativeXComponent_RegisterSurfaceHideCallback, xcomponent_ffi::OH_NativeXComponent_SetNeedSoftKeyboard, xcomponent_ffi::OH_NativeXComponent_GetTouchEventSourceType

api-13 = api-12

Affects xcomponent_ffi::OH_NativeXComponent_GetNativeAccessibilityProvider

arkui

Enables XComponent APIs that depend on ArkUI.

Enables arkui-sys

keyboard-types

Provides optional conversion from the OH keyboard enum to the keyboard-types enum.

Enables keyboard-types

Affects xcomponent-sys::keyboard_types_compat

document-features

Document available features when building the documentation

Enables document-features