mirror of
https://github.com/OpenDiablo2/OpenDiablo2
synced 2025-02-03 07:07:25 -05:00
25 lines
725 B
Go
25 lines
725 B
Go
package d2interface
|
|
|
|
type renderCallback = func(Surface) error
|
|
|
|
type updateCallback = func() error
|
|
|
|
// Renderer interface defines the functionality of a renderer
|
|
type Renderer interface {
|
|
GetRendererName() string
|
|
SetWindowIcon(fileName string)
|
|
Run(r renderCallback, u updateCallback, width, height int, title string) error
|
|
IsDrawingSkipped() bool
|
|
CreateSurface(surface Surface) (Surface, error)
|
|
NewSurface(width, height int) Surface
|
|
IsFullScreen() bool
|
|
SetFullScreen(fullScreen bool)
|
|
SetVSyncEnabled(vsync bool)
|
|
GetVSyncEnabled() bool
|
|
GetCursorPos() (int, int)
|
|
CurrentFPS() float64
|
|
ShowPanicScreen(message string)
|
|
Print(target interface{}, str string) error
|
|
PrintAt(target interface{}, str string, x, y int)
|
|
}
|