The new (very basic) macOS platform layer compiles!

master
Yuval Dolev 2019-12-24 02:53:25 +02:00
parent 45f462e76c
commit 18dd91197f
1 changed files with 24 additions and 0 deletions

View File

@ -1,5 +1,29 @@
#include <Cocoa/Cocoa.h>
@interface App_Delegate : NSObject<NSApplicationDelegate, NSWindowDelegate>
@end
@implementation App_Delegate
- (void)applicationDidFinishLaunching:(id)sender{
}
- (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication*)sender{
return YES;
}
- (void)applicationWillTerminate:(NSNotification *)notification{
}
- (NSSize)windowWillResize:(NSWindow*)window toSize:(NSSize)frame_size{
// frame_size.height = ((f32)frame_size.width / global_aspect_ratio);
return frame_size;
}
- (void)windowWillClose:(id)sender {
// global_running = false;
}
@end
int
main(int arg_count, char **args){
@autoreleasepool{