Skip to content

Commit

Permalink
arkui: Update bindings to API-13
Browse files Browse the repository at this point in the history
This does not include newly added modules

Signed-off-by: Jonathan Schwender <[email protected]>
  • Loading branch information
jschwe committed Jan 8, 2025
1 parent 91995b5 commit 6365999
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 61 deletions.
4 changes: 4 additions & 0 deletions components/arkui/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.2.2 (2025-01-08)

- Update bindings to api-13

## 0.2.1 (2025-01-05)

## Add
Expand Down
4 changes: 3 additions & 1 deletion components/arkui/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "arkui-sys"
version = "0.2.1"
version = "0.2.2"
edition = "2021"
description = "Bindings to the native ArkUI API of OpenHarmony"
license = "Apache-2.0"
Expand All @@ -25,6 +25,8 @@ default = []

## Enables bindings for OpenHarmony API-level 12.
api-12 = ["ohos-drawing-sys?/api-12"]
## Enables bindings for OpenHarmony API-level 13.
api-13 = []
## Enables bindings for Functions that interact with the `drawing` module
drawing = ["dep:ohos-drawing-sys"]

Expand Down
120 changes: 60 additions & 60 deletions components/arkui/src/native_type/native_type_ffi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1401,7 +1401,7 @@ impl ArkUI_ScrollNestedMode {
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ScrollNestedMode {
/// The component scrolls first, and when it hits the boundary, the parent component scrolls.
////** When the parent component hits the boundary, its edge effect is displayed. If no edge
/// When the parent component hits the boundary, its edge effect is displayed. If no edge
/// effect is specified for the parent component, the edge effect of the child component is displayed instead.
pub const ARKUI_SCROLL_NESTED_MODE_SELF_FIRST: ArkUI_ScrollNestedMode =
ArkUI_ScrollNestedMode(1);
Expand Down Expand Up @@ -2901,7 +2901,7 @@ impl ArkUI_BlendApplyType {
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_BlendApplyType {
/// The content of the component and its child components are drawn on the offscreen canvas, and then blended with
////* the existing content on the canvas.
/// the existing content on the canvas.
pub const BLEND_APPLY_TYPE_OFFSCREEN: ArkUI_BlendApplyType = ArkUI_BlendApplyType(1);
}
#[repr(transparent)]
Expand Down Expand Up @@ -3792,50 +3792,6 @@ impl ArkUI_AccessibilityCheckedState {
pub struct ArkUI_AccessibilityCheckedState(pub ::core::ffi::c_uint);
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_AccessibilityActionType {
/// click action.
pub const ARKUI_ACCESSIBILITY_ACTION_CLICK: ArkUI_AccessibilityActionType =
ArkUI_AccessibilityActionType(1);
}
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_AccessibilityActionType {
/// long click action.
pub const ARKUI_ACCESSIBILITY_ACTION_LONG_CLICK: ArkUI_AccessibilityActionType =
ArkUI_AccessibilityActionType(2);
}
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_AccessibilityActionType {
/// cut action.
pub const ARKUI_ACCESSIBILITY_ACTION_CUT: ArkUI_AccessibilityActionType =
ArkUI_AccessibilityActionType(4);
}
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_AccessibilityActionType {
/// copy action.
pub const ARKUI_ACCESSIBILITY_ACTION_COPY: ArkUI_AccessibilityActionType =
ArkUI_AccessibilityActionType(8);
}
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_AccessibilityActionType {
/// paste action.
pub const ARKUI_ACCESSIBILITY_ACTION_PASTE: ArkUI_AccessibilityActionType =
ArkUI_AccessibilityActionType(16);
}
#[repr(transparent)]
/// Define accessible action types.
///
///
/// Available since API-level: 12
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_AccessibilityActionType(pub ::core::ffi::c_uint);
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_AnimationDirection {
/// The animation plays in forward loop mode.
pub const ARKUI_ANIMATION_DIRECTION_NORMAL: ArkUI_AnimationDirection =
Expand Down Expand Up @@ -3932,6 +3888,50 @@ impl ArkUI_ScrollSource {
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_ScrollSource(pub ::core::ffi::c_uint);
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_AccessibilityActionType {
/// click action.
pub const ARKUI_ACCESSIBILITY_ACTION_CLICK: ArkUI_AccessibilityActionType =
ArkUI_AccessibilityActionType(1);
}
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_AccessibilityActionType {
/// long click action.
pub const ARKUI_ACCESSIBILITY_ACTION_LONG_CLICK: ArkUI_AccessibilityActionType =
ArkUI_AccessibilityActionType(2);
}
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_AccessibilityActionType {
/// cut action.
pub const ARKUI_ACCESSIBILITY_ACTION_CUT: ArkUI_AccessibilityActionType =
ArkUI_AccessibilityActionType(4);
}
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_AccessibilityActionType {
/// copy action.
pub const ARKUI_ACCESSIBILITY_ACTION_COPY: ArkUI_AccessibilityActionType =
ArkUI_AccessibilityActionType(8);
}
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_AccessibilityActionType {
/// paste action.
pub const ARKUI_ACCESSIBILITY_ACTION_PASTE: ArkUI_AccessibilityActionType =
ArkUI_AccessibilityActionType(16);
}
#[repr(transparent)]
/// Define accessible action types.
///
///
/// Available since API-level: 12
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_AccessibilityActionType(pub ::core::ffi::c_uint);
/// Defines the translation options for component transition.
///
///
Expand Down Expand Up @@ -6705,7 +6705,7 @@ extern "C" {
///
/// `state` - accessibility state object.
///
/// `isDisabled` - accessibility state disabled Value 1 indicates disabled and 0 indicates enbled.
/// `isDisabled` - accessibility state disabled, Value 1 indicates disabled and 0 indicates enbled.
///
/// Available since API-level: 12
#[cfg(feature = "api-12")]
Expand All @@ -6722,7 +6722,7 @@ extern "C" {
///
/// # Returns
///
/// accessibility state disabled Value 1 indicates disabled and 0 indicates enbled. The default value is 0.
/// accessibility state disabled, Value 1 indicates disabled and 0 indicates enbled. The default value is 0.
/// If the function parameter is abnormal, return the default value.
///
/// Available since API-level: 12
Expand All @@ -6735,7 +6735,7 @@ extern "C" {
///
/// `state` - accessibility state object.
///
/// `isSelected` - accessibility state selected Value 1 indicates selected and 0 indicates not selected.
/// `isSelected` - accessibility state selected, Value 1 indicates selected, and 0 indicates not selected.
/// The default value is 0.
///
/// Available since API-level: 12
Expand All @@ -6753,7 +6753,7 @@ extern "C" {
///
/// # Returns
///
/// accessibility state selected Value 1 indicates selected and 0 indicates not selected.
/// accessibility state selected, Value 1 indicates selected, and 0 indicates not selected.
/// The default value is 0.
/// If the function parameter is abnormal, return the default value.
///
Expand All @@ -6767,7 +6767,7 @@ extern "C" {
///
/// `state` - accessibility state object.
///
/// `checkedState` - checked stateand uses the [`ArkUI_AccessibilityCheckedState`] enumeration value,
/// `checkedState` - checked state, and uses the [`ArkUI_AccessibilityCheckedState`] enumeration value,
/// The default value is ARKUI_ACCESSIBILITY_UNCHECKED.
///
/// Available since API-level: 12
Expand All @@ -6785,7 +6785,7 @@ extern "C" {
///
/// # Returns
///
/// checked stateand uses the [`ArkUI_AccessibilityCheckedState`] enumeration value,
/// checked state, and uses the [`ArkUI_AccessibilityCheckedState`] enumeration value,
/// The default value is ARKUI_ACCESSIBILITY_UNCHECKED.
/// If the function parameter is abnormal, return the default value.
///
Expand Down Expand Up @@ -6822,7 +6822,7 @@ extern "C" {
///
/// `value` - accessibility value object.
///
/// `min` - minimum value based on range components, The default value is -1
/// `min` - minimum value based on range components, The default value is -1.
///
/// Available since API-level: 12
#[cfg(feature = "api-12")]
Expand All @@ -6836,7 +6836,7 @@ extern "C" {
///
/// # Returns
///
/// minimum value based on range components, The default value is -1
/// minimum value based on range components, The default value is -1.
/// If the function parameter is abnormal, return -1.
///
/// Available since API-level: 12
Expand All @@ -6849,7 +6849,7 @@ extern "C" {
///
/// `value` - accessibility value object.
///
/// `max` - maximum value based on range components, The default value is -1
/// `max` - maximum value based on range components, The default value is -1.
///
/// Available since API-level: 12
#[cfg(feature = "api-12")]
Expand All @@ -6863,7 +6863,7 @@ extern "C" {
///
/// # Returns
///
/// maximum value based on range components, The default value is -1
/// maximum value based on range components, The default value is -1.
/// If the function parameter is abnormal, return -1.
///
/// Available since API-level: 12
Expand All @@ -6876,7 +6876,7 @@ extern "C" {
///
/// `value` - accessibility value object.
///
/// `current` - value based on range components, The default value is -1
/// `current` - value based on range components, The default value is -1.
///
/// Available since API-level: 12
#[cfg(feature = "api-12")]
Expand All @@ -6893,7 +6893,7 @@ extern "C" {
///
/// # Returns
///
/// current value based on range components, The default value is -1
/// current value based on range components, The default value is -1.
/// If the function parameter is abnormal, return -1.
///
/// Available since API-level: 12
Expand All @@ -6906,7 +6906,7 @@ extern "C" {
///
/// `value` - accessibility value object.
///
/// `text` - The textual description information of the component, which defaults to an empty string
/// `text` - The textual description information of the component, which defaults to an empty string.
///
/// Available since API-level: 12
#[cfg(feature = "api-12")]
Expand All @@ -6915,7 +6915,7 @@ extern "C" {
value: *mut ArkUI_AccessibilityValue,
text: *const ::core::ffi::c_char,
);
/// Get accessibility text value
/// Get accessibility text value.
///
/// # Arguments
///
Expand Down

0 comments on commit 6365999

Please sign in to comment.