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")]
20extern_conformance!(
21    unsafe impl NSCoding for MXAnimationMetric {}
22);
23
24#[cfg(feature = "MXMetric")]
25extern_conformance!(
26    unsafe impl NSObjectProtocol for MXAnimationMetric {}
27);
28
29#[cfg(feature = "MXMetric")]
30extern_conformance!(
31    unsafe impl NSSecureCoding for MXAnimationMetric {}
32);
33
34#[cfg(feature = "MXMetric")]
35impl MXAnimationMetric {
36    extern_methods!(
37        /// Ratio of time the application spent hitching while scrolling.
38        ///
39        /// Scroll hitches are user perceptible animation issues that occur during scrolling.
40        ///
41        /// This metric only applies to UIScrollViews.
42        ///
43        /// Dimensionless.
44        #[unsafe(method(scrollHitchTimeRatio))]
45        #[unsafe(method_family = none)]
46        pub unsafe fn scrollHitchTimeRatio(&self) -> Retained<NSMeasurement<NSUnit>>;
47    );
48}
49
50/// Methods declared on superclass `NSObject`.
51#[cfg(feature = "MXMetric")]
52impl MXAnimationMetric {
53    extern_methods!(
54        #[unsafe(method(init))]
55        #[unsafe(method_family = init)]
56        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
57
58        #[unsafe(method(new))]
59        #[unsafe(method_family = new)]
60        pub unsafe fn new() -> Retained<Self>;
61    );
62}