events

package
v0.0.0-...-28fb5cd Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 8, 2017 License: Apache-2.0 Imports: 2 Imported by: 17

Documentation

Index

Constants

View Source
const (
	CursorPosition  = iota
	KeyDown         = iota
	KeyUp           = iota
	KeyRepeat       = iota
	WindowClose     = iota
	MouseButtonDown = iota
	MouseButtonUp   = iota
)

Variables

This section is empty.

Functions

func CursorPositionCallback

func CursorPositionCallback(w *glfw.Window, x, y float64)

CursorPositionCallback TODO doc

func KeyCallback

func KeyCallback(w *glfw.Window, key glfw.Key, scancode int, action glfw.Action, mods glfw.ModifierKey)

KeyCallback TODO doc

func MouseButtonCallback

func MouseButtonCallback(w *glfw.Window, button glfw.MouseButton, action glfw.Action, mods glfw.ModifierKey)

MouseButtonCallback TODO: doc

func Poll

func Poll()

func WindowCloseCallback

func WindowCloseCallback(w *glfw.Window)

WindowCloseCallback TODO doc

Types

type Event

type Event struct {
	Type        int
	Window      *glfw.Window
	Key         glfw.Key
	Scancode    int
	Mods        glfw.ModifierKey
	X           float32
	Y           float32
	MouseButton glfw.MouseButton
}

func Get

func Get() []Event

type Handler

type Handler interface {
	Handle(event Event)
}

Handler for events

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL