Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix missing documentation for overlapping typedefs #81

Merged
merged 1 commit into from
Feb 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions components/arkui/src/drag_and_drop/drag_and_drop_ffi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,22 +117,52 @@ impl ArkUI_DragStatus {
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_DragStatus(pub ::core::ffi::c_int);
/// Defines a struct for a component event.
///
///
/// Available since API-level: 12
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
#[repr(C)]
pub struct ArkUI_NodeEvent {
_unused: [u8; 0],
}
/// Defines a struct for a drag event.
///
///
/// Available since API-level: 12
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
#[repr(C)]
pub struct ArkUI_DragEvent {
_unused: [u8; 0],
}
/// Defines a struct for custom drag preview options.
///
///
/// Available since API-level: 12
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
#[repr(C)]
pub struct ArkUI_DragPreviewOption {
_unused: [u8; 0],
}
/// Defines a struct for a drag action.
///
///
/// Available since API-level: 12
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
#[repr(C)]
pub struct ArkUI_DragAction {
_unused: [u8; 0],
}
/// Defines a struct for drag and drop information returned through a drag status listener.
///
///
/// Available since API-level: 12
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
#[repr(C)]
pub struct ArkUI_DragAndDropInfo {
_unused: [u8; 0],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@
use crate::native_type::*;
pub use ohos_sys_opaque_types::OH_PixelmapNative;

/// Defines the drawable descriptor.
///
///
/// Available since API-level: 12
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
#[repr(C)]
pub struct ArkUI_DrawableDescriptor {
_unused: [u8; 0],
Expand Down
42 changes: 42 additions & 0 deletions components/arkui/src/native_animate/native_animate_ffi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,22 @@ pub struct ArkUI_AnimateCompleteCallback {
/// Custom type.
pub userData: *mut ::core::ffi::c_void,
}
/// Defines the animation configuration.
///
///
/// Available since API-level: 12
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
#[repr(C)]
pub struct ArkUI_AnimateOption {
_unused: [u8; 0],
}
/// Defines an interpolation curve.
///
///
/// Available since API-level: 12
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
#[repr(C)]
pub struct ArkUI_Curve {
_unused: [u8; 0],
Expand All @@ -51,10 +63,22 @@ pub struct ArkUI_Curve {
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub type ArkUI_CurveHandle = *mut ArkUI_Curve;
/// Defines the keyframe animation parameter object.
///
///
/// Available since API-level: 12
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
#[repr(C)]
pub struct ArkUI_KeyframeAnimateOption {
_unused: [u8; 0],
}
/// Defines the animator parameter object.
///
///
/// Available since API-level: 12
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
#[repr(C)]
pub struct ArkUI_AnimatorOption {
_unused: [u8; 0],
Expand All @@ -70,14 +94,32 @@ pub struct ArkUI_Animator {
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub type ArkUI_AnimatorHandle = *mut ArkUI_Animator;
/// Defines the animator callback event object.
///
///
/// Available since API-level: 12
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
#[repr(C)]
pub struct ArkUI_AnimatorEvent {
_unused: [u8; 0],
}
/// Defines the callback object when the animator receives a frame.
///
///
/// Available since API-level: 12
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
#[repr(C)]
pub struct ArkUI_AnimatorOnFrameEvent {
_unused: [u8; 0],
}
/// Defines the transition effect.
///
///
/// Available since API-level: 12
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
#[repr(C)]
pub struct ArkUI_TransitionEffect {
_unused: [u8; 0],
Expand Down
6 changes: 6 additions & 0 deletions components/arkui/src/native_dialog/native_dialog_ffi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ pub struct ArkUI_DismissReason(pub ::core::ffi::c_uint);
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub type ArkUI_OnWillDismissEvent =
::core::option::Option<unsafe extern "C" fn(reason: i32) -> bool>;
/// Defines a struct for a dialog box dismiss event.
///
///
/// Available since API-level: 12
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
#[repr(C)]
pub struct ArkUI_DialogDismissEvent {
_unused: [u8; 0],
Expand Down
30 changes: 30 additions & 0 deletions components/arkui/src/native_gesture/native_gesture_ffi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,32 @@
use crate::native_type::*;
use crate::ui_input_event::ArkUI_UIInputEvent;

/// Defines a gesture recognizer.
///
///
/// Available since API-level: 12
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
#[repr(C)]
pub struct ArkUI_GestureRecognizer {
_unused: [u8; 0],
}
/// Defines the gesture interruption information.
///
///
/// Available since API-level: 12
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
#[repr(C)]
pub struct ArkUI_GestureInterruptInfo {
_unused: [u8; 0],
}
/// Defines the gesture event.
///
///
/// Available since API-level: 12
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
#[repr(C)]
pub struct ArkUI_GestureEvent {
_unused: [u8; 0],
Expand Down Expand Up @@ -239,10 +257,22 @@ pub type ArkUI_GestureRecognizerHandle = *mut ArkUI_GestureRecognizer;
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub type ArkUI_GestureRecognizerHandleArray = *mut ArkUI_GestureRecognizerHandle;
/// Defines a <b>GestureEventTargetInfo</b> object that provides information about a gesture event target.
///
///
/// Available since API-level: 12
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
#[repr(C)]
pub struct ArkUI_GestureEventTargetInfo {
_unused: [u8; 0],
}
/// Defines a parallel internal gesture event.
///
///
/// Available since API-level: 12
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
#[repr(C)]
pub struct ArkUI_ParallelInnerGestureEvent {
_unused: [u8; 0],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,32 @@
use crate::native_type::*;
use ohos_sys_opaque_types::ArkUI_AccessibilityProvider;

/// Defines a struct for accessibility element information.
///
///
/// Available since API-level: 13
#[cfg(feature = "api-13")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-13")))]
#[repr(C)]
pub struct ArkUI_AccessibilityElementInfo {
_unused: [u8; 0],
}
/// Defines a struct for accessibility event information.
///
///
/// Available since API-level: 13
#[cfg(feature = "api-13")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-13")))]
#[repr(C)]
pub struct ArkUI_AccessibilityEventInfo {
_unused: [u8; 0],
}
/// Defines a struct for accessibility action arguments.
///
///
/// Available since API-level: 13
#[cfg(feature = "api-13")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-13")))]
#[repr(C)]
pub struct ArkUI_AccessibilityActionArguments {
_unused: [u8; 0],
Expand Down Expand Up @@ -324,6 +342,12 @@ impl ArkUI_AccessibilityFocusMoveDirection {
#[cfg_attr(docsrs, doc(cfg(feature = "api-13")))]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_AccessibilityFocusMoveDirection(pub ::core::ffi::c_uint);
/// Defines a struct for the accessibility element information list.
///
///
/// Available since API-level: 13
#[cfg(feature = "api-13")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-13")))]
#[repr(C)]
pub struct ArkUI_AccessibilityElementInfoList {
_unused: [u8; 0],
Expand Down
23 changes: 23 additions & 0 deletions components/arkui/src/native_node/native_node_ffi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7809,6 +7809,12 @@ impl ArkUI_NodeEventType {
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_NodeEventType(pub ::core::ffi::c_uint);
/// Defines the common structure type of a component event.
///
///
/// Available since API-level: 12
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
#[repr(C)]
pub struct ArkUI_NodeEvent {
_unused: [u8; 0],
Expand Down Expand Up @@ -7862,6 +7868,12 @@ impl ArkUI_NodeCustomEventType {
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_NodeCustomEventType(pub ::core::ffi::c_uint);
/// Defines the general structure of a custom component event.
///
///
/// Available since API-level: 12
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
#[repr(C)]
pub struct ArkUI_NodeCustomEvent {
_unused: [u8; 0],
Expand All @@ -7877,6 +7889,12 @@ pub struct ArkUI_NodeAdapter {
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub type ArkUI_NodeAdapterHandle = *mut ArkUI_NodeAdapter;
/// Defines the component adapter event.
///
///
/// Available since API-level: 12
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
#[repr(C)]
pub struct ArkUI_NodeAdapterEvent {
_unused: [u8; 0],
Expand Down Expand Up @@ -8628,6 +8646,11 @@ impl ArkUI_NodeContentEventType {
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_NodeContentEventType(pub ::core::ffi::c_uint);
/// Defines the general structure of a node content event.
///
/// Available since API-level: 12
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
#[repr(C)]
pub struct ArkUI_NodeContentEvent {
_unused: [u8; 0],
Expand Down
Loading