Example #1
0
File: al.go Project: beoran/algo
// Peeks at the next event in the event queue and returns it as well as a bool
// to signify if an event was fetched sucessfully or not.
func (self *EventQueue) PeekNextEvent() (event *Event, ok bool) {
	event = &Event{}
	ok = bool(C.al_peek_next_event(self.handle, event.toC()))
	return event, ok
}
Example #2
0
func (e *EventQueue) PeekNextEvent() (bool, *Event) {
	ev := new(Event)
	r := bool(C.al_peek_next_event((*C.ALLEGRO_EVENT_QUEUE)(unsafe.Pointer(e)), (*C.ALLEGRO_EVENT)(unsafe.Pointer(ev))))
	return r, ev
}