objc2_core_image/generated/
CIPlugIn.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_foundation::*;
7
8use crate::*;
9
10extern_class!(
11    /// The CIPlugIn class is responsible for loading Image Units.
12    ///
13    /// The implementation of the CIPlugIn objects is private.
14    /// An application can, however, call the 2 public class method to load plug-ins.
15    ///
16    /// Loading executable CIFilter plugins is deprecated starting in macOS 10.15.
17    ///
18    /// See also [Apple's documentation](https://developer.apple.com/documentation/coreimage/ciplugin?language=objc)
19    #[unsafe(super(NSObject))]
20    #[derive(Debug, PartialEq, Eq, Hash)]
21    pub struct CIPlugIn;
22);
23
24extern_conformance!(
25    unsafe impl NSObjectProtocol for CIPlugIn {}
26);
27
28impl CIPlugIn {
29    extern_methods!(
30        /// This call will scan for plugins with the extension .plugin in
31        /// /Library/Graphics/Image Units
32        /// ~Library/Graphics/Image Units
33        /// If called more than once, newly added plug-ins will be loaded but you cannot remove a plug-in and its filters.
34        #[deprecated]
35        #[unsafe(method(loadAllPlugIns))]
36        #[unsafe(method_family = none)]
37        pub unsafe fn loadAllPlugIns();
38
39        /// Same as loadAllPlugIns does not load filters that contain executable code.
40        #[unsafe(method(loadNonExecutablePlugIns))]
41        #[unsafe(method_family = none)]
42        pub unsafe fn loadNonExecutablePlugIns();
43
44        /// Loads a plug-in specified by its URL.
45        ///
46        /// # Safety
47        ///
48        /// `url` might not allow `None`.
49        #[deprecated]
50        #[unsafe(method(loadPlugIn:allowNonExecutable:))]
51        #[unsafe(method_family = none)]
52        pub unsafe fn loadPlugIn_allowNonExecutable(
53            url: Option<&NSURL>,
54            allow_non_executable: bool,
55        );
56
57        /// Loads a plug-in specified by its URL.
58        /// If allowExecutableCode is NO, filters containing executable code will not be loaded. If YES, any kind of filter will be loaded.
59        ///
60        /// # Safety
61        ///
62        /// `url` might not allow `None`.
63        #[deprecated]
64        #[unsafe(method(loadPlugIn:allowExecutableCode:))]
65        #[unsafe(method_family = none)]
66        pub unsafe fn loadPlugIn_allowExecutableCode(
67            url: Option<&NSURL>,
68            allow_executable_code: bool,
69        );
70
71        /// Loads a non-executable plug-in specified by its URL.
72        /// If the filters containing executable code, it will not be loaded.
73        ///
74        /// # Safety
75        ///
76        /// `url` might not allow `None`.
77        #[unsafe(method(loadNonExecutablePlugIn:))]
78        #[unsafe(method_family = none)]
79        pub unsafe fn loadNonExecutablePlugIn(url: Option<&NSURL>);
80    );
81}
82
83/// Methods declared on superclass `NSObject`.
84impl CIPlugIn {
85    extern_methods!(
86        #[unsafe(method(init))]
87        #[unsafe(method_family = init)]
88        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
89
90        #[unsafe(method(new))]
91        #[unsafe(method_family = new)]
92        pub unsafe fn new() -> Retained<Self>;
93    );
94}