Documentation ¶
Index ¶
- Variables
- func Delegate(event sdl.Event)
- func GetCursor() *sdl.Cursor
- func GetPosition() (float32, float32)
- func GetRelativeMode() bool
- func GetSystemCursor(name string) *sdl.Cursor
- func GetX() float32
- func GetY() float32
- func IsDown(button Button) bool
- func IsGrabbed() bool
- func IsVisible() bool
- func NewCursor(filename string, hx, hy int) (*sdl.Cursor, error)
- func SetCursor(cursor *sdl.Cursor)
- func SetGrabbed(enabled bool)
- func SetPosition(x, y float32)
- func SetRelativeMode(isvisible bool)
- func SetVisible(isvisible bool)
- func SetX(x float32)
- func SetY(y float32)
- type Button
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // OnButtonDown is called when the a button on the mouse is pressed down. OnButtonDown func(x, y float32, button Button) // OnButtonUp is called when the a button on the mouse is released. OnButtonUp func(x, y float32, button Button) // OnMove is called when the mouse is moved. OnMove func(x, y, dx, dy float32) // OnFocus is called when the program has mouse focus or loses mouse focus. OnFocus func(has_focus bool) // OnWheelMove is called when the mouse wheel is changed OnWheelMove func(x, y float32) )
Functions ¶
func Delegate ¶
Delegate is used by amore/event to pass events to the mouse package. It may also be useful to stub or fake events
func GetPosition ¶
GetPosition returns the current position of the mouse.
func GetRelativeMode ¶
func GetRelativeMode() bool
GetRelativeMode gets whether relative mode is enabled for the mouse.
func GetSystemCursor ¶
GetSystemCursor Gets a Cursor object representing a system-native hardware cursor.
func SetGrabbed ¶
func SetGrabbed(enabled bool)
SetGrabbed grabs the mouse and confines it to the window.
func SetPosition ¶
func SetPosition(x, y float32)
SetPosition sets the current position of the mouse.
func SetRelativeMode ¶
func SetRelativeMode(isvisible bool)
SetRelativeMode sets whether relative mode is enabled for the mouse.
func SetVisible ¶
func SetVisible(isvisible bool)
SetVisible sets the current visibility of the cursor.
Types ¶
Click to show internal directories.
Click to hide internal directories.