diff options
Diffstat (limited to 'src/video/cocoa/cocoa_v.h')
-rw-r--r-- | src/video/cocoa/cocoa_v.h | 57 |
1 files changed, 2 insertions, 55 deletions
diff --git a/src/video/cocoa/cocoa_v.h b/src/video/cocoa/cocoa_v.h index 3da6848d0..c05bd08e2 100644 --- a/src/video/cocoa/cocoa_v.h +++ b/src/video/cocoa/cocoa_v.h @@ -12,6 +12,8 @@ #include "../video_driver.hpp" +extern bool _cocoa_video_started; + class VideoDriver_Cocoa : public VideoDriver { public: const char *Start(const StringList ¶m) override; @@ -199,59 +201,4 @@ void QZ_GameLoop(); uint QZ_ListModes(OTTD_Point *modes, uint max_modes, CGDirectDisplayID display_id, int display_depth); -/** Category of NSCursor to allow cursor showing/hiding */ -@interface NSCursor (OTTD_QuickdrawCursor) -+ (NSCursor *) clearCocoaCursor; -@end - -/** Subclass of NSWindow to cater our special needs */ -@interface OTTD_CocoaWindow : NSWindow { - CocoaSubdriver *driver; -} - -- (void)setDriver:(CocoaSubdriver*)drv; - -- (void)miniaturize:(id)sender; -- (void)display; -- (void)setFrame:(NSRect)frameRect display:(BOOL)flag; -- (void)appDidHide:(NSNotification*)note; -- (void)appWillUnhide:(NSNotification*)note; -- (void)appDidUnhide:(NSNotification*)note; -- (id)initWithContentRect:(NSRect)contentRect styleMask:(NSUInteger)styleMask backing:(NSBackingStoreType)backingType defer:(BOOL)flag; -@end - -/** Subclass of NSView to fix Quartz rendering and mouse awareness */ -@interface OTTD_CocoaView : NSView <NSTextInputClient> -{ - CocoaSubdriver *driver; - NSTrackingRectTag trackingtag; -} -- (void)setDriver:(CocoaSubdriver*)drv; -- (void)drawRect:(NSRect)rect; -- (BOOL)isOpaque; -- (BOOL)acceptsFirstResponder; -- (BOOL)becomeFirstResponder; -- (void)setTrackingRect; -- (void)clearTrackingRect; -- (void)resetCursorRects; -- (void)viewWillMoveToWindow:(NSWindow *)win; -- (void)viewDidMoveToWindow; -- (void)mouseEntered:(NSEvent *)theEvent; -- (void)mouseExited:(NSEvent *)theEvent; -@end - -/** Delegate for our NSWindow to send ask for quit on close */ -@interface OTTD_CocoaWindowDelegate : NSObject <NSWindowDelegate> -{ - CocoaSubdriver *driver; -} - -- (void)setDriver:(CocoaSubdriver*)drv; - -- (BOOL)windowShouldClose:(id)sender; -- (void)windowDidEnterFullScreen:(NSNotification *)aNotification; -- (void)windowDidChangeScreenProfile:(NSNotification *)aNotification; -@end - - #endif /* VIDEO_COCOA_H */ |