ebiten: github.com/hajimehoshi/ebiten/internal/driver Index | Files

package driver

import "github.com/hajimehoshi/ebiten/internal/driver"

Index

Package Files

compositemode.go filter.go gamepadbutton.go graphics.go input.go keys.go mousebutton.go ui.go

Variables

var IsPlayground = time.Now().UnixNano() == 1257894000000000000

IsPlayground indicates whether the current environment is the Go Playground (play.golang.org) or not. The fixed time is explicitly defined. See "About the Playground" at play.golang.org.

var RegularTermination = errors.New("regular termination")

RegularTermination represents a regular termination. Run can return this error, and if this error is received, the game loop should be terminated as soon as possible.

type Address Uses

type Address int
const (
    AddressClampToZero Address = iota
    AddressRepeat
)

type CompositeMode Uses

type CompositeMode int
const (
    CompositeModeUnknown    CompositeMode = iota - 1
    CompositeModeSourceOver               // This value must be 0 (= initial value)
    CompositeModeClear
    CompositeModeCopy
    CompositeModeDestination
    CompositeModeDestinationOver
    CompositeModeSourceIn
    CompositeModeDestinationIn
    CompositeModeSourceOut
    CompositeModeDestinationOut
    CompositeModeSourceAtop
    CompositeModeDestinationAtop
    CompositeModeXor
    CompositeModeLighter

    CompositeModeMax = CompositeModeLighter
)

func (CompositeMode) Operations Uses

func (c CompositeMode) Operations() (src Operation, dst Operation)

type Filter Uses

type Filter int
const (
    FilterNearest Filter = iota + 1 // TODO: Remove '+ 1' when ebiten.FilterDefault can be removed.
    FilterLinear
    FilterScreen
)

type GamepadButton Uses

type GamepadButton int
const (
    GamepadButton0 GamepadButton = iota
    GamepadButton1
    GamepadButton2
    GamepadButton3
    GamepadButton4
    GamepadButton5
    GamepadButton6
    GamepadButton7
    GamepadButton8
    GamepadButton9
    GamepadButton10
    GamepadButton11
    GamepadButton12
    GamepadButton13
    GamepadButton14
    GamepadButton15
    GamepadButton16
    GamepadButton17
    GamepadButton18
    GamepadButton19
    GamepadButton20
    GamepadButton21
    GamepadButton22
    GamepadButton23
    GamepadButton24
    GamepadButton25
    GamepadButton26
    GamepadButton27
    GamepadButton28
    GamepadButton29
    GamepadButton30
    GamepadButton31
)

type Graphics Uses

type Graphics interface {
    SetThread(thread *thread.Thread)
    Begin()
    End()
    SetWindow(window uintptr)
    SetVertices(vertices []float32, indices []uint16)
    Flush()
    NewImage(width, height int) (Image, error)
    NewScreenFramebufferImage(width, height int) (Image, error)
    Reset() error
    Draw(indexLen int, indexOffset int, mode CompositeMode, colorM *affine.ColorM, filter Filter, address Address) error
    SetVsyncEnabled(enabled bool)
    VDirection() VDirection
    NeedsRestoring() bool
    IsGL() bool
    HasHighPrecisionFloat() bool
    MaxImageSize() int
}

type Image Uses

type Image interface {
    Dispose()
    IsInvalidated() bool
    Pixels() ([]byte, error)
    SetAsDestination()
    SetAsSource()
    ReplacePixels(pixels []byte, x, y, width, height int)
}

type Input Uses

type Input interface {
    CursorPosition() (x, y int)
    GamepadAxis(id int, axis int) float64
    GamepadAxisNum(id int) int
    GamepadButtonNum(id int) int
    GamepadIDs() []int
    IsGamepadButtonPressed(id int, button GamepadButton) bool
    IsKeyPressed(key Key) bool
    IsMouseButtonPressed(button MouseButton) bool
    ResetForFrame()
    RuneBuffer() []rune
    TouchIDs() []int
    TouchPosition(id int) (x, y int)
    Wheel() (xoff, yoff float64)
}

type Key Uses

type Key int
const (
    Key0 Key = iota
    Key1
    Key2
    Key3
    Key4
    Key5
    Key6
    Key7
    Key8
    Key9
    KeyA
    KeyB
    KeyC
    KeyD
    KeyE
    KeyF
    KeyG
    KeyH
    KeyI
    KeyJ
    KeyK
    KeyL
    KeyM
    KeyN
    KeyO
    KeyP
    KeyQ
    KeyR
    KeyS
    KeyT
    KeyU
    KeyV
    KeyW
    KeyX
    KeyY
    KeyZ
    KeyAlt
    KeyApostrophe
    KeyBackslash
    KeyBackspace
    KeyCapsLock
    KeyComma
    KeyControl
    KeyDelete
    KeyDown
    KeyEnd
    KeyEnter
    KeyEqual
    KeyEscape
    KeyF1
    KeyF2
    KeyF3
    KeyF4
    KeyF5
    KeyF6
    KeyF7
    KeyF8
    KeyF9
    KeyF10
    KeyF11
    KeyF12
    KeyGraveAccent
    KeyHome
    KeyInsert
    KeyKP0
    KeyKP1
    KeyKP2
    KeyKP3
    KeyKP4
    KeyKP5
    KeyKP6
    KeyKP7
    KeyKP8
    KeyKP9
    KeyKPAdd
    KeyKPDecimal
    KeyKPDivide
    KeyKPEnter
    KeyKPEqual
    KeyKPMultiply
    KeyKPSubtract
    KeyLeft
    KeyLeftBracket
    KeyMenu
    KeyMinus
    KeyNumLock
    KeyPageDown
    KeyPageUp
    KeyPause
    KeyPeriod
    KeyPrintScreen
    KeyRight
    KeyRightBracket
    KeyScrollLock
    KeySemicolon
    KeyShift
    KeySlash
    KeySpace
    KeyTab
    KeyUp
)

type MouseButton Uses

type MouseButton int
const (
    MouseButtonLeft MouseButton = iota
    MouseButtonRight
    MouseButtonMiddle
)

type Operation Uses

type Operation int
const (
    Zero Operation = iota
    One
    SrcAlpha
    DstAlpha
    OneMinusSrcAlpha
    OneMinusDstAlpha
)

type UI Uses

type UI interface {
    DeviceScaleFactor() float64
    IsCursorVisible() bool
    IsFullscreen() bool
    IsRunnableInBackground() bool
    IsVsyncEnabled() bool
    IsWindowDecorated() bool
    IsWindowResizable() bool
    Run(width, height int, scale float64, title string, context UIContext, graphics Graphics) error
    RunWithoutMainLoop(width, height int, scale float64, title string, context UIContext, graphics Graphics) <-chan error
    ScreenPadding() (x0, y0, x1, y1 float64)
    ScreenScale() float64
    ScreenSizeInFullscreen() (int, int)
    SetCursorVisible(visible bool)
    SetFullscreen(fullscreen bool)
    SetRunnableInBackground(runnableInBackground bool)
    SetScreenScale(scale float64)
    SetScreenSize(width, height int)
    SetVsyncEnabled(enabled bool)
    SetWindowDecorated(decorated bool)
    SetWindowIcon(iconImages []image.Image)
    SetWindowResizable(resizable bool)
    SetWindowTitle(title string)
    Input() Input
}

type UIContext Uses

type UIContext interface {
    SetSize(width, height int, scale float64)
    Update(afterFrameUpdate func()) error
    SuspendAudio()
    ResumeAudio()
}

type VDirection Uses

type VDirection int
const (
    VUpward VDirection = iota
    VDownward
)

Package driver imports 6 packages (graph) and is imported by 10 packages. Updated 2019-08-02. Refresh now. Tools for package owners.