Example #1
0
func (e *EventQueue) WaitForEventUntil(timeout float64) (bool, *Event) {
	var t C.ALLEGRO_TIMEOUT
	C.al_init_timeout(&t, C.double(timeout))
	ev := new(Event)
	r := bool(C.al_wait_for_event_until((*C.ALLEGRO_EVENT_QUEUE)(unsafe.Pointer(e)), (*C.ALLEGRO_EVENT)(unsafe.Pointer(ev)), &t))
	return r, ev
}
Example #2
0
func InitTimeout(secs float64) Timeout {
	var timeout C.ALLEGRO_TIMEOUT

	C.al_init_timeout(&timeout, C.double(secs))

	return Timeout(timeout)
}
Example #3
0
func InitTimeout(seconds float64) *Timeout {
	var t C.ALLEGRO_TIMEOUT
	C.al_init_timeout(&t, C.double(seconds))
	return (*Timeout)(unsafe.Pointer(&t))
}