objc2-core-motion 0.3.2

Bindings to the CoreMotion framework
Documentation
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;

use crate::*;

extern_class!(
    /// [Apple's documentation](https://developer.apple.com/documentation/coremotion/cmambientpressuredata?language=objc)
    #[unsafe(super(CMLogItem, NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "CMLogItem")]
    pub struct CMAmbientPressureData;
);

#[cfg(feature = "CMLogItem")]
extern_conformance!(
    unsafe impl NSCoding for CMAmbientPressureData {}
);

#[cfg(feature = "CMLogItem")]
extern_conformance!(
    unsafe impl NSCopying for CMAmbientPressureData {}
);

#[cfg(feature = "CMLogItem")]
unsafe impl CopyingHelper for CMAmbientPressureData {
    type Result = Self;
}

#[cfg(feature = "CMLogItem")]
extern_conformance!(
    unsafe impl NSObjectProtocol for CMAmbientPressureData {}
);

#[cfg(feature = "CMLogItem")]
extern_conformance!(
    unsafe impl NSSecureCoding for CMAmbientPressureData {}
);

#[cfg(feature = "CMLogItem")]
impl CMAmbientPressureData {
    extern_methods!(
        /// Discussion:
        /// The pressure as measured by the pressure sensor.
        /// Pressure is in kPa (kilopascals).
        #[unsafe(method(pressure))]
        #[unsafe(method_family = none)]
        pub unsafe fn pressure(&self) -> Retained<NSMeasurement<NSUnitPressure>>;

        /// Discussion:
        /// The temperature as measured by the pressure sensor.
        /// Temperature is in C (degrees centrigrade).
        #[unsafe(method(temperature))]
        #[unsafe(method_family = none)]
        pub unsafe fn temperature(&self) -> Retained<NSMeasurement<NSUnitTemperature>>;
    );
}

/// Methods declared on superclass `NSObject`.
#[cfg(feature = "CMLogItem")]
impl CMAmbientPressureData {
    extern_methods!(
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new() -> Retained<Self>;
    );
}