filename | src/cocoaui/cocoa_win.c |
changeset | 757:2780bc393e7c |
prev | 738:0cbff49086b8 |
next | 780:4e4ea322cb84 |
author | nkeynes |
date | Mon Jul 28 03:41:25 2008 +0000 (15 years ago) |
permissions | -rw-r--r-- |
last change | Implement key-binding configuration pane for Cocoa UI Minor tweaks for consistency and static-correctness |
file | annotate | diff | log | raw |
1.1 --- a/src/cocoaui/cocoa_win.c Tue Jul 15 06:47:49 2008 +00001.2 +++ b/src/cocoaui/cocoa_win.c Mon Jul 28 03:41:25 2008 +00001.3 @@ -20,6 +20,23 @@1.4 #include "lxdream.h"1.5 #include <ApplicationServices/ApplicationServices.h>1.7 +@interface NSWindow (OSX10_5_and_later)1.8 +#ifndef CGFLOAT_DEFINED1.9 +# ifdef __LP64__1.10 + typedef double CGFloat;1.11 +# else1.12 + typedef float CGFloat;1.13 +# endif1.14 +#endif1.15 +- (void)setAutorecalculatesContentBorderThickness:(BOOL)b forEdge:(NSRectEdge)e;1.16 +- (void)setContentBorderThickness:(CGFloat)b forEdge:(NSRectEdge)e;1.17 +@end1.18 +1.19 +1.20 +#if NSAppKitVersionNumber > NSAppKitVersionNumber10_41.21 +1.22 +#endif1.23 +1.24 #define STATUSBAR_HEIGHT 251.25 #define STATUS_TEXT_HEIGHT 221.27 @@ -127,8 +144,10 @@1.28 [[self contentView] addSubview: status];1.29 [self makeFirstResponder: video];1.31 - [self setAutorecalculatesContentBorderThickness: NO forEdge: NSMinYEdge ];1.32 - [self setContentBorderThickness: STATUSBAR_HEIGHT forEdge: NSMinYEdge];1.33 + if( [self respondsToSelector:@selector(setAutorecalculatesContentBorderThickness:forEdge:)] )1.34 + [self setAutorecalculatesContentBorderThickness: NO forEdge: NSMinYEdge ];1.35 + if( [self respondsToSelector:@selector(setContentBorderThickness:forEdge:)] )1.36 + [self setContentBorderThickness: STATUSBAR_HEIGHT forEdge: NSMinYEdge];1.38 // Share the app delegate for the purposes of keeping it in one place1.39 [self setDelegate: [NSApp delegate]];
.