Rename PollEvents -> DoEvents

This commit is contained in:
Hajime Hoshi 2014-01-11 18:11:13 +09:00
parent ffc08a75d3
commit 2b18ce8748
4 changed files with 7 additions and 7 deletions

View File

@ -66,7 +66,7 @@ func main() {
s := make(chan os.Signal, 1)
signal.Notify(s, os.Interrupt, syscall.SIGTERM)
for {
u.PollEvents()
u.DoEvents()
select {
default:
drawing <- graphics.NewLazyContext()
@ -76,7 +76,7 @@ func main() {
context.Flush(actualContext)
})
after := time.After(time.Duration(int64(time.Second) / 120))
u.PollEvents()
u.DoEvents()
<-after
case <-s:
return

View File

@ -77,7 +77,7 @@ EbitenGameWindow* CreateGameWindow(size_t width, size_t height, const char* titl
return window;
}
void PollEvents(void) {
void DoEvents(void) {
for (;;) {
NSEvent* event = [NSApp nextEventMatchingMask:NSAnyEventMask
untilDate:[NSDate distantPast]

View File

@ -5,7 +5,7 @@ package cocoa
//
// void Run(void);
// void StartApplication(void);
// void PollEvents(void);
// void DoEvents(void);
//
import "C"
import (
@ -42,8 +42,8 @@ func (u *cocoaUI) CreateGameWindow(width, height, scale int, title string) ui.Ga
return u.sharedContext.createGameWindow(width, height, scale, title)
}
func (u *cocoaUI) PollEvents() {
C.PollEvents()
func (u *cocoaUI) DoEvents() {
C.DoEvents()
}
func (u *cocoaUI) RunMainLoop() {

View File

@ -33,7 +33,7 @@ type WindowClosedEvent struct {
}
type UI interface {
PollEvents()
DoEvents()
CreateGameWindow(screenWidth, screenHeight, screenScale int, title string) GameWindow
RunMainLoop()
}