summaryrefslogtreecommitdiff
path: root/src/video/cocoa/cocoa_v.mm
diff options
context:
space:
mode:
authorplanetmaker <planetmaker@openttd.org>2010-12-21 16:00:42 +0000
committerplanetmaker <planetmaker@openttd.org>2010-12-21 16:00:42 +0000
commite38f96d60910846cdfed516f80282789bdb685f5 (patch)
treee240981434399ff66aa67c4983e3502281ae7ded /src/video/cocoa/cocoa_v.mm
parent26575ab8f880a39dc9c07203d4f8b31eb667fdac (diff)
downloadopenttd-e38f96d60910846cdfed516f80282789bdb685f5.tar.xz
(svn r21576) -Codechange: [OSX] Deduplicate code by moving the handling of the view for windowed screen drivers to a common class
Diffstat (limited to 'src/video/cocoa/cocoa_v.mm')
-rw-r--r--src/video/cocoa/cocoa_v.mm30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/video/cocoa/cocoa_v.mm b/src/video/cocoa/cocoa_v.mm
index 756c86bfb..3abeaad9f 100644
--- a/src/video/cocoa/cocoa_v.mm
+++ b/src/video/cocoa/cocoa_v.mm
@@ -407,6 +407,36 @@ void cocoaReleaseAutoreleasePool()
[ _ottd_autorelease_pool release ];
}
+
+
+@implementation OTTD_CocoaView
+/**
+ * Initialize the driver
+ */
+- (void)setDriver:(CocoaSubdriver*)drv
+{
+ driver = drv;
+}
+/**
+ * Define the opaqueness of the window / screen
+ * @return opaqueness of window / screen
+ */
+- (BOOL)isOpaque
+{
+ return YES;
+}
+/**
+ * Draws a rectangle on the screen.
+ * It's overwritten by the individual drivers but must be defined
+ */
+- (void)drawRect:(NSRect)invalidRect
+{
+ return;
+}
+@end
+
+
+
@implementation OTTD_CocoaWindowDelegate
/** Initialize the video driver */
- (void)setDriver:(CocoaSubdriver*)drv