icrate/generated/UniformTypeIdentifiers/
NSItemProvider_UTType.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use crate::common::*;
4use crate::Foundation::*;
5use crate::UniformTypeIdentifiers::*;
6
7extern_methods!(
8    /// UTType
9    #[cfg(feature = "Foundation_NSItemProvider")]
10    unsafe impl NSItemProvider {
11        #[cfg(all(
12            feature = "Foundation_NSURL",
13            feature = "UniformTypeIdentifiers_UTType"
14        ))]
15        #[method_id(@__retain_semantics Init initWithContentsOfURL:contentType:openInPlace:coordinated:visibility:)]
16        pub unsafe fn initWithContentsOfURL_contentType_openInPlace_coordinated_visibility(
17            this: Allocated<Self>,
18            file_url: &NSURL,
19            content_type: Option<&UTType>,
20            open_in_place: bool,
21            coordinated: bool,
22            visibility: NSItemProviderRepresentationVisibility,
23        ) -> Id<Self>;
24
25        #[cfg(all(
26            feature = "Foundation_NSData",
27            feature = "Foundation_NSError",
28            feature = "Foundation_NSProgress",
29            feature = "UniformTypeIdentifiers_UTType"
30        ))]
31        #[method(registerDataRepresentationForContentType:visibility:loadHandler:)]
32        pub unsafe fn registerDataRepresentationForContentType_visibility_loadHandler(
33            &self,
34            content_type: &UTType,
35            visibility: NSItemProviderRepresentationVisibility,
36            load_handler: &Block<
37                (NonNull<Block<(*mut NSData, *mut NSError), ()>>,),
38                *mut NSProgress,
39            >,
40        );
41
42        #[cfg(all(
43            feature = "Foundation_NSError",
44            feature = "Foundation_NSProgress",
45            feature = "Foundation_NSURL",
46            feature = "UniformTypeIdentifiers_UTType"
47        ))]
48        #[method(registerFileRepresentationForContentType:visibility:openInPlace:loadHandler:)]
49        pub unsafe fn registerFileRepresentationForContentType_visibility_openInPlace_loadHandler(
50            &self,
51            content_type: &UTType,
52            visibility: NSItemProviderRepresentationVisibility,
53            open_in_place: bool,
54            load_handler: &Block<
55                (NonNull<Block<(*mut NSURL, Bool, *mut NSError), ()>>,),
56                *mut NSProgress,
57            >,
58        );
59
60        #[cfg(all(
61            feature = "Foundation_NSArray",
62            feature = "UniformTypeIdentifiers_UTType"
63        ))]
64        #[method_id(@__retain_semantics Other registeredContentTypes)]
65        pub unsafe fn registeredContentTypes(&self) -> Id<NSArray<UTType>>;
66
67        #[cfg(all(
68            feature = "Foundation_NSArray",
69            feature = "UniformTypeIdentifiers_UTType"
70        ))]
71        #[method_id(@__retain_semantics Other registeredContentTypesForOpenInPlace)]
72        pub unsafe fn registeredContentTypesForOpenInPlace(&self) -> Id<NSArray<UTType>>;
73
74        #[cfg(all(
75            feature = "Foundation_NSArray",
76            feature = "UniformTypeIdentifiers_UTType"
77        ))]
78        #[method_id(@__retain_semantics Other registeredContentTypesConformingToContentType:)]
79        pub unsafe fn registeredContentTypesConformingToContentType(
80            &self,
81            content_type: &UTType,
82        ) -> Id<NSArray<UTType>>;
83
84        #[cfg(all(
85            feature = "Foundation_NSData",
86            feature = "Foundation_NSError",
87            feature = "Foundation_NSProgress",
88            feature = "UniformTypeIdentifiers_UTType"
89        ))]
90        #[method_id(@__retain_semantics Other loadDataRepresentationForContentType:completionHandler:)]
91        pub unsafe fn loadDataRepresentationForContentType_completionHandler(
92            &self,
93            content_type: &UTType,
94            completion_handler: &Block<(*mut NSData, *mut NSError), ()>,
95        ) -> Id<NSProgress>;
96
97        #[cfg(all(
98            feature = "Foundation_NSError",
99            feature = "Foundation_NSProgress",
100            feature = "Foundation_NSURL",
101            feature = "UniformTypeIdentifiers_UTType"
102        ))]
103        #[method_id(@__retain_semantics Other loadFileRepresentationForContentType:openInPlace:completionHandler:)]
104        pub unsafe fn loadFileRepresentationForContentType_openInPlace_completionHandler(
105            &self,
106            content_type: &UTType,
107            open_in_place: bool,
108            completion_handler: &Block<(*mut NSURL, Bool, *mut NSError), ()>,
109        ) -> Id<NSProgress>;
110    }
111);