objc2_metric_kit/generated/
MXAnimationMetric.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9extern_class!(
10    /// An MXMetric subclass that encapsulates app animation metrics.
11    ///
12    /// See also [Apple's documentation](https://developer.apple.com/documentation/metrickit/mxanimationmetric?language=objc)
13    #[unsafe(super(MXMetric, NSObject))]
14    #[derive(Debug, PartialEq, Eq, Hash)]
15    #[cfg(feature = "MXMetric")]
16    pub struct MXAnimationMetric;
17);
18
19#[cfg(feature = "MXMetric")]
20unsafe impl NSCoding for MXAnimationMetric {}
21
22#[cfg(feature = "MXMetric")]
23unsafe impl NSObjectProtocol for MXAnimationMetric {}
24
25#[cfg(feature = "MXMetric")]
26unsafe impl NSSecureCoding for MXAnimationMetric {}
27
28#[cfg(feature = "MXMetric")]
29impl MXAnimationMetric {
30    extern_methods!(
31        /// Ratio of time the application spent hitching while scrolling.
32        ///
33        /// Scroll hitches are user perceptible animation issues that occur during scrolling.
34        ///
35        /// This metric only applies to UIScrollViews.
36        ///
37        /// Dimensionless.
38        #[unsafe(method(scrollHitchTimeRatio))]
39        #[unsafe(method_family = none)]
40        pub unsafe fn scrollHitchTimeRatio(&self) -> Retained<NSMeasurement<NSUnit>>;
41    );
42}
43
44/// Methods declared on superclass `NSObject`.
45#[cfg(feature = "MXMetric")]
46impl MXAnimationMetric {
47    extern_methods!(
48        #[unsafe(method(init))]
49        #[unsafe(method_family = init)]
50        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
51
52        #[unsafe(method(new))]
53        #[unsafe(method_family = new)]
54        pub unsafe fn new() -> Retained<Self>;
55    );
56}