objc2-quartz 0.3.2

Bindings to the Quartz 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_app_kit::*;
#[cfg(feature = "objc2-core-image")]
use objc2_core_image::*;
use objc2_foundation::*;

use crate::*;

extern_class!(
    /// [Apple's documentation](https://developer.apple.com/documentation/quartz/ikfilteruiview?language=objc)
    #[unsafe(super(NSView, NSResponder, NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct IKFilterUIView;
);

extern_conformance!(
    unsafe impl NSAccessibility for IKFilterUIView {}
);

extern_conformance!(
    unsafe impl NSAccessibilityElementProtocol for IKFilterUIView {}
);

extern_conformance!(
    unsafe impl NSAnimatablePropertyContainer for IKFilterUIView {}
);

extern_conformance!(
    unsafe impl NSAppearanceCustomization for IKFilterUIView {}
);

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

extern_conformance!(
    unsafe impl NSDraggingDestination for IKFilterUIView {}
);

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

extern_conformance!(
    unsafe impl NSUserInterfaceItemIdentification for IKFilterUIView {}
);

impl IKFilterUIView {
    extern_methods!(
        #[cfg(feature = "objc2-core-image")]
        /// The viewWithFrame method creates a view that retains the filter passed into it.
        ///
        /// # Safety
        ///
        /// `in_filter` might not allow `None`.
        #[unsafe(method(viewWithFrame:filter:))]
        #[unsafe(method_family = none)]
        pub unsafe fn viewWithFrame_filter(
            frame_rect: NSRect,
            in_filter: Option<&CIFilter>,
            mtm: MainThreadMarker,
        ) -> Option<Retained<AnyObject>>;

        #[cfg(feature = "objc2-core-image")]
        /// The initWithFrame method initializes a view that retains the filter passed into it.
        ///
        /// # Safety
        ///
        /// `in_filter` might not allow `None`.
        #[unsafe(method(initWithFrame:filter:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithFrame_filter(
            this: Allocated<Self>,
            frame_rect: NSRect,
            in_filter: Option<&CIFilter>,
        ) -> Option<Retained<Self>>;

        #[cfg(feature = "objc2-core-image")]
        /// Accessor method to return the filter instance that the view controls.
        #[unsafe(method(filter))]
        #[unsafe(method_family = none)]
        pub unsafe fn filter(&self) -> Option<Retained<CIFilter>>;

        /// Accessor method for the object controller for all bindings between the filter and the UI representation.
        #[unsafe(method(objectController))]
        #[unsafe(method_family = none)]
        pub unsafe fn objectController(&self) -> Option<Retained<NSObjectController>>;
    );
}

/// Methods declared on superclass `NSView`.
impl IKFilterUIView {
    extern_methods!(
        #[unsafe(method(initWithFrame:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithFrame(this: Allocated<Self>, frame_rect: NSRect) -> Retained<Self>;

        /// # Safety
        ///
        /// `coder` possibly has further requirements.
        #[unsafe(method(initWithCoder:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithCoder(
            this: Allocated<Self>,
            coder: &NSCoder,
        ) -> Option<Retained<Self>>;
    );
}

/// Methods declared on superclass `NSResponder`.
impl IKFilterUIView {
    extern_methods!(
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
    );
}

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