objc2_quartz/generated/QuartzFilters/
QuartzFilterManager.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_app_kit::*;
7use objc2_foundation::*;
8
9use crate::*;
10
11extern "C" {
12    /// [Apple's documentation](https://developer.apple.com/documentation/quartz/globalupdateok?language=objc)
13    pub static globalUpdateOK: Boolean;
14}
15
16extern_class!(
17    /// [Apple's documentation](https://developer.apple.com/documentation/quartz/quartzfilterview?language=objc)
18    #[unsafe(super(NSView, NSResponder, NSObject))]
19    #[derive(Debug, PartialEq, Eq, Hash)]
20    pub struct QuartzFilterView;
21);
22
23extern_conformance!(
24    unsafe impl NSAccessibility for QuartzFilterView {}
25);
26
27extern_conformance!(
28    unsafe impl NSAccessibilityElementProtocol for QuartzFilterView {}
29);
30
31extern_conformance!(
32    unsafe impl NSAnimatablePropertyContainer for QuartzFilterView {}
33);
34
35extern_conformance!(
36    unsafe impl NSAppearanceCustomization for QuartzFilterView {}
37);
38
39extern_conformance!(
40    unsafe impl NSCoding for QuartzFilterView {}
41);
42
43extern_conformance!(
44    unsafe impl NSDraggingDestination for QuartzFilterView {}
45);
46
47extern_conformance!(
48    unsafe impl NSObjectProtocol for QuartzFilterView {}
49);
50
51extern_conformance!(
52    unsafe impl NSUserInterfaceItemIdentification for QuartzFilterView {}
53);
54
55impl QuartzFilterView {
56    extern_methods!(
57        #[unsafe(method(sizeToFit))]
58        #[unsafe(method_family = none)]
59        pub unsafe fn sizeToFit(&self);
60    );
61}
62
63/// Methods declared on superclass `NSView`.
64impl QuartzFilterView {
65    extern_methods!(
66        #[unsafe(method(initWithFrame:))]
67        #[unsafe(method_family = init)]
68        pub unsafe fn initWithFrame(this: Allocated<Self>, frame_rect: NSRect) -> Retained<Self>;
69
70        /// # Safety
71        ///
72        /// `coder` possibly has further requirements.
73        #[unsafe(method(initWithCoder:))]
74        #[unsafe(method_family = init)]
75        pub unsafe fn initWithCoder(
76            this: Allocated<Self>,
77            coder: &NSCoder,
78        ) -> Option<Retained<Self>>;
79    );
80}
81
82/// Methods declared on superclass `NSResponder`.
83impl QuartzFilterView {
84    extern_methods!(
85        #[unsafe(method(init))]
86        #[unsafe(method_family = init)]
87        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
88    );
89}
90
91/// Methods declared on superclass `NSObject`.
92impl QuartzFilterView {
93    extern_methods!(
94        #[unsafe(method(new))]
95        #[unsafe(method_family = new)]
96        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
97    );
98}
99
100extern_class!(
101    /// [Apple's documentation](https://developer.apple.com/documentation/quartz/quartzfiltermanager?language=objc)
102    #[unsafe(super(NSObject))]
103    #[derive(Debug, PartialEq, Eq, Hash)]
104    pub struct QuartzFilterManager;
105);
106
107extern_conformance!(
108    unsafe impl NSObjectProtocol for QuartzFilterManager {}
109);
110
111impl QuartzFilterManager {
112    extern_methods!(
113        #[unsafe(method(filterManager))]
114        #[unsafe(method_family = none)]
115        pub unsafe fn filterManager() -> Option<Retained<QuartzFilterManager>>;
116
117        /// # Safety
118        ///
119        /// - `domains` generic should be of the correct type.
120        /// - `domains` might not allow `None`.
121        #[unsafe(method(filtersInDomains:))]
122        #[unsafe(method_family = none)]
123        pub unsafe fn filtersInDomains(domains: Option<&NSArray>) -> Option<Retained<NSArray>>;
124
125        #[unsafe(method(filterPanel))]
126        #[unsafe(method_family = none)]
127        pub unsafe fn filterPanel(&self, mtm: MainThreadMarker) -> Option<Retained<NSPanel>>;
128
129        #[unsafe(method(filterView))]
130        #[unsafe(method_family = none)]
131        pub unsafe fn filterView(
132            &self,
133            mtm: MainThreadMarker,
134        ) -> Option<Retained<QuartzFilterView>>;
135
136        #[cfg(feature = "QuartzFilter")]
137        #[unsafe(method(selectedFilter))]
138        #[unsafe(method_family = none)]
139        pub unsafe fn selectedFilter(&self) -> Option<Retained<QuartzFilter>>;
140
141        #[cfg(feature = "QuartzFilter")]
142        /// # Safety
143        ///
144        /// `filter` might not allow `None`.
145        #[unsafe(method(selectFilter:))]
146        #[unsafe(method_family = none)]
147        pub unsafe fn selectFilter(&self, filter: Option<&QuartzFilter>) -> bool;
148
149        /// # Safety
150        ///
151        /// - `a_delegate` should be of the correct type.
152        /// - `a_delegate` might not allow `None`.
153        #[unsafe(method(setDelegate:))]
154        #[unsafe(method_family = none)]
155        pub unsafe fn setDelegate(&self, a_delegate: Option<&AnyObject>);
156
157        #[unsafe(method(delegate))]
158        #[unsafe(method_family = none)]
159        pub unsafe fn delegate(&self) -> Option<Retained<AnyObject>>;
160
161        #[cfg(feature = "QuartzFilter")]
162        /// # Safety
163        ///
164        /// - `filter_properties` generic should be of the correct type.
165        /// - `filter_properties` might not allow `None`.
166        #[unsafe(method(importFilter:))]
167        #[unsafe(method_family = none)]
168        pub unsafe fn importFilter(
169            &self,
170            filter_properties: Option<&NSDictionary>,
171        ) -> Option<Retained<QuartzFilter>>;
172    );
173}
174
175/// Methods declared on superclass `NSObject`.
176impl QuartzFilterManager {
177    extern_methods!(
178        #[unsafe(method(init))]
179        #[unsafe(method_family = init)]
180        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
181
182        #[unsafe(method(new))]
183        #[unsafe(method_family = new)]
184        pub unsafe fn new() -> Retained<Self>;
185    );
186}
187
188mod private_NSObjectQuartzFilterManagerDelegate {
189    pub trait Sealed {}
190}
191
192/// Category "QuartzFilterManagerDelegate" on [`NSObject`].
193#[doc(alias = "QuartzFilterManagerDelegate")]
194pub unsafe trait NSObjectQuartzFilterManagerDelegate:
195    ClassType + Sized + private_NSObjectQuartzFilterManagerDelegate::Sealed
196{
197    extern_methods!(
198        #[cfg(feature = "QuartzFilter")]
199        /// # Safety
200        ///
201        /// - `sender` might not allow `None`.
202        /// - `filter` might not allow `None`.
203        #[unsafe(method(quartzFilterManager:didAddFilter:))]
204        #[unsafe(method_family = none)]
205        unsafe fn quartzFilterManager_didAddFilter(
206            &self,
207            sender: Option<&QuartzFilterManager>,
208            filter: Option<&QuartzFilter>,
209        );
210
211        #[cfg(feature = "QuartzFilter")]
212        /// # Safety
213        ///
214        /// - `sender` might not allow `None`.
215        /// - `filter` might not allow `None`.
216        #[unsafe(method(quartzFilterManager:didRemoveFilter:))]
217        #[unsafe(method_family = none)]
218        unsafe fn quartzFilterManager_didRemoveFilter(
219            &self,
220            sender: Option<&QuartzFilterManager>,
221            filter: Option<&QuartzFilter>,
222        );
223
224        #[cfg(feature = "QuartzFilter")]
225        /// # Safety
226        ///
227        /// - `sender` might not allow `None`.
228        /// - `filter` might not allow `None`.
229        #[unsafe(method(quartzFilterManager:didModifyFilter:))]
230        #[unsafe(method_family = none)]
231        unsafe fn quartzFilterManager_didModifyFilter(
232            &self,
233            sender: Option<&QuartzFilterManager>,
234            filter: Option<&QuartzFilter>,
235        );
236
237        #[cfg(feature = "QuartzFilter")]
238        /// # Safety
239        ///
240        /// - `sender` might not allow `None`.
241        /// - `filter` might not allow `None`.
242        #[unsafe(method(quartzFilterManager:didSelectFilter:))]
243        #[unsafe(method_family = none)]
244        unsafe fn quartzFilterManager_didSelectFilter(
245            &self,
246            sender: Option<&QuartzFilterManager>,
247            filter: Option<&QuartzFilter>,
248        );
249    );
250}
251
252impl private_NSObjectQuartzFilterManagerDelegate::Sealed for NSObject {}
253unsafe impl NSObjectQuartzFilterManagerDelegate for NSObject {}
254
255extern "C" {
256    /// [Apple's documentation](https://developer.apple.com/documentation/quartz/kquartzfilterapplicationdomain?language=objc)
257    pub static kQuartzFilterApplicationDomain: Option<&'static NSString>;
258}
259
260extern "C" {
261    /// [Apple's documentation](https://developer.apple.com/documentation/quartz/kquartzfilterpdfworkflowdomain?language=objc)
262    pub static kQuartzFilterPDFWorkflowDomain: Option<&'static NSString>;
263}
264
265extern "C" {
266    /// [Apple's documentation](https://developer.apple.com/documentation/quartz/kquartzfilterprintingdomain?language=objc)
267    pub static kQuartzFilterPrintingDomain: Option<&'static NSString>;
268}
269
270extern "C" {
271    /// [Apple's documentation](https://developer.apple.com/documentation/quartz/kquartzfiltermanagerdidaddfilternotification?language=objc)
272    pub static kQuartzFilterManagerDidAddFilterNotification: Option<&'static NSString>;
273}
274
275extern "C" {
276    /// [Apple's documentation](https://developer.apple.com/documentation/quartz/kquartzfiltermanagerdidremovefilternotification?language=objc)
277    pub static kQuartzFilterManagerDidRemoveFilterNotification: Option<&'static NSString>;
278}
279
280extern "C" {
281    /// [Apple's documentation](https://developer.apple.com/documentation/quartz/kquartzfiltermanagerdidmodifyfilternotification?language=objc)
282    pub static kQuartzFilterManagerDidModifyFilterNotification: Option<&'static NSString>;
283}
284
285extern "C" {
286    /// [Apple's documentation](https://developer.apple.com/documentation/quartz/kquartzfiltermanagerdidselectfilternotification?language=objc)
287    pub static kQuartzFilterManagerDidSelectFilterNotification: Option<&'static NSString>;
288}