Пример #1
0
int main(int argc, char **argv)
{
  plan_tests(1);

  ScreenGlobalInit screen;

#ifdef ANDROID
  TopWindow main_window;
  EventLoop loop(*event_queue, main_window);
  Event event;
#elif defined(ENABLE_SDL)
  TopWindow main_window;
  EventLoop loop(main_window);
  SDL_Event event;
#else
  EventLoop loop;
  MSG event;
#endif

  TestNotify notify;
  TestThread thread(notify);
  thread.Start();

#ifndef USE_GDI
  while (!quit && loop.Get(event))
    loop.Dispatch(event);
#else
  while (!quit && loop.Get(event))
    loop.Dispatch(event);
#endif

  ok1(quit);

  return exit_status();
}
Пример #2
0
int
TopWindow::RunEventLoop()
{
  EventLoop loop;
  Event event;
  while (loop.Get(event))
    loop.Dispatch(event);

  return event.msg.wParam;
}