Exemple #1
0
void handle_event(lstate *state)
{
	switch(state->event.type) {
		case GR_EVENT_TYPE_EXPOSURE:
			handle_exposure_event(state);
			break;
		case GR_EVENT_TYPE_BUTTON_DOWN:
			handle_mouse_event(state);
			break;
		case GR_EVENT_TYPE_CLOSE_REQ:
			break;
		case GR_EVENT_TYPE_SCREENSAVER:
			handle_screensaver_event(state);
			break;
		case GR_EVENT_TYPE_TIMER:
			handle_timer_event(state);
			break;
		case GR_EVENT_TYPE_NONE:
		case GR_EVENT_TYPE_CHLD_UPDATE:
			break;
		default:
			GrError("Got unknown event type %d\n", state->event.type);
			break;
	}
}
Exemple #2
0
bool timermgr::handle_event() {
	update_taccum();

	handle_timer_event();

	return false;
}