void motionCallback(int x, int y) { Application* app = (Application*)Application::TheApplication; if (app) app->onMotion(x, y); }