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        #[unsafe(method(viewWithFrame:filter:))]
56        #[unsafe(method_family = none)]
57        pub unsafe fn viewWithFrame_filter(
58            frame_rect: NSRect,
59            in_filter: Option<&CIFilter>,
60            mtm: MainThreadMarker,
61        ) -> Option<Retained<AnyObject>>;
62
63        #[cfg(feature = "objc2-core-image")]
64        /// The initWithFrame method initializes a view that retains the filter passed into it.
65        #[unsafe(method(initWithFrame:filter:))]
66        #[unsafe(method_family = init)]
67        pub unsafe fn initWithFrame_filter(
68            this: Allocated<Self>,
69            frame_rect: NSRect,
70            in_filter: Option<&CIFilter>,
71        ) -> Option<Retained<Self>>;
72
73        #[cfg(feature = "objc2-core-image")]
74        /// Accessor method to return the filter instance that the view controls.
75        #[unsafe(method(filter))]
76        #[unsafe(method_family = none)]
77        pub unsafe fn filter(&self) -> Option<Retained<CIFilter>>;
78
79        /// Accessor method for the object controller for all bindings between the filter and the UI representation.
80        #[unsafe(method(objectController))]
81        #[unsafe(method_family = none)]
82        pub unsafe fn objectController(&self) -> Option<Retained<NSObjectController>>;
83    );
84}
85
86/// Methods declared on superclass `NSView`.
87impl IKFilterUIView {
88    extern_methods!(
89        #[unsafe(method(initWithFrame:))]
90        #[unsafe(method_family = init)]
91        pub unsafe fn initWithFrame(this: Allocated<Self>, frame_rect: NSRect) -> Retained<Self>;
92
93        #[unsafe(method(initWithCoder:))]
94        #[unsafe(method_family = init)]
95        pub unsafe fn initWithCoder(
96            this: Allocated<Self>,
97            coder: &NSCoder,
98        ) -> Option<Retained<Self>>;
99    );
100}
101
102/// Methods declared on superclass `NSResponder`.
103impl IKFilterUIView {
104    extern_methods!(
105        #[unsafe(method(init))]
106        #[unsafe(method_family = init)]
107        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
108    );
109}
110
111/// Methods declared on superclass `NSObject`.
112impl IKFilterUIView {
113    extern_methods!(
114        #[unsafe(method(new))]
115        #[unsafe(method_family = new)]
116        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
117    );
118}