diff --git a/.gitignore b/.gitignore index b6aaf4c..72823be 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ .idea/ cmake-build-debug/ -.DS_Store +.DS_Store \ No newline at end of file diff --git a/cerberus.xcodeproj/project.xcworkspace/xcuserdata/theoryofnekomata.xcuserdatad/UserInterfaceState.xcuserstate b/cerberus.xcodeproj/project.xcworkspace/xcuserdata/theoryofnekomata.xcuserdatad/UserInterfaceState.xcuserstate index 7bf5c2d..25a5f3f 100644 Binary files a/cerberus.xcodeproj/project.xcworkspace/xcuserdata/theoryofnekomata.xcuserdatad/UserInterfaceState.xcuserstate and b/cerberus.xcodeproj/project.xcworkspace/xcuserdata/theoryofnekomata.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/src/main.m b/src/main.m index dcffc62..7c8d9e6 100644 --- a/src/main.m +++ b/src/main.m @@ -1,14 +1,24 @@ #import #import "main.h" + int main() { // https://stackoverflow.com/questions/30269329/creating-window-application-in-pure-c-on-mac-osx @autoreleasepool { [NSApplication sharedApplication]; [NSApp setActivationPolicy:NSApplicationActivationPolicyRegular]; id applicationName = [[NSProcessInfo processInfo] processName]; - id window = [[NSWindow alloc] initWithContentRect:NSMakeRect(WINDOW_X, WINDOW_Y, WINDOW_WIDTH, WINDOW_HEIGHT) - styleMask:NSWindowStyleMaskTitled backing:NSBackingStoreBuffered defer:NO]; + id window = [ + [NSWindow alloc] + initWithContentRect: NSMakeRect(WINDOW_X, WINDOW_Y, WINDOW_WIDTH, WINDOW_HEIGHT) + styleMask: + NSWindowStyleMaskTitled + | NSWindowStyleMaskClosable + | NSWindowStyleMaskMiniaturizable + | NSWindowStyleMaskResizable + backing:NSBackingStoreBuffered + defer:NO + ]; [window cascadeTopLeftFromPoint:NSMakePoint(20, 20)]; [window setTitle:applicationName]; [window makeKeyAndOrderFront:nil];