objc2-core-ml 0.3.2

Bindings to the CoreML 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!(
    /// MLImageConstraint
    ///
    /// Constraint on image properties.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/coreml/mlimageconstraint?language=objc)
    #[unsafe(super(NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct MLImageConstraint;
);

extern_conformance!(
    unsafe impl NSCoding for MLImageConstraint {}
);

extern_conformance!(
    unsafe impl NSObjectProtocol for MLImageConstraint {}
);

extern_conformance!(
    unsafe impl NSSecureCoding for MLImageConstraint {}
);

impl MLImageConstraint {
    extern_methods!(
        /// The required or default height of the image
        #[unsafe(method(pixelsHigh))]
        #[unsafe(method_family = none)]
        pub unsafe fn pixelsHigh(&self) -> NSInteger;

        /// The required or default width of the image
        #[unsafe(method(pixelsWide))]
        #[unsafe(method_family = none)]
        pub unsafe fn pixelsWide(&self) -> NSInteger;

        /// The accepted kCVPixelFormatType for the image.
        #[unsafe(method(pixelFormatType))]
        #[unsafe(method_family = none)]
        pub unsafe fn pixelFormatType(&self) -> OSType;

        #[cfg(feature = "MLImageSizeConstraint")]
        /// Detailed image size constraint
        #[unsafe(method(sizeConstraint))]
        #[unsafe(method_family = none)]
        pub unsafe fn sizeConstraint(&self) -> Retained<MLImageSizeConstraint>;

        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
    );
}

/// Methods declared on superclass `NSObject`.
impl MLImageConstraint {
    extern_methods!(
        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new() -> Retained<Self>;
    );
}