1use crate::core_graphics::CGRectEdge;
3
4pub mod string {
6 #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
8 #[repr(u64)]
9 pub enum Encoding {
10 ASCII = 1,
12 NEXTSTEP = 2,
14 JapaneseEUC = 3,
16 UTF8 = 4,
18 ISOLatin1 = 5,
20 Symbol = 6,
22 NonLossyASCII = 7,
24 ShiftJIS = 8,
26 ISOLatin2 = 9,
28 Unicode = 10,
30 WindowsCP1251 = 11,
32 WindowsCP1252 = 12,
34 WindowsCP1253 = 13,
36 WindowsCP1254 = 14,
38 WindowsCP1250 = 15,
40 ISO2022JP = 21,
42 MacOSRoman = 30,
44 UTF16BigEndian = 0x90000100,
46 UTF16LittleEndian = 0x94000100,
48 UTF32 = 0x8c000100,
50 UTF32BigEndian = 0x98000100,
52 UTF32LittleEndian = 0x9c000100,
54 #[deprecated(note = "This encoding has been deprecated—there is no replacement.")]
56 Proprietary = 65536,
57 }
58
59 impl Encoding {
60 pub const UTF16: Self = Encoding::Unicode;
62 }
63}
64
65#[derive(Debug, PartialEq, Eq)]
67#[repr(u64)]
68pub enum NSStringCompareOptions {
69 CaseInsensitive = 1,
71 Literal = 2,
73 Backwards = 4,
75 Anchored = 8,
77 Numeric = 64,
79 DiacriticInsensitive = 128,
81 WidthInsensitive = 256,
83 ForcedOrdering = 512,
85 RegularExpression = 1024,
87}
88
89impl NSStringCompareOptions {
90 pub fn new(raw_value: usize) -> Self {
92 match raw_value {
93 1 => NSStringCompareOptions::CaseInsensitive,
94 2 => NSStringCompareOptions::Literal,
95 4 => NSStringCompareOptions::Backwards,
96 8 => NSStringCompareOptions::Anchored,
97 64 => NSStringCompareOptions::Numeric,
98 128 => NSStringCompareOptions::DiacriticInsensitive,
99 256 => NSStringCompareOptions::WidthInsensitive,
100 512 => NSStringCompareOptions::ForcedOrdering,
101 1024 => NSStringCompareOptions::RegularExpression,
102 _ => panic!("Unknown CompareOptions value: {raw_value}"),
103 }
104 }
105}
106
107#[derive(Debug, PartialEq, Eq)]
109#[repr(C)]
110pub enum NSComparisonResult {
111 OrderedAscending = -1,
113 OrderedSame = 0,
115 OrderedDescending = 1,
117}
118
119#[derive(Debug)]
121#[repr(u64)]
122pub enum NSUrlRequestCachePolicy {
123 UseProtocolCachePolicy = 0,
125 ReloadIgnoringLocalCacheData = 1,
127 ReloadIgnoringLocalAndRemoteCacheData = 4, ReturnCacheDataElseLoad = 2,
131 ReturnCacheDataDontLoad = 3,
133 ReloadRevalidatingCacheData = 5, }
136
137impl NSUrlRequestCachePolicy {
138 #[allow(non_upper_case_globals)]
140 pub const ReloadIgnoringCacheData: Self = Self::ReloadIgnoringLocalCacheData;
141}
142
143#[derive(Debug)]
145#[repr(u64)]
146pub enum NSStreamStatus {
147 NotOpen = 0,
150 Opening = 1,
152 Open = 2,
154 Reading = 3,
156 Writing = 4,
158 AtEnd = 5,
160 Closed = 6,
162 Error = 7,
164}
165
166#[derive(Debug)]
168#[repr(u64)]
169pub enum NSPropertyListFormat {
170 OpenStep = 1,
172 Xml = 100,
174 Binary = 200,
176}
177
178#[derive(Debug)]
180#[repr(u64)]
181pub enum NSPropertyListMutabilityOptions {
182 Immutable = 0,
184 MutableContainers = 1,
186 MutableContainersAndLeaves = 2,
188}
189
190#[derive(Debug)]
192#[repr(u64)]
193pub enum NSNetServiceOptions {
194 NoAutoRename = 1 << 0,
196 ListenForConnections = 1 << 1,
201}
202
203#[derive(Debug)]
204#[repr(u64)]
205pub enum NSDateFormatterStyle {
206 None,
208 Short,
210 Medium,
212 Long,
214 Full,
216}
217
218#[derive(Debug)]
220#[repr(u64)]
221pub enum NSDateFormatterBehavior {
222 Default = 0,
224 #[cfg(target_os = "macos")]
226 #[allow(non_camel_case_types)]
227 Mode_10_0 = 1000,
228 #[allow(non_camel_case_types)]
230 Mode_10_4 = 1040,
231}
232
233#[derive(Debug)]
234#[repr(u64)]
235pub enum NSHttpCookieAcceptPolicy {
236 Always,
237 Never,
238 OnlyFromMainDocumentDomain,
239}
240
241#[derive(Debug)]
242#[repr(u64)]
243pub enum NSCalendarUnit {
244 Era = 2,
245 Year = 4,
246 Month = 8,
247 Day = 16,
248 Hour = 32,
249 Minute = 64,
250 Second = 128,
251 #[deprecated]
252 Week = 256,
253 Weekday = 512,
254 WeekdayOrdinal = 1024,
255 Quarter = 2048,
256
257 WeekOfMonth = (1 << 12),
258 WeekOfYear = (1 << 13),
259 YearForWeakOfYear = (1 << 14),
260
261 Nanosecond = (1 << 15),
262
263 Calendar = (1 << 20),
264 TimeZone = (1 << 21),
265}
266
267#[derive(Debug)]
268#[repr(i64)]
269pub enum NSOperationQueuePriority {
270 VeryLow = -8,
271 Low = -4,
272 Normal = 0,
273 High = 4,
274 VeryHigh = 8,
275}
276
277#[derive(Debug)]
278#[repr(u64)]
279pub enum NSNotificationCoalescing {
280 NoCoalescing = 0,
281 CoalescingOnName = 1,
282 CoalescingOnSender = 2,
283}
284
285#[derive(Debug)]
286#[repr(u64)]
287pub enum NSPostingStyle {
288 PostWhenIdle = 1,
289 PostASAP = 2,
290 Now = 3,
291}
292
293#[derive(Debug)]
294#[repr(u64)]
295pub enum NSExpressionType {
296 ConstantValue = 0,
297 EvaluatedObject,
298 Variable,
299 KeyPath,
300 Function,
301 UnionSet,
302 IntersectSet,
303 MinusSet,
304 Subquery = 13,
305 NSAggregate,
306 AnyKey = 15,
307 Block = 19,
308 Conditional = 20,
309}
310
311#[derive(Debug)]
312#[repr(C)]
313pub enum NSUrlError {
314 Unknown = -1,
315
316 BackgroundSessionRequiresSharedContainer = -995,
317 BackgroundSessionInUseByAnotherProcess = -996,
318 BackgroundSessionWasDisconnected = -997,
319
320 Cancelled = -999,
321 BadURL = -1000,
322 TimedOut = -1001,
323 UnsupportedURL = -1002,
324 CannotFindHost = -1003,
325 CannotConnectToHost = -1004,
326 NetworkConnectionLost = -1005,
327 DNSLookupFailed = -1006,
328 HTTPTooManyRedirects = -1007,
329 ResourceUnavailable = -1008,
330 NotConnectedToInternet = -1009,
331 RedirectToNonExistentLocation = -1010,
332 BadServerResponse = -1011,
333 UserCancelledAuthentication = -1012,
334 UserAuthenticationRequired = -1013,
335 ZeroByteResource = -1014,
336 CannotDecodeRawData = -1015,
337 CannotDecodeContentData = -1016,
338 CannotParseResponse = -1017,
339 InternationalRoamingOff = -1018,
340 CallIsActive = -1019,
341 DataNotAllowed = -1020,
342 RequestBodyStreamExhausted = -1021,
343 AppTransportSecurityRequiresSecureConnection = -1022,
344
345 FileDoesNotExist = -1100,
346 FileIsDirectory = -1101,
347 NoPermissionsToReadFile = -1102,
348 DataLengthExceedsMaximum = -1103,
349 FileOutsideSafeArea = -1104,
350
351 SecureConnectionFailed = -1200,
352 ServerCertificateHasBadDate = -1201,
353 ServerCertificateUntrusted = -1202,
354 ServerCertificateHasUnknownRoot = -1203,
355 ServerCertificateNotYetValid = -1204,
356 ClientCertificateRejected = -1205,
357 ClientCertificateRequired = -1206,
358
359 CannotLoadFromNetwork = -2000,
360
361 CannotCreateFile = -3000,
363 CannotOpenFile = -3001,
364 CannotCloseFile = -3002,
365 CannotWriteToFile = -3003,
366 CannotRemoveFile = -3004,
367 CannotMoveFile = -3005,
368 DownloadDecodingFailedMidStream = -3006,
369 DownloadDecodingFailedToComplete = -3007,
370}
371
372#[derive(Debug)]
373#[repr(u64)]
374pub enum NSKeyValueObservingOptions {
375 New = 1,
376 Old = 2,
377 OldNew = 3,
378 Initial = 4,
379 Prior = 8,
380}
381
382#[derive(Debug)]
383#[repr(u64)]
384pub enum NSKeyValueChange {
385 Setting = 1,
386 Insertion,
387 Removal,
388 Replacement,
389}
390
391#[derive(Debug)]
392#[repr(u64)]
393pub enum NSKeyValueSetMutationKind {
394 UnionSet = 1,
395 MinusSet,
396 IntersectSet,
397 SetSet,
398}
399
400#[derive(Debug)]
401#[repr(u64)]
402pub enum NSEnumerationOptions {
403 SortConcurrent = 1,
404 Reverse = 2,
405}
406
407#[derive(Debug)]
408#[repr(u64)]
409pub enum NSStreamEvent {
410 None = 0,
411 OpenCompleted = 1 << 0,
412 HasBytesAvailable = 1 << 1,
413 HasSpaceAvailable = 1 << 2,
414 ErrorOccurred = 1 << 3,
415 EndEncountered = 1 << 4,
416}
417
418#[derive(Debug)]
419#[repr(u64)]
420pub enum NSComparisonPredicateModifier {
421 Direct,
422 All,
423 Any,
424}
425
426#[derive(Debug)]
427#[repr(u64)]
428pub enum NSPredicateOperatorType {
429 LessThan,
430 LessThanOrEqualTo,
431 GreaterThan,
432 GreaterThanOrEqualTo,
433 EqualTo,
434 NotEqualTo,
435 Matches,
436 Like,
437 BeginsWith,
438 EndsWith,
439 In,
440 CustomSelector,
441 Contains = 99,
442 Between,
443}
444
445#[derive(Debug)]
446#[repr(u64)]
447pub enum NSComparisonPredicateOptions {
448 None = 0x00,
449 CaseInsensitive = 1 << 0,
450 DiacriticInsensitive = 1 << 1,
451 Normalized = 1 << 2,
452}
453
454#[derive(Debug)]
455#[repr(u64)]
456pub enum NSCompoundPredicateType {
457 Not,
458 And,
459 Or,
460}
461
462#[derive(Debug)]
463#[repr(u64)]
464pub enum NSVolumeEnumerationOptions {
465 None = 0,
466 SkipHiddenVolumes = 1 << 1,
468 ProduceFileReferenceUrls = 1 << 2,
469}
470
471#[derive(Debug)]
472#[repr(u64)]
473pub enum NSDirectoryEnumerationOptions {
474 None = 0,
475 SkipsSubdirectoryDescendants = 1 << 0,
476 SkipsPackageDescendants = 1 << 1,
477 SkipsHiddenFiles = 1 << 2,
478 IncludesDirectoriesPostOrder = 1 << 3,
479 ProducesRelativePathUrls = 1 << 4,
480}
481
482#[derive(Debug)]
483#[repr(u64)]
484pub enum NSFileManagerItemReplacementOptions {
485 None = 0,
486 UsingNewMetadataOnly = 1 << 0,
487 WithoutDeletingBackupItem = 1 << 1,
488}
489
490#[derive(Debug)]
491#[repr(u64)]
492pub enum NSSearchPathDirectory {
493 ApplicationDirectory = 1,
494 DemoApplicationDirectory,
495 DeveloperApplicationDirectory,
496 AdminApplicationDirectory,
497 LibraryDirectory,
498 DeveloperDirectory,
499 UserDirectory,
500 DocumentationDirectory,
501 DocumentDirectory,
502 CoreServiceDirectory,
503 AutosavedInformationDirectory = 11,
504 DesktopDirectory = 12,
505 CachesDirectory = 13,
506 ApplicationSupportDirectory = 14,
507 DownloadsDirectory = 15,
508 InputMethodsDirectory = 16,
509 MoviesDirectory = 17,
510 MusicDirectory = 18,
511 PicturesDirectory = 19,
512 PrinterDescriptionDirectory = 20,
513 SharedPublicDirectory = 21,
514 PreferencePanesDirectory = 22,
515 #[cfg(target_os = "macos")]
516 ApplicationScriptsDirectory = 23,
517 ItemReplacementDirectory = 99,
518 AllApplicationsDirectory = 100,
519 AllLibrariesDirectory = 101,
520 TrashDirectory = 102,
521}
522
523#[derive(Debug)]
524#[repr(u64)]
525pub enum NSSearchPathDomain {
526 None = 0,
527 User = 1 << 0,
528 Local = 1 << 1,
529 Network = 1 << 2,
530 System = 1 << 3,
531 All = 0x0ffff,
532}
533
534#[derive(Debug)]
536#[repr(u64)]
537pub enum NSRoundingMode {
538 Plain,
540 Down,
542 Up,
544 Bankers,
546}
547
548#[derive(Debug)]
550#[repr(u64)]
551pub enum NSCalculationError {
552 None,
554 PrecisionLoss,
556 Underflow,
558 Overflow,
560 DivideByZero,
562}
563
564#[derive(Debug)]
565#[repr(u64)]
566pub enum NSStringDrawingOptions {
567 UsesLineFragmentOrigin = (1 << 0),
568 UsesFontLeading = (1 << 1),
569 DisableScreenFontSubstitution = (1 << 2),
570 UsesDeviceMetrics = (1 << 3),
571 OneShot = (1 << 4),
572 TruncatesLastVisibleLine = (1 << 5),
573}
574
575#[derive(Debug)]
576#[repr(u64)]
577pub enum NSNumberFormatterStyle {
578 None = 0,
580 Decimal = 1,
582 Currency = 2,
585 Percent = 3,
587 Scientific = 4,
589 SpellOut = 5,
592 OrdinalStyle = 6,
594 CurrencyIsoCodeStyle = 8,
597 CurrencyPluralStyle = 9,
600 CurrencyAccountingStyle = 10,
603}
604
605#[derive(Debug)]
606#[repr(u64)]
607pub enum NSNumberFormatterBehavior {
608 Default = 0,
611 #[cfg(target_os = "macos")]
613 #[allow(non_camel_case_types)]
614 Version_10_0 = 1000,
615 #[allow(non_camel_case_types)]
617 Version_10_4 = 1040,
618}
619
620#[derive(Debug)]
622#[repr(u64)]
623pub enum NSNumberFormatterPadPosition {
624 BeforePrefix,
626 AfterPrefix,
628 BeforeSuffix,
630 AfterSuffix,
632}
633
634#[derive(Debug)]
638#[repr(u64)]
639pub enum NSNumberFormatterRoundingMode {
640 Ceiling,
642 Floor,
644 Down,
646 Up,
648 HalfEven,
650 HalfDown,
652 HalfUp,
654}
655
656#[derive(Debug)]
657#[repr(u64)]
658pub enum NSFileVersionReplacingOptions {
659 ByMoving = 1 << 0,
660}
661
662#[derive(Debug)]
663#[repr(u64)]
664pub enum NSFileVersionAddingOptions {
665 ByMoving = 1 << 0,
666}
667
668#[derive(Debug)]
669#[repr(u64)]
670pub enum NSFileCoordinatorReadingOptions {
671 WithoutChanges = 1,
672 ResolvesSymbolicLink = 1 << 1,
673 #[cfg(any(target_os = "ios", target_os = "macos"))]
674 ImmediatelyAvailableMetadataOnly = 1 << 2,
675 #[cfg(any(target_os = "ios", target_os = "macos"))]
676 ForUploading = 1 << 3,
677}
678
679#[derive(Debug)]
680#[repr(u64)]
681pub enum NSFileCoordinatorWritingOptions {
682 ForDeleting = 1,
683 ForMoving = 2,
684 ForMerging = 4,
685 ForReplacing = 8,
686 #[cfg(any(target_os = "ios", target_os = "macos"))]
687 ContentIndependentMetadataOnly = 16,
688}
689
690#[derive(Debug)]
691#[repr(u64)]
692pub enum NSLinguisticTaggerOptions {
693 OmitWords = 1,
694 OmitPunctuation = 2,
695 OmitWhitespace = 4,
696 OmitOther = 8,
697 JoinNames = 16,
698}
699
700#[derive(Debug)]
701#[repr(i64)]
702pub enum NSUbiquitousKeyValueStoreChangeReason {
703 ServerChange,
704 InitialSyncChange,
705 QuotaViolationChange,
706 AccountChange,
707}
708
709#[derive(Debug)]
710#[repr(u64)]
711pub enum NSJsonReadingOptions {
712 MutableContainers = 1,
713 MutableLeaves = 2,
714 FragmentsAllowed = 4,
715}
716
717#[derive(Debug)]
718#[repr(u64)]
719pub enum NSJsonWritingOptions {
720 PrettyPrinted = 1,
721 SortedKeys = (1 << 1),
722 FragmentsAllowed = (1 << 2),
723 WithoutEscapingSlashes = (1 << 3),
724}
725
726#[derive(Debug)]
727#[repr(u64)]
728pub enum NSLocaleLanguageDirection {
729 Unknown,
730 LeftToRight,
731 RightToLeft,
732 TopToBottom,
733 BottomToTop,
734}
735
736#[derive(Debug)]
737#[repr(i64)]
738pub enum NSAlignmentOptions {
739 MinXInward = 1 << 0,
740 MinYInward = 1 << 1,
741 MaxXInward = 1 << 2,
742 MaxYInward = 1 << 3,
743 WidthInward = 1 << 4,
744 HeightInward = 1 << 5,
745
746 MinXOutward = 1 << 8,
747 MinYOutward = 1 << 9,
748 MaxXOutward = 1 << 10,
749 MaxYOutward = 1 << 11,
750 WidthOutward = 1 << 12,
751 HeightOutward = 1 << 13,
752
753 MinXNearest = 1 << 16,
754 MinYNearest = 1 << 17,
755 MaxXNearest = 1 << 18,
756 MaxYNearest = 1 << 19,
757 WidthNearest = 1 << 20,
758 HeightNearest = 1 << 21,
759
760 RectFlipped = (1_u64 << 63) as i64,
761}
762
763impl NSAlignmentOptions {
764 }
768
769#[derive(Debug)]
770#[repr(u64)]
771pub enum NSFileWrapperReadingOptions {
772 Immediate = 1 << 0,
773 WithoutMapping = 1 << 1,
774}
775
776#[derive(Debug)]
777#[repr(u64)]
778pub enum NSFileWrapperWritingOptions {
779 Atomic = 1 << 0,
780 WithNameUpdating = 1 << 1,
781}
782
783#[derive(Debug)]
784#[repr(u64)]
785pub enum NSAttributedStringEnumerationOptions {
786 None = 0,
787 Reverse = 1 << 1,
788 LongestEffectiveRangeNotRequired = 1 << 20,
789}
790
791#[derive(Debug)]
792#[repr(i64)]
793pub enum NSWritingDirection {
794 Natural = -1,
795 LeftToRight = 0,
796 RightToLeft = 1,
797}
798
799#[derive(Debug)]
800#[repr(u64)]
801pub enum NSByteCountFormatterUnits {
802 UseDefault = 0,
803 UseBytes = 1 << 0,
804 UseKB = 1 << 1,
805 UseMB = 1 << 2,
806 UseGB = 1 << 3,
807 UseTB = 1 << 4,
808 UsePB = 1 << 5,
809 UseEB = 1 << 6,
810 UseZB = 1 << 7,
811 UseYBOrHigher = 0x0FF << 8,
812 UseAll = 0x0FFFF,
813}
814
815#[derive(Debug)]
816#[repr(i64)]
817pub enum NSByteCountFormatterCountStyle {
818 File,
819 Memory,
820 Decimal,
821 Binary,
822}
823
824#[derive(Debug)]
825#[repr(u64)]
826pub enum NSUrlBookmarkCreationOptions {
827 PreferFileIDResolution = 1 << 8,
828 MinimalBookmark = 1 << 9,
829 SuitableForBookmarkFile = 1 << 10,
830 WithSecurityScope = 1 << 11,
831 SecurityScopeAllowOnlyReadAccess = 1 << 12,
832}
833
834#[derive(Debug)]
835#[repr(u64)]
836pub enum NSUrlBookmarkResolutionOptions {
837 WithoutUI = 1 << 8,
838 WithoutMounting = 1 << 9,
839 WithSecurityScope = 1 << 10,
840}
841
842#[derive(Debug)]
843#[repr(u64)]
844pub enum NSLigatureType {
845 None,
846 Default,
847 All,
848}
849
850#[derive(Debug)]
851#[repr(u64)]
852pub enum NSCalendarOptions {
853 None = 0,
854 WrapCalendarComponents = 1 << 0,
855
856 #[cfg(any(target_os = "ios", target_os = "macos"))]
857 MatchStrictly = 1 << 1,
858 #[cfg(any(target_os = "ios", target_os = "macos"))]
859 SearchBackwards = 1 << 2,
860
861 #[cfg(any(target_os = "ios", target_os = "macos"))]
862 MatchPreviousTimePreservingSmallerUnits = 1 << 8,
863 #[cfg(any(target_os = "ios", target_os = "macos"))]
864 MatchNextTimePreservingSmallerUnits = 1 << 9,
865 #[cfg(any(target_os = "ios", target_os = "macos"))]
866 MatchNextTime = 1 << 10,
867
868 #[cfg(any(target_os = "ios", target_os = "macos"))]
869 MatchFirst = 1 << 12,
870 #[cfg(any(target_os = "ios", target_os = "macos"))]
871 MatchLast = 1 << 13,
872}
873
874#[derive(Debug)]
875#[repr(u64)]
876pub enum NSUrlRequestNetworkServiceType {
877 Default,
878 #[deprecated(note = "Use 'PushKit' framework instead.")]
879 VoIP,
880 Video,
881 Background,
882 Voice,
883 ResponsiveData = 6,
884 AVStreaming = 8,
885 ResponsiveAV = 9,
886 CallSignaling = 11,
887}
888
889#[derive(Debug)]
890#[repr(u64)]
891pub enum NSSortOptions {
892 Concurrent = 1 << 0,
893 Stable = 1 << 4,
894}
895
896#[cfg(target_os = "ios")]
897#[deprecated(note = "Use 'NSWritingDirectionFormatType'.")]
898#[derive(Debug)]
899#[repr(i64)]
900pub enum NSTextWritingDirection {
901 Embedding = 0,
902 Override = 2,
903}
904
905#[derive(Debug)]
906#[repr(i64)]
907pub enum NSUrlSessionAuthChallengeDisposition {
908 UseCredential = 0,
909 PerformDefaultHandling = 1,
910 CancelAuthenticationChallenge = 2,
911 RejectProtectionSpace = 3,
912}
913
914#[derive(Debug)]
915#[repr(i64)]
916pub enum NSUrlSessionTaskState {
917 Running = 0,
918 Suspended = 1,
919 Canceling = 2,
920 Completed = 3,
921}
922
923#[derive(Debug)]
924#[repr(i64)]
925pub enum NSUrlSessionResponseDisposition {
926 Cancel = 0,
927 Allow = 1,
928 BecomeDownload = 2,
929 BecomeStream = 3,
930}
931
932#[derive(Debug)]
933#[repr(i64)]
934pub enum NSUrlErrorCancelledReason {
935 UserForceQuitApplication,
936 BackgroundUpdatesDisabled,
937 InsufficientSystemResources,
938}
939
940#[derive(Debug)]
941#[repr(i64)]
942pub enum NSTimeZoneNameStyle {
943 Standard,
944 ShortStandard,
945 DaylightSaving,
946 ShortDaylightSaving,
947 Generic,
948 ShortGeneric,
949}
950
951#[derive(Debug)]
952#[repr(i64)]
953pub enum NSItemProviderErrorCode {
954 Unknown = -1,
955 None = 0,
956 ItemUnavailable = -1000,
957 UnexpectedValueClass = -1100,
958 UnavailableCoercion = -1200,
959}
960
961#[derive(Debug)]
962#[repr(i64)]
963pub enum NSDateComponentsFormatterUnitsStyle {
964 Positional = 0,
965 Abbreviated,
966 Short,
967 Full,
968 SpellOut,
969 Brief,
970}
971
972#[cfg(any(target_os = "ios", target_os = "macos"))]
974#[derive(Debug)]
975#[repr(i64)]
976pub enum NSFormattingContext {
977 Unknown = 0,
979 Dynamic = 1,
981 Standalone = 2,
983 ListItem = 3,
985 BeginningOfSentence = 4,
987 MiddleOfSentence = 5,
989}
990
991#[cfg(any(target_os = "ios", target_os = "macos"))]
992#[derive(Debug)]
993#[repr(u64)]
994pub enum NSDateIntervalFormatterStyle {
995 None = 0,
996 Short = 1,
997 Medium = 2,
998 Long = 3,
999 Full = 4,
1000}
1001
1002#[cfg(any(target_os = "ios", target_os = "macos"))]
1003#[derive(Debug)]
1004#[repr(i64)]
1005pub enum NSEnergyFormatterUnit {
1006 Joule = 11,
1007 Kilojoule = 14,
1008 Calorie = (7 << 8) + 1,
1009 Kilocalorie = (7 << 8) + 2,
1010}
1011
1012#[cfg(any(target_os = "ios", target_os = "macos"))]
1014#[derive(Debug)]
1015#[repr(i64)]
1016pub enum NSFormattingUnitStyle {
1017 Short = 1,
1019 Medium,
1021 Long,
1023}
1024
1025#[cfg(any(target_os = "ios", target_os = "macos"))]
1026#[derive(Debug)]
1027#[repr(i64)]
1028pub enum NSMassFormatterUnit {
1029 Gram = 11,
1030 Kilogram = 14,
1031 Ounce = (6 << 8) + 1,
1032 Pound = (6 << 8) + 2,
1033 Stone = (6 << 8) + 3,
1034}
1035
1036#[cfg(any(target_os = "ios", target_os = "macos"))]
1037#[derive(Debug)]
1038#[repr(i64)]
1039pub enum NSLengthFormatterUnit {
1040 Millimeter = 8,
1041 Centimeter = 9,
1042 Meter = 11,
1043 Kilometer = 14,
1044 Inch = (5 << 8) + 1,
1045 Foot = (5 << 8) + 2,
1046 Yard = (5 << 8) + 3,
1047 Mile = (5 << 8) + 4,
1048}
1049
1050#[cfg(any(target_os = "ios", target_os = "macos"))]
1051#[derive(Debug)]
1052#[repr(i64)]
1053pub enum NSQualityOfService {
1054 UserInteractive = 33,
1055 UserInitiated = 25,
1056 Utility = 17,
1057 Background = 9,
1058 Default = -1,
1059}
1060
1061#[derive(Debug)]
1062#[repr(i64)]
1063pub enum NSUrlRelationship {
1064 Contains,
1065 Same,
1066 Other,
1067}
1068
1069#[derive(Debug)]
1070#[repr(u64)]
1071pub enum NSTextCheckingType {
1072 Orthography = 1 << 0,
1073 Spelling = 1 << 1,
1074 Grammar = 1 << 2,
1075 Date = 1 << 3,
1076 Address = 1 << 4,
1077 Link = 1 << 5,
1078 Quote = 1 << 6,
1079 Dash = 1 << 7,
1080 Replacement = 1 << 8,
1081 Correction = 1 << 9,
1082 RegularExpression = 1 << 10,
1083 PhoneNumber = 1 << 11,
1084 TransitInformation = 1 << 12,
1085}
1086
1087#[derive(Debug)]
1088#[repr(u64)]
1089pub enum NSRegularExpressionOptions {
1090 CaseInsensitive = 1 << 0,
1091 AllowCommentsAndWhitespace = 1 << 1,
1092 IgnoreMetacharacters = 1 << 2,
1093 DotMatchesLineSeparators = 1 << 3,
1094 AnchorsMatchLines = 1 << 4,
1095 UseUnixLineSeparators = 1 << 5,
1096 UseUnicodeWordBoundaries = 1 << 6,
1097}
1098
1099#[derive(Debug)]
1100#[repr(u64)]
1101pub enum NSMatchingOptions {
1102 ReportProgress = 1 << 0,
1103 ReportCompletion = 1 << 1,
1104 Anchored = 1 << 2,
1105 WithTransparentBounds = 1 << 3,
1106 WithoutAnchoringBounds = 1 << 4,
1107}
1108
1109#[derive(Debug)]
1110#[repr(u64)]
1111pub enum NSMatchingFlags {
1112 Progress = 1 << 0,
1113 Completed = 1 << 1,
1114 HitEnd = 1 << 2,
1115 RequiredEnd = 1 << 3,
1116 InternalError = 1 << 4,
1117}
1118
1119#[cfg(any(target_os = "ios", target_os = "macos"))]
1120#[derive(Debug)]
1121#[repr(u64)]
1122pub enum NSPersonNameComponentsFormatterOptions {
1123 Phonetic = (1 << 1),
1124}
1125
1126#[cfg(any(target_os = "ios", target_os = "macos"))]
1127#[derive(Debug)]
1128#[repr(i64)]
1129pub enum NSPersonNameComponentsFormatterStyle {
1130 Default = 0,
1131 Short,
1132 Medium,
1133 Long,
1134 Abbreviated,
1135}
1136
1137#[cfg(any(target_os = "ios", target_os = "macos"))]
1138#[derive(Debug)]
1139#[repr(i64)]
1140pub enum NSDecodingFailurePolicy {
1141 RaiseException,
1142 SetErrorAndReturn,
1143}
1144
1145#[derive(Debug)]
1146#[repr(u64)]
1147pub enum NSIso8601DateFormatOptions {
1148 Year = 1 << 0,
1149 Month = 1 << 1,
1150 WeekOfYear = 1 << 2,
1151 Day = 1 << 4,
1152 Time = 1 << 5,
1153 TimeZone = 1 << 6,
1154 SpaceBetweenDateAndTime = 1 << 7,
1155 DashSeparatorInDate = 1 << 8,
1156 ColonSeparatorInTime = 1 << 9,
1157 ColonSeparatorInTimeZone = 1 << 10,
1158 FractionalSeconds = 1 << 11,
1159 }
1165
1166#[derive(Debug)]
1167#[repr(i64)]
1168pub enum NSUrlSessionTaskMetricsResourceFetchType {
1169 Unknown,
1170 NetworkLoad,
1171 ServerPush,
1172 LocalCache,
1173}
1174
1175#[derive(Debug)]
1176#[repr(u64)]
1177pub enum NSMeasurementFormatterUnitOptions {
1178 ProvidedUnit = (1 << 0),
1179 NaturalScale = (1 << 1),
1180 TemperatureWithoutUnit = (1 << 2),
1181}
1182
1183#[derive(Debug)]
1184#[repr(i64)]
1185pub enum NSItemProviderRepresentationVisibility {
1186 All = 0,
1187 Team = 1,
1188 Group = 2,
1189 OwnProcess = 3,
1190}
1191
1192#[derive(Debug)]
1193#[repr(i64)]
1194pub enum NSItemProviderFileOptions {
1195 OpenInPlace = 1,
1196}
1197
1198#[derive(Debug)]
1199#[repr(i64)]
1200pub enum NSLinguisticTaggerUnit {
1201 Word,
1202 Sentence,
1203 Paragraph,
1204 Document,
1205}
1206
1207#[derive(Debug)]
1208#[repr(i64)]
1209pub enum NSUrlSessionDelayedRequestDisposition {
1210 ContinueLoading = 0,
1211 UseNewRequest = 1,
1212 Cancel = 2,
1213}
1214
1215#[derive(Debug)]
1216#[repr(u64)]
1217pub enum NSXpcConnectionOptions {
1218 Privileged = (1 << 12),
1219}
1220
1221#[derive(Debug, Copy, Clone)]
1222#[repr(u64)]
1223pub enum NSStringEncodingConversionOptions {
1224 AllowLossy = 1,
1225 ExternalRepresentation = 2,
1226}
1227
1228#[derive(Debug)]
1230#[repr(u64)]
1231pub enum NSRectEdge {
1232 MinXEdge,
1234 MinYEdge,
1236 MaxXEdge,
1238 MaxYEdge,
1240}
1241
1242impl NSRectEdge {
1243 #[allow(non_upper_case_globals)]
1245 pub const MaxX: CGRectEdge = CGRectEdge::MaxXEdge;
1246
1247 #[allow(non_upper_case_globals)]
1249 pub const MaxY: CGRectEdge = CGRectEdge::MaxYEdge;
1250
1251 #[allow(non_upper_case_globals)]
1253 pub const MinX: CGRectEdge = CGRectEdge::MinXEdge;
1254
1255 #[allow(non_upper_case_globals)]
1257 pub const MinY: CGRectEdge = CGRectEdge::MinYEdge;
1258}