objc2_photos/generated/
PhotosTypes.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use objc2::__framework_prelude::*;
4
5use crate::*;
6
7/// [Apple's documentation](https://developer.apple.com/documentation/photos/phimagecontentmode?language=objc)
8// NS_ENUM
9#[repr(transparent)]
10#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
11pub struct PHImageContentMode(pub NSInteger);
12impl PHImageContentMode {
13    #[doc(alias = "PHImageContentModeAspectFit")]
14    pub const AspectFit: Self = Self(0);
15    #[doc(alias = "PHImageContentModeAspectFill")]
16    pub const AspectFill: Self = Self(1);
17    #[doc(alias = "PHImageContentModeDefault")]
18    pub const Default: Self = Self(PHImageContentMode::AspectFit.0);
19}
20
21unsafe impl Encode for PHImageContentMode {
22    const ENCODING: Encoding = NSInteger::ENCODING;
23}
24
25unsafe impl RefEncode for PHImageContentMode {
26    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
27}
28
29/// [Apple's documentation](https://developer.apple.com/documentation/photos/phcollectionlisttype?language=objc)
30// NS_ENUM
31#[repr(transparent)]
32#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
33pub struct PHCollectionListType(pub NSInteger);
34impl PHCollectionListType {
35    #[doc(alias = "PHCollectionListTypeMomentList")]
36    #[deprecated = "Will be removed in a future release"]
37    pub const MomentList: Self = Self(1);
38    #[doc(alias = "PHCollectionListTypeFolder")]
39    pub const Folder: Self = Self(2);
40    #[doc(alias = "PHCollectionListTypeSmartFolder")]
41    pub const SmartFolder: Self = Self(3);
42}
43
44unsafe impl Encode for PHCollectionListType {
45    const ENCODING: Encoding = NSInteger::ENCODING;
46}
47
48unsafe impl RefEncode for PHCollectionListType {
49    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
50}
51
52/// [Apple's documentation](https://developer.apple.com/documentation/photos/phcollectionlistsubtype?language=objc)
53// NS_ENUM
54#[repr(transparent)]
55#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
56pub struct PHCollectionListSubtype(pub NSInteger);
57impl PHCollectionListSubtype {
58    #[doc(alias = "PHCollectionListSubtypeMomentListCluster")]
59    #[deprecated = "Will be removed in a future release"]
60    pub const MomentListCluster: Self = Self(1);
61    #[doc(alias = "PHCollectionListSubtypeMomentListYear")]
62    #[deprecated = "Will be removed in a future release"]
63    pub const MomentListYear: Self = Self(2);
64    #[doc(alias = "PHCollectionListSubtypeRegularFolder")]
65    pub const RegularFolder: Self = Self(100);
66    #[doc(alias = "PHCollectionListSubtypeSmartFolderEvents")]
67    pub const SmartFolderEvents: Self = Self(200);
68    #[doc(alias = "PHCollectionListSubtypeSmartFolderFaces")]
69    pub const SmartFolderFaces: Self = Self(201);
70    #[doc(alias = "PHCollectionListSubtypeAny")]
71    pub const Any: Self = Self(NSIntegerMax as _);
72}
73
74unsafe impl Encode for PHCollectionListSubtype {
75    const ENCODING: Encoding = NSInteger::ENCODING;
76}
77
78unsafe impl RefEncode for PHCollectionListSubtype {
79    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
80}
81
82/// [Apple's documentation](https://developer.apple.com/documentation/photos/phcollectioneditoperation?language=objc)
83// NS_ENUM
84#[repr(transparent)]
85#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
86pub struct PHCollectionEditOperation(pub NSInteger);
87impl PHCollectionEditOperation {
88    #[doc(alias = "PHCollectionEditOperationDeleteContent")]
89    pub const DeleteContent: Self = Self(1);
90    #[doc(alias = "PHCollectionEditOperationRemoveContent")]
91    pub const RemoveContent: Self = Self(2);
92    #[doc(alias = "PHCollectionEditOperationAddContent")]
93    pub const AddContent: Self = Self(3);
94    #[doc(alias = "PHCollectionEditOperationCreateContent")]
95    pub const CreateContent: Self = Self(4);
96    #[doc(alias = "PHCollectionEditOperationRearrangeContent")]
97    pub const RearrangeContent: Self = Self(5);
98    #[doc(alias = "PHCollectionEditOperationDelete")]
99    pub const Delete: Self = Self(6);
100    #[doc(alias = "PHCollectionEditOperationRename")]
101    pub const Rename: Self = Self(7);
102}
103
104unsafe impl Encode for PHCollectionEditOperation {
105    const ENCODING: Encoding = NSInteger::ENCODING;
106}
107
108unsafe impl RefEncode for PHCollectionEditOperation {
109    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
110}
111
112/// [Apple's documentation](https://developer.apple.com/documentation/photos/phassetcollectiontype?language=objc)
113// NS_ENUM
114#[repr(transparent)]
115#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
116pub struct PHAssetCollectionType(pub NSInteger);
117impl PHAssetCollectionType {
118    #[doc(alias = "PHAssetCollectionTypeAlbum")]
119    pub const Album: Self = Self(1);
120    #[doc(alias = "PHAssetCollectionTypeSmartAlbum")]
121    pub const SmartAlbum: Self = Self(2);
122    #[doc(alias = "PHAssetCollectionTypeMoment")]
123    #[deprecated = "Will be removed in a future release"]
124    pub const Moment: Self = Self(3);
125}
126
127unsafe impl Encode for PHAssetCollectionType {
128    const ENCODING: Encoding = NSInteger::ENCODING;
129}
130
131unsafe impl RefEncode for PHAssetCollectionType {
132    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
133}
134
135/// [Apple's documentation](https://developer.apple.com/documentation/photos/phassetcollectionsubtype?language=objc)
136// NS_ENUM
137#[repr(transparent)]
138#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
139pub struct PHAssetCollectionSubtype(pub NSInteger);
140impl PHAssetCollectionSubtype {
141    #[doc(alias = "PHAssetCollectionSubtypeAlbumRegular")]
142    pub const AlbumRegular: Self = Self(2);
143    #[doc(alias = "PHAssetCollectionSubtypeAlbumSyncedEvent")]
144    pub const AlbumSyncedEvent: Self = Self(3);
145    #[doc(alias = "PHAssetCollectionSubtypeAlbumSyncedFaces")]
146    pub const AlbumSyncedFaces: Self = Self(4);
147    #[doc(alias = "PHAssetCollectionSubtypeAlbumSyncedAlbum")]
148    pub const AlbumSyncedAlbum: Self = Self(5);
149    #[doc(alias = "PHAssetCollectionSubtypeAlbumImported")]
150    pub const AlbumImported: Self = Self(6);
151    #[doc(alias = "PHAssetCollectionSubtypeAlbumMyPhotoStream")]
152    pub const AlbumMyPhotoStream: Self = Self(100);
153    #[doc(alias = "PHAssetCollectionSubtypeAlbumCloudShared")]
154    pub const AlbumCloudShared: Self = Self(101);
155    #[doc(alias = "PHAssetCollectionSubtypeSmartAlbumGeneric")]
156    pub const SmartAlbumGeneric: Self = Self(200);
157    #[doc(alias = "PHAssetCollectionSubtypeSmartAlbumPanoramas")]
158    pub const SmartAlbumPanoramas: Self = Self(201);
159    #[doc(alias = "PHAssetCollectionSubtypeSmartAlbumVideos")]
160    pub const SmartAlbumVideos: Self = Self(202);
161    #[doc(alias = "PHAssetCollectionSubtypeSmartAlbumFavorites")]
162    pub const SmartAlbumFavorites: Self = Self(203);
163    #[doc(alias = "PHAssetCollectionSubtypeSmartAlbumTimelapses")]
164    pub const SmartAlbumTimelapses: Self = Self(204);
165    #[doc(alias = "PHAssetCollectionSubtypeSmartAlbumAllHidden")]
166    pub const SmartAlbumAllHidden: Self = Self(205);
167    #[doc(alias = "PHAssetCollectionSubtypeSmartAlbumRecentlyAdded")]
168    pub const SmartAlbumRecentlyAdded: Self = Self(206);
169    #[doc(alias = "PHAssetCollectionSubtypeSmartAlbumBursts")]
170    pub const SmartAlbumBursts: Self = Self(207);
171    #[doc(alias = "PHAssetCollectionSubtypeSmartAlbumSlomoVideos")]
172    pub const SmartAlbumSlomoVideos: Self = Self(208);
173    #[doc(alias = "PHAssetCollectionSubtypeSmartAlbumUserLibrary")]
174    pub const SmartAlbumUserLibrary: Self = Self(209);
175    #[doc(alias = "PHAssetCollectionSubtypeSmartAlbumSelfPortraits")]
176    pub const SmartAlbumSelfPortraits: Self = Self(210);
177    #[doc(alias = "PHAssetCollectionSubtypeSmartAlbumScreenshots")]
178    pub const SmartAlbumScreenshots: Self = Self(211);
179    #[doc(alias = "PHAssetCollectionSubtypeSmartAlbumDepthEffect")]
180    pub const SmartAlbumDepthEffect: Self = Self(212);
181    #[doc(alias = "PHAssetCollectionSubtypeSmartAlbumLivePhotos")]
182    pub const SmartAlbumLivePhotos: Self = Self(213);
183    #[doc(alias = "PHAssetCollectionSubtypeSmartAlbumAnimated")]
184    pub const SmartAlbumAnimated: Self = Self(214);
185    #[doc(alias = "PHAssetCollectionSubtypeSmartAlbumLongExposures")]
186    pub const SmartAlbumLongExposures: Self = Self(215);
187    #[doc(alias = "PHAssetCollectionSubtypeSmartAlbumUnableToUpload")]
188    pub const SmartAlbumUnableToUpload: Self = Self(216);
189    #[doc(alias = "PHAssetCollectionSubtypeSmartAlbumRAW")]
190    pub const SmartAlbumRAW: Self = Self(217);
191    #[doc(alias = "PHAssetCollectionSubtypeSmartAlbumCinematic")]
192    pub const SmartAlbumCinematic: Self = Self(218);
193    #[doc(alias = "PHAssetCollectionSubtypeSmartAlbumSpatial")]
194    pub const SmartAlbumSpatial: Self = Self(219);
195    #[doc(alias = "PHAssetCollectionSubtypeSmartAlbumScreenRecordings")]
196    pub const SmartAlbumScreenRecordings: Self = Self(220);
197    #[doc(alias = "PHAssetCollectionSubtypeAny")]
198    pub const Any: Self = Self(NSIntegerMax as _);
199}
200
201unsafe impl Encode for PHAssetCollectionSubtype {
202    const ENCODING: Encoding = NSInteger::ENCODING;
203}
204
205unsafe impl RefEncode for PHAssetCollectionSubtype {
206    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
207}
208
209/// [Apple's documentation](https://developer.apple.com/documentation/photos/phasseteditoperation?language=objc)
210// NS_ENUM
211#[repr(transparent)]
212#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
213pub struct PHAssetEditOperation(pub NSInteger);
214impl PHAssetEditOperation {
215    #[doc(alias = "PHAssetEditOperationDelete")]
216    pub const Delete: Self = Self(1);
217    #[doc(alias = "PHAssetEditOperationContent")]
218    pub const Content: Self = Self(2);
219    #[doc(alias = "PHAssetEditOperationProperties")]
220    pub const Properties: Self = Self(3);
221}
222
223unsafe impl Encode for PHAssetEditOperation {
224    const ENCODING: Encoding = NSInteger::ENCODING;
225}
226
227unsafe impl RefEncode for PHAssetEditOperation {
228    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
229}
230
231/// [Apple's documentation](https://developer.apple.com/documentation/photos/phassetplaybackstyle?language=objc)
232// NS_ENUM
233#[repr(transparent)]
234#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
235pub struct PHAssetPlaybackStyle(pub NSInteger);
236impl PHAssetPlaybackStyle {
237    #[doc(alias = "PHAssetPlaybackStyleUnsupported")]
238    pub const Unsupported: Self = Self(0);
239    #[doc(alias = "PHAssetPlaybackStyleImage")]
240    pub const Image: Self = Self(1);
241    #[doc(alias = "PHAssetPlaybackStyleImageAnimated")]
242    pub const ImageAnimated: Self = Self(2);
243    #[doc(alias = "PHAssetPlaybackStyleLivePhoto")]
244    pub const LivePhoto: Self = Self(3);
245    #[doc(alias = "PHAssetPlaybackStyleVideo")]
246    pub const Video: Self = Self(4);
247    #[doc(alias = "PHAssetPlaybackStyleVideoLooping")]
248    pub const VideoLooping: Self = Self(5);
249}
250
251unsafe impl Encode for PHAssetPlaybackStyle {
252    const ENCODING: Encoding = NSInteger::ENCODING;
253}
254
255unsafe impl RefEncode for PHAssetPlaybackStyle {
256    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
257}
258
259/// [Apple's documentation](https://developer.apple.com/documentation/photos/phassetmediatype?language=objc)
260// NS_ENUM
261#[repr(transparent)]
262#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
263pub struct PHAssetMediaType(pub NSInteger);
264impl PHAssetMediaType {
265    #[doc(alias = "PHAssetMediaTypeUnknown")]
266    pub const Unknown: Self = Self(0);
267    #[doc(alias = "PHAssetMediaTypeImage")]
268    pub const Image: Self = Self(1);
269    #[doc(alias = "PHAssetMediaTypeVideo")]
270    pub const Video: Self = Self(2);
271    #[doc(alias = "PHAssetMediaTypeAudio")]
272    pub const Audio: Self = Self(3);
273}
274
275unsafe impl Encode for PHAssetMediaType {
276    const ENCODING: Encoding = NSInteger::ENCODING;
277}
278
279unsafe impl RefEncode for PHAssetMediaType {
280    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
281}
282
283/// [Apple's documentation](https://developer.apple.com/documentation/photos/phassetmediasubtype?language=objc)
284// NS_OPTIONS
285#[repr(transparent)]
286#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
287pub struct PHAssetMediaSubtype(pub NSUInteger);
288bitflags::bitflags! {
289    impl PHAssetMediaSubtype: NSUInteger {
290        #[doc(alias = "PHAssetMediaSubtypeNone")]
291        const None = 0;
292        #[doc(alias = "PHAssetMediaSubtypePhotoPanorama")]
293        const PhotoPanorama = 1<<0;
294        #[doc(alias = "PHAssetMediaSubtypePhotoHDR")]
295        const PhotoHDR = 1<<1;
296        #[doc(alias = "PHAssetMediaSubtypePhotoScreenshot")]
297        const PhotoScreenshot = 1<<2;
298        #[doc(alias = "PHAssetMediaSubtypePhotoLive")]
299        const PhotoLive = 1<<3;
300        #[doc(alias = "PHAssetMediaSubtypePhotoDepthEffect")]
301        const PhotoDepthEffect = 1<<4;
302        #[doc(alias = "PHAssetMediaSubtypeSpatialMedia")]
303        const SpatialMedia = 1<<10;
304        #[doc(alias = "PHAssetMediaSubtypeVideoStreamed")]
305        const VideoStreamed = 1<<16;
306        #[doc(alias = "PHAssetMediaSubtypeVideoHighFrameRate")]
307        const VideoHighFrameRate = 1<<17;
308        #[doc(alias = "PHAssetMediaSubtypeVideoTimelapse")]
309        const VideoTimelapse = 1<<18;
310        #[doc(alias = "PHAssetMediaSubtypeVideoScreenRecording")]
311        const VideoScreenRecording = 1<<19;
312        #[doc(alias = "PHAssetMediaSubtypeVideoCinematic")]
313        const VideoCinematic = 1<<21;
314    }
315}
316
317unsafe impl Encode for PHAssetMediaSubtype {
318    const ENCODING: Encoding = NSUInteger::ENCODING;
319}
320
321unsafe impl RefEncode for PHAssetMediaSubtype {
322    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
323}
324
325/// [Apple's documentation](https://developer.apple.com/documentation/photos/phassetburstselectiontype?language=objc)
326// NS_OPTIONS
327#[repr(transparent)]
328#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
329pub struct PHAssetBurstSelectionType(pub NSUInteger);
330bitflags::bitflags! {
331    impl PHAssetBurstSelectionType: NSUInteger {
332        #[doc(alias = "PHAssetBurstSelectionTypeNone")]
333        const None = 0;
334        #[doc(alias = "PHAssetBurstSelectionTypeAutoPick")]
335        const AutoPick = 1<<0;
336        #[doc(alias = "PHAssetBurstSelectionTypeUserPick")]
337        const UserPick = 1<<1;
338    }
339}
340
341unsafe impl Encode for PHAssetBurstSelectionType {
342    const ENCODING: Encoding = NSUInteger::ENCODING;
343}
344
345unsafe impl RefEncode for PHAssetBurstSelectionType {
346    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
347}
348
349/// [Apple's documentation](https://developer.apple.com/documentation/photos/phassetsourcetype?language=objc)
350// NS_OPTIONS
351#[repr(transparent)]
352#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
353pub struct PHAssetSourceType(pub NSUInteger);
354bitflags::bitflags! {
355    impl PHAssetSourceType: NSUInteger {
356        #[doc(alias = "PHAssetSourceTypeNone")]
357        const TypeNone = 0;
358        #[doc(alias = "PHAssetSourceTypeUserLibrary")]
359        const TypeUserLibrary = 1<<0;
360        #[doc(alias = "PHAssetSourceTypeCloudShared")]
361        const TypeCloudShared = 1<<1;
362        #[doc(alias = "PHAssetSourceTypeiTunesSynced")]
363        const TypeiTunesSynced = 1<<2;
364    }
365}
366
367unsafe impl Encode for PHAssetSourceType {
368    const ENCODING: Encoding = NSUInteger::ENCODING;
369}
370
371unsafe impl RefEncode for PHAssetSourceType {
372    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
373}
374
375/// [Apple's documentation](https://developer.apple.com/documentation/photos/phassetresourcetype?language=objc)
376// NS_ENUM
377#[repr(transparent)]
378#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
379pub struct PHAssetResourceType(pub NSInteger);
380impl PHAssetResourceType {
381    #[doc(alias = "PHAssetResourceTypePhoto")]
382    pub const Photo: Self = Self(1);
383    #[doc(alias = "PHAssetResourceTypeVideo")]
384    pub const Video: Self = Self(2);
385    #[doc(alias = "PHAssetResourceTypeAudio")]
386    pub const Audio: Self = Self(3);
387    #[doc(alias = "PHAssetResourceTypeAlternatePhoto")]
388    pub const AlternatePhoto: Self = Self(4);
389    #[doc(alias = "PHAssetResourceTypeFullSizePhoto")]
390    pub const FullSizePhoto: Self = Self(5);
391    #[doc(alias = "PHAssetResourceTypeFullSizeVideo")]
392    pub const FullSizeVideo: Self = Self(6);
393    #[doc(alias = "PHAssetResourceTypeAdjustmentData")]
394    pub const AdjustmentData: Self = Self(7);
395    #[doc(alias = "PHAssetResourceTypeAdjustmentBasePhoto")]
396    pub const AdjustmentBasePhoto: Self = Self(8);
397    #[doc(alias = "PHAssetResourceTypePairedVideo")]
398    pub const PairedVideo: Self = Self(9);
399    #[doc(alias = "PHAssetResourceTypeFullSizePairedVideo")]
400    pub const FullSizePairedVideo: Self = Self(10);
401    #[doc(alias = "PHAssetResourceTypeAdjustmentBasePairedVideo")]
402    pub const AdjustmentBasePairedVideo: Self = Self(11);
403    #[doc(alias = "PHAssetResourceTypeAdjustmentBaseVideo")]
404    pub const AdjustmentBaseVideo: Self = Self(12);
405    #[doc(alias = "PHAssetResourceTypePhotoProxy")]
406    pub const PhotoProxy: Self = Self(19);
407}
408
409unsafe impl Encode for PHAssetResourceType {
410    const ENCODING: Encoding = NSInteger::ENCODING;
411}
412
413unsafe impl RefEncode for PHAssetResourceType {
414    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
415}
416
417/// [Apple's documentation](https://developer.apple.com/documentation/photos/phobjecttype?language=objc)
418// NS_ENUM
419#[repr(transparent)]
420#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
421pub struct PHObjectType(pub NSInteger);
422impl PHObjectType {
423    #[doc(alias = "PHObjectTypeAsset")]
424    pub const Asset: Self = Self(1);
425    #[doc(alias = "PHObjectTypeAssetCollection")]
426    pub const AssetCollection: Self = Self(2);
427    #[doc(alias = "PHObjectTypeCollectionList")]
428    pub const CollectionList: Self = Self(3);
429}
430
431unsafe impl Encode for PHObjectType {
432    const ENCODING: Encoding = NSInteger::ENCODING;
433}
434
435unsafe impl RefEncode for PHObjectType {
436    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
437}