コード例 #1
0
ファイル: al.go プロジェクト: 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
}
コード例 #2
0
ファイル: events.go プロジェクト: b1naryth1ef/allegro
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
}