objc2_quartz/generated/QuartzFilters/
QuartzFilter.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::*;
6#[cfg(feature = "objc2-core-graphics")]
7use objc2_core_graphics::*;
8use objc2_foundation::*;
9
10use crate::*;
11
12extern_class!(
13    /// [Apple's documentation](https://developer.apple.com/documentation/quartz/quartzfilter?language=objc)
14    #[unsafe(super(NSObject))]
15    #[derive(Debug, PartialEq, Eq, Hash)]
16    pub struct QuartzFilter;
17);
18
19extern_conformance!(
20    unsafe impl NSObjectProtocol for QuartzFilter {}
21);
22
23impl QuartzFilter {
24    extern_methods!(
25        /// # Safety
26        ///
27        /// `a_url` might not allow `None`.
28        #[unsafe(method(quartzFilterWithURL:))]
29        #[unsafe(method_family = none)]
30        pub unsafe fn quartzFilterWithURL(a_url: Option<&NSURL>) -> Option<Retained<QuartzFilter>>;
31
32        /// # Safety
33        ///
34        /// - `properties` generic should be of the correct type.
35        /// - `properties` might not allow `None`.
36        #[unsafe(method(quartzFilterWithProperties:))]
37        #[unsafe(method_family = none)]
38        pub unsafe fn quartzFilterWithProperties(
39            properties: Option<&NSDictionary>,
40        ) -> Option<Retained<QuartzFilter>>;
41
42        /// # Safety
43        ///
44        /// - `output_intents` generic should be of the correct type.
45        /// - `output_intents` might not allow `None`.
46        #[unsafe(method(quartzFilterWithOutputIntents:))]
47        #[unsafe(method_family = none)]
48        pub unsafe fn quartzFilterWithOutputIntents(
49            output_intents: Option<&NSArray>,
50        ) -> Option<Retained<QuartzFilter>>;
51
52        #[unsafe(method(properties))]
53        #[unsafe(method_family = none)]
54        pub unsafe fn properties(&self) -> Option<Retained<NSDictionary>>;
55
56        #[unsafe(method(url))]
57        #[unsafe(method_family = none)]
58        pub unsafe fn url(&self) -> Option<Retained<NSURL>>;
59
60        #[unsafe(method(localizedName))]
61        #[unsafe(method_family = none)]
62        pub unsafe fn localizedName(&self) -> Option<Retained<NSString>>;
63
64        #[cfg(feature = "objc2-core-graphics")]
65        /// # Safety
66        ///
67        /// `a_context` might not allow `None`.
68        #[unsafe(method(applyToContext:))]
69        #[unsafe(method_family = none)]
70        pub unsafe fn applyToContext(&self, a_context: Option<&CGContext>) -> bool;
71
72        #[cfg(feature = "objc2-core-graphics")]
73        /// # Safety
74        ///
75        /// `a_context` might not allow `None`.
76        #[unsafe(method(removeFromContext:))]
77        #[unsafe(method_family = none)]
78        pub unsafe fn removeFromContext(&self, a_context: Option<&CGContext>);
79    );
80}
81
82/// Methods declared on superclass `NSObject`.
83impl QuartzFilter {
84    extern_methods!(
85        #[unsafe(method(init))]
86        #[unsafe(method_family = init)]
87        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
88
89        #[unsafe(method(new))]
90        #[unsafe(method_family = new)]
91        pub unsafe fn new() -> Retained<Self>;
92    );
93}