diff --git a/src/macosx/MacMiniFB.m b/src/macosx/MacMiniFB.m index a0fbb68..076d2bc 100644 --- a/src/macosx/MacMiniFB.m +++ b/src/macosx/MacMiniFB.m @@ -22,9 +22,9 @@ int mfb_open(const char* name, int width, int height) [NSApplication sharedApplication]; [NSApp setActivationPolicy:NSApplicationActivationPolicyRegular]; - - unsigned int styles = NSResizableWindowMask | NSClosableWindowMask | NSTitledWindowMask; - + + NSWindowStyleMask styles = NSWindowStyleMaskResizable | NSWindowStyleMaskClosable | NSWindowStyleMaskTitled; + NSRect rectangle = NSMakeRect(0, 0, width, height); window_ = [[OSXWindow alloc] initWithContentRect:rectangle styleMask:styles backing:NSBackingStoreBuffered defer:NO]; @@ -62,13 +62,13 @@ static int updateEvents() { int state = 0; NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; - NSEvent* event = [NSApp nextEventMatchingMask:NSAnyEventMask untilDate:[NSDate distantPast] inMode:NSDefaultRunLoopMode dequeue:YES]; - if (event) + NSEvent* event = [NSApp nextEventMatchingMask:NSEventMaskAny untilDate:[NSDate distantPast] inMode:NSDefaultRunLoopMode dequeue:YES]; + if (event) { switch ([event type]) { - case NSKeyDown: - case NSKeyUp: + case NSEventTypeKeyDown: + case NSEventTypeKeyUp: { state = -1; break; diff --git a/src/macosx/OSXWindow.m b/src/macosx/OSXWindow.m index bdbeb07..e1107d1 100644 --- a/src/macosx/OSXWindow.m +++ b/src/macosx/OSXWindow.m @@ -6,7 +6,7 @@ /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - (id)initWithContentRect:(NSRect)contentRect - styleMask:(NSUInteger)windowStyle + styleMask:(NSWindowStyleMask)windowStyle backing:(NSBackingStoreType)bufferingType defer:(BOOL)deferCreation { @@ -137,7 +137,7 @@ /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -+ (NSRect)frameRectForContentRect:(NSRect)windowContentRect styleMask:(NSUInteger)windowStyle ++ (NSRect)frameRectForContentRect:(NSRect)windowContentRect styleMask:(NSWindowStyleMask)windowStyle { (void)windowStyle; return NSInsetRect(windowContentRect, 0, 0);