1
#include <Carbon/Carbon.h>
2
#include "SkApplication.h"
5
int main(int argc, char* argv[])
11
// Create a Nib reference passing the name of the nib file (without the .nib extension)
12
// CreateNibReference only searches into the application bundle.
13
err = CreateNibReference(CFSTR("main"), &nibRef);
14
require_noerr( err, CantGetNibRef );
16
// Then create a window. "MainWindow" is the name of the window object. This name is set in
17
// InterfaceBuilder when the nib is created.
18
err = CreateWindowFromNib(nibRef, CFSTR("MainWindow"), &window);
19
require_noerr( err, CantCreateWindow );
21
// We don't need the nib reference anymore.
22
DisposeNibReference(nibRef);
24
// if we get here, we can start our normal Skia sequence
27
(void)create_sk_window(window);
28
SizeWindow(window, 640, 480, false);
31
// The window was created hidden so show it.
34
// Call the event loop
35
RunApplicationEventLoop();