Cargo Features

ohos-input-sys has no features set by default.

[dependencies]
ohos-input-sys = { version = "0.1.1", features = ["api-12", "api-13", "api-14", "document-features"] }
api-12 api-13?

OpenHarmony API level

The inputmethod API 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 axis_type_ffi::InputEvent_AxisType, axis_type_ffi::InputEvent_AxisEventType, axis_type_ffi::InputEvent_AxisAction, input_manager_ffi::Input_KeyStateAction, input_manager_ffi::Input_KeyEventAction, input_manager_ffi::Input_MouseEventAction, input_manager_ffi::InputEvent_MouseAxis, input_manager_ffi::Input_MouseEventButton, input_manager_ffi::Input_TouchEventAction, input_manager_ffi::InputEvent_SourceType, input_manager_ffi::Input_Result, input_manager_ffi::Input_KeyEventCallback, input_manager_ffi::Input_MouseEventCallback, input_manager_ffi::Input_TouchEventCallback, input_manager_ffi::Input_AxisEventCallback, input_manager_ffi::Input_InterceptorEventCallback, input_manager_ffi::OH_Input_GetKeyState, input_manager_ffi::OH_Input_CreateKeyState, input_manager_ffi::OH_Input_DestroyKeyState, key_code_ffi::Input_KeyCode

api-13 api-14? = api-12

Enables bindings for OpenHarmony API-level 13 (No changes)

Affects input_manager_ffi::Input_KeyboardType, input_manager_ffi::Input_DeviceAddedCallback, input_manager_ffi::Input_DeviceRemovedCallback, input_manager_ffi::Input_DeviceListener, input_manager_ffi::OH_Input_GetDeviceIds, input_manager_ffi::OH_Input_GetDevice, input_manager_ffi::OH_Input_CreateDeviceInfo, input_manager_ffi::OH_Input_DestroyDeviceInfo, input_manager_ffi::OH_Input_GetKeyboardType, input_manager_ffi::OH_Input_GetDeviceId, input_manager_ffi::OH_Input_GetDeviceName, input_manager_ffi::OH_Input_GetCapabilities, input_manager_ffi::OH_Input_GetDeviceVersion, input_manager_ffi::OH_Input_GetDeviceProduct, input_manager_ffi::OH_Input_GetDeviceVendor, input_manager_ffi::OH_Input_GetDeviceAddress

api-14 = api-13

Enables bindings for OpenHarmony API-level 14

Affects input_manager_ffi::Input_HotkeyCallback, input_manager_ffi::OH_Input_GetIntervalSinceLastInput, input_manager_ffi::OH_Input_CreateHotkey, input_manager_ffi::OH_Input_DestroyHotkey, input_manager_ffi::OH_Input_SetPreKeys, input_manager_ffi::OH_Input_GetPreKeys, input_manager_ffi::OH_Input_SetFinalKey, input_manager_ffi::OH_Input_GetFinalKey, input_manager_ffi::OH_Input_CreateAllSystemHotkeys, input_manager_ffi::OH_Input_DestroyAllSystemHotkeys, input_manager_ffi::OH_Input_GetAllSystemHotkeys, input_manager_ffi::OH_Input_SetRepeat, input_manager_ffi::OH_Input_GetRepeat, input_manager_ffi::OH_Input_AddHotkeyMonitor, input_manager_ffi::OH_Input_RemoveHotkeyMonitor

document-features

Document available features when building the documentation

Enables document-features