objc2_quartz/generated/ImageKit/
IKFilterUIView.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_app_kit::*;
6#[cfg(feature = "objc2-core-image")]
7use objc2_core_image::*;
8use objc2_foundation::*;
9
10use crate::*;
11
12extern_class!(
13    /// [Apple's documentation](https://developer.apple.com/documentation/quartz/ikfilteruiview?language=objc)
14    #[unsafe(super(NSView, NSResponder, NSObject))]
15    #[derive(Debug, PartialEq, Eq, Hash)]
16    pub struct IKFilterUIView;
17);
18
19extern_conformance!(
20    unsafe impl NSAccessibility for IKFilterUIView {}
21);
22
23extern_conformance!(
24    unsafe impl NSAccessibilityElementProtocol for IKFilterUIView {}
25);
26
27extern_conformance!(
28    unsafe impl NSAnimatablePropertyContainer for IKFilterUIView {}
29);
30
31extern_conformance!(
32    unsafe impl NSAppearanceCustomization for IKFilterUIView {}
33);
34
35extern_conformance!(
36    unsafe impl NSCoding for IKFilterUIView {}
37);
38
39extern_conformance!(
40    unsafe impl NSDraggingDestination for IKFilterUIView {}
41);
42
43extern_conformance!(
44    unsafe impl NSObjectProtocol for IKFilterUIView {}
45);
46
47extern_conformance!(
48    unsafe impl NSUserInterfaceItemIdentification for IKFilterUIView {}
49);
50
51impl IKFilterUIView {
52    extern_methods!(
53        #[cfg(feature = "objc2-core-image")]
54        /// The viewWithFrame method creates a view that retains the filter passed into it.
55        ///
56        /// # Safety
57        ///
58        /// `in_filter` might not allow `None`.
59        #[unsafe(method(viewWithFrame:filter:))]
60        #[unsafe(method_family = none)]
61        pub unsafe fn viewWithFrame_filter(
62            frame_rect: NSRect,
63            in_filter: Option<&CIFilter>,
64            mtm: MainThreadMarker,
65        ) -> Option<Retained<AnyObject>>;
66
67        #[cfg(feature = "objc2-core-image")]
68        /// The initWithFrame method initializes a view that retains the filter passed into it.
69        ///
70        /// # Safety
71        ///
72        /// `in_filter` might not allow `None`.
73        #[unsafe(method(initWithFrame:filter:))]
74        #[unsafe(method_family = init)]
75        pub unsafe fn initWithFrame_filter(
76            this: Allocated<Self>,
77            frame_rect: NSRect,
78            in_filter: Option<&CIFilter>,
79        ) -> Option<Retained<Self>>;
80
81        #[cfg(feature = "objc2-core-image")]
82        /// Accessor method to return the filter instance that the view controls.
83        #[unsafe(method(filter))]
84        #[unsafe(method_family = none)]
85        pub unsafe fn filter(&self) -> Option<Retained<CIFilter>>;
86
87        /// Accessor method for the object controller for all bindings between the filter and the UI representation.
88        #[unsafe(method(objectController))]
89        #[unsafe(method_family = none)]
90        pub unsafe fn objectController(&self) -> Option<Retained<NSObjectController>>;
91    );
92}
93
94/// Methods declared on superclass `NSView`.
95impl IKFilterUIView {
96    extern_methods!(
97        #[unsafe(method(initWithFrame:))]
98        #[unsafe(method_family = init)]
99        pub unsafe fn initWithFrame(this: Allocated<Self>, frame_rect: NSRect) -> Retained<Self>;
100
101        /// # Safety
102        ///
103        /// `coder` possibly has further requirements.
104        #[unsafe(method(initWithCoder:))]
105        #[unsafe(method_family = init)]
106        pub unsafe fn initWithCoder(
107            this: Allocated<Self>,
108            coder: &NSCoder,
109        ) -> Option<Retained<Self>>;
110    );
111}
112
113/// Methods declared on superclass `NSResponder`.
114impl IKFilterUIView {
115    extern_methods!(
116        #[unsafe(method(init))]
117        #[unsafe(method_family = init)]
118        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
119    );
120}
121
122/// Methods declared on superclass `NSObject`.
123impl IKFilterUIView {
124    extern_methods!(
125        #[unsafe(method(new))]
126        #[unsafe(method_family = new)]
127        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
128    );
129}