diff --git a/.rustfmt.toml b/.rustfmt.toml
new file mode 100644
index 0000000..9cc7fa4
--- /dev/null
+++ b/.rustfmt.toml
@@ -0,0 +1,3 @@
+# unstable_features = true
+# normalize_comments = true
+# normalize_doc_attributes = true
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 48df8df..36abcb5 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,9 @@
+# v0.5.0
+
+## Breaking
+
+- Remove `Debug` from opaque structs
+
# v0.4.0 (2024-10-29)
## Change
diff --git a/Cargo.toml b/Cargo.toml
index 80fb1ea..890c0df 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -6,7 +6,6 @@ description = "Bindings to the native API of OpenHarmony OS"
license = "Apache-2.0"
repository = "https://github.com/openharmony-rs/ohos-sys"
keywords = ["OpenHarmony", "HarmonyOS", "ffi"]
-exclude = ["src/**/*_api11.rs", "src/**/*_api12.rs"]
readme = "Readme.md"
resolver = "2"
rust-version = "1.78.0"
diff --git a/components/arkui/CHANGELOG.md b/components/arkui/CHANGELOG.md
new file mode 100644
index 0000000..cc94bfd
--- /dev/null
+++ b/components/arkui/CHANGELOG.md
@@ -0,0 +1,6 @@
+## 0.2.0
+
+### Breaking
+
+- `ArkUI_NumberValue` is now a native Rust union instead of a bindgen union type.
+
diff --git a/components/arkui/Cargo.toml b/components/arkui/Cargo.toml
index 7f4e528..09c7bdd 100644
--- a/components/arkui/Cargo.toml
+++ b/components/arkui/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "arkui-sys"
-version = "0.1.0"
+version = "0.2.0"
edition = "2021"
description = "Bindings to the native ArkUI API of OpenHarmony"
license = "Apache-2.0"
diff --git a/components/arkui/src/native_gesture.rs b/components/arkui/src/native_gesture.rs
index 80f0c5f..8e77e26 100644
--- a/components/arkui/src/native_gesture.rs
+++ b/components/arkui/src/native_gesture.rs
@@ -1,2 +1,2 @@
-mod native_gesture_api12;
-pub use native_gesture_api12::*;
+mod native_gesture_ffi;
+pub use native_gesture_ffi::*;
diff --git a/components/arkui/src/native_gesture/native_gesture_api12.rs b/components/arkui/src/native_gesture/native_gesture_ffi.rs
similarity index 86%
rename from components/arkui/src/native_gesture/native_gesture_api12.rs
rename to components/arkui/src/native_gesture/native_gesture_ffi.rs
index 908ec5d..a9997d0 100644
--- a/components/arkui/src/native_gesture/native_gesture_api12.rs
+++ b/components/arkui/src/native_gesture/native_gesture_ffi.rs
@@ -1,4 +1,4 @@
-/* automatically generated by rust-bindgen 0.70.1 */
+/* automatically generated by rust-bindgen 0.71.1 */
#![allow(non_upper_case_globals)]
#![allow(non_camel_case_types)]
@@ -18,21 +18,29 @@ pub struct ArkUI_GestureInterruptInfo {
pub struct ArkUI_GestureEvent {
_unused: [u8; 0],
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_GestureEventActionType {
/// Triggered.
pub const GESTURE_EVENT_ACTION_ACCEPT: ArkUI_GestureEventActionType =
ArkUI_GestureEventActionType(1);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_GestureEventActionType {
/// Updated.
pub const GESTURE_EVENT_ACTION_UPDATE: ArkUI_GestureEventActionType =
ArkUI_GestureEventActionType(2);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_GestureEventActionType {
/// Ended.
pub const GESTURE_EVENT_ACTION_END: ArkUI_GestureEventActionType =
ArkUI_GestureEventActionType(4);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_GestureEventActionType {
/// Canceled.
pub const GESTURE_EVENT_ACTION_CANCEL: ArkUI_GestureEventActionType =
@@ -42,6 +50,8 @@ impl ArkUI_GestureEventActionType {
/** @brief Enumerates gesture event types.
@since 12*/
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
#[derive(Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_GestureEventActionType(pub ::core::ffi::c_uint);
/** @brief Defines a set of gesture event types.
@@ -49,15 +59,23 @@ pub struct ArkUI_GestureEventActionType(pub ::core::ffi::c_uint);
Example: ArkUI_GestureEventActionTypeMask actions = GESTURE_EVENT_ACTION_ACCEPT | GESTURE_EVENT_ACTION_UPDATE;\n
@since 12*/
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub type ArkUI_GestureEventActionTypeMask = u32;
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_GesturePriority {
/// Normal.
pub const NORMAL: ArkUI_GesturePriority = ArkUI_GesturePriority(0);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_GesturePriority {
/// High-priority.
pub const PRIORITY: ArkUI_GesturePriority = ArkUI_GesturePriority(1);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_GesturePriority {
/// Parallel.
pub const PARALLEL: ArkUI_GesturePriority = ArkUI_GesturePriority(2);
@@ -66,16 +84,24 @@ impl ArkUI_GesturePriority {
/** @brief Enumerates gesture event modes.
@since 12*/
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
#[derive(Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_GesturePriority(pub ::core::ffi::c_uint);
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_GroupGestureMode {
pub const SEQUENTIAL_GROUP: ArkUI_GroupGestureMode = ArkUI_GroupGestureMode(0);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_GroupGestureMode {
/** Parallel recognition. Registered gestures are recognized concurrently until all gestures are recognized.
The recognition result of each gesture does not affect each other.*/
pub const PARALLEL_GROUP: ArkUI_GroupGestureMode = ArkUI_GroupGestureMode(1);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_GroupGestureMode {
/** Exclusive recognition. Registered gestures are identified concurrently.
If one gesture is successfully recognized, gesture recognition ends.*/
@@ -85,36 +111,54 @@ impl ArkUI_GroupGestureMode {
/** @brief Enumerates gesture group modes.
@since 12*/
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
#[derive(Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_GroupGestureMode(pub ::core::ffi::c_uint);
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_GestureDirection {
/// All directions.
pub const GESTURE_DIRECTION_ALL: ArkUI_GestureDirection = ArkUI_GestureDirection(15);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_GestureDirection {
/// Horizontal direction.
pub const GESTURE_DIRECTION_HORIZONTAL: ArkUI_GestureDirection = ArkUI_GestureDirection(3);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_GestureDirection {
/// Vertical direction.
pub const GESTURE_DIRECTION_VERTICAL: ArkUI_GestureDirection = ArkUI_GestureDirection(12);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_GestureDirection {
/// Leftward.
pub const GESTURE_DIRECTION_LEFT: ArkUI_GestureDirection = ArkUI_GestureDirection(1);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_GestureDirection {
/// Rightward.
pub const GESTURE_DIRECTION_RIGHT: ArkUI_GestureDirection = ArkUI_GestureDirection(2);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_GestureDirection {
/// Upward.
pub const GESTURE_DIRECTION_UP: ArkUI_GestureDirection = ArkUI_GestureDirection(4);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_GestureDirection {
/// Downward.
pub const GESTURE_DIRECTION_DOWN: ArkUI_GestureDirection = ArkUI_GestureDirection(8);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_GestureDirection {
/// None.
pub const GESTURE_DIRECTION_NONE: ArkUI_GestureDirection = ArkUI_GestureDirection(0);
@@ -123,6 +167,8 @@ impl ArkUI_GestureDirection {
/** @brief Enumerates gesture directions.
@since 12*/
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
#[derive(Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_GestureDirection(pub ::core::ffi::c_uint);
/** @brief Defines a set of gesture directions.
@@ -131,11 +177,17 @@ Example: ArkUI_GestureDirectionMask directions = GESTURE_DIRECTION_LEFT | GESTUR
This example indicates that the leftward and rightward directions are supported. \n
@since 12*/
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub type ArkUI_GestureDirectionMask = u32;
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_GestureMask {
/// The gestures of child components are enabled and recognized based on the default gesture recognition sequence.
pub const NORMAL_GESTURE_MASK: ArkUI_GestureMask = ArkUI_GestureMask(0);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_GestureMask {
/// The gestures of child components are disabled, including the built-in gestures.
pub const IGNORE_INTERNAL_GESTURE_MASK: ArkUI_GestureMask = ArkUI_GestureMask(1);
@@ -144,32 +196,48 @@ impl ArkUI_GestureMask {
/** @brief Enumerates gesture masking modes.
@since 12*/
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
#[derive(Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_GestureMask(pub ::core::ffi::c_uint);
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_GestureRecognizerType {
/// Tap.
pub const TAP_GESTURE: ArkUI_GestureRecognizerType = ArkUI_GestureRecognizerType(0);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_GestureRecognizerType {
/// Long press.
pub const LONG_PRESS_GESTURE: ArkUI_GestureRecognizerType = ArkUI_GestureRecognizerType(1);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_GestureRecognizerType {
/// Pan.
pub const PAN_GESTURE: ArkUI_GestureRecognizerType = ArkUI_GestureRecognizerType(2);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_GestureRecognizerType {
/// Pinch.
pub const PINCH_GESTURE: ArkUI_GestureRecognizerType = ArkUI_GestureRecognizerType(3);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_GestureRecognizerType {
/// Rotate.
pub const ROTATION_GESTURE: ArkUI_GestureRecognizerType = ArkUI_GestureRecognizerType(4);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_GestureRecognizerType {
/// Swipe.
pub const SWIPE_GESTURE: ArkUI_GestureRecognizerType = ArkUI_GestureRecognizerType(5);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_GestureRecognizerType {
/// A group of gestures.
pub const GROUP_GESTURE: ArkUI_GestureRecognizerType = ArkUI_GestureRecognizerType(6);
@@ -178,13 +246,19 @@ impl ArkUI_GestureRecognizerType {
/** @brief Enumerates gesture types.
@since 12*/
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
#[derive(Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_GestureRecognizerType(pub ::core::ffi::c_uint);
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_GestureInterruptResult {
/// The gesture recognition process continues.
pub const GESTURE_INTERRUPT_RESULT_CONTINUE: ArkUI_GestureInterruptResult =
ArkUI_GestureInterruptResult(0);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_GestureInterruptResult {
/// The gesture recognition process is paused.
pub const GESTURE_INTERRUPT_RESULT_REJECT: ArkUI_GestureInterruptResult =
@@ -194,33 +268,47 @@ impl ArkUI_GestureInterruptResult {
/** @brief Enumerates gesture interruption results.
@since 12*/
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
#[derive(Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_GestureInterruptResult(pub ::core::ffi::c_uint);
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_GestureRecognizerState {
/// Ready.
pub const ARKUI_GESTURE_RECOGNIZER_STATE_READY: ArkUI_GestureRecognizerState =
ArkUI_GestureRecognizerState(0);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_GestureRecognizerState {
/// Detecting.
pub const ARKUI_GESTURE_RECOGNIZER_STATE_DETECTING: ArkUI_GestureRecognizerState =
ArkUI_GestureRecognizerState(1);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_GestureRecognizerState {
/// Pending.
pub const ARKUI_GESTURE_RECOGNIZER_STATE_PENDING: ArkUI_GestureRecognizerState =
ArkUI_GestureRecognizerState(2);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_GestureRecognizerState {
/// Blocked.
pub const ARKUI_GESTURE_RECOGNIZER_STATE_BLOCKED: ArkUI_GestureRecognizerState =
ArkUI_GestureRecognizerState(3);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_GestureRecognizerState {
/// Successful.
pub const ARKUI_GESTURE_RECOGNIZER_STATE_SUCCESSFUL: ArkUI_GestureRecognizerState =
ArkUI_GestureRecognizerState(4);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_GestureRecognizerState {
/// Failed.
pub const ARKUI_GESTURE_RECOGNIZER_STATE_FAILED: ArkUI_GestureRecognizerState =
@@ -230,15 +318,21 @@ impl ArkUI_GestureRecognizerState {
/** @brief Enumerates the gesture recognizer states.
@since 12*/
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
#[derive(Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_GestureRecognizerState(pub ::core::ffi::c_uint);
/** @brief Defines the gesture recognizer handle.
@since 12*/
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub type ArkUI_GestureRecognizerHandle = *mut ArkUI_GestureRecognizer;
/** @brief Defines the gesture recognizer handle array.
@since 12*/
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub type ArkUI_GestureRecognizerHandleArray = *mut ArkUI_GestureRecognizerHandle;
#[repr(C)]
pub struct ArkUI_GestureEventTargetInfo {
@@ -250,6 +344,8 @@ pub struct ArkUI_ParallelInnerGestureEvent {
}
/** @brief Defines a callback function for notifying gesture recognizer destruction.
@since 12*/
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub type ArkUI_GestureRecognizerDisposeNotifyCallback = ::core::option::Option<
unsafe extern "C" fn(
recognizer: *mut ArkUI_GestureRecognizer,
@@ -259,6 +355,8 @@ pub type ArkUI_GestureRecognizerDisposeNotifyCallback = ::core::option::Option<
/** @brief Defines the gesture APIs.
@since 12*/
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
#[repr(C)]
pub struct ArkUI_NativeGestureAPI_1 {
/// The struct version is 1.
@@ -550,6 +648,8 @@ extern "C" {
@return Returns true if the gesture is a built-in gesture; returns false otherwise.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_GestureInterruptInfo_GetSystemFlag(
event: *const ArkUI_GestureInterruptInfo,
) -> bool;
@@ -558,6 +658,8 @@ extern "C" {
@param event Indicates the pointer to the gesture interruption information.
@return Returns the pointer to interrupted gesture recognizer.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_GestureInterruptInfo_GetRecognizer(
event: *const ArkUI_GestureInterruptInfo,
) -> *mut ArkUI_GestureRecognizer;
@@ -566,6 +668,8 @@ extern "C" {
@param event Indicates the pointer to the gesture interruption information.
@return Returns the pointer to the interrupted gesture event.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_GestureInterruptInfo_GetGestureEvent(
event: *const ArkUI_GestureInterruptInfo,
) -> *mut ArkUI_GestureEvent;
@@ -575,6 +679,8 @@ extern "C" {
@return Returns the type of the system gesture to trigger. If the gesture to trigger is not a system gesture,
-1 is returned.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_GestureInterruptInfo_GetSystemRecognizerType(
event: *const ArkUI_GestureInterruptInfo,
) -> i32;
@@ -583,6 +689,8 @@ extern "C" {
@param event Indicates the pointer to the gesture event.
@return Returns the gesture event type.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_GestureEvent_GetActionType(
event: *const ArkUI_GestureEvent,
) -> ArkUI_GestureEventActionType;
@@ -591,6 +699,8 @@ extern "C" {
@param event Indicates the pointer to the gesture event.
@return Returns the pointer to the input event of the gesture event.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_GestureEvent_GetRawInputEvent(
event: *const ArkUI_GestureEvent,
) -> *const ArkUI_UIInputEvent;
@@ -599,6 +709,8 @@ extern "C" {
@param event Indicates the pointer to the gesture event.
@return Returns the number of times that the long press gesture is triggered periodically.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_LongPress_GetRepeatCount(event: *const ArkUI_GestureEvent) -> i32;
/** @brief Obtains the velocity of a pan gesture along the main axis.
@@ -606,30 +718,40 @@ extern "C" {
@return Returns the velocity of the pan gesture along the main axis, in px/s.
The value is the square root of the sum of the squares of the velocity on the x-axis and y-axis.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_PanGesture_GetVelocity(event: *const ArkUI_GestureEvent) -> f32;
/** @brief Obtains the velocity of a pan gesture along the x-axis.
@param event Indicates the pointer to the gesture event.
@return Returns the velocity of the pan gesture along the x-axis, in px/s.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_PanGesture_GetVelocityX(event: *const ArkUI_GestureEvent) -> f32;
/** @brief Obtains the velocity of a pan gesture along the y-axis.
@param event Indicates the pointer to the gesture event.
@return Returns the velocity of the pan gesture along the y-axis, in px/s.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_PanGesture_GetVelocityY(event: *const ArkUI_GestureEvent) -> f32;
/** @brief Obtains the relative offset of a pan gesture along the x-axis.
@param event Indicates the pointer to the gesture event.
@return Returns the relative offset of the gesture along the x-axis, in px.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_PanGesture_GetOffsetX(event: *const ArkUI_GestureEvent) -> f32;
/** @brief Obtains the relative offset of a pan gesture along the y-axis.
@param event Indicates the pointer to the gesture event.
@return Returns the relative offset of the gesture along the y-axis, in px.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_PanGesture_GetOffsetY(event: *const ArkUI_GestureEvent) -> f32;
/** @brief Obtains the angle information of the swipe gesture.
@@ -644,24 +766,32 @@ extern "C" {
@param event Indicates the pointer to the gesture event.
@return Returns the angle of the swipe gesture, which is the result obtained based on the aforementioned formula.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_SwipeGesture_GetAngle(event: *const ArkUI_GestureEvent) -> f32;
/** @brief Obtains the average velocity of all fingers used in the swipe gesture.
@param event Indicates the pointer to the gesture event.
@return Returns the average velocity of all fingers used in the swipe gesture, in px/s.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_SwipeGesture_GetVelocity(event: *const ArkUI_GestureEvent) -> f32;
/** @brief Obtains the angle information of a rotation gesture.
@param event Indicates the pointer to the gesture event.
@return Returns the rotation angle.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_RotationGesture_GetAngle(event: *const ArkUI_GestureEvent) -> f32;
/** @brief Obtains the scale ratio of a pinch gesture.
@param event Indicates the pointer to the gesture event.
@return Returns the scale ratio.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_PinchGesture_GetScale(event: *const ArkUI_GestureEvent) -> f32;
/** @brief Obtains the X coordinate of the center of the pinch gesture, in vp,
relative to the upper left corner of the current component.
@@ -670,6 +800,8 @@ extern "C" {
@return Returns the X coordinate of the center of the pinch gesture, in vp,
relative to the upper left corner of the current component.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_PinchGesture_GetCenterX(event: *const ArkUI_GestureEvent) -> f32;
/** @brief Obtains the Y coordinate of the center of the pinch gesture, in vp,
relative to the upper left corner of the current component.
@@ -678,6 +810,8 @@ extern "C" {
@return Returns the Y coordinate of the center of the pinch gesture, in vp,
relative to the upper left corner of the current component.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_PinchGesture_GetCenterY(event: *const ArkUI_GestureEvent) -> f32;
/** @brief Obtains information about a gesture response chain.
@@ -687,6 +821,8 @@ extern "C" {
@return Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if success.
Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter exception occurs.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_GetResponseRecognizersFromInterruptInfo(
event: *const ArkUI_GestureInterruptInfo,
responseChain: *mut ArkUI_GestureRecognizerHandleArray,
@@ -699,6 +835,8 @@ extern "C" {
@return Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if success.
Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter exception occurs.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_SetGestureRecognizerEnabled(
recognizer: *mut ArkUI_GestureRecognizer,
enabled: bool,
@@ -709,6 +847,8 @@ extern "C" {
@return Returns true if the gesture recognizer is enabled.
Returns false if the gesture recognizer is disabled.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_GetGestureRecognizerEnabled(recognizer: *mut ArkUI_GestureRecognizer) -> bool;
/** @brief Obtains the state of a gesture recognizer.
@@ -717,6 +857,8 @@ extern "C" {
@return Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if success.
Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter exception occurs.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_GetGestureRecognizerState(
recognizer: *mut ArkUI_GestureRecognizer,
state: *mut ArkUI_GestureRecognizerState,
@@ -728,6 +870,8 @@ extern "C" {
@return Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if success.
Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter exception occurs.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_GetGestureEventTargetInfo(
recognizer: *mut ArkUI_GestureRecognizer,
info: *mut *mut ArkUI_GestureEventTargetInfo,
@@ -740,6 +884,8 @@ extern "C" {
Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter exception occurs.
Returns {@link ARKUI_ERROR_CODE_NON_SCROLLABLE_CONTAINER} if the component is not a scroll container.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_GestureEventTargetInfo_IsScrollBegin(
info: *mut ArkUI_GestureEventTargetInfo,
ret: *mut bool,
@@ -752,6 +898,8 @@ extern "C" {
Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter exception occurs.
Returns {@link ARKUI_ERROR_CODE_NON_SCROLLABLE_CONTAINER} if the component is not a scroll container.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_GestureEventTargetInfo_IsScrollEnd(
info: *mut ArkUI_GestureEventTargetInfo,
ret: *mut bool,
@@ -763,6 +911,8 @@ extern "C" {
@return Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if success.
Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter exception occurs.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_GetPanGestureDirectionMask(
recognizer: *mut ArkUI_GestureRecognizer,
directionMask: *mut ArkUI_GestureDirectionMask,
@@ -772,6 +922,8 @@ extern "C" {
@param recognizer Indicates the pointer to a gesture recognizer.
@return Returns true if the gesture is a built-in gesture; returns false otherwise.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_IsBuiltInGesture(recognizer: *mut ArkUI_GestureRecognizer) -> bool;
/** @brief Obtains the tag of a gesture recognizer.
@@ -783,6 +935,8 @@ extern "C" {
Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter exception occurs.
Returns {@link ARKUI_ERROR_CODE_BUFFER_SIZE_NOT_ENOUGH} if the buffer is not large enough.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_GetGestureTag(
recognizer: *mut ArkUI_GestureRecognizer,
buffer: *mut ::core::ffi::c_char,
@@ -799,6 +953,8 @@ extern "C" {
Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter exception occurs.
Returns {@link ARKUI_ERROR_CODE_BUFFER_SIZE_NOT_ENOUGH} if the buffer is not large enough.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_GetGestureBindNodeId(
recognizer: *mut ArkUI_GestureRecognizer,
nodeId: *mut ::core::ffi::c_char,
@@ -811,12 +967,16 @@ extern "C" {
@return Returns true if the gesture recognizer is valid.
Returns false if the gesture recognizer is invalid.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_IsGestureRecognizerValid(recognizer: *mut ArkUI_GestureRecognizer) -> bool;
/** @brief Obtains custom data in the parallel internal gesture event.
@param event Indicates the pointer to a parallel internal gesture event.
@return Returns the pointer to custom data.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_ParallelInnerGestureEvent_GetUserData(
event: *mut ArkUI_ParallelInnerGestureEvent,
) -> *mut ::core::ffi::c_void;
@@ -825,6 +985,8 @@ extern "C" {
@param event Indicates the pointer to a parallel internal gesture event.
@return Returns the pointer to the current gesture recognizer.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_ParallelInnerGestureEvent_GetCurrentRecognizer(
event: *mut ArkUI_ParallelInnerGestureEvent,
) -> *mut ArkUI_GestureRecognizer;
@@ -836,6 +998,8 @@ extern "C" {
@return Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if success.
Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter exception occurs.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_ParallelInnerGestureEvent_GetConflictRecognizers(
event: *mut ArkUI_ParallelInnerGestureEvent,
array: *mut ArkUI_GestureRecognizerHandleArray,
diff --git a/components/arkui/src/native_type.rs b/components/arkui/src/native_type.rs
index 5406df4..e33a0b3 100644
--- a/components/arkui/src/native_type.rs
+++ b/components/arkui/src/native_type.rs
@@ -1,2 +1,2 @@
-mod native_type_api12;
-pub use native_type_api12::*;
+mod native_type_ffi;
+pub use native_type_ffi::*;
diff --git a/components/arkui/src/native_type/native_type_api12.rs b/components/arkui/src/native_type/native_type_ffi.rs
similarity index 73%
rename from components/arkui/src/native_type/native_type_api12.rs
rename to components/arkui/src/native_type/native_type_ffi.rs
index ccef7d4..6a3b472 100644
--- a/components/arkui/src/native_type/native_type_api12.rs
+++ b/components/arkui/src/native_type/native_type_ffi.rs
@@ -1,55 +1,14 @@
-/* automatically generated by rust-bindgen 0.70.1 */
+/* automatically generated by rust-bindgen 0.71.1 */
#![allow(non_upper_case_globals)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
-#[repr(C)]
-pub struct __BindgenUnionField(::core::marker::PhantomData);
-impl __BindgenUnionField {
- #[inline]
- pub const fn new() -> Self {
- __BindgenUnionField(::core::marker::PhantomData)
- }
- #[inline]
- pub unsafe fn as_ref(&self) -> &T {
- ::core::mem::transmute(self)
- }
- #[inline]
- pub unsafe fn as_mut(&mut self) -> &mut T {
- ::core::mem::transmute(self)
- }
-}
-impl ::core::default::Default for __BindgenUnionField {
- #[inline]
- fn default() -> Self {
- Self::new()
- }
-}
-impl ::core::clone::Clone for __BindgenUnionField {
- #[inline]
- fn clone(&self) -> Self {
- *self
- }
-}
-impl ::core::marker::Copy for __BindgenUnionField {}
-impl ::core::fmt::Debug for __BindgenUnionField {
- fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
- fmt.write_str("__BindgenUnionField")
- }
-}
-impl ::core::hash::Hash for __BindgenUnionField {
- fn hash(&self, _state: &mut H) {}
-}
-impl ::core::cmp::PartialEq for __BindgenUnionField {
- fn eq(&self, _other: &__BindgenUnionField) -> bool {
- true
- }
-}
-impl ::core::cmp::Eq for __BindgenUnionField {}
/** @brief Defines the ArkUI native component object.
@since 12*/
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
#[repr(C)]
pub struct ArkUI_Node {
_unused: [u8; 0],
@@ -61,10 +20,14 @@ pub struct ArkUI_NodeContent {
/** @brief Defines the pointer type of the ArkUI node content
@since 12*/
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub type ArkUI_NodeContentHandle = *mut ArkUI_NodeContent;
/** @brief Defines the custom dialog box controller of ArkUI on the native side.
@since 12*/
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
#[repr(C)]
pub struct ArkUI_NativeDialog {
_unused: [u8; 0],
@@ -80,10 +43,14 @@ pub struct ArkUI_DrawContext {
/** @brief Defines the pointer to the ArkUI native component object.
@since 12*/
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub type ArkUI_NodeHandle = *mut ArkUI_Node;
/** @brief Defines the pointer to the custom dialog box controller of ArkUI on the native side.
@since 12*/
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub type ArkUI_NativeDialogHandle = *mut ArkUI_NativeDialog;
#[repr(C)]
pub struct ArkUI_WaterFlowSectionOption {
@@ -100,6 +67,8 @@ pub struct ArkUI_ListItemSwipeActionOption {
/** @brief Defines the ArkUI native context object.
@since 12*/
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
#[repr(C)]
pub struct ArkUI_Context {
_unused: [u8; 0],
@@ -107,6 +76,8 @@ pub struct ArkUI_Context {
/** @brief Defines the pointer to the context instance object pointer definition of ArkUI on the native side.
@since 12*/
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub type ArkUI_ContextHandle = *mut ArkUI_Context;
#[repr(C)]
pub struct ArkUI_SwiperIndicator {
@@ -143,6 +114,8 @@ pub struct ArkUI_AccessibilityValue {
/** @brief Defines the event callback type.
@since 12*/
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
#[repr(C)]
pub struct ArkUI_ContextCallback {
/// Custom type.
@@ -153,48 +126,68 @@ pub struct ArkUI_ContextCallback {
/** @brief Provides the number types of ArkUI in the native code.
@since 12*/
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
#[repr(C)]
-pub struct ArkUI_NumberValue {
+#[derive(Copy, Clone)]
+pub union ArkUI_NumberValue {
/// Floating-point type.
- pub f32_: __BindgenUnionField,
+ pub f32_: f32,
/// Signed integer.
- pub i32_: __BindgenUnionField,
+ pub i32_: i32,
/// Unsigned integer.
- pub u32_: __BindgenUnionField,
- pub bindgen_union_field: u32,
+ pub u32_: u32,
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_Alignment {
/// Top start.
pub const ARKUI_ALIGNMENT_TOP_START: ArkUI_Alignment = ArkUI_Alignment(0);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_Alignment {
/// Top center.
pub const ARKUI_ALIGNMENT_TOP: ArkUI_Alignment = ArkUI_Alignment(1);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_Alignment {
/// Top end.
pub const ARKUI_ALIGNMENT_TOP_END: ArkUI_Alignment = ArkUI_Alignment(2);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_Alignment {
/// Vertically centered start.
pub const ARKUI_ALIGNMENT_START: ArkUI_Alignment = ArkUI_Alignment(3);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_Alignment {
/// Horizontally and vertically centered.
pub const ARKUI_ALIGNMENT_CENTER: ArkUI_Alignment = ArkUI_Alignment(4);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_Alignment {
/// Vertically centered end.
pub const ARKUI_ALIGNMENT_END: ArkUI_Alignment = ArkUI_Alignment(5);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_Alignment {
/// Bottom start.
pub const ARKUI_ALIGNMENT_BOTTOM_START: ArkUI_Alignment = ArkUI_Alignment(6);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_Alignment {
/// Horizontally centered on the bottom.
pub const ARKUI_ALIGNMENT_BOTTOM: ArkUI_Alignment = ArkUI_Alignment(7);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_Alignment {
/// Bottom end.
pub const ARKUI_ALIGNMENT_BOTTOM_END: ArkUI_Alignment = ArkUI_Alignment(8);
@@ -203,20 +196,30 @@ impl ArkUI_Alignment {
/** @brief Enumerates the alignment modes.
@since 12*/
-#[derive(Clone, Hash, PartialEq, Eq)]
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_Alignment(pub ::core::ffi::c_uint);
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ImageRepeat {
/// The image is not repeatedly drawn.
pub const ARKUI_IMAGE_REPEAT_NONE: ArkUI_ImageRepeat = ArkUI_ImageRepeat(0);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ImageRepeat {
/// The image is repeatedly drawn only along the x-axis.
pub const ARKUI_IMAGE_REPEAT_X: ArkUI_ImageRepeat = ArkUI_ImageRepeat(1);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ImageRepeat {
/// The image is repeatedly drawn only along the y-axis.
pub const ARKUI_IMAGE_REPEAT_Y: ArkUI_ImageRepeat = ArkUI_ImageRepeat(2);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ImageRepeat {
/// The image is repeatedly drawn along both axes.
pub const ARKUI_IMAGE_REPEAT_XY: ArkUI_ImageRepeat = ArkUI_ImageRepeat(3);
@@ -225,12 +228,18 @@ impl ArkUI_ImageRepeat {
/** @brief Enumerates the image repeat patterns.
@since 12*/
-#[derive(Clone, Hash, PartialEq, Eq)]
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_ImageRepeat(pub ::core::ffi::c_uint);
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_FontStyle {
/// Standard font style.
pub const ARKUI_FONT_STYLE_NORMAL: ArkUI_FontStyle = ArkUI_FontStyle(0);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_FontStyle {
/// Italic font style.
pub const ARKUI_FONT_STYLE_ITALIC: ArkUI_FontStyle = ArkUI_FontStyle(1);
@@ -239,64 +248,96 @@ impl ArkUI_FontStyle {
/** @brief Enumerates the font styles.
@since 12*/
-#[derive(Clone, Hash, PartialEq, Eq)]
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_FontStyle(pub ::core::ffi::c_uint);
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_FontWeight {
/// 100
pub const ARKUI_FONT_WEIGHT_W100: ArkUI_FontWeight = ArkUI_FontWeight(0);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_FontWeight {
/// 200
pub const ARKUI_FONT_WEIGHT_W200: ArkUI_FontWeight = ArkUI_FontWeight(1);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_FontWeight {
/// 300
pub const ARKUI_FONT_WEIGHT_W300: ArkUI_FontWeight = ArkUI_FontWeight(2);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_FontWeight {
/// 400
pub const ARKUI_FONT_WEIGHT_W400: ArkUI_FontWeight = ArkUI_FontWeight(3);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_FontWeight {
/// 500
pub const ARKUI_FONT_WEIGHT_W500: ArkUI_FontWeight = ArkUI_FontWeight(4);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_FontWeight {
/// 600
pub const ARKUI_FONT_WEIGHT_W600: ArkUI_FontWeight = ArkUI_FontWeight(5);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_FontWeight {
/// 700
pub const ARKUI_FONT_WEIGHT_W700: ArkUI_FontWeight = ArkUI_FontWeight(6);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_FontWeight {
/// 800
pub const ARKUI_FONT_WEIGHT_W800: ArkUI_FontWeight = ArkUI_FontWeight(7);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_FontWeight {
/// 900
pub const ARKUI_FONT_WEIGHT_W900: ArkUI_FontWeight = ArkUI_FontWeight(8);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_FontWeight {
/// The font weight is bold.
pub const ARKUI_FONT_WEIGHT_BOLD: ArkUI_FontWeight = ArkUI_FontWeight(9);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_FontWeight {
/// The font weight is normal.
pub const ARKUI_FONT_WEIGHT_NORMAL: ArkUI_FontWeight = ArkUI_FontWeight(10);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_FontWeight {
/// The font weight is bolder.
pub const ARKUI_FONT_WEIGHT_BOLDER: ArkUI_FontWeight = ArkUI_FontWeight(11);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_FontWeight {
/// The font weight is lighter.
pub const ARKUI_FONT_WEIGHT_LIGHTER: ArkUI_FontWeight = ArkUI_FontWeight(12);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_FontWeight {
/// The font weight is medium.
pub const ARKUI_FONT_WEIGHT_MEDIUM: ArkUI_FontWeight = ArkUI_FontWeight(13);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_FontWeight {
/// The font weight is normal.
pub const ARKUI_FONT_WEIGHT_REGULAR: ArkUI_FontWeight = ArkUI_FontWeight(14);
@@ -305,20 +346,30 @@ impl ArkUI_FontWeight {
/** @brief Enumerates the font weights.
@since 12*/
-#[derive(Clone, Hash, PartialEq, Eq)]
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_FontWeight(pub ::core::ffi::c_uint);
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_TextAlignment {
/// Aligned with the start.
pub const ARKUI_TEXT_ALIGNMENT_START: ArkUI_TextAlignment = ArkUI_TextAlignment(0);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_TextAlignment {
/// Horizontally centered.
pub const ARKUI_TEXT_ALIGNMENT_CENTER: ArkUI_TextAlignment = ArkUI_TextAlignment(1);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_TextAlignment {
/// Aligned with the end.
pub const ARKUI_TEXT_ALIGNMENT_END: ArkUI_TextAlignment = ArkUI_TextAlignment(2);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_TextAlignment {
/// Aligned with both margins.
pub const ARKUI_TEXT_ALIGNMENT_JUSTIFY: ArkUI_TextAlignment = ArkUI_TextAlignment(3);
@@ -327,32 +378,48 @@ impl ArkUI_TextAlignment {
/** @brief Enumerates the text alignment mode.
@since 12*/
-#[derive(Clone, Hash, PartialEq, Eq)]
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_TextAlignment(pub ::core::ffi::c_uint);
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_EnterKeyType {
/// The Enter key is labeled "Go."
pub const ARKUI_ENTER_KEY_TYPE_GO: ArkUI_EnterKeyType = ArkUI_EnterKeyType(2);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_EnterKeyType {
/// The Enter key is labeled "Search."
pub const ARKUI_ENTER_KEY_TYPE_SEARCH: ArkUI_EnterKeyType = ArkUI_EnterKeyType(3);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_EnterKeyType {
/// The Enter key is labeled "Send."
pub const ARKUI_ENTER_KEY_TYPE_SEND: ArkUI_EnterKeyType = ArkUI_EnterKeyType(4);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_EnterKeyType {
/// The Enter key is labeled "Next."
pub const ARKUI_ENTER_KEY_TYPE_NEXT: ArkUI_EnterKeyType = ArkUI_EnterKeyType(5);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_EnterKeyType {
/// The Enter key is labeled "Done."
pub const ARKUI_ENTER_KEY_TYPE_DONE: ArkUI_EnterKeyType = ArkUI_EnterKeyType(6);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_EnterKeyType {
/// The Enter key is labeled "Previous."
pub const ARKUI_ENTER_KEY_TYPE_PREVIOUS: ArkUI_EnterKeyType = ArkUI_EnterKeyType(7);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_EnterKeyType {
/// The Enter key is labeled "New Line."
pub const ARKUI_ENTER_KEY_TYPE_NEW_LINE: ArkUI_EnterKeyType = ArkUI_EnterKeyType(8);
@@ -361,45 +428,67 @@ impl ArkUI_EnterKeyType {
/** @brief Enumerates the types of the Enter key for a single-line text box.
@since 12*/
-#[derive(Clone, Hash, PartialEq, Eq)]
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_EnterKeyType(pub ::core::ffi::c_uint);
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_TextInputType {
/// Normal input mode.
pub const ARKUI_TEXTINPUT_TYPE_NORMAL: ArkUI_TextInputType = ArkUI_TextInputType(0);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_TextInputType {
/// Number input mode.
pub const ARKUI_TEXTINPUT_TYPE_NUMBER: ArkUI_TextInputType = ArkUI_TextInputType(2);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_TextInputType {
/// Phone number input mode.
pub const ARKUI_TEXTINPUT_TYPE_PHONE_NUMBER: ArkUI_TextInputType = ArkUI_TextInputType(3);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_TextInputType {
/// Email address input mode.
pub const ARKUI_TEXTINPUT_TYPE_EMAIL: ArkUI_TextInputType = ArkUI_TextInputType(5);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_TextInputType {
/// Password input mode.
pub const ARKUI_TEXTINPUT_TYPE_PASSWORD: ArkUI_TextInputType = ArkUI_TextInputType(7);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_TextInputType {
/// Numeric password input mode.
pub const ARKUI_TEXTINPUT_TYPE_NUMBER_PASSWORD: ArkUI_TextInputType = ArkUI_TextInputType(8);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_TextInputType {
/// Lock screen password input mode.
pub const ARKUI_TEXTINPUT_TYPE_SCREEN_LOCK_PASSWORD: ArkUI_TextInputType =
ArkUI_TextInputType(9);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_TextInputType {
/// Username input mode.
pub const ARKUI_TEXTINPUT_TYPE_USER_NAME: ArkUI_TextInputType = ArkUI_TextInputType(10);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_TextInputType {
/// New password input mode.
pub const ARKUI_TEXTINPUT_TYPE_NEW_PASSWORD: ArkUI_TextInputType = ArkUI_TextInputType(11);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_TextInputType {
/// Number input mode with a decimal point.
pub const ARKUI_TEXTINPUT_TYPE_NUMBER_DECIMAL: ArkUI_TextInputType = ArkUI_TextInputType(12);
@@ -408,20 +497,30 @@ impl ArkUI_TextInputType {
/** @brief Enumerates the text input types.
@since 12*/
-#[derive(Clone, Hash, PartialEq, Eq)]
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_TextInputType(pub ::core::ffi::c_uint);
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_TextAreaType {
/// Normal input mode.
pub const ARKUI_TEXTAREA_TYPE_NORMAL: ArkUI_TextAreaType = ArkUI_TextAreaType(0);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_TextAreaType {
/// Number input mode.
pub const ARKUI_TEXTAREA_TYPE_NUMBER: ArkUI_TextAreaType = ArkUI_TextAreaType(2);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_TextAreaType {
/// Phone number input mode.
pub const ARKUI_TEXTAREA_TYPE_PHONE_NUMBER: ArkUI_TextAreaType = ArkUI_TextAreaType(3);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_TextAreaType {
/// Email address input mode.
pub const ARKUI_TEXTAREA_TYPE_EMAIL: ArkUI_TextAreaType = ArkUI_TextAreaType(5);
@@ -430,18 +529,26 @@ impl ArkUI_TextAreaType {
/** @brief Enumerates the text box types.
@since 12*/
-#[derive(Clone, Hash, PartialEq, Eq)]
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_TextAreaType(pub ::core::ffi::c_uint);
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_CancelButtonStyle {
/// The Cancel button is always displayed.
pub const ARKUI_CANCELBUTTON_STYLE_CONSTANT: ArkUI_CancelButtonStyle =
ArkUI_CancelButtonStyle(0);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_CancelButtonStyle {
/// The Cancel button is always hidden.
pub const ARKUI_CANCELBUTTON_STYLE_INVISIBLE: ArkUI_CancelButtonStyle =
ArkUI_CancelButtonStyle(1);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_CancelButtonStyle {
/// The Cancel button is displayed when there is text input.
pub const ARKUI_CANCELBUTTON_STYLE_INPUT: ArkUI_CancelButtonStyle = ArkUI_CancelButtonStyle(2);
@@ -450,12 +557,18 @@ impl ArkUI_CancelButtonStyle {
/** @brief Enumerates the styles of the Cancel button.
@since 12*/
-#[derive(Clone, Hash, PartialEq, Eq)]
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_CancelButtonStyle(pub ::core::ffi::c_uint);
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_XComponentType {
/// The custom content of EGL/OpenGL ES and media data is displayed individually on the screen.
pub const ARKUI_XCOMPONENT_TYPE_SURFACE: ArkUI_XComponentType = ArkUI_XComponentType(0);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_XComponentType {
/** The custom content of EGL/OpenGL ES and media data is grouped and displayed together with content
of the component.*/
@@ -465,24 +578,36 @@ impl ArkUI_XComponentType {
/** @brief Enumerates the types of the component.
@since 12*/
-#[derive(Clone, Hash, PartialEq, Eq)]
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_XComponentType(pub ::core::ffi::c_uint);
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ProgressType {
/// Linear style.
pub const ARKUI_PROGRESS_TYPE_LINEAR: ArkUI_ProgressType = ArkUI_ProgressType(0);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ProgressType {
/// Indeterminate ring style.
pub const ARKUI_PROGRESS_TYPE_RING: ArkUI_ProgressType = ArkUI_ProgressType(1);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ProgressType {
/// Eclipse style.
pub const ARKUI_PROGRESS_TYPE_ECLIPSE: ArkUI_ProgressType = ArkUI_ProgressType(2);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ProgressType {
/// Determinate ring style.
pub const ARKUI_PROGRESS_TYPE_SCALE_RING: ArkUI_ProgressType = ArkUI_ProgressType(3);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ProgressType {
/// Capsule style.
pub const ARKUI_PROGRESS_TYPE_CAPSULE: ArkUI_ProgressType = ArkUI_ProgressType(4);
@@ -491,23 +616,33 @@ impl ArkUI_ProgressType {
/** @brief Enumerates the styles of the progress indicator.
@since 12*/
-#[derive(Clone, Hash, PartialEq, Eq)]
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_ProgressType(pub ::core::ffi::c_uint);
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_TextDecorationType {
/// No text decoration.
pub const ARKUI_TEXT_DECORATION_TYPE_NONE: ArkUI_TextDecorationType =
ArkUI_TextDecorationType(0);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_TextDecorationType {
/// Line under the text.
pub const ARKUI_TEXT_DECORATION_TYPE_UNDERLINE: ArkUI_TextDecorationType =
ArkUI_TextDecorationType(1);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_TextDecorationType {
/// Line over the text.
pub const ARKUI_TEXT_DECORATION_TYPE_OVERLINE: ArkUI_TextDecorationType =
ArkUI_TextDecorationType(2);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_TextDecorationType {
/// Line through the text.
pub const ARKUI_TEXT_DECORATION_TYPE_LINE_THROUGH: ArkUI_TextDecorationType =
@@ -517,28 +652,40 @@ impl ArkUI_TextDecorationType {
/** @brief Enumerates the text decoration types.
@since 12*/
-#[derive(Clone, Hash, PartialEq, Eq)]
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_TextDecorationType(pub ::core::ffi::c_uint);
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_TextDecorationStyle {
/// Single solid line.
pub const ARKUI_TEXT_DECORATION_STYLE_SOLID: ArkUI_TextDecorationStyle =
ArkUI_TextDecorationStyle(0);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_TextDecorationStyle {
/// Double solid line.
pub const ARKUI_TEXT_DECORATION_STYLE_DOUBLE: ArkUI_TextDecorationStyle =
ArkUI_TextDecorationStyle(1);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_TextDecorationStyle {
/// Dotted line.
pub const ARKUI_TEXT_DECORATION_STYLE_DOTTED: ArkUI_TextDecorationStyle =
ArkUI_TextDecorationStyle(2);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_TextDecorationStyle {
/// Dashed line.
pub const ARKUI_TEXT_DECORATION_STYLE_DASHED: ArkUI_TextDecorationStyle =
ArkUI_TextDecorationStyle(3);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_TextDecorationStyle {
/// Wavy line.
pub const ARKUI_TEXT_DECORATION_STYLE_WAVY: ArkUI_TextDecorationStyle =
@@ -548,16 +695,24 @@ impl ArkUI_TextDecorationStyle {
/** @brief Enumerates the text decoration styles.
@since 12*/
-#[derive(Clone, Hash, PartialEq, Eq)]
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_TextDecorationStyle(pub ::core::ffi::c_uint);
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_TextCase {
/// The original case of the text is retained.
pub const ARKUI_TEXT_CASE_NORMAL: ArkUI_TextCase = ArkUI_TextCase(0);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_TextCase {
/// All letters in the text are in lowercase.
pub const ARKUI_TEXT_CASE_LOWER: ArkUI_TextCase = ArkUI_TextCase(1);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_TextCase {
/// All letters in the text are in uppercase.
pub const ARKUI_TEXT_CASE_UPPER: ArkUI_TextCase = ArkUI_TextCase(2);
@@ -566,20 +721,30 @@ impl ArkUI_TextCase {
/** @brief Enumerates the text cases.
@since 12*/
-#[derive(Clone, Hash, PartialEq, Eq)]
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_TextCase(pub ::core::ffi::c_uint);
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_CopyOptions {
/// Copy is not allowed.
pub const ARKUI_COPY_OPTIONS_NONE: ArkUI_CopyOptions = ArkUI_CopyOptions(0);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_CopyOptions {
/// Intra-application copy is allowed.
pub const ARKUI_COPY_OPTIONS_IN_APP: ArkUI_CopyOptions = ArkUI_CopyOptions(1);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_CopyOptions {
/// Intra-device copy is allowed.
pub const ARKUI_COPY_OPTIONS_LOCAL_DEVICE: ArkUI_CopyOptions = ArkUI_CopyOptions(2);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_CopyOptions {
/// Cross-device copy is allowed.
pub const ARKUI_COPY_OPTIONS_CROSS_DEVICE: ArkUI_CopyOptions = ArkUI_CopyOptions(3);
@@ -588,12 +753,18 @@ impl ArkUI_CopyOptions {
/** @brief Enumerates the text copy and paste modes.
@since 12*/
-#[derive(Clone, Hash, PartialEq, Eq)]
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_CopyOptions(pub ::core::ffi::c_uint);
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ShadowType {
/// Color.
pub const ARKUI_SHADOW_TYPE_COLOR: ArkUI_ShadowType = ArkUI_ShadowType(0);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ShadowType {
/// Blur.
pub const ARKUI_SHADOW_TYPE_BLUR: ArkUI_ShadowType = ArkUI_ShadowType(1);
@@ -602,23 +773,33 @@ impl ArkUI_ShadowType {
/** @brief Enumerates the shadow types.
@since 12*/
-#[derive(Clone, Hash, PartialEq, Eq)]
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_ShadowType(pub ::core::ffi::c_uint);
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_TextPickerRangeType {
/// Single-column text picker.
pub const ARKUI_TEXTPICKER_RANGETYPE_SINGLE: ArkUI_TextPickerRangeType =
ArkUI_TextPickerRangeType(0);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_TextPickerRangeType {
/// Multi-column text picker.
pub const ARKUI_TEXTPICKER_RANGETYPE_MULTI: ArkUI_TextPickerRangeType =
ArkUI_TextPickerRangeType(1);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_TextPickerRangeType {
/// Single-column text picker with image resources.
pub const ARKUI_TEXTPICKER_RANGETYPE_RANGE_CONTENT: ArkUI_TextPickerRangeType =
ArkUI_TextPickerRangeType(2);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_TextPickerRangeType {
/// Interconnected multi-column text picker.
pub const ARKUI_TEXTPICKER_RANGETYPE_CASCADE_RANGE_CONTENT: ArkUI_TextPickerRangeType =
@@ -628,11 +809,15 @@ impl ArkUI_TextPickerRangeType {
/** @brief Enumerates the types of the text picker.
@since 12*/
-#[derive(Clone, Hash, PartialEq, Eq)]
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_TextPickerRangeType(pub ::core::ffi::c_uint);
/** @brief Defines the input structure of the single-column text picker with image resources.
@since 12*/
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
#[repr(C)]
pub struct ARKUI_TextPickerRangeContent {
/// Image resource.
@@ -643,6 +828,8 @@ pub struct ARKUI_TextPickerRangeContent {
/** @brief Defines the input structure of the interconnected multi-column text picker.
@since 12*/
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
#[repr(C)]
pub struct ARKUI_TextPickerCascadeRangeContent {
/// Text information.
@@ -652,15 +839,21 @@ pub struct ARKUI_TextPickerCascadeRangeContent {
/// Size of the interconnected data array.
pub size: i32,
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_EdgeEffect {
/** Spring effect. When at one of the edges, the component can move beyond the bounds based on the initial
speed or through touches, and produces a bounce effect when the user releases their finger.*/
pub const ARKUI_EDGE_EFFECT_SPRING: ArkUI_EdgeEffect = ArkUI_EdgeEffect(0);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_EdgeEffect {
/// Fade effect. When at one of the edges, the component produces a fade effect.
pub const ARKUI_EDGE_EFFECT_FADE: ArkUI_EdgeEffect = ArkUI_EdgeEffect(1);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_EdgeEffect {
/// No effect after the scrollbar is moved to the edge.
pub const ARKUI_EDGE_EFFECT_NONE: ArkUI_EdgeEffect = ArkUI_EdgeEffect(2);
@@ -670,16 +863,24 @@ impl ArkUI_EdgeEffect {
reached.
@since 12*/
-#[derive(Clone, Hash, PartialEq, Eq)]
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_EdgeEffect(pub ::core::ffi::c_uint);
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ScrollDirection {
/// Only vertical scrolling is supported.
pub const ARKUI_SCROLL_DIRECTION_VERTICAL: ArkUI_ScrollDirection = ArkUI_ScrollDirection(0);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ScrollDirection {
/// Only horizontal scrolling is supported.
pub const ARKUI_SCROLL_DIRECTION_HORIZONTAL: ArkUI_ScrollDirection = ArkUI_ScrollDirection(1);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ScrollDirection {
/// Scrolling is not allowed.
pub const ARKUI_SCROLL_DIRECTION_NONE: ArkUI_ScrollDirection = ArkUI_ScrollDirection(3);
@@ -688,20 +889,30 @@ impl ArkUI_ScrollDirection {
/** @brief Enumerates the scroll directions for the component.
@since 12*/
-#[derive(Clone, Hash, PartialEq, Eq)]
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_ScrollDirection(pub ::core::ffi::c_uint);
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ScrollSnapAlign {
/// No alignment. This is the default value.
pub const ARKUI_SCROLL_SNAP_ALIGN_NONE: ArkUI_ScrollSnapAlign = ArkUI_ScrollSnapAlign(0);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ScrollSnapAlign {
/// The first item in the view is aligned at the start of the list.
pub const ARKUI_SCROLL_SNAP_ALIGN_START: ArkUI_ScrollSnapAlign = ArkUI_ScrollSnapAlign(1);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ScrollSnapAlign {
/// The middle items in the view are aligned in the center of the list.
pub const ARKUI_SCROLL_SNAP_ALIGN_CENTER: ArkUI_ScrollSnapAlign = ArkUI_ScrollSnapAlign(2);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ScrollSnapAlign {
/// The last item in the view is aligned at the end of the list.
pub const ARKUI_SCROLL_SNAP_ALIGN_END: ArkUI_ScrollSnapAlign = ArkUI_ScrollSnapAlign(3);
@@ -710,18 +921,26 @@ impl ArkUI_ScrollSnapAlign {
/** @brief Enumerates the alignment modes of list items when scrolling ends.
@since 12*/
-#[derive(Clone, Hash, PartialEq, Eq)]
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_ScrollSnapAlign(pub ::core::ffi::c_uint);
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ScrollBarDisplayMode {
/// Hide.
pub const ARKUI_SCROLL_BAR_DISPLAY_MODE_OFF: ArkUI_ScrollBarDisplayMode =
ArkUI_ScrollBarDisplayMode(0);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ScrollBarDisplayMode {
/// Display on demand (displays when the screen is touched and disappears after 2s).
pub const ARKUI_SCROLL_BAR_DISPLAY_MODE_AUTO: ArkUI_ScrollBarDisplayMode =
ArkUI_ScrollBarDisplayMode(1);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ScrollBarDisplayMode {
/// Always display.
pub const ARKUI_SCROLL_BAR_DISPLAY_MODE_ON: ArkUI_ScrollBarDisplayMode =
@@ -731,12 +950,18 @@ impl ArkUI_ScrollBarDisplayMode {
/** @brief Enumerates the scrollbar display modes.
@since 12*/
-#[derive(Clone, Hash, PartialEq, Eq)]
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_ScrollBarDisplayMode(pub ::core::ffi::c_uint);
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_Axis {
/// Only vertical scrolling is supported.
pub const ARKUI_AXIS_VERTICAL: ArkUI_Axis = ArkUI_Axis(0);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_Axis {
/// Only horizontal scrolling is supported.
pub const ARKUI_AXIS_HORIZONTAL: ArkUI_Axis = ArkUI_Axis(1);
@@ -745,20 +970,30 @@ impl ArkUI_Axis {
/** @brief Enumerates the scroll directions for the component.
@since 12*/
-#[derive(Clone, Hash, PartialEq, Eq)]
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_Axis(pub ::core::ffi::c_uint);
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_StickyStyle {
/// In the list item group, the header is not pinned to the top, and the footer is not pinned to the bottom.
pub const ARKUI_STICKY_STYLE_NONE: ArkUI_StickyStyle = ArkUI_StickyStyle(0);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_StickyStyle {
/// In the list item group, the header is pinned to the top, and the footer is not pinned to the bottom.
pub const ARKUI_STICKY_STYLE_HEADER: ArkUI_StickyStyle = ArkUI_StickyStyle(1);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_StickyStyle {
/// In the list item group, the footer is pinned to the bottom, and the header is not pinned to the top.
pub const ARKUI_STICKY_STYLE_FOOTER: ArkUI_StickyStyle = ArkUI_StickyStyle(2);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_StickyStyle {
/// In the list item group, the footer is pinned to the bottom, and the header is pinned to the top.
pub const ARKUI_STICKY_STYLE_BOTH: ArkUI_StickyStyle = ArkUI_StickyStyle(3);
@@ -767,16 +1002,24 @@ impl ArkUI_StickyStyle {
/** @brief Enumerates the modes for pinning the header to the top or the footer to the bottom.
@since 12*/
-#[derive(Clone, Hash, PartialEq, Eq)]
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_StickyStyle(pub ::core::ffi::c_uint);
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_BorderStyle {
/// Solid border.
pub const ARKUI_BORDER_STYLE_SOLID: ArkUI_BorderStyle = ArkUI_BorderStyle(0);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_BorderStyle {
/// Dashed border.
pub const ARKUI_BORDER_STYLE_DASHED: ArkUI_BorderStyle = ArkUI_BorderStyle(1);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_BorderStyle {
/// Dotted border.
pub const ARKUI_BORDER_STYLE_DOTTED: ArkUI_BorderStyle = ArkUI_BorderStyle(2);
@@ -785,23 +1028,33 @@ impl ArkUI_BorderStyle {
/** @brief Enumerates the border styles.
@since 12*/
-#[derive(Clone, Hash, PartialEq, Eq)]
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_BorderStyle(pub ::core::ffi::c_uint);
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_HitTestMode {
/** Both the node and its child node respond to the hit test of a touch event, but its sibling node is blocked from
the hit test.*/
pub const ARKUI_HIT_TEST_MODE_DEFAULT: ArkUI_HitTestMode = ArkUI_HitTestMode(0);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_HitTestMode {
/** The node responds to the hit test of a touch event, but its child node and sibling node are blocked from the
hit test.*/
pub const ARKUI_HIT_TEST_MODE_BLOCK: ArkUI_HitTestMode = ArkUI_HitTestMode(1);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_HitTestMode {
/** Both the node and its child node respond to the hit test of a touch event, and its sibling node is also
considered during the hit test.*/
pub const ARKUI_HIT_TEST_MODE_TRANSPARENT: ArkUI_HitTestMode = ArkUI_HitTestMode(2);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_HitTestMode {
/// The node does not respond to the hit test of a touch event.
pub const ARKUI_HIT_TEST_MODE_NONE: ArkUI_HitTestMode = ArkUI_HitTestMode(3);
@@ -810,28 +1063,42 @@ impl ArkUI_HitTestMode {
/** @brief Enumerates the hit test modes.
@since 12*/
-#[derive(Clone, Hash, PartialEq, Eq)]
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_HitTestMode(pub ::core::ffi::c_uint);
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ShadowStyle {
/// Mini shadow.
pub const ARKUI_SHADOW_STYLE_OUTER_DEFAULT_XS: ArkUI_ShadowStyle = ArkUI_ShadowStyle(0);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ShadowStyle {
/// Little shadow.
pub const ARKUI_SHADOW_STYLE_OUTER_DEFAULT_SM: ArkUI_ShadowStyle = ArkUI_ShadowStyle(1);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ShadowStyle {
/// Medium shadow.
pub const ARKUI_SHADOW_STYLE_OUTER_DEFAULT_MD: ArkUI_ShadowStyle = ArkUI_ShadowStyle(2);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ShadowStyle {
/// Large shadow.
pub const ARKUI_SHADOW_STYLE_OUTER_DEFAULT_LG: ArkUI_ShadowStyle = ArkUI_ShadowStyle(3);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ShadowStyle {
/// Floating small shadow.
pub const ARKUI_SHADOW_STYLE_OUTER_FLOATING_SM: ArkUI_ShadowStyle = ArkUI_ShadowStyle(4);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ShadowStyle {
/// Floating medium shadow.
pub const ARKUI_SHADOW_STYLE_OUTER_FLOATING_MD: ArkUI_ShadowStyle = ArkUI_ShadowStyle(5);
@@ -840,56 +1107,84 @@ impl ArkUI_ShadowStyle {
/** @brief Enumerates the shadow styles.
@since 12*/
-#[derive(Clone, Hash, PartialEq, Eq)]
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_ShadowStyle(pub ::core::ffi::c_uint);
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_AnimationCurve {
/// The animation speed keeps unchanged.
pub const ARKUI_CURVE_LINEAR: ArkUI_AnimationCurve = ArkUI_AnimationCurve(0);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_AnimationCurve {
/// The animation starts slowly, accelerates, and then slows down towards the end.
pub const ARKUI_CURVE_EASE: ArkUI_AnimationCurve = ArkUI_AnimationCurve(1);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_AnimationCurve {
/// The animation starts at a low speed and then picks up speed until the end.
pub const ARKUI_CURVE_EASE_IN: ArkUI_AnimationCurve = ArkUI_AnimationCurve(2);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_AnimationCurve {
/// The animation ends at a low speed.
pub const ARKUI_CURVE_EASE_OUT: ArkUI_AnimationCurve = ArkUI_AnimationCurve(3);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_AnimationCurve {
/// The animation starts and ends at a low speed.
pub const ARKUI_CURVE_EASE_IN_OUT: ArkUI_AnimationCurve = ArkUI_AnimationCurve(4);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_AnimationCurve {
/// The animation uses the standard curve
pub const ARKUI_CURVE_FAST_OUT_SLOW_IN: ArkUI_AnimationCurve = ArkUI_AnimationCurve(5);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_AnimationCurve {
/// The animation uses the deceleration curve.
pub const ARKUI_CURVE_LINEAR_OUT_SLOW_IN: ArkUI_AnimationCurve = ArkUI_AnimationCurve(6);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_AnimationCurve {
/// The animation uses the acceleration curve.
pub const ARKUI_CURVE_FAST_OUT_LINEAR_IN: ArkUI_AnimationCurve = ArkUI_AnimationCurve(7);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_AnimationCurve {
/// The animation uses the extreme deceleration curve.
pub const ARKUI_CURVE_EXTREME_DECELERATION: ArkUI_AnimationCurve = ArkUI_AnimationCurve(8);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_AnimationCurve {
/// The animation uses the sharp curve.
pub const ARKUI_CURVE_SHARP: ArkUI_AnimationCurve = ArkUI_AnimationCurve(9);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_AnimationCurve {
/// The animation uses the rhythm curve.
pub const ARKUI_CURVE_RHYTHM: ArkUI_AnimationCurve = ArkUI_AnimationCurve(10);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_AnimationCurve {
/// The animation uses the smooth curve.
pub const ARKUI_CURVE_SMOOTH: ArkUI_AnimationCurve = ArkUI_AnimationCurve(11);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_AnimationCurve {
/// The animation uses the friction curve
pub const ARKUI_CURVE_FRICTION: ArkUI_AnimationCurve = ArkUI_AnimationCurve(12);
@@ -898,16 +1193,24 @@ impl ArkUI_AnimationCurve {
/** @brief Enumerates the animation curves.
@since 12*/
-#[derive(Clone, Hash, PartialEq, Eq)]
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_AnimationCurve(pub ::core::ffi::c_uint);
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_SwiperArrow {
/// The arrow is not displayed for the navigation point indicator.
pub const ARKUI_SWIPER_ARROW_HIDE: ArkUI_SwiperArrow = ArkUI_SwiperArrow(0);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_SwiperArrow {
/// The arrow is displayed for the navigation point indicator.
pub const ARKUI_SWIPER_ARROW_SHOW: ArkUI_SwiperArrow = ArkUI_SwiperArrow(1);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_SwiperArrow {
/// The arrow is displayed only when the mouse pointer hovers over the navigation point indicator.
pub const ARKUI_SWIPER_ARROW_SHOW_ON_HOVER: ArkUI_SwiperArrow = ArkUI_SwiperArrow(2);
@@ -916,13 +1219,19 @@ impl ArkUI_SwiperArrow {
/** @brief Enumerates arrow styles of the navigation point indicator.
@since 12*/
-#[derive(Clone, Hash, PartialEq, Eq)]
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_SwiperArrow(pub ::core::ffi::c_uint);
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_SwiperNestedScrollMode {
/// Swiper only scrolls on its own and is not linked to its parent component.
pub const ARKUI_SWIPER_NESTED_SRCOLL_SELF_ONLY: ArkUI_SwiperNestedScrollMode =
ArkUI_SwiperNestedScrollMode(0);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_SwiperNestedScrollMode {
/** The Swiper itself scrolls first, and the parent component scrolls after it reaches the edge. After the parent
component scrolls to the edge, if the parent component has an edge effect, the parent component triggers the edge
@@ -934,22 +1243,32 @@ impl ArkUI_SwiperNestedScrollMode {
/** @brief Nested scrolling mode for Swiper components and parent components.
@since 12*/
-#[derive(Clone, Hash, PartialEq, Eq)]
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_SwiperNestedScrollMode(pub ::core::ffi::c_uint);
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_AccessibilityMode {
/// Whether the component can be identified by the accessibility service is dependent on the component.
pub const ARKUI_ACCESSIBILITY_MODE_AUTO: ArkUI_AccessibilityMode = ArkUI_AccessibilityMode(0);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_AccessibilityMode {
/// The component can be identified by the accessibility service.
pub const ARKUI_ACCESSIBILITY_MODE_ENABLED: ArkUI_AccessibilityMode =
ArkUI_AccessibilityMode(1);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_AccessibilityMode {
/// The component cannot be identified by the accessibility service.
pub const ARKUI_ACCESSIBILITY_MODE_DISABLED: ArkUI_AccessibilityMode =
ArkUI_AccessibilityMode(2);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_AccessibilityMode {
/// The component and all its child components cannot be identified by the accessibility service.
pub const ARKUI_ACCESSIBILITY_MODE_DISABLED_FOR_DESCENDANTS: ArkUI_AccessibilityMode =
@@ -959,21 +1278,31 @@ impl ArkUI_AccessibilityMode {
/** @brief Enumerates the accessibility modes.
@since 12*/
-#[derive(Clone, Hash, PartialEq, Eq)]
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_AccessibilityMode(pub ::core::ffi::c_uint);
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_TextCopyOptions {
/// Copy is not allowed.
pub const ARKUI_TEXT_COPY_OPTIONS_NONE: ArkUI_TextCopyOptions = ArkUI_TextCopyOptions(0);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_TextCopyOptions {
/// Intra-application copy is allowed.
pub const ARKUI_TEXT_COPY_OPTIONS_IN_APP: ArkUI_TextCopyOptions = ArkUI_TextCopyOptions(1);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_TextCopyOptions {
/// Intra-device copy is allowed.
pub const ARKUI_TEXT_COPY_OPTIONS_LOCAL_DEVICE: ArkUI_TextCopyOptions =
ArkUI_TextCopyOptions(2);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_TextCopyOptions {
/// Cross-device copy is allowed.
pub const ARKUI_TEXT_COPY_OPTIONS_CROSS_DEVICE: ArkUI_TextCopyOptions =
@@ -983,18 +1312,26 @@ impl ArkUI_TextCopyOptions {
/** @brief Defines whether copy and paste is allowed for text content.
@since 12*/
-#[derive(Clone, Hash, PartialEq, Eq)]
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_TextCopyOptions(pub ::core::ffi::c_uint);
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_TextHeightAdaptivePolicy {
/// Prioritize the maxLines settings.
pub const ARKUI_TEXT_HEIGHT_ADAPTIVE_POLICY_MAX_LINES_FIRST: ArkUI_TextHeightAdaptivePolicy =
ArkUI_TextHeightAdaptivePolicy(0);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_TextHeightAdaptivePolicy {
/// Prioritize the minFontSize settings.
pub const ARKUI_TEXT_HEIGHT_ADAPTIVE_POLICY_MIN_FONT_SIZE_FIRST:
ArkUI_TextHeightAdaptivePolicy = ArkUI_TextHeightAdaptivePolicy(1);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_TextHeightAdaptivePolicy {
/// Prioritize the layout constraint settings in terms of height.
pub const ARKUI_TEXT_HEIGHT_ADAPTIVE_POLICY_LAYOUT_CONSTRAINT_FIRST:
@@ -1004,19 +1341,27 @@ impl ArkUI_TextHeightAdaptivePolicy {
/** @brief Defines how the adaptive height is determined for the text.
@since 12*/
-#[derive(Clone, Hash, PartialEq, Eq)]
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_TextHeightAdaptivePolicy(pub ::core::ffi::c_uint);
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ScrollNestedMode {
/** The scrolling is contained within the component, and no scroll chaining occurs, that is, the parent component
does not scroll when the component scrolling reaches the boundary.*/
pub const ARKUI_SCROLL_NESTED_MODE_SELF_ONLY: ArkUI_ScrollNestedMode =
ArkUI_ScrollNestedMode(0);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ScrollNestedMode {
#[doc = " The component scrolls first, and when it hits the boundary, the parent component scrolls.\n/** When the parent component hits the boundary, its edge effect is displayed. If no edge\n 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);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ScrollNestedMode {
/** The parent component scrolls first, and when it hits the boundary, the component scrolls.
When the component hits the boundary, its edge effect is displayed. If no edge effect is specified for the
@@ -1024,6 +1369,8 @@ impl ArkUI_ScrollNestedMode {
pub const ARKUI_SCROLL_NESTED_MODE_PARENT_FIRST: ArkUI_ScrollNestedMode =
ArkUI_ScrollNestedMode(2);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ScrollNestedMode {
/** The component and its parent component scroll at the same time. When both the component and its parent component
hit the boundary, the edge effect of the component is displayed. If no edge effect is specified for the
@@ -1034,20 +1381,30 @@ impl ArkUI_ScrollNestedMode {
/** @brief Defines nested scrolling options.
@since 12*/
-#[derive(Clone, Hash, PartialEq, Eq)]
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_ScrollNestedMode(pub ::core::ffi::c_uint);
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ScrollEdge {
/// Top edge in the vertical direction.
pub const ARKUI_SCROLL_EDGE_TOP: ArkUI_ScrollEdge = ArkUI_ScrollEdge(0);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ScrollEdge {
/// Bottom edge in the vertical direction.
pub const ARKUI_SCROLL_EDGE_BOTTOM: ArkUI_ScrollEdge = ArkUI_ScrollEdge(1);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ScrollEdge {
/// Start position in the horizontal direction.
pub const ARKUI_SCROLL_EDGE_START: ArkUI_ScrollEdge = ArkUI_ScrollEdge(2);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ScrollEdge {
/// End position in the horizontal direction.
pub const ARKUI_SCROLL_EDGE_END: ArkUI_ScrollEdge = ArkUI_ScrollEdge(3);
@@ -1056,20 +1413,30 @@ impl ArkUI_ScrollEdge {
/** @brief Defines the edge to which the component scrolls.
@since 12*/
-#[derive(Clone, Hash, PartialEq, Eq)]
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_ScrollEdge(pub ::core::ffi::c_uint);
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ScrollAlignment {
/// Align the head. Align the head of the specified item with the head of the container.
pub const ARKUI_SCROLL_ALIGNMENT_START: ArkUI_ScrollAlignment = ArkUI_ScrollAlignment(0);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ScrollAlignment {
/// Center alignment. Align the axis direction of the specified item to the center of the container.
pub const ARKUI_SCROLL_ALIGNMENT_CENTER: ArkUI_ScrollAlignment = ArkUI_ScrollAlignment(1);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ScrollAlignment {
/// Tail alignment. Align the tail of the specified item with the tail of the container.
pub const ARKUI_SCROLL_ALIGNMENT_END: ArkUI_ScrollAlignment = ArkUI_ScrollAlignment(2);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ScrollAlignment {
/** Automatic alignment. If the specified item is completely in the display area, no adjustments will be made.
Otherwise, according to the principle of the shortest sliding distance, align the head or tail of the specified
@@ -1080,17 +1447,25 @@ impl ArkUI_ScrollAlignment {
/** @brief Alignment when scrolling to specific items.
@since 12*/
-#[derive(Clone, Hash, PartialEq, Eq)]
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_ScrollAlignment(pub ::core::ffi::c_uint);
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ScrollState {
/** Idle state. Trigger when using the method provided by the controller to control scrolling, and trigger when
dragging the scroll bar to scroll.*/
pub const ARKUI_SCROLL_STATE_IDLE: ArkUI_ScrollState = ArkUI_ScrollState(0);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ScrollState {
/// Scroll state. Triggered when dragging the container with fingers to scroll.
pub const ARKUI_SCROLL_STATE_SCROLL: ArkUI_ScrollState = ArkUI_ScrollState(1);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ScrollState {
/** Inertial rolling state. Triggered when inertia rolling and bouncing back to the edge are performed after
releasing the hand quickly.*/
@@ -1100,16 +1475,24 @@ impl ArkUI_ScrollState {
/** @brief Define the current scrolling state.
@since 12*/
-#[derive(Clone, Hash, PartialEq, Eq)]
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_ScrollState(pub ::core::ffi::c_uint);
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_SliderBlockStyle {
/// Round slider.
pub const ARKUI_SLIDER_BLOCK_STYLE_DEFAULT: ArkUI_SliderBlockStyle = ArkUI_SliderBlockStyle(0);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_SliderBlockStyle {
/// Slider with an image background.
pub const ARKUI_SLIDER_BLOCK_STYLE_IMAGE: ArkUI_SliderBlockStyle = ArkUI_SliderBlockStyle(1);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_SliderBlockStyle {
/// Slider in a custom shape.
pub const ARKUI_SLIDER_BLOCK_STYLE_SHAPE: ArkUI_SliderBlockStyle = ArkUI_SliderBlockStyle(2);
@@ -1118,12 +1501,18 @@ impl ArkUI_SliderBlockStyle {
/** @brief Enumerates the types of the slider in the block direction.
@since 12*/
-#[derive(Clone, Hash, PartialEq, Eq)]
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_SliderBlockStyle(pub ::core::ffi::c_uint);
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_SliderDirection {
/// Vertical direction.
pub const ARKUI_SLIDER_DIRECTION_VERTICAL: ArkUI_SliderDirection = ArkUI_SliderDirection(0);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_SliderDirection {
/// Horizontal direction.
pub const ARKUI_SLIDER_DIRECTION_HORIZONTAL: ArkUI_SliderDirection = ArkUI_SliderDirection(1);
@@ -1132,16 +1521,24 @@ impl ArkUI_SliderDirection {
/** @brief Enumerates the scroll directions of the slider.
@since 12*/
-#[derive(Clone, Hash, PartialEq, Eq)]
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_SliderDirection(pub ::core::ffi::c_uint);
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_SliderStyle {
/// The slider is on the slider track.
pub const ARKUI_SLIDER_STYLE_OUT_SET: ArkUI_SliderStyle = ArkUI_SliderStyle(0);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_SliderStyle {
/// The slider is in the slider track.
pub const ARKUI_SLIDER_STYLE_IN_SET: ArkUI_SliderStyle = ArkUI_SliderStyle(1);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_SliderStyle {
/// No slider.
pub const ARKUI_SLIDER_STYLE_NONE: ArkUI_SliderStyle = ArkUI_SliderStyle(2);
@@ -1150,12 +1547,18 @@ impl ArkUI_SliderStyle {
/** @brief Enumerates the slider styles.
@since 12*/
-#[derive(Clone, Hash, PartialEq, Eq)]
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_SliderStyle(pub ::core::ffi::c_uint);
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_CheckboxShape {
/// Circle.
pub const ArkUI_CHECKBOX_SHAPE_CIRCLE: ArkUI_CheckboxShape = ArkUI_CheckboxShape(0);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_CheckboxShape {
/// Rounded square.
pub const ArkUI_CHECKBOX_SHAPE_ROUNDED_SQUARE: ArkUI_CheckboxShape = ArkUI_CheckboxShape(1);
@@ -1164,24 +1567,34 @@ impl ArkUI_CheckboxShape {
/** @brief Enumerates the shapes of the check box
@since 12*/
-#[derive(Clone, Hash, PartialEq, Eq)]
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_CheckboxShape(pub ::core::ffi::c_uint);
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_AnimationPlayMode {
/// The animation is played forwards.
pub const ARKUI_ANIMATION_PLAY_MODE_NORMAL: ArkUI_AnimationPlayMode =
ArkUI_AnimationPlayMode(0);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_AnimationPlayMode {
/// The animation is played reversely.
pub const ARKUI_ANIMATION_PLAY_MODE_REVERSE: ArkUI_AnimationPlayMode =
ArkUI_AnimationPlayMode(1);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_AnimationPlayMode {
/** The animation is played normally for an odd number of times (1, 3, 5...) and reversely for an even number
of times (2, 4, 6...).*/
pub const ARKUI_ANIMATION_PLAY_MODE_ALTERNATE: ArkUI_AnimationPlayMode =
ArkUI_AnimationPlayMode(2);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_AnimationPlayMode {
/** The animation is played reversely for an odd number of times (1, 3, 5...) and normally for an even number
of times (2, 4, 6...).*/
@@ -1192,17 +1605,25 @@ impl ArkUI_AnimationPlayMode {
/** @brief Enumerates the animation playback modes.
@since 12*/
-#[derive(Clone, Hash, PartialEq, Eq)]
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_AnimationPlayMode(pub ::core::ffi::c_uint);
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ImageSize {
/// The original image aspect ratio is retained.
pub const ARKUI_IMAGE_SIZE_AUTO: ArkUI_ImageSize = ArkUI_ImageSize(0);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ImageSize {
/** Default value. The image is scaled with its aspect ratio retained for both sides to be greater than or equal
to the display boundaries.*/
pub const ARKUI_IMAGE_SIZE_COVER: ArkUI_ImageSize = ArkUI_ImageSize(1);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ImageSize {
/** The image is scaled with its aspect ratio retained for the content to be completely displayed within the display
boundaries.*/
@@ -1212,12 +1633,18 @@ impl ArkUI_ImageSize {
/** @brief Defines the image size.
@since 12*/
-#[derive(Clone, Hash, PartialEq, Eq)]
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_ImageSize(pub ::core::ffi::c_uint);
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_AdaptiveColor {
/// Adaptive color mode is not used.
pub const ARKUI_ADAPTIVE_COLOR_DEFAULT: ArkUI_AdaptiveColor = ArkUI_AdaptiveColor(0);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_AdaptiveColor {
/// Adaptive color mode is used.
pub const ARKUI_ADAPTIVE_COLOR_AVERAGE: ArkUI_AdaptiveColor = ArkUI_AdaptiveColor(1);
@@ -1226,16 +1653,24 @@ impl ArkUI_AdaptiveColor {
/** @brief Enumerates the adaptive color modes.
@since 12*/
-#[derive(Clone, Hash, PartialEq, Eq)]
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_AdaptiveColor(pub ::core::ffi::c_uint);
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ColorMode {
/// Following the system color mode.
pub const ARKUI_COLOR_MODE_SYSTEM: ArkUI_ColorMode = ArkUI_ColorMode(0);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ColorMode {
/// Light color mode.
pub const ARKUI_COLOR_MODE_LIGHT: ArkUI_ColorMode = ArkUI_ColorMode(1);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ColorMode {
/// Dark color mode.
pub const ARKUI_COLOR_MODE_DARK: ArkUI_ColorMode = ArkUI_ColorMode(2);
@@ -1244,12 +1679,18 @@ impl ArkUI_ColorMode {
/** @brief Enumerates the color modes.
@since 12*/
-#[derive(Clone, Hash, PartialEq, Eq)]
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_ColorMode(pub ::core::ffi::c_uint);
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_SystemColorMode {
/// Light color mode.
pub const ARKUI_SYSTEM_COLOR_MODE_LIGHT: ArkUI_SystemColorMode = ArkUI_SystemColorMode(0);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_SystemColorMode {
/// Dark color mode.
pub const ARKUI_SYSTEM_COLOR_MODE_DARK: ArkUI_SystemColorMode = ArkUI_SystemColorMode(1);
@@ -1258,56 +1699,84 @@ impl ArkUI_SystemColorMode {
/** @brief Enumerates the system color modes.
@since 12*/
-#[derive(Clone, Hash, PartialEq, Eq)]
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_SystemColorMode(pub ::core::ffi::c_uint);
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_BlurStyle {
/// Thin material.
pub const ARKUI_BLUR_STYLE_THIN: ArkUI_BlurStyle = ArkUI_BlurStyle(0);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_BlurStyle {
/// Regular material.
pub const ARKUI_BLUR_STYLE_REGULAR: ArkUI_BlurStyle = ArkUI_BlurStyle(1);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_BlurStyle {
/// Thick material.
pub const ARKUI_BLUR_STYLE_THICK: ArkUI_BlurStyle = ArkUI_BlurStyle(2);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_BlurStyle {
/// Material that creates the minimum depth of field effect.
pub const ARKUI_BLUR_STYLE_BACKGROUND_THIN: ArkUI_BlurStyle = ArkUI_BlurStyle(3);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_BlurStyle {
/// Material that creates a medium shallow depth of field effect.
pub const ARKUI_BLUR_STYLE_BACKGROUND_REGULAR: ArkUI_BlurStyle = ArkUI_BlurStyle(4);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_BlurStyle {
/// Material that creates a high shallow depth of field effect.
pub const ARKUI_BLUR_STYLE_BACKGROUND_THICK: ArkUI_BlurStyle = ArkUI_BlurStyle(5);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_BlurStyle {
/// Material that creates the maximum depth of field effect.
pub const ARKUI_BLUR_STYLE_BACKGROUND_ULTRA_THICK: ArkUI_BlurStyle = ArkUI_BlurStyle(6);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_BlurStyle {
/// No blur.
pub const ARKUI_BLUR_STYLE_NONE: ArkUI_BlurStyle = ArkUI_BlurStyle(7);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_BlurStyle {
/// Component ultra-thin material.
pub const ARKUI_BLUR_STYLE_COMPONENT_ULTRA_THIN: ArkUI_BlurStyle = ArkUI_BlurStyle(8);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_BlurStyle {
/// Component thin material.
pub const ARKUI_BLUR_STYLE_COMPONENT_THIN: ArkUI_BlurStyle = ArkUI_BlurStyle(9);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_BlurStyle {
/// Component regular material.
pub const ARKUI_BLUR_STYLE_COMPONENT_REGULAR: ArkUI_BlurStyle = ArkUI_BlurStyle(10);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_BlurStyle {
/// Component thick material.
pub const ARKUI_BLUR_STYLE_COMPONENT_THICK: ArkUI_BlurStyle = ArkUI_BlurStyle(11);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_BlurStyle {
/// Component ultra-thick material.
pub const ARKUI_BLUR_STYLE_COMPONENT_ULTRA_THICK: ArkUI_BlurStyle = ArkUI_BlurStyle(12);
@@ -1316,16 +1785,24 @@ impl ArkUI_BlurStyle {
/** @brief Enumerates the blur styles.
@since 12*/
-#[derive(Clone, Hash, PartialEq, Eq)]
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_BlurStyle(pub ::core::ffi::c_uint);
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_VerticalAlignment {
/// Top aligned.
pub const ARKUI_VERTICAL_ALIGNMENT_TOP: ArkUI_VerticalAlignment = ArkUI_VerticalAlignment(0);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_VerticalAlignment {
/// Center aligned. This is the default alignment mode.
pub const ARKUI_VERTICAL_ALIGNMENT_CENTER: ArkUI_VerticalAlignment = ArkUI_VerticalAlignment(1);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_VerticalAlignment {
/// Bottom aligned.
pub const ARKUI_VERTICAL_ALIGNMENT_BOTTOM: ArkUI_VerticalAlignment = ArkUI_VerticalAlignment(2);
@@ -1334,18 +1811,26 @@ impl ArkUI_VerticalAlignment {
/** @brief Enumerates the vertical alignment modes.
@since 12*/
-#[derive(Clone, Hash, PartialEq, Eq)]
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_VerticalAlignment(pub ::core::ffi::c_uint);
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_HorizontalAlignment {
/// Aligned with the start edge in the same direction as the language in use.
pub const ARKUI_HORIZONTAL_ALIGNMENT_START: ArkUI_HorizontalAlignment =
ArkUI_HorizontalAlignment(0);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_HorizontalAlignment {
/// Center aligned. This is the default alignment mode.
pub const ARKUI_HORIZONTAL_ALIGNMENT_CENTER: ArkUI_HorizontalAlignment =
ArkUI_HorizontalAlignment(1);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_HorizontalAlignment {
/// Aligned with the end edge in the same direction as the language in use.
pub const ARKUI_HORIZONTAL_ALIGNMENT_END: ArkUI_HorizontalAlignment =
@@ -1355,20 +1840,30 @@ impl ArkUI_HorizontalAlignment {
/** @brief Enumerates the alignment mode in the horizontal direction.
@since 12*/
-#[derive(Clone, Hash, PartialEq, Eq)]
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_HorizontalAlignment(pub ::core::ffi::c_uint);
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_TextOverflow {
/// Extra-long text is not clipped.
pub const ARKUI_TEXT_OVERFLOW_NONE: ArkUI_TextOverflow = ArkUI_TextOverflow(0);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_TextOverflow {
/// Extra-long text is clipped.
pub const ARKUI_TEXT_OVERFLOW_CLIP: ArkUI_TextOverflow = ArkUI_TextOverflow(1);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_TextOverflow {
/// An ellipsis (...) is used to represent text overflow.
pub const ARKUI_TEXT_OVERFLOW_ELLIPSIS: ArkUI_TextOverflow = ArkUI_TextOverflow(2);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_TextOverflow {
/// Text continuously scrolls when text overflow occurs.
pub const ARKUI_TEXT_OVERFLOW_MARQUEE: ArkUI_TextOverflow = ArkUI_TextOverflow(3);
@@ -1377,23 +1872,33 @@ impl ArkUI_TextOverflow {
/** @brief Enumerates the display modes when the text is too long.
@since 12*/
-#[derive(Clone, Hash, PartialEq, Eq)]
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_TextOverflow(pub ::core::ffi::c_uint);
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ImageSpanAlignment {
/// The image is bottom aligned with the text baseline.
pub const ARKUI_IMAGE_SPAN_ALIGNMENT_BASELINE: ArkUI_ImageSpanAlignment =
ArkUI_ImageSpanAlignment(0);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ImageSpanAlignment {
/// The image is bottom aligned with the text.
pub const ARKUI_IMAGE_SPAN_ALIGNMENT_BOTTOM: ArkUI_ImageSpanAlignment =
ArkUI_ImageSpanAlignment(1);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ImageSpanAlignment {
/// The image is centered aligned with the text.
pub const ARKUI_IMAGE_SPAN_ALIGNMENT_CENTER: ArkUI_ImageSpanAlignment =
ArkUI_ImageSpanAlignment(2);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ImageSpanAlignment {
/// The image is top aligned with the text.
pub const ARKUI_IMAGE_SPAN_ALIGNMENT_TOP: ArkUI_ImageSpanAlignment =
@@ -1403,67 +1908,99 @@ impl ArkUI_ImageSpanAlignment {
/** @brief Enumerates the alignment mode of the image with the text.
@since 12*/
-#[derive(Clone, Hash, PartialEq, Eq)]
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_ImageSpanAlignment(pub ::core::ffi::c_uint);
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ObjectFit {
/** The image is scaled with its aspect ratio retained for the content to be completely displayed within the
display boundaries.*/
pub const ARKUI_OBJECT_FIT_CONTAIN: ArkUI_ObjectFit = ArkUI_ObjectFit(0);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ObjectFit {
/** The image is scaled with its aspect ratio retained for both sides to be greater than or equal to the
display boundaries.*/
pub const ARKUI_OBJECT_FIT_COVER: ArkUI_ObjectFit = ArkUI_ObjectFit(1);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ObjectFit {
/// The image is scaled automatically to fit the display area.
pub const ARKUI_OBJECT_FIT_AUTO: ArkUI_ObjectFit = ArkUI_ObjectFit(2);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ObjectFit {
/// The image is scaled to fill the display area, and its aspect ratio is not retained.
pub const ARKUI_OBJECT_FIT_FILL: ArkUI_ObjectFit = ArkUI_ObjectFit(3);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ObjectFit {
/** The image content is displayed with its aspect ratio retained. The size is smaller than or equal to the
original size.*/
pub const ARKUI_OBJECT_FIT_SCALE_DOWN: ArkUI_ObjectFit = ArkUI_ObjectFit(4);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ObjectFit {
/// The original size is retained.
pub const ARKUI_OBJECT_FIT_NONE: ArkUI_ObjectFit = ArkUI_ObjectFit(5);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ObjectFit {
/// Not resized, the image is aligned with the start edge of the top of the container.
pub const ARKUI_OBJECT_FIT_NONE_AND_ALIGN_TOP_START: ArkUI_ObjectFit = ArkUI_ObjectFit(6);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ObjectFit {
/// Not resized, the image is horizontally centered at the top of the container.
pub const ARKUI_OBJECT_FIT_NONE_AND_ALIGN_TOP: ArkUI_ObjectFit = ArkUI_ObjectFit(7);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ObjectFit {
/// Not resized, the image is aligned with the end edge at the top of the container.
pub const ARKUI_OBJECT_FIT_NONE_AND_ALIGN_TOP_END: ArkUI_ObjectFit = ArkUI_ObjectFit(8);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ObjectFit {
/// Not resized, the image is vertically centered on the start edge of the container.
pub const ARKUI_OBJECT_FIT_NONE_AND_ALIGN_START: ArkUI_ObjectFit = ArkUI_ObjectFit(9);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ObjectFit {
/// Not resized, the image is horizontally and vertically centered in the container.
pub const ARKUI_OBJECT_FIT_NONE_AND_ALIGN_CENTER: ArkUI_ObjectFit = ArkUI_ObjectFit(10);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ObjectFit {
/// Not resized, the image is vertically centered on the end edge of the container.
pub const ARKUI_OBJECT_FIT_NONE_AND_ALIGN_END: ArkUI_ObjectFit = ArkUI_ObjectFit(11);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ObjectFit {
/// Not resized, the image is aligned with the start edge at the bottom of the container.
pub const ARKUI_OBJECT_FIT_NONE_AND_ALIGN_BOTTOM_START: ArkUI_ObjectFit = ArkUI_ObjectFit(12);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ObjectFit {
/// Not resized, the image is horizontally centered at the bottom of the container.
pub const ARKUI_OBJECT_FIT_NONE_AND_ALIGN_BOTTOM: ArkUI_ObjectFit = ArkUI_ObjectFit(13);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ObjectFit {
/// Not resized, the image is aligned with the end edge at the bottom of the container.
pub const ARKUI_OBJECT_FIT_NONE_AND_ALIGN_BOTTOM_END: ArkUI_ObjectFit = ArkUI_ObjectFit(14);
@@ -1472,22 +2009,32 @@ impl ArkUI_ObjectFit {
/** @brief Defines how the image is resized to fit its container.
ImageSpanAlignment
@since 12*/
-#[derive(Clone, Hash, PartialEq, Eq)]
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_ObjectFit(pub ::core::ffi::c_uint);
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ImageInterpolation {
/// No image interpolation.
pub const ARKUI_IMAGE_INTERPOLATION_NONE: ArkUI_ImageInterpolation =
ArkUI_ImageInterpolation(0);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ImageInterpolation {
/// Low quality interpolation.
pub const ARKUI_IMAGE_INTERPOLATION_LOW: ArkUI_ImageInterpolation = ArkUI_ImageInterpolation(1);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ImageInterpolation {
/// Medium quality interpolation.
pub const ARKUI_IMAGE_INTERPOLATION_MEDIUM: ArkUI_ImageInterpolation =
ArkUI_ImageInterpolation(2);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ImageInterpolation {
/// High quality interpolation. This mode produces scaled images of the highest possible quality.
pub const ARKUI_IMAGE_INTERPOLATION_HIGH: ArkUI_ImageInterpolation =
@@ -1497,135 +2044,197 @@ impl ArkUI_ImageInterpolation {
/** @brief Enumerates the image interpolation effect.
@since 12*/
-#[derive(Clone, Hash, PartialEq, Eq)]
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_ImageInterpolation(pub ::core::ffi::c_uint);
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_BlendMode {
/// The top image is superimposed on the bottom image without any blending.
pub const ARKUI_BLEND_MODE_NONE: ArkUI_BlendMode = ArkUI_BlendMode(0);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_BlendMode {
/// The target pixels covered by the source pixels are erased by being turned to completely transparent.
pub const ARKUI_BLEND_MODE_CLEAR: ArkUI_BlendMode = ArkUI_BlendMode(1);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_BlendMode {
/// r = s: Only the source pixels are displayed.
pub const ARKUI_BLEND_MODE_SRC: ArkUI_BlendMode = ArkUI_BlendMode(2);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_BlendMode {
/// r = d: Only the target pixels are displayed.
pub const ARKUI_BLEND_MODE_DST: ArkUI_BlendMode = ArkUI_BlendMode(3);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_BlendMode {
/// r = s + (1 - sa) * d: The source pixels are blended based on opacity and cover the target pixels.
pub const ARKUI_BLEND_MODE_SRC_OVER: ArkUI_BlendMode = ArkUI_BlendMode(4);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_BlendMode {
/// r = d + (1 - da) * s: The target pixels are blended based on opacity and cover on the source pixels.
pub const ARKUI_BLEND_MODE_DST_OVER: ArkUI_BlendMode = ArkUI_BlendMode(5);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_BlendMode {
/// r = s * da: Only the part of the source pixels that overlap with the target pixels is displayed.
pub const ARKUI_BLEND_MODE_SRC_IN: ArkUI_BlendMode = ArkUI_BlendMode(6);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_BlendMode {
/// r = d * sa: Only the part of the target pixels that overlap with the source pixels is displayed.
pub const ARKUI_BLEND_MODE_DST_IN: ArkUI_BlendMode = ArkUI_BlendMode(7);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_BlendMode {
/// r = s * (1 - da): Only the part of the source pixels that do not overlap with the target pixels is displayed.
pub const ARKUI_BLEND_MODE_SRC_OUT: ArkUI_BlendMode = ArkUI_BlendMode(8);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_BlendMode {
/// r = d * (1 - sa): Only the part of the target pixels that do not overlap with the source pixels is displayed.
pub const ARKUI_BLEND_MODE_DST_OUT: ArkUI_BlendMode = ArkUI_BlendMode(9);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_BlendMode {
/** r = s * da + d * (1 - sa): The part of the source pixels that overlap with the target pixels is displayed and
the part of the target pixels that do not overlap with the source pixels are displayed.*/
pub const ARKUI_BLEND_MODE_SRC_ATOP: ArkUI_BlendMode = ArkUI_BlendMode(10);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_BlendMode {
/** r = d * sa + s * (1 - da): The part of the target pixels that overlap with the source pixels and the part of
the source pixels that do not overlap with the target pixels are displayed.*/
pub const ARKUI_BLEND_MODE_DST_ATOP: ArkUI_BlendMode = ArkUI_BlendMode(11);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_BlendMode {
/** r = s * (1 - da) + d * (1 - sa): Only the non-overlapping part between the source pixels and the target pixels
is displayed.*/
pub const ARKUI_BLEND_MODE_XOR: ArkUI_BlendMode = ArkUI_BlendMode(12);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_BlendMode {
/// r = min(s + d, 1): New pixels resulting from adding the source pixels to the target pixels are displayed.
pub const ARKUI_BLEND_MODE_PLUS: ArkUI_BlendMode = ArkUI_BlendMode(13);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_BlendMode {
/// r = s * d: New pixels resulting from multiplying the source pixels with the target pixels are displayed.
pub const ARKUI_BLEND_MODE_MODULATE: ArkUI_BlendMode = ArkUI_BlendMode(14);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_BlendMode {
/** r = s + d - s * d: Pixels are blended by adding the source pixels to the target pixels and subtracting the
product of their multiplication.*/
pub const ARKUI_BLEND_MODE_SCREEN: ArkUI_BlendMode = ArkUI_BlendMode(15);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_BlendMode {
/// The MULTIPLY or SCREEN mode is used based on the target pixels.
pub const ARKUI_BLEND_MODE_OVERLAY: ArkUI_BlendMode = ArkUI_BlendMode(16);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_BlendMode {
/// rc = s + d - max(s * da, d * sa), ra = kSrcOver: When two colors overlap, whichever is darker is used.
pub const ARKUI_BLEND_MODE_DARKEN: ArkUI_BlendMode = ArkUI_BlendMode(17);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_BlendMode {
/** rc = s + d - min(s * da, d * sa), ra =
kSrcOver: The final pixels are composed of the lightest values of pixels.*/
pub const ARKUI_BLEND_MODE_LIGHTEN: ArkUI_BlendMode = ArkUI_BlendMode(18);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_BlendMode {
/// The colors of the target pixels are lightened to reflect the source pixels.
pub const ARKUI_BLEND_MODE_COLOR_DODGE: ArkUI_BlendMode = ArkUI_BlendMode(19);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_BlendMode {
/// The colors of the target pixels are darkened to reflect the source pixels.
pub const ARKUI_BLEND_MODE_COLOR_BURN: ArkUI_BlendMode = ArkUI_BlendMode(20);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_BlendMode {
/// The MULTIPLY or SCREEN mode is used, depending on the source pixels.
pub const ARKUI_BLEND_MODE_HARD_LIGHT: ArkUI_BlendMode = ArkUI_BlendMode(21);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_BlendMode {
/// The LIGHTEN or DARKEN mode is used, depending on the source pixels.
pub const ARKUI_BLEND_MODE_SOFT_LIGHT: ArkUI_BlendMode = ArkUI_BlendMode(22);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_BlendMode {
/** rc = s + d - 2 * (min(s * da, d * sa)), ra =
kSrcOver: The final pixel is the result of subtracting the darker of the two pixels (source and target) from
the lighter one.*/
pub const ARKUI_BLEND_MODE_DIFFERENCE: ArkUI_BlendMode = ArkUI_BlendMode(23);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_BlendMode {
/// rc = s + d - two(s * d), ra = kSrcOver: The final pixel is similar to DIFFERENCE, but with less contrast.
pub const ARKUI_BLEND_MODE_EXCLUSION: ArkUI_BlendMode = ArkUI_BlendMode(24);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_BlendMode {
/** r = s * (1 - da) + d * (1 - sa) + s * d: The final pixel is the result of multiplying the source pixel
by the target pixel.*/
pub const ARKUI_BLEND_MODE_MULTIPLY: ArkUI_BlendMode = ArkUI_BlendMode(25);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_BlendMode {
/** The resultant image is created with the luminance and saturation of the source image and the hue of the target
image.*/
pub const ARKUI_BLEND_MODE_HUE: ArkUI_BlendMode = ArkUI_BlendMode(26);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_BlendMode {
/** The resultant image is created with the luminance and hue of the target image and the saturation of the source
image.*/
pub const ARKUI_BLEND_MODE_SATURATION: ArkUI_BlendMode = ArkUI_BlendMode(27);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_BlendMode {
/** The resultant image is created with the saturation and hue of the source image and the luminance of the target
image.*/
pub const ARKUI_BLEND_MODE_COLOR: ArkUI_BlendMode = ArkUI_BlendMode(28);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_BlendMode {
/** The resultant image is created with the saturation and hue of the target image and the luminance of the source
image.*/
@@ -1635,16 +2244,24 @@ impl ArkUI_BlendMode {
/** @brief Enumerates the blend modes.
@since 12*/
-#[derive(Clone, Hash, PartialEq, Eq)]
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_BlendMode(pub ::core::ffi::c_uint);
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_Direction {
/// Components are arranged from left to right.
pub const ARKUI_DIRECTION_LTR: ArkUI_Direction = ArkUI_Direction(0);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_Direction {
/// Components are arranged from right to left.
pub const ARKUI_DIRECTION_RTL: ArkUI_Direction = ArkUI_Direction(1);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_Direction {
/// The default layout direction is used.
pub const ARKUI_DIRECTION_AUTO: ArkUI_Direction = ArkUI_Direction(3);
@@ -1653,28 +2270,42 @@ impl ArkUI_Direction {
/** @brief Enumerates the modes in which components are laid out along the main axis of the container.
@since 12*/
-#[derive(Clone, Hash, PartialEq, Eq)]
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_Direction(pub ::core::ffi::c_uint);
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ItemAlignment {
/// The default configuration in the container is used.
pub const ARKUI_ITEM_ALIGNMENT_AUTO: ArkUI_ItemAlignment = ArkUI_ItemAlignment(0);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ItemAlignment {
/// The items in the container are aligned with the cross-start edge.
pub const ARKUI_ITEM_ALIGNMENT_START: ArkUI_ItemAlignment = ArkUI_ItemAlignment(1);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ItemAlignment {
/// The items in the container are centered along the cross axis.
pub const ARKUI_ITEM_ALIGNMENT_CENTER: ArkUI_ItemAlignment = ArkUI_ItemAlignment(2);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ItemAlignment {
/// The items in the container are aligned with the cross-end edge.
pub const ARKUI_ITEM_ALIGNMENT_END: ArkUI_ItemAlignment = ArkUI_ItemAlignment(3);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ItemAlignment {
/// The items in the container are stretched and padded along the cross axis.
pub const ARKUI_ITEM_ALIGNMENT_STRETCH: ArkUI_ItemAlignment = ArkUI_ItemAlignment(4);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ItemAlignment {
/** The items in the container are aligned in such a manner that their text baselines are aligned along the
cross axis.*/
@@ -1684,16 +2315,24 @@ impl ArkUI_ItemAlignment {
/** @brief Enumerates the modes in which components are laid out along the cross axis of the container.
@since 12*/
-#[derive(Clone, Hash, PartialEq, Eq)]
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_ItemAlignment(pub ::core::ffi::c_uint);
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ColorStrategy {
/// The foreground colors are the inverse of the component background colors.
pub const ARKUI_COLOR_STRATEGY_INVERT: ArkUI_ColorStrategy = ArkUI_ColorStrategy(0);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ColorStrategy {
/// The shadow colors of the component are the average color obtained from the component background shadow area.
pub const ARKUI_COLOR_STRATEGY_AVERAGE: ArkUI_ColorStrategy = ArkUI_ColorStrategy(1);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ColorStrategy {
/// The shadow colors of the component are the primary color obtained from the component background shadow area.
pub const ARKUI_COLOR_STRATEGY_PRIMARY: ArkUI_ColorStrategy = ArkUI_ColorStrategy(2);
@@ -1702,32 +2341,46 @@ impl ArkUI_ColorStrategy {
/** @brief Enumerates the foreground colors.
@since 12*/
-#[derive(Clone, Hash, PartialEq, Eq)]
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_ColorStrategy(pub ::core::ffi::c_uint);
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_FlexAlignment {
/// The child components are aligned with the start edge of the main axis.
pub const ARKUI_FLEX_ALIGNMENT_START: ArkUI_FlexAlignment = ArkUI_FlexAlignment(1);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_FlexAlignment {
/// The child components are aligned in the center of the main axis.
pub const ARKUI_FLEX_ALIGNMENT_CENTER: ArkUI_FlexAlignment = ArkUI_FlexAlignment(2);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_FlexAlignment {
/// The child components are aligned with the end edge of the main axis.
pub const ARKUI_FLEX_ALIGNMENT_END: ArkUI_FlexAlignment = ArkUI_FlexAlignment(3);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_FlexAlignment {
/** The child components are evenly distributed along the main axis. The space between any two adjacent components
is the same. The first component is aligned with the main-start, and the last component is aligned with
the main-end.*/
pub const ARKUI_FLEX_ALIGNMENT_SPACE_BETWEEN: ArkUI_FlexAlignment = ArkUI_FlexAlignment(6);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_FlexAlignment {
/** The child components are evenly distributed along the main axis. The space between any two adjacent components
is the same. The space between the first component and main-start, and that between the last component and
cross-main are both half the size of the space between two adjacent components.*/
pub const ARKUI_FLEX_ALIGNMENT_SPACE_AROUND: ArkUI_FlexAlignment = ArkUI_FlexAlignment(7);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_FlexAlignment {
/** The child components are evenly distributed along the main axis. The space between the first component
and main-start, the space between the last component and main-end, and the space between any two adjacent
@@ -1738,20 +2391,30 @@ impl ArkUI_FlexAlignment {
/** @brief Enumerates the vertical alignment modes.
@since 12*/
-#[derive(Clone, Hash, PartialEq, Eq)]
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_FlexAlignment(pub ::core::ffi::c_uint);
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_FlexDirection {
/// The child components are arranged in the same direction as the main axis runs along the rows.
pub const ARKUI_FLEX_DIRECTION_ROW: ArkUI_FlexDirection = ArkUI_FlexDirection(0);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_FlexDirection {
/// The child components are arranged in the same direction as the main axis runs down the columns.
pub const ARKUI_FLEX_DIRECTION_COLUMN: ArkUI_FlexDirection = ArkUI_FlexDirection(1);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_FlexDirection {
/// The child components are arranged opposite to the ROW direction.
pub const ARKUI_FLEX_DIRECTION_ROW_REVERSE: ArkUI_FlexDirection = ArkUI_FlexDirection(2);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_FlexDirection {
/// The child components are arranged opposite to the COLUMN direction.
pub const ARKUI_FLEX_DIRECTION_COLUMN_REVERSE: ArkUI_FlexDirection = ArkUI_FlexDirection(3);
@@ -1760,16 +2423,24 @@ impl ArkUI_FlexDirection {
/** @brief Enumerates the directions of the main axis in the flex container.
@since 12*/
-#[derive(Clone, Hash, PartialEq, Eq)]
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_FlexDirection(pub ::core::ffi::c_uint);
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_FlexWrap {
/// The child components in the flex container are arranged in a single line, and they cannot overflow.
pub const ARKUI_FLEX_WRAP_NO_WRAP: ArkUI_FlexWrap = ArkUI_FlexWrap(0);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_FlexWrap {
/// The child components in the flex container are arranged in multiple lines, and they may overflow.
pub const ARKUI_FLEX_WRAP_WRAP: ArkUI_FlexWrap = ArkUI_FlexWrap(1);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_FlexWrap {
/// The child components in the flex container are reversely arranged in multiple lines, and they may overflow.
pub const ARKUI_FLEX_WRAP_WRAP_REVERSE: ArkUI_FlexWrap = ArkUI_FlexWrap(2);
@@ -1778,16 +2449,24 @@ impl ArkUI_FlexWrap {
/** @brief Defines whether the flex container has a single line or multiple lines.
@since 12*/
-#[derive(Clone, Hash, PartialEq, Eq)]
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_FlexWrap(pub ::core::ffi::c_uint);
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_Visibility {
/// The component is visible.
pub const ARKUI_VISIBILITY_VISIBLE: ArkUI_Visibility = ArkUI_Visibility(0);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_Visibility {
/// The component is hidden, and a placeholder is used for it in the layout.
pub const ARKUI_VISIBILITY_HIDDEN: ArkUI_Visibility = ArkUI_Visibility(1);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_Visibility {
/// The component is hidden. It is not involved in the layout, and no placeholder is used for it.
pub const ARKUI_VISIBILITY_NONE: ArkUI_Visibility = ArkUI_Visibility(2);
@@ -1796,16 +2475,24 @@ impl ArkUI_Visibility {
/** @brief Enumerates the visibility values.
@since 12*/
-#[derive(Clone, Hash, PartialEq, Eq)]
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_Visibility(pub ::core::ffi::c_uint);
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_CalendarAlignment {
/// Left aligned.
pub const ARKUI_CALENDAR_ALIGNMENT_START: ArkUI_CalendarAlignment = ArkUI_CalendarAlignment(0);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_CalendarAlignment {
/// Center aligned.
pub const ARKUI_CALENDAR_ALIGNMENT_CENTER: ArkUI_CalendarAlignment = ArkUI_CalendarAlignment(1);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_CalendarAlignment {
/// Right aligned.
pub const ARKUI_CALENDAR_ALIGNMENT_END: ArkUI_CalendarAlignment = ArkUI_CalendarAlignment(2);
@@ -1814,24 +2501,36 @@ impl ArkUI_CalendarAlignment {
/** @brief Enumerates the alignment modes between the calendar picker and the entry component.
@since 12*/
-#[derive(Clone, Hash, PartialEq, Eq)]
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_CalendarAlignment(pub ::core::ffi::c_uint);
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_MaskType {
/// Rectangle.
pub const ARKUI_MASK_TYPE_RECTANGLE: ArkUI_MaskType = ArkUI_MaskType(0);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_MaskType {
/// Circle.
pub const ARKUI_MASK_TYPE_CIRCLE: ArkUI_MaskType = ArkUI_MaskType(1);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_MaskType {
/// Ellipse.
pub const ARKUI_MASK_TYPE_ELLIPSE: ArkUI_MaskType = ArkUI_MaskType(2);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_MaskType {
/// Path.
pub const ARKUI_MASK_TYPE_PATH: ArkUI_MaskType = ArkUI_MaskType(3);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_MaskType {
/// Progress indicator.
pub const ARKUI_MASK_TYPE_PROGRESS: ArkUI_MaskType = ArkUI_MaskType(4);
@@ -1840,20 +2539,30 @@ impl ArkUI_MaskType {
/** @brief Enumerates the mask types.
@since 12*/
-#[derive(Clone, Hash, PartialEq, Eq)]
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_MaskType(pub ::core::ffi::c_uint);
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ClipType {
/// Rectangle.
pub const ARKUI_CLIP_TYPE_RECTANGLE: ArkUI_ClipType = ArkUI_ClipType(0);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ClipType {
/// Circle.
pub const ARKUI_CLIP_TYPE_CIRCLE: ArkUI_ClipType = ArkUI_ClipType(1);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ClipType {
/// Ellipse.
pub const ARKUI_CLIP_TYPE_ELLIPSE: ArkUI_ClipType = ArkUI_ClipType(2);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ClipType {
/// Path.
pub const ARKUI_CLIP_TYPE_PATH: ArkUI_ClipType = ArkUI_ClipType(3);
@@ -1862,11 +2571,15 @@ impl ArkUI_ClipType {
/** @brief Enumerates the clipping region types.
@since 12*/
-#[derive(Clone, Hash, PartialEq, Eq)]
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_ClipType(pub ::core::ffi::c_uint);
/** @brief Defines the gradient color stop structure.
@since 12*/
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
#[repr(C)]
pub struct ArkUI_ColorStop {
/// Color array.
@@ -1876,18 +2589,26 @@ pub struct ArkUI_ColorStop {
/// Length array.
pub size: ::core::ffi::c_int,
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ShapeType {
/// Rectangle.
pub const ARKUI_SHAPE_TYPE_RECTANGLE: ArkUI_ShapeType = ArkUI_ShapeType(0);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ShapeType {
/// Circle.
pub const ARKUI_SHAPE_TYPE_CIRCLE: ArkUI_ShapeType = ArkUI_ShapeType(1);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ShapeType {
/// Ellipse.
pub const ARKUI_SHAPE_TYPE_ELLIPSE: ArkUI_ShapeType = ArkUI_ShapeType(2);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ShapeType {
/// Path.
pub const ARKUI_SHAPE_TYPE_PATH: ArkUI_ShapeType = ArkUI_ShapeType(3);
@@ -1896,53 +2617,75 @@ impl ArkUI_ShapeType {
/** @brief Enumerates the custom shapes.
@since 12*/
-#[derive(Clone, Hash, PartialEq, Eq)]
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_ShapeType(pub ::core::ffi::c_uint);
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_LinearGradientDirection {
/// From right to left.
pub const ARKUI_LINEAR_GRADIENT_DIRECTION_LEFT: ArkUI_LinearGradientDirection =
ArkUI_LinearGradientDirection(0);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_LinearGradientDirection {
/// From bottom to top.
pub const ARKUI_LINEAR_GRADIENT_DIRECTION_TOP: ArkUI_LinearGradientDirection =
ArkUI_LinearGradientDirection(1);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_LinearGradientDirection {
/// From left to right.
pub const ARKUI_LINEAR_GRADIENT_DIRECTION_RIGHT: ArkUI_LinearGradientDirection =
ArkUI_LinearGradientDirection(2);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_LinearGradientDirection {
/// From top to bottom.
pub const ARKUI_LINEAR_GRADIENT_DIRECTION_BOTTOM: ArkUI_LinearGradientDirection =
ArkUI_LinearGradientDirection(3);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_LinearGradientDirection {
/// From lower right to upper left.
pub const ARKUI_LINEAR_GRADIENT_DIRECTION_LEFT_TOP: ArkUI_LinearGradientDirection =
ArkUI_LinearGradientDirection(4);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_LinearGradientDirection {
/// From upper right to lower left.
pub const ARKUI_LINEAR_GRADIENT_DIRECTION_LEFT_BOTTOM: ArkUI_LinearGradientDirection =
ArkUI_LinearGradientDirection(5);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_LinearGradientDirection {
/// From lower left to upper right.
pub const ARKUI_LINEAR_GRADIENT_DIRECTION_RIGHT_TOP: ArkUI_LinearGradientDirection =
ArkUI_LinearGradientDirection(6);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_LinearGradientDirection {
/// From upper left to lower right.
pub const ARKUI_LINEAR_GRADIENT_DIRECTION_RIGHT_BOTTOM: ArkUI_LinearGradientDirection =
ArkUI_LinearGradientDirection(7);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_LinearGradientDirection {
/// No gradient.
pub const ARKUI_LINEAR_GRADIENT_DIRECTION_NONE: ArkUI_LinearGradientDirection =
ArkUI_LinearGradientDirection(8);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_LinearGradientDirection {
/// Custom direction.
pub const ARKUI_LINEAR_GRADIENT_DIRECTION_CUSTOM: ArkUI_LinearGradientDirection =
@@ -1952,18 +2695,26 @@ impl ArkUI_LinearGradientDirection {
/** @brief Enumerates the gradient directions.
@since 12*/
-#[derive(Clone, Hash, PartialEq, Eq)]
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_LinearGradientDirection(pub ::core::ffi::c_uint);
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_WordBreak {
/** Word breaks can occur between any two characters for Chinese, Japanese, and Korean (CJK) text, but can occur
only at a space character for non-CJK text (such as English).*/
pub const ARKUI_WORD_BREAK_NORMAL: ArkUI_WordBreak = ArkUI_WordBreak(0);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_WordBreak {
/** Word breaks can occur between any two characters for non-CJK text. CJK text behavior is the same as for
NORMAL.*/
pub const ARKUI_WORD_BREAK_BREAK_ALL: ArkUI_WordBreak = ArkUI_WordBreak(1);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_WordBreak {
/** This option has the same effect as BREAK_ALL for non-CJK text, except that if it preferentially wraps
lines at appropriate characters (for example, spaces) whenever possible.
@@ -1974,16 +2725,24 @@ impl ArkUI_WordBreak {
/** @brief Enumerates the word break rules.
@since 12*/
-#[derive(Clone, Hash, PartialEq, Eq)]
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_WordBreak(pub ::core::ffi::c_uint);
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_EllipsisMode {
/// An ellipsis is used at the start of the line of text.
pub const ARKUI_ELLIPSIS_MODE_START: ArkUI_EllipsisMode = ArkUI_EllipsisMode(0);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_EllipsisMode {
/// An ellipsis is used at the center of the line of text.
pub const ARKUI_ELLIPSIS_MODE_CENTER: ArkUI_EllipsisMode = ArkUI_EllipsisMode(1);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_EllipsisMode {
/// An ellipsis is used at the end of the line of text.
pub const ARKUI_ELLIPSIS_MODE_END: ArkUI_EllipsisMode = ArkUI_EllipsisMode(2);
@@ -1992,12 +2751,18 @@ impl ArkUI_EllipsisMode {
/** @brief Enumerates the ellipsis positions.
@since 12*/
-#[derive(Clone, Hash, PartialEq, Eq)]
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_EllipsisMode(pub ::core::ffi::c_uint);
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ImageRenderMode {
/// Render image pixels as they are in the original source image.
pub const ARKUI_IMAGE_RENDER_MODE_ORIGINAL: ArkUI_ImageRenderMode = ArkUI_ImageRenderMode(0);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ImageRenderMode {
/// Render image pixels to create a monochrome template image.
pub const ARKUI_IMAGE_RENDER_MODE_TEMPLATE: ArkUI_ImageRenderMode = ArkUI_ImageRenderMode(1);
@@ -2006,20 +2771,30 @@ impl ArkUI_ImageRenderMode {
/** @brief Enumerates the image rendering modes.
@since 12*/
-#[derive(Clone, Hash, PartialEq, Eq)]
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_ImageRenderMode(pub ::core::ffi::c_uint);
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_TransitionEdge {
/// Top edge of the window.
pub const ARKUI_TRANSITION_EDGE_TOP: ArkUI_TransitionEdge = ArkUI_TransitionEdge(0);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_TransitionEdge {
/// Bottom edge of the window.
pub const ARKUI_TRANSITION_EDGE_BOTTOM: ArkUI_TransitionEdge = ArkUI_TransitionEdge(1);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_TransitionEdge {
/// Left edge of the window.
pub const ARKUI_TRANSITION_EDGE_START: ArkUI_TransitionEdge = ArkUI_TransitionEdge(2);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_TransitionEdge {
/// Right edge of the window.
pub const ARKUI_TRANSITION_EDGE_END: ArkUI_TransitionEdge = ArkUI_TransitionEdge(3);
@@ -2028,12 +2803,18 @@ impl ArkUI_TransitionEdge {
/** @brief Enumerates the slide-in and slide-out positions of the component from the screen edge during transition.
@since 12*/
-#[derive(Clone, Hash, PartialEq, Eq)]
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_TransitionEdge(pub ::core::ffi::c_uint);
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_BlendApplyType {
/// The content of the view is blended in sequence on the target image.
pub const BLEND_APPLY_TYPE_FAST: ArkUI_BlendApplyType = ArkUI_BlendApplyType(0);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_BlendApplyType {
#[doc = " The content of the component and its child components are drawn on the offscreen canvas, and then blended with\n/* the existing content on the canvas."]
pub const BLEND_APPLY_TYPE_OFFSCREEN: ArkUI_BlendApplyType = ArkUI_BlendApplyType(1);
@@ -2042,12 +2823,17 @@ impl ArkUI_BlendApplyType {
/** @brief Defines how the specified blend mode is applied.
@since 12*/
-#[derive(Clone, Hash, PartialEq, Eq)]
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_BlendApplyType(pub ::core::ffi::c_uint);
/** @brief Defines a mask area.
@since 12*/
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
#[repr(C)]
+#[derive(Copy, Clone)]
pub struct ArkUI_Rect {
/// X coordinate of the mask area.
pub x: f32,
@@ -2061,7 +2847,10 @@ pub struct ArkUI_Rect {
/** @brief Describes the width and height of a component.
@since 12*/
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
#[repr(C)]
+#[derive(Copy, Clone)]
pub struct ArkUI_IntSize {
/// Width, in px.
pub width: i32,
@@ -2071,17 +2860,24 @@ pub struct ArkUI_IntSize {
/** @brief Describes the position of a component.
@since 12*/
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
#[repr(C)]
+#[derive(Copy, Clone)]
pub struct ArkUI_IntOffset {
/// Horizontal coordinate, in px.
pub x: i32,
/// Vertical coordinate, in px.
pub y: i32,
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_FinishCallbackType {
/// The callback is invoked when the entire animation is removed once it has finished.
pub const ARKUI_FINISH_CALLBACK_REMOVED: ArkUI_FinishCallbackType = ArkUI_FinishCallbackType(0);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_FinishCallbackType {
/** The callback is invoked when the animation logically enters the falling state, though it may still be in its
long tail state.*/
@@ -2092,17 +2888,25 @@ impl ArkUI_FinishCallbackType {
/** @brief Enumerates the animation onFinish callback types.
@since 12*/
-#[derive(Clone, Hash, PartialEq, Eq)]
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_FinishCallbackType(pub ::core::ffi::c_uint);
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ListItemAlignment {
/// The list items are packed toward the start edge of the list container along the cross axis.
pub const ARKUI_LIST_ITEM_ALIGNMENT_START: ArkUI_ListItemAlignment = ArkUI_ListItemAlignment(0);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ListItemAlignment {
/// The list items are centered in the list container along the cross axis.
pub const ARKUI_LIST_ITEM_ALIGNMENT_CENTER: ArkUI_ListItemAlignment =
ArkUI_ListItemAlignment(1);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ListItemAlignment {
/// The list items are packed toward the end edge of the list container along the cross axis.
pub const ARKUI_LIST_ITEM_ALIGNMENT_END: ArkUI_ListItemAlignment = ArkUI_ListItemAlignment(2);
@@ -2111,20 +2915,30 @@ impl ArkUI_ListItemAlignment {
/** @brief Enumerates the alignment modes of items along the cross axis.
@since 12*/
-#[derive(Clone, Hash, PartialEq, Eq)]
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_ListItemAlignment(pub ::core::ffi::c_uint);
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_BarrierDirection {
/// The barrier is the leftmost of all its referencedIds.
pub const ARKUI_BARRIER_DIRECTION_START: ArkUI_BarrierDirection = ArkUI_BarrierDirection(0);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_BarrierDirection {
/// The barrier is on the rightmost side of all its referencedIds.
pub const ARKUI_BARRIER_DIRECTION_END: ArkUI_BarrierDirection = ArkUI_BarrierDirection(1);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_BarrierDirection {
/// The barrier is at the top of all its referencedIds.
pub const ARKUI_BARRIER_DIRECTION_TOP: ArkUI_BarrierDirection = ArkUI_BarrierDirection(2);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_BarrierDirection {
/// The barrier is at the bottom of all its referencedIds.
pub const ARKUI_BARRIER_DIRECTION_BOTTOM: ArkUI_BarrierDirection = ArkUI_BarrierDirection(3);
@@ -2133,19 +2947,27 @@ impl ArkUI_BarrierDirection {
/** @brief defines the direction of the barrier line.
@since 12*/
-#[derive(Clone, Hash, PartialEq, Eq)]
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_BarrierDirection(pub ::core::ffi::c_uint);
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_RelativeLayoutChainStyle {
/// Components are evenly distributed among constraint anchor points.
pub const ARKUI_RELATIVE_LAYOUT_CHAIN_STYLE_SPREAD: ArkUI_RelativeLayoutChainStyle =
ArkUI_RelativeLayoutChainStyle(0);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_RelativeLayoutChainStyle {
/** Except for the first and last two sub-components,
other components are evenly distributed between the constraint anchor points.*/
pub const ARKUI_RELATIVE_LAYOUT_CHAIN_STYLE_SPREAD_INSIDE: ArkUI_RelativeLayoutChainStyle =
ArkUI_RelativeLayoutChainStyle(1);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_RelativeLayoutChainStyle {
/// No gaps in subcomponents within the chain.
pub const ARKUI_RELATIVE_LAYOUT_CHAIN_STYLE_PACKED: ArkUI_RelativeLayoutChainStyle =
@@ -2155,12 +2977,17 @@ impl ArkUI_RelativeLayoutChainStyle {
/** @brief defines the style of the chain.
@since 12*/
-#[derive(Clone, Hash, PartialEq, Eq)]
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_RelativeLayoutChainStyle(pub ::core::ffi::c_uint);
/** @brief Describes the margins of a component.
@since 12*/
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
#[repr(C)]
+#[derive(Copy, Clone)]
pub struct ArkUI_Margin {
/// Top margin, in vp.
pub top: f32,
@@ -2171,18 +2998,26 @@ pub struct ArkUI_Margin {
/// Left margin, in vp.
pub left: f32,
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_LengthMetricUnit {
/// Default, which is fp for fonts and vp for non-fonts.
pub const ARKUI_LENGTH_METRIC_UNIT_DEFAULT: ArkUI_LengthMetricUnit = ArkUI_LengthMetricUnit(-1);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_LengthMetricUnit {
/// px.
pub const ARKUI_LENGTH_METRIC_UNIT_PX: ArkUI_LengthMetricUnit = ArkUI_LengthMetricUnit(0);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_LengthMetricUnit {
/// vp.
pub const ARKUI_LENGTH_METRIC_UNIT_VP: ArkUI_LengthMetricUnit = ArkUI_LengthMetricUnit(1);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_LengthMetricUnit {
/// fp.
pub const ARKUI_LENGTH_METRIC_UNIT_FP: ArkUI_LengthMetricUnit = ArkUI_LengthMetricUnit(2);
@@ -2191,64 +3026,90 @@ impl ArkUI_LengthMetricUnit {
/** @brief Enumerates the component units.
@since 12*/
-#[derive(Clone, Hash, PartialEq, Eq)]
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_LengthMetricUnit(pub ::core::ffi::c_int);
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_RenderFit {
/** Maintains the content size of the animation's final state,
and the content is always centered with the component.*/
pub const ARKUI_RENDER_FIT_CENTER: ArkUI_RenderFit = ArkUI_RenderFit(0);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_RenderFit {
/** Maintains the content size of the animation's final state,
and the content is always aligned with the top center of the component.*/
pub const ARKUI_RENDER_FIT_TOP: ArkUI_RenderFit = ArkUI_RenderFit(1);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_RenderFit {
/** Maintains the content size of the animation's final state,
and the content is always aligned with the bottom center of the component.*/
pub const ARKUI_RENDER_FIT_BOTTOM: ArkUI_RenderFit = ArkUI_RenderFit(2);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_RenderFit {
/** Maintains the content size of the animation's final state,
and the content is always aligned to the left of the component.*/
pub const ARKUI_RENDER_FIT_LEFT: ArkUI_RenderFit = ArkUI_RenderFit(3);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_RenderFit {
/** Maintains the content size of the animation's final state,
and the content is always right-aligned with the component.*/
pub const ARKUI_RENDER_FIT_RIGHT: ArkUI_RenderFit = ArkUI_RenderFit(4);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_RenderFit {
/** Maintains the content size of the animation's final state,
and the content is always aligned with the top left corner of the component.*/
pub const ARKUI_RENDER_FIT_TOP_LEFT: ArkUI_RenderFit = ArkUI_RenderFit(5);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_RenderFit {
/** Keep the content size of the animation final state,
and the content is always aligned with the upper right corner of the component.*/
pub const ARKUI_RENDER_FIT_TOP_RIGHT: ArkUI_RenderFit = ArkUI_RenderFit(6);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_RenderFit {
/** Keep the content size of the animation final state,
and the content always aligns with the lower-left corner of the component.*/
pub const ARKUI_RENDER_FIT_BOTTOM_LEFT: ArkUI_RenderFit = ArkUI_RenderFit(7);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_RenderFit {
/** Keep the content size of the animation final state,
and the content always aligns with the lower-right corner of the component.*/
pub const ARKUI_RENDER_FIT_BOTTOM_RIGHT: ArkUI_RenderFit = ArkUI_RenderFit(8);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_RenderFit {
/** The aspect ratio of the animation's final state content is not considered,
and the content is always scaled to the size of the component.*/
pub const ARKUI_RENDER_FIT_RESIZE_FILL: ArkUI_RenderFit = ArkUI_RenderFit(9);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_RenderFit {
/** Reduce or enlarge the aspect ratio of the animation final state content,
so that the content is fully displayed in the component,
and keep the center aligned with the component.*/
pub const ARKUI_RENDER_FIT_RESIZE_CONTAIN: ArkUI_RenderFit = ArkUI_RenderFit(10);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_RenderFit {
/** Keep the aspect ratio of the animation final state content to reduce or enlarge,
so that the content is fully displayed in the component.
@@ -2258,6 +3119,8 @@ impl ArkUI_RenderFit {
the content is aligned to the top of the component.*/
pub const ARKUI_RENDER_FIT_RESIZE_CONTAIN_TOP_LEFT: ArkUI_RenderFit = ArkUI_RenderFit(11);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_RenderFit {
/** Keep the aspect ratio of the animation final state content to reduce or enlarge,
so that the content is fully displayed in the component.
@@ -2267,12 +3130,16 @@ impl ArkUI_RenderFit {
the content is aligned with the component on the bottom.*/
pub const ARKUI_RENDER_FIT_RESIZE_CONTAIN_BOTTOM_RIGHT: ArkUI_RenderFit = ArkUI_RenderFit(12);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_RenderFit {
/** Keep the aspect ratio of the animation final state content reduced or enlarged,
so that both sides of the content are greater than or equal to both sides of the component,
and keep the center aligned with the component to display the middle part of the content.*/
pub const ARKUI_RENDER_FIT_RESIZE_COVER: ArkUI_RenderFit = ArkUI_RenderFit(13);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_RenderFit {
/** Keep the aspect ratio of the final content of the animation reduced or enlarged
so that both sides of the content are exactly greater than or equal to both sides of the component.
@@ -2281,6 +3148,8 @@ impl ArkUI_RenderFit {
the content and the component remain top aligned, showing the top side of the content.*/
pub const ARKUI_RENDER_FIT_RESIZE_COVER_TOP_LEFT: ArkUI_RenderFit = ArkUI_RenderFit(14);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_RenderFit {
/** Keep the aspect ratio of the final content of the animation reduced or enlarged so
that both sides of the content are exactly greater than or equal to both sides of the component.
@@ -2294,16 +3163,24 @@ impl ArkUI_RenderFit {
/** @brief Enumerates the render fit.
@since 12*/
-#[derive(Clone, Hash, PartialEq, Eq)]
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_RenderFit(pub ::core::ffi::c_uint);
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ButtonType {
/// Normal button (without rounded corners by default).
pub const ARKUI_BUTTON_TYPE_NORMAL: ArkUI_ButtonType = ArkUI_ButtonType(0);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ButtonType {
/// Capsule-type button (the round corner is half of the height by default).
pub const ARKUI_BUTTON_TYPE_CAPSULE: ArkUI_ButtonType = ArkUI_ButtonType(1);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ButtonType {
/// Circle button.
pub const ARKUI_BUTTON_TYPE_CIRCLE: ArkUI_ButtonType = ArkUI_ButtonType(2);
@@ -2312,118 +3189,162 @@ impl ArkUI_ButtonType {
/** @brief Enumerates the button types.
@since 12*/
-#[derive(Clone, Hash, PartialEq, Eq)]
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_ButtonType(pub ::core::ffi::c_uint);
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_TextInputContentType {
/// Username. Password Vault, when enabled, can automatically save and fill in usernames.
pub const ARKUI_TEXTINPUT_CONTENT_TYPE_USER_NAME: ArkUI_TextInputContentType =
ArkUI_TextInputContentType(0);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_TextInputContentType {
/// Password. Password Vault, when enabled, can automatically save and fill in passwords.
pub const ARKUI_TEXTINPUT_CONTENT_TYPE_PASSWORD: ArkUI_TextInputContentType =
ArkUI_TextInputContentType(1);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_TextInputContentType {
/// New password. Password Vault, when enabled, can automatically generate a new password.
pub const ARKUI_TEXTINPUT_CONTENT_TYPE_NEW_PASSWORD: ArkUI_TextInputContentType =
ArkUI_TextInputContentType(2);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_TextInputContentType {
/** Full street address. The scenario-based autofill feature, when enabled, can automatically save and fill in full
street addresses.*/
pub const ARKUI_TEXTINPUT_CONTENT_TYPE_FULL_STREET_ADDRESS: ArkUI_TextInputContentType =
ArkUI_TextInputContentType(3);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_TextInputContentType {
/** House number. The scenario-based autofill feature, when enabled, can automatically save and fill in house
numbers.*/
pub const ARKUI_TEXTINPUT_CONTENT_TYPE_HOUSE_NUMBER: ArkUI_TextInputContentType =
ArkUI_TextInputContentType(4);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_TextInputContentType {
/** District and county. The scenario-based autofill feature, when enabled, can automatically save and fill in
districts and counties.*/
pub const ARKUI_TEXTINPUT_CONTENT_TYPE_DISTRICT_ADDRESS: ArkUI_TextInputContentType =
ArkUI_TextInputContentType(5);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_TextInputContentType {
/// City. The scenario-based autofill feature, when enabled, can automatically save and fill in cities.
pub const ARKUI_TEXTINPUT_CONTENT_TYPE_CITY_ADDRESS: ArkUI_TextInputContentType =
ArkUI_TextInputContentType(6);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_TextInputContentType {
/// Province. The scenario-based autofill feature, when enabled, can automatically save and fill in provinces.
pub const ARKUI_TEXTINPUT_CONTENT_TYPE_PROVINCE_ADDRESS: ArkUI_TextInputContentType =
ArkUI_TextInputContentType(7);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_TextInputContentType {
/// Country. The scenario-based autofill feature, when enabled, can automatically save and fill in countries.
pub const ARKUI_TEXTINPUT_CONTENT_TYPE_COUNTRY_ADDRESS: ArkUI_TextInputContentType =
ArkUI_TextInputContentType(8);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_TextInputContentType {
/// Full name. The scenario-based autofill feature, when enabled, can automatically save and fill in full names.
pub const ARKUI_TEXTINPUT_CONTENT_TYPE_PERSON_FULL_NAME: ArkUI_TextInputContentType =
ArkUI_TextInputContentType(9);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_TextInputContentType {
/// Last name. The scenario-based autofill feature, when enabled, can automatically save and fill in last names.
pub const ARKUI_TEXTINPUT_CONTENT_TYPE_PERSON_LAST_NAME: ArkUI_TextInputContentType =
ArkUI_TextInputContentType(10);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_TextInputContentType {
/// First name. The scenario-based autofill feature, when enabled, can automatically save and fill in first names.
pub const ARKUI_TEXTINPUT_CONTENT_TYPE_PERSON_FIRST_NAME: ArkUI_TextInputContentType =
ArkUI_TextInputContentType(11);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_TextInputContentType {
/** Phone number. The scenario-based autofill feature, when enabled, can automatically save and fill in phone
numbers.*/
pub const ARKUI_TEXTINPUT_CONTENT_TYPE_PHONE_NUMBER: ArkUI_TextInputContentType =
ArkUI_TextInputContentType(12);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_TextInputContentType {
/** Country code. The scenario-based autofill feature, when enabled, can automatically save and fill in country
codes.*/
pub const ARKUI_TEXTINPUT_CONTENT_TYPE_PHONE_COUNTRY_CODE: ArkUI_TextInputContentType =
ArkUI_TextInputContentType(13);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_TextInputContentType {
/** Phone number with country code. The scenario-based autofill feature, when enabled, can automatically save and
fill in phone numbers with country codes.*/
pub const ARKUI_TEXTINPUT_CONTENT_TYPE_FULL_PHONE_NUMBER: ArkUI_TextInputContentType =
ArkUI_TextInputContentType(14);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_TextInputContentType {
/** Email address. The scenario-based autofill feature, when enabled, can automatically save and fill in email
addresses.*/
pub const ARKUI_TEXTINPUT_CONTENT_EMAIL_ADDRESS: ArkUI_TextInputContentType =
ArkUI_TextInputContentType(15);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_TextInputContentType {
/** Bank card number. The scenario-based autofill feature, when enabled, can automatically save and fill in bank
card numbers.*/
pub const ARKUI_TEXTINPUT_CONTENT_TYPE_BANK_CARD_NUMBER: ArkUI_TextInputContentType =
ArkUI_TextInputContentType(16);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_TextInputContentType {
/** ID card number. The scenario-based autofill feature, when enabled, can automatically save and fill in ID card
numbers.*/
pub const ARKUI_TEXTINPUT_CONTENT_TYPE_ID_CARD_NUMBER: ArkUI_TextInputContentType =
ArkUI_TextInputContentType(17);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_TextInputContentType {
/// Nickname. The scenario-based autofill feature, when enabled, can automatically save and fill in nicknames.
pub const ARKUI_TEXTINPUT_CONTENT_TYPE_NICKNAME: ArkUI_TextInputContentType =
ArkUI_TextInputContentType(18);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_TextInputContentType {
/** Address information without street address. The scenario-based autofill feature, when enabled, can automatically
save and fill in address information without street addresses.*/
pub const ARKUI_TEXTINPUT_CONTENT_TYPE_DETAIL_INFO_WITHOUT_STREET: ArkUI_TextInputContentType =
ArkUI_TextInputContentType(19);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_TextInputContentType {
/** Standard address. The scenario-based autofill feature, when enabled, can automatically save and fill in standard
addresses.*/
@@ -2434,13 +3355,19 @@ impl ArkUI_TextInputContentType {
/** @brief Enumerates the autofill types.
@since 12*/
-#[derive(Clone, Hash, PartialEq, Eq)]
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_TextInputContentType(pub ::core::ffi::c_uint);
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_TextInputStyle {
/** Default style. The caret width is fixed at 1.5 vp, and the caret height is subject to the background height and
font size of the selected text.*/
pub const ARKUI_TEXTINPUT_STYLE_DEFAULT: ArkUI_TextInputStyle = ArkUI_TextInputStyle(0);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_TextInputStyle {
/// Inline input style. The background height of the selected text is the same as the height of the text box.
pub const ARKUI_TEXTINPUT_STYLE_INLINE: ArkUI_TextInputStyle = ArkUI_TextInputStyle(1);
@@ -2449,23 +3376,33 @@ impl ArkUI_TextInputStyle {
/** @brief Defines the text input style.
@since 12*/
-#[derive(Clone, Hash, PartialEq, Eq)]
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_TextInputStyle(pub ::core::ffi::c_uint);
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_TextDataDetectorType {
/// Phone Number.
pub const ARKUI_TEXT_DATA_DETECTOR_TYPE_PHONE_NUMBER: ArkUI_TextDataDetectorType =
ArkUI_TextDataDetectorType(0);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_TextDataDetectorType {
/// Link.
pub const ARKUI_TEXT_DATA_DETECTOR_TYPE_URL: ArkUI_TextDataDetectorType =
ArkUI_TextDataDetectorType(1);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_TextDataDetectorType {
/// Mailbox.
pub const ARKUI_TEXT_DATA_DETECTOR_TYPE_EMAIL: ArkUI_TextDataDetectorType =
ArkUI_TextDataDetectorType(2);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_TextDataDetectorType {
/// Address.
pub const ARKUI_TEXT_DATA_DETECTOR_TYPE_ADDRESS: ArkUI_TextDataDetectorType =
@@ -2475,13 +3412,19 @@ impl ArkUI_TextDataDetectorType {
/** @brief Defines the entity type for text recognition.
@since 12*/
-#[derive(Clone, Hash, PartialEq, Eq)]
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_TextDataDetectorType(pub ::core::ffi::c_uint);
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_SwiperIndicatorType {
/// dot type.
pub const ARKUI_SWIPER_INDICATOR_TYPE_DOT: ArkUI_SwiperIndicatorType =
ArkUI_SwiperIndicatorType(0);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_SwiperIndicatorType {
/// digit type.
pub const ARKUI_SWIPER_INDICATOR_TYPE_DIGIT: ArkUI_SwiperIndicatorType =
@@ -2491,20 +3434,28 @@ impl ArkUI_SwiperIndicatorType {
/** @brief Define the navigation indicator type of the swiper.
@since 12*/
-#[derive(Clone, Hash, PartialEq, Eq)]
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_SwiperIndicatorType(pub ::core::ffi::c_uint);
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ListItemSwipeActionState {
/** In the folded state, when the ListItem slides in the opposite direction to the main axis,
the operation item is hidden.*/
pub const ARKUI_LIST_ITEM_SWIPE_ACTION_STATE_COLLAPSED: ArkUI_ListItemSwipeActionState =
ArkUI_ListItemSwipeActionState(0);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ListItemSwipeActionState {
/** In the folded state, when the ListItem slides in the opposite direction to the spindle,
the operation item is displayed.*/
pub const ARKUI_LIST_ITEM_SWIPE_ACTION_STATE_EXPANDED: ArkUI_ListItemSwipeActionState =
ArkUI_ListItemSwipeActionState(1);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ListItemSwipeActionState {
/// Long distance state, the state of deleting a ListItem after it enters the long distance deletion area.
pub const ARKUI_LIST_ITEM_SWIPE_ACTION_STATE_ACTIONING: ArkUI_ListItemSwipeActionState =
@@ -2514,13 +3465,19 @@ impl ArkUI_ListItemSwipeActionState {
/** @brief Define the pattern of element arrangement in the main axis direction of the Swiper component.
@since 12*/
-#[derive(Clone, Hash, PartialEq, Eq)]
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_ListItemSwipeActionState(pub ::core::ffi::c_uint);
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ListItemSwipeEdgeEffect {
/// The ListItem can continue to be scratched after the distance exceeds the size of the scratched component.
pub const ARKUI_LIST_ITEM_SWIPE_EDGE_EFFECT_SPRING: ArkUI_ListItemSwipeEdgeEffect =
ArkUI_ListItemSwipeEdgeEffect(0);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ListItemSwipeEdgeEffect {
/// The sliding distance of the ListItem cannot exceed the size of the scratched component.
pub const ARKUI_LIST_ITEM_SWIPE_EDGE_EFFECT_NONE: ArkUI_ListItemSwipeEdgeEffect =
@@ -2530,66 +3487,98 @@ impl ArkUI_ListItemSwipeEdgeEffect {
/** @brief Define the explicit and implicit mode of the SwipeAction method for the Listitem component.
@since 12*/
-#[derive(Clone, Hash, PartialEq, Eq)]
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_ListItemSwipeEdgeEffect(pub ::core::ffi::c_uint);
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ErrorCode {
/// @error No errors.
pub const ARKUI_ERROR_CODE_NO_ERROR: ArkUI_ErrorCode = ArkUI_ErrorCode(0);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ErrorCode {
/// @error Parameter error.
pub const ARKUI_ERROR_CODE_PARAM_INVALID: ArkUI_ErrorCode = ArkUI_ErrorCode(401);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ErrorCode {
/// @error The component does not support specific properties or events.
pub const ARKUI_ERROR_CODE_ATTRIBUTE_OR_EVENT_NOT_SUPPORTED: ArkUI_ErrorCode =
ArkUI_ErrorCode(106102);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ErrorCode {
/// @error The corresponding operation does not support nodes created by ArkTS.
pub const ARKUI_ERROR_CODE_ARKTS_NODE_NOT_SUPPORTED: ArkUI_ErrorCode = ArkUI_ErrorCode(106103);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ErrorCode {
/// @error The lazy loading adapter is not bound to the component.
pub const ARKUI_ERROR_CODE_ADAPTER_NOT_BOUND: ArkUI_ErrorCode = ArkUI_ErrorCode(106104);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ErrorCode {
/// @error The adapter already exists.
pub const ARKUI_ERROR_CODE_ADAPTER_EXIST: ArkUI_ErrorCode = ArkUI_ErrorCode(106105);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ErrorCode {
/// @error The corresponding node already has a child node and cannot add an adapter.
pub const ARKUI_ERROR_CODE_CHILD_NODE_EXIST: ArkUI_ErrorCode = ArkUI_ErrorCode(106106);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ErrorCode {
/// The parameter length in the parameter event exceeds the limit.
pub const ARKUI_ERROR_CODE_NODE_EVENT_PARAM_INDEX_OUT_OF_RANGE: ArkUI_ErrorCode =
ArkUI_ErrorCode(106107);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ErrorCode {
/// The data does not exist in the component event.
pub const ARKUI_ERROR_CODE_NODE_EVENT_PARAM_INVALID: ArkUI_ErrorCode = ArkUI_ErrorCode(106108);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ErrorCode {
/// The component event does not support return values.
pub const ARKUI_ERROR_CODE_NODE_EVENT_NO_RETURN: ArkUI_ErrorCode = ArkUI_ErrorCode(106109);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ErrorCode {
/// The index value is invalid.
pub const ARKUI_ERROR_CODE_NODE_INDEX_INVALID: ArkUI_ErrorCode = ArkUI_ErrorCode(106200);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ErrorCode {
/// Failed to query route navigation information.
pub const ARKUI_ERROR_CODE_GET_INFO_FAILED: ArkUI_ErrorCode = ArkUI_ErrorCode(106201);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ErrorCode {
/// The buffer size is not large enough.
pub const ARKUI_ERROR_CODE_BUFFER_SIZE_ERROR: ArkUI_ErrorCode = ArkUI_ErrorCode(106202);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ErrorCode {
/// The component is not a scroll container.
pub const ARKUI_ERROR_CODE_NON_SCROLLABLE_CONTAINER: ArkUI_ErrorCode = ArkUI_ErrorCode(180001);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ErrorCode {
/// The buffer is not large enough.
pub const ARKUI_ERROR_CODE_BUFFER_SIZE_NOT_ENOUGH: ArkUI_ErrorCode = ArkUI_ErrorCode(180002);
@@ -2598,20 +3587,30 @@ impl ArkUI_ErrorCode {
/** @brief Define error code enumeration values.
@since 12*/
-#[derive(Clone, Hash, PartialEq, Eq)]
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_ErrorCode(pub ::core::ffi::c_uint);
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_AnimationStatus {
/// The animation is in the initial state.
pub const ARKUI_ANIMATION_STATUS_INITIAL: ArkUI_AnimationStatus = ArkUI_AnimationStatus(0);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_AnimationStatus {
/// The animation is being played.
pub const ARKUI_ANIMATION_STATUS_RUNNING: ArkUI_AnimationStatus = ArkUI_AnimationStatus(1);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_AnimationStatus {
/// The animation is paused.
pub const ARKUI_ANIMATION_STATUS_PAUSED: ArkUI_AnimationStatus = ArkUI_AnimationStatus(2);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_AnimationStatus {
/// The animation is stopped.
pub const ARKUI_ANIMATION_STATUS_STOPPED: ArkUI_AnimationStatus = ArkUI_AnimationStatus(3);
@@ -2620,25 +3619,35 @@ impl ArkUI_AnimationStatus {
/** @brief Defines the playback status for the image animator.
@since 12*/
-#[derive(Clone, Hash, PartialEq, Eq)]
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_AnimationStatus(pub ::core::ffi::c_uint);
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_AnimationFillMode {
/** Before execution, the animation does not apply any styles to the target component.
After execution, the animation restores the target component to its default state.*/
pub const ARKUI_ANIMATION_FILL_MODE_NONE: ArkUI_AnimationFillMode = ArkUI_AnimationFillMode(0);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_AnimationFillMode {
/** The target component retains the state set by the last keyframe encountered
during execution of the animation.*/
pub const ARKUI_ANIMATION_FILL_MODE_FORWARDS: ArkUI_AnimationFillMode =
ArkUI_AnimationFillMode(1);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_AnimationFillMode {
/** The animation applies the values defined in the first relevant keyframe once it is applied to
the target component, and retains the values during the period set by delay.*/
pub const ARKUI_ANIMATION_FILL_MODE_BACKWARDS: ArkUI_AnimationFillMode =
ArkUI_AnimationFillMode(2);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_AnimationFillMode {
/** The animation follows the rules for both Forwards and Backwards,
extending the animation attributes in both directions.*/
@@ -2648,13 +3657,19 @@ impl ArkUI_AnimationFillMode {
/** @brief Defines the status before and after execution of the animation in the current playback direction.
@since 12*/
-#[derive(Clone, Hash, PartialEq, Eq)]
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_AnimationFillMode(pub ::core::ffi::c_uint);
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_AccessibilityCheckedState {
/// The Checkbox unchecked.
pub const ARKUI_ACCESSIBILITY_UNCHECKED: ArkUI_AccessibilityCheckedState =
ArkUI_AccessibilityCheckedState(0);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_AccessibilityCheckedState {
/// The Checkbox checked.
pub const ARKUI_ACCESSIBILITY_CHECKED: ArkUI_AccessibilityCheckedState =
@@ -2664,28 +3679,40 @@ impl ArkUI_AccessibilityCheckedState {
/** @brief Defines the state type for the accessibility checkbox.
@since 12*/
-#[derive(Clone, Hash, PartialEq, Eq)]
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+#[derive(Copy, Clone, Hash, PartialEq, Eq)]
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 =
@@ -2695,18 +3722,26 @@ impl ArkUI_AccessibilityActionType {
/** @brief Define accessible action types.
@since 12*/
-#[derive(Clone, Hash, PartialEq, Eq)]
+#[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 =
ArkUI_AnimationDirection(0);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_AnimationDirection {
/// The animation plays in reverse loop mode.
pub const ARKUI_ANIMATION_DIRECTION_REVERSE: ArkUI_AnimationDirection =
ArkUI_AnimationDirection(1);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_AnimationDirection {
/** The animation plays in alternating loop mode. When the animation is played for an odd number of times, the
playback is in forward direction. When the animation is played for an even number of times, the playback is in
@@ -2714,6 +3749,8 @@ impl ArkUI_AnimationDirection {
pub const ARKUI_ANIMATION_DIRECTION_ALTERNATE: ArkUI_AnimationDirection =
ArkUI_AnimationDirection(2);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_AnimationDirection {
/** The animation plays in reverse alternating loop mode. When the animation is played for an odd number of times,
the playback is in reverse direction. When the animation is played for an even number of times, the playback is
@@ -2725,36 +3762,54 @@ impl ArkUI_AnimationDirection {
/** @brief Enumerates the animation playback modes.
@since 12*/
-#[derive(Clone, Hash, PartialEq, Eq)]
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_AnimationDirection(pub ::core::ffi::c_uint);
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ScrollSource {
/// Finger drag.
pub const ARKUI_SCROLL_SOURCE_DRAG: ArkUI_ScrollSource = ArkUI_ScrollSource(0);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ScrollSource {
/// Inertial roll after finger drag.
pub const ARKUI_SCROLL_SOURCE_FLING: ArkUI_ScrollSource = ArkUI_ScrollSource(1);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ScrollSource {
/// Execute the EdgeEffect.Spring edge effect when crossing the boundary.
pub const ARKUI_SCROLL_SOURCE_EDGE_EFFECT: ArkUI_ScrollSource = ArkUI_ScrollSource(2);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ScrollSource {
/// Other user input other than dragging, such as mouse wheel, keyboard events, etc.
pub const ARKUI_SCROLL_SOURCE_OTHER_USER_INPUT: ArkUI_ScrollSource = ArkUI_ScrollSource(3);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ScrollSource {
/// Drag the scroll bar.
pub const ARKUI_SCROLL_SOURCE_SCROLL_BAR: ArkUI_ScrollSource = ArkUI_ScrollSource(4);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ScrollSource {
/// Inertia scrolling after dragging the scroll bar.
pub const ARKUI_SCROLL_SOURCE_SCROLL_BAR_FLING: ArkUI_ScrollSource = ArkUI_ScrollSource(5);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ScrollSource {
/// The scroll controller causes unanimated scrolling.
pub const ARKUI_SCROLL_SOURCE_SCROLLER: ArkUI_ScrollSource = ArkUI_ScrollSource(6);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ScrollSource {
/// The scroll controller causes the scroll to drive the painting.
pub const ARKUI_SCROLL_SOURCE_ANIMATION: ArkUI_ScrollSource = ArkUI_ScrollSource(7);
@@ -2763,12 +3818,17 @@ impl ArkUI_ScrollSource {
/** @brief Define the rolling source enumeration value.
@since 12*/
-#[derive(Clone, Hash, PartialEq, Eq)]
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_ScrollSource(pub ::core::ffi::c_uint);
/** @brief Defines the translation options for component transition.
@since 12*/
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
#[repr(C)]
+#[derive(Copy, Clone)]
pub struct ArkUI_TranslationOptions {
/// Translation distance along the x-axis.
pub x: f32,
@@ -2780,7 +3840,10 @@ pub struct ArkUI_TranslationOptions {
/** @brief Defines the scaling options for component transition.
@since 12*/
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
#[repr(C)]
+#[derive(Copy, Clone)]
pub struct ArkUI_ScaleOptions {
/// Scale ratio along the x-axis.
pub x: f32,
@@ -2796,7 +3859,10 @@ pub struct ArkUI_ScaleOptions {
/** @brief Defines the rotation options for component transition.
@since 12*/
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
#[repr(C)]
+#[derive(Copy, Clone)]
pub struct ArkUI_RotationOptions {
/// X-component of the rotation vector.
pub x: f32,
@@ -2827,46 +3893,64 @@ pub struct ArkUI_CustomSpanMetrics {
pub struct ArkUI_CustomSpanDrawInfo {
_unused: [u8; 0],
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_NavDestinationState {
/// The NavDestination show.
pub const ARKUI_NAV_DESTINATION_STATE_ON_SHOW: ArkUI_NavDestinationState =
ArkUI_NavDestinationState(0);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_NavDestinationState {
/// The NavDestination hide.
pub const ARKUI_NAV_DESTINATION_STATE_ON_HIDE: ArkUI_NavDestinationState =
ArkUI_NavDestinationState(1);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_NavDestinationState {
/// The NavDestination is mounted to the component tree.
pub const ARKUI_NAV_DESTINATION_STATE_ON_APPEAR: ArkUI_NavDestinationState =
ArkUI_NavDestinationState(2);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_NavDestinationState {
/// The NavDestination removed from the component tree.
pub const ARKUI_NAV_DESTINATION_STATE_ON_DISAPPEAR: ArkUI_NavDestinationState =
ArkUI_NavDestinationState(3);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_NavDestinationState {
/// Before the NavDestination show.
pub const ARKUI_NAV_DESTINATION_STATE_ON_WILL_SHOW: ArkUI_NavDestinationState =
ArkUI_NavDestinationState(4);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_NavDestinationState {
/// Before the NavDestination hide.
pub const ARKUI_NAV_DESTINATION_STATE_ON_WILL_HIDE: ArkUI_NavDestinationState =
ArkUI_NavDestinationState(5);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_NavDestinationState {
/// Before the NavDestination mount to the component tree.
pub const ARKUI_NAV_DESTINATION_STATE_ON_WILL_APPEAR: ArkUI_NavDestinationState =
ArkUI_NavDestinationState(6);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_NavDestinationState {
/// Before the NavDestination removed from the component tree.
pub const ARKUI_NAV_DESTINATION_STATE_ON_WILL_DISAPPEAR: ArkUI_NavDestinationState =
ArkUI_NavDestinationState(7);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_NavDestinationState {
/// The NavDestination returns from the component.
pub const ARKUI_NAV_DESTINATION_STATE_ON_BACK_PRESS: ArkUI_NavDestinationState =
@@ -2876,26 +3960,38 @@ impl ArkUI_NavDestinationState {
/** @brief Defines the state of the NavDestination component.
@since 12*/
-#[derive(Clone, Hash, PartialEq, Eq)]
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_NavDestinationState(pub ::core::ffi::c_uint);
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_RouterPageState {
/// The Router Page is about to be created.
pub const ARKUI_ROUTER_PAGE_STATE_ABOUT_TO_APPEAR: ArkUI_RouterPageState =
ArkUI_RouterPageState(0);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_RouterPageState {
/// The Router Page is about to be destroyed.
pub const ARKUI_ROUTER_PAGE_STATE_ABOUT_TO_DISAPPEAR: ArkUI_RouterPageState =
ArkUI_RouterPageState(1);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_RouterPageState {
/// The Router Page show.
pub const ARKUI_ROUTER_PAGE_STATE_ON_SHOW: ArkUI_RouterPageState = ArkUI_RouterPageState(2);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_RouterPageState {
/// The Router Page hide.
pub const ARKUI_ROUTER_PAGE_STATE_ON_HIDE: ArkUI_RouterPageState = ArkUI_RouterPageState(3);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_RouterPageState {
/// The Router Page returns.
pub const ARKUI_ROUTER_PAGE_STATE_ON_BACK_PRESS: ArkUI_RouterPageState =
@@ -2905,16 +4001,24 @@ impl ArkUI_RouterPageState {
/** @brief Define the state of Router Page.
@since 12*/
-#[derive(Clone, Hash, PartialEq, Eq)]
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_RouterPageState(pub ::core::ffi::c_uint);
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_SafeAreaType {
/// The default security zone includes the status bar and navigation bar.
pub const ARKUI_SAFE_AREA_TYPE_SYSTEM: ArkUI_SafeAreaType = ArkUI_SafeAreaType(1);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_SafeAreaType {
/// Non-secure areas of the device, such as bangs or hole holes.
pub const ARKUI_SAFE_AREA_TYPE_CUTOUT: ArkUI_SafeAreaType = ArkUI_SafeAreaType(2);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_SafeAreaType {
/// Soft keyboard area.
pub const ARKUI_SAFE_AREA_TYPE_KEYBOARD: ArkUI_SafeAreaType = ArkUI_SafeAreaType(4);
@@ -2923,20 +4027,30 @@ impl ArkUI_SafeAreaType {
/** @brief defines the enumerated value of the extended security zone.
@since 12*/
-#[derive(Clone, Hash, PartialEq, Eq)]
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_SafeAreaType(pub ::core::ffi::c_uint);
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_SafeAreaEdge {
/// Upper area.
pub const ARKUI_SAFE_AREA_EDGE_TOP: ArkUI_SafeAreaEdge = ArkUI_SafeAreaEdge(1);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_SafeAreaEdge {
/// Lower area.
pub const ARKUI_SAFE_AREA_EDGE_BOTTOM: ArkUI_SafeAreaEdge = ArkUI_SafeAreaEdge(2);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_SafeAreaEdge {
/// Front area.
pub const ARKUI_SAFE_AREA_EDGE_START: ArkUI_SafeAreaEdge = ArkUI_SafeAreaEdge(4);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_SafeAreaEdge {
/// Tail area.
pub const ARKUI_SAFE_AREA_EDGE_END: ArkUI_SafeAreaEdge = ArkUI_SafeAreaEdge(8);
@@ -2945,7 +4059,9 @@ impl ArkUI_SafeAreaEdge {
/** @brief defines the enumerated value of the direction of the extended security zone.
@since 12*/
-#[derive(Clone, Hash, PartialEq, Eq)]
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_SafeAreaEdge(pub ::core::ffi::c_uint);
#[repr(C)]
pub struct ArkUI_SystemFontStyleEvent {
@@ -2955,12 +4071,16 @@ extern "C" {
/** @brief Creates a size constraint.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_LayoutConstraint_Create() -> *mut ArkUI_LayoutConstraint;
/** @brief Creates a deep copy of a size constraint.
@param Constraint Indicates the pointer to the size constraint.
@return Returns the pointer to the new size constraint.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_LayoutConstraint_Copy(
Constraint: *const ArkUI_LayoutConstraint,
) -> *mut ArkUI_LayoutConstraint;
@@ -2968,6 +4088,8 @@ extern "C" {
@param Constraint Indicates the pointer to the size constraint.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_LayoutConstraint_Dispose(
Constraint: *mut ArkUI_LayoutConstraint,
) -> *mut ::core::ffi::c_void;
@@ -2976,18 +4098,24 @@ extern "C" {
@param Constraint Indicates the pointer to the size constraint.
@return Returns the maximum width.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_LayoutConstraint_GetMaxWidth(Constraint: *const ArkUI_LayoutConstraint) -> i32;
/** @brief Obtains the minimum width for a size constraint, in px.
@param Constraint Indicates the pointer to the size constraint.
@return Returns the minimum width.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_LayoutConstraint_GetMinWidth(Constraint: *const ArkUI_LayoutConstraint) -> i32;
/** @brief Obtains the maximum height for a size constraint, in px.
@param Constraint Indicates the pointer to the size constraint.
@return Returns the maximum height.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_LayoutConstraint_GetMaxHeight(Constraint: *const ArkUI_LayoutConstraint)
-> i32;
/** @brief Obtains the minimum height for a size constraint, in px.
@@ -2995,6 +4123,8 @@ extern "C" {
@param Constraint Indicates the pointer to the size constraint.
@return Returns the minimum height.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_LayoutConstraint_GetMinHeight(Constraint: *const ArkUI_LayoutConstraint)
-> i32;
/** @brief Obtains the width percentage reference for a size constraint, in px.
@@ -3002,6 +4132,8 @@ extern "C" {
@param Constraint Indicates the pointer to the size constraint.
@return Returns the width percentage reference.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_LayoutConstraint_GetPercentReferenceWidth(
Constraint: *const ArkUI_LayoutConstraint,
) -> i32;
@@ -3010,6 +4142,8 @@ extern "C" {
@param Constraint Indicates the pointer to the size constraint.
@return Returns the height percentage reference.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_LayoutConstraint_GetPercentReferenceHeight(
Constraint: *const ArkUI_LayoutConstraint,
) -> i32;
@@ -3018,6 +4152,8 @@ extern "C" {
@param Constraint Indicates the pointer to the size constraint.
@param value Indicates the maximum width, in px.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_LayoutConstraint_SetMaxWidth(
Constraint: *mut ArkUI_LayoutConstraint,
value: i32,
@@ -3027,6 +4163,8 @@ extern "C" {
@param Constraint Indicates the pointer to the size constraint.
@param value Indicates the minimum width, in px.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_LayoutConstraint_SetMinWidth(
Constraint: *mut ArkUI_LayoutConstraint,
value: i32,
@@ -3036,6 +4174,8 @@ extern "C" {
@param Constraint Indicates the pointer to the size constraint.
@param value Indicates the maximum height, in px.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_LayoutConstraint_SetMaxHeight(
Constraint: *mut ArkUI_LayoutConstraint,
value: i32,
@@ -3045,6 +4185,8 @@ extern "C" {
@param Constraint Indicates the pointer to the size constraint.
@param value Indicates the minimum height, in px.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_LayoutConstraint_SetMinHeight(
Constraint: *mut ArkUI_LayoutConstraint,
value: i32,
@@ -3054,6 +4196,8 @@ extern "C" {
@param Constraint Indicates the pointer to the size constraint.
@param value Indicates the width percentage reference, in px.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_LayoutConstraint_SetPercentReferenceWidth(
Constraint: *mut ArkUI_LayoutConstraint,
value: i32,
@@ -3063,6 +4207,8 @@ extern "C" {
@param Constraint Indicates the pointer to the size constraint.
@param value Indicates the height percentage reference, in px.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_LayoutConstraint_SetPercentReferenceHeight(
Constraint: *mut ArkUI_LayoutConstraint,
value: i32,
@@ -3073,6 +4219,8 @@ extern "C" {
@param context Indicates the pointer to the drawing context.
@return Returns the pointer to the canvas for drawing.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_DrawContext_GetCanvas(
context: *mut ArkUI_DrawContext,
) -> *mut ::core::ffi::c_void;
@@ -3081,22 +4229,30 @@ extern "C" {
@param context Indicates the pointer to the drawing context.
@return Returns the size of the drawing area.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_DrawContext_GetSize(context: *mut ArkUI_DrawContext) -> ArkUI_IntSize;
/** @brief Creates water flow section configuration.
@return Returns the water flow section configuration.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_WaterFlowSectionOption_Create() -> *mut ArkUI_WaterFlowSectionOption;
/** @brief Destroys the pointer to a water flow section configuration.
@param option Indicates the pointer to a water flow section configuration.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_WaterFlowSectionOption_Dispose(option: *mut ArkUI_WaterFlowSectionOption);
/** @brief Sets the FlowItem block configuration information array length.
@param option FlowItem Indicates the packet configuration.
@param size Array Length.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_WaterFlowSectionOption_SetSize(
option: *mut ArkUI_WaterFlowSectionOption,
size: i32,
@@ -3107,6 +4263,8 @@ extern "C" {
@return Array size. If -1 is returned, the return fails.
The possible cause of the failure is that the option parameter is abnormal, such as a null pointer.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_WaterFlowSectionOption_GetSize(
option: *mut ArkUI_WaterFlowSectionOption,
) -> i32;
@@ -3116,6 +4274,8 @@ extern "C" {
@param index Indicates the index of the target water flow section.
@param itemCount Indicates the number of items in the water flow section.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_WaterFlowSectionOption_SetItemCount(
option: *mut ArkUI_WaterFlowSectionOption,
index: i32,
@@ -3127,6 +4287,8 @@ extern "C" {
@param index Indicates the index of the target water flow section.
@return Returns the number of items in the water flow section.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_WaterFlowSectionOption_GetItemCount(
option: *mut ArkUI_WaterFlowSectionOption,
index: i32,
@@ -3138,6 +4300,8 @@ extern "C" {
@param index Indicates the index of the target water flow section.
@param callback Gets the spindle size of the specified Item based on index.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_WaterFlowSectionOption_RegisterGetItemMainSizeCallbackByIndex(
option: *mut ArkUI_WaterFlowSectionOption,
index: i32,
@@ -3151,6 +4315,8 @@ extern "C" {
@param userData FlowItem Custom data.
@param callback Gets the spindle size of the specified Item based on index.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_WaterFlowSectionOption_RegisterGetItemMainSizeCallbackByIndexWithUserData(
option: *mut ArkUI_WaterFlowSectionOption,
index: i32,
@@ -3165,6 +4331,8 @@ extern "C" {
@param index Indicates the index of the target water flow section.
@param crossCount Indicates the number of columns or rows, depending on the layout direction.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_WaterFlowSectionOption_SetCrossCount(
option: *mut ArkUI_WaterFlowSectionOption,
index: i32,
@@ -3177,6 +4345,8 @@ extern "C" {
@param index Indicates the index of the target water flow section.
@return Returns the number of columns or rows.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_WaterFlowSectionOption_GetCrossCount(
option: *mut ArkUI_WaterFlowSectionOption,
index: i32,
@@ -3187,6 +4357,8 @@ extern "C" {
@param index Indicates the index of the target water flow section.
@param columnGap Indicates the gap between columns to set.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_WaterFlowSectionOption_SetColumnGap(
option: *mut ArkUI_WaterFlowSectionOption,
index: i32,
@@ -3198,6 +4370,8 @@ extern "C" {
@param index Indicates the index of the target water flow section.
@return Returns the gap between columns.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_WaterFlowSectionOption_GetColumnGap(
option: *mut ArkUI_WaterFlowSectionOption,
index: i32,
@@ -3208,6 +4382,8 @@ extern "C" {
@param index Indicates the index of the target water flow section.
@param rowGap Indicates the gap between rows to set.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_WaterFlowSectionOption_SetRowGap(
option: *mut ArkUI_WaterFlowSectionOption,
index: i32,
@@ -3219,6 +4395,8 @@ extern "C" {
@param index Indicates the index of the target water flow section.
@return Returns the gap between rows.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_WaterFlowSectionOption_GetRowGap(
option: *mut ArkUI_WaterFlowSectionOption,
index: i32,
@@ -3232,6 +4410,8 @@ extern "C" {
@param marginBottom Indicates the bottom margin of the water flow section.
@param marginLeft Indicates the left margin of the water flow section.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_WaterFlowSectionOption_SetMargin(
option: *mut ArkUI_WaterFlowSectionOption,
index: i32,
@@ -3246,6 +4426,8 @@ extern "C" {
@param index Indicates the index of the target water flow section.
@return Returns the margins.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_WaterFlowSectionOption_GetMargin(
option: *mut ArkUI_WaterFlowSectionOption,
index: i32,
@@ -3255,6 +4437,8 @@ extern "C" {
@param type Indicates the type of the indicator.
@return Returns the pointer to the new indicator.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_SwiperIndicator_Create(
type_: ArkUI_SwiperIndicatorType,
) -> *mut ArkUI_SwiperIndicator;
@@ -3262,12 +4446,16 @@ extern "C" {
@param indicator Indicates the pointer to the indicator.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_SwiperIndicator_Dispose(indicator: *mut ArkUI_SwiperIndicator);
/** @brief Sets the distance between the navigation point and the start of the swiper.
@param indicator Indicates the pointer to the indicator.
@param value Indicates the distance between the navigation point and the start of the swiper.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_SwiperIndicator_SetStartPosition(
indicator: *mut ArkUI_SwiperIndicator,
value: f32,
@@ -3277,12 +4465,16 @@ extern "C" {
@param indicator Indicates the pointer to the indicator.
@return Returns the distance between the navigation point and the start of the swiper.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_SwiperIndicator_GetStartPosition(indicator: *mut ArkUI_SwiperIndicator) -> f32;
/** @brief Sets the distance between the navigation point and the top of the swiper.
@param indicator Indicates the pointer to the indicator.
@param value Indicates the distance between the navigation point and the top of the swiper.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_SwiperIndicator_SetTopPosition(
indicator: *mut ArkUI_SwiperIndicator,
value: f32,
@@ -3292,12 +4484,16 @@ extern "C" {
@param indicator Indicates the pointer to the indicator.
@return Returns the distance between the navigation point and the top of the swiper.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_SwiperIndicator_GetTopPosition(indicator: *mut ArkUI_SwiperIndicator) -> f32;
/** @brief Sets the distance between the navigation point and the right of the swiper.
@param indicator Indicates the pointer to the indicator.
@param value Indicates the distance between the navigation point and the right of the swiper.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_SwiperIndicator_SetEndPosition(
indicator: *mut ArkUI_SwiperIndicator,
value: f32,
@@ -3307,12 +4503,16 @@ extern "C" {
@param indicator Indicates the pointer to the indicator.
@return Returns the distance between the navigation point and the end of the swiper.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_SwiperIndicator_GetEndPosition(indicator: *mut ArkUI_SwiperIndicator) -> f32;
/** @brief Sets the distance between the navigation point and the bottom of the swiper.
@param indicator Indicates the pointer to the indicator.
@param value Indicates the distance between the navigation point and the bottom of the swiper.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_SwiperIndicator_SetBottomPosition(
indicator: *mut ArkUI_SwiperIndicator,
value: f32,
@@ -3322,6 +4522,8 @@ extern "C" {
@param indicator Indicates the pointer to the indicator.
@return Returns the distance between the navigation point and the bottom of the swiper.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_SwiperIndicator_GetBottomPosition(indicator: *mut ArkUI_SwiperIndicator)
-> f32;
/** @brief Sets the width of the dot for the dot indicator.
@@ -3329,18 +4531,24 @@ extern "C" {
@param indicator Indicates the pointer to the indicator.
@param value Indicates the width of the dot for the dot indicator.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_SwiperIndicator_SetItemWidth(indicator: *mut ArkUI_SwiperIndicator, value: f32);
/** @brief Obtains the width of the dot for the dot indicator.
@param indicator Indicates the pointer to the indicator.
@return Returns the width of the dot for the dot indicator.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_SwiperIndicator_GetItemWidth(indicator: *mut ArkUI_SwiperIndicator) -> f32;
/** @brief Sets the height of the dot for the dot indicator.
@param indicator Indicates the pointer to the indicator.
@param value Indicates the height of the dot for the dot indicator.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_SwiperIndicator_SetItemHeight(
indicator: *mut ArkUI_SwiperIndicator,
value: f32,
@@ -3350,12 +4558,16 @@ extern "C" {
@param indicator Indicates the pointer to the indicator.
@return Returns the height of the dot for the dot indicator.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_SwiperIndicator_GetItemHeight(indicator: *mut ArkUI_SwiperIndicator) -> f32;
/** @brief Sets the width of the selected dot for the dot indicator.
@param indicator Indicates the pointer to the indicator.
@param value Indicates the width of the selected dot for the dot indicator.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_SwiperIndicator_SetSelectedItemWidth(
indicator: *mut ArkUI_SwiperIndicator,
value: f32,
@@ -3365,6 +4577,8 @@ extern "C" {
@param indicator Indicates the pointer to the indicator.
@return Returns the width of the selected dot for the dot indicator.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_SwiperIndicator_GetSelectedItemWidth(
indicator: *mut ArkUI_SwiperIndicator,
) -> f32;
@@ -3373,6 +4587,8 @@ extern "C" {
@param indicator Indicates the pointer to the indicator.
@param value Indicates the height of the selected dot for the dot indicator.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_SwiperIndicator_SetSelectedItemHeight(
indicator: *mut ArkUI_SwiperIndicator,
value: f32,
@@ -3382,6 +4598,8 @@ extern "C" {
@param indicator Indicates the pointer to the indicator.
@return Returns the height of the selected dot for the dot indicator.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_SwiperIndicator_GetSelectedItemHeight(
indicator: *mut ArkUI_SwiperIndicator,
) -> f32;
@@ -3390,30 +4608,40 @@ extern "C" {
@param indicator Indicates the pointer to the indicator.
@param mask Whether to display the mask style. True means to display.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_SwiperIndicator_SetMask(indicator: *mut ArkUI_SwiperIndicator, mask: i32);
/** @brief Obtains whether to display the mask style of the dot navigation indicator.
@param indicator Indicates the pointer to the indicator.
@return Returns whether to display the mask style. True means to display.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_SwiperIndicator_GetMask(indicator: *mut ArkUI_SwiperIndicator) -> i32;
/** @brief Sets the color of the dot navigation indicator.
@param indicator Indicates the pointer to the indicator.
@param color the color of the dot navigation indicator, in 0xARGB format.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_SwiperIndicator_SetColor(indicator: *mut ArkUI_SwiperIndicator, color: u32);
/** @brief Obtains the color of the dot navigation indicator.
@param indicator Indicates the pointer to the indicator.
@return Returns the color of the dot navigation indicator, in 0xARGB format.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_SwiperIndicator_GetColor(indicator: *mut ArkUI_SwiperIndicator) -> u32;
/** @brief Sets the color of the selected dot for the navigation indicator.
@param indicator Indicates the pointer to the indicator.
@param color the color of the selected dot, in 0xARGB format.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_SwiperIndicator_SetSelectedColor(
indicator: *mut ArkUI_SwiperIndicator,
selectedColor: u32,
@@ -3423,6 +4651,8 @@ extern "C" {
@param indicator Indicates the pointer to the indicator.
@return Returns the color of the selected dot, in 0xARGB format.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_SwiperIndicator_GetSelectedColor(indicator: *mut ArkUI_SwiperIndicator) -> u32;
/** @brief Sets the number of maxDisplayCount for the dot navigation indicator.
@@ -3432,6 +4662,8 @@ extern "C" {
{@link ARKUI_ERROR_CODE_PARAM_INVALID} indicator is null or maxDisplayCount less then 6 or
maxDisplayCount more then 9
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_SwiperIndicator_SetMaxDisplayCount(
indicator: *mut ArkUI_SwiperIndicator,
maxDisplayCount: i32,
@@ -3442,6 +4674,8 @@ extern "C" {
@return Returns the number of the maxDisplayCount, span is 6-9.
0 - indicator is null
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_SwiperIndicator_GetMaxDisplayCount(
indicator: *mut ArkUI_SwiperIndicator,
) -> i32;
@@ -3450,11 +4684,15 @@ extern "C" {
@param size The number of auxiliary lines.
@return auxiliary line information.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_GuidelineOption_Create(size: i32) -> *mut ArkUI_GuidelineOption;
/** @brief Destroy auxiliary line information.
@param guideline auxiliary line information.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_GuidelineOption_Dispose(guideline: *mut ArkUI_GuidelineOption);
/** @brief Set the Id of the auxiliary line.
@@ -3462,6 +4700,8 @@ extern "C" {
@param value id, must be unique and cannot have the same name as the component in the container.
@param index auxiliary line index value.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_GuidelineOption_SetId(
guideline: *mut ArkUI_GuidelineOption,
value: *const ::core::ffi::c_char,
@@ -3473,6 +4713,8 @@ extern "C" {
@param value direction.
@param index auxiliary line index value.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_GuidelineOption_SetDirection(
guideline: *mut ArkUI_GuidelineOption,
value: ArkUI_Axis,
@@ -3484,6 +4726,8 @@ extern "C" {
@param value The distance from the left or top of the container.
@param index auxiliary line index value.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_GuidelineOption_SetPositionStart(
guideline: *mut ArkUI_GuidelineOption,
value: f32,
@@ -3495,6 +4739,8 @@ extern "C" {
@param value The distance from the right side or bottom of the container.
@param index auxiliary line index value.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_GuidelineOption_SetPositionEnd(
guideline: *mut ArkUI_GuidelineOption,
value: f32,
@@ -3506,6 +4752,8 @@ extern "C" {
@param index auxiliary line index value.
@return Id.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_GuidelineOption_GetId(
guideline: *mut ArkUI_GuidelineOption,
index: i32,
@@ -3516,6 +4764,8 @@ extern "C" {
@param index auxiliary line index value.
@return direction.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_GuidelineOption_GetDirection(
guideline: *mut ArkUI_GuidelineOption,
index: i32,
@@ -3526,6 +4776,8 @@ extern "C" {
@param index auxiliary line index value.
@return The distance from the left or top of the container.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_GuidelineOption_GetPositionStart(
guideline: *mut ArkUI_GuidelineOption,
index: i32,
@@ -3536,6 +4788,8 @@ extern "C" {
@param index auxiliary line index value.
@return The distance from the right side or bottom of the container.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_GuidelineOption_GetPositionEnd(
guideline: *mut ArkUI_GuidelineOption,
index: i32,
@@ -3545,11 +4799,15 @@ extern "C" {
@param size Number of barriers.
@return barrier information.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_BarrierOption_Create(size: i32) -> *mut ArkUI_BarrierOption;
/** @brief Destroy barrier information.
@param barrierStyle barrier information.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_BarrierOption_Dispose(barrierStyle: *mut ArkUI_BarrierOption);
/** @brief Set the Id of the barrier.
@@ -3557,6 +4815,8 @@ extern "C" {
@param value id, must be unique and cannot have the same name as the component in the container.
@param index Barrier index value.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_BarrierOption_SetId(
barrierStyle: *mut ArkUI_BarrierOption,
value: *const ::core::ffi::c_char,
@@ -3568,6 +4828,8 @@ extern "C" {
@param value direction.
@param index Barrier index value.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_BarrierOption_SetDirection(
barrierStyle: *mut ArkUI_BarrierOption,
value: ArkUI_BarrierDirection,
@@ -3579,6 +4841,8 @@ extern "C" {
@param value The ID of the dependent component.
@param index Barrier index value.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_BarrierOption_SetReferencedId(
barrierStyle: *mut ArkUI_BarrierOption,
value: *const ::core::ffi::c_char,
@@ -3590,6 +4854,8 @@ extern "C" {
@param index auxiliary line index value.
@return The Id of the barrier.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_BarrierOption_GetId(
barrierStyle: *mut ArkUI_BarrierOption,
index: i32,
@@ -3600,6 +4866,8 @@ extern "C" {
@param index auxiliary line index value.
@return The direction of the barrier.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_BarrierOption_GetDirection(
barrierStyle: *mut ArkUI_BarrierOption,
index: i32,
@@ -3611,6 +4879,8 @@ extern "C" {
@param referencedIndex dependent component Id index value.
@return The barrier's dependent components.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_BarrierOption_GetReferencedId(
barrierStyle: *mut ArkUI_BarrierOption,
index: i32,
@@ -3622,6 +4892,8 @@ extern "C" {
@param index auxiliary line index value.
@return The number of dependent components of the barrier.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_BarrierOption_GetReferencedIdSize(
barrierStyle: *mut ArkUI_BarrierOption,
index: i32,
@@ -3630,11 +4902,15 @@ extern "C" {
@return Alignment rule information.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_AlignmentRuleOption_Create() -> *mut ArkUI_AlignmentRuleOption;
/** @brief Destroys the alignment rule information of subcomponents in relative containers.
@param option Alignment rule information of subcomponents in the relative container.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_AlignmentRuleOption_Dispose(option: *mut ArkUI_AlignmentRuleOption);
/** @brief Set the start alignment parameter.
@@ -3642,6 +4918,8 @@ extern "C" {
@param id The id value of the anchor component.
@param value Alignment relative to the anchor component.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_AlignmentRuleOption_SetStart(
option: *mut ArkUI_AlignmentRuleOption,
id: *const ::core::ffi::c_char,
@@ -3653,6 +4931,8 @@ extern "C" {
@param id The id value of the anchor component.
@param value Alignment relative to the anchor component.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_AlignmentRuleOption_SetEnd(
option: *mut ArkUI_AlignmentRuleOption,
id: *const ::core::ffi::c_char,
@@ -3664,6 +4944,8 @@ extern "C" {
@param id The id value of the anchor component.
@param value Alignment relative to anchor component
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_AlignmentRuleOption_SetCenterHorizontal(
option: *mut ArkUI_AlignmentRuleOption,
id: *const ::core::ffi::c_char,
@@ -3675,6 +4957,8 @@ extern "C" {
@param id The id value of the anchor component.
@param value Alignment relative to anchor component
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_AlignmentRuleOption_SetTop(
option: *mut ArkUI_AlignmentRuleOption,
id: *const ::core::ffi::c_char,
@@ -3686,6 +4970,8 @@ extern "C" {
@param id The id value of the anchor component.
@param value Alignment relative to anchor component
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_AlignmentRuleOption_SetBottom(
option: *mut ArkUI_AlignmentRuleOption,
id: *const ::core::ffi::c_char,
@@ -3697,6 +4983,8 @@ extern "C" {
@param id The id value of the anchor component.
@param value Alignment relative to the anchor component.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_AlignmentRuleOption_SetCenterVertical(
option: *mut ArkUI_AlignmentRuleOption,
id: *const ::core::ffi::c_char,
@@ -3707,6 +4995,8 @@ extern "C" {
@param option Alignment rule information of subcomponents in the relative container.
@param horizontal bias value in the horizontal direction.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_AlignmentRuleOption_SetBiasHorizontal(
option: *mut ArkUI_AlignmentRuleOption,
horizontal: f32,
@@ -3716,6 +5006,8 @@ extern "C" {
@param option Alignment rule information of subcomponents in the relative container.
@param horizontal bias value in the vertical direction.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_AlignmentRuleOption_SetBiasVertical(
option: *mut ArkUI_AlignmentRuleOption,
vertical: f32,
@@ -3725,6 +5017,8 @@ extern "C" {
@param option Alignment rule information of subcomponents in the relative container.
@return The id value of the anchor component.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_AlignmentRuleOption_GetStartId(
option: *mut ArkUI_AlignmentRuleOption,
) -> *const ::core::ffi::c_char;
@@ -3733,6 +5027,8 @@ extern "C" {
@param option Alignment rule information of subcomponents in the relative container.
@return The alignment of the parameters.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_AlignmentRuleOption_GetStartAlignment(
option: *mut ArkUI_AlignmentRuleOption,
) -> ArkUI_HorizontalAlignment;
@@ -3741,6 +5037,8 @@ extern "C" {
@param option Alignment rule information of subcomponents in the relative container.
@return End-aligned parameter id.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_AlignmentRuleOption_GetEndId(
option: *mut ArkUI_AlignmentRuleOption,
) -> *const ::core::ffi::c_char;
@@ -3749,6 +5047,8 @@ extern "C" {
@param option Alignment rule information of subcomponents in the relative container.
@return The alignment of the end-aligned parameter.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_AlignmentRuleOption_GetEndAlignment(
option: *mut ArkUI_AlignmentRuleOption,
) -> ArkUI_HorizontalAlignment;
@@ -3757,6 +5057,8 @@ extern "C" {
@param option Alignment rule information of subcomponents in the relative container.
@return The id of the parameter of horizontal center alignment.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_AlignmentRuleOption_GetCenterIdHorizontal(
option: *mut ArkUI_AlignmentRuleOption,
) -> *const ::core::ffi::c_char;
@@ -3765,6 +5067,8 @@ extern "C" {
@param option Alignment rule information of subcomponents in the relative container.
@return The alignment of the horizontally centered alignment parameter.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_AlignmentRuleOption_GetCenterAlignmentHorizontal(
option: *mut ArkUI_AlignmentRuleOption,
) -> ArkUI_HorizontalAlignment;
@@ -3773,6 +5077,8 @@ extern "C" {
@param option Alignment rule information of subcomponents in the relative container.
@return Top aligned parameter id.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_AlignmentRuleOption_GetTopId(
option: *mut ArkUI_AlignmentRuleOption,
) -> *const ::core::ffi::c_char;
@@ -3781,6 +5087,8 @@ extern "C" {
@param option Alignment rule information of subcomponents in the relative container.
@return The alignment of the top-aligned parameter.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_AlignmentRuleOption_GetTopAlignment(
option: *mut ArkUI_AlignmentRuleOption,
) -> ArkUI_VerticalAlignment;
@@ -3789,6 +5097,8 @@ extern "C" {
@param option Alignment rule information of subcomponents in the relative container.
@return The id of the bottom-aligned parameter.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_AlignmentRuleOption_GetBottomId(
option: *mut ArkUI_AlignmentRuleOption,
) -> *const ::core::ffi::c_char;
@@ -3797,6 +5107,8 @@ extern "C" {
@param option Alignment rule information of subcomponents in the relative container.
@return The alignment of the bottom-aligned parameter.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_AlignmentRuleOption_GetBottomAlignment(
option: *mut ArkUI_AlignmentRuleOption,
) -> ArkUI_VerticalAlignment;
@@ -3805,6 +5117,8 @@ extern "C" {
@param option Alignment rule information of subcomponents in the relative container.
@return The id of the vertical center alignment parameter.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_AlignmentRuleOption_GetCenterIdVertical(
option: *mut ArkUI_AlignmentRuleOption,
) -> *const ::core::ffi::c_char;
@@ -3813,6 +5127,8 @@ extern "C" {
@param option Alignment rule information of subcomponents in the relative container.
@return The alignment of the vertical center alignment parameter.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_AlignmentRuleOption_GetCenterAlignmentVertical(
option: *mut ArkUI_AlignmentRuleOption,
) -> ArkUI_VerticalAlignment;
@@ -3821,6 +5137,8 @@ extern "C" {
@param option Alignment rule information of subcomponents in the relative container.
@return The bias value in the horizontal direction.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_AlignmentRuleOption_GetBiasHorizontal(
option: *mut ArkUI_AlignmentRuleOption,
) -> f32;
@@ -3829,6 +5147,8 @@ extern "C" {
@param option Alignment rule information of subcomponents in the relative container.
@return bias value in vertical direction.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_AlignmentRuleOption_GetBiasVertical(
option: *mut ArkUI_AlignmentRuleOption,
) -> f32;
@@ -3837,17 +5157,23 @@ extern "C" {
@return List Item SwipeActionItem configuration item instance. If the object returns a null pointer,
it indicates creation failure, and the reason for the failure may be that the address space is full.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_ListItemSwipeActionItem_Create() -> *mut ArkUI_ListItemSwipeActionItem;
/** @brief Destroy the ListitemSwipeActionItem instance.
@param option List Item SwipeActionItem instance to be destroyed.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_ListItemSwipeActionItem_Dispose(item: *mut ArkUI_ListItemSwipeActionItem);
/** @brief Set the layout content of ListItem SwipeActionItem.
@param option List Item SwipeActionItem instance.
@param builder Layout information.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_ListItemSwipeActionItem_SetContent(
item: *mut ArkUI_ListItemSwipeActionItem,
node: ArkUI_NodeHandle,
@@ -3857,6 +5183,8 @@ extern "C" {
@param option List Item SwipeActionItem instance.
@param distance Component long-distance sliding deletion distance threshold.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_ListItemSwipeActionItem_SetActionAreaDistance(
item: *mut ArkUI_ListItemSwipeActionItem,
distance: f32,
@@ -3867,6 +5195,8 @@ extern "C" {
@return Component long-distance sliding deletion distance threshold. If -1.0f is returned, the return fails.
The possible cause of the failure is that the item parameter is abnormal, such as a null pointer.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_ListItemSwipeActionItem_GetActionAreaDistance(
item: *mut ArkUI_ListItemSwipeActionItem,
) -> f32;
@@ -3875,6 +5205,8 @@ extern "C" {
@param option List Item SwipeActionItem instance.
@param callback Callback Events.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_ListItemSwipeActionItem_SetOnEnterActionArea(
item: *mut ArkUI_ListItemSwipeActionItem,
callback: ::core::option::Option,
@@ -3885,6 +5217,8 @@ extern "C" {
@param userData User defined data.
@param callback Callback Events.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_ListItemSwipeActionItem_SetOnEnterActionAreaWithUserData(
item: *mut ArkUI_ListItemSwipeActionItem,
userData: *mut ::core::ffi::c_void,
@@ -3895,6 +5229,8 @@ extern "C" {
@param option List Item SwipeActionItem instance.
@param callback Callback Events.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_ListItemSwipeActionItem_SetOnAction(
item: *mut ArkUI_ListItemSwipeActionItem,
callback: ::core::option::Option,
@@ -3905,6 +5241,8 @@ extern "C" {
@param userData User defined data.
@param callback Callback Events.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_ListItemSwipeActionItem_SetOnActionWithUserData(
item: *mut ArkUI_ListItemSwipeActionItem,
userData: *mut ::core::ffi::c_void,
@@ -3915,6 +5253,8 @@ extern "C" {
@param option List Item SwipeActionItem instance.
@param callback Callback Events.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_ListItemSwipeActionItem_SetOnExitActionArea(
item: *mut ArkUI_ListItemSwipeActionItem,
callback: ::core::option::Option,
@@ -3925,6 +5265,8 @@ extern "C" {
@param userData User defined data.
@param callback Callback Events.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_ListItemSwipeActionItem_SetOnExitActionAreaWithUserData(
item: *mut ArkUI_ListItemSwipeActionItem,
userData: *mut ::core::ffi::c_void,
@@ -3936,6 +5278,8 @@ extern "C" {
@param callback Callback Events.
swipeActionState The changed state.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_ListItemSwipeActionItem_SetOnStateChange(
item: *mut ArkUI_ListItemSwipeActionItem,
callback: ::core::option::Option<
@@ -3949,6 +5293,8 @@ extern "C" {
@param callback Callback Events.
swipeActionState The changed state.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_ListItemSwipeActionItem_SetOnStateChangeWithUserData(
item: *mut ArkUI_ListItemSwipeActionItem,
userData: *mut ::core::ffi::c_void,
@@ -3964,11 +5310,15 @@ extern "C" {
@return List Item SwipeActionOption configuration item instance.If the object returns a null pointer,
it indicates a creation failure, and the reason for the failure may be that the address space is full.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_ListItemSwipeActionOption_Create() -> *mut ArkUI_ListItemSwipeActionOption;
/** @brief Destroy the ListitemSwipeActionOption instance.
@param option List Item SwipeActionOption instance to be destroyed.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_ListItemSwipeActionOption_Dispose(option: *mut ArkUI_ListItemSwipeActionOption);
/** @brief Set the layout content on the left (vertical layout) or top (horizontal layout)
of the ListItem SwipeActionItem.
@@ -3976,6 +5326,8 @@ extern "C" {
@param option List Item SwipeActionItem instance.
@param builder Layout information.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_ListItemSwipeActionOption_SetStart(
option: *mut ArkUI_ListItemSwipeActionOption,
item: *mut ArkUI_ListItemSwipeActionItem,
@@ -3986,6 +5338,8 @@ extern "C" {
@param option List Item SwipeActionItem instance.
@param builder Layout information.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_ListItemSwipeActionOption_SetEnd(
option: *mut ArkUI_ListItemSwipeActionOption,
item: *mut ArkUI_ListItemSwipeActionItem,
@@ -3995,6 +5349,8 @@ extern "C" {
@param option List Item SwipeActionItem instance.
@param edgeEffect Sliding effect.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_ListItemSwipeActionOption_SetEdgeEffect(
option: *mut ArkUI_ListItemSwipeActionOption,
edgeEffect: ArkUI_ListItemSwipeEdgeEffect,
@@ -4005,6 +5361,8 @@ extern "C" {
@return Sliding effect. The default return value is 0. If -1 is returned, the return fails.
The possible cause of the failure is that the option parameter is abnormal, such as a null pointer.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_ListItemSwipeActionOption_GetEdgeEffect(
option: *mut ArkUI_ListItemSwipeActionOption,
) -> i32;
@@ -4014,6 +5372,8 @@ extern "C" {
@param callback Callback Events.
offset Slide offset.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_ListItemSwipeActionOption_SetOnOffsetChange(
option: *mut ArkUI_ListItemSwipeActionOption,
callback: ::core::option::Option,
@@ -4025,6 +5385,8 @@ extern "C" {
@param callback Callback Events.
offset Slide offset.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_ListItemSwipeActionOption_SetOnOffsetChangeWithUserData(
option: *mut ArkUI_ListItemSwipeActionOption,
userData: *mut ::core::ffi::c_void,
@@ -4037,11 +5399,15 @@ extern "C" {
@return ListChildrenMainSize configuration item instance.If the object returns a null pointer,
it indicates a creation failure, and the reason for the failure may be that the address space is full.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_ListChildrenMainSizeOption_Create() -> *mut ArkUI_ListChildrenMainSize;
/** @brief Destroy the ListChildrenMainSize instance.
@param option The ListChildrenMainSize instance to be destroyed.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_ListChildrenMainSizeOption_Dispose(option: *mut ArkUI_ListChildrenMainSize);
/** @brief Set the default size of ChildrenMainSizeOption for the List component.
@@ -4049,6 +5415,8 @@ extern "C" {
@param defaultMainSize The default size of the ListItem under the List, measured in vp.
@return 0 represents success. If defaultMainSize is less than 0 or option is a null pointer, return 401.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_ListChildrenMainSizeOption_SetDefaultMainSize(
option: *mut ArkUI_ListChildrenMainSize,
defaultMainSize: f32,
@@ -4059,6 +5427,8 @@ extern "C" {
@return The default size of the ListItem under the List is 0, measured in vp.
When the option is a null pointer, it returns -1.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_ListChildrenMainSizeOption_GetDefaultMainSize(
option: *mut ArkUI_ListChildrenMainSize,
) -> f32;
@@ -4067,6 +5437,8 @@ extern "C" {
@param option ListChildrenMainSize instance.
@param totalSize Array size.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_ListChildrenMainSizeOption_Resize(
option: *mut ArkUI_ListChildrenMainSize,
totalSize: i32,
@@ -4079,6 +5451,8 @@ extern "C" {
@param addCount The number of MainSize arrays to be added starting from index.
@return 0 represents success. If the function parameter is abnormal, return 401.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_ListChildrenMainSizeOption_Splice(
option: *mut ArkUI_ListChildrenMainSize,
index: i32,
@@ -4092,6 +5466,8 @@ extern "C" {
@param mainSize The actual modified value.
@return 0 represents success. If the function parameter is abnormal, return 401.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_ListChildrenMainSizeOption_UpdateSize(
option: *mut ArkUI_ListChildrenMainSize,
index: i32,
@@ -4103,6 +5479,8 @@ extern "C" {
@param index The index position of the value to be obtained.
@return The value of the specific position of the array. If the function parameter is abnormal, return -1.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_ListChildrenMainSizeOption_GetMainSize(
option: *mut ArkUI_ListChildrenMainSize,
index: i32,
@@ -4112,11 +5490,15 @@ extern "C" {
@return Returns a CustomSpanMeasureInfo instance.
If the result returns nullptr, there may be out of memory.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_CustomSpanMeasureInfo_Create() -> *mut ArkUI_CustomSpanMeasureInfo;
/** @brief Disposes of measurement information of this custom span.
@param info The CustomSpanMeasureInfo instance to be destroyed.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_CustomSpanMeasureInfo_Dispose(info: *mut ArkUI_CustomSpanMeasureInfo);
/** @brief Obtains the font size of a custom span.
@@ -4124,6 +5506,8 @@ extern "C" {
@return Returns the font size. If a parameter error occurs, 0.0f is returned.
Possible causes: Parameter verification failed, the parameter should not be nullptr.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_CustomSpanMeasureInfo_GetFontSize(
info: *mut ArkUI_CustomSpanMeasureInfo,
) -> f32;
@@ -4132,11 +5516,15 @@ extern "C" {
@return Returns a CustomSpanMetrics instance.
If the result returns nullptr, there may be out of memory.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_CustomSpanMetrics_Create() -> *mut ArkUI_CustomSpanMetrics;
/** @brief Disposes of measurement metrics of this custom span.
@param info The CustomSpanMetrics instance to be destroyed.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_CustomSpanMetrics_Dispose(metrics: *mut ArkUI_CustomSpanMetrics);
/** @brief Sets the width for a custom span.
@@ -4147,6 +5535,8 @@ extern "C" {
Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
Possible causes: Parameter verification failed, the parameter should not be nullptr.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_CustomSpanMetrics_SetWidth(
metrics: *mut ArkUI_CustomSpanMetrics,
width: f32,
@@ -4160,6 +5550,8 @@ extern "C" {
Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
Possible causes: Parameter verification failed, the parameter should not be nullptr.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_CustomSpanMetrics_SetHeight(
metrics: *mut ArkUI_CustomSpanMetrics,
height: f32,
@@ -4169,11 +5561,15 @@ extern "C" {
@return Returns a CustomSpanDrawInfo instance.
If the result returns nullptr, there may be out of memory.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_CustomSpanDrawInfo_Create() -> *mut ArkUI_CustomSpanDrawInfo;
/** @brief Disposes of drawing information for this custom span.
@param info The CustomSpanDrawInfo instance to be destroyed.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_CustomSpanDrawInfo_Dispose(info: *mut ArkUI_CustomSpanDrawInfo);
/** @brief Obtains the x-axis offset of the custom span relative to the mounted component.
@@ -4181,6 +5577,8 @@ extern "C" {
@return Returns the x-axis offset. If a parameter error occurs, 0.0f is returned.
Possible causes: Parameter verification failed, the parameter should not be nullptr.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_CustomSpanDrawInfo_GetXOffset(info: *mut ArkUI_CustomSpanDrawInfo) -> f32;
/** @brief Obtains the top margin of the custom span relative to the mounted component.
@@ -4188,6 +5586,8 @@ extern "C" {
@return Returns the top margin. If a parameter error occurs, 0.0f is returned.
Possible causes: Parameter verification failed, the parameter should not be nullptr.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_CustomSpanDrawInfo_GetLineTop(info: *mut ArkUI_CustomSpanDrawInfo) -> f32;
/** @brief Obtains the bottom margin of the custom span relative to the mounted component.
@@ -4195,6 +5595,8 @@ extern "C" {
@return Returns the bottom margin. If a parameter error occurs, 0.0f is returned.
Possible causes: Parameter verification failed, the parameter should not be nullptr.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_CustomSpanDrawInfo_GetLineBottom(info: *mut ArkUI_CustomSpanDrawInfo) -> f32;
/** @brief Obtains the baseline offset of the custom span relative to the mounted component.
@@ -4202,6 +5604,8 @@ extern "C" {
@return Returns the baseline offset. If a parameter error occurs, 0.0f is returned.
Possible causes: Parameter verification failed, the parameter should not be nullptr.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_CustomSpanDrawInfo_GetBaseline(info: *mut ArkUI_CustomSpanDrawInfo) -> f32;
/** @brief Create a image frame from the image path.
@param src Indicates the image path.
@@ -4209,6 +5613,8 @@ extern "C" {
If a null pointer is returned, the object fails to be created. The possible cause is that
the src parameter is abnormal, for example, the pointer is null.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_ImageAnimatorFrameInfo_CreateFromString(
src: *mut ::core::ffi::c_char,
) -> *mut ArkUI_ImageAnimatorFrameInfo;
@@ -4216,12 +5622,16 @@ extern "C" {
@param imageInfo Indicates the pointer to the image frame.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_ImageAnimatorFrameInfo_Dispose(imageInfo: *mut ArkUI_ImageAnimatorFrameInfo);
/** @brief Set the width of the image frame.
@param imageInfo Indicates the pointer to the image frame.
@param width Indicates the width of the image frame, and the unit is PX.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_ImageAnimatorFrameInfo_SetWidth(
imageInfo: *mut ArkUI_ImageAnimatorFrameInfo,
width: i32,
@@ -4231,6 +5641,8 @@ extern "C" {
@param imageInfo Indicates the pointer to the image frame.
@return Return the width of the image frame, and the unit is PX. Return 0 when the imageInfo is null.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_ImageAnimatorFrameInfo_GetWidth(
imageInfo: *mut ArkUI_ImageAnimatorFrameInfo,
) -> i32;
@@ -4239,6 +5651,8 @@ extern "C" {
@param imageInfo Indicates the pointer to the image frame.
@param height Indicates the height of the image frame, and the unit is PX.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_ImageAnimatorFrameInfo_SetHeight(
imageInfo: *mut ArkUI_ImageAnimatorFrameInfo,
height: i32,
@@ -4248,6 +5662,8 @@ extern "C" {
@param imageInfo Indicates the pointer to the image frame.
@return Return the height of the image frame, and the unit is PX. Return 0 when the imageInfo is null.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_ImageAnimatorFrameInfo_GetHeight(
imageInfo: *mut ArkUI_ImageAnimatorFrameInfo,
) -> i32;
@@ -4257,6 +5673,8 @@ extern "C" {
@param top Indicates the vertical coordinate of the image relative to the upper left corner of the widget,
and the unit is PX.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_ImageAnimatorFrameInfo_SetTop(
imageInfo: *mut ArkUI_ImageAnimatorFrameInfo,
top: i32,
@@ -4267,6 +5685,8 @@ extern "C" {
@return Returns the vertical coordinate of the image relative to the upper left corner of the widget,
and the unit is PX. Return 0 when the imageInfo is null.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_ImageAnimatorFrameInfo_GetTop(
imageInfo: *mut ArkUI_ImageAnimatorFrameInfo,
) -> i32;
@@ -4276,6 +5696,8 @@ extern "C" {
@param left Indicates the horizontal coordinate of the image relative to the upper left corner of the widget,
and the unit is PX.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_ImageAnimatorFrameInfo_SetLeft(
imageInfo: *mut ArkUI_ImageAnimatorFrameInfo,
left: i32,
@@ -4286,6 +5708,8 @@ extern "C" {
@return Returns the horizontal coordinate of the image relative to the upper left corner of the widget,
and the unit is PX. Return 0 when the imageInfo is null.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_ImageAnimatorFrameInfo_GetLeft(
imageInfo: *mut ArkUI_ImageAnimatorFrameInfo,
) -> i32;
@@ -4294,6 +5718,8 @@ extern "C" {
@param imageInfo Indicates the pointer to the image frame.
@param duration Indicates the playback duration of each image frame, and the unit is milliseconds.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_ImageAnimatorFrameInfo_SetDuration(
imageInfo: *mut ArkUI_ImageAnimatorFrameInfo,
duration: i32,
@@ -4304,6 +5730,8 @@ extern "C" {
@return Returns the playback duration of the image frame, and the unit is milliseconds.
Return 0 when the imageInfo is null.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_ImageAnimatorFrameInfo_GetDuration(
imageInfo: *mut ArkUI_ImageAnimatorFrameInfo,
) -> i32;
@@ -4312,17 +5740,23 @@ extern "C" {
@return Returns the pointer to the accessibility state object.
If a null pointer is returned, the object fails to be created. The possible cause is that the address space is full.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_AccessibilityState_Create() -> *mut ArkUI_AccessibilityState;
/** @brief Dispose accessibility state.
@param state accessibility state object.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_AccessibilityState_Dispose(state: *mut ArkUI_AccessibilityState);
/** @brief Set accessibility state disabled.
@param state accessibility state object.
@param isDisabled accessibility state disabled, Value 1 indicates disabled and 0 indicates enbled.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_AccessibilityState_SetDisabled(
state: *mut ArkUI_AccessibilityState,
isDisabled: i32,
@@ -4333,6 +5767,8 @@ extern "C" {
@return 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.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_AccessibilityState_IsDisabled(state: *mut ArkUI_AccessibilityState) -> i32;
/** @brief Set accessibility state selected.
@@ -4340,6 +5776,8 @@ extern "C" {
@param isSelected accessibility state selected, Value 1 indicates selected, and 0 indicates not selected.
The default value is 0.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_AccessibilityState_SetSelected(
state: *mut ArkUI_AccessibilityState,
isSelected: i32,
@@ -4351,6 +5789,8 @@ extern "C" {
The default value is 0.
If the function parameter is abnormal, return the default value.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_AccessibilityState_IsSelected(state: *mut ArkUI_AccessibilityState) -> i32;
/** @brief Set accessibility checked state.
@@ -4358,6 +5798,8 @@ extern "C" {
@param checkedState checked state,and uses the {@link ArkUI_AccessibilityCheckedState} enumeration value,
The default value is ARKUI_ACCESSIBILITY_UNCHECKED.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_AccessibilityState_SetCheckedState(
state: *mut ArkUI_AccessibilityState,
checkedState: i32,
@@ -4369,6 +5811,8 @@ extern "C" {
The default value is ARKUI_ACCESSIBILITY_UNCHECKED.
If the function parameter is abnormal, return the default value.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_AccessibilityState_GetCheckedState(state: *mut ArkUI_AccessibilityState)
-> i32;
/** @brief Create accessibility value.
@@ -4376,17 +5820,23 @@ extern "C" {
@return Returns the pointer to the accessibility state object.
If a null pointer is returned, the object fails to be created. The possible cause is that the address space is full.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_AccessibilityValue_Create() -> *mut ArkUI_AccessibilityValue;
/** @brief Dispose accessibility value.
@param state accessibility value object.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_AccessibilityValue_Dispose(value: *mut ArkUI_AccessibilityValue);
/** @brief Set accessibility minimum value.
@param value accessibility value object.
@param min minimum value based on range components, The default value is -1。
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_AccessibilityValue_SetMin(value: *mut ArkUI_AccessibilityValue, min: i32);
/** @brief Get accessibility minimum value.
@@ -4394,12 +5844,16 @@ extern "C" {
@return minimum value based on range components, The default value is -1。
If the function parameter is abnormal, return -1.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_AccessibilityValue_GetMin(value: *mut ArkUI_AccessibilityValue) -> i32;
/** @brief Set accessibility minimum value.
@param value accessibility value object.
@param max maximum value based on range components, The default value is -1。
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_AccessibilityValue_SetMax(value: *mut ArkUI_AccessibilityValue, max: i32);
/** @brief Get accessibility minimum value.
@@ -4407,12 +5861,16 @@ extern "C" {
@return maximum value based on range components, The default value is -1。
If the function parameter is abnormal, return -1.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_AccessibilityValue_GetMax(value: *mut ArkUI_AccessibilityValue) -> i32;
/** @brief Set accessibility current value.
@param value accessibility value object.
@param current value based on range components, The default value is -1。
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_AccessibilityValue_SetCurrent(
value: *mut ArkUI_AccessibilityValue,
current: i32,
@@ -4423,12 +5881,16 @@ extern "C" {
@return current value based on range components, The default value is -1。
If the function parameter is abnormal, return -1.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_AccessibilityValue_GetCurrent(value: *mut ArkUI_AccessibilityValue) -> i32;
/** @brief Set accessibility text value.
@param value accessibility value object.
@param text The textual description information of the component, which defaults to an empty string。
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_AccessibilityValue_SetText(
value: *mut ArkUI_AccessibilityValue,
text: *const ::core::ffi::c_char,
@@ -4439,6 +5901,8 @@ extern "C" {
@return The textual description information of the component, which defaults to an empty string;
If the function parameter is abnormal, return null.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_AccessibilityValue_GetText(
value: *mut ArkUI_AccessibilityValue,
) -> *const ::core::ffi::c_char;
diff --git a/components/arkui/src/ui_input_event.rs b/components/arkui/src/ui_input_event.rs
index 727cc52..c77c4fb 100644
--- a/components/arkui/src/ui_input_event.rs
+++ b/components/arkui/src/ui_input_event.rs
@@ -1,3 +1,73 @@
#[allow(unused_imports)]
-mod ui_input_event_api12;
-pub use ui_input_event_api12::*;
+mod ui_input_event_ffi;
+pub use ui_input_event_ffi::*;
+
+mod ui_input_event_anon_enums_ffi;
+
+pub use anon_enums::*;
+mod anon_enums {
+ use super::ui_input_event_anon_enums_ffi as bindgen_enums;
+ use std::ffi::c_uint;
+
+ #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
+ #[repr(transparent)]
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+ pub struct TouchEventAction(c_uint);
+
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+ impl TouchEventAction {
+ pub const CANCEL: Self = Self(bindgen_enums::UI_TOUCH_EVENT_ACTION_CANCEL.0);
+ pub const DOWN: Self = Self(bindgen_enums::UI_TOUCH_EVENT_ACTION_DOWN.0);
+ pub const MOVE: Self = Self(bindgen_enums::UI_TOUCH_EVENT_ACTION_MOVE.0);
+ pub const UP: Self = Self(bindgen_enums::UI_TOUCH_EVENT_ACTION_UP.0);
+ }
+
+ #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
+ #[repr(transparent)]
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+ pub struct TouchEventToolType(c_uint);
+
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+ impl TouchEventToolType {
+ pub const UNKNOWN: Self = Self(bindgen_enums::UI_INPUT_EVENT_TOOL_TYPE_UNKNOWN.0);
+ pub const FINGER: Self = Self(bindgen_enums::UI_INPUT_EVENT_TOOL_TYPE_FINGER.0);
+ pub const PEN: Self = Self(bindgen_enums::UI_INPUT_EVENT_TOOL_TYPE_PEN.0);
+ pub const MOUSE: Self = Self(bindgen_enums::UI_INPUT_EVENT_TOOL_TYPE_MOUSE.0);
+ pub const TOUCHPAD: Self = Self(bindgen_enums::UI_INPUT_EVENT_TOOL_TYPE_TOUCHPAD.0);
+ pub const JOYSTICK: Self = Self(bindgen_enums::UI_INPUT_EVENT_TOOL_TYPE_JOYSTICK.0);
+ }
+
+ #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
+ #[repr(transparent)]
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+ pub struct InputEventSourceType(c_uint);
+
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+ impl InputEventSourceType {
+ pub const UNKNOWN: Self = Self(bindgen_enums::UI_INPUT_EVENT_SOURCE_TYPE_UNKNOWN.0);
+ pub const MOUSE: Self = Self(bindgen_enums::UI_INPUT_EVENT_SOURCE_TYPE_MOUSE.0);
+ pub const TOUCH_SCREEN: Self =
+ Self(bindgen_enums::UI_INPUT_EVENT_SOURCE_TYPE_TOUCH_SCREEN.0);
+ }
+
+ #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
+ #[repr(transparent)]
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+ pub struct MouseEventAction(c_uint);
+
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+ impl MouseEventAction {
+ pub const UNKNOWN: Self = Self(bindgen_enums::UI_MOUSE_EVENT_ACTION_UNKNOWN.0);
+ pub const PRESS: Self = Self(bindgen_enums::UI_MOUSE_EVENT_ACTION_PRESS.0);
+ pub const RELEASE: Self = Self(bindgen_enums::UI_MOUSE_EVENT_ACTION_RELEASE.0);
+ pub const MOVE: Self = Self(bindgen_enums::UI_MOUSE_EVENT_ACTION_MOVE.0);
+ }
+}
diff --git a/components/arkui/src/ui_input_event/ui_input_event_anon_enums_ffi.rs b/components/arkui/src/ui_input_event/ui_input_event_anon_enums_ffi.rs
new file mode 100644
index 0000000..e3041c2
--- /dev/null
+++ b/components/arkui/src/ui_input_event/ui_input_event_anon_enums_ffi.rs
@@ -0,0 +1,106 @@
+/* automatically generated by rust-bindgen 0.71.1 */
+
+#![allow(non_upper_case_globals)]
+#![allow(non_camel_case_types)]
+#![allow(non_snake_case)]
+
+/// Cancellation of touch.
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+pub const UI_TOUCH_EVENT_ACTION_CANCEL: _bindgen_ty_1 = _bindgen_ty_1(0);
+/// Pressing of a touch point.
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+pub const UI_TOUCH_EVENT_ACTION_DOWN: _bindgen_ty_1 = _bindgen_ty_1(1);
+/// Moving of a touch point.
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+pub const UI_TOUCH_EVENT_ACTION_MOVE: _bindgen_ty_1 = _bindgen_ty_1(2);
+/// Lifting of a touch point.
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+pub const UI_TOUCH_EVENT_ACTION_UP: _bindgen_ty_1 = _bindgen_ty_1(3);
+#[repr(transparent)]
+/** @brief Defines the action code of the input event.
+
+@since 12*/
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
+pub struct _bindgen_ty_1(pub ::core::ffi::c_uint);
+/// Unknown tool type.
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+pub const UI_INPUT_EVENT_TOOL_TYPE_UNKNOWN: _bindgen_ty_2 = _bindgen_ty_2(0);
+/// Finger.
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+pub const UI_INPUT_EVENT_TOOL_TYPE_FINGER: _bindgen_ty_2 = _bindgen_ty_2(1);
+/// Pen.
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+pub const UI_INPUT_EVENT_TOOL_TYPE_PEN: _bindgen_ty_2 = _bindgen_ty_2(2);
+/// Mouse.
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+pub const UI_INPUT_EVENT_TOOL_TYPE_MOUSE: _bindgen_ty_2 = _bindgen_ty_2(3);
+/// TouchPad.
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+pub const UI_INPUT_EVENT_TOOL_TYPE_TOUCHPAD: _bindgen_ty_2 = _bindgen_ty_2(4);
+/// JoyStick.
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+pub const UI_INPUT_EVENT_TOOL_TYPE_JOYSTICK: _bindgen_ty_2 = _bindgen_ty_2(5);
+#[repr(transparent)]
+/** @brief Defines the tool type of the touch event.
+
+@since 12*/
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
+pub struct _bindgen_ty_2(pub ::core::ffi::c_uint);
+/// Unknown source type.
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+pub const UI_INPUT_EVENT_SOURCE_TYPE_UNKNOWN: _bindgen_ty_3 = _bindgen_ty_3(0);
+/// Mouse.
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+pub const UI_INPUT_EVENT_SOURCE_TYPE_MOUSE: _bindgen_ty_3 = _bindgen_ty_3(1);
+/// Touchscreen.
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+pub const UI_INPUT_EVENT_SOURCE_TYPE_TOUCH_SCREEN: _bindgen_ty_3 = _bindgen_ty_3(2);
+#[repr(transparent)]
+/** @brief Defines the source type of the touch event.
+
+@since 12*/
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
+pub struct _bindgen_ty_3(pub ::core::ffi::c_uint);
+/// Invalid.
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+pub const UI_MOUSE_EVENT_ACTION_UNKNOWN: _bindgen_ty_4 = _bindgen_ty_4(0);
+/// Press.
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+pub const UI_MOUSE_EVENT_ACTION_PRESS: _bindgen_ty_4 = _bindgen_ty_4(1);
+/// Release.
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+pub const UI_MOUSE_EVENT_ACTION_RELEASE: _bindgen_ty_4 = _bindgen_ty_4(2);
+/// Move.
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+pub const UI_MOUSE_EVENT_ACTION_MOVE: _bindgen_ty_4 = _bindgen_ty_4(3);
+#[repr(transparent)]
+/** @brief Define the Action Code for mouse events.
+
+@since 12*/
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
+pub struct _bindgen_ty_4(pub ::core::ffi::c_uint);
diff --git a/components/arkui/src/ui_input_event/ui_input_event_api12.rs b/components/arkui/src/ui_input_event/ui_input_event_ffi.rs
similarity index 79%
rename from components/arkui/src/ui_input_event/ui_input_event_api12.rs
rename to components/arkui/src/ui_input_event/ui_input_event_ffi.rs
index 106a475..1c56f23 100644
--- a/components/arkui/src/ui_input_event/ui_input_event_api12.rs
+++ b/components/arkui/src/ui_input_event/ui_input_event_ffi.rs
@@ -1,4 +1,4 @@
-/* automatically generated by rust-bindgen 0.70.1 */
+/* automatically generated by rust-bindgen 0.71.1 */
#![allow(non_upper_case_globals)]
#![allow(non_camel_case_types)]
@@ -9,15 +9,23 @@ use crate::native_type::*;
pub struct ArkUI_UIInputEvent {
_unused: [u8; 0],
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_UIInputEvent_Type {
pub const ARKUI_UIINPUTEVENT_TYPE_UNKNOWN: ArkUI_UIInputEvent_Type = ArkUI_UIInputEvent_Type(0);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_UIInputEvent_Type {
pub const ARKUI_UIINPUTEVENT_TYPE_TOUCH: ArkUI_UIInputEvent_Type = ArkUI_UIInputEvent_Type(1);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_UIInputEvent_Type {
pub const ARKUI_UIINPUTEVENT_TYPE_AXIS: ArkUI_UIInputEvent_Type = ArkUI_UIInputEvent_Type(2);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_UIInputEvent_Type {
/// Mouse event.
pub const ARKUI_UIINPUTEVENT_TYPE_MOUSE: ArkUI_UIInputEvent_Type = ArkUI_UIInputEvent_Type(3);
@@ -26,67 +34,109 @@ impl ArkUI_UIInputEvent_Type {
/** @brief Enumerates the UI input event types.
@since 12*/
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
#[derive(Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_UIInputEvent_Type(pub ::core::ffi::c_uint);
/// Cancellation of touch.
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub const UI_TOUCH_EVENT_ACTION_CANCEL: _bindgen_ty_1 = _bindgen_ty_1(0);
/// Pressing of a touch point.
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub const UI_TOUCH_EVENT_ACTION_DOWN: _bindgen_ty_1 = _bindgen_ty_1(1);
/// Moving of a touch point.
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub const UI_TOUCH_EVENT_ACTION_MOVE: _bindgen_ty_1 = _bindgen_ty_1(2);
/// Lifting of a touch point.
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub const UI_TOUCH_EVENT_ACTION_UP: _bindgen_ty_1 = _bindgen_ty_1(3);
#[repr(transparent)]
/** @brief Defines the action code of the input event.
@since 12*/
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
#[derive(Clone, Hash, PartialEq, Eq)]
pub struct _bindgen_ty_1(pub ::core::ffi::c_uint);
/// Unknown tool type.
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub const UI_INPUT_EVENT_TOOL_TYPE_UNKNOWN: _bindgen_ty_2 = _bindgen_ty_2(0);
/// Finger.
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub const UI_INPUT_EVENT_TOOL_TYPE_FINGER: _bindgen_ty_2 = _bindgen_ty_2(1);
/// Pen.
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub const UI_INPUT_EVENT_TOOL_TYPE_PEN: _bindgen_ty_2 = _bindgen_ty_2(2);
/// Mouse.
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub const UI_INPUT_EVENT_TOOL_TYPE_MOUSE: _bindgen_ty_2 = _bindgen_ty_2(3);
/// TouchPad.
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub const UI_INPUT_EVENT_TOOL_TYPE_TOUCHPAD: _bindgen_ty_2 = _bindgen_ty_2(4);
/// JoyStick.
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub const UI_INPUT_EVENT_TOOL_TYPE_JOYSTICK: _bindgen_ty_2 = _bindgen_ty_2(5);
#[repr(transparent)]
/** @brief Defines the tool type of the touch event.
@since 12*/
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
#[derive(Clone, Hash, PartialEq, Eq)]
pub struct _bindgen_ty_2(pub ::core::ffi::c_uint);
/// Unknown source type.
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub const UI_INPUT_EVENT_SOURCE_TYPE_UNKNOWN: _bindgen_ty_3 = _bindgen_ty_3(0);
/// Mouse.
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub const UI_INPUT_EVENT_SOURCE_TYPE_MOUSE: _bindgen_ty_3 = _bindgen_ty_3(1);
/// Touchscreen.
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub const UI_INPUT_EVENT_SOURCE_TYPE_TOUCH_SCREEN: _bindgen_ty_3 = _bindgen_ty_3(2);
#[repr(transparent)]
/** @brief Defines the source type of the touch event.
@since 12*/
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
#[derive(Clone, Hash, PartialEq, Eq)]
pub struct _bindgen_ty_3(pub ::core::ffi::c_uint);
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl HitTestMode {
/** Both the node and its child node respond to the hit test of a touch event, but its sibling node is blocked from
the hit test.*/
pub const HTM_DEFAULT: HitTestMode = HitTestMode(0);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl HitTestMode {
/** The node responds to the hit test of a touch event, but its child node and sibling node are blocked from the hit
test.*/
pub const HTM_BLOCK: HitTestMode = HitTestMode(1);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl HitTestMode {
/** Both the node and its child node respond to the hit test of a touch event, and its sibling node is also
considered during the hit test.*/
pub const HTM_TRANSPARENT: HitTestMode = HitTestMode(2);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl HitTestMode {
/** The node does not respond to the hit test of a touch event, but its child node and sibling node are considered
during the hit test.*/
@@ -96,60 +146,130 @@ impl HitTestMode {
/** @brief Enumerates the hit test modes.
@since 12*/
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
#[derive(Clone, Hash, PartialEq, Eq)]
pub struct HitTestMode(pub ::core::ffi::c_uint);
/// Invalid.
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub const UI_MOUSE_EVENT_ACTION_UNKNOWN: _bindgen_ty_4 = _bindgen_ty_4(0);
/// Press.
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub const UI_MOUSE_EVENT_ACTION_PRESS: _bindgen_ty_4 = _bindgen_ty_4(1);
/// Release.
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub const UI_MOUSE_EVENT_ACTION_RELEASE: _bindgen_ty_4 = _bindgen_ty_4(2);
/// Move.
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub const UI_MOUSE_EVENT_ACTION_MOVE: _bindgen_ty_4 = _bindgen_ty_4(3);
#[repr(transparent)]
/** @brief Define the Action Code for mouse events.
@since 12*/
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
#[derive(Clone, Hash, PartialEq, Eq)]
pub struct _bindgen_ty_4(pub ::core::ffi::c_uint);
/// None.
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub const UI_MOUSE_EVENT_BUTTON_NONE: _bindgen_ty_5 = _bindgen_ty_5(0);
/// Left.
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub const UI_MOUSE_EVENT_BUTTON_LEFT: _bindgen_ty_5 = _bindgen_ty_5(1);
/// Right.
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub const UI_MOUSE_EVENT_BUTTON_RIGHT: _bindgen_ty_5 = _bindgen_ty_5(2);
/// Middle.
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub const UI_MOUSE_EVENT_BUTTON_MIDDLE: _bindgen_ty_5 = _bindgen_ty_5(3);
/// Back.
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub const UI_MOUSE_EVENT_BUTTON_BACK: _bindgen_ty_5 = _bindgen_ty_5(4);
/// Forward.
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub const UI_MOUSE_EVENT_BUTTON_FORWARD: _bindgen_ty_5 = _bindgen_ty_5(5);
#[repr(transparent)]
/** @brief Define the button type for mouse events.
@since 12*/
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
#[derive(Clone, Hash, PartialEq, Eq)]
pub struct _bindgen_ty_5(pub ::core::ffi::c_uint);
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ModifierKeyName {
/// Ctrl.
pub const ARKUI_MODIFIER_KEY_CTRL: ArkUI_ModifierKeyName = ArkUI_ModifierKeyName(1);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ModifierKeyName {
/// Shift.
pub const ARKUI_MODIFIER_KEY_SHIFT: ArkUI_ModifierKeyName = ArkUI_ModifierKeyName(2);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ModifierKeyName {
/// Alt.
pub const ARKUI_MODIFIER_KEY_ALT: ArkUI_ModifierKeyName = ArkUI_ModifierKeyName(4);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ModifierKeyName {
/// Fn.
pub const ARKUI_MODIFIER_KEY_FN: ArkUI_ModifierKeyName = ArkUI_ModifierKeyName(8);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+impl ::core::ops::BitOr for ArkUI_ModifierKeyName {
+ type Output = Self;
+ #[inline]
+ fn bitor(self, other: Self) -> Self {
+ ArkUI_ModifierKeyName(self.0 | other.0)
+ }
+}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+impl ::core::ops::BitOrAssign for ArkUI_ModifierKeyName {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: ArkUI_ModifierKeyName) {
+ self.0 |= rhs.0;
+ }
+}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+impl ::core::ops::BitAnd for ArkUI_ModifierKeyName {
+ type Output = Self;
+ #[inline]
+ fn bitand(self, other: Self) -> Self {
+ ArkUI_ModifierKeyName(self.0 & other.0)
+ }
+}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+impl ::core::ops::BitAndAssign for ArkUI_ModifierKeyName {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: ArkUI_ModifierKeyName) {
+ self.0 &= rhs.0;
+ }
+}
#[repr(transparent)]
/** @brief Defines an enum for modifier keys.
@since 12*/
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
#[derive(Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_ModifierKeyName(pub ::core::ffi::c_uint);
extern "C" {
@@ -158,30 +278,40 @@ extern "C" {
@param event Indicates the pointer to the current UI input event.
@return Returns the type of the current UI input event; returns 0 if any parameter error occurs.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_UIInputEvent_GetType(event: *const ArkUI_UIInputEvent) -> i32;
/** @brief Obtains the action type of this UI input event.
@param event Indicates the pointer to the current UI input event.
@return Returns the action type of the current UI input event; returns 0 if any parameter error occurs.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_UIInputEvent_GetAction(event: *const ArkUI_UIInputEvent) -> i32;
/** @brief Obtains the source type of this UI input event.
@param event Indicates the pointer to the current UI input event.
@return Returns the source type of the current UI input event.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_UIInputEvent_GetSourceType(event: *const ArkUI_UIInputEvent) -> i32;
/** @brief Obtains the tool type of this UI input event.
@param event Indicates the pointer to the current UI input event.
@return Returns the tool type of the current UI input event.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_UIInputEvent_GetToolType(event: *const ArkUI_UIInputEvent) -> i32;
/** @brief Obtains the time when this UI input event occurs.
@param event Indicates the pointer to the current UI input event.
@return Returns the time when the UI input event occurs; returns 0 if any parameter error occurs.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_UIInputEvent_GetEventTime(event: *const ArkUI_UIInputEvent) -> i64;
/** @brief Obtains the number of touch points from a directional input event (such as a touch event, mouse event,
or axis event).
@@ -189,6 +319,8 @@ extern "C" {
@param event Indicates the pointer to the current UI input event.
@return Returns the number of touch points for the directional input event.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_PointerEvent_GetPointerCount(event: *const ArkUI_UIInputEvent) -> u32;
/** @brief Obtains the ID of a touch point from a directional input event (such as a touch event, mouse event,
or axis event).
@@ -197,6 +329,8 @@ extern "C" {
@param pointerIndex Indicates the index of the target touch point in the multi-touch data list.
@return Returns the ID of the corresponding touch point.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_PointerEvent_GetPointerId(
event: *const ArkUI_UIInputEvent,
pointerIndex: u32,
@@ -208,6 +342,8 @@ extern "C" {
@return Returns the X coordinate relative to the upper left corner of the current component;
returns 0 if any parameter error occurs.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_PointerEvent_GetX(event: *const ArkUI_UIInputEvent) -> f32;
/** @brief Obtains the X coordinate of a specific touch point relative to the upper left corner of the current component
from a directional input event (such as a touch event, mouse event, or axis event).
@@ -217,6 +353,8 @@ extern "C" {
@return Returns the X coordinate relative to the upper left corner of the current component;
returns 0.0f if any parameter error occurs.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_PointerEvent_GetXByIndex(
event: *const ArkUI_UIInputEvent,
pointerIndex: u32,
@@ -228,6 +366,8 @@ extern "C" {
@return Returns the Y coordinate relative to the upper left corner of the current component;
returns 0 if any parameter error occurs.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_PointerEvent_GetY(event: *const ArkUI_UIInputEvent) -> f32;
/** @brief Obtains the Y coordinate of a specific touch point relative to the upper left corner of the current component
from a directional input event (such as a touch event, mouse event, or axis event).
@@ -237,6 +377,8 @@ extern "C" {
@return Returns the Y coordinate relative to the upper left corner of the current component;
returns 0.0f if any parameter error occurs.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_PointerEvent_GetYByIndex(
event: *const ArkUI_UIInputEvent,
pointerIndex: u32,
@@ -248,6 +390,8 @@ extern "C" {
@return Returns the X coordinate relative to the upper left corner of the current application window;
returns 0 if any parameter error occurs.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_PointerEvent_GetWindowX(event: *const ArkUI_UIInputEvent) -> f32;
/** @brief Obtains the X coordinate of a specific touch point relative to the upper left corner of the current
application window from a directional input event (such as a touch event, mouse event, or axis event).
@@ -257,6 +401,8 @@ extern "C" {
@return Returns the X coordinate relative to the upper left corner of the current application window;
returns 0.0f if any parameter error occurs.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_PointerEvent_GetWindowXByIndex(
event: *const ArkUI_UIInputEvent,
pointerIndex: u32,
@@ -268,6 +414,8 @@ extern "C" {
@return Returns the Y coordinate relative to the upper left corner of the current application window;
returns 0 if any parameter error occurs.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_PointerEvent_GetWindowY(event: *const ArkUI_UIInputEvent) -> f32;
/** @brief Obtains the Y coordinate of a specific touch point relative to the upper left corner of the current
application window from a directional input event (such as a touch event, mouse event, or axis event).
@@ -277,6 +425,8 @@ extern "C" {
@return Returns the Y coordinate relative to the upper left corner of the current application window;
returns 0.0f if any parameter error occurs.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_PointerEvent_GetWindowYByIndex(
event: *const ArkUI_UIInputEvent,
pointerIndex: u32,
@@ -288,6 +438,8 @@ extern "C" {
@return Returns the X coordinate relative to the upper left corner of the current screen;
returns 0 if any parameter error occurs.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_PointerEvent_GetDisplayX(event: *const ArkUI_UIInputEvent) -> f32;
/** @brief Obtains the X coordinate of a specific touch point relative to the upper left corner of the current screen
from a directional input event (such as a touch event, mouse event, or axis event).
@@ -297,6 +449,8 @@ extern "C" {
@return Returns the X coordinate relative to the upper left corner of the current screen;
returns 0.0f if any parameter error occurs.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_PointerEvent_GetDisplayXByIndex(
event: *const ArkUI_UIInputEvent,
pointerIndex: u32,
@@ -308,6 +462,8 @@ extern "C" {
@return Returns the Y coordinate relative to the upper left corner of the current screen;
returns 0 if any parameter error occurs.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_PointerEvent_GetDisplayY(event: *const ArkUI_UIInputEvent) -> f32;
/** @brief Obtains the Y coordinate of a specific touch point relative to the upper left corner of the current screen
from a directional input event (such as a touch event, mouse event, or axis event).
@@ -317,6 +473,8 @@ extern "C" {
@return Returns the Y coordinate relative to the upper left corner of the current screen;
returns 0.0f if any parameter error occurs.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_PointerEvent_GetDisplayYByIndex(
event: *const ArkUI_UIInputEvent,
pointerIndex: u32,
@@ -327,6 +485,8 @@ extern "C" {
@param pointerIndex Indicates the index of the target touch point in the multi-touch data list.
@return Returns the pressure applied to the touchscreen; returns 0.0f if any parameter error occurs.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_PointerEvent_GetPressure(
event: *const ArkUI_UIInputEvent,
pointerIndex: u32,
@@ -338,6 +498,8 @@ extern "C" {
@param pointerIndex Indicates the index of the target touch point in the multi-touch data list.
@return Returns the angle relative to the YZ plane.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_PointerEvent_GetTiltX(
event: *const ArkUI_UIInputEvent,
pointerIndex: u32,
@@ -349,6 +511,8 @@ extern "C" {
@param pointerIndex Indicates the index of the target touch point in the multi-touch data list.
@return Returns the angle relative to the XZ plane.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_PointerEvent_GetTiltY(
event: *const ArkUI_UIInputEvent,
pointerIndex: u32,
@@ -359,6 +523,8 @@ extern "C" {
@param pointerIndex Indicates the index of the target touch point in the multi-touch data list.
@return Returns the width of the touch area.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_PointerEvent_GetTouchAreaWidth(
event: *const ArkUI_UIInputEvent,
pointerIndex: u32,
@@ -369,6 +535,8 @@ extern "C" {
@param pointerIndex Indicates the index of the target touch point in the multi-touch data list.
@return Returns the height of the touch area.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_PointerEvent_GetTouchAreaHeight(
event: *const ArkUI_UIInputEvent,
pointerIndex: u32,
@@ -379,6 +547,8 @@ extern "C" {
@param event Indicates the pointer to the current UI input event.
@return Returns the number of historical events.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_PointerEvent_GetHistorySize(event: *const ArkUI_UIInputEvent) -> u32;
/** @brief Obtains the occurrence time of a historical event from a directional input event (such as a touch event,
mouse event, or axis event).
@@ -387,6 +557,8 @@ extern "C" {
@param historyIndex Indicates the index of the target historical event.
@return Returns the time when the UI input event occurs; returns 0 if any parameter error occurs.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_PointerEvent_GetHistoryEventTime(
event: *const ArkUI_UIInputEvent,
historyIndex: u32,
@@ -398,6 +570,8 @@ extern "C" {
@param historyIndex Indicates the index of the target historical event.
@return Returns the number of touch points in the specified historical event
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_PointerEvent_GetHistoryPointerCount(
event: *const ArkUI_UIInputEvent,
historyIndex: u32,
@@ -410,6 +584,8 @@ extern "C" {
@param historyIndex Indicates the index of the target historical event.
@return Returns the ID of the corresponding touch point in the specified historical event.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_PointerEvent_GetHistoryPointerId(
event: *const ArkUI_UIInputEvent,
pointerIndex: u32,
@@ -424,6 +600,8 @@ extern "C" {
@return Returns the X coordinate relative to the upper left corner of the current component;
returns 0.0f if any parameter error occurs.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_PointerEvent_GetHistoryX(
event: *const ArkUI_UIInputEvent,
pointerIndex: u32,
@@ -438,6 +616,8 @@ extern "C" {
@return Returns the Y coordinate relative to the upper left corner of the current component;
returns 0.0f if any parameter error occurs.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_PointerEvent_GetHistoryY(
event: *const ArkUI_UIInputEvent,
pointerIndex: u32,
@@ -452,6 +632,8 @@ extern "C" {
@return Returns the X coordinate relative to the upper left corner of the current application window;
returns 0.0f if any parameter error occurs.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_PointerEvent_GetHistoryWindowX(
event: *const ArkUI_UIInputEvent,
pointerIndex: u32,
@@ -466,6 +648,8 @@ extern "C" {
@return Returns the Y coordinate relative to the upper left corner of the current application window;
returns 0.0f if any parameter error occurs.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_PointerEvent_GetHistoryWindowY(
event: *const ArkUI_UIInputEvent,
pointerIndex: u32,
@@ -480,6 +664,8 @@ extern "C" {
@return Returns the X coordinate relative to the upper left corner of the current screen;
returns 0.0f if any parameter error occurs.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_PointerEvent_GetHistoryDisplayX(
event: *const ArkUI_UIInputEvent,
pointerIndex: u32,
@@ -494,6 +680,8 @@ extern "C" {
@return Returns the Y coordinate relative to the upper left corner of the current screen;
returns 0.0f if any parameter error occurs.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_PointerEvent_GetHistoryDisplayY(
event: *const ArkUI_UIInputEvent,
pointerIndex: u32,
@@ -507,6 +695,8 @@ extern "C" {
@param historyIndex Indicates the index of the target historical event.
@return Returns the pressure applied to the touchscreen; returns 0.0f if any parameter error occurs.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_PointerEvent_GetHistoryPressure(
event: *const ArkUI_UIInputEvent,
pointerIndex: u32,
@@ -520,6 +710,8 @@ extern "C" {
@param historyIndex Indicates the index of the target historical event.
@return Returns the angle relative to the YZ plane.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_PointerEvent_GetHistoryTiltX(
event: *const ArkUI_UIInputEvent,
pointerIndex: u32,
@@ -533,6 +725,8 @@ extern "C" {
@param historyIndex Indicates the index of the target historical event.
@return Returns the angle relative to the XZ plane.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_PointerEvent_GetHistoryTiltY(
event: *const ArkUI_UIInputEvent,
pointerIndex: u32,
@@ -546,6 +740,8 @@ extern "C" {
@param historyIndex Indicates the index of the target historical event.
@return Returns the width of the touch area.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_PointerEvent_GetHistoryTouchAreaWidth(
event: *const ArkUI_UIInputEvent,
pointerIndex: u32,
@@ -559,6 +755,8 @@ extern "C" {
@param historyIndex Indicates the index of the target historical event.
@return Returns the height of the touch area.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_PointerEvent_GetHistoryTouchAreaHeight(
event: *const ArkUI_UIInputEvent,
pointerIndex: u32,
@@ -570,6 +768,8 @@ extern "C" {
@return Returns the value of the vertical scroll axis of the current axis event;
returns 0 if any parameter error occurs.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_AxisEvent_GetVerticalAxisValue(event: *const ArkUI_UIInputEvent) -> f64;
/** @brief Obtains the value of the horizontal scroll axis for this axis event.
@@ -577,6 +777,8 @@ extern "C" {
@return Returns the value of the horizontal scroll axis of the current axis event;
returns 0 if any parameter error occurs.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_AxisEvent_GetHorizontalAxisValue(event: *const ArkUI_UIInputEvent) -> f64;
/** @brief Obtains the scale value of the pinch axis for this axis event.
@@ -584,6 +786,8 @@ extern "C" {
@return Returns the scale value of the pinch axis of the current axis event;
returns 0 if any parameter error occurs.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_AxisEvent_GetPinchAxisScaleValue(event: *const ArkUI_UIInputEvent) -> f64;
/** @brief Sets how the component behaves during hit testing.
@@ -591,6 +795,8 @@ extern "C" {
@param mode Indicates how the component behaves during hit testing. The parameter type is {@link HitTestMode}.
@return Returns the status code of the execution.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_PointerEvent_SetInterceptHitTestMode(
event: *const ArkUI_UIInputEvent,
mode: HitTestMode,
@@ -601,6 +807,8 @@ extern "C" {
@return Return to the mouse button type, where 1 is the left button, 2 is the right button,
3 is the middle button, 4 is the back button, and 5 is the forward button.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_MouseEvent_GetMouseButton(event: *const ArkUI_UIInputEvent) -> i32;
/** @brief Get the value of the mouse action type for mouse events.
@@ -608,6 +816,8 @@ extern "C" {
@return Returns the type of mouse action, where 1 represents button pressed,
2 represents button released, and 3 represents mouse movement.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_MouseEvent_GetMouseAction(event: *const ArkUI_UIInputEvent) -> i32;
/** @brief Sets whether to prevent event bubbling.
@@ -617,6 +827,8 @@ extern "C" {
If 401 is returned, the execution fails.
The possible cause of the failure is that the event parameter is abnormal, such as a null pointer.
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_PointerEvent_SetStopPropagation(
event: *const ArkUI_UIInputEvent,
stopPropagation: bool,
diff --git a/components/deviceinfo/CHANGELOG.md b/components/deviceinfo/CHANGELOG.md
new file mode 100644
index 0000000..d56fe18
--- /dev/null
+++ b/components/deviceinfo/CHANGELOG.md
@@ -0,0 +1,4 @@
+# 0.1.1 (2024-12-26)
+
+- Regenerated the bindings with new generator (no user visible changes)
+
diff --git a/components/deviceinfo/Cargo.toml b/components/deviceinfo/Cargo.toml
index 0410aea..44f0fb6 100644
--- a/components/deviceinfo/Cargo.toml
+++ b/components/deviceinfo/Cargo.toml
@@ -1,12 +1,11 @@
[package]
name = "ohos-deviceinfo-sys"
-version = "0.1.0"
+version = "0.1.1"
edition = "2021"
description = "Bindings to OpenHarmony OS APIs providing information about the device"
license = "Apache-2.0"
repository = "https://github.com/openharmony-rs/ohos-sys"
keywords = ["OpenHarmony", "HarmonyOS", "ffi", "device"]
-exclude = ["src/api11.rs", "src/api12.rs"]
[dependencies]
document-features = { version = "0.2", optional = true }
diff --git a/components/deviceinfo/src/deviceinfo_api10.rs b/components/deviceinfo/src/deviceinfo_api10.rs
deleted file mode 100644
index cf35272..0000000
--- a/components/deviceinfo/src/deviceinfo_api10.rs
+++ /dev/null
@@ -1,127 +0,0 @@
-/* automatically generated by rust-bindgen 0.69.4 */
-
-#![allow(non_upper_case_globals)]
-#![allow(non_camel_case_types)]
-#![allow(non_snake_case)]
-
-extern "C" {
- /** Obtains the device type represented by a string,
- which can be {@code phone} (or {@code default} for phones), {@code wearable}, {@code liteWearable},
- {@code tablet}, {@code tv}, {@code car}, or {@code smartVision}.
- @syscap SystemCapability.Startup.SystemInfo
- @since 10*/
- pub fn OH_GetDeviceType() -> *const ::core::ffi::c_char;
- /** Obtains the device manufacturer represented by a string.
- @syscap SystemCapability.Startup.SystemInfo
- @since 10*/
- pub fn OH_GetManufacture() -> *const ::core::ffi::c_char;
- /** Obtains the device brand represented by a string.
- @syscap SystemCapability.Startup.SystemInfo
- @since 10*/
- pub fn OH_GetBrand() -> *const ::core::ffi::c_char;
- /** Obtains the product name speaded in the market
- @syscap SystemCapability.Startup.SystemInfo
- @since 10*/
- pub fn OH_GetMarketName() -> *const ::core::ffi::c_char;
- /** Obtains the product series represented by a string.
- @syscap SystemCapability.Startup.SystemInfo
- @since 10*/
- pub fn OH_GetProductSeries() -> *const ::core::ffi::c_char;
- /** Obtains the product model represented by a string.
- @syscap SystemCapability.Startup.SystemInfo
- @since 10*/
- pub fn OH_GetProductModel() -> *const ::core::ffi::c_char;
- /** Obtains the software model represented by a string.
- @syscap SystemCapability.Startup.SystemInfo
- @since 10*/
- pub fn OH_GetSoftwareModel() -> *const ::core::ffi::c_char;
- /** Obtains the hardware model represented by a string.
- @syscap SystemCapability.Startup.SystemInfo
- @since 10*/
- pub fn OH_GetHardwareModel() -> *const ::core::ffi::c_char;
- /** Obtains the bootloader version number represented by a string.
- @syscap SystemCapability.Startup.SystemInfo
- @since 10*/
- pub fn OH_GetBootloaderVersion() -> *const ::core::ffi::c_char;
- /** Obtains the application binary interface (Abi) list represented by a string.
- @syscap SystemCapability.Startup.SystemInfo
- @since 10*/
- pub fn OH_GetAbiList() -> *const ::core::ffi::c_char;
- /** Obtains the security patch tag represented by a string.
- @syscap SystemCapability.Startup.SystemInfo
- @since 10*/
- pub fn OH_GetSecurityPatchTag() -> *const ::core::ffi::c_char;
- /** Obtains the product version displayed for customer represented by a string.
- @syscap SystemCapability.Startup.SystemInfo
- @since 10*/
- pub fn OH_GetDisplayVersion() -> *const ::core::ffi::c_char;
- /** Obtains the incremental version represented by a string.
- @syscap SystemCapability.Startup.SystemInfo
- @since 10*/
- pub fn OH_GetIncrementalVersion() -> *const ::core::ffi::c_char;
- /** Obtains the OS release type represented by a string.
-
-
The OS release category can be {@code Release}, {@code Beta}, or {@code Canary}.
- The specific release type may be {@code Release}, {@code Beta1}, or others alike.
- @syscap SystemCapability.Startup.SystemInfo
- @since 10*/
- pub fn OH_GetOsReleaseType() -> *const ::core::ffi::c_char;
- /** Obtains the OS full version name represented by a string.
- @syscap SystemCapability.Startup.SystemInfo
- @since 10*/
- pub fn OH_GetOSFullName() -> *const ::core::ffi::c_char;
- /** Obtains the SDK API version number.
- @syscap SystemCapability.Startup.SystemInfo
- @since 10*/
- pub fn OH_GetSdkApiVersion() -> ::core::ffi::c_int;
- /** Obtains the first API version number.
- @syscap SystemCapability.Startup.SystemInfo
- @since 10*/
- pub fn OH_GetFirstApiVersion() -> ::core::ffi::c_int;
- /** Obtains the version ID by a string.
- @syscap SystemCapability.Startup.SystemInfo
- @since 10*/
- pub fn OH_GetVersionId() -> *const ::core::ffi::c_char;
- /** Obtains the build type of the current running OS.
- @syscap SystemCapability.Startup.SystemInfo
- @since 10*/
- pub fn OH_GetBuildType() -> *const ::core::ffi::c_char;
- /** Obtains the build user of the current running OS.
- @syscap SystemCapability.Startup.SystemInfo
- @since 10*/
- pub fn OH_GetBuildUser() -> *const ::core::ffi::c_char;
- /** Obtains the build host of the current running OS.
- @syscap SystemCapability.Startup.SystemInfo
- @since 10*/
- pub fn OH_GetBuildHost() -> *const ::core::ffi::c_char;
- /** Obtains the build time of the current running OS.
- @syscap SystemCapability.Startup.SystemInfo
- @since 10*/
- pub fn OH_GetBuildTime() -> *const ::core::ffi::c_char;
- /** Obtains the version hash of the current running OS.
- @syscap SystemCapability.Startup.SystemInfo
- @since 10*/
- pub fn OH_GetBuildRootHash() -> *const ::core::ffi::c_char;
- /** Obtains the Distribution OS name represented by a string.
-
-
Independent Software Vendor (ISV) may distribute OHOS with their own OS name.
- If ISV not specified, it will return an empty string
- @syscap SystemCapability.Startup.SystemInfo
- @since 10*/
- pub fn OH_GetDistributionOSName() -> *const ::core::ffi::c_char;
- /** Obtains the ISV distribution OS version represented by a string.
- If ISV not specified, it will return the same value as OH_GetOSFullName
- @syscap SystemCapability.Startup.SystemInfo
- @since 10*/
- pub fn OH_GetDistributionOSVersion() -> *const ::core::ffi::c_char;
- /** Obtains the ISV distribution OS api version represented by a integer.
- If ISV not specified, it will return the same value as OH_GetSdkApiVersion
- @syscap SystemCapability.Startup.SystemInfo
- @since 10*/
- pub fn OH_GetDistributionOSApiVersion() -> ::core::ffi::c_int;
- /** Obtains the ISV distribution OS release type represented by a string.
- If ISV not specified, it will return the same value as OH_GetOsReleaseType
- @syscap SystemCapability.Startup.SystemInfo
- @since 10*/
- pub fn OH_GetDistributionOSReleaseType() -> *const ::core::ffi::c_char;
-}
diff --git a/components/deviceinfo/src/deviceinfo_api12.rs b/components/deviceinfo/src/deviceinfo_api12.rs
deleted file mode 100644
index b626b98..0000000
--- a/components/deviceinfo/src/deviceinfo_api12.rs
+++ /dev/null
@@ -1,127 +0,0 @@
-/* automatically generated by rust-bindgen 0.70.1 */
-
-#![allow(non_upper_case_globals)]
-#![allow(non_camel_case_types)]
-#![allow(non_snake_case)]
-
-extern "C" {
- /** Obtains the device type represented by a string,
- which can be {@code phone} (or {@code default} for phones), {@code wearable}, {@code liteWearable},
- {@code tablet}, {@code tv}, {@code car}, or {@code smartVision}.
- @syscap SystemCapability.Startup.SystemInfo
- @since 10*/
- pub fn OH_GetDeviceType() -> *const ::core::ffi::c_char;
- /** Obtains the device manufacturer represented by a string.
- @syscap SystemCapability.Startup.SystemInfo
- @since 10*/
- pub fn OH_GetManufacture() -> *const ::core::ffi::c_char;
- /** Obtains the device brand represented by a string.
- @syscap SystemCapability.Startup.SystemInfo
- @since 10*/
- pub fn OH_GetBrand() -> *const ::core::ffi::c_char;
- /** Obtains the product name speaded in the market
- @syscap SystemCapability.Startup.SystemInfo
- @since 10*/
- pub fn OH_GetMarketName() -> *const ::core::ffi::c_char;
- /** Obtains the product series represented by a string.
- @syscap SystemCapability.Startup.SystemInfo
- @since 10*/
- pub fn OH_GetProductSeries() -> *const ::core::ffi::c_char;
- /** Obtains the product model represented by a string.
- @syscap SystemCapability.Startup.SystemInfo
- @since 10*/
- pub fn OH_GetProductModel() -> *const ::core::ffi::c_char;
- /** Obtains the software model represented by a string.
- @syscap SystemCapability.Startup.SystemInfo
- @since 10*/
- pub fn OH_GetSoftwareModel() -> *const ::core::ffi::c_char;
- /** Obtains the hardware model represented by a string.
- @syscap SystemCapability.Startup.SystemInfo
- @since 10*/
- pub fn OH_GetHardwareModel() -> *const ::core::ffi::c_char;
- /** Obtains the bootloader version number represented by a string.
- @syscap SystemCapability.Startup.SystemInfo
- @since 10*/
- pub fn OH_GetBootloaderVersion() -> *const ::core::ffi::c_char;
- /** Obtains the application binary interface (Abi) list represented by a string.
- @syscap SystemCapability.Startup.SystemInfo
- @since 10*/
- pub fn OH_GetAbiList() -> *const ::core::ffi::c_char;
- /** Obtains the security patch tag represented by a string.
- @syscap SystemCapability.Startup.SystemInfo
- @since 10*/
- pub fn OH_GetSecurityPatchTag() -> *const ::core::ffi::c_char;
- /** Obtains the product version displayed for customer represented by a string.
- @syscap SystemCapability.Startup.SystemInfo
- @since 10*/
- pub fn OH_GetDisplayVersion() -> *const ::core::ffi::c_char;
- /** Obtains the incremental version represented by a string.
- @syscap SystemCapability.Startup.SystemInfo
- @since 10*/
- pub fn OH_GetIncrementalVersion() -> *const ::core::ffi::c_char;
- /** Obtains the OS release type represented by a string.
-
-
The OS release category can be {@code Release}, {@code Beta}, or {@code Canary}.
- The specific release type may be {@code Release}, {@code Beta1}, or others alike.
- @syscap SystemCapability.Startup.SystemInfo
- @since 10*/
- pub fn OH_GetOsReleaseType() -> *const ::core::ffi::c_char;
- /** Obtains the OS full version name represented by a string.
- @syscap SystemCapability.Startup.SystemInfo
- @since 10*/
- pub fn OH_GetOSFullName() -> *const ::core::ffi::c_char;
- /** Obtains the SDK API version number.
- @syscap SystemCapability.Startup.SystemInfo
- @since 10*/
- pub fn OH_GetSdkApiVersion() -> ::core::ffi::c_int;
- /** Obtains the first API version number.
- @syscap SystemCapability.Startup.SystemInfo
- @since 10*/
- pub fn OH_GetFirstApiVersion() -> ::core::ffi::c_int;
- /** Obtains the version ID by a string.
- @syscap SystemCapability.Startup.SystemInfo
- @since 10*/
- pub fn OH_GetVersionId() -> *const ::core::ffi::c_char;
- /** Obtains the build type of the current running OS.
- @syscap SystemCapability.Startup.SystemInfo
- @since 10*/
- pub fn OH_GetBuildType() -> *const ::core::ffi::c_char;
- /** Obtains the build user of the current running OS.
- @syscap SystemCapability.Startup.SystemInfo
- @since 10*/
- pub fn OH_GetBuildUser() -> *const ::core::ffi::c_char;
- /** Obtains the build host of the current running OS.
- @syscap SystemCapability.Startup.SystemInfo
- @since 10*/
- pub fn OH_GetBuildHost() -> *const ::core::ffi::c_char;
- /** Obtains the build time of the current running OS.
- @syscap SystemCapability.Startup.SystemInfo
- @since 10*/
- pub fn OH_GetBuildTime() -> *const ::core::ffi::c_char;
- /** Obtains the version hash of the current running OS.
- @syscap SystemCapability.Startup.SystemInfo
- @since 10*/
- pub fn OH_GetBuildRootHash() -> *const ::core::ffi::c_char;
- /** Obtains the Distribution OS name represented by a string.
-
-
Independent Software Vendor (ISV) may distribute OHOS with their own OS name.
- If ISV not specified, it will return an empty string
- @syscap SystemCapability.Startup.SystemInfo
- @since 10*/
- pub fn OH_GetDistributionOSName() -> *const ::core::ffi::c_char;
- /** Obtains the ISV distribution OS version represented by a string.
- If ISV not specified, it will return the same value as OH_GetOSFullName
- @syscap SystemCapability.Startup.SystemInfo
- @since 10*/
- pub fn OH_GetDistributionOSVersion() -> *const ::core::ffi::c_char;
- /** Obtains the ISV distribution OS api version represented by a integer.
- If ISV not specified, it will return the same value as OH_GetSdkApiVersion
- @syscap SystemCapability.Startup.SystemInfo
- @since 10*/
- pub fn OH_GetDistributionOSApiVersion() -> ::core::ffi::c_int;
- /** Obtains the ISV distribution OS release type represented by a string.
- If ISV not specified, it will return the same value as OH_GetOsReleaseType
- @syscap SystemCapability.Startup.SystemInfo
- @since 10*/
- pub fn OH_GetDistributionOSReleaseType() -> *const ::core::ffi::c_char;
-}
diff --git a/components/deviceinfo/src/deviceinfo_api11.rs b/components/deviceinfo/src/deviceinfo_ffi.rs
similarity index 99%
rename from components/deviceinfo/src/deviceinfo_api11.rs
rename to components/deviceinfo/src/deviceinfo_ffi.rs
index cf35272..da571ca 100644
--- a/components/deviceinfo/src/deviceinfo_api11.rs
+++ b/components/deviceinfo/src/deviceinfo_ffi.rs
@@ -1,4 +1,4 @@
-/* automatically generated by rust-bindgen 0.69.4 */
+/* automatically generated by rust-bindgen 0.71.1 */
#![allow(non_upper_case_globals)]
#![allow(non_camel_case_types)]
diff --git a/components/deviceinfo/src/lib.rs b/components/deviceinfo/src/lib.rs
index fa589e6..159d629 100644
--- a/components/deviceinfo/src/lib.rs
+++ b/components/deviceinfo/src/lib.rs
@@ -1,6 +1,4 @@
//! OpenHarmony functions providing device information.
-mod deviceinfo_api10;
-pub use deviceinfo_api10::*;
-
-// Note: API level 11 and 12 provide no additions or changes.
+mod deviceinfo_ffi;
+pub use deviceinfo_ffi::*;
diff --git a/components/hilog/src/CHANGELOG.md b/components/hilog/CHANGELOG.md
similarity index 66%
rename from components/hilog/src/CHANGELOG.md
rename to components/hilog/CHANGELOG.md
index 18f1e19..2cbad06 100644
--- a/components/hilog/src/CHANGELOG.md
+++ b/components/hilog/CHANGELOG.md
@@ -1,3 +1,7 @@
+## 0.1.3 (2024-12-26)
+
+- Regenerated the bindings with new generator (Should have no user visible changes)
+
## v0.1.2 (2024-10-03)
- Add API-level 11 additions (feature `api-11`)
diff --git a/components/hilog/Cargo.toml b/components/hilog/Cargo.toml
index 0228a58..41a61bb 100644
--- a/components/hilog/Cargo.toml
+++ b/components/hilog/Cargo.toml
@@ -1,12 +1,11 @@
[package]
name = "hilog-sys"
-version = "0.1.2"
+version = "0.1.3"
edition = "2021"
keywords = ["OpenHarmony", "HarmonyOS", "hilog", "log"]
description = "Rust bindings to the HiLog logging system of OpenHarmony"
repository = "https://github.com/openharmony-rs/ohos-sys"
license = "Apache-2.0"
-exclude = ["src/hilog_api11.rs", "src/hilog_api12.rs"]
[dependencies]
document-features = { version = "0.2", optional = true }
diff --git a/components/hilog/src/api11_additions.rs b/components/hilog/src/api11_additions.rs
deleted file mode 100644
index a85417d..0000000
--- a/components/hilog/src/api11_additions.rs
+++ /dev/null
@@ -1,37 +0,0 @@
-#![allow(non_upper_case_globals)]
-#![allow(non_camel_case_types)]
-#![allow(non_snake_case)]
-
-use super::{LogLevel, LogType};
-
-/** @brief Defines the function pointer type for the user-defined log processing function.
-
-@param type Indicates the log type. The type for third-party applications is defined by {@link LOG_APP}.
-@param level Indicates the log level, which can be LOG_DEBUG, LOG_INFO, LOG_WARN,
-LOG_ERROR, and LOG_FATAL.
-@param domain Indicates the service domain of logs. Its value is a hexadecimal integer ranging from 0x0 to 0xFFFF.
-@param tag Indicates the log tag, which is a string used to identify the class, file, or service behavior.
-@param msg Indicates the log message itself, which is a formatted log string.
-@since 11*/
-pub type LogCallback = ::core::option::Option<
- unsafe extern "C" fn(
- type_: LogType,
- level: LogLevel,
- domain: ::core::ffi::c_uint,
- tag: *const ::core::ffi::c_char,
- msg: *const ::core::ffi::c_char,
- ),
->;
-extern "C" {
- /** @brief Set the user-defined log processing function.
-
- After calling this function, the callback function implemented by the user can receive all hilogs of the
- current process.
- Note that it will not change the default behavior of hilog logs of the current process, no matter whether this
- interface is called or not. \n
-
- @param callback Indicates the callback function implemented by the user. If you do not need to process hilog logs,
- you can transfer a null pointer.
- @since 11*/
- pub fn OH_LOG_SetCallback(callback: LogCallback);
-}
diff --git a/components/hilog/src/hilog_api10.rs b/components/hilog/src/hilog_api10.rs
deleted file mode 100644
index 15ef8eb..0000000
--- a/components/hilog/src/hilog_api10.rs
+++ /dev/null
@@ -1,95 +0,0 @@
-/* automatically generated by rust-bindgen 0.70.1 */
-
-#![allow(non_upper_case_globals)]
-#![allow(non_camel_case_types)]
-#![allow(non_snake_case)]
-
-impl LogType {
- /// Third-party application logs
- pub const LOG_APP: LogType = LogType(0);
-}
-#[repr(transparent)]
-/** @brief Enumerates log types.
-
-Currently, LOG_APP is available. \n
-
-@since 8*/
-#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
-pub struct LogType(pub ::core::ffi::c_uint);
-impl LogLevel {
- /// Debug level to be used by {@link OH_LOG_DEBUG}
- pub const LOG_DEBUG: LogLevel = LogLevel(3);
-}
-impl LogLevel {
- /// Informational level to be used by {@link OH_LOG_INFO}
- pub const LOG_INFO: LogLevel = LogLevel(4);
-}
-impl LogLevel {
- /// Warning level to be used by {@link OH_LOG_WARN}
- pub const LOG_WARN: LogLevel = LogLevel(5);
-}
-impl LogLevel {
- /// Error level to be used by {@link OH_LOG_ERROR}
- pub const LOG_ERROR: LogLevel = LogLevel(6);
-}
-impl LogLevel {
- /// Fatal level to be used by {@link OH_LOG_FATAL}
- pub const LOG_FATAL: LogLevel = LogLevel(7);
-}
-#[repr(transparent)]
-/** @brief Enumerates log levels.
-
-You are advised to select log levels based on their respective usage scenarios:\n
-
DEBUG: used for debugging and disabled from commercial releases
\n
-
INFO: used for logging important system running status and steps in key processes
\n
-
WARN: used for logging unexpected exceptions that have little impact on user experience and can
-automatically recover. Logs at this level are generally output when such exceptions are detected and
-captured.
\n
-
ERROR: used for logging malfunction that affects user experience and cannot automatically
-recover
\n
-
FATAL: used for logging major exceptions that have severely affected user experience and should
-not occur.
\n
-
-@since 8*/
-#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
-pub struct LogLevel(pub ::core::ffi::c_uint);
-extern "C" {
- /** @brief Outputs logs.
-
- You can use this function to output logs based on the specified log type, log level, service domain, log tag,
- and variable parameters determined by the format specifier and privacy identifier in the printf format.
-
- @param type Indicates the log type. The type for third-party applications is defined by {@link LOG_APP}.
- @param level Indicates the log level, which can be LOG_DEBUG, LOG_INFO, LOG_WARN,
- LOG_ERROR, and LOG_FATAL.
- @param domain Indicates the service domain of logs. Its value is a hexadecimal integer ranging from 0x0 to 0xFFFF.
- @param tag Indicates the log tag, which is a string used to identify the class, file, or service behavior.
- @param fmt Indicates the format string, which is an enhancement of a printf format string and supports the privacy
- identifier. Specifically, {public} or {private} is added between the % character and the format specifier
- in each parameter. \n
- @param ... Indicates a list of parameters. The number and type of parameters must map onto the format specifiers
- in the format string.
- @return Returns 0 or a larger value if the operation is successful; returns a value smaller
- than 0 otherwise.
- @since 8*/
- pub fn OH_LOG_Print(
- type_: LogType,
- level: LogLevel,
- domain: ::core::ffi::c_uint,
- tag: *const ::core::ffi::c_char,
- fmt: *const ::core::ffi::c_char,
- ...
- ) -> ::core::ffi::c_int;
- /** @brief Checks whether logs of the specified service domain, log tag, and log level can be output.
-
- @param domain Indicates the service domain of logs.
- @param tag Indicates the log tag.
- @param level Indicates the log level.
- @return Returns true if the specified logs can be output; returns false otherwise.
- @since 8*/
- pub fn OH_LOG_IsLoggable(
- domain: ::core::ffi::c_uint,
- tag: *const ::core::ffi::c_char,
- level: LogLevel,
- ) -> bool;
-}
diff --git a/components/hilog/src/hilog_api12.rs b/components/hilog/src/hilog_api12.rs
deleted file mode 100644
index a81cd48..0000000
--- a/components/hilog/src/hilog_api12.rs
+++ /dev/null
@@ -1,124 +0,0 @@
-/* automatically generated by rust-bindgen 0.70.1 */
-
-#![allow(non_upper_case_globals)]
-#![allow(non_camel_case_types)]
-#![allow(non_snake_case)]
-
-impl LogType {
- /// Third-party application logs
- pub const LOG_APP: LogType = LogType(0);
-}
-#[repr(transparent)]
-/** @brief Enumerates log types.
-
-Currently, LOG_APP is available. \n
-
-@since 8*/
-#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
-pub struct LogType(pub ::core::ffi::c_uint);
-impl LogLevel {
- /// Debug level to be used by {@link OH_LOG_DEBUG}
- pub const LOG_DEBUG: LogLevel = LogLevel(3);
-}
-impl LogLevel {
- /// Informational level to be used by {@link OH_LOG_INFO}
- pub const LOG_INFO: LogLevel = LogLevel(4);
-}
-impl LogLevel {
- /// Warning level to be used by {@link OH_LOG_WARN}
- pub const LOG_WARN: LogLevel = LogLevel(5);
-}
-impl LogLevel {
- /// Error level to be used by {@link OH_LOG_ERROR}
- pub const LOG_ERROR: LogLevel = LogLevel(6);
-}
-impl LogLevel {
- /// Fatal level to be used by {@link OH_LOG_FATAL}
- pub const LOG_FATAL: LogLevel = LogLevel(7);
-}
-#[repr(transparent)]
-/** @brief Enumerates log levels.
-
-You are advised to select log levels based on their respective usage scenarios:\n
-
DEBUG: used for debugging and disabled from commercial releases
\n
-
INFO: used for logging important system running status and steps in key processes
\n
-
WARN: used for logging unexpected exceptions that have little impact on user experience and can
-automatically recover. Logs at this level are generally output when such exceptions are detected and
-captured.
\n
-
ERROR: used for logging malfunction that affects user experience and cannot automatically
-recover
\n
-
FATAL: used for logging major exceptions that have severely affected user experience and should
-not occur.
\n
-
-@since 8*/
-#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
-pub struct LogLevel(pub ::core::ffi::c_uint);
-/** @brief Defines the function pointer type for the user-defined log processing function.
-
-@param type Indicates the log type. The type for third-party applications is defined by {@link LOG_APP}.
-@param level Indicates the log level, which can be LOG_DEBUG, LOG_INFO, LOG_WARN,
-LOG_ERROR, and LOG_FATAL.
-@param domain Indicates the service domain of logs. Its value is a hexadecimal integer ranging from 0x0 to 0xFFFF.
-@param tag Indicates the log tag, which is a string used to identify the class, file, or service behavior.
-@param msg Indicates the log message itself, which is a formatted log string.
-@since 11*/
-pub type LogCallback = ::core::option::Option<
- unsafe extern "C" fn(
- type_: LogType,
- level: LogLevel,
- domain: ::core::ffi::c_uint,
- tag: *const ::core::ffi::c_char,
- msg: *const ::core::ffi::c_char,
- ),
->;
-extern "C" {
- /** @brief Outputs logs.
-
- You can use this function to output logs based on the specified log type, log level, service domain, log tag,
- and variable parameters determined by the format specifier and privacy identifier in the printf format.
-
- @param type Indicates the log type. The type for third-party applications is defined by {@link LOG_APP}.
- @param level Indicates the log level, which can be LOG_DEBUG, LOG_INFO, LOG_WARN,
- LOG_ERROR, and LOG_FATAL.
- @param domain Indicates the service domain of logs. Its value is a hexadecimal integer ranging from 0x0 to 0xFFFF.
- @param tag Indicates the log tag, which is a string used to identify the class, file, or service behavior.
- @param fmt Indicates the format string, which is an enhancement of a printf format string and supports the privacy
- identifier. Specifically, {public} or {private} is added between the % character and the format specifier
- in each parameter. \n
- @param ... Indicates a list of parameters. The number and type of parameters must map onto the format specifiers
- in the format string.
- @return Returns 0 or a larger value if the operation is successful; returns a value smaller
- than 0 otherwise.
- @since 8*/
- pub fn OH_LOG_Print(
- type_: LogType,
- level: LogLevel,
- domain: ::core::ffi::c_uint,
- tag: *const ::core::ffi::c_char,
- fmt: *const ::core::ffi::c_char,
- ...
- ) -> ::core::ffi::c_int;
- /** @brief Checks whether logs of the specified service domain, log tag, and log level can be output.
-
- @param domain Indicates the service domain of logs.
- @param tag Indicates the log tag.
- @param level Indicates the log level.
- @return Returns true if the specified logs can be output; returns false otherwise.
- @since 8*/
- pub fn OH_LOG_IsLoggable(
- domain: ::core::ffi::c_uint,
- tag: *const ::core::ffi::c_char,
- level: LogLevel,
- ) -> bool;
- /** @brief Set the user-defined log processing function.
-
- After calling this function, the callback function implemented by the user can receive all hilogs of the
- current process.
- Note that it will not change the default behavior of hilog logs of the current process, no matter whether this
- interface is called or not. \n
-
- @param callback Indicates the callback function implemented by the user. If you do not need to process hilog logs,
- you can transfer a null pointer.
- @since 11*/
- pub fn OH_LOG_SetCallback(callback: LogCallback);
-}
diff --git a/components/hilog/src/hilog_api11.rs b/components/hilog/src/hilog_ffi.rs
similarity index 96%
rename from components/hilog/src/hilog_api11.rs
rename to components/hilog/src/hilog_ffi.rs
index a81cd48..8c308f0 100644
--- a/components/hilog/src/hilog_api11.rs
+++ b/components/hilog/src/hilog_ffi.rs
@@ -1,4 +1,4 @@
-/* automatically generated by rust-bindgen 0.70.1 */
+/* automatically generated by rust-bindgen 0.71.1 */
#![allow(non_upper_case_globals)]
#![allow(non_camel_case_types)]
@@ -62,6 +62,8 @@ pub struct LogLevel(pub ::core::ffi::c_uint);
@param tag Indicates the log tag, which is a string used to identify the class, file, or service behavior.
@param msg Indicates the log message itself, which is a formatted log string.
@since 11*/
+#[cfg(feature = "api-11")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-11")))]
pub type LogCallback = ::core::option::Option<
unsafe extern "C" fn(
type_: LogType,
@@ -120,5 +122,7 @@ extern "C" {
@param callback Indicates the callback function implemented by the user. If you do not need to process hilog logs,
you can transfer a null pointer.
@since 11*/
+ #[cfg(feature = "api-11")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-11")))]
pub fn OH_LOG_SetCallback(callback: LogCallback);
}
diff --git a/components/hilog/src/lib.rs b/components/hilog/src/lib.rs
index a951eff..94766ab 100644
--- a/components/hilog/src/lib.rs
+++ b/components/hilog/src/lib.rs
@@ -31,18 +31,9 @@
extern "C" {}
#[allow(non_snake_case)]
-mod hilog_api10;
+mod hilog_ffi;
-pub use hilog_api10::*;
-
-#[cfg(feature = "api-11")]
-#[cfg_attr(docsrs, doc(cfg(feature = "api-11")))]
-mod api11_additions;
-#[cfg(feature = "api-11")]
-#[cfg_attr(docsrs, doc(cfg(feature = "api-11")))]
-pub use api11_additions::*;
-
-// Note: No additions in api-12
+pub use hilog_ffi::*;
#[cfg(feature = "log")]
impl From for LogLevel {
diff --git a/components/hitrace/CHANGELOG.md b/components/hitrace/CHANGELOG.md
index 71b3723..5b30837 100644
--- a/components/hitrace/CHANGELOG.md
+++ b/components/hitrace/CHANGELOG.md
@@ -1,3 +1,11 @@
+# 0.1.3 (2024-12-26)
+
+## Changes
+
+- Regenerated the bindings with new generator
+- `HiTrace_Tracepoint_Type` is now marked as non-exhaustive. This change is not considered breaking,
+ since the enum is only passed towards ffi and not received from ffi functions.
+
# 0.1.2 (2024-09-05)
## Added
diff --git a/components/hitrace/Cargo.toml b/components/hitrace/Cargo.toml
index 6c07f03..516eb9b 100644
--- a/components/hitrace/Cargo.toml
+++ b/components/hitrace/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "hitrace-sys"
-version = "0.1.2"
+version = "0.1.3"
edition = "2021"
keywords = ["OpenHarmony", "HarmonyOS", "hitrace", "tracing"]
license = "Apache-2.0"
diff --git a/components/hitrace/src/api12_additions.rs b/components/hitrace/src/api12_additions.rs
deleted file mode 100644
index 144428b..0000000
--- a/components/hitrace/src/api12_additions.rs
+++ /dev/null
@@ -1,645 +0,0 @@
-#![allow(non_upper_case_globals)]
-#![allow(non_camel_case_types)]
-#![allow(non_snake_case)]
-
-#[repr(C)]
-#[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
-pub struct __BindgenBitfieldUnit {
- storage: Storage,
-}
-impl __BindgenBitfieldUnit {
- #[inline]
- pub const fn new(storage: Storage) -> Self {
- Self { storage }
- }
-}
-impl __BindgenBitfieldUnit
-where
- Storage: AsRef<[u8]> + AsMut<[u8]>,
-{
- #[inline]
- pub fn get_bit(&self, index: usize) -> bool {
- debug_assert!(index / 8 < self.storage.as_ref().len());
- let byte_index = index / 8;
- let byte = self.storage.as_ref()[byte_index];
- let bit_index = if cfg!(target_endian = "big") {
- 7 - (index % 8)
- } else {
- index % 8
- };
- let mask = 1 << bit_index;
- byte & mask == mask
- }
- #[inline]
- pub fn set_bit(&mut self, index: usize, val: bool) {
- debug_assert!(index / 8 < self.storage.as_ref().len());
- let byte_index = index / 8;
- let byte = &mut self.storage.as_mut()[byte_index];
- let bit_index = if cfg!(target_endian = "big") {
- 7 - (index % 8)
- } else {
- index % 8
- };
- let mask = 1 << bit_index;
- if val {
- *byte |= mask;
- } else {
- *byte &= !mask;
- }
- }
- #[inline]
- pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 {
- debug_assert!(bit_width <= 64);
- debug_assert!(bit_offset / 8 < self.storage.as_ref().len());
- debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len(),);
- let mut val = 0;
- for i in 0..(bit_width as usize) {
- if self.get_bit(i + bit_offset) {
- let index = if cfg!(target_endian = "big") {
- bit_width as usize - 1 - i
- } else {
- i
- };
- val |= 1 << index;
- }
- }
- val
- }
- #[inline]
- pub fn set(&mut self, bit_offset: usize, bit_width: u8, val: u64) {
- debug_assert!(bit_width <= 64);
- debug_assert!(bit_offset / 8 < self.storage.as_ref().len());
- debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len(),);
- for i in 0..(bit_width as usize) {
- let mask = 1 << i;
- let val_bit_is_set = val & mask == mask;
- let index = if cfg!(target_endian = "big") {
- bit_width as usize - 1 - i
- } else {
- i
- };
- self.set_bit(index + bit_offset, val_bit_is_set);
- }
- }
-}
-impl HiTraceId_Valid {
- /** @brief Invalid HiTraceId instance.
-
- @syscap SystemCapability.HiviewDFX.HiTrace
-
- @since 12*/
- pub const HITRACE_ID_INVALID: HiTraceId_Valid = HiTraceId_Valid(0);
-}
-impl HiTraceId_Valid {
- /** @brief Valid HiTraceId instance.
-
- @syscap SystemCapability.HiviewDFX.HiTrace
-
- @since 12*/
- pub const HITRACE_ID_VALID: HiTraceId_Valid = HiTraceId_Valid(1);
-}
-#[repr(transparent)]
-/** @brief Defines whether a HiTraceId instance is valid.
-
-@syscap SystemCapability.HiviewDFX.HiTrace
-
-@since 12*/
-#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
-pub struct HiTraceId_Valid(pub ::core::ffi::c_uint);
-impl HiTrace_Version {
- /** @brief Version 1.
-
- @syscap SystemCapability.HiviewDFX.HiTrace
-
- @since 12*/
- pub const HITRACE_VER_1: HiTrace_Version = HiTrace_Version(0);
-}
-#[repr(transparent)]
-/** @brief Enumerates the HiTrace version numbers.
-
-@syscap SystemCapability.HiviewDFX.HiTrace
-
-@since 12*/
-#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
-pub struct HiTrace_Version(pub ::core::ffi::c_uint);
-impl HiTrace_Flag {
- /** @brief Default flag.
-
- @syscap SystemCapability.HiviewDFX.HiTrace
-
- @since 12*/
- pub const HITRACE_FLAG_DEFAULT: HiTrace_Flag = HiTrace_Flag(0);
-}
-impl HiTrace_Flag {
- /** @brief Both synchronous and asynchronous calls are traced. By default, only synchronous calls are traced.
-
- @syscap SystemCapability.HiviewDFX.HiTrace
-
- @since 12*/
- pub const HITRACE_FLAG_INCLUDE_ASYNC: HiTrace_Flag = HiTrace_Flag(1);
-}
-impl HiTrace_Flag {
- /** @brief No spans are created. By default, spans are created.
-
- @syscap SystemCapability.HiviewDFX.HiTrace
-
- @since 12*/
- pub const HITRACE_FLAG_DONOT_CREATE_SPAN: HiTrace_Flag = HiTrace_Flag(2);
-}
-impl HiTrace_Flag {
- /** @brief Trace points are automatically added to spans. By default, no trace point is added.
-
- @syscap SystemCapability.HiviewDFX.HiTrace
-
- @since 12*/
- pub const HITRACE_FLAG_TP_INFO: HiTrace_Flag = HiTrace_Flag(4);
-}
-impl HiTrace_Flag {
- /** @brief Information about the start and end of the trace task is not printed. By default, information about the
- start and end of the trace task is printed.
-
- @syscap SystemCapability.HiviewDFX.HiTrace
-
- @since 12*/
- pub const HITRACE_FLAG_NO_BE_INFO: HiTrace_Flag = HiTrace_Flag(8);
-}
-impl HiTrace_Flag {
- /** @brief The ID is not added to the log. By default, the ID is added to the log.
-
- @syscap SystemCapability.HiviewDFX.HiTrace
-
- @since 12*/
- pub const HITRACE_FLAG_DONOT_ENABLE_LOG: HiTrace_Flag = HiTrace_Flag(16);
-}
-impl HiTrace_Flag {
- /** @brief Tracing is triggered by faults.
-
- @syscap SystemCapability.HiviewDFX.HiTrace
-
- @since 12*/
- pub const HITRACE_FLAG_FAULT_TRIGGER: HiTrace_Flag = HiTrace_Flag(32);
-}
-impl HiTrace_Flag {
- /** @brief Trace points are added only for call chain trace between devices.
- By default, device-to-device trace points are not added.
-
- @syscap SystemCapability.HiviewDFX.HiTrace
-
- @since 12*/
- pub const HITRACE_FLAG_D2D_TP_INFO: HiTrace_Flag = HiTrace_Flag(64);
-}
-impl ::core::ops::BitOr for HiTrace_Flag {
- type Output = Self;
- #[inline]
- fn bitor(self, other: Self) -> Self {
- HiTrace_Flag(self.0 | other.0)
- }
-}
-impl ::core::ops::BitOrAssign for HiTrace_Flag {
- #[inline]
- fn bitor_assign(&mut self, rhs: HiTrace_Flag) {
- self.0 |= rhs.0;
- }
-}
-impl ::core::ops::BitAnd for HiTrace_Flag {
- type Output = Self;
- #[inline]
- fn bitand(self, other: Self) -> Self {
- HiTrace_Flag(self.0 & other.0)
- }
-}
-impl ::core::ops::BitAndAssign for HiTrace_Flag {
- #[inline]
- fn bitand_assign(&mut self, rhs: HiTrace_Flag) {
- self.0 &= rhs.0;
- }
-}
-#[repr(transparent)]
-/** @brief Enumerates the HiTrace flags.
-
-@syscap SystemCapability.HiviewDFX.HiTrace
-
-@since 12*/
-#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
-pub struct HiTrace_Flag(pub ::core::ffi::c_uint);
-#[repr(u32)]
-/** @brief Enumerates the HiTrace trace point types.
-
-@syscap SystemCapability.HiviewDFX.HiTrace
-
-@since 12*/
-#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
-pub enum HiTrace_Tracepoint_Type {
- /** @brief CS trace point.
-
- @syscap SystemCapability.HiviewDFX.HiTrace
-
- @since 12*/
- HITRACE_TP_CS = 0,
- /** @brief CR trace point.
-
- @syscap SystemCapability.HiviewDFX.HiTrace
-
- @since 12*/
- HITRACE_TP_CR = 1,
- /** @brief SS trace point.
-
- @syscap SystemCapability.HiviewDFX.HiTrace
-
- @since 12*/
- HITRACE_TP_SS = 2,
- /** @brief SR trace point.
-
- @syscap SystemCapability.HiviewDFX.HiTrace
-
- @since 12*/
- HITRACE_TP_SR = 3,
- /** @brief General trace point.
-
- @syscap SystemCapability.HiviewDFX.HiTrace
-
- @since 12*/
- HITRACE_TP_GENERAL = 4,
-}
-impl HiTrace_Communication_Mode {
- /** @brief Default communication mode.
-
- @syscap SystemCapability.HiviewDFX.HiTrace
-
- @since 12*/
- pub const HITRACE_CM_DEFAULT: HiTrace_Communication_Mode = HiTrace_Communication_Mode(0);
-}
-impl HiTrace_Communication_Mode {
- /** @brief Inter-thread communication.
-
- @syscap SystemCapability.HiviewDFX.HiTrace
-
- @since 12*/
- pub const HITRACE_CM_THREAD: HiTrace_Communication_Mode = HiTrace_Communication_Mode(1);
-}
-impl HiTrace_Communication_Mode {
- /** @brief Inter-process communication.
-
- @syscap SystemCapability.HiviewDFX.HiTrace
-
- @since 12*/
- pub const HITRACE_CM_PROCESS: HiTrace_Communication_Mode = HiTrace_Communication_Mode(2);
-}
-impl HiTrace_Communication_Mode {
- /** @brief Inter-device communication.
-
- @syscap SystemCapability.HiviewDFX.HiTrace
-
- @since 12*/
- pub const HITRACE_CM_DEVICE: HiTrace_Communication_Mode = HiTrace_Communication_Mode(3);
-}
-#[repr(transparent)]
-/** @brief Enumerates the HiTrace communication modes.
-
-@syscap SystemCapability.HiviewDFX.HiTrace
-
-@since 12*/
-#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
-pub struct HiTrace_Communication_Mode(pub ::core::ffi::c_uint);
-/** @brief Defines a HiTraceId instance.
-
-@struct HiTraceId
-
-@syscap SystemCapability.HiviewDFX.HiTrace
-
-@since 12*/
-#[repr(C)]
-#[derive(Debug, Copy, Clone)]
-pub struct HiTraceId {
- pub _bitfield_align_1: [u64; 0],
- pub _bitfield_1: __BindgenBitfieldUnit<[u8; 16usize]>,
-}
-impl HiTraceId {
- #[inline]
- pub fn valid(&self) -> u64 {
- unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u64) }
- }
- #[inline]
- pub fn set_valid(&mut self, val: u64) {
- unsafe {
- let val: u64 = ::core::mem::transmute(val);
- self._bitfield_1.set(0usize, 1u8, val as u64)
- }
- }
- #[inline]
- pub fn ver(&self) -> u64 {
- unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 3u8) as u64) }
- }
- #[inline]
- pub fn set_ver(&mut self, val: u64) {
- unsafe {
- let val: u64 = ::core::mem::transmute(val);
- self._bitfield_1.set(1usize, 3u8, val as u64)
- }
- }
- #[inline]
- pub fn chainId(&self) -> u64 {
- unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 60u8) as u64) }
- }
- #[inline]
- pub fn set_chainId(&mut self, val: u64) {
- unsafe {
- let val: u64 = ::core::mem::transmute(val);
- self._bitfield_1.set(4usize, 60u8, val as u64)
- }
- }
- #[inline]
- pub fn flags(&self) -> u64 {
- unsafe { ::core::mem::transmute(self._bitfield_1.get(64usize, 12u8) as u64) }
- }
- #[inline]
- pub fn set_flags(&mut self, val: u64) {
- unsafe {
- let val: u64 = ::core::mem::transmute(val);
- self._bitfield_1.set(64usize, 12u8, val as u64)
- }
- }
- #[inline]
- pub fn spanId(&self) -> u64 {
- unsafe { ::core::mem::transmute(self._bitfield_1.get(76usize, 26u8) as u64) }
- }
- #[inline]
- pub fn set_spanId(&mut self, val: u64) {
- unsafe {
- let val: u64 = ::core::mem::transmute(val);
- self._bitfield_1.set(76usize, 26u8, val as u64)
- }
- }
- #[inline]
- pub fn parentSpanId(&self) -> u64 {
- unsafe { ::core::mem::transmute(self._bitfield_1.get(102usize, 26u8) as u64) }
- }
- #[inline]
- pub fn set_parentSpanId(&mut self, val: u64) {
- unsafe {
- let val: u64 = ::core::mem::transmute(val);
- self._bitfield_1.set(102usize, 26u8, val as u64)
- }
- }
- #[inline]
- pub fn new_bitfield_1(
- valid: u64,
- ver: u64,
- chainId: u64,
- flags: u64,
- spanId: u64,
- parentSpanId: u64,
- ) -> __BindgenBitfieldUnit<[u8; 16usize]> {
- let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 16usize]> = Default::default();
- __bindgen_bitfield_unit.set(0usize, 1u8, {
- let valid: u64 = unsafe { ::core::mem::transmute(valid) };
- valid as u64
- });
- __bindgen_bitfield_unit.set(1usize, 3u8, {
- let ver: u64 = unsafe { ::core::mem::transmute(ver) };
- ver as u64
- });
- __bindgen_bitfield_unit.set(4usize, 60u8, {
- let chainId: u64 = unsafe { ::core::mem::transmute(chainId) };
- chainId as u64
- });
- __bindgen_bitfield_unit.set(64usize, 12u8, {
- let flags: u64 = unsafe { ::core::mem::transmute(flags) };
- flags as u64
- });
- __bindgen_bitfield_unit.set(76usize, 26u8, {
- let spanId: u64 = unsafe { ::core::mem::transmute(spanId) };
- spanId as u64
- });
- __bindgen_bitfield_unit.set(102usize, 26u8, {
- let parentSpanId: u64 = unsafe { ::core::mem::transmute(parentSpanId) };
- parentSpanId as u64
- });
- __bindgen_bitfield_unit
- }
-}
-
-extern "C" {
- /** @brief Starts tracing of a process.
-
- This API starts tracing, creates a HiTraceId instance, and sets it to the TLS of the calling thread.
- This API works only when it is called for the first time.
-
- @param name Pointer to a process name.
- @param flags Trace flag.
- @return Returns the created HiTraceId instance.
-
- @syscap SystemCapability.HiviewDFX.HiTrace
-
- @since 12*/
- pub fn OH_HiTrace_BeginChain(
- name: *const ::core::ffi::c_char,
- flags: ::core::ffi::c_int,
- ) -> HiTraceId;
- /** @brief Ends tracing and clears the HiTraceId instance of the calling thread from the TLS.
-
-
- @syscap SystemCapability.HiviewDFX.HiTrace
-
- @since 12*/
- pub fn OH_HiTrace_EndChain();
- /** @brief Obtains the trace ID of the calling thread from the TLS.
-
-
- @return Returns the trace ID of the calling thread. If the calling thread does not have a trace ID,
- an invalid trace ID is returned.
-
- @syscap SystemCapability.HiviewDFX.HiTrace
-
- @since 12*/
- pub fn OH_HiTrace_GetId() -> HiTraceId;
- /** @brief Sets the trace ID of the calling thread. If the ID is invalid, no operation is performed.
-
- This API sets a HiTraceId instance to the TLS of the calling thread.
-
- @param id Trace ID to set.
-
- @syscap SystemCapability.HiviewDFX.HiTrace
-
- @since 12*/
- pub fn OH_HiTrace_SetId(id: *const HiTraceId);
- /** @brief Clears the trace ID of the calling thread and invalidates it.
-
- This API clears the HiTraceId instance in the TLS of the calling thread.
-
- @syscap SystemCapability.HiviewDFX.HiTrace
-
- @since 12*/
- pub fn OH_HiTrace_ClearId();
- /** @brief Creates a span ID based on the trace ID of the calling thread.
-
- This API generates a new span and corresponding HiTraceId instance based on the HiTraceId
- instance in the TLS of the calling thread.
-
- @return Returns a valid span ID. If span creation is not allowed, the ID of the calling thread is traced.
-
- @syscap SystemCapability.HiviewDFX.HiTrace
-
- @since 12*/
- pub fn OH_HiTrace_CreateSpan() -> HiTraceId;
- /** @brief Prints HiTrace information, including the trace ID.
-
- This API prints trace point information, including the communication mode, trace point type, timestamp, and span.
-
- @param mode Communication mode for the trace point.
- @param type Trace point type.
- @param id Trace ID.
- @param fmt Custom information to print.
-
- @syscap SystemCapability.HiviewDFX.HiTrace
-
- @since 12*/
- pub fn OH_HiTrace_Tracepoint(
- mode: HiTrace_Communication_Mode,
- type_: HiTrace_Tracepoint_Type,
- id: *const HiTraceId,
- fmt: *const ::core::ffi::c_char,
- ...
- );
- /** @brief Initializes a HiTraceId structure.
-
- @param id ID of the HiTraceId structure to be initialized.
-
- @syscap SystemCapability.HiviewDFX.HiTrace
-
- @since 12*/
- pub fn OH_HiTrace_InitId(id: *mut HiTraceId);
- /** @brief Creates a HiTraceId structure based on a byte array.
-
- @param id ID of the HiTraceId structure to be created.
- @param pIdArray Byte array.
- @param len Length of the byte array.
-
- @syscap SystemCapability.HiviewDFX.HiTrace
-
- @since 12*/
- pub fn OH_HiTrace_IdFromBytes(id: *mut HiTraceId, pIdArray: *const u8, len: ::core::ffi::c_int);
- /** @brief Checks whether a HiTraceId instance is valid.
-
-
- @param id HiTraceId instance to check.
- @return Returns true if the HiTraceId instance is valid; returns false otherwise.
-
- @syscap SystemCapability.HiviewDFX.HiTrace
-
- @since 12*/
- pub fn OH_HiTrace_IsIdValid(id: *const HiTraceId) -> bool;
- /** @brief Checks whether the specified trace flag in a HiTraceId instance is enabled.
-
-
- @param id HiTraceId instance to check.
- @param flag Specified trace flag.
- @return Returns true if the specified trace flag is enabled; returns false otherwise.
-
- @syscap SystemCapability.HiviewDFX.HiTrace
-
- @since 12*/
- pub fn OH_HiTrace_IsFlagEnabled(id: *const HiTraceId, flag: HiTrace_Flag) -> bool;
- /** @brief Enables the specified trace flag in a HiTraceId instance.
-
-
- @param id HiTraceId instance for which you want to enable the specified trace flag.
- @param flag Specified trace flag.
-
- @syscap SystemCapability.HiviewDFX.HiTrace
-
- @since 12*/
- pub fn OH_HiTrace_EnableFlag(id: *const HiTraceId, flag: HiTrace_Flag);
- /** @brief Obtains the trace flag set in a HiTraceId instance.
-
- @param id HiTraceId instance.
-
- @return Returns the trace flag set in the specified HiTraceId instance.
-
- @syscap SystemCapability.HiviewDFX.HiTrace
-
- @since 12*/
- pub fn OH_HiTrace_GetFlags(id: *const HiTraceId) -> ::core::ffi::c_int;
- /** @brief Sets the trace flag for a HiTraceId instance.
-
- @param id HiTraceId instance.
- @param flags Trace flag to set.
-
- @syscap SystemCapability.HiviewDFX.HiTrace
-
- @since 12*/
- pub fn OH_HiTrace_SetFlags(id: *mut HiTraceId, flags: ::core::ffi::c_int);
- /** @brief Obtains the trace chain ID.
-
- @param id HiTraceId instance for which you want to obtain the trace chain ID.
-
- @return Returns the trace chain ID of the specified HiTraceId instance.
-
- @syscap SystemCapability.HiviewDFX.HiTrace
-
- @since 12*/
- pub fn OH_HiTrace_GetChainId(id: *const HiTraceId) -> u64;
- /** @brief Sets the trace chain ID to a HiTraceId instance
-
- @param id HiTraceId instance.
- @param chainId Trace chain ID to set.
-
- @syscap SystemCapability.HiviewDFX.HiTrace
-
- @since 12*/
- pub fn OH_HiTrace_SetChainId(id: *mut HiTraceId, chainId: u64);
- /** @brief Obtains the span ID in a HiTraceId instance.
-
- @param id HiTraceId instance for which you want to obtain the span ID.
-
- @return Returns the span ID in the specified HiTraceId instance.
-
- @syscap SystemCapability.HiviewDFX.HiTrace
-
- @since 12*/
- pub fn OH_HiTrace_GetSpanId(id: *const HiTraceId) -> u64;
- /** @brief Sets the span ID in a HiTraceId instance.
-
- @param id HiTraceId instance for which you want to set the span ID.
- @param spanId Span ID to set.
-
- @syscap SystemCapability.HiviewDFX.HiTrace
-
- @since 12*/
- pub fn OH_HiTrace_SetSpanId(id: *mut HiTraceId, spanId: u64);
- /** @brief Obtains the parent span ID in a HiTraceId instance.
-
- @param id HiTraceId instance for which you want to obtain the parent span ID.
-
- @return Returns the parent span ID in the specified HiTraceId instance.
-
- @syscap SystemCapability.HiviewDFX.HiTrace
-
- @since 12*/
- pub fn OH_HiTrace_GetParentSpanId(id: *const HiTraceId) -> u64;
- /** @brief Sets the parent span ID in a HiTraceId instance.
-
- @param id HiTraceId instance for which you want to set the parent span ID.
- @param parentSpanId Parent span ID to set.
-
- @syscap SystemCapability.HiviewDFX.HiTrace
-
- @since 12*/
- pub fn OH_HiTrace_SetParentSpanId(id: *mut HiTraceId, parentSpanId: u64);
- /** @brief Converts a HiTraceId instance into a byte array for caching or communication.
-
- @param id HiTraceId instance to be converted.
- @param pIdArray Byte array.
- @param len Length of the byte array.
-
- @return Returns the length of the byte array after conversion.
-
- @syscap SystemCapability.HiviewDFX.HiTrace
-
- @since 12*/
- pub fn OH_HiTrace_IdToBytes(
- id: *const HiTraceId,
- pIdArray: *mut u8,
- len: ::core::ffi::c_int,
- ) -> ::core::ffi::c_int;
-}
diff --git a/components/hitrace/src/hitrace_api10.rs b/components/hitrace/src/hitrace_api10.rs
deleted file mode 100644
index 24fb607..0000000
--- a/components/hitrace/src/hitrace_api10.rs
+++ /dev/null
@@ -1,70 +0,0 @@
-/* automatically generated by rust-bindgen 0.69.4 */
-
-#![allow(non_upper_case_globals)]
-#![allow(non_camel_case_types)]
-#![allow(non_snake_case)]
-
-extern "C" {
- /** @brief Marks the start of a synchronous trace task.
-
- The OH_HiTrace_StartTrace and OH_HiTrace_FinishTrace APIs must be used in pairs.
- The two APIs can be used in nested mode. The stack data structure is used for matching during trace data parsing.
-
- @param name Name of a trace task.
-
- @syscap SystemCapability.HiviewDFX.HiTrace
- @since 10*/
- pub fn OH_HiTrace_StartTrace(name: *const ::core::ffi::c_char);
- /** @brief Marks the end of a synchronous trace task.
-
- This API must be used with OH_HiTrace_StartTrace in pairs. During trace data parsing, the system matches
- it with the OH_HiTrace_StartTrace API recently invoked in the service process.
-
- @syscap SystemCapability.HiviewDFX.HiTrace
- @since 10*/
- pub fn OH_HiTrace_FinishTrace();
- /** @brief Marks the start of an asynchronous trace task.
-
- This API is called to implement performance trace in asynchronous manner. The start and end of an asynchronous
- trace task do not occur in sequence. Therefore, a unique taskId is required to ensure proper data parsing.
- It is passed as an input parameter for the asynchronous API.
- This API is used with OH_HiTrace_FinishAsyncTrace in pairs. The two APIs that have the same name and
- task ID together form an asynchronous timeslice trace task.
- If multiple trace tasks with the same name need to be performed at the same time or a trace task needs to be
- performed multiple times concurrently, different task IDs must be specified in OH_HiTrace_StartTrace.
- If the trace tasks with the same name are not performed at the same time, the same taskId can be used.
-
- @param name Name of the asynchronous trace task.
- @param taskId ID of the asynchronous trace task. The start and end of an asynchronous trace task do not occur in
- sequence. Therefore, the start and end of an asynchronous trace need to be matched based on the task name and the
- unique task ID together.
-
- @syscap SystemCapability.HiviewDFX.HiTrace
- @since 10*/
- pub fn OH_HiTrace_StartAsyncTrace(name: *const ::core::ffi::c_char, taskId: i32);
- /** @brief Marks the end of an asynchronous trace task.
-
- This API is called in the callback function after an asynchronous trace is complete.
- It is used with OH_HiTrace_StartAsyncTrace in pairs. Its name and task ID must be the same as those of
- OH_HiTrace_StartAsyncTrace.
-
- @param name Name of the asynchronous trace task.
- @param taskId ID of the asynchronous trace task. The start and end of an asynchronous trace task do not occur in
- sequence. Therefore, the start and end of an asynchronous trace need to be matched based on the task name and the
- unique task ID together.
-
- @syscap SystemCapability.HiviewDFX.HiTrace
- @since 10*/
- pub fn OH_HiTrace_FinishAsyncTrace(name: *const ::core::ffi::c_char, taskId: i32);
- /** @brief Traces the value change of an integer variable based on its name.
-
- This API can be executed for multiple times to trace the value change of a given integer variable at different
- time points.
-
- @param name Name of the integer variable. It does not need to be the same as the real variable name.
- @param count Integer value. Generally, an integer variable can be passed.
-
- @syscap SystemCapability.HiviewDFX.HiTrace
- @since 10*/
- pub fn OH_HiTrace_CountTrace(name: *const ::core::ffi::c_char, count: i64);
-}
diff --git a/components/hitrace/src/hitrace_api11.rs b/components/hitrace/src/hitrace_api11.rs
deleted file mode 100644
index 24fb607..0000000
--- a/components/hitrace/src/hitrace_api11.rs
+++ /dev/null
@@ -1,70 +0,0 @@
-/* automatically generated by rust-bindgen 0.69.4 */
-
-#![allow(non_upper_case_globals)]
-#![allow(non_camel_case_types)]
-#![allow(non_snake_case)]
-
-extern "C" {
- /** @brief Marks the start of a synchronous trace task.
-
- The OH_HiTrace_StartTrace and OH_HiTrace_FinishTrace APIs must be used in pairs.
- The two APIs can be used in nested mode. The stack data structure is used for matching during trace data parsing.
-
- @param name Name of a trace task.
-
- @syscap SystemCapability.HiviewDFX.HiTrace
- @since 10*/
- pub fn OH_HiTrace_StartTrace(name: *const ::core::ffi::c_char);
- /** @brief Marks the end of a synchronous trace task.
-
- This API must be used with OH_HiTrace_StartTrace in pairs. During trace data parsing, the system matches
- it with the OH_HiTrace_StartTrace API recently invoked in the service process.
-
- @syscap SystemCapability.HiviewDFX.HiTrace
- @since 10*/
- pub fn OH_HiTrace_FinishTrace();
- /** @brief Marks the start of an asynchronous trace task.
-
- This API is called to implement performance trace in asynchronous manner. The start and end of an asynchronous
- trace task do not occur in sequence. Therefore, a unique taskId is required to ensure proper data parsing.
- It is passed as an input parameter for the asynchronous API.
- This API is used with OH_HiTrace_FinishAsyncTrace in pairs. The two APIs that have the same name and
- task ID together form an asynchronous timeslice trace task.
- If multiple trace tasks with the same name need to be performed at the same time or a trace task needs to be
- performed multiple times concurrently, different task IDs must be specified in OH_HiTrace_StartTrace.
- If the trace tasks with the same name are not performed at the same time, the same taskId can be used.
-
- @param name Name of the asynchronous trace task.
- @param taskId ID of the asynchronous trace task. The start and end of an asynchronous trace task do not occur in
- sequence. Therefore, the start and end of an asynchronous trace need to be matched based on the task name and the
- unique task ID together.
-
- @syscap SystemCapability.HiviewDFX.HiTrace
- @since 10*/
- pub fn OH_HiTrace_StartAsyncTrace(name: *const ::core::ffi::c_char, taskId: i32);
- /** @brief Marks the end of an asynchronous trace task.
-
- This API is called in the callback function after an asynchronous trace is complete.
- It is used with OH_HiTrace_StartAsyncTrace in pairs. Its name and task ID must be the same as those of
- OH_HiTrace_StartAsyncTrace.
-
- @param name Name of the asynchronous trace task.
- @param taskId ID of the asynchronous trace task. The start and end of an asynchronous trace task do not occur in
- sequence. Therefore, the start and end of an asynchronous trace need to be matched based on the task name and the
- unique task ID together.
-
- @syscap SystemCapability.HiviewDFX.HiTrace
- @since 10*/
- pub fn OH_HiTrace_FinishAsyncTrace(name: *const ::core::ffi::c_char, taskId: i32);
- /** @brief Traces the value change of an integer variable based on its name.
-
- This API can be executed for multiple times to trace the value change of a given integer variable at different
- time points.
-
- @param name Name of the integer variable. It does not need to be the same as the real variable name.
- @param count Integer value. Generally, an integer variable can be passed.
-
- @syscap SystemCapability.HiviewDFX.HiTrace
- @since 10*/
- pub fn OH_HiTrace_CountTrace(name: *const ::core::ffi::c_char, count: i64);
-}
diff --git a/components/hitrace/src/hitrace_api12.rs b/components/hitrace/src/hitrace_ffi.rs
similarity index 66%
rename from components/hitrace/src/hitrace_api12.rs
rename to components/hitrace/src/hitrace_ffi.rs
index dd86448..cc483f5 100644
--- a/components/hitrace/src/hitrace_api12.rs
+++ b/components/hitrace/src/hitrace_ffi.rs
@@ -1,4 +1,4 @@
-/* automatically generated by rust-bindgen 0.69.4 */
+/* automatically generated by rust-bindgen 0.71.1 */
#![allow(non_upper_case_globals)]
#![allow(non_camel_case_types)]
@@ -20,10 +20,7 @@ where
Storage: AsRef<[u8]> + AsMut<[u8]>,
{
#[inline]
- pub fn get_bit(&self, index: usize) -> bool {
- debug_assert!(index / 8 < self.storage.as_ref().len());
- let byte_index = index / 8;
- let byte = self.storage.as_ref()[byte_index];
+ fn extract_bit(byte: u8, index: usize) -> bool {
let bit_index = if cfg!(target_endian = "big") {
7 - (index % 8)
} else {
@@ -33,10 +30,21 @@ where
byte & mask == mask
}
#[inline]
- pub fn set_bit(&mut self, index: usize, val: bool) {
+ pub fn get_bit(&self, index: usize) -> bool {
debug_assert!(index / 8 < self.storage.as_ref().len());
let byte_index = index / 8;
- let byte = &mut self.storage.as_mut()[byte_index];
+ let byte = self.storage.as_ref()[byte_index];
+ Self::extract_bit(byte, index)
+ }
+ #[inline]
+ pub unsafe fn raw_get_bit(this: *const Self, index: usize) -> bool {
+ debug_assert!(index / 8 < core::mem::size_of::());
+ let byte_index = index / 8;
+ let byte = *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize);
+ Self::extract_bit(byte, index)
+ }
+ #[inline]
+ fn change_bit(byte: u8, index: usize, val: bool) -> u8 {
let bit_index = if cfg!(target_endian = "big") {
7 - (index % 8)
} else {
@@ -44,12 +52,27 @@ where
};
let mask = 1 << bit_index;
if val {
- *byte |= mask;
+ byte | mask
} else {
- *byte &= !mask;
+ byte & !mask
}
}
#[inline]
+ pub fn set_bit(&mut self, index: usize, val: bool) {
+ debug_assert!(index / 8 < self.storage.as_ref().len());
+ let byte_index = index / 8;
+ let byte = &mut self.storage.as_mut()[byte_index];
+ *byte = Self::change_bit(*byte, index, val);
+ }
+ #[inline]
+ pub unsafe fn raw_set_bit(this: *mut Self, index: usize, val: bool) {
+ debug_assert!(index / 8 < core::mem::size_of::());
+ let byte_index = index / 8;
+ let byte =
+ (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize);
+ *byte = Self::change_bit(*byte, index, val);
+ }
+ #[inline]
pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 {
debug_assert!(bit_width <= 64);
debug_assert!(bit_offset / 8 < self.storage.as_ref().len());
@@ -68,6 +91,24 @@ where
val
}
#[inline]
+ pub unsafe fn raw_get(this: *const Self, bit_offset: usize, bit_width: u8) -> u64 {
+ debug_assert!(bit_width <= 64);
+ debug_assert!(bit_offset / 8 < core::mem::size_of::());
+ debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::(),);
+ let mut val = 0;
+ for i in 0..(bit_width as usize) {
+ if Self::raw_get_bit(this, i + bit_offset) {
+ let index = if cfg!(target_endian = "big") {
+ bit_width as usize - 1 - i
+ } else {
+ i
+ };
+ val |= 1 << index;
+ }
+ }
+ val
+ }
+ #[inline]
pub fn set(&mut self, bit_offset: usize, bit_width: u8, val: u64) {
debug_assert!(bit_width <= 64);
debug_assert!(bit_offset / 8 < self.storage.as_ref().len());
@@ -83,21 +124,45 @@ where
self.set_bit(index + bit_offset, val_bit_is_set);
}
}
+ #[inline]
+ pub unsafe fn raw_set(this: *mut Self, bit_offset: usize, bit_width: u8, val: u64) {
+ debug_assert!(bit_width <= 64);
+ debug_assert!(bit_offset / 8 < core::mem::size_of::());
+ debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::(),);
+ for i in 0..(bit_width as usize) {
+ let mask = 1 << i;
+ let val_bit_is_set = val & mask == mask;
+ let index = if cfg!(target_endian = "big") {
+ bit_width as usize - 1 - i
+ } else {
+ i
+ };
+ Self::raw_set_bit(this, index + bit_offset, val_bit_is_set);
+ }
+ }
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl HiTraceId_Valid {
/** @brief Invalid HiTraceId instance.
@syscap SystemCapability.HiviewDFX.HiTrace
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub const HITRACE_ID_INVALID: HiTraceId_Valid = HiTraceId_Valid(0);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl HiTraceId_Valid {
/** @brief Valid HiTraceId instance.
@syscap SystemCapability.HiviewDFX.HiTrace
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub const HITRACE_ID_VALID: HiTraceId_Valid = HiTraceId_Valid(1);
}
#[repr(transparent)]
@@ -106,14 +171,20 @@ impl HiTraceId_Valid {
@syscap SystemCapability.HiviewDFX.HiTrace
@since 12*/
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct HiTraceId_Valid(pub ::core::ffi::c_uint);
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl HiTrace_Version {
/** @brief Version 1.
@syscap SystemCapability.HiviewDFX.HiTrace
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub const HITRACE_VER_1: HiTrace_Version = HiTrace_Version(0);
}
#[repr(transparent)]
@@ -122,40 +193,60 @@ impl HiTrace_Version {
@syscap SystemCapability.HiviewDFX.HiTrace
@since 12*/
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct HiTrace_Version(pub ::core::ffi::c_uint);
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl HiTrace_Flag {
/** @brief Default flag.
@syscap SystemCapability.HiviewDFX.HiTrace
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub const HITRACE_FLAG_DEFAULT: HiTrace_Flag = HiTrace_Flag(0);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl HiTrace_Flag {
/** @brief Both synchronous and asynchronous calls are traced. By default, only synchronous calls are traced.
@syscap SystemCapability.HiviewDFX.HiTrace
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub const HITRACE_FLAG_INCLUDE_ASYNC: HiTrace_Flag = HiTrace_Flag(1);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl HiTrace_Flag {
/** @brief No spans are created. By default, spans are created.
@syscap SystemCapability.HiviewDFX.HiTrace
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub const HITRACE_FLAG_DONOT_CREATE_SPAN: HiTrace_Flag = HiTrace_Flag(2);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl HiTrace_Flag {
/** @brief Trace points are automatically added to spans. By default, no trace point is added.
@syscap SystemCapability.HiviewDFX.HiTrace
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub const HITRACE_FLAG_TP_INFO: HiTrace_Flag = HiTrace_Flag(4);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl HiTrace_Flag {
/** @brief Information about the start and end of the trace task is not printed. By default, information about the
start and end of the trace task is printed.
@@ -163,24 +254,36 @@ impl HiTrace_Flag {
@syscap SystemCapability.HiviewDFX.HiTrace
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub const HITRACE_FLAG_NO_BE_INFO: HiTrace_Flag = HiTrace_Flag(8);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl HiTrace_Flag {
/** @brief The ID is not added to the log. By default, the ID is added to the log.
@syscap SystemCapability.HiviewDFX.HiTrace
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub const HITRACE_FLAG_DONOT_ENABLE_LOG: HiTrace_Flag = HiTrace_Flag(16);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl HiTrace_Flag {
/** @brief Tracing is triggered by faults.
@syscap SystemCapability.HiviewDFX.HiTrace
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub const HITRACE_FLAG_FAULT_TRIGGER: HiTrace_Flag = HiTrace_Flag(32);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl HiTrace_Flag {
/** @brief Trace points are added only for call chain trace between devices.
By default, device-to-device trace points are not added.
@@ -188,8 +291,12 @@ impl HiTrace_Flag {
@syscap SystemCapability.HiviewDFX.HiTrace
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub const HITRACE_FLAG_D2D_TP_INFO: HiTrace_Flag = HiTrace_Flag(64);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ::core::ops::BitOr for HiTrace_Flag {
type Output = Self;
#[inline]
@@ -197,12 +304,16 @@ impl ::core::ops::BitOr for HiTrace_Flag {
HiTrace_Flag(self.0 | other.0)
}
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ::core::ops::BitOrAssign for HiTrace_Flag {
#[inline]
fn bitor_assign(&mut self, rhs: HiTrace_Flag) {
self.0 |= rhs.0;
}
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ::core::ops::BitAnd for HiTrace_Flag {
type Output = Self;
#[inline]
@@ -210,6 +321,8 @@ impl ::core::ops::BitAnd for HiTrace_Flag {
HiTrace_Flag(self.0 & other.0)
}
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ::core::ops::BitAndAssign for HiTrace_Flag {
#[inline]
fn bitand_assign(&mut self, rhs: HiTrace_Flag) {
@@ -222,14 +335,19 @@ impl ::core::ops::BitAndAssign for HiTrace_Flag {
@syscap SystemCapability.HiviewDFX.HiTrace
@since 12*/
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct HiTrace_Flag(pub ::core::ffi::c_uint);
#[repr(u32)]
+#[non_exhaustive]
/** @brief Enumerates the HiTrace trace point types.
@syscap SystemCapability.HiviewDFX.HiTrace
@since 12*/
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum HiTrace_Tracepoint_Type {
/** @brief CS trace point.
@@ -237,62 +355,88 @@ pub enum HiTrace_Tracepoint_Type {
@syscap SystemCapability.HiviewDFX.HiTrace
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
HITRACE_TP_CS = 0,
/** @brief CR trace point.
@syscap SystemCapability.HiviewDFX.HiTrace
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
HITRACE_TP_CR = 1,
/** @brief SS trace point.
@syscap SystemCapability.HiviewDFX.HiTrace
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
HITRACE_TP_SS = 2,
/** @brief SR trace point.
@syscap SystemCapability.HiviewDFX.HiTrace
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
HITRACE_TP_SR = 3,
/** @brief General trace point.
@syscap SystemCapability.HiviewDFX.HiTrace
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
HITRACE_TP_GENERAL = 4,
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl HiTrace_Communication_Mode {
/** @brief Default communication mode.
@syscap SystemCapability.HiviewDFX.HiTrace
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub const HITRACE_CM_DEFAULT: HiTrace_Communication_Mode = HiTrace_Communication_Mode(0);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl HiTrace_Communication_Mode {
/** @brief Inter-thread communication.
@syscap SystemCapability.HiviewDFX.HiTrace
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub const HITRACE_CM_THREAD: HiTrace_Communication_Mode = HiTrace_Communication_Mode(1);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl HiTrace_Communication_Mode {
/** @brief Inter-process communication.
@syscap SystemCapability.HiviewDFX.HiTrace
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub const HITRACE_CM_PROCESS: HiTrace_Communication_Mode = HiTrace_Communication_Mode(2);
}
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl HiTrace_Communication_Mode {
/** @brief Inter-device communication.
@syscap SystemCapability.HiviewDFX.HiTrace
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub const HITRACE_CM_DEVICE: HiTrace_Communication_Mode = HiTrace_Communication_Mode(3);
}
#[repr(transparent)]
@@ -301,6 +445,8 @@ impl HiTrace_Communication_Mode {
@syscap SystemCapability.HiviewDFX.HiTrace
@since 12*/
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct HiTrace_Communication_Mode(pub ::core::ffi::c_uint);
/** @brief Defines a HiTraceId instance.
@@ -310,6 +456,8 @@ pub struct HiTrace_Communication_Mode(pub ::core::ffi::c_uint);
@syscap SystemCapability.HiviewDFX.HiTrace
@since 12*/
+#[cfg(feature = "api-12")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct HiTraceId {
@@ -329,6 +477,28 @@ impl HiTraceId {
}
}
#[inline]
+ pub unsafe fn valid_raw(this: *const Self) -> u64 {
+ unsafe {
+ ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 16usize]>>::raw_get(
+ ::core::ptr::addr_of!((*this)._bitfield_1),
+ 0usize,
+ 1u8,
+ ) as u64)
+ }
+ }
+ #[inline]
+ pub unsafe fn set_valid_raw(this: *mut Self, val: u64) {
+ unsafe {
+ let val: u64 = ::core::mem::transmute(val);
+ <__BindgenBitfieldUnit<[u8; 16usize]>>::raw_set(
+ ::core::ptr::addr_of_mut!((*this)._bitfield_1),
+ 0usize,
+ 1u8,
+ val as u64,
+ )
+ }
+ }
+ #[inline]
pub fn ver(&self) -> u64 {
unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 3u8) as u64) }
}
@@ -340,6 +510,28 @@ impl HiTraceId {
}
}
#[inline]
+ pub unsafe fn ver_raw(this: *const Self) -> u64 {
+ unsafe {
+ ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 16usize]>>::raw_get(
+ ::core::ptr::addr_of!((*this)._bitfield_1),
+ 1usize,
+ 3u8,
+ ) as u64)
+ }
+ }
+ #[inline]
+ pub unsafe fn set_ver_raw(this: *mut Self, val: u64) {
+ unsafe {
+ let val: u64 = ::core::mem::transmute(val);
+ <__BindgenBitfieldUnit<[u8; 16usize]>>::raw_set(
+ ::core::ptr::addr_of_mut!((*this)._bitfield_1),
+ 1usize,
+ 3u8,
+ val as u64,
+ )
+ }
+ }
+ #[inline]
pub fn chainId(&self) -> u64 {
unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 60u8) as u64) }
}
@@ -351,6 +543,28 @@ impl HiTraceId {
}
}
#[inline]
+ pub unsafe fn chainId_raw(this: *const Self) -> u64 {
+ unsafe {
+ ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 16usize]>>::raw_get(
+ ::core::ptr::addr_of!((*this)._bitfield_1),
+ 4usize,
+ 60u8,
+ ) as u64)
+ }
+ }
+ #[inline]
+ pub unsafe fn set_chainId_raw(this: *mut Self, val: u64) {
+ unsafe {
+ let val: u64 = ::core::mem::transmute(val);
+ <__BindgenBitfieldUnit<[u8; 16usize]>>::raw_set(
+ ::core::ptr::addr_of_mut!((*this)._bitfield_1),
+ 4usize,
+ 60u8,
+ val as u64,
+ )
+ }
+ }
+ #[inline]
pub fn flags(&self) -> u64 {
unsafe { ::core::mem::transmute(self._bitfield_1.get(64usize, 12u8) as u64) }
}
@@ -362,6 +576,28 @@ impl HiTraceId {
}
}
#[inline]
+ pub unsafe fn flags_raw(this: *const Self) -> u64 {
+ unsafe {
+ ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 16usize]>>::raw_get(
+ ::core::ptr::addr_of!((*this)._bitfield_1),
+ 64usize,
+ 12u8,
+ ) as u64)
+ }
+ }
+ #[inline]
+ pub unsafe fn set_flags_raw(this: *mut Self, val: u64) {
+ unsafe {
+ let val: u64 = ::core::mem::transmute(val);
+ <__BindgenBitfieldUnit<[u8; 16usize]>>::raw_set(
+ ::core::ptr::addr_of_mut!((*this)._bitfield_1),
+ 64usize,
+ 12u8,
+ val as u64,
+ )
+ }
+ }
+ #[inline]
pub fn spanId(&self) -> u64 {
unsafe { ::core::mem::transmute(self._bitfield_1.get(76usize, 26u8) as u64) }
}
@@ -373,6 +609,28 @@ impl HiTraceId {
}
}
#[inline]
+ pub unsafe fn spanId_raw(this: *const Self) -> u64 {
+ unsafe {
+ ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 16usize]>>::raw_get(
+ ::core::ptr::addr_of!((*this)._bitfield_1),
+ 76usize,
+ 26u8,
+ ) as u64)
+ }
+ }
+ #[inline]
+ pub unsafe fn set_spanId_raw(this: *mut Self, val: u64) {
+ unsafe {
+ let val: u64 = ::core::mem::transmute(val);
+ <__BindgenBitfieldUnit<[u8; 16usize]>>::raw_set(
+ ::core::ptr::addr_of_mut!((*this)._bitfield_1),
+ 76usize,
+ 26u8,
+ val as u64,
+ )
+ }
+ }
+ #[inline]
pub fn parentSpanId(&self) -> u64 {
unsafe { ::core::mem::transmute(self._bitfield_1.get(102usize, 26u8) as u64) }
}
@@ -384,6 +642,28 @@ impl HiTraceId {
}
}
#[inline]
+ pub unsafe fn parentSpanId_raw(this: *const Self) -> u64 {
+ unsafe {
+ ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 16usize]>>::raw_get(
+ ::core::ptr::addr_of!((*this)._bitfield_1),
+ 102usize,
+ 26u8,
+ ) as u64)
+ }
+ }
+ #[inline]
+ pub unsafe fn set_parentSpanId_raw(this: *mut Self, val: u64) {
+ unsafe {
+ let val: u64 = ::core::mem::transmute(val);
+ <__BindgenBitfieldUnit<[u8; 16usize]>>::raw_set(
+ ::core::ptr::addr_of_mut!((*this)._bitfield_1),
+ 102usize,
+ 26u8,
+ val as u64,
+ )
+ }
+ }
+ #[inline]
pub fn new_bitfield_1(
valid: u64,
ver: u64,
@@ -433,6 +713,8 @@ extern "C" {
@syscap SystemCapability.HiviewDFX.HiTrace
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_HiTrace_BeginChain(
name: *const ::core::ffi::c_char,
flags: ::core::ffi::c_int,
@@ -443,6 +725,8 @@ extern "C" {
@syscap SystemCapability.HiviewDFX.HiTrace
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_HiTrace_EndChain();
/** @brief Obtains the trace ID of the calling thread from the TLS.
@@ -453,6 +737,8 @@ extern "C" {
@syscap SystemCapability.HiviewDFX.HiTrace
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_HiTrace_GetId() -> HiTraceId;
/** @brief Sets the trace ID of the calling thread. If the ID is invalid, no operation is performed.
@@ -463,6 +749,8 @@ extern "C" {
@syscap SystemCapability.HiviewDFX.HiTrace
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_HiTrace_SetId(id: *const HiTraceId);
/** @brief Clears the trace ID of the calling thread and invalidates it.
@@ -471,6 +759,8 @@ extern "C" {
@syscap SystemCapability.HiviewDFX.HiTrace
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_HiTrace_ClearId();
/** @brief Creates a span ID based on the trace ID of the calling thread.
@@ -482,6 +772,8 @@ extern "C" {
@syscap SystemCapability.HiviewDFX.HiTrace
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_HiTrace_CreateSpan() -> HiTraceId;
/** @brief Prints HiTrace information, including the trace ID.
@@ -495,6 +787,8 @@ extern "C" {
@syscap SystemCapability.HiviewDFX.HiTrace
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_HiTrace_Tracepoint(
mode: HiTrace_Communication_Mode,
type_: HiTrace_Tracepoint_Type,
@@ -509,6 +803,8 @@ extern "C" {
@syscap SystemCapability.HiviewDFX.HiTrace
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_HiTrace_InitId(id: *mut HiTraceId);
/** @brief Creates a HiTraceId structure based on a byte array.
@@ -519,6 +815,8 @@ extern "C" {
@syscap SystemCapability.HiviewDFX.HiTrace
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_HiTrace_IdFromBytes(id: *mut HiTraceId, pIdArray: *const u8, len: ::core::ffi::c_int);
/** @brief Checks whether a HiTraceId instance is valid.
@@ -529,6 +827,8 @@ extern "C" {
@syscap SystemCapability.HiviewDFX.HiTrace
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_HiTrace_IsIdValid(id: *const HiTraceId) -> bool;
/** @brief Checks whether the specified trace flag in a HiTraceId instance is enabled.
@@ -540,6 +840,8 @@ extern "C" {
@syscap SystemCapability.HiviewDFX.HiTrace
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_HiTrace_IsFlagEnabled(id: *const HiTraceId, flag: HiTrace_Flag) -> bool;
/** @brief Enables the specified trace flag in a HiTraceId instance.
@@ -550,6 +852,8 @@ extern "C" {
@syscap SystemCapability.HiviewDFX.HiTrace
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_HiTrace_EnableFlag(id: *const HiTraceId, flag: HiTrace_Flag);
/** @brief Obtains the trace flag set in a HiTraceId instance.
@@ -560,6 +864,8 @@ extern "C" {
@syscap SystemCapability.HiviewDFX.HiTrace
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_HiTrace_GetFlags(id: *const HiTraceId) -> ::core::ffi::c_int;
/** @brief Sets the trace flag for a HiTraceId instance.
@@ -569,6 +875,8 @@ extern "C" {
@syscap SystemCapability.HiviewDFX.HiTrace
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_HiTrace_SetFlags(id: *mut HiTraceId, flags: ::core::ffi::c_int);
/** @brief Obtains the trace chain ID.
@@ -579,6 +887,8 @@ extern "C" {
@syscap SystemCapability.HiviewDFX.HiTrace
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_HiTrace_GetChainId(id: *const HiTraceId) -> u64;
/** @brief Sets the trace chain ID to a HiTraceId instance
@@ -588,6 +898,8 @@ extern "C" {
@syscap SystemCapability.HiviewDFX.HiTrace
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_HiTrace_SetChainId(id: *mut HiTraceId, chainId: u64);
/** @brief Obtains the span ID in a HiTraceId instance.
@@ -598,6 +910,8 @@ extern "C" {
@syscap SystemCapability.HiviewDFX.HiTrace
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_HiTrace_GetSpanId(id: *const HiTraceId) -> u64;
/** @brief Sets the span ID in a HiTraceId instance.
@@ -607,6 +921,8 @@ extern "C" {
@syscap SystemCapability.HiviewDFX.HiTrace
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_HiTrace_SetSpanId(id: *mut HiTraceId, spanId: u64);
/** @brief Obtains the parent span ID in a HiTraceId instance.
@@ -617,6 +933,8 @@ extern "C" {
@syscap SystemCapability.HiviewDFX.HiTrace
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_HiTrace_GetParentSpanId(id: *const HiTraceId) -> u64;
/** @brief Sets the parent span ID in a HiTraceId instance.
@@ -626,6 +944,8 @@ extern "C" {
@syscap SystemCapability.HiviewDFX.HiTrace
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_HiTrace_SetParentSpanId(id: *mut HiTraceId, parentSpanId: u64);
/** @brief Converts a HiTraceId instance into a byte array for caching or communication.
@@ -638,6 +958,8 @@ extern "C" {
@syscap SystemCapability.HiviewDFX.HiTrace
@since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_HiTrace_IdToBytes(
id: *const HiTraceId,
pIdArray: *mut u8,
diff --git a/components/hitrace/src/lib.rs b/components/hitrace/src/lib.rs
index 1a01b20..e63ee42 100644
--- a/components/hitrace/src/lib.rs
+++ b/components/hitrace/src/lib.rs
@@ -11,12 +11,5 @@
#[link(name = "hitrace_ndk.z")]
extern "C" {}
-mod hitrace_api10;
-pub use hitrace_api10::*;
-
-#[cfg(feature = "api-12")]
-#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
-mod api12_additions;
-#[cfg(feature = "api-12")]
-#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
-pub use api12_additions::*;
+mod hitrace_ffi;
+pub use hitrace_ffi::*;
diff --git a/components/xcomponent/Cargo.toml b/components/xcomponent/Cargo.toml
index 66903ea..6e94391 100644
--- a/components/xcomponent/Cargo.toml
+++ b/components/xcomponent/Cargo.toml
@@ -12,13 +12,16 @@ readme = "README.md"
[dependencies]
document-features = { version = "0.2", optional = true }
keyboard-types = {version = "0.7.0", optional = true}
+arkui-sys = { version = "0.1.0", optional = true}
[features]
default = []
api-10 = []
api-11 = ["api-10"]
-api-12 = ["api-11"]
+api-12 = ["api-11", "arkui-sys?/api-12"]
+## Enables XComponent APIs that depend on ArkUI.
+arkui = ["dep:arkui-sys"]
## Provides optional conversion from the OH keyboard enum to the keyboard-types enum.
keyboard-types = ["dep:keyboard-types"]
## Document available features when building the documentation
diff --git a/components/xcomponent/src/api11_additions.rs b/components/xcomponent/src/api11_additions.rs
deleted file mode 100644
index 1e99935..0000000
--- a/components/xcomponent/src/api11_additions.rs
+++ /dev/null
@@ -1,62 +0,0 @@
-#![allow(non_upper_case_globals)]
-#![allow(non_camel_case_types)]
-#![allow(non_snake_case)]
-
-use super::OH_NativeXComponent;
-
-/** @brief Defines the expected frame rate range struct.
-
-@since 11
-@version 1.0*/
-#[repr(C)]
-#[derive(Debug, Copy, Clone)]
-pub struct OH_NativeXComponent_ExpectedRateRange {
- /// The minimum frame rate of dynamical callback rate range.
- pub min: i32,
- /// The maximum frame rate of dynamical callback rate range.
- pub max: i32,
- /// The expected frame rate of dynamical callback rate range.
- pub expected: i32,
-}
-
-extern "C" {
- /** @brief Set the Expected FrameRateRange.
-
- @param component Indicates the pointer to this OH_NativeXComponent instance.
- @param callback Indicates the pointer to a expected rate range.
- @return Returns the status code of the execution.
- @since 11
- @version 1.0*/
- pub fn OH_NativeXComponent_SetExpectedFrameRateRange(
- component: *mut OH_NativeXComponent,
- range: *mut OH_NativeXComponent_ExpectedRateRange,
- ) -> i32;
-
- /** @brief Registers a callback for this OH_NativeXComponent instance.
-
- @param component Indicates the pointer to this OH_NativeXComponent instance.
- @param callback Indicates the pointer to a onFrame callback.
- @return Returns the status code of the execution.
- @since 11
- @version 1.0*/
- pub fn OH_NativeXComponent_RegisterOnFrameCallback(
- component: *mut OH_NativeXComponent,
- callback: ::core::option::Option<
- unsafe extern "C" fn(
- component: *mut OH_NativeXComponent,
- timestamp: u64,
- targetTimestamp: u64,
- ),
- >,
- ) -> i32;
-
- /** @brief UnRegister a callback for this OH_NativeXComponent instance.
-
- @param component Indicates the pointer to this OH_NativeXComponent instance.
- @return Returns the status code of the execution.
- @since 11
- @version 1.0*/
- pub fn OH_NativeXComponent_UnregisterOnFrameCallback(
- component: *mut OH_NativeXComponent,
- ) -> i32;
-}
diff --git a/components/xcomponent/src/lib.rs b/components/xcomponent/src/lib.rs
index dd078d7..c9885a4 100644
--- a/components/xcomponent/src/lib.rs
+++ b/components/xcomponent/src/lib.rs
@@ -28,15 +28,34 @@
#[link(name = "ace_ndk.z")]
extern "C" {}
-mod xcomponent_api10;
-pub use xcomponent_api10::*;
-
-#[cfg(feature = "api-11")]
-#[cfg_attr(docsrs, doc(cfg(feature = "api-11")))]
-mod api11_additions;
-#[cfg(feature = "api-11")]
-#[cfg_attr(docsrs, doc(cfg(feature = "api-11")))]
-pub use api11_additions::*;
+mod xcomponent_ffi;
+pub use xcomponent_ffi::*;
+
+#[cfg(feature = "arkui")]
+mod xcomponent_arkui_ffi;
+#[cfg(feature = "arkui")]
+pub use xcomponent_arkui_ffi::*;
+
+mod xcomponent_result_ffi;
+
+/// Enumerates the API access states.
+///
+/// Available since API 8.
+#[repr(transparent)]
+pub struct XcomponentResult(pub std::ffi::c_int);
+
+impl XcomponentResult {
+ pub const SUCCESS: Self = Self(0);
+ pub const FAILED: Self = Self(-1);
+ pub const BAD_PARAMETER: Self = Self(-2);
+}
+
+// assert that our handwritten binding matches the size of the generated binding.
+// needs to be updated when regenerating the bindings, since the bindgen type name
+// may change.
+#[allow(dead_code)]
+const ASSERT_SIZE_OK: () =
+ assert!(size_of::() == size_of::());
#[cfg(feature = "keyboard-types")]
#[cfg_attr(docsrs, doc(cfg(feature = "keyboard-types")))]
diff --git a/components/xcomponent/src/xcomponent_api10.rs b/components/xcomponent/src/xcomponent_api10.rs
deleted file mode 100644
index 3d9068f..0000000
--- a/components/xcomponent/src/xcomponent_api10.rs
+++ /dev/null
@@ -1,1684 +0,0 @@
-/* automatically generated by rust-bindgen 0.69.4 */
-
-#![allow(non_upper_case_globals)]
-#![allow(non_camel_case_types)]
-#![allow(non_snake_case)]
-
-pub const OH_NATIVE_XCOMPONENT_OBJ: &[u8; 26] = b"__NATIVE_XCOMPONENT_OBJ__\0";
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_UNKNOWN: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(-1);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_FN: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(0);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_HOME: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(1);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_BACK: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_MEDIA_PLAY_PAUSE: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(10);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_MEDIA_STOP: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(11);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_MEDIA_NEXT: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(12);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_MEDIA_PREVIOUS: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(13);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_MEDIA_REWIND: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(14);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_MEDIA_FAST_FORWARD: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(15);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_VOLUME_UP: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(16);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_VOLUME_DOWN: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(17);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_POWER: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(18);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_CAMERA: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(19);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_VOLUME_MUTE: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(22);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_MUTE: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(23);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_BRIGHTNESS_UP: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(40);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_BRIGHTNESS_DOWN: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(41);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_0: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2000);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_1: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2001);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_2: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2002);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_3: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2003);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_4: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2004);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_5: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2005);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_6: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2006);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_7: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2007);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_8: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2008);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_9: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2009);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_STAR: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2010);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_POUND: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2011);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_DPAD_UP: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2012);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_DPAD_DOWN: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2013);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_DPAD_LEFT: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2014);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_DPAD_RIGHT: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2015);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_DPAD_CENTER: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2016);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_A: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2017);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_B: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2018);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_C: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2019);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_D: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2020);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_E: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2021);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_F: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2022);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_G: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2023);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_H: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2024);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_I: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2025);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_J: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2026);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_K: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2027);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_L: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2028);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_M: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2029);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_N: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2030);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_O: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2031);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_P: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2032);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_Q: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2033);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_R: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2034);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_S: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2035);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_T: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2036);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_U: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2037);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_V: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2038);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_W: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2039);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_X: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2040);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_Y: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2041);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_Z: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2042);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_COMMA: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2043);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_PERIOD: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2044);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_ALT_LEFT: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2045);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_ALT_RIGHT: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2046);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_SHIFT_LEFT: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2047);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_SHIFT_RIGHT: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2048);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_TAB: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2049);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_SPACE: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2050);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_SYM: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2051);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_EXPLORER: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2052);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_ENVELOPE: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2053);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_ENTER: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2054);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_DEL: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2055);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_GRAVE: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2056);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_MINUS: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2057);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_EQUALS: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2058);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_LEFT_BRACKET: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2059);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_RIGHT_BRACKET: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2060);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_BACKSLASH: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2061);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_SEMICOLON: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2062);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_APOSTROPHE: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2063);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_SLASH: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2064);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_AT: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2065);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_PLUS: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2066);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_MENU: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2067);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_PAGE_UP: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2068);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_PAGE_DOWN: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2069);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_ESCAPE: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2070);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_FORWARD_DEL: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2071);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_CTRL_LEFT: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2072);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_CTRL_RIGHT: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2073);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_CAPS_LOCK: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2074);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_SCROLL_LOCK: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2075);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_META_LEFT: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2076);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_META_RIGHT: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2077);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_FUNCTION: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2078);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_SYSRQ: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2079);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_BREAK: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2080);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_MOVE_HOME: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2081);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_MOVE_END: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2082);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_INSERT: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2083);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_FORWARD: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2084);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_MEDIA_PLAY: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2085);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_MEDIA_PAUSE: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2086);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_MEDIA_CLOSE: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2087);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_MEDIA_EJECT: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2088);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_MEDIA_RECORD: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2089);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_F1: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2090);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_F2: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2091);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_F3: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2092);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_F4: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2093);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_F5: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2094);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_F6: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2095);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_F7: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2096);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_F8: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2097);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_F9: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2098);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_F10: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2099);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_F11: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2100);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_F12: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2101);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_NUM_LOCK: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2102);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_NUMPAD_0: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2103);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_NUMPAD_1: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2104);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_NUMPAD_2: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2105);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_NUMPAD_3: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2106);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_NUMPAD_4: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2107);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_NUMPAD_5: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2108);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_NUMPAD_6: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2109);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_NUMPAD_7: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2110);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_NUMPAD_8: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2111);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_NUMPAD_9: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2112);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_NUMPAD_DIVIDE: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2113);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_NUMPAD_MULTIPLY: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2114);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_NUMPAD_SUBTRACT: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2115);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_NUMPAD_ADD: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2116);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_NUMPAD_DOT: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2117);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_NUMPAD_COMMA: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2118);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_NUMPAD_ENTER: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2119);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_NUMPAD_EQUALS: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2120);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_NUMPAD_LEFT_PAREN: OH_NativeXComponent_KeyCode =
- OH_NativeXComponent_KeyCode(2121);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_NUMPAD_RIGHT_PAREN: OH_NativeXComponent_KeyCode =
- OH_NativeXComponent_KeyCode(2122);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_VIRTUAL_MULTITASK: OH_NativeXComponent_KeyCode =
- OH_NativeXComponent_KeyCode(2210);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_SLEEP: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2600);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_ZENKAKU_HANKAKU: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2601);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_102ND: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2602);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_RO: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2603);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_KATAKANA: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2604);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_HIRAGANA: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2605);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_HENKAN: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2606);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_KATAKANA_HIRAGANA: OH_NativeXComponent_KeyCode =
- OH_NativeXComponent_KeyCode(2607);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_MUHENKAN: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2608);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_LINEFEED: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2609);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_MACRO: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2610);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_NUMPAD_PLUSMINUS: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2611);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_SCALE: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2612);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_HANGUEL: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2613);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_HANJA: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2614);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_YEN: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2615);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_STOP: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2616);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_AGAIN: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2617);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_PROPS: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2618);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_UNDO: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2619);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_COPY: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2620);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_OPEN: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2621);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_PASTE: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2622);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_FIND: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2623);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_CUT: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2624);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_HELP: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2625);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_CALC: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2626);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_FILE: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2627);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_BOOKMARKS: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2628);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_NEXT: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2629);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_PLAYPAUSE: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2630);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_PREVIOUS: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2631);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_STOPCD: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2632);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_CONFIG: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2634);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_REFRESH: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2635);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_EXIT: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2636);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_EDIT: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2637);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_SCROLLUP: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2638);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_SCROLLDOWN: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2639);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_NEW: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2640);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_REDO: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2641);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_CLOSE: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2642);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_PLAY: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2643);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_BASSBOOST: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2644);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_PRINT: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2645);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_CHAT: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2646);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_FINANCE: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2647);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_CANCEL: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2648);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_KBDILLUM_TOGGLE: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2649);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_KBDILLUM_DOWN: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2650);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_KBDILLUM_UP: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2651);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_SEND: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2652);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_REPLY: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2653);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_FORWARDMAIL: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2654);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_SAVE: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2655);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_DOCUMENTS: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2656);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_VIDEO_NEXT: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2657);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_VIDEO_PREV: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2658);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_BRIGHTNESS_CYCLE: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2659);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_BRIGHTNESS_ZERO: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2660);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_DISPLAY_OFF: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2661);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_BTN_MISC: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2662);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_GOTO: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2663);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_INFO: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2664);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_PROGRAM: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2665);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_PVR: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2666);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_SUBTITLE: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2667);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_FULL_SCREEN: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2668);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_KEYBOARD: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2669);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_ASPECT_RATIO: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2670);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_PC: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2671);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_TV: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2672);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_TV2: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2673);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_VCR: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2674);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_VCR2: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2675);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_SAT: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2676);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_CD: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2677);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_TAPE: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2678);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_TUNER: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2679);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_PLAYER: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2680);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_DVD: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2681);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_AUDIO: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2682);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_VIDEO: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2683);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_MEMO: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2684);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_CALENDAR: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2685);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_RED: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2686);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_GREEN: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2687);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_YELLOW: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2688);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_BLUE: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2689);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_CHANNELUP: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2690);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_CHANNELDOWN: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2691);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_LAST: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2692);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_RESTART: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2693);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_SLOW: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2694);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_SHUFFLE: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2695);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_VIDEOPHONE: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2696);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_GAMES: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2697);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_ZOOMIN: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2698);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_ZOOMOUT: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2699);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_ZOOMRESET: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2700);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_WORDPROCESSOR: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2701);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_EDITOR: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2702);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_SPREADSHEET: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2703);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_GRAPHICSEDITOR: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2704);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_PRESENTATION: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2705);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_DATABASE: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2706);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_NEWS: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2707);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_VOICEMAIL: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2708);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_ADDRESSBOOK: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2709);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_MESSENGER: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2710);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_BRIGHTNESS_TOGGLE: OH_NativeXComponent_KeyCode =
- OH_NativeXComponent_KeyCode(2711);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_SPELLCHECK: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2712);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_COFFEE: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2713);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_MEDIA_REPEAT: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2714);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_IMAGES: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2715);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_BUTTONCONFIG: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2716);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_TASKMANAGER: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2717);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_JOURNAL: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2718);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_CONTROLPANEL: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2719);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_APPSELECT: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2720);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_SCREENSAVER: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2721);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_ASSISTANT: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2722);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_KBD_LAYOUT_NEXT: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2723);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_BRIGHTNESS_MIN: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2724);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_BRIGHTNESS_MAX: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2725);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_KBDINPUTASSIST_PREV: OH_NativeXComponent_KeyCode =
- OH_NativeXComponent_KeyCode(2726);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_KBDINPUTASSIST_NEXT: OH_NativeXComponent_KeyCode =
- OH_NativeXComponent_KeyCode(2727);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_KBDINPUTASSIST_PREVGROUP: OH_NativeXComponent_KeyCode =
- OH_NativeXComponent_KeyCode(2728);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_KBDINPUTASSIST_NEXTGROUP: OH_NativeXComponent_KeyCode =
- OH_NativeXComponent_KeyCode(2729);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_KBDINPUTASSIST_ACCEPT: OH_NativeXComponent_KeyCode =
- OH_NativeXComponent_KeyCode(2730);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_KBDINPUTASSIST_CANCEL: OH_NativeXComponent_KeyCode =
- OH_NativeXComponent_KeyCode(2731);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_FRONT: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2800);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_SETUP: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2801);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_WAKEUP: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2802);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_SENDFILE: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2803);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_DELETEFILE: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2804);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_XFER: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2805);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_PROG1: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2806);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_PROG2: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2807);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_MSDOS: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2808);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_SCREENLOCK: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2809);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_DIRECTION_ROTATE_DISPLAY: OH_NativeXComponent_KeyCode =
- OH_NativeXComponent_KeyCode(2810);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_CYCLEWINDOWS: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2811);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_COMPUTER: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2812);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_EJECTCLOSECD: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2813);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_ISO: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2814);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_MOVE: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2815);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_F13: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2816);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_F14: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2817);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_F15: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2818);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_F16: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2819);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_F17: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2820);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_F18: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2821);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_F19: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2822);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_F20: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2823);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_F21: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2824);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_F22: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2825);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_F23: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2826);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_F24: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2827);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_PROG3: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2828);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_PROG4: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2829);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_DASHBOARD: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2830);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_SUSPEND: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2831);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_HP: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2832);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_SOUND: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2833);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_QUESTION: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2834);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_CONNECT: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2836);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_SPORT: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2837);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_SHOP: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2838);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_ALTERASE: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2839);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_SWITCHVIDEOMODE: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2841);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_BATTERY: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2842);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_BLUETOOTH: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2843);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_WLAN: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2844);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_UWB: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2845);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_WWAN_WIMAX: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2846);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_RFKILL: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2847);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_CHANNEL: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(3001);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_BTN_0: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(3100);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_BTN_1: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(3101);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_BTN_2: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(3102);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_BTN_3: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(3103);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_BTN_4: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(3104);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_BTN_5: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(3105);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_BTN_6: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(3106);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_BTN_7: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(3107);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_BTN_8: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(3108);
-}
-impl OH_NativeXComponent_KeyCode {
- pub const KEY_BTN_9: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(3109);
-}
-#[repr(transparent)]
-/** @brief Represents the key event code.
-
-@since 10
-@version 1.0*/
-#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
-pub struct OH_NativeXComponent_KeyCode(pub ::core::ffi::c_int);
-impl OH_NativeXComponent_KeyAction {
- pub const OH_NATIVEXCOMPONENT_KEY_ACTION_UNKNOWN: OH_NativeXComponent_KeyAction =
- OH_NativeXComponent_KeyAction(-1);
-}
-impl OH_NativeXComponent_KeyAction {
- pub const OH_NATIVEXCOMPONENT_KEY_ACTION_DOWN: OH_NativeXComponent_KeyAction =
- OH_NativeXComponent_KeyAction(0);
-}
-impl OH_NativeXComponent_KeyAction {
- pub const OH_NATIVEXCOMPONENT_KEY_ACTION_UP: OH_NativeXComponent_KeyAction =
- OH_NativeXComponent_KeyAction(1);
-}
-#[repr(transparent)]
-/** @brief Represents the key event action.
-
-@since 10
-@version 1.0*/
-#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
-pub struct OH_NativeXComponent_KeyAction(pub ::core::ffi::c_int);
-pub const OH_XCOMPONENT_ID_LEN_MAX: u32 = 128;
-pub const OH_MAX_TOUCH_POINTS_NUMBER: u32 = 10;
-/// Successful.
-pub const OH_NATIVEXCOMPONENT_RESULT_SUCCESS: _bindgen_ty_1 = _bindgen_ty_1(0);
-/// Failed.
-pub const OH_NATIVEXCOMPONENT_RESULT_FAILED: _bindgen_ty_1 = _bindgen_ty_1(-1);
-/// Invalid parameters.
-pub const OH_NATIVEXCOMPONENT_RESULT_BAD_PARAMETER: _bindgen_ty_1 = _bindgen_ty_1(-2);
-#[repr(transparent)]
-/** @brief Enumerates the API access states.
-
-@since 8
-@version 1.0*/
-#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
-pub struct _bindgen_ty_1(pub ::core::ffi::c_int);
-impl OH_NativeXComponent_TouchEventType {
- /// Trigger a touch event when a finger is pressed.
- pub const OH_NATIVEXCOMPONENT_DOWN: OH_NativeXComponent_TouchEventType =
- OH_NativeXComponent_TouchEventType(0);
-}
-impl OH_NativeXComponent_TouchEventType {
- /// Trigger a touch event when a finger is lifted.
- pub const OH_NATIVEXCOMPONENT_UP: OH_NativeXComponent_TouchEventType =
- OH_NativeXComponent_TouchEventType(1);
-}
-impl OH_NativeXComponent_TouchEventType {
- /// Trigger a touch event when a finger moves on the screen in pressed state.
- pub const OH_NATIVEXCOMPONENT_MOVE: OH_NativeXComponent_TouchEventType =
- OH_NativeXComponent_TouchEventType(2);
-}
-impl OH_NativeXComponent_TouchEventType {
- /// Trigger an event when a touch event is canceled.
- pub const OH_NATIVEXCOMPONENT_CANCEL: OH_NativeXComponent_TouchEventType =
- OH_NativeXComponent_TouchEventType(3);
-}
-impl OH_NativeXComponent_TouchEventType {
- /// Invalid touch type.
- pub const OH_NATIVEXCOMPONENT_UNKNOWN: OH_NativeXComponent_TouchEventType =
- OH_NativeXComponent_TouchEventType(4);
-}
-#[repr(transparent)]
-#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
-pub struct OH_NativeXComponent_TouchEventType(pub ::core::ffi::c_uint);
-impl OH_NativeXComponent_TouchPointToolType {
- /// Indicates invalid tool type.
- pub const OH_NATIVEXCOMPONENT_TOOL_TYPE_UNKNOWN: OH_NativeXComponent_TouchPointToolType =
- OH_NativeXComponent_TouchPointToolType(0);
-}
-impl OH_NativeXComponent_TouchPointToolType {
- /// Indicates a finger.
- pub const OH_NATIVEXCOMPONENT_TOOL_TYPE_FINGER: OH_NativeXComponent_TouchPointToolType =
- OH_NativeXComponent_TouchPointToolType(1);
-}
-impl OH_NativeXComponent_TouchPointToolType {
- /// Indicates a stylus.
- pub const OH_NATIVEXCOMPONENT_TOOL_TYPE_PEN: OH_NativeXComponent_TouchPointToolType =
- OH_NativeXComponent_TouchPointToolType(2);
-}
-impl OH_NativeXComponent_TouchPointToolType {
- /// Indicates a eraser.
- pub const OH_NATIVEXCOMPONENT_TOOL_TYPE_RUBBER: OH_NativeXComponent_TouchPointToolType =
- OH_NativeXComponent_TouchPointToolType(3);
-}
-impl OH_NativeXComponent_TouchPointToolType {
- /// Indicates a brush.
- pub const OH_NATIVEXCOMPONENT_TOOL_TYPE_BRUSH: OH_NativeXComponent_TouchPointToolType =
- OH_NativeXComponent_TouchPointToolType(4);
-}
-impl OH_NativeXComponent_TouchPointToolType {
- /// Indicates a pencil.
- pub const OH_NATIVEXCOMPONENT_TOOL_TYPE_PENCIL: OH_NativeXComponent_TouchPointToolType =
- OH_NativeXComponent_TouchPointToolType(5);
-}
-impl OH_NativeXComponent_TouchPointToolType {
- /// Indicates a brush.
- pub const OH_NATIVEXCOMPONENT_TOOL_TYPE_AIRBRUSH: OH_NativeXComponent_TouchPointToolType =
- OH_NativeXComponent_TouchPointToolType(6);
-}
-impl OH_NativeXComponent_TouchPointToolType {
- /// Indicates a mouse.
- pub const OH_NATIVEXCOMPONENT_TOOL_TYPE_MOUSE: OH_NativeXComponent_TouchPointToolType =
- OH_NativeXComponent_TouchPointToolType(7);
-}
-impl OH_NativeXComponent_TouchPointToolType {
- /// Indicates a lens.
- pub const OH_NATIVEXCOMPONENT_TOOL_TYPE_LENS: OH_NativeXComponent_TouchPointToolType =
- OH_NativeXComponent_TouchPointToolType(8);
-}
-#[repr(transparent)]
-/** @brief Represents the touch point tool type.
-
-@since 9
-@version 1.0*/
-#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
-pub struct OH_NativeXComponent_TouchPointToolType(pub ::core::ffi::c_uint);
-impl OH_NativeXComponent_EventSourceType {
- /// Indicates an unknown input source type.
- pub const OH_NATIVEXCOMPONENT_SOURCE_TYPE_UNKNOWN: OH_NativeXComponent_EventSourceType =
- OH_NativeXComponent_EventSourceType(0);
-}
-impl OH_NativeXComponent_EventSourceType {
- /// Indicates that the input source generates a mouse multi-touch event.
- pub const OH_NATIVEXCOMPONENT_SOURCE_TYPE_MOUSE: OH_NativeXComponent_EventSourceType =
- OH_NativeXComponent_EventSourceType(1);
-}
-impl OH_NativeXComponent_EventSourceType {
- /// Indicates that the input source generates a touchscreen multi-touch event.
- pub const OH_NATIVEXCOMPONENT_SOURCE_TYPE_TOUCHSCREEN: OH_NativeXComponent_EventSourceType =
- OH_NativeXComponent_EventSourceType(2);
-}
-impl OH_NativeXComponent_EventSourceType {
- /// Indicates that the input source generates a touchpad multi-touch event.
- pub const OH_NATIVEXCOMPONENT_SOURCE_TYPE_TOUCHPAD: OH_NativeXComponent_EventSourceType =
- OH_NativeXComponent_EventSourceType(3);
-}
-impl OH_NativeXComponent_EventSourceType {
- /// Indicates that the input source generates a joystick multi-touch event.
- pub const OH_NATIVEXCOMPONENT_SOURCE_TYPE_JOYSTICK: OH_NativeXComponent_EventSourceType =
- OH_NativeXComponent_EventSourceType(4);
-}
-impl OH_NativeXComponent_EventSourceType {
- /** @brief Indicates that the input source generates a keyboard event.
-
- @since 10
- @version 1.0*/
- pub const OH_NATIVEXCOMPONENT_SOURCE_TYPE_KEYBOARD: OH_NativeXComponent_EventSourceType =
- OH_NativeXComponent_EventSourceType(5);
-}
-#[repr(transparent)]
-/** @brief Represents the touch event source type.
-
-@since 9
-@version 1.0*/
-#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
-pub struct OH_NativeXComponent_EventSourceType(pub ::core::ffi::c_uint);
-impl OH_NativeXComponent_MouseEventAction {
- pub const OH_NATIVEXCOMPONENT_MOUSE_NONE: OH_NativeXComponent_MouseEventAction =
- OH_NativeXComponent_MouseEventAction(0);
-}
-impl OH_NativeXComponent_MouseEventAction {
- pub const OH_NATIVEXCOMPONENT_MOUSE_PRESS: OH_NativeXComponent_MouseEventAction =
- OH_NativeXComponent_MouseEventAction(1);
-}
-impl OH_NativeXComponent_MouseEventAction {
- pub const OH_NATIVEXCOMPONENT_MOUSE_RELEASE: OH_NativeXComponent_MouseEventAction =
- OH_NativeXComponent_MouseEventAction(2);
-}
-impl OH_NativeXComponent_MouseEventAction {
- pub const OH_NATIVEXCOMPONENT_MOUSE_MOVE: OH_NativeXComponent_MouseEventAction =
- OH_NativeXComponent_MouseEventAction(3);
-}
-#[repr(transparent)]
-/** @brief Represents the mouse event action.
-
-@since 9
-@version 1.0*/
-#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
-pub struct OH_NativeXComponent_MouseEventAction(pub ::core::ffi::c_uint);
-impl OH_NativeXComponent_MouseEventButton {
- pub const OH_NATIVEXCOMPONENT_NONE_BUTTON: OH_NativeXComponent_MouseEventButton =
- OH_NativeXComponent_MouseEventButton(0);
-}
-impl OH_NativeXComponent_MouseEventButton {
- pub const OH_NATIVEXCOMPONENT_LEFT_BUTTON: OH_NativeXComponent_MouseEventButton =
- OH_NativeXComponent_MouseEventButton(1);
-}
-impl OH_NativeXComponent_MouseEventButton {
- pub const OH_NATIVEXCOMPONENT_RIGHT_BUTTON: OH_NativeXComponent_MouseEventButton =
- OH_NativeXComponent_MouseEventButton(2);
-}
-impl OH_NativeXComponent_MouseEventButton {
- pub const OH_NATIVEXCOMPONENT_MIDDLE_BUTTON: OH_NativeXComponent_MouseEventButton =
- OH_NativeXComponent_MouseEventButton(4);
-}
-impl OH_NativeXComponent_MouseEventButton {
- pub const OH_NATIVEXCOMPONENT_BACK_BUTTON: OH_NativeXComponent_MouseEventButton =
- OH_NativeXComponent_MouseEventButton(8);
-}
-impl OH_NativeXComponent_MouseEventButton {
- pub const OH_NATIVEXCOMPONENT_FORWARD_BUTTON: OH_NativeXComponent_MouseEventButton =
- OH_NativeXComponent_MouseEventButton(16);
-}
-#[repr(transparent)]
-/** @brief Represents the mouse event button.
-
-@since 9
-@version 1.0*/
-#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
-pub struct OH_NativeXComponent_MouseEventButton(pub ::core::ffi::c_uint);
-impl OH_NativeXComponent_TouchEvent_SourceTool {
- pub const OH_NATIVEXCOMPONENT_SOURCETOOL_UNKNOWN: OH_NativeXComponent_TouchEvent_SourceTool =
- OH_NativeXComponent_TouchEvent_SourceTool(0);
-}
-impl OH_NativeXComponent_TouchEvent_SourceTool {
- pub const OH_NATIVEXCOMPONENT_SOURCETOOL_FINGER: OH_NativeXComponent_TouchEvent_SourceTool =
- OH_NativeXComponent_TouchEvent_SourceTool(1);
-}
-impl OH_NativeXComponent_TouchEvent_SourceTool {
- pub const OH_NATIVEXCOMPONENT_SOURCETOOL_PEN: OH_NativeXComponent_TouchEvent_SourceTool =
- OH_NativeXComponent_TouchEvent_SourceTool(2);
-}
-impl OH_NativeXComponent_TouchEvent_SourceTool {
- pub const OH_NATIVEXCOMPONENT_SOURCETOOL_RUBBER: OH_NativeXComponent_TouchEvent_SourceTool =
- OH_NativeXComponent_TouchEvent_SourceTool(3);
-}
-impl OH_NativeXComponent_TouchEvent_SourceTool {
- pub const OH_NATIVEXCOMPONENT_SOURCETOOL_BRUSH: OH_NativeXComponent_TouchEvent_SourceTool =
- OH_NativeXComponent_TouchEvent_SourceTool(4);
-}
-impl OH_NativeXComponent_TouchEvent_SourceTool {
- pub const OH_NATIVEXCOMPONENT_SOURCETOOL_PENCIL: OH_NativeXComponent_TouchEvent_SourceTool =
- OH_NativeXComponent_TouchEvent_SourceTool(5);
-}
-impl OH_NativeXComponent_TouchEvent_SourceTool {
- pub const OH_NATIVEXCOMPONENT_SOURCETOOL_AIRBRUSH: OH_NativeXComponent_TouchEvent_SourceTool =
- OH_NativeXComponent_TouchEvent_SourceTool(6);
-}
-impl OH_NativeXComponent_TouchEvent_SourceTool {
- pub const OH_NATIVEXCOMPONENT_SOURCETOOL_MOUSE: OH_NativeXComponent_TouchEvent_SourceTool =
- OH_NativeXComponent_TouchEvent_SourceTool(7);
-}
-impl OH_NativeXComponent_TouchEvent_SourceTool {
- pub const OH_NATIVEXCOMPONENT_SOURCETOOL_LENS: OH_NativeXComponent_TouchEvent_SourceTool =
- OH_NativeXComponent_TouchEvent_SourceTool(8);
-}
-impl OH_NativeXComponent_TouchEvent_SourceTool {
- pub const OH_NATIVEXCOMPONENT_SOURCETOOL_TOUCHPAD: OH_NativeXComponent_TouchEvent_SourceTool =
- OH_NativeXComponent_TouchEvent_SourceTool(9);
-}
-#[repr(transparent)]
-/** @brief Represents the source tool type of TouchEvent
-
-@since 10
-@version 1.0*/
-#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
-pub struct OH_NativeXComponent_TouchEvent_SourceTool(pub ::core::ffi::c_uint);
-#[repr(C)]
-#[derive(Debug, Copy, Clone)]
-pub struct OH_NativeXComponent_HistoricalPoint {
- /// Unique identifier of a finger.
- pub id: i32,
- /// X coordinate of the touch point relative to the left edge of the screen.
- pub screenX: f32,
- /// Y coordinate of the touch point relative to the upper edge of the screen.
- pub screenY: f32,
- /// X coordinate of the touch point relative to the left edge of the element to touch.
- pub x: f32,
- /// Y coordinate of the touch point relative to the upper edge of the element to touch.
- pub y: f32,
- /// Touch type of the touch event.
- pub type_: OH_NativeXComponent_TouchEventType,
- /// Contact area between the finger pad and the screen.
- pub size: f64,
- /// Pressure of the current touch event.
- pub force: f32,
- /// Timestamp of the current touch event.
- pub timeStamp: i64,
- /// The angle betweenprojection on plane-X-Y and axis-Z of the current touch event.
- pub titlX: f32,
- /// The angle betweenprojection on plane-Y-Z and axis-Z of the current touch event.
- pub titlY: f32,
- /// The sourceTool of the current touch event.
- pub sourceTool: OH_NativeXComponent_TouchEvent_SourceTool,
-}
-#[repr(C)]
-#[derive(Debug, Copy, Clone)]
-pub struct OH_NativeXComponent_TouchPoint {
- /// Unique identifier of a finger.
- pub id: i32,
- /// X coordinate of the touch point relative to the left edge of the screen.
- pub screenX: f32,
- /// Y coordinate of the touch point relative to the upper edge of the screen.
- pub screenY: f32,
- /// X coordinate of the touch point relative to the left edge of the element to touch.
- pub x: f32,
- /// Y coordinate of the touch point relative to the upper edge of the element to touch.
- pub y: f32,
- /// Touch type of the touch event.
- pub type_: OH_NativeXComponent_TouchEventType,
- /// Contact area between the finger pad and the screen.
- pub size: f64,
- /// Pressure of the current touch event.
- pub force: f32,
- /// Timestamp of the current touch event.
- pub timeStamp: i64,
- /// Whether the current point is pressed.
- pub isPressed: bool,
-}
-#[repr(C)]
-#[derive(Debug, Copy, Clone)]
-pub struct OH_NativeXComponent_TouchEvent {
- /// Unique identifier of a finger.
- pub id: i32,
- /// X coordinate of the touch point relative to the left edge of the screen.
- pub screenX: f32,
- /// Y coordinate of the touch point relative to the upper edge of the screen.
- pub screenY: f32,
- /// X coordinate of the touch point relative to the left edge of the element to touch.
- pub x: f32,
- /// Y coordinate of the touch point relative to the upper edge of the element to touch.
- pub y: f32,
- /// Touch type of the touch event.
- pub type_: OH_NativeXComponent_TouchEventType,
- /// Contact area between the finger pad and the screen.
- pub size: f64,
- /// Pressure of the current touch event.
- pub force: f32,
- /// ID of the device where the current touch event is generated.
- pub deviceId: i64,
- /// Timestamp of the current touch event.
- pub timeStamp: i64,
- /// Array of the current touch points.
- pub touchPoints: [OH_NativeXComponent_TouchPoint; 10usize],
- /// Number of current touch points.
- pub numPoints: u32,
-}
-/** @brief Represents the mouse event information.
-
-@since 9
-@version 1.0*/
-#[repr(C)]
-#[derive(Debug, Copy, Clone)]
-pub struct OH_NativeXComponent_MouseEvent {
- /// X coordinate of the mouse point relative to the left edge of the element to mouse.
- pub x: f32,
- /// Y coordinate of the mouse point relative to the upper edge of the element to mouse.
- pub y: f32,
- /// X coordinate of the mouse point relative to the left edge of the screen.
- pub screenX: f32,
- /// Y coordinate of the mouse point relative to the upper edge of the screen.
- pub screenY: f32,
- /// Timestamp of the current mouse event.
- pub timestamp: i64,
- /// Mouse event action.
- pub action: OH_NativeXComponent_MouseEventAction,
- /// Mouse event button.
- pub button: OH_NativeXComponent_MouseEventButton,
-}
-#[repr(C)]
-pub struct OH_NativeXComponent {
- _unused: [u8; 0],
-}
-/** @brief Registers the surface lifecycle and touch event callbacks.
-
-@since 8
-@version 1.0*/
-#[repr(C)]
-#[derive(Debug, Copy, Clone)]
-pub struct OH_NativeXComponent_Callback {
- /// Called when the surface is created.
- pub OnSurfaceCreated: ::core::option::Option<
- unsafe extern "C" fn(component: *mut OH_NativeXComponent, window: *mut ::core::ffi::c_void),
- >,
- /// Called when the surface is changed.
- pub OnSurfaceChanged: ::core::option::Option<
- unsafe extern "C" fn(component: *mut OH_NativeXComponent, window: *mut ::core::ffi::c_void),
- >,
- /// Called when the surface is destroyed.
- pub OnSurfaceDestroyed: ::core::option::Option<
- unsafe extern "C" fn(component: *mut OH_NativeXComponent, window: *mut ::core::ffi::c_void),
- >,
- /// Called when a touch event is triggered.
- pub DispatchTouchEvent: ::core::option::Option<
- unsafe extern "C" fn(component: *mut OH_NativeXComponent, window: *mut ::core::ffi::c_void),
- >,
-}
-/** @brief Registers the mouse event callbacks.
-
-@since 9
-@version 1.0*/
-#[repr(C)]
-#[derive(Debug, Copy, Clone)]
-pub struct OH_NativeXComponent_MouseEvent_Callback {
- /// Called when a mouse event is triggered.
- pub DispatchMouseEvent: ::core::option::Option<
- unsafe extern "C" fn(component: *mut OH_NativeXComponent, window: *mut ::core::ffi::c_void),
- >,
- /// Called when a hover event is triggered.
- pub DispatchHoverEvent: ::core::option::Option<
- unsafe extern "C" fn(component: *mut OH_NativeXComponent, isHover: bool),
- >,
-}
-#[repr(C)]
-pub struct OH_NativeXComponent_KeyEvent {
- _unused: [u8; 0],
-}
-extern "C" {
- /** @brief Obtains the ID of the ArkUI XComponent.
-
- @param component Indicates the pointer to this OH_NativeXComponent instance.
- @param id Indicates the char buffer to keep the ID of this OH_NativeXComponent instance.\n
- Notice that a null-terminator will be appended to the char buffer, so the size of the\n
- char buffer should be at least as large as the size of the real id length plus 1.\n
- It is recommended that the size of the char buffer be [OH_XCOMPONENT_ID_LEN_MAX + 1].
- @param size Indicates the pointer to the length of id, which you can set and receive.
- @return Returns the status code of the execution.
- @since 8
- @version 1.0*/
- pub fn OH_NativeXComponent_GetXComponentId(
- component: *mut OH_NativeXComponent,
- id: *mut ::core::ffi::c_char,
- size: *mut u64,
- ) -> i32;
- /** @brief Obtains the size of the surface held by the ArkUI XComponent.
-
- @param component Indicates the pointer to this OH_NativeXComponent instance.
- @param window Indicates the native window handler.
- @param width Indicates the pointer to the width of the current surface.
- @param height Indicates the pointer to the height of the current surface.
- @return Returns the status code of the execution.
- @since 8
- @version 1.0*/
- pub fn OH_NativeXComponent_GetXComponentSize(
- component: *mut OH_NativeXComponent,
- window: *const ::core::ffi::c_void,
- width: *mut u64,
- height: *mut u64,
- ) -> i32;
- /** @brief Obtains the offset of the surface held by the ArkUI XComponent.
-
- @param component Indicates the pointer to this OH_NativeXComponent instance.
- @param window Indicates the native window handler.
- @param x Indicates the pointer to the x coordinate of the current surface.
- @param y Indicates the pointer to the y coordinate of the current surface.
- @return Returns the status code of the execution.
- @since 8
- @version 1.0*/
- pub fn OH_NativeXComponent_GetXComponentOffset(
- component: *mut OH_NativeXComponent,
- window: *const ::core::ffi::c_void,
- x: *mut f64,
- y: *mut f64,
- ) -> i32;
- /** @brief Obtains the touch event dispatched by the ArkUI XComponent.
-
- @param component Indicates the pointer to this OH_NativeXComponent instance.
- @param window Indicates the native window handler.
- @param touchEvent Indicates the pointer to the current touch event.
- @return Returns the status code of the execution.
- @since 8
- @version 1.0*/
- pub fn OH_NativeXComponent_GetTouchEvent(
- component: *mut OH_NativeXComponent,
- window: *const ::core::ffi::c_void,
- touchEvent: *mut OH_NativeXComponent_TouchEvent,
- ) -> i32;
- /** @brief Obtains the touch pointer tool type by the ArkUI XComponent.
-
- @param component Indicates the pointer to this OH_NativeXComponent instance.
- @param pointIndex Indicates the pointer index in the touchPoints.
- @param toolType Indicates the tool Type of the pointer.
- @return Returns the status code of the execution.
- @since 9
- @version 1.0*/
- pub fn OH_NativeXComponent_GetTouchPointToolType(
- component: *mut OH_NativeXComponent,
- pointIndex: u32,
- toolType: *mut OH_NativeXComponent_TouchPointToolType,
- ) -> i32;
- /** @brief Obtains the touch pointer tiltX by the ArkUI XComponent.
-
- @param component Indicates the pointer to this OH_NativeXComponent instance.
- @param pointIndex Indicates the pointer index in the touchPoints.
- @param tiltX Indicates the x tilt of the pointer.
- @return Returns the status code of the execution.
- @since 9
- @version 1.0*/
- pub fn OH_NativeXComponent_GetTouchPointTiltX(
- component: *mut OH_NativeXComponent,
- pointIndex: u32,
- tiltX: *mut f32,
- ) -> i32;
- /** @brief Obtains the touch pointer tiltX by the ArkUI XComponent.
-
- @param component Indicates the pointer to this OH_NativeXComponent instance.
- @param pointIndex Indicates the pointer index in the touchPoints.
- @param tiltY Indicates the y tilt of the pointer.
- @return Returns the status code of the execution.
- @since 9
- @version 1.0*/
- pub fn OH_NativeXComponent_GetTouchPointTiltY(
- component: *mut OH_NativeXComponent,
- pointIndex: u32,
- tiltY: *mut f32,
- ) -> i32;
- /** @brief Obtains the touch event dispatched by the ArkUI XComponent.
-
- @param component Indicates the pointer to this OH_NativeXComponent instance.
- @param window Indicates the native window handler.
- @param historicalPoints Indicates the pointer to the current historicalPoints.
- @return Returns the status code of the execution.
- @since 10
- @version 1.0*/
- pub fn OH_NativeXComponent_GetHistoricalPoints(
- component: *mut OH_NativeXComponent,
- window: *const ::core::ffi::c_void,
- size: *mut i32,
- historicalPoints: *mut *mut OH_NativeXComponent_HistoricalPoint,
- ) -> i32;
- /** @brief Obtains the mouse event dispatched by the ArkUI XComponent.
-
- @param component Indicates the pointer to this OH_NativeXComponent instance.
- @param window Indicates the native window handler.
- @param mouseEvent Indicates the pointer to the current mouse event.
- @return Returns the status code of the execution.
- @since 9
- @version 1.0*/
- pub fn OH_NativeXComponent_GetMouseEvent(
- component: *mut OH_NativeXComponent,
- window: *const ::core::ffi::c_void,
- mouseEvent: *mut OH_NativeXComponent_MouseEvent,
- ) -> i32;
- /** @brief Registers a callback for this OH_NativeXComponent instance.
-
- @param component Indicates the pointer to this OH_NativeXComponent instance.
- @param callback Indicates the pointer to a surface lifecycle and touch event callback.
- @return Returns the status code of the execution.
- @since 8
- @version 1.0*/
- pub fn OH_NativeXComponent_RegisterCallback(
- component: *mut OH_NativeXComponent,
- callback: *mut OH_NativeXComponent_Callback,
- ) -> i32;
- /** @brief Registers a callback for this OH_NativeXComponent instance.
-
- @param component Indicates the pointer to this OH_NativeXComponent instance.
- @param callback Indicates the pointer to a mouse event callback.
- @return Returns the status code of the execution.
- @since 9
- @version 1.0*/
- pub fn OH_NativeXComponent_RegisterMouseEventCallback(
- component: *mut OH_NativeXComponent,
- callback: *mut OH_NativeXComponent_MouseEvent_Callback,
- ) -> i32;
- /** @brief Registers a callback for this OH_NativeXComponent instance.
-
- @param component Indicates the pointer to this OH_NativeXComponent instance.
- @param callback Indicates the pointer to a focus event callback.
- @return Returns the status code of the execution.
- @since 10
- @version 1.0*/
- pub fn OH_NativeXComponent_RegisterFocusEventCallback(
- component: *mut OH_NativeXComponent,
- callback: ::core::option::Option<
- unsafe extern "C" fn(
- component: *mut OH_NativeXComponent,
- window: *mut ::core::ffi::c_void,
- ),
- >,
- ) -> i32;
- /** @brief Registers a callback for this OH_NativeXComponent instance.
-
- @param component Indicates the pointer to this OH_NativeXComponent instance.
- @param callback Indicates the pointer to a key event callback.
- @return Returns the status code of the execution.
- @since 10
- @version 1.0*/
- pub fn OH_NativeXComponent_RegisterKeyEventCallback(
- component: *mut OH_NativeXComponent,
- callback: ::core::option::Option<
- unsafe extern "C" fn(
- component: *mut OH_NativeXComponent,
- window: *mut ::core::ffi::c_void,
- ),
- >,
- ) -> i32;
- /** @brief Registers a callback for this OH_NativeXComponent instance.
-
- @param component Indicates the pointer to this OH_NativeXComponent instance.
- @param callback Indicates the pointer to a blur event callback.
- @return Returns the status code of the execution.
- @since 10
- @version 1.0*/
- pub fn OH_NativeXComponent_RegisterBlurEventCallback(
- component: *mut OH_NativeXComponent,
- callback: ::core::option::Option<
- unsafe extern "C" fn(
- component: *mut OH_NativeXComponent,
- window: *mut ::core::ffi::c_void,
- ),
- >,
- ) -> i32;
- /** @brief Obtains the key event dispatched by the ArkUI XComponent.
-
- @param component Indicates the pointer to this OH_NativeXComponent instance.
- @param keyEvent Indicates the pointer to pointer of OH_NativeXComponent_KeyEvent instance.
- @return Returns the status code of the execution.
- @since 10
- @version 1.0*/
- pub fn OH_NativeXComponent_GetKeyEvent(
- component: *mut OH_NativeXComponent,
- keyEvent: *mut *mut OH_NativeXComponent_KeyEvent,
- ) -> i32;
- /** @brief Obtains the action of the key event.
-
- @param keyEvent Indicates the pointer to this OH_NativeXComponent_KeyEvent instance.
- @param action Indicates the action of the OH_NativeXComponent_KeyEvent instance.
- @return Returns the status code of the execution.
- @since 10
- @version 1.0*/
- pub fn OH_NativeXComponent_GetKeyEventAction(
- keyEvent: *mut OH_NativeXComponent_KeyEvent,
- action: *mut OH_NativeXComponent_KeyAction,
- ) -> i32;
- /** @brief Obtains the keyCode of the key event.
-
- @param keyEvent Indicates the pointer to this OH_NativeXComponent_KeyEvent instance.
- @param code Indicates the keyCode of the OH_NativeXComponent_KeyEvent instance.
- @return Returns the status code of the execution.
- @since 10
- @version 1.0*/
- pub fn OH_NativeXComponent_GetKeyEventCode(
- keyEvent: *mut OH_NativeXComponent_KeyEvent,
- code: *mut OH_NativeXComponent_KeyCode,
- ) -> i32;
- /** @brief Obtains the sourceType of the key event.
-
- @param keyEvent Indicates the pointer to this OH_NativeXComponent_KeyEvent instance.
- @param sourceType Indicates the sourceType of the OH_NativeXComponent_KeyEvent instance.
- @return Returns the status code of the execution.
- @since 10
- @version 1.0*/
- pub fn OH_NativeXComponent_GetKeyEventSourceType(
- keyEvent: *mut OH_NativeXComponent_KeyEvent,
- sourceType: *mut OH_NativeXComponent_EventSourceType,
- ) -> i32;
- /** @brief Obtains the deviceId of the key event.
-
- @param keyEvent Indicates the pointer to this OH_NativeXComponent_KeyEvent instance.
- @param deviceId Indicates the deviceId of the OH_NativeXComponent_KeyEvent instance.
- @return Returns the status code of the execution.
- @since 10
- @version 1.0*/
- pub fn OH_NativeXComponent_GetKeyEventDeviceId(
- keyEvent: *mut OH_NativeXComponent_KeyEvent,
- deviceId: *mut i64,
- ) -> i32;
- /** @brief Obtains the timestamp of the key event.
-
- @param keyEvent Indicates the pointer to this OH_NativeXComponent_KeyEvent instance.
- @param timestamp Indicates the timestamp of the OH_NativeXComponent_KeyEvent instance.
- @return Returns the status code of the execution.
- @since 10
- @version 1.0*/
- pub fn OH_NativeXComponent_GetKeyEventTimestamp(
- keyEvent: *mut OH_NativeXComponent_KeyEvent,
- timestamp: *mut i64,
- ) -> i32;
-}
diff --git a/components/xcomponent/src/xcomponent_arkui_ffi.rs b/components/xcomponent/src/xcomponent_arkui_ffi.rs
new file mode 100644
index 0000000..24db684
--- /dev/null
+++ b/components/xcomponent/src/xcomponent_arkui_ffi.rs
@@ -0,0 +1,84 @@
+/* automatically generated by rust-bindgen 0.71.1 */
+
+#![allow(non_upper_case_globals)]
+#![allow(non_camel_case_types)]
+#![allow(non_snake_case)]
+use super::xcomponent_ffi::*;
+use arkui_sys::native_type::ArkUI_NodeHandle;
+use arkui_sys::ui_input_event::{ArkUI_UIInputEvent, ArkUI_UIInputEvent_Type, HitTestMode};
+
+extern "C" {
+ /** @brief Attaches the UI component created through the native API of ArkUI to this OH_NativeXComponent instance.
+
+ @param component Indicates the pointer to the OH_NativeXComponent instance.
+ @param root Indicates the pointer to the component instance created by the native API.
+ @return Returns the error code.
+ Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
+
+ @since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+ pub fn OH_NativeXComponent_AttachNativeRootNode(
+ component: *mut OH_NativeXComponent,
+ root: ArkUI_NodeHandle,
+ ) -> i32;
+ /** @brief Detaches the native component of ArkUI from this OH_NativeXComponent instance.
+
+ @param component Indicates the pointer to the OH_NativeXComponent instance.
+ @param root Indicates the pointer to the component instance created by the native API.
+ @return Returns the error code.
+ Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
+
+ @since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+ pub fn OH_NativeXComponent_DetachNativeRootNode(
+ component: *mut OH_NativeXComponent,
+ root: ArkUI_NodeHandle,
+ ) -> i32;
+ /** @brief Registers a UI input event callback for this OH_NativeXComponent instance and enables the callback to
+ be invoked when a UI input event is received.
+
+ @param component Indicates the pointer to the OH_NativeXComponent instance.
+ @param callback Indicates the pointer to the UI input event callback.
+ @param type Indicates the type of the current UI input event.
+ @return Returns the error code.
+ Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
+ @since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+ pub fn OH_NativeXComponent_RegisterUIInputEventCallback(
+ component: *mut OH_NativeXComponent,
+ callback: ::core::option::Option<
+ unsafe extern "C" fn(
+ component: *mut OH_NativeXComponent,
+ event: *mut ArkUI_UIInputEvent,
+ type_: ArkUI_UIInputEvent_Type,
+ ),
+ >,
+ type_: ArkUI_UIInputEvent_Type,
+ ) -> i32;
+ /** @brief Registers a custom event intercept callback for this OH_NativeXComponent and enables the callback
+ during the hit test.
+
+ @param component Indicates the pointer to the OH_NativeXComponent instance.
+ @param callback Indicates the pointer to the custom event intercept callback.
+ @return Returns the error code.
+ Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
+ @since 12*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+ pub fn OH_NativeXComponent_RegisterOnTouchInterceptCallback(
+ component: *mut OH_NativeXComponent,
+ callback: ::core::option::Option<
+ unsafe extern "C" fn(
+ component: *mut OH_NativeXComponent,
+ event: *mut ArkUI_UIInputEvent,
+ ) -> HitTestMode,
+ >,
+ ) -> i32;
+}
diff --git a/components/xcomponent/src/xcomponent_api11.rs b/components/xcomponent/src/xcomponent_ffi.rs
similarity index 90%
rename from components/xcomponent/src/xcomponent_api11.rs
rename to components/xcomponent/src/xcomponent_ffi.rs
index f64c08e..9274e14 100644
--- a/components/xcomponent/src/xcomponent_api11.rs
+++ b/components/xcomponent/src/xcomponent_ffi.rs
@@ -1,4 +1,4 @@
-/* automatically generated by rust-bindgen 0.69.4 */
+/* automatically generated by rust-bindgen 0.71.1 */
#![allow(non_upper_case_globals)]
#![allow(non_camel_case_types)]
@@ -1035,19 +1035,6 @@ impl OH_NativeXComponent_KeyAction {
pub struct OH_NativeXComponent_KeyAction(pub ::core::ffi::c_int);
pub const OH_XCOMPONENT_ID_LEN_MAX: u32 = 128;
pub const OH_MAX_TOUCH_POINTS_NUMBER: u32 = 10;
-/// Successful.
-pub const OH_NATIVEXCOMPONENT_RESULT_SUCCESS: _bindgen_ty_1 = _bindgen_ty_1(0);
-/// Failed.
-pub const OH_NATIVEXCOMPONENT_RESULT_FAILED: _bindgen_ty_1 = _bindgen_ty_1(-1);
-/// Invalid parameters.
-pub const OH_NATIVEXCOMPONENT_RESULT_BAD_PARAMETER: _bindgen_ty_1 = _bindgen_ty_1(-2);
-#[repr(transparent)]
-/** @brief Enumerates the API access states.
-
-@since 8
-@version 1.0*/
-#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
-pub struct _bindgen_ty_1(pub ::core::ffi::c_int);
impl OH_NativeXComponent_TouchEventType {
/// Trigger a touch event when a finger is pressed.
pub const OH_NATIVEXCOMPONENT_DOWN: OH_NativeXComponent_TouchEventType =
@@ -1423,6 +1410,8 @@ pub struct OH_NativeXComponent_KeyEvent {
@since 11
@version 1.0*/
+#[cfg(feature = "api-11")]
+#[cfg_attr(docsrs, doc(cfg(feature = "api-11")))]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_NativeXComponent_ExpectedRateRange {
@@ -1532,6 +1521,86 @@ extern "C" {
pointIndex: u32,
tiltY: *mut f32,
) -> i32;
+ /** @brief Obtains the x coordinate of a specific touch point relative to the upper left corner of\n
+ the current application window from the ArkUI XComponent.
+
+ @param component Indicates the pointer to this OH_NativeXComponent instance.
+ @param pointIndex Indicates the pointer index in the touchPoints.
+ @param windowX Indicates the x coordinate relative to the upper left corner of the current\n
+ application window.
+ @return Returns the status code of the execution.
+ {@link OH_NATIVEXCOMPONENT_RESULT_SUCCESS} get windowX success.
+ {@link OH_NATIVEXCOMPONENT_RESULT_BAD_PARAMETER} component is NULL, windowX is NULL\n
+ or native XComponent is NULL.
+ @since 12
+ @version 1.0*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+ pub fn OH_NativeXComponent_GetTouchPointWindowX(
+ component: *mut OH_NativeXComponent,
+ pointIndex: u32,
+ windowX: *mut f32,
+ ) -> i32;
+ /** @brief Obtains the y coordinate of a specific touch point relative to the upper left corner of\n
+ the current application window from the ArkUI XComponent.
+
+ @param component Indicates the pointer to this OH_NativeXComponent instance.
+ @param pointIndex Indicates the pointer index in the touchPoints.
+ @param windowY Indicates the y coordinate relative to the upper left corner of the current\n
+ application window.
+ @return Returns the status code of the execution.
+ {@link OH_NATIVEXCOMPONENT_RESULT_SUCCESS} get windowY success.
+ {@link OH_NATIVEXCOMPONENT_RESULT_BAD_PARAMETER} component is NULL, windowY is NULL\n
+ or native XComponent is NULL.
+ @since 12
+ @version 1.0*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+ pub fn OH_NativeXComponent_GetTouchPointWindowY(
+ component: *mut OH_NativeXComponent,
+ pointIndex: u32,
+ windowY: *mut f32,
+ ) -> i32;
+ /** @brief Obtains the x coordinate of a specific touch point relative to the upper left corner of\n
+ the current screen from the ArkUI XComponent.
+
+ @param component Indicates the pointer to this OH_NativeXComponent instance.
+ @param pointIndex Indicates the pointer index in the touchPoints.
+ @param displayX Indicates the x coordinate relative to the upper left corner of the current\n
+ screen.
+ @return Returns the status code of the execution.
+ {@link OH_NATIVEXCOMPONENT_RESULT_SUCCESS} get displayX success.
+ {@link OH_NATIVEXCOMPONENT_RESULT_BAD_PARAMETER} component is NULL, displayX is NULL\n
+ or native XComponent is NULL.
+ @since 12
+ @version 1.0*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+ pub fn OH_NativeXComponent_GetTouchPointDisplayX(
+ component: *mut OH_NativeXComponent,
+ pointIndex: u32,
+ displayX: *mut f32,
+ ) -> i32;
+ /** @brief Obtains the y coordinate of a specific touch point relative to the upper left corner of\n
+ the current screen from the ArkUI XComponent.
+
+ @param component Indicates the pointer to this OH_NativeXComponent instance.
+ @param pointIndex Indicates the pointer index in the touchPoints.
+ @param displayY Indicates the y coordinate relative to the upper left corner of the current\n
+ screen.
+ @return Returns the status code of the execution.
+ {@link OH_NATIVEXCOMPONENT_RESULT_SUCCESS} get displayY success.
+ {@link OH_NATIVEXCOMPONENT_RESULT_BAD_PARAMETER} component is NULL, displayY is NULL\n
+ or native XComponent is NULL.
+ @since 12
+ @version 1.0*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+ pub fn OH_NativeXComponent_GetTouchPointDisplayY(
+ component: *mut OH_NativeXComponent,
+ pointIndex: u32,
+ displayY: *mut f32,
+ ) -> i32;
/** @brief Obtains the touch event dispatched by the ArkUI XComponent.
@param component Indicates the pointer to this OH_NativeXComponent instance.
@@ -1702,6 +1771,8 @@ extern "C" {
@return Returns the status code of the execution.
@since 11
@version 1.0*/
+ #[cfg(feature = "api-11")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-11")))]
pub fn OH_NativeXComponent_SetExpectedFrameRateRange(
component: *mut OH_NativeXComponent,
range: *mut OH_NativeXComponent_ExpectedRateRange,
@@ -1713,6 +1784,8 @@ extern "C" {
@return Returns the status code of the execution.
@since 11
@version 1.0*/
+ #[cfg(feature = "api-11")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-11")))]
pub fn OH_NativeXComponent_RegisterOnFrameCallback(
component: *mut OH_NativeXComponent,
callback: ::core::option::Option<
@@ -1729,7 +1802,75 @@ extern "C" {
@return Returns the status code of the execution.
@since 11
@version 1.0*/
+ #[cfg(feature = "api-11")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-11")))]
pub fn OH_NativeXComponent_UnregisterOnFrameCallback(
component: *mut OH_NativeXComponent,
) -> i32;
+ /** @brief Registers a callback for this OH_NativeXComponent instance.
+
+ @param component Indicates the pointer to this OH_NativeXComponent instance.
+ @param callback Indicates the pointer to a surface show event callback.
+ @return Returns the status code of the execution.
+ @since 12
+ @version 1.0*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+ pub fn OH_NativeXComponent_RegisterSurfaceShowCallback(
+ component: *mut OH_NativeXComponent,
+ callback: ::core::option::Option<
+ unsafe extern "C" fn(
+ component: *mut OH_NativeXComponent,
+ window: *mut ::core::ffi::c_void,
+ ),
+ >,
+ ) -> i32;
+ /** @brief Registers a callback for this OH_NativeXComponent instance.
+
+ @param component Indicates the pointer to this OH_NativeXComponent instance.
+ @param callback Indicates the pointer to a surface hide event callback.
+ @return Returns the status code of the execution.
+ @since 12
+ @version 1.0*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+ pub fn OH_NativeXComponent_RegisterSurfaceHideCallback(
+ component: *mut OH_NativeXComponent,
+ callback: ::core::option::Option<
+ unsafe extern "C" fn(
+ component: *mut OH_NativeXComponent,
+ window: *mut ::core::ffi::c_void,
+ ),
+ >,
+ ) -> i32;
+ /** @brief Set whether the OH_NativeXComponent instance needs soft keyboard.
+ @param component Indicates the pointer to this OH_NativeXComponent instance.
+ @param needSoftKeyboard Indicates whether the OH_NativeXComponent instance needs soft keyboard or not.
+ Default value is false.
+ @return Returns the status code of the execution.
+ @since 12
+ @version 1.0*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+ pub fn OH_NativeXComponent_SetNeedSoftKeyboard(
+ component: *mut OH_NativeXComponent,
+ needSoftKeyboard: bool,
+ ) -> i32;
+ /** @brief Obtains the touch event's source type dispatched by the ArkUI XComponent.
+
+ @param component Indicates the pointer to this OH_NativeXComponent instance.
+ @param pointId Indicates the id of the touch point which triggers this touch event.
+ @param sourceType Indicates the source type of this touch event.
+ @return Returns OH_NATIVEXCOMPONENT_RESULT_SUCCESS if success.
+ Returns OH_NATIVEXCOMPONENT_RESULT_BAD_PARAMETER if a parameter exception occurs.
+ Returns OH_NATIVEXCOMPONENT_RESULT_FAILED if other exceptions occur.
+ @since 12
+ @version 1.0*/
+ #[cfg(feature = "api-12")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
+ pub fn OH_NativeXComponent_GetTouchEventSourceType(
+ component: *mut OH_NativeXComponent,
+ pointId: i32,
+ sourceType: *mut OH_NativeXComponent_EventSourceType,
+ ) -> i32;
}
diff --git a/components/xcomponent/src/xcomponent_result_ffi.rs b/components/xcomponent/src/xcomponent_result_ffi.rs
new file mode 100644
index 0000000..4856c40
--- /dev/null
+++ b/components/xcomponent/src/xcomponent_result_ffi.rs
@@ -0,0 +1,18 @@
+/* automatically generated by rust-bindgen 0.71.1 */
+
+#![allow(non_upper_case_globals)]
+#![allow(non_camel_case_types)]
+#![allow(non_snake_case)]
+#![allow(unused)]
+
+/// Successful.
+pub const OH_NATIVEXCOMPONENT_RESULT_SUCCESS: _bindgen_ty_11 = 0;
+/// Failed.
+pub const OH_NATIVEXCOMPONENT_RESULT_FAILED: _bindgen_ty_11 = -1;
+/// Invalid parameters.
+pub const OH_NATIVEXCOMPONENT_RESULT_BAD_PARAMETER: _bindgen_ty_11 = -2;
+/** @brief Enumerates the API access states.
+
+@since 8
+@version 1.0*/
+pub type _bindgen_ty_11 = ::core::ffi::c_int;
diff --git a/scripts/generator/Cargo.lock b/scripts/generator/Cargo.lock
index 127b4f7..f9abaa0 100644
--- a/scripts/generator/Cargo.lock
+++ b/scripts/generator/Cargo.lock
@@ -1,6 +1,6 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
-version = 3
+version = 4
[[package]]
name = "aho-corasick"
@@ -19,9 +19,8 @@ checksum = "4c95c10ba0b00a02636238b814946408b1322d5ac4760326e6fb8ec956d85775"
[[package]]
name = "bindgen"
-version = "0.70.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f49d8fed880d473ea71efb9bf597651e77201bdd4893efe54c9e5d65ae04ce6f"
+version = "0.71.1"
+source = "git+https://github.com/openharmony-rs/rust-bindgen.git?branch=jschwender%2Fdoc_cfg#4ebdbe9728ec5e039c92997a7a598c30f0d370be"
dependencies = [
"bitflags",
"cexpr",
@@ -69,6 +68,15 @@ dependencies = [
"libloading",
]
+[[package]]
+name = "doxygen-rs"
+version = "0.4.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "415b6ec780d34dcf624666747194393603d0373b7141eef01d12ee58881507d9"
+dependencies = [
+ "phf",
+]
+
[[package]]
name = "either"
version = "1.13.0"
@@ -82,6 +90,8 @@ dependencies = [
"anyhow",
"bindgen",
"clang-sys",
+ "doxygen-rs",
+ "thiserror",
]
[[package]]
@@ -143,6 +153,48 @@ dependencies = [
"minimal-lexical",
]
+[[package]]
+name = "phf"
+version = "0.11.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc"
+dependencies = [
+ "phf_macros",
+ "phf_shared",
+]
+
+[[package]]
+name = "phf_generator"
+version = "0.11.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "48e4cc64c2ad9ebe670cb8fd69dd50ae301650392e81c05f9bfcb2d5bdbc24b0"
+dependencies = [
+ "phf_shared",
+ "rand",
+]
+
+[[package]]
+name = "phf_macros"
+version = "0.11.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3444646e286606587e49f3bcf1679b8cef1dc2c5ecc29ddacaffc305180d464b"
+dependencies = [
+ "phf_generator",
+ "phf_shared",
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "phf_shared"
+version = "0.11.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "90fcb95eef784c2ac79119d1dd819e162b5da872ce6f3c3abe1e8ca1c082f72b"
+dependencies = [
+ "siphasher",
+]
+
[[package]]
name = "prettyplease"
version = "0.2.25"
@@ -171,6 +223,21 @@ dependencies = [
"proc-macro2",
]
+[[package]]
+name = "rand"
+version = "0.8.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404"
+dependencies = [
+ "rand_core",
+]
+
+[[package]]
+name = "rand_core"
+version = "0.6.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c"
+
[[package]]
name = "regex"
version = "1.11.1"
@@ -202,9 +269,9 @@ checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c"
[[package]]
name = "rustc-hash"
-version = "1.1.0"
+version = "2.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2"
+checksum = "c7fb8039b3032c191086b10f11f319a6e99e1e82889c5cc6046f515c9db1d497"
[[package]]
name = "shlex"
@@ -212,6 +279,12 @@ version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
+[[package]]
+name = "siphasher"
+version = "0.3.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d"
+
[[package]]
name = "syn"
version = "2.0.87"
@@ -223,6 +296,26 @@ dependencies = [
"unicode-ident",
]
+[[package]]
+name = "thiserror"
+version = "2.0.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f072643fd0190df67a8bab670c20ef5d8737177d6ac6b2e9a236cb096206b2cc"
+dependencies = [
+ "thiserror-impl",
+]
+
+[[package]]
+name = "thiserror-impl"
+version = "2.0.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7b50fa271071aae2e6ee85f842e2e28ba8cd2c5fb67f11fcb1fd70b276f9e7d4"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
[[package]]
name = "unicode-ident"
version = "1.0.13"
diff --git a/scripts/generator/Cargo.toml b/scripts/generator/Cargo.toml
index 042a056..03d32c2 100644
--- a/scripts/generator/Cargo.toml
+++ b/scripts/generator/Cargo.toml
@@ -6,10 +6,13 @@ publish = false
description = "Internal tool to generate the ohos-sys bindings"
[dependencies]
-bindgen = { version = "=0.70.1", features = ["prettyplease"] }
+# We currently use a fork of bindgen with some features that haven't been upstreamed yet.
+bindgen = { features = ["prettyplease"], git = "https://github.com/openharmony-rs/rust-bindgen.git", branch = "jschwender/doc_cfg" }
anyhow = "1.0.93"
# Keep this feature in sync with the clang version of the SDK.
clang-sys = { version = "1.8.1", features = ["clang_15_0"] }
+doxygen-rs = "0.4"
+thiserror = "2.0.9"
[profile.dev.package."*"]
opt-level = 2
diff --git a/scripts/generator/src/main.rs b/scripts/generator/src/main.rs
index 95f6dfd..1966293 100644
--- a/scripts/generator/src/main.rs
+++ b/scripts/generator/src/main.rs
@@ -1,7 +1,10 @@
use std::fs;
+use std::num::ParseIntError;
use anyhow::{anyhow, bail, Context};
-use bindgen::{EnumVariation, Formatter};
+use bindgen::{CodeGenAttributes, EnumVariation, Formatter};
use std::path::{Path, PathBuf};
+use std::str::FromStr;
+use thiserror::Error;
/// Parse the api version
///
@@ -25,13 +28,126 @@ fn parse_api_version(sdk_native_dir: &Path) -> anyhow::Result {
Ok(api_version)
}
+#[derive(Copy, Clone, PartialEq, Ord, PartialOrd, Eq)]
+enum OpenHarmonyApiLevel {
+ Eight = 8,
+ Nine = 9,
+ Ten = 10,
+ Eleven = 11,
+ Twelve = 12,
+ Thirteen = 13,
+ Fourteen = 14,
+}
+
+#[derive(Error, Debug)]
+enum ApiLevelParseError {
+ #[error("Could not parse API level from interger: {0:?}")]
+ ParseIntError(#[from] ParseIntError),
+ #[error("Unknown API level {0}! Perhaps we need an update")]
+ UnknownApiVersion(u32),
+}
+
+impl TryFrom<&str> for OpenHarmonyApiLevel {
+ type Error = ApiLevelParseError;
+
+ fn try_from(api_level: &str) -> Result {
+ let num: u32 = api_level.parse()?;
+ let level = match num {
+ 8 => OpenHarmonyApiLevel::Eight,
+ 9 => OpenHarmonyApiLevel::Nine,
+ 10 => OpenHarmonyApiLevel::Ten,
+ 11 => OpenHarmonyApiLevel::Eleven,
+ 12 => OpenHarmonyApiLevel::Twelve,
+ 13 => OpenHarmonyApiLevel::Thirteen,
+ 14 => OpenHarmonyApiLevel::Fourteen,
+ other => { return Err(ApiLevelParseError::UnknownApiVersion(other)); }
+ };
+ Ok(level)
+ }
+}
+
+#[derive(Error, Debug)]
+enum ParseDeprecatedError {
+ #[error("Could not parse API level: {0:?}")]
+ ApiLevelParseError(#[from] ApiLevelParseError),
+ #[error("Failed to find @deprecated in line: {0}")]
+ InvalidLine(String),
+}
+
+#[derive(Debug)]
+struct DoxygenCommentCb;
+
+fn parse_deprecated_since(line: &str) -> Result