//
//  Application.mm
//  Platform
//
//  Created by John Ryland on 4/10/17.
//  Copyright © 2017 John Ryland. All rights reserved.
//

#include "Application.h"
#import "AppDelegate.h"
#import <Cocoa/Cocoa.h>


void InitApplication(const std::vector<std::string>& a_args)
{
  [NSApplication sharedApplication];
}


void DeinitApplication(const std::vector<std::string>& a_args)
{
}


int RunApplication(const std::vector<std::string>& a_args)
{
  AppDelegate *appDelegate = [[AppDelegate alloc] init];
  [NSApp setDelegate:appDelegate];
  [NSApp run];
  return 0;
  /*
  int argc = (int)a_args.size();
  const char** argv = (const char**)malloc(sizeof(char*) * argc);
  for (int i = 0; i < argc; i++)
    argv[i] = a_args[i].c_str();
  int ret = NSApplicationMain(argc, argv);
  free(argv);
  return ret;
  */
}

