objc2_app_kit/generated/
NSFilePromiseReceiver.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    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsfilepromisereceiver?language=objc)
12    #[unsafe(super(NSObject))]
13    #[derive(Debug, PartialEq, Eq, Hash)]
14    pub struct NSFilePromiseReceiver;
15);
16
17extern_conformance!(
18    unsafe impl NSObjectProtocol for NSFilePromiseReceiver {}
19);
20
21#[cfg(feature = "NSPasteboard")]
22extern_conformance!(
23    unsafe impl NSPasteboardReading for NSFilePromiseReceiver {}
24);
25
26impl NSFilePromiseReceiver {
27    extern_methods!(
28        #[unsafe(method(readableDraggedTypes))]
29        #[unsafe(method_family = none)]
30        pub fn readableDraggedTypes() -> Retained<NSArray<NSString>>;
31
32        #[unsafe(method(fileTypes))]
33        #[unsafe(method_family = none)]
34        pub fn fileTypes(&self) -> Retained<NSArray<NSString>>;
35
36        #[unsafe(method(fileNames))]
37        #[unsafe(method_family = none)]
38        pub fn fileNames(&self) -> Retained<NSArray<NSString>>;
39
40        #[cfg(feature = "block2")]
41        /// # Safety
42        ///
43        /// - `options` generic should be of the correct type.
44        /// - `operation_queue` possibly has additional threading requirements.
45        #[unsafe(method(receivePromisedFilesAtDestination:options:operationQueue:reader:))]
46        #[unsafe(method_family = none)]
47        pub unsafe fn receivePromisedFilesAtDestination_options_operationQueue_reader(
48            &self,
49            destination_dir: &NSURL,
50            options: &NSDictionary,
51            operation_queue: &NSOperationQueue,
52            reader: &block2::DynBlock<dyn Fn(NonNull<NSURL>, *mut NSError)>,
53        );
54    );
55}
56
57/// Methods declared on superclass `NSObject`.
58impl NSFilePromiseReceiver {
59    extern_methods!(
60        #[unsafe(method(init))]
61        #[unsafe(method_family = init)]
62        pub fn init(this: Allocated<Self>) -> Retained<Self>;
63
64        #[unsafe(method(new))]
65        #[unsafe(method_family = new)]
66        pub fn new() -> Retained<Self>;
67    );
68}
69
70impl DefaultRetained for NSFilePromiseReceiver {
71    #[inline]
72    fn default_retained() -> Retained<Self> {
73        Self::new()
74    }
75}