Beispiel #1
0
int main(int argc, char **argv)
{
	int ret = 0;
	App app = appCreate("State Machine", 640, 480);
	
	if (app) {
		ret = appRun(app, argc, argv);
	}
	
	appDestroy(app);
	
	return ret;
}
//----------------------------------------------------------------------
void appKeyboard(unsigned char key, int x, int y)
{
    //this way we can exit the program cleanly
    switch(key)
    {
        case '\033': // escape quits
        case '\015': // Enter quits    
        case 'Q':    // Q quits
        case 'q':    // q (or escape) quits
            // Cleanup up and quit
            appDestroy();
            break;
    }
}