#include <stdio.h>
#include <application.h>

#import <AppKit/NSApplication.h>
//#import <Foundation/NSGeometry.h>
//#import <ApplicationServices/ApplicationServices.h>
#import <Cocoa/Cocoa.h>


Application *app = 0;


Application::Application(int argc, char *argv[])
{
    if (app) {
        printf("You should only create one Application object\n");
        return;
    }
    [NSApplication sharedApplication];
    NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
    app = this;
}


Application::~Application()
{
    app = 0;
}


void Application::quit()
{
}


int Application::exec()
{
    [NSApp run];
    return 0;
}


