summaryrefslogtreecommitdiff
path: root/src/video/cocoa/cocoa_v.h
diff options
context:
space:
mode:
authorplanetmaker <planetmaker@openttd.org>2010-12-21 16:02:55 +0000
committerplanetmaker <planetmaker@openttd.org>2010-12-21 16:02:55 +0000
commit30eef98ec0e5db58cb214624bd0eef8d8bf34c20 (patch)
tree793f0647438022e7ba33699dbd6bebbbb8207aad /src/video/cocoa/cocoa_v.h
parente38f96d60910846cdfed516f80282789bdb685f5 (diff)
downloadopenttd-30eef98ec0e5db58cb214624bd0eef8d8bf34c20.tar.xz
(svn r21577) -Codechange: [OSX] Deduplicate code by moving the handling of the window class for screen drivers to a common class
Diffstat (limited to 'src/video/cocoa/cocoa_v.h')
-rw-r--r--src/video/cocoa/cocoa_v.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/video/cocoa/cocoa_v.h b/src/video/cocoa/cocoa_v.h
index 97fc23f26..e570c6a86 100644
--- a/src/video/cocoa/cocoa_v.h
+++ b/src/video/cocoa/cocoa_v.h
@@ -99,6 +99,9 @@ public:
virtual bool MouseIsInsideView(NSPoint *pt) = 0;
virtual bool IsActive() = 0;
+
+ virtual void SetPortAlphaOpaque() { return; };
+ virtual bool WindowResized() { return false; };
};
extern CocoaSubdriver *_cocoa_subdriver;
@@ -124,6 +127,22 @@ void QZ_HideMouse();
uint QZ_ListModes(OTTD_Point *modes, uint max_modes, CGDirectDisplayID display_id, int display_depth);
+/* 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 */
@interface OTTD_CocoaView : NSView {
CocoaSubdriver *driver;