+#include <stdlib.h>
+#include <string.h>
#import <AppKit/NSApplication.h>
+#import <AppKit/NSEvent.h>
#import <Foundation/NSAutoReleasePool.h>
#import <Foundation/NSRunLoop.h>
#include "cocoadisplay.h"
CocoaDisplay *display = (CocoaDisplay *)malloc(sizeof(CocoaDisplay));
display->arp = [[NSAutoreleasePool alloc] init];
display->app = [NSApplication sharedApplication];
+#if __MAC_OS_X_VERSION_MAX_ALLOWED >= 1060
// This makes windows appear when run from terminal
if([display->app respondsToSelector:@selector(setActivationPolicy:)])
[display->app setActivationPolicy:NSApplicationActivationPolicyRegular];
+#endif
[display->app finishLaunching];
CFArrayCallBacks callbacks;
+#import <AppKit/NSApplication.h>
#import <AppKit/NSWindow.h>
#import <CoreFoundation/CFArray.h>
#include "cocoadisplay.h"
#include "cocoawindow.h"
-@interface WindowDelegate: NSObject <NSWindowDelegate>
+#if __MAC_OS_X_VERSION_MAX_ALLOWED < 1060
+@protocol NSWindowDelegate <NSObject> @end
+#endif
+
+@interface WindowDelegate: NSObject <NSWindowDelegate> {
+ int dummy_member;
+}
- (BOOL)windowShouldClose:(id)sender;
#include <algorithm>
-#include <CoreGraphics/CGColorSpace.h>
-#include <CoreGraphics/CGImage.h>
-#include <ImageIO/CGImageSource.h>
+#include <ApplicationServices/ApplicationServices.h>
// Avoid messing up sigc++ headers
#undef nil
#include "quartzloader.h"