15aab34030fa7082e86480889f57f5af1d8b701f4epoger@google.com/*
25aab34030fa7082e86480889f57f5af1d8b701f4epoger@google.com * Copyright 2011 Google Inc.
35aab34030fa7082e86480889f57f5af1d8b701f4epoger@google.com *
45aab34030fa7082e86480889f57f5af1d8b701f4epoger@google.com * Use of this source code is governed by a BSD-style license that can be
55aab34030fa7082e86480889f57f5af1d8b701f4epoger@google.com * found in the LICENSE file.
65aab34030fa7082e86480889f57f5af1d8b701f4epoger@google.com */
75aab34030fa7082e86480889f57f5af1d8b701f4epoger@google.com
85aab34030fa7082e86480889f57f5af1d8b701f4epoger@google.com#include "SkApplication.h"
95aab34030fa7082e86480889f57f5af1d8b701f4epoger@google.com#include "SkEvent.h"
105aab34030fa7082e86480889f57f5af1d8b701f4epoger@google.com#include "SkWindow.h"
115aab34030fa7082e86480889f57f5af1d8b701f4epoger@google.com
125aab34030fa7082e86480889f57f5af1d8b701f4epoger@google.comint main(int argc, char** argv){
131b3fea7172457f26fb8dd72f0ea59eedba920133tfarina@chromium.org    SkOSWindow* window = create_sk_window(NULL, argc, argv);
145aab34030fa7082e86480889f57f5af1d8b701f4epoger@google.com
151b3fea7172457f26fb8dd72f0ea59eedba920133tfarina@chromium.org    // drain any events that occurred before |window| was assigned.
165aab34030fa7082e86480889f57f5af1d8b701f4epoger@google.com    while (SkEvent::ProcessEvent());
175aab34030fa7082e86480889f57f5af1d8b701f4epoger@google.com
185aab34030fa7082e86480889f57f5af1d8b701f4epoger@google.com    // Start normal Skia sequence
195aab34030fa7082e86480889f57f5af1d8b701f4epoger@google.com    application_init();
205aab34030fa7082e86480889f57f5af1d8b701f4epoger@google.com
211b3fea7172457f26fb8dd72f0ea59eedba920133tfarina@chromium.org    window->loop();
225aab34030fa7082e86480889f57f5af1d8b701f4epoger@google.com
231b3fea7172457f26fb8dd72f0ea59eedba920133tfarina@chromium.org    delete window;
245aab34030fa7082e86480889f57f5af1d8b701f4epoger@google.com    application_term();
255aab34030fa7082e86480889f57f5af1d8b701f4epoger@google.com    return 0;
265aab34030fa7082e86480889f57f5af1d8b701f4epoger@google.com}
27