9f842ad840383e3c60d4b01c84de5ac058651a83
[xscreensaver] / OSX / main.m
1 /* xscreensaver, Copyright (c) 2006-2012 Jamie Zawinski <jwz@jwz.org>
2 *
3 * Permission to use, copy, modify, distribute, and sell this software and its
4 * documentation for any purpose is hereby granted without fee, provided that
5 * the above copyright notice appear in all copies and that both that
6 * copyright notice and this permission notice appear in supporting
7 * documentation.  No representations are made about the suitability of this
8 * software for any purpose.  It is provided "as is" without express or 
9 * implied warranty.
10 */
11
12 #ifdef USE_IPHONE
13 # import <UIKit/UIKit.h>
14 #else
15 # import <Cocoa/Cocoa.h>
16 #endif
17
18 int
19 main (int argc, char *argv[])
20 {
21 # ifdef USE_IPHONE
22   NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
23   int ret = UIApplicationMain (argc, argv, nil, nil);
24   [pool release];
25   return ret;
26 # else
27   return NSApplicationMain(argc, (const char **) argv);
28 # endif
29 }