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(); }
int TopWindow::event_loop() { EventLoop loop; MSG msg; while (loop.get(msg)) loop.dispatch(msg); return msg.wParam; }