Skip to content

Commit

Permalink
test/testnativecocoa.m: fixed deprecation warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
sezero committed Jul 28, 2023
1 parent 301f227 commit 0d62ce6
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion test/testnativecocoa.m
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,15 @@

#ifdef TEST_NATIVE_COCOA

#include <AvailabilityMacros.h>
#include <Cocoa/Cocoa.h>

#ifndef MAC_OS_X_VERSION_10_12
static const unsigned int NSWindowStyleMaskTitled = NSTitledWindowMask;
static const unsigned int NSWindowStyleMiniaturizableMask = NSMiniaturizableWindowMask;
static const unsigned int NSWindowStyleMaskClosable = NSClosableWindowMask;
#endif

static void *CreateWindowCocoa(int w, int h);
static void DestroyWindowCocoa(void *window);

Expand All @@ -29,7 +36,7 @@
rect.size.height = h;
rect.origin.y = CGDisplayPixelsHigh(kCGDirectMainDisplay) - rect.origin.y - rect.size.height;

style = (NSTitledWindowMask|NSClosableWindowMask|NSMiniaturizableWindowMask);
style = (NSWindowStyleMaskTitled|NSWindowStyleMaskClosable|NSWindowStyleMiniaturizableMask);

nswindow = [[NSWindow alloc] initWithContentRect:rect styleMask:style backing:NSBackingStoreBuffered defer:FALSE];
[nswindow makeKeyAndOrderFront:nil];
Expand Down

0 comments on commit 0d62ce6

Please sign in to comment.