diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..30ed02f
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,7 @@
+build/*
+*.pbxuser
+*.mode1v3
+
+# osx noise
+.DS_Store
+profile
diff --git a/HeadLess-Info.plist b/HeadLess-Info.plist
new file mode 100644
index 0000000..21464af
--- /dev/null
+++ b/HeadLess-Info.plist
@@ -0,0 +1,32 @@
+
+
+
+
+ CFBundleDevelopmentRegion
+ English
+ CFBundleExecutable
+ ${EXECUTABLE_NAME}
+ CFBundleIconFile
+
+ CFBundleIdentifier
+ com.yourcompany.${PRODUCT_NAME:rfc1034identifier}
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundleName
+ ${PRODUCT_NAME}
+ CFBundlePackageType
+ APPL
+ CFBundleShortVersionString
+ 1.0
+ CFBundleSignature
+ ????
+ CFBundleVersion
+ 1
+ LSMinimumSystemVersion
+ ${MACOSX_DEPLOYMENT_TARGET}
+ NSMainNibFile
+
+ NSPrincipalClass
+
+
+
diff --git a/HeadLess.xcodeproj/project.pbxproj b/HeadLess.xcodeproj/project.pbxproj
new file mode 100644
index 0000000..9e85d0e
--- /dev/null
+++ b/HeadLess.xcodeproj/project.pbxproj
@@ -0,0 +1,268 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 45;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ 14853FB012734FD6002CBCD0 /* MainView.m in Sources */ = {isa = PBXBuildFile; fileRef = 14853FAF12734FD6002CBCD0 /* MainView.m */; };
+ 256AC3DA0F4B6AC300CF3369 /* HeadLessAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 256AC3D90F4B6AC300CF3369 /* HeadLessAppDelegate.m */; };
+ 8D11072D0486CEB800E47090 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; };
+ 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXFileReference section */
+ 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; };
+ 13E42FB307B3F0F600E4EEF1 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = /System/Library/Frameworks/CoreData.framework; sourceTree = ""; };
+ 14853FAE12734FD6002CBCD0 /* MainView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MainView.h; sourceTree = ""; };
+ 14853FAF12734FD6002CBCD0 /* MainView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MainView.m; sourceTree = ""; };
+ 256AC3D80F4B6AC300CF3369 /* HeadLessAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HeadLessAppDelegate.h; sourceTree = ""; };
+ 256AC3D90F4B6AC300CF3369 /* HeadLessAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HeadLessAppDelegate.m; sourceTree = ""; };
+ 256AC3F00F4B6AF500CF3369 /* HeadLess_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HeadLess_Prefix.pch; sourceTree = ""; };
+ 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
+ 29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; };
+ 29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; };
+ 8D1107310486CEB800E47090 /* HeadLess-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "HeadLess-Info.plist"; sourceTree = ""; };
+ 8D1107320486CEB800E47090 /* HeadLess.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = HeadLess.app; sourceTree = BUILT_PRODUCTS_DIR; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ 8D11072E0486CEB800E47090 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ 080E96DDFE201D6D7F000001 /* Classes */ = {
+ isa = PBXGroup;
+ children = (
+ 256AC3D80F4B6AC300CF3369 /* HeadLessAppDelegate.h */,
+ 256AC3D90F4B6AC300CF3369 /* HeadLessAppDelegate.m */,
+ 14853FAE12734FD6002CBCD0 /* MainView.h */,
+ 14853FAF12734FD6002CBCD0 /* MainView.m */,
+ );
+ name = Classes;
+ sourceTree = "";
+ };
+ 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */,
+ );
+ name = "Linked Frameworks";
+ sourceTree = "";
+ };
+ 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ 29B97324FDCFA39411CA2CEA /* AppKit.framework */,
+ 13E42FB307B3F0F600E4EEF1 /* CoreData.framework */,
+ 29B97325FDCFA39411CA2CEA /* Foundation.framework */,
+ );
+ name = "Other Frameworks";
+ sourceTree = "";
+ };
+ 19C28FACFE9D520D11CA2CBB /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ 8D1107320486CEB800E47090 /* HeadLess.app */,
+ );
+ name = Products;
+ sourceTree = "";
+ };
+ 29B97314FDCFA39411CA2CEA /* HeadLess */ = {
+ isa = PBXGroup;
+ children = (
+ 080E96DDFE201D6D7F000001 /* Classes */,
+ 29B97315FDCFA39411CA2CEA /* Other Sources */,
+ 29B97317FDCFA39411CA2CEA /* Resources */,
+ 29B97323FDCFA39411CA2CEA /* Frameworks */,
+ 19C28FACFE9D520D11CA2CBB /* Products */,
+ );
+ name = HeadLess;
+ sourceTree = "";
+ };
+ 29B97315FDCFA39411CA2CEA /* Other Sources */ = {
+ isa = PBXGroup;
+ children = (
+ 256AC3F00F4B6AF500CF3369 /* HeadLess_Prefix.pch */,
+ 29B97316FDCFA39411CA2CEA /* main.m */,
+ );
+ name = "Other Sources";
+ sourceTree = "";
+ };
+ 29B97317FDCFA39411CA2CEA /* Resources */ = {
+ isa = PBXGroup;
+ children = (
+ 8D1107310486CEB800E47090 /* HeadLess-Info.plist */,
+ );
+ name = Resources;
+ sourceTree = "";
+ };
+ 29B97323FDCFA39411CA2CEA /* Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */,
+ 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */,
+ );
+ name = Frameworks;
+ sourceTree = "";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+ 8D1107260486CEB800E47090 /* HeadLess */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "HeadLess" */;
+ buildPhases = (
+ 8D1107290486CEB800E47090 /* Resources */,
+ 8D11072C0486CEB800E47090 /* Sources */,
+ 8D11072E0486CEB800E47090 /* Frameworks */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = HeadLess;
+ productInstallPath = "$(HOME)/Applications";
+ productName = HeadLess;
+ productReference = 8D1107320486CEB800E47090 /* HeadLess.app */;
+ productType = "com.apple.product-type.application";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ 29B97313FDCFA39411CA2CEA /* Project object */ = {
+ isa = PBXProject;
+ buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "HeadLess" */;
+ compatibilityVersion = "Xcode 3.1";
+ developmentRegion = English;
+ hasScannedForEncodings = 1;
+ knownRegions = (
+ English,
+ Japanese,
+ French,
+ German,
+ );
+ mainGroup = 29B97314FDCFA39411CA2CEA /* HeadLess */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ 8D1107260486CEB800E47090 /* HeadLess */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+ 8D1107290486CEB800E47090 /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ 8D11072C0486CEB800E47090 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 8D11072D0486CEB800E47090 /* main.m in Sources */,
+ 256AC3DA0F4B6AC300CF3369 /* HeadLessAppDelegate.m in Sources */,
+ 14853FB012734FD6002CBCD0 /* MainView.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin XCBuildConfiguration section */
+ C01FCF4B08A954540054247B /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ COPY_PHASE_STRIP = NO;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_ENABLE_FIX_AND_CONTINUE = YES;
+ GCC_MODEL_TUNING = G5;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = HeadLess_Prefix.pch;
+ INFOPLIST_FILE = "HeadLess-Info.plist";
+ INSTALL_PATH = "$(HOME)/Applications";
+ PRODUCT_NAME = HeadLess;
+ };
+ name = Debug;
+ };
+ C01FCF4C08A954540054247B /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ GCC_MODEL_TUNING = G5;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = HeadLess_Prefix.pch;
+ INFOPLIST_FILE = "HeadLess-Info.plist";
+ INSTALL_PATH = "$(HOME)/Applications";
+ PRODUCT_NAME = HeadLess;
+ };
+ name = Release;
+ };
+ C01FCF4F08A954540054247B /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ ONLY_ACTIVE_ARCH = YES;
+ PREBINDING = NO;
+ SDKROOT = macosx10.6;
+ };
+ name = Debug;
+ };
+ C01FCF5008A954540054247B /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ PREBINDING = NO;
+ SDKROOT = macosx10.6;
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "HeadLess" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ C01FCF4B08A954540054247B /* Debug */,
+ C01FCF4C08A954540054247B /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ C01FCF4E08A954540054247B /* Build configuration list for PBXProject "HeadLess" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ C01FCF4F08A954540054247B /* Debug */,
+ C01FCF5008A954540054247B /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = 29B97313FDCFA39411CA2CEA /* Project object */;
+}
diff --git a/HeadLessAppDelegate.h b/HeadLessAppDelegate.h
new file mode 100644
index 0000000..e01b3b0
--- /dev/null
+++ b/HeadLessAppDelegate.h
@@ -0,0 +1,10 @@
+
+#import
+
+@interface HeadLessAppDelegate : NSObject {
+ NSWindow *_window;
+}
+
+@property (nonatomic,retain) NSWindow *window;
+
+@end
diff --git a/HeadLessAppDelegate.m b/HeadLessAppDelegate.m
new file mode 100644
index 0000000..5336895
--- /dev/null
+++ b/HeadLessAppDelegate.m
@@ -0,0 +1,38 @@
+
+#import "HeadLessAppDelegate.h"
+#import "MainView.h"
+#import
+
+@implementation HeadLessAppDelegate
+
+@synthesize window = _window;
+
+- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
+
+ NSRect frame = NSMakeRect( 100., 100., 300., 300. );
+
+ NSWindow *window = [[NSWindow alloc]
+ initWithContentRect:frame
+ styleMask:NSTitledWindowMask | NSClosableWindowMask | NSMiniaturizableWindowMask
+ backing:NSBackingStoreBuffered
+ defer:false];
+
+ [window setTitle:@"Testing"];
+
+ MainView *view = [[[MainView alloc] initWithFrame:frame] autorelease];
+ [window setContentView:view];
+ [window setDelegate:view];
+ [window makeKeyAndOrderFront:nil];
+
+
+ CGRect textLabelFrame = CGRectMake(40,200, 80, 30);
+ NSTextView *textLabel = [[NSTextView alloc] initWithFrame:textLabelFrame];
+ [textLabel setString:@"TestApp without NIB"];
+ [view addSubview:textLabel];
+ [textLabel release];
+
+
+
+}
+
+@end
diff --git a/HeadLess_Prefix.pch b/HeadLess_Prefix.pch
new file mode 100644
index 0000000..f385f2c
--- /dev/null
+++ b/HeadLess_Prefix.pch
@@ -0,0 +1,7 @@
+//
+// Prefix header for all source files of the 'HeadLess' target in the 'HeadLess' project
+//
+
+#ifdef __OBJC__
+ #import
+#endif
diff --git a/MainView.h b/MainView.h
new file mode 100644
index 0000000..ff37434
--- /dev/null
+++ b/MainView.h
@@ -0,0 +1,9 @@
+#import
+
+@interface MainView : NSView {
+
+}
+
+ -(void)drawRect:(NSRect)rect;
+
+@end
\ No newline at end of file
diff --git a/MainView.m b/MainView.m
new file mode 100644
index 0000000..6b2147d
--- /dev/null
+++ b/MainView.m
@@ -0,0 +1,14 @@
+#import "MainView.h"
+
+@implementation MainView
+
+-(void)drawRect:(NSRect)rect {
+ [[NSColor blueColor] set];
+ NSRectFill( [self bounds] );
+}
+
+-(void)windowWillClose:(NSNotification *)note {
+ [[NSApplication sharedApplication] terminate:self];
+}
+
+@end
\ No newline at end of file
diff --git a/main.m b/main.m
new file mode 100644
index 0000000..c29860b
--- /dev/null
+++ b/main.m
@@ -0,0 +1,14 @@
+
+#import
+#import "HeadLessAppDelegate.h"
+
+int main(int argc, char *argv[])
+{
+ NSAutoreleasePool *pool = [NSAutoreleasePool new];
+
+ NSApplication *application = [NSApplication sharedApplication];
+ [application setDelegate:[[HeadLessAppDelegate alloc]init]];
+ [application run];
+ [pool release];
+ return( EXIT_SUCCESS );
+}