13 #import <Cocoa/Cocoa.h>
15 #ifdef MAC_OS_X_VERSION_10_12_2
16 # define HAVE_TOUCHBAR_SUPPORT
22 enum RightMouseButtonEmulationState {
28 extern NSString *OTTDMainLaunchGameEngine;
32 + (NSCursor *) clearCocoaCursor;
37 #ifdef HAVE_TOUCHBAR_SUPPORT
41 - (instancetype)initWithContentRect:(NSRect)contentRect styleMask:(NSUInteger)styleMask backing:(NSBackingStoreType)backingType defer:(BOOL)flag driver:(
VideoDriver_Cocoa *)drv;
43 - (void)setFrame:(NSRect)frameRect display:(BOOL)flag;
45 - (void)refreshSystemSprites;
50 - (NSRect)getRealRect:(NSRect)rect;
51 - (NSRect)getVirtualRect:(NSRect)rect;
52 - (CGFloat)getContentsScale;
53 - (NSPoint)mousePositionFromEvent:(NSEvent *)e;
60 - (BOOL)windowShouldClose:(
id)sender;
61 - (void)windowDidEnterFullScreen:(NSNotification *)aNotification;
62 - (void)windowDidChangeBackingProperties:(NSNotification *)notification;
63 - (NSApplicationPresentationOptions)window:(NSWindow *)window willUseFullScreenPresentationOptions:(NSApplicationPresentationOptions)proposedOptions;
67 extern bool _allow_hidpi_window;
69 bool CocoaSetupApplication();
70 void CocoaExitApplication();
Category of NSCursor to allow cursor showing/hiding.
Subclass of NSView to support mouse awareness and text input.
Delegate for our NSWindow to send ask for quit on close.
Subclass of NSWindow to cater our special needs.