rust_macios/foundation/
type_defs.rs1use libc::c_double;
5
6use crate::{
7 core_graphics::{CGPoint, CGRect, CGSize},
8 objective_c_runtime::id,
9};
10
11use super::{NSComparisonResult, NSDecimalNumber, NSRange, NSString};
12
13#[cfg(target_pointer_width = "32")]
15pub type Int = libc::c_int;
16
17#[cfg(target_pointer_width = "32")]
19pub type UInt = libc::c_uint;
20
21#[cfg(target_pointer_width = "64")]
23pub type Int = libc::c_long;
24
25#[cfg(target_pointer_width = "64")]
27pub type UInt = libc::c_ulong;
28
29pub type Int8 = libc::c_schar;
31
32pub type UInt8 = libc::c_uchar;
34
35pub type Int16 = libc::c_short;
37
38pub type UInt16 = libc::c_ushort;
40
41pub type Int32 = libc::c_int;
43
44pub type UInt32 = libc::c_uint;
46
47pub type Int64 = libc::c_longlong;
49
50pub type UInt64 = libc::c_ulonglong;
52
53pub type Double = c_double;
55
56pub type NSDecimal = NSDecimalNumber;
58
59pub type NSRect = CGRect;
61
62pub type NSSize = CGSize;
64
65pub type NSStringTransform = *const NSString;
70pub type NSLocaleKey = *mut NSString;
72
73pub type NSPropertyListWriteOptions = super::NSPropertyListMutabilityOptions;
75
76pub type NSPropertyListReadOptions = super::NSPropertyListMutabilityOptions;
78
79pub type NSTimeInterval = c_double;
84
85pub type NSPoint = CGPoint;
87
88pub type NSNotificationName = NSString;
90
91pub type NSErrorDomain = NSString;
93
94pub type NSErrorUserInfoKey = NSString;
96
97pub type NSAttributedStringKey = NSString;
99
100pub type NSRangePointer = *mut NSRange;
102
103pub type NSAttributedStringDocumentReadingOptionKey = NSString;
105
106pub type NSAttributedStringDocumentAttributeKey = NSString;
108
109pub type NSComparator = fn(a: id, b: id) -> NSComparisonResult;