@@ -141,20 +141,20 @@ pub enum NSApplicationTerminateReply {
141141}
142142
143143bitflags ! {
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 ;
150150
151- const NSTexturedBackgroundWindowMask = 1 << 8 ,
151+ const NSTexturedBackgroundWindowMask = 1 << 8 ;
152152
153- const NSUnifiedTitleAndToolbarWindowMask = 1 << 12 ,
153+ const NSUnifiedTitleAndToolbarWindowMask = 1 << 12 ;
154154
155- const NSFullScreenWindowMask = 1 << 14 ,
155+ const NSFullScreenWindowMask = 1 << 14 ;
156156
157- const NSFullSizeContentViewWindowMask = 1 << 15
157+ const NSFullSizeContentViewWindowMask = 1 << 15 ;
158158 }
159159}
160160
@@ -174,46 +174,46 @@ pub enum NSBackingStoreType {
174174}
175175
176176bitflags ! {
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 ;
181181 }
182182}
183183
184184bitflags ! {
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 ;
205205 const NSAlignAllEdgesInward = NSAlignMinXInward . bits
206206 | NSAlignMaxXInward . bits
207207 | NSAlignMinYInward . bits
208- | NSAlignMaxYInward . bits,
208+ | NSAlignMaxYInward . bits;
209209 const NSAlignAllEdgesOutward = NSAlignMinXOutward . bits
210210 | NSAlignMaxXOutward . bits
211211 | NSAlignMinYOutward . bits
212- | NSAlignMaxYOutward . bits,
212+ | NSAlignMaxYOutward . bits;
213213 const NSAlignAllEdgesNearest = NSAlignMinXNearest . bits
214214 | NSAlignMaxXNearest . bits
215215 | NSAlignMinYNearest . bits
216- | NSAlignMaxYNearest . bits,
216+ | NSAlignMaxYNearest . bits;
217217 }
218218}
219219
@@ -767,26 +767,26 @@ impl NSMenuItem for id {
767767pub type NSWindowDepth = libc:: c_int ;
768768
769769bitflags ! {
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 ;
774774
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 ;
778778
779- const NSWindowCollectionBehaviorParticipatesInCycle = 1 << 5 ,
780- const NSWindowCollectionBehaviorIgnoresCycle = 1 << 6 ,
779+ const NSWindowCollectionBehaviorParticipatesInCycle = 1 << 5 ;
780+ const NSWindowCollectionBehaviorIgnoresCycle = 1 << 6 ;
781781
782- const NSWindowCollectionBehaviorFullScreenPrimary = 1 << 7 ,
783- const NSWindowCollectionBehaviorFullScreenAuxiliary = 1 << 8 ,
782+ const NSWindowCollectionBehaviorFullScreenPrimary = 1 << 7 ;
783+ const NSWindowCollectionBehaviorFullScreenAuxiliary = 1 << 8 ;
784784 }
785785}
786786
787787bitflags ! {
788- pub flags NSWindowOcclusionState : NSUInteger {
789- const NSWindowOcclusionStateVisible = 1 << 1
788+ pub struct NSWindowOcclusionState : NSUInteger {
789+ const NSWindowOcclusionStateVisible = 1 << 1 ;
790790 }
791791}
792792
@@ -1919,9 +1919,9 @@ impl NSOpenGLContext for id {
19191919}
19201920
19211921bitflags ! {
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 ;
19251925 }
19261926}
19271927
@@ -1933,28 +1933,28 @@ pub enum NSEventGestureAxis {
19331933}
19341934
19351935bitflags ! {
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 ;
19441944 }
19451945}
19461946
19471947bitflags ! {
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 ;
19541954 const NSTouchPhaseTouching = NSTouchPhaseBegan . bits
19551955 | NSTouchPhaseMoved . bits
1956- | NSTouchPhaseStationary . bits,
1957- const NSTouchPhaseAny = !0 , // NSUIntegerMax
1956+ | NSTouchPhaseStationary . bits;
1957+ const NSTouchPhaseAny = !0 ; // NSUIntegerMax
19581958 }
19591959}
19601960
@@ -1994,37 +1994,37 @@ pub enum NSEventType {
19941994}
19951995
19961996bitflags ! {
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 ;
20282028 }
20292029}
20302030
@@ -2035,16 +2035,16 @@ impl NSEventMask {
20352035}
20362036
20372037bitflags ! {
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 ;
20482048 }
20492049}
20502050
0 commit comments