// 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 }
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 }