shiny/driver: repace style mask and event constants deprecated since OSX 10.12

Fixes golang/go#17413.

Change-Id: I4cc8a980fc1d6a45ceef48b282baa7a94663ae10
Reviewed-on: https://go-review.googlesource.com/31539
Reviewed-by: David Crawshaw <crawshaw@golang.org>
diff --git a/shiny/driver/gldriver/cocoa.m b/shiny/driver/gldriver/cocoa.m
index 1d07af7..92dcef9 100644
--- a/shiny/driver/gldriver/cocoa.m
+++ b/shiny/driver/gldriver/cocoa.m
@@ -107,7 +107,7 @@
 	double y = (h - p.y) * scale - 1; // flip origin from bottom-left to top-left.
 
 	double dx, dy;
-	if (theEvent.type == NSScrollWheel) {
+	if (theEvent.type == NSEventTypeScrollWheel) {
 		dx = theEvent.scrollingDeltaX;
 		dy = theEvent.scrollingDeltaY;
 	}
@@ -161,7 +161,7 @@
 	uint8_t direction;
 	if ([theEvent isARepeat]) {
 		direction = 0;
-	} else if (theEvent.type == NSKeyDown) {
+	} else if (theEvent.type == NSEventTypeKeyDown) {
 		direction = 1;
 	} else {
 		direction = 2;
@@ -250,12 +250,12 @@
 		NSRect rect = NSMakeRect(0, 0, w, h);
 
 		NSWindow* window = [[NSWindow alloc] initWithContentRect:rect
-				styleMask:NSTitledWindowMask
+				styleMask:NSWindowStyleMaskTitled
 				backing:NSBackingStoreBuffered
 				defer:NO];
-		window.styleMask |= NSResizableWindowMask;
-		window.styleMask |= NSMiniaturizableWindowMask ;
-		window.styleMask |= NSClosableWindowMask;
+		window.styleMask |= NSWindowStyleMaskResizable;
+		window.styleMask |= NSWindowStyleMaskMiniaturizable;
+		window.styleMask |= NSWindowStyleMaskClosable;
 		window.title = name;
 		window.displaysWhenScreenProfileChanges = YES;
 		[window cascadeTopLeftFromPoint:NSMakePoint(20,20)];