|
1 |
| -typedef unsigned NSUInteger; |
2 |
| - |
3 |
| -#define __CF_OPTIONS_ATTRIBUTES __attribute__((flag_enum,enum_extensibility(open))) |
4 |
| -#if (__cplusplus) |
5 |
| -#define CF_OPTIONS(_type, _name) __attribute__((availability(swift,unavailable))) _type _name; enum __CF_OPTIONS_ATTRIBUTES : _name |
6 |
| -#else |
7 |
| -#define CF_OPTIONS(_type, _name) enum __CF_OPTIONS_ATTRIBUTES _name : _type _name; enum _name : _type |
8 |
| -#endif |
9 |
| - |
10 |
| -typedef CF_OPTIONS(NSUInteger, NSEnumerationOptions) { |
11 |
| - NSEnumerationConcurrent = (1UL << 0), |
12 |
| - NSEnumerationReverse = (1UL << 1), |
13 |
| -}; |
| 1 | +// Enum usage that is bitwise-able and assignable in C++, aka how CF_OPTIONS |
| 2 | +// does things. |
| 3 | +typedef int __attribute__((availability(swift, unavailable))) NSEnumerationOptions; |
| 4 | +enum : NSEnumerationOptions { NSEnumerationConcurrent, NSEnumerationReverse }; |
14 | 5 |
|
15 | 6 | @interface NSSet
|
16 | 7 | - (void)enumerateObjectsWithOptions:(NSEnumerationOptions)opts ;
|
17 | 8 | @end
|
18 | 9 |
|
19 |
| -typedef CF_OPTIONS(NSUInteger, NSOrderedCollectionDifferenceCalculationOptions) { |
| 10 | +typedef int __attribute__((availability(swift, unavailable))) NSOrderedCollectionDifferenceCalculationOptions; |
| 11 | +enum : NSOrderedCollectionDifferenceCalculationOptions { |
20 | 12 | NSOrderedCollectionDifferenceCalculationOptions1,
|
21 | 13 | NSOrderedCollectionDifferenceCalculationOptions2
|
22 | 14 | };
|
23 | 15 |
|
24 |
| -typedef CF_OPTIONS(NSUInteger, NSCalendarUnit) { |
25 |
| - NSCalendarUnit1, |
26 |
| - NSCalendarUnit2 |
27 |
| -}; |
| 16 | +typedef int __attribute__((availability(swift, unavailable))) NSCalendarUnit; |
| 17 | +enum : NSCalendarUnit { NSCalendarUnit1, NSCalendarUnit2 }; |
28 | 18 |
|
29 |
| -typedef CF_OPTIONS(NSUInteger, NSSearchPathDomainMask) { |
30 |
| - NSSearchPathDomainMask1, |
31 |
| - NSSearchPathDomainMask2 |
32 |
| -}; |
| 19 | +typedef int __attribute__((availability(swift, unavailable))) NSSearchPathDomainMask; |
| 20 | +enum : NSSearchPathDomainMask { NSSearchPathDomainMask1, NSSearchPathDomainMask2 }; |
33 | 21 |
|
34 |
| -typedef CF_OPTIONS(NSUInteger, NSControlCharacterAction) { |
35 |
| - NSControlCharacterAction1, |
36 |
| - NSControlCharacterAction2 |
37 |
| -}; |
| 22 | +typedef int __attribute__((availability(swift, unavailable))) NSControlCharacterAction; |
| 23 | +enum : NSControlCharacterAction { NSControlCharacterAction1, NSControlCharacterAction2 }; |
38 | 24 |
|
39 |
| -typedef CF_OPTIONS(NSUInteger, UIControlState) { |
40 |
| - UIControlState1, |
41 |
| - UIControlState2 |
42 |
| -}; |
| 25 | +typedef int __attribute__((availability(swift, unavailable))) UIControlState; |
| 26 | +enum : UIControlState { UIControlState1, UIControlState2 }; |
43 | 27 |
|
44 |
| -typedef CF_OPTIONS(NSUInteger, UITableViewCellStateMask) { |
45 |
| - UITableViewCellStateMask1, |
46 |
| - UITableViewCellStateMask2 |
47 |
| -}; |
| 28 | +typedef int __attribute__((availability(swift, unavailable))) UITableViewCellStateMask; |
| 29 | +enum : UITableViewCellStateMask { UITableViewCellStateMask1, UITableViewCellStateMask2 }; |
48 | 30 |
|
49 |
| -typedef CF_OPTIONS(NSUInteger, UIControlEvents) { |
50 |
| - UIControlEvents1, |
51 |
| - UIControlEvents2 |
52 |
| -}; |
| 31 | +typedef int __attribute__((availability(swift, unavailable))) UIControlEvents; |
| 32 | +enum : UIControlEvents { UIControlEvents1, UIControlEvents2 }; |
53 | 33 |
|
54 |
| -typedef CF_OPTIONS(NSUInteger, UITableViewScrollPosition) { |
| 34 | +typedef int __attribute__((availability(swift, unavailable))) |
| 35 | +UITableViewScrollPosition; |
| 36 | +enum : UITableViewScrollPosition { |
55 | 37 | UITableViewScrollPosition1,
|
56 | 38 | UITableViewScrollPosition2
|
57 | 39 | };
|
|
0 commit comments