icrate 0.0.1

Bindings to Apple's frameworks
Documentation
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use crate::common::*;
use crate::Foundation::*;

__inner_extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct NSMeasurement<UnitType: Message = Object, UnitTypeOwnership: Ownership = Shared> {
        _inner0: PhantomData<*mut (UnitType, UnitTypeOwnership)>,
        notunwindsafe: PhantomData<&'static mut ()>,
    }

    unsafe impl<UnitType: Message, UnitTypeOwnership: Ownership> ClassType
        for NSMeasurement<UnitType, UnitTypeOwnership>
    {
        type Super = NSObject;
    }
);

extern_methods!(
    unsafe impl<UnitType: Message, UnitTypeOwnership: Ownership>
        NSMeasurement<UnitType, UnitTypeOwnership>
    {
        #[method_id(@__retain_semantics Other unit)]
        pub unsafe fn unit(&self) -> Id<UnitType, Shared>;

        #[method(doubleValue)]
        pub unsafe fn doubleValue(&self) -> c_double;

        #[method_id(@__retain_semantics Init init)]
        pub unsafe fn init(this: Option<Allocated<Self>>) -> Id<Self, Shared>;

        #[method_id(@__retain_semantics Init initWithDoubleValue:unit:)]
        pub unsafe fn initWithDoubleValue_unit(
            this: Option<Allocated<Self>>,
            doubleValue: c_double,
            unit: &UnitType,
        ) -> Id<Self, Shared>;

        #[method(canBeConvertedToUnit:)]
        pub unsafe fn canBeConvertedToUnit(&self, unit: &NSUnit) -> bool;

        #[method_id(@__retain_semantics Other measurementByConvertingToUnit:)]
        pub unsafe fn measurementByConvertingToUnit(
            &self,
            unit: &NSUnit,
        ) -> Id<NSMeasurement, Shared>;

        #[method_id(@__retain_semantics Other measurementByAddingMeasurement:)]
        pub unsafe fn measurementByAddingMeasurement(
            &self,
            measurement: &NSMeasurement<UnitType>,
        ) -> Id<NSMeasurement<UnitType>, Shared>;

        #[method_id(@__retain_semantics Other measurementBySubtractingMeasurement:)]
        pub unsafe fn measurementBySubtractingMeasurement(
            &self,
            measurement: &NSMeasurement<UnitType>,
        ) -> Id<NSMeasurement<UnitType>, Shared>;
    }
);