ardour/cocoatea/cocoatea.mm

43 lines
936 B
Text
Raw Normal View History

2024-11-14 14:55:44 -07:00
/* -*- c++ -*- */
#include <AppKit/AppKit.h>
#include "view.h"
int
main (int argc, char* argv[])
{
NSRect rect = NSMakeRect (100, 100, 500, 500);
NSRect frameRect = NSMakeRect (10, 10, 480, 480);
NSWindow* win = [[NSWindow alloc] initWithContentRect:rect
styleMask:NSBorderlessWindowMask
backing:NSBackingStoreBuffered
defer:NO];
CTView* view = [[CTView alloc] initWithFrame:frameRect];
[win setContentView:view];
[[NSApplication sharedApplication] activateIgnoringOtherApps : YES ];
[win makeKeyAndOrderFront:win];
[NSRunLoop currentRunLoop];
[NSTimer scheduledTimerWithTimeInterval:0.1 target:view selector:@selector(timedUpdate) userInfo:nil repeats:YES];
2024-11-14 14:55:44 -07:00
[[NSApplication sharedApplication] run];
return 0;
}
/*
1, derive a new View type that will have our drawing methods
2. add time to the run loop to trigger redraws
figure out how to draw
*/