Exemplo n.º 1
0
Arquivo: al.go Projeto: beoran/algo
// Returns the next event from the event queue as well as a bool
// to signify if an event was fetched sucessfully or not.
func (self *EventQueue) GetNextEvent() (event *Event, ok bool) {
	event = &Event{}
	ok = bool(C.al_get_next_event(self.handle, event.toC()))
	return event, ok
}
Exemplo n.º 2
0
func (e *EventQueue) GetNextEvent() (bool, *Event) {
	ev := new(Event)
	r := bool(C.al_get_next_event((*C.ALLEGRO_EVENT_QUEUE)(unsafe.Pointer(e)), (*C.ALLEGRO_EVENT)(unsafe.Pointer(ev))))
	return r, ev
}