@@ -141,20 +141,20 @@ pub enum NSApplicationTerminateReply {
141
141
}
142
142
143
143
bitflags ! {
144
- pub flags NSWindowStyleMask : NSUInteger {
145
- const NSBorderlessWindowMask = 0 ,
146
- const NSTitledWindowMask = 1 << 0 ,
147
- const NSClosableWindowMask = 1 << 1 ,
148
- const NSMiniaturizableWindowMask = 1 << 2 ,
149
- const NSResizableWindowMask = 1 << 3 ,
144
+ pub struct NSWindowStyleMask : NSUInteger {
145
+ const NSBorderlessWindowMask = 0 ;
146
+ const NSTitledWindowMask = 1 << 0 ;
147
+ const NSClosableWindowMask = 1 << 1 ;
148
+ const NSMiniaturizableWindowMask = 1 << 2 ;
149
+ const NSResizableWindowMask = 1 << 3 ;
150
150
151
- const NSTexturedBackgroundWindowMask = 1 << 8 ,
151
+ const NSTexturedBackgroundWindowMask = 1 << 8 ;
152
152
153
- const NSUnifiedTitleAndToolbarWindowMask = 1 << 12 ,
153
+ const NSUnifiedTitleAndToolbarWindowMask = 1 << 12 ;
154
154
155
- const NSFullScreenWindowMask = 1 << 14 ,
155
+ const NSFullScreenWindowMask = 1 << 14 ;
156
156
157
- const NSFullSizeContentViewWindowMask = 1 << 15
157
+ const NSFullSizeContentViewWindowMask = 1 << 15 ;
158
158
}
159
159
}
160
160
@@ -174,46 +174,46 @@ pub enum NSBackingStoreType {
174
174
}
175
175
176
176
bitflags ! {
177
- pub flags NSWindowOrderingMode : NSInteger {
178
- const NSWindowAbove = 1 ,
179
- const NSWindowBelow = -1 ,
180
- const NSWindowOut = 0 ,
177
+ pub struct NSWindowOrderingMode : NSInteger {
178
+ const NSWindowAbove = 1 ;
179
+ const NSWindowBelow = -1 ;
180
+ const NSWindowOut = 0 ;
181
181
}
182
182
}
183
183
184
184
bitflags ! {
185
- pub flags NSAlignmentOptions : libc:: c_ulonglong {
186
- const NSAlignMinXInward = 1 << 0 ,
187
- const NSAlignMinYInward = 1 << 1 ,
188
- const NSAlignMaxXInward = 1 << 2 ,
189
- const NSAlignMaxYInward = 1 << 3 ,
190
- const NSAlignWidthInward = 1 << 4 ,
191
- const NSAlignHeightInward = 1 << 5 ,
192
- const NSAlignMinXOutward = 1 << 8 ,
193
- const NSAlignMinYOutward = 1 << 9 ,
194
- const NSAlignMaxXOutward = 1 << 10 ,
195
- const NSAlignMaxYOutward = 1 << 11 ,
196
- const NSAlignWidthOutward = 1 << 12 ,
197
- const NSAlignHeightOutward = 1 << 13 ,
198
- const NSAlignMinXNearest = 1 << 16 ,
199
- const NSAlignMinYNearest = 1 << 17 ,
200
- const NSAlignMaxXNearest = 1 << 18 ,
201
- const NSAlignMaxYNearest = 1 << 19 ,
202
- const NSAlignWidthNearest = 1 << 20 ,
203
- const NSAlignHeightNearest = 1 << 21 ,
204
- const NSAlignRectFlipped = 1 << 63 ,
185
+ pub struct NSAlignmentOptions : libc:: c_ulonglong {
186
+ const NSAlignMinXInward = 1 << 0 ;
187
+ const NSAlignMinYInward = 1 << 1 ;
188
+ const NSAlignMaxXInward = 1 << 2 ;
189
+ const NSAlignMaxYInward = 1 << 3 ;
190
+ const NSAlignWidthInward = 1 << 4 ;
191
+ const NSAlignHeightInward = 1 << 5 ;
192
+ const NSAlignMinXOutward = 1 << 8 ;
193
+ const NSAlignMinYOutward = 1 << 9 ;
194
+ const NSAlignMaxXOutward = 1 << 10 ;
195
+ const NSAlignMaxYOutward = 1 << 11 ;
196
+ const NSAlignWidthOutward = 1 << 12 ;
197
+ const NSAlignHeightOutward = 1 << 13 ;
198
+ const NSAlignMinXNearest = 1 << 16 ;
199
+ const NSAlignMinYNearest = 1 << 17 ;
200
+ const NSAlignMaxXNearest = 1 << 18 ;
201
+ const NSAlignMaxYNearest = 1 << 19 ;
202
+ const NSAlignWidthNearest = 1 << 20 ;
203
+ const NSAlignHeightNearest = 1 << 21 ;
204
+ const NSAlignRectFlipped = 1 << 63 ;
205
205
const NSAlignAllEdgesInward = NSAlignMinXInward . bits
206
206
| NSAlignMaxXInward . bits
207
207
| NSAlignMinYInward . bits
208
- | NSAlignMaxYInward . bits,
208
+ | NSAlignMaxYInward . bits;
209
209
const NSAlignAllEdgesOutward = NSAlignMinXOutward . bits
210
210
| NSAlignMaxXOutward . bits
211
211
| NSAlignMinYOutward . bits
212
- | NSAlignMaxYOutward . bits,
212
+ | NSAlignMaxYOutward . bits;
213
213
const NSAlignAllEdgesNearest = NSAlignMinXNearest . bits
214
214
| NSAlignMaxXNearest . bits
215
215
| NSAlignMinYNearest . bits
216
- | NSAlignMaxYNearest . bits,
216
+ | NSAlignMaxYNearest . bits;
217
217
}
218
218
}
219
219
@@ -767,26 +767,26 @@ impl NSMenuItem for id {
767
767
pub type NSWindowDepth = libc:: c_int ;
768
768
769
769
bitflags ! {
770
- pub flags NSWindowCollectionBehavior : NSUInteger {
771
- const NSWindowCollectionBehaviorDefault = 0 ,
772
- const NSWindowCollectionBehaviorCanJoinAllSpaces = 1 << 0 ,
773
- const NSWindowCollectionBehaviorMoveToActiveSpace = 1 << 1 ,
770
+ pub struct NSWindowCollectionBehavior : NSUInteger {
771
+ const NSWindowCollectionBehaviorDefault = 0 ;
772
+ const NSWindowCollectionBehaviorCanJoinAllSpaces = 1 << 0 ;
773
+ const NSWindowCollectionBehaviorMoveToActiveSpace = 1 << 1 ;
774
774
775
- const NSWindowCollectionBehaviorManaged = 1 << 2 ,
776
- const NSWindowCollectionBehaviorTransient = 1 << 3 ,
777
- const NSWindowCollectionBehaviorStationary = 1 << 4 ,
775
+ const NSWindowCollectionBehaviorManaged = 1 << 2 ;
776
+ const NSWindowCollectionBehaviorTransient = 1 << 3 ;
777
+ const NSWindowCollectionBehaviorStationary = 1 << 4 ;
778
778
779
- const NSWindowCollectionBehaviorParticipatesInCycle = 1 << 5 ,
780
- const NSWindowCollectionBehaviorIgnoresCycle = 1 << 6 ,
779
+ const NSWindowCollectionBehaviorParticipatesInCycle = 1 << 5 ;
780
+ const NSWindowCollectionBehaviorIgnoresCycle = 1 << 6 ;
781
781
782
- const NSWindowCollectionBehaviorFullScreenPrimary = 1 << 7 ,
783
- const NSWindowCollectionBehaviorFullScreenAuxiliary = 1 << 8 ,
782
+ const NSWindowCollectionBehaviorFullScreenPrimary = 1 << 7 ;
783
+ const NSWindowCollectionBehaviorFullScreenAuxiliary = 1 << 8 ;
784
784
}
785
785
}
786
786
787
787
bitflags ! {
788
- pub flags NSWindowOcclusionState : NSUInteger {
789
- const NSWindowOcclusionStateVisible = 1 << 1
788
+ pub struct NSWindowOcclusionState : NSUInteger {
789
+ const NSWindowOcclusionStateVisible = 1 << 1 ;
790
790
}
791
791
}
792
792
@@ -1919,9 +1919,9 @@ impl NSOpenGLContext for id {
1919
1919
}
1920
1920
1921
1921
bitflags ! {
1922
- pub flags NSEventSwipeTrackingOptions : NSUInteger {
1923
- const NSEventSwipeTrackingLockDirection = 0x1 << 0 ,
1924
- const NSEventSwipeTrackingClampGestureAmount = 0x1 << 1 ,
1922
+ pub struct NSEventSwipeTrackingOptions : NSUInteger {
1923
+ const NSEventSwipeTrackingLockDirection = 0x1 << 0 ;
1924
+ const NSEventSwipeTrackingClampGestureAmount = 0x1 << 1 ;
1925
1925
}
1926
1926
}
1927
1927
@@ -1933,28 +1933,28 @@ pub enum NSEventGestureAxis {
1933
1933
}
1934
1934
1935
1935
bitflags ! {
1936
- pub flags NSEventPhase : NSUInteger {
1937
- const NSEventPhaseNone = 0 ,
1938
- const NSEventPhaseBegan = 0x1 << 0 ,
1939
- const NSEventPhaseStationary = 0x1 << 1 ,
1940
- const NSEventPhaseChanged = 0x1 << 2 ,
1941
- const NSEventPhaseEnded = 0x1 << 3 ,
1942
- const NSEventPhaseCancelled = 0x1 << 4 ,
1943
- const NSEventPhaseMayBegin = 0x1 << 5 ,
1936
+ pub struct NSEventPhase : NSUInteger {
1937
+ const NSEventPhaseNone = 0 ;
1938
+ const NSEventPhaseBegan = 0x1 << 0 ;
1939
+ const NSEventPhaseStationary = 0x1 << 1 ;
1940
+ const NSEventPhaseChanged = 0x1 << 2 ;
1941
+ const NSEventPhaseEnded = 0x1 << 3 ;
1942
+ const NSEventPhaseCancelled = 0x1 << 4 ;
1943
+ const NSEventPhaseMayBegin = 0x1 << 5 ;
1944
1944
}
1945
1945
}
1946
1946
1947
1947
bitflags ! {
1948
- pub flags NSTouchPhase : NSUInteger {
1949
- const NSTouchPhaseBegan = 1 << 0 ,
1950
- const NSTouchPhaseMoved = 1 << 1 ,
1951
- const NSTouchPhaseStationary = 1 << 2 ,
1952
- const NSTouchPhaseEnded = 1 << 3 ,
1953
- const NSTouchPhaseCancelled = 1 << 4 ,
1948
+ pub struct NSTouchPhase : NSUInteger {
1949
+ const NSTouchPhaseBegan = 1 << 0 ;
1950
+ const NSTouchPhaseMoved = 1 << 1 ;
1951
+ const NSTouchPhaseStationary = 1 << 2 ;
1952
+ const NSTouchPhaseEnded = 1 << 3 ;
1953
+ const NSTouchPhaseCancelled = 1 << 4 ;
1954
1954
const NSTouchPhaseTouching = NSTouchPhaseBegan . bits
1955
1955
| NSTouchPhaseMoved . bits
1956
- | NSTouchPhaseStationary . bits,
1957
- const NSTouchPhaseAny = !0 , // NSUIntegerMax
1956
+ | NSTouchPhaseStationary . bits;
1957
+ const NSTouchPhaseAny = !0 ; // NSUIntegerMax
1958
1958
}
1959
1959
}
1960
1960
@@ -1994,37 +1994,37 @@ pub enum NSEventType {
1994
1994
}
1995
1995
1996
1996
bitflags ! {
1997
- pub flags NSEventMask : libc:: c_ulonglong {
1998
- const NSLeftMouseDownMask = 1 << NSLeftMouseDown as libc:: c_ulonglong,
1999
- const NSLeftMouseUpMask = 1 << NSLeftMouseUp as libc:: c_ulonglong,
2000
- const NSRightMouseDownMask = 1 << NSRightMouseDown as libc:: c_ulonglong,
2001
- const NSRightMouseUpMask = 1 << NSRightMouseUp as libc:: c_ulonglong,
2002
- const NSMouseMovedMask = 1 << NSMouseMoved as libc:: c_ulonglong,
2003
- const NSLeftMouseDraggedMask = 1 << NSLeftMouseDragged as libc:: c_ulonglong,
2004
- const NSRightMouseDraggedMask = 1 << NSRightMouseDragged as libc:: c_ulonglong,
2005
- const NSMouseEnteredMask = 1 << NSMouseEntered as libc:: c_ulonglong,
2006
- const NSMouseExitedMask = 1 << NSMouseExited as libc:: c_ulonglong,
2007
- const NSKeyDownMask = 1 << NSKeyDown as libc:: c_ulonglong,
2008
- const NSKeyUpMask = 1 << NSKeyUp as libc:: c_ulonglong,
2009
- const NSFlagsChangedMask = 1 << NSFlagsChanged as libc:: c_ulonglong,
2010
- const NSAppKitDefinedMask = 1 << NSAppKitDefined as libc:: c_ulonglong,
2011
- const NSSystemDefinedMask = 1 << NSSystemDefined as libc:: c_ulonglong,
2012
- const NSApplicationDefinedMask = 1 << NSApplicationDefined as libc:: c_ulonglong,
2013
- const NSPeriodicMask = 1 << NSPeriodic as libc:: c_ulonglong,
2014
- const NSCursorUpdateMask = 1 << NSCursorUpdate as libc:: c_ulonglong,
2015
- const NSScrollWheelMask = 1 << NSScrollWheel as libc:: c_ulonglong,
2016
- const NSTabletPointMask = 1 << NSTabletPoint as libc:: c_ulonglong,
2017
- const NSTabletProximityMask = 1 << NSTabletProximity as libc:: c_ulonglong,
2018
- const NSOtherMouseDownMask = 1 << NSOtherMouseDown as libc:: c_ulonglong,
2019
- const NSOtherMouseUpMask = 1 << NSOtherMouseUp as libc:: c_ulonglong,
2020
- const NSOtherMouseDraggedMask = 1 << NSOtherMouseDragged as libc:: c_ulonglong,
2021
- const NSEventMaskGesture = 1 << NSEventTypeGesture as libc:: c_ulonglong,
2022
- const NSEventMaskSwipe = 1 << NSEventTypeSwipe as libc:: c_ulonglong,
2023
- const NSEventMaskRotate = 1 << NSEventTypeRotate as libc:: c_ulonglong,
2024
- const NSEventMaskBeginGesture = 1 << NSEventTypeBeginGesture as libc:: c_ulonglong,
2025
- const NSEventMaskEndGesture = 1 << NSEventTypeEndGesture as libc:: c_ulonglong,
2026
- const NSEventMaskPressure = 1 << NSEventTypePressure as libc:: c_ulonglong,
2027
- const NSAnyEventMask = 0xffffffffffffffff ,
1997
+ pub struct NSEventMask : libc:: c_ulonglong {
1998
+ const NSLeftMouseDownMask = 1 << NSLeftMouseDown as libc:: c_ulonglong;
1999
+ const NSLeftMouseUpMask = 1 << NSLeftMouseUp as libc:: c_ulonglong;
2000
+ const NSRightMouseDownMask = 1 << NSRightMouseDown as libc:: c_ulonglong;
2001
+ const NSRightMouseUpMask = 1 << NSRightMouseUp as libc:: c_ulonglong;
2002
+ const NSMouseMovedMask = 1 << NSMouseMoved as libc:: c_ulonglong;
2003
+ const NSLeftMouseDraggedMask = 1 << NSLeftMouseDragged as libc:: c_ulonglong;
2004
+ const NSRightMouseDraggedMask = 1 << NSRightMouseDragged as libc:: c_ulonglong;
2005
+ const NSMouseEnteredMask = 1 << NSMouseEntered as libc:: c_ulonglong;
2006
+ const NSMouseExitedMask = 1 << NSMouseExited as libc:: c_ulonglong;
2007
+ const NSKeyDownMask = 1 << NSKeyDown as libc:: c_ulonglong;
2008
+ const NSKeyUpMask = 1 << NSKeyUp as libc:: c_ulonglong;
2009
+ const NSFlagsChangedMask = 1 << NSFlagsChanged as libc:: c_ulonglong;
2010
+ const NSAppKitDefinedMask = 1 << NSAppKitDefined as libc:: c_ulonglong;
2011
+ const NSSystemDefinedMask = 1 << NSSystemDefined as libc:: c_ulonglong;
2012
+ const NSApplicationDefinedMask = 1 << NSApplicationDefined as libc:: c_ulonglong;
2013
+ const NSPeriodicMask = 1 << NSPeriodic as libc:: c_ulonglong;
2014
+ const NSCursorUpdateMask = 1 << NSCursorUpdate as libc:: c_ulonglong;
2015
+ const NSScrollWheelMask = 1 << NSScrollWheel as libc:: c_ulonglong;
2016
+ const NSTabletPointMask = 1 << NSTabletPoint as libc:: c_ulonglong;
2017
+ const NSTabletProximityMask = 1 << NSTabletProximity as libc:: c_ulonglong;
2018
+ const NSOtherMouseDownMask = 1 << NSOtherMouseDown as libc:: c_ulonglong;
2019
+ const NSOtherMouseUpMask = 1 << NSOtherMouseUp as libc:: c_ulonglong;
2020
+ const NSOtherMouseDraggedMask = 1 << NSOtherMouseDragged as libc:: c_ulonglong;
2021
+ const NSEventMaskGesture = 1 << NSEventTypeGesture as libc:: c_ulonglong;
2022
+ const NSEventMaskSwipe = 1 << NSEventTypeSwipe as libc:: c_ulonglong;
2023
+ const NSEventMaskRotate = 1 << NSEventTypeRotate as libc:: c_ulonglong;
2024
+ const NSEventMaskBeginGesture = 1 << NSEventTypeBeginGesture as libc:: c_ulonglong;
2025
+ const NSEventMaskEndGesture = 1 << NSEventTypeEndGesture as libc:: c_ulonglong;
2026
+ const NSEventMaskPressure = 1 << NSEventTypePressure as libc:: c_ulonglong;
2027
+ const NSAnyEventMask = 0xffffffffffffffff ;
2028
2028
}
2029
2029
}
2030
2030
@@ -2035,16 +2035,16 @@ impl NSEventMask {
2035
2035
}
2036
2036
2037
2037
bitflags ! {
2038
- pub flags NSEventModifierFlags : NSUInteger {
2039
- const NSAlphaShiftKeyMask = 1 << 16 ,
2040
- const NSShiftKeyMask = 1 << 17 ,
2041
- const NSControlKeyMask = 1 << 18 ,
2042
- const NSAlternateKeyMask = 1 << 19 ,
2043
- const NSCommandKeyMask = 1 << 20 ,
2044
- const NSNumericPadKeyMask = 1 << 21 ,
2045
- const NSHelpKeyMask = 1 << 22 ,
2046
- const NSFunctionKeyMask = 1 << 23 ,
2047
- const NSDeviceIndependentModifierFlagsMask = 0xffff0000 ,
2038
+ pub struct NSEventModifierFlags : NSUInteger {
2039
+ const NSAlphaShiftKeyMask = 1 << 16 ;
2040
+ const NSShiftKeyMask = 1 << 17 ;
2041
+ const NSControlKeyMask = 1 << 18 ;
2042
+ const NSAlternateKeyMask = 1 << 19 ;
2043
+ const NSCommandKeyMask = 1 << 20 ;
2044
+ const NSNumericPadKeyMask = 1 << 21 ;
2045
+ const NSHelpKeyMask = 1 << 22 ;
2046
+ const NSFunctionKeyMask = 1 << 23 ;
2047
+ const NSDeviceIndependentModifierFlagsMask = 0xffff0000 ;
2048
2048
}
2049
2049
}
2050
2050
0 commit comments