objc2_photos/generated/
PHFetchOptions.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/photos/phfetchoptions?language=objc)
12    #[unsafe(super(NSObject))]
13    #[derive(Debug, PartialEq, Eq, Hash)]
14    pub struct PHFetchOptions;
15);
16
17extern_conformance!(
18    unsafe impl NSCopying for PHFetchOptions {}
19);
20
21unsafe impl CopyingHelper for PHFetchOptions {
22    type Result = Self;
23}
24
25extern_conformance!(
26    unsafe impl NSObjectProtocol for PHFetchOptions {}
27);
28
29impl PHFetchOptions {
30    extern_methods!(
31        #[unsafe(method(predicate))]
32        #[unsafe(method_family = none)]
33        pub unsafe fn predicate(&self) -> Option<Retained<NSPredicate>>;
34
35        /// Setter for [`predicate`][Self::predicate].
36        #[unsafe(method(setPredicate:))]
37        #[unsafe(method_family = none)]
38        pub unsafe fn setPredicate(&self, predicate: Option<&NSPredicate>);
39
40        #[unsafe(method(sortDescriptors))]
41        #[unsafe(method_family = none)]
42        pub unsafe fn sortDescriptors(&self) -> Option<Retained<NSArray<NSSortDescriptor>>>;
43
44        /// Setter for [`sortDescriptors`][Self::sortDescriptors].
45        #[unsafe(method(setSortDescriptors:))]
46        #[unsafe(method_family = none)]
47        pub unsafe fn setSortDescriptors(
48            &self,
49            sort_descriptors: Option<&NSArray<NSSortDescriptor>>,
50        );
51
52        #[unsafe(method(includeHiddenAssets))]
53        #[unsafe(method_family = none)]
54        pub unsafe fn includeHiddenAssets(&self) -> bool;
55
56        /// Setter for [`includeHiddenAssets`][Self::includeHiddenAssets].
57        #[unsafe(method(setIncludeHiddenAssets:))]
58        #[unsafe(method_family = none)]
59        pub unsafe fn setIncludeHiddenAssets(&self, include_hidden_assets: bool);
60
61        #[unsafe(method(includeAllBurstAssets))]
62        #[unsafe(method_family = none)]
63        pub unsafe fn includeAllBurstAssets(&self) -> bool;
64
65        /// Setter for [`includeAllBurstAssets`][Self::includeAllBurstAssets].
66        #[unsafe(method(setIncludeAllBurstAssets:))]
67        #[unsafe(method_family = none)]
68        pub unsafe fn setIncludeAllBurstAssets(&self, include_all_burst_assets: bool);
69
70        #[cfg(feature = "PhotosTypes")]
71        #[unsafe(method(includeAssetSourceTypes))]
72        #[unsafe(method_family = none)]
73        pub unsafe fn includeAssetSourceTypes(&self) -> PHAssetSourceType;
74
75        #[cfg(feature = "PhotosTypes")]
76        /// Setter for [`includeAssetSourceTypes`][Self::includeAssetSourceTypes].
77        #[unsafe(method(setIncludeAssetSourceTypes:))]
78        #[unsafe(method_family = none)]
79        pub unsafe fn setIncludeAssetSourceTypes(
80            &self,
81            include_asset_source_types: PHAssetSourceType,
82        );
83
84        #[unsafe(method(fetchLimit))]
85        #[unsafe(method_family = none)]
86        pub unsafe fn fetchLimit(&self) -> NSUInteger;
87
88        /// Setter for [`fetchLimit`][Self::fetchLimit].
89        #[unsafe(method(setFetchLimit:))]
90        #[unsafe(method_family = none)]
91        pub unsafe fn setFetchLimit(&self, fetch_limit: NSUInteger);
92
93        #[unsafe(method(wantsIncrementalChangeDetails))]
94        #[unsafe(method_family = none)]
95        pub unsafe fn wantsIncrementalChangeDetails(&self) -> bool;
96
97        /// Setter for [`wantsIncrementalChangeDetails`][Self::wantsIncrementalChangeDetails].
98        #[unsafe(method(setWantsIncrementalChangeDetails:))]
99        #[unsafe(method_family = none)]
100        pub unsafe fn setWantsIncrementalChangeDetails(
101            &self,
102            wants_incremental_change_details: bool,
103        );
104    );
105}
106
107/// Methods declared on superclass `NSObject`.
108impl PHFetchOptions {
109    extern_methods!(
110        #[unsafe(method(init))]
111        #[unsafe(method_family = init)]
112        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
113
114        #[unsafe(method(new))]
115        #[unsafe(method_family = new)]
116        pub unsafe fn new() -> Retained<Self>;
117    );
118}