/* main example code 
The main function will draw all the graphic primitives from the graphic library on a line from left to right (incrementing x) and repeat this from bottom to top with varying colors (incrementing y). Below the figures it draws the Atmel logo centered on the screen.  */
int main(void)
/* main example code 
The main function will draw all the graphic primitives from the graphic library on a line from left to right (incrementing x) and repeat this from bottom to top with varying colors (incrementing y). Below the figures it draws the Atmel logo centered on the screen.  */
int main(void)
{
	static struct mxt_device device;
	board_init();
	sysclk_init();
	membag_init();
	gfx_init();
	mxt_init(&device);
	win_init();
	setup_gui_root_window();
	if (app_widget_launch() == false) {
		show_out_of_memory_error();
		for (;;);
	}
	while (true) {
		struct win_pointer_event win_touch_event;
		while (read_touch_event(&device, &win_touch_event)) {
			win_queue_pointer_event(&win_touch_event);
		}
		win_process_events();
	}
}